diff --git a/.gitignore b/.gitignore index 284ba4cc00aa81d3c8f0934556fbced8914b8269..aa3d9a3e3d7f76fe680256776e7e174d415651c7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules .idea .DS_STORE +scripts diff --git a/README.md b/README.md index 859c8f30cfd5296b2a862444fc9e8da5a9126441..693b9607e53d5c244e97f51c8eae5f975533fb76 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,6 @@ https://github.com/lgarron/clipboard.js https://www.npmjs.com/package/dropzone https://github.com/enyo/dropzone https://github.com/layerssss/paste.js https://github.com/hustcc/timeago.js -https://www.npmjs.com/package/swipebox http://www.jacklmoore.com/autosize/ https://www.npmjs.com/package/jquery.hotkeys https://github.com/jeresig/jquery.hotkeys @@ -38,3 +37,5 @@ http://gromo.github.io/jquery.scrollbar/demo/basic.html https://github.com/gromo/jquery.scrollbar https://github.com/zenozeng/color-hash https://github.com/Nickersoft/push.js +https://github.com/PitPik/tinyColorPicker +http://fancyapps.com/fancybox/3/ diff --git a/aurelia_project/aurelia.json b/aurelia_project/aurelia.json index 3b4e70b67064bee9e5fc1aa329c16f061661c177..baf6e8f7c2f1a5df10257612f8f331414fd39b75 100644 --- a/aurelia_project/aurelia.json +++ b/aurelia_project/aurelia.json @@ -121,12 +121,18 @@ ] }, { - "name": "swipebox", - "path": "../node_modules/swipebox", - "main": "src/js/jquery.swipebox.min", + "name": "tinycolorpicker", + "path": "../node_modules/tinyColorPicker", + "main": "jqColorPicker.min", + "deps": ["jquery"] + }, + { + "name": "fancybox", + "path": "../node_modules/@fancyapps/fancybox", + "main": "dist/jquery.fancybox.min", "deps": ["jquery"], "resources": [ - "src/css/swipebox.min.css" + "dist/jquery.fancybox.min.css" ] }, { diff --git a/index.html b/index.html index 1c84f4a70ec512061a1a2f8b59974300ed048c7c..1dd34487e4ef71839ba0eae1595a78d6a0a5e9df 100644 --- a/index.html +++ b/index.html @@ -6,6 +6,8 @@ + + diff --git a/node_modules.zip b/node_modules.zip deleted file mode 100644 index 0230168f429314fe35cc69f1b3f9f3ab305eba31..0000000000000000000000000000000000000000 Binary files a/node_modules.zip and /dev/null differ diff --git a/npm-shrinkwrap.json.bk b/npm-shrinkwrap.json.bk index a29a0c272b98fea59243ffd0b7956584f11d9670..018f520aabd64d15a2868a663cd41f72ef13a215 100644 --- a/npm-shrinkwrap.json.bk +++ b/npm-shrinkwrap.json.bk @@ -294,11 +294,6 @@ "from": "simplemde@>=1.11.2 <2.0.0", "resolved": "https://registry.npm.taobao.org/simplemde/download/simplemde-1.11.2.tgz" }, - "swipebox": { - "version": "1.4.6", - "from": "swipebox@>=1.4.6 <2.0.0", - "resolved": "https://registry.npm.taobao.org/swipebox/download/swipebox-1.4.6.tgz" - }, "text": { "version": "2.0.15", "from": "requirejs/text#latest", diff --git a/package.json b/package.json index cdf9c2f4067e677c5b5fdbd02c0544bed0f6d53a..5f63e41daf51e5a9c0366d69d82beb22992301a6 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ }, "license": "MIT", "dependencies": { + "@fancyapps/fancybox": "^3.1.20", "aurelia-animator-css": "^1.0.0", "aurelia-bootstrapper": "^1.0.0", "aurelia-fetch-client": "^1.0.0", @@ -34,11 +35,11 @@ "push.js": "0.0.11", "requirejs": "^2.3.2", "semantic-ui-calendar": "0.0.6", - "simplemde": "^1.11.2", - "swipebox": "^1.4.6", + "simplemde": "github:xiweicheng/simplemde-markdown-editor#master", + "tinycolorpicker": "github:xiweicheng/tinyColorPicker#master", "text": "github:requirejs/text#latest", "timeago.js": "^2.0.2", - "tms-semantic-ui": "^2.2.4", + "tms-semantic-ui": "^3.2.10", "toastr": "^2.1.2", "wurl": "^2.1.0" }, diff --git a/scripts/app-bundle-63d2de3d53.js b/scripts/app-bundle-63d2de3d53.js deleted file mode 100644 index f1c5e09d470e6e5e1a771d8ff559aaa544f30276..0000000000000000000000000000000000000000 --- a/scripts/app-bundle-63d2de3d53.js +++ /dev/null @@ -1,30 +0,0 @@ -define("app",["exports","tms-semantic-ui","semantic-ui-calendar","jquery-format"],function(e){"use strict";function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.App=void 0;e.App=function(){function e(){var n=this;t(this,e),this.init(),this.initCalendar(),this.subscribe=ea.subscribe(nsCons.EVENT_APP_ROUTER_NAVIGATE,function(e){n.router&&n.router.navigate(""+e.to)})}return e.prototype.unbind=function(){this.subscribe.dispose()},e.prototype.init=function(){$.fn.dropdown.settings.forceSelection=!1,_.extend($.fn.form.settings.prompt,{empty:"{name}不能为空",checked:"{name}必须被勾选",email:"{name}必须是正确的邮件格式",url:"{name}必须是正确的URL格式",regExp:"{name}验证格式不正确",integer:"{name}必须为一个整数",decimal:"{name}必须为一个小数",number:"{name}必须设置为一个数字",is:'{name}必须符合规则"{ruleValue}"',isExactly:'{name}必须精确匹配"{ruleValue}"',not:'{name}不能设置为"{ruleValue}"',notExactly:'{name}不能准确设置为"{ruleValue}"',contain:'{name}需要包含"{ruleValue}"',containExactly:'{name}需要精确包含"{ruleValue}"',doesntContain:'{name}不能包含"{ruleValue}"',doesntContainExactly:'{name}不能精确包含"{ruleValue}"',minLength:"{name}必须至少包含{ruleValue}个字符",length:"{name}必须为{ruleValue}个字符",exactLength:"{name}必须为{ruleValue}个字符",maxLength:"{name}必须不能超过{ruleValue}个字符",match:"{name}必须匹配{ruleValue}字段",different:"{name}必须不同于{ruleValue}字段",creditCard:"{name}必须是一个正确的信用卡数字格式",minCount:"{name}必须至少包含{ruleValue}个选择项",exactCount:"{name}必须准确包含{ruleValue}个选择项",maxCount:"{name} 必须有{ruleValue}或者更少个选择项"})},e.prototype.initCalendar=function(){return $.fn.calendar.settings.text={days:["日","一","二","三","四","五","六"],months:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],monthsShort:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],today:"今天",now:"现在",am:"上午",pm:"下午"},$.fn.calendar.settings.formatter.date=function(e,t){if(!e)return"";e.getDate(),e.getMonth()+1,e.getFullYear();return $.format.date(e,"yyyy-MM-dd")},this},e.prototype.configureRouter=function(e,t){var n=null;localStorage&&(n=localStorage.getItem(nsCons.KEY_REMEMBER_LAST_CHAT_TO)),e.map([{route:["pwd-reset"],name:"reset",moduleId:"user/user-pwd-reset",nav:!1,title:"密码重置 | TMS"},{route:["register"],name:"register",moduleId:"user/user-register",nav:!1,title:"用户注册 | TMS"},{route:["chat/:username"],name:"chat",moduleId:"chat/chat-direct",nav:!1,title:"私聊 | TMS"},{route:["blog"],name:"chat",moduleId:"blog/blog",nav:!1,title:"博文 | TMS"},{route:["blog/:id"],name:"chat",moduleId:"blog/blog",nav:!1,title:"博文 | TMS"},{route:["login"],name:"login",moduleId:"user/user-login",nav:!1,title:"登录 | TMS"},{route:["test"],name:"test",moduleId:"test/test-lifecycle",nav:!1,title:"测试 | TMS"},{route:"",redirect:"chat/"+(n?n:"@admin")}]),this.router=t},e.prototype.activate=function(e,t,n){},e}()}),define("environment",["exports"],function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={debug:!1,testing:!1}}),define("main",["exports","./environment"],function(e,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){e.use.standardConfiguration().feature("init").feature("resources"),r.default.debug&&e.use.developmentLogging(),r.default.testing&&e.use.plugin("aurelia-testing"),e.start().then(function(){return e.setRoot()})}Object.defineProperty(e,"__esModule",{value:!0}),e.configure=i;var r=n(t);Promise.config({warnings:{wForgottenReturn:!1}})}),define("blog/blog",["exports","aurelia-framework","chat/chat-service"],function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.Blog=void 0;var a=i(n);e.Blog=function(){function e(){var t=this;r(this,e),this.rightSidebarShow=!1,this.isHide=!0,this.subscribe=ea.subscribe(nsCons.EVENT_BLOG_VIEW_CHANGED,function(e){t.routeConfig&&t.routeConfig.navModel.setTitle(e.title+" | 博文 | TMS")}),this.subscribe1=ea.subscribe(nsCons.EVENT_BLOG_RIGHT_SIDEBAR_TOGGLE,function(e){e.justRefresh||(e&&!_.isUndefined(e.isHide)?t.rightSidebarShow=!e.isHide:t.rightSidebarShow=!t.rightSidebarShow)}),this.subscribe2=ea.subscribe(nsCons.EVENT_BLOG_TOGGLE_SIDEBAR,function(e){t.isHide=e})}return e.prototype.unbind=function(){this.subscribe.dispose(),this.subscribe1.dispose(),this.subscribe2.dispose(),clearInterval(this.timeagoTimer)},e.prototype.attached=function(){var e=this,t=timeago();this.timeagoTimer=setInterval(function(){$(e.blogContainerRef).find("[data-timeago]").each(function(e,n){$(n).text(t.format($(n).attr("data-timeago"),"zh_CN"))})},5e3),$(".tms-blog").on("mouseenter","span[data-value].at-user:not(.pp-not),a[data-value].author:not(.pp-not)",function(e){e.preventDefault();var t=$(e.currentTarget);ea.publish(nsCons.EVENT_CHAT_MEMBER_POPUP_SHOW,{username:t.attr("data-value"),target:e.currentTarget})}),$(".tms-blog .em-blog-content").on("click","a.avatar[data-value], a.author[data-value], .at-user[data-value]",function(e){e.preventDefault(),ea.publish(nsCons.EVENT_BLOG_COMMENT_MSG_INSERT,{content:"{~"+$(e.currentTarget).attr("data-value")+"} "})})},e.prototype.detached=function(){},e.prototype.activate=function(e,t,n){return this.routeConfig=t,nsCtx.blogId=e.id,ea.publish(nsCons.EVENT_BLOG_SWITCH,{id:e.id}),Promise.all([a.default.loginUser().then(function(e){nsCtx.loginUser=e,nsCtx.isSuper=utils.isSuperUser(e),nsCtx.isAdmin=utils.isAdminUser(e)}),a.default.listUsers().then(function(e){nsCtx.users=e,window.tmsUsers=e})])},e}()}),define("chat/chat-direct",["exports","aurelia-framework","common/common-poll","clipboard","clipboard-js","dropzone","./chat-service"],function(e,t,n,i,r,a,o){"use strict";function s(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.ChatDirect=void 0;var c=s(n),d=s(i),u=s(r),m=s(a),p=s(o),g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};e.ChatDirect=function(){function e(){l(this,e),this.offset=0,this.first=!0,this.last=!0,this.originalHref=wurl(),this.users=[],this.channels=[],this.chatTo=null,m.default.autoDiscover=!1,this.poll=c.default,new d.default(".tms-chat-direct .tms-clipboard").on("success",function(e){toastr.success("复制到剪贴板成功!")}).on("error",function(e){toastr.error("复制到剪贴板失败!")}),this.initSubscribeEvent()}return e.prototype.initSubscribeEvent=function(){var e=this;this.subscribe=ea.subscribe(nsCons.EVENT_CHAT_MSG_SENDED,function(t){c.default.reset(),e.first||(e.isAt?e.listChatDirect(!1):e.listChatChannel(!1))}),this.subscribe2=ea.subscribe(nsCons.EVENT_CHAT_SIDEBAR_TOGGLE,function(t){if(e.isRightSidebarShow=t.isShow,e.isRightSidebarShow){var n=$(e.contentRef).width()-392;$(e.contentBodyRef).width(n),$(e.contentBodyRef).children(".scroll-wrapper").width(n)}else $(e.contentBodyRef).css("width","100%"),$(e.contentBodyRef).children(".scroll-wrapper").css("width","100%")}),this.subscribe3=ea.subscribe(nsCons.EVENT_CHAT_CHANNEL_CREATED,function(t){e.channels.splice(0,0,t.channel)}),this.subscribe4=ea.subscribe(nsCons.EVENT_CHAT_SEARCH_GOTO_CHAT_ITEM,function(t){e.gotoChatItem(t.chatItem)}),this.subscribe5=ea.subscribe(nsCons.EVENT_CHAT_CHANNEL_DELETED,function(t){e.isAt||t.channel.name!=e.chatTo||(window.location=wurl("path")+("#/chat/@"+e.loginUser.username)),e.channels=[].concat(e.channels)}),this.subscribe6=ea.subscribe(nsCons.EVENT_CHAT_CHANNEL_JOINED,function(t){e.channels.splice(0,0,t.channel)}),this.subscribe7=ea.subscribe(nsCons.EVENT_CHAT_CHANNEL_LEAVED,function(t){e.isAt||t.channel.name!=e.chatTo||(window.location=wurl("path")+("#/chat/@"+e.loginUser.username)),e.channels=_.reject(e.channels,{id:t.channel.id})}),this.subscribe8=ea.subscribe(nsCons.EVENT_CHAT_LAST_ITEM_RENDERED,function(t){t.item.__scroll&&(e.scrollToAfterImgLoaded(e.markId?e.markId:"b"),delete t.item.__scroll,e.markId=null)}),this.subscribe9=ea.subscribe(nsCons.EVENT_SCROLLBAR_SCROLL_TO_BOTTOM,function(t){e.scrollbarRef==t.element&&c.default.reset()}),this.subscribe10=ea.subscribe(nsCons.EVENT_CHAT_CONTENT_SCROLL_TO,function(t){e.scrollTo(t.target)})},e.prototype.unbind=function(){this.subscribe.dispose(),this.subscribe2.dispose(),this.subscribe3.dispose(),this.subscribe4.dispose(),this.subscribe5.dispose(),this.subscribe6.dispose(),this.subscribe7.dispose(),this.subscribe8.dispose(),this.subscribe9.dispose(),this.subscribe10.dispose(),clearInterval(this.timeagoTimer),c.default.stop()},e.prototype.activate=function(e,t,n){var i=this;return this._reset(),this.markId=e.id,this.routeConfig=t,this.chatId&&(this.preChatId=this.chatId),this.chatId=nsCtx.chatId=e.username,localStorage&&localStorage.setItem(nsCons.KEY_REMEMBER_LAST_CHAT_TO,this.chatId),this.isAt=nsCtx.isAt=_.startsWith(e.username,"@"),this.chatTo=nsCtx.chatTo=utils.getChatName(e.username),this.markId&&history.replaceState(null,"",utils.removeUrlQuery("id")),Promise.all([p.default.loginUser(!1).then(function(e){i.loginUser=e,nsCtx.loginUser=e,nsCtx.isSuper=utils.isSuperUser(i.loginUser),nsCtx.isAdmin=utils.isAdminUser(i.loginUser)}),p.default.listUsers(!1).then(function(e){if(i.users=e,nsCtx.users=e,window.tmsUsers=e,i.isAt)if(i.channel=null,i.user=_.find(i.users,{username:i.chatTo}),i.user){var n=i.user?i.user.name:i.chatTo;t.navModel.setTitle(n+" | 私聊 | TMS"),i.listChatDirect(!0)}else toastr.error("聊天用户["+i.chatTo+"]不存在或者没有权限访问!"),i.preChatId?window.location=wurl("path")+("#/chat/"+i.preChatId):window.location=wurl("path")+("#/chat/@"+i.loginUser.username)}),p.default.listChannels(!1).then(function(e){i.channels=e,nsCtx.channels=e,i.isAt||(i.user=null,i.channel=_.find(i.channels,{name:i.chatTo}),i.channel?(t.navModel.setTitle(i.channel.title+" | 频道 | TMS"),i.listChatChannel(!0)):(toastr.error("聊天频道["+i.chatTo+"]不存在或者没有权限访问!"),i.preChatId?window.location=wurl("path")+("#/chat/"+i.preChatId):window.location=wurl("path")+("#/chat/@"+i.loginUser.username)))})])},e.prototype._reset=function(){this.progressWidth=0,this.chats=null,this.first=!0,this.last=!0},e.prototype.lastMoreHandler=function(){var e=this,t=_.first(this.chats).id,n=void 0,i=void 0;this.isAt?(n="/admin/chat/direct/more",i={last:!0,start:t,size:20,chatTo:this.chatTo}):(n="/admin/chat/channel/more",i={last:!0,start:t,size:20,channelId:this.channel.id}),this.lastMoreP=$.get(n,i,function(n){n.success?(e.chats=_.unionBy(_.reverse(n.data),e.chats),e.last=n.msgs[0]-n.data.length<=0,!e.last&&(e.lastCnt=n.msgs[0]-n.data.length),e.scrollToAfterImgLoaded(t)):toastr.error(n.data,"获取更多消息失败!")})},e.prototype.firstMoreHandler=function(){var e=this,t=_.last(this.chats).id,n=void 0,i=void 0;this.isAt?(n="/admin/chat/direct/more",i={last:!1,start:t,size:20,chatTo:this.chatTo}):(n="/admin/chat/channel/more",i={last:!1,start:t,size:20,channelId:this.channel.id}),this.nextMoreP=$.get(n,i,function(n){n.success?(e.chats=_.unionBy(e.chats,n.data),e.first=n.msgs[0]-n.data.length<=0,!e.first&&(e.firstCnt=n.msgs[0]-n.data.length),e.scrollToAfterImgLoaded(t)):toastr.error(n.data,"获取更多消息失败!")})},e.prototype.listChatChannel=function(e){var t=this,n={size:20,channelId:this.channel.id};this.markId&&e&&(n.id=this.markId),$.get("/admin/chat/channel/listBy",n,function(e){t.processChats(e)})},e.prototype.listChatDirect=function(e){var t=this,n={size:20,chatTo:this.chatTo};this.markId&&e&&(n.id=this.markId),$.get("/admin/chat/direct/list",n,function(e){t.processChats(e)})},e.prototype.processChats=function(e){if(e.success){this.chats=_.reverse(e.data.content);var t=_.last(this.chats);t&&(t.__scroll=!0),this.last=e.data.last,this.first=e.data.first,!this.last&&(this.lastCnt=e.data.totalElements-e.data.numberOfElements),!this.first&&(this.firstCnt=e.data.size*e.data.number)}},e.prototype._scrollTo=function(e){"b"==e?$(this.commentsRef).parent(".scroll-content").scrollTo("max"):"t"==e?$(this.commentsRef).parent(".scroll-content").scrollTo(0):_.some(this.chats,{id:+e})?($(this.commentsRef).parent(".scroll-content").scrollTo('.comment[data-id="'+e+'"]',{offset:this.offset}),$(this.commentsRef).find(".comment[data-id]").removeClass("active"),$(this.commentsRef).find(".comment[data-id="+e+"]").addClass("active")):($(this.commentsRef).parent(".scroll-content").scrollTo("max"),toastr.warning("消息["+e+"]不存在,可能已经被删除!"))},e.prototype.scrollToAfterImgLoaded=function(e){var t=this;_.defer(function(){new ImagesLoaded(t.commentsRef).always(function(){t._scrollTo(e)}),t._scrollTo(e)})},e.prototype.doPoll=function(){var e=this;c.default.start(function(t,n){e._pollChats(t,n),e._poll(t,n)})},e.prototype._poll=function(e,t){var n=this,i=_.last(this.chats);!this.pollOnGoing&&!this.isAt&&this.channel&&i&&(this.pollOnGoing=!0,$.get("/admin/chat/channel/poll",{channelId:this.channel.id,lastChatChannelId:i.id,isAt:!0},function(e){if(e.success){if(n.countAt&&e.data.countAt>n.countAt){var t=e.data.countAt-n.countAt;push.create("TMS沟通@消息通知",{body:"你有"+t+"条新的@消息!",icon:{x16:"img/tms-x16.ico",x32:"img/tms-x32.png"},timeout:5e3})}n.countAt=e.data.countAt,ea.publish(nsCons.EVENT_CHAT_POLL_UPDATE,{countAt:e.data.countAt,countMyRecentSchedule:e.data.countMyRecentSchedule})}}).always(function(){n.pollOnGoing=!1}))},e.prototype._pollChats=function(e,t){var n=this;if(!this.pollChatsOngoing&&this.chats&&this.first){var i=_.last(this.chats),r=void 0,a=void 0;this.isAt?(r="/admin/chat/direct/latest",a={id:i?i.id:0,chatTo:this.chatTo}):(r="/admin/chat/channel/latest",a={id:i?i.id:0,channelId:this.channel.id}),this.pollChatsOngoing=!0,$.get(r,a,function(e){if(e.success){if(!n._checkPollResultOk(e))return;n._checkNeedNotify(e),n.chats=_.unionBy(n.chats,e.data,"id"),n.scrollToAfterImgLoaded("b")}else toastr.error(e.data,"轮询获取消息失败!")}).fail(function(n,i){t(),utils.errorAutoTry(function(){e()})}).always(function(){n.pollChatsOngoing=!1})}},e.prototype._checkNeedNotify=function(e){var t=this;if(0==e.data.length)return!1;var n=_.some(e.data,function(e){return e.creator.username==t.loginUser.username});n||push.create("TMS沟通频道消息通知",{body:"频道["+this.channel.title+"]有新消息了!",icon:{x16:"img/tms-x16.ico",x32:"img/tms-x32.png"},timeout:5e3})},e.prototype._checkPollResultOk=function(e){if(0==e.data.length)return!1;var t=_.first(e.data);return this.isAt?_.has(t,"chatTo"):_.has(t,"channel")},e.prototype.bind=function(e){this.doPoll()},e.prototype.attached=function(){var e=this,t=timeago();this.timeagoTimer=setInterval(function(){$(e.chatContainerRef).find("[data-timeago]").each(function(e,n){$(n).text(t.format($(n).attr("data-timeago"),"zh_CN"))})},5e3),this.initHotkeys(),this.initFocusedComment(),$(this.scrollbarRef).on("mouseenter",".em-chat-content-item",function(t){t.preventDefault();var n=$(t.currentTarget);e.$hoveredItem=n,e.isShowHead=!utils.isElementInViewport(n.children(".em-user-avatar"));var i=n.next(".em-chat-content-item");1===i.size()?e.isShowFoot=!utils.isElementInViewport(i.children(".em-user-avatar")):e.isShowFoot=!1}).on("mouseleave",function(t){t.preventDefault(),e.isShowHead=!1,e.isShowFoot=!1}),$(this.commentsRef).on("click",".cbutton",function(e){e.preventDefault();var t=$(this);t.addClass("cbutton--click"),setTimeout(function(){t.removeClass("cbutton--click")},500)}),$(this.chatContainerRef).on("click","code[data-code]",function(e){e.ctrlKey&&(e.stopImmediatePropagation(),e.preventDefault(),u.default.copy($(e.currentTarget).attr("data-code")).then(function(){toastr.success("复制到剪贴板成功!")},function(e){toastr.error("复制到剪贴板失败!")}))}),$(this.chatContainerRef).on("click",".pre-code-wrapper",function(e){e.ctrlKey&&(e.stopImmediatePropagation(),e.preventDefault(),u.default.copy($(e.currentTarget).find("i[data-clipboard-text]").attr("data-clipboard-text")).then(function(){toastr.success("复制到剪贴板成功!")},function(e){toastr.error("复制到剪贴板失败!")}))}),$('.tms-comments-container[ref="scrollbarRef"]').scroll(_.throttle(function(t){try{var n=$(t.currentTarget)[0].scrollHeight,i=$(t.currentTarget)[0].scrollTop,r=1*i/(n-$(t.currentTarget).outerHeight());e.progressWidth=$(t.currentTarget).outerWidth()*r}catch(t){e.progressWidth=0}},10))},e.prototype.goHeadHandler=function(){var e=this;this.scrollTo(this.$hoveredItem,500,function(){e.isShowHead=!1})},e.prototype.goFootHandler=function(){var e=this;this.scrollTo(this.$hoveredItem.next(),500,function(){e.isShowFoot=!1})},e.prototype.initFocusedComment=function(){var e=this;$(this.commentsRef).on("click",".comment.item",function(t){e.focusedComment=$(t.currentTarget)}).on("dblclick",".comment.item",function(t){if(t.ctrlKey){var n=function(){var n=$(t.currentTarget).attr("data-id"),i=$(t.currentTarget).find(".content > textarea"),r=_.find(e.chats,{id:Number.parseInt(n)});return r.openEdit||r.creator.username==e.loginUser.username?void $.get("/admin/chat/"+(e.isAt?"direct":"channel")+"/get",{id:r.id},function(e){e.success?(r.version!=e.data.version&&_.extend(r,e.data),r.isEditing=!0,r.contentOld=r.content,_.defer(function(){i.focus().select(),autosize.update(i.get(0))})):toastr.error(e.data)}):{v:void 0}}();if("object"===("undefined"==typeof n?"undefined":g(n)))return n.v}})},e.prototype.getScrollTargetComment=function(e){if(e)if(this.focusedComment&&1===this.focusedComment.size()){var t=this.focusedComment.find("> a.em-user-avatar");if(utils.isElementInViewport(t)){var n=this.focusedComment.prev(".comment.item");1===n.size()&&(this.focusedComment=n)}}else this.focusedComment=$(this.commentsRef).children(".comment.item:first");else if(this.focusedComment&&1===this.focusedComment.size()){var i=this.focusedComment.next(".comment.item");1===i.size()&&(this.focusedComment=i)}else this.focusedComment=$(this.commentsRef).children(".comment.item:last");return this.focusedComment},e.prototype.scrollTo=function(e){var t=arguments.length<=1||void 0===arguments[1]?0:arguments[1],n=arguments[2];this.focusedComment=e,$(this.commentsRef).parent(".scroll-content").scrollTo(e,t,{offset:this.offset,onAfter:n})},e.prototype.initHotkeys=function(){var e=this;$(document).bind("keydown","ctrl+u",function(t){t.preventDefault(),$(e.emChatInputRef.btnItemUploadRef).find(".content").click()}).bind("keydown","ctrl+/",function(t){t.preventDefault(),e.emChatInputRef.emHotkeysModal.show()}).bind("keydown","alt+up",function(t){t.preventDefault(),e.scrollTo(e.getScrollTargetComment(!0))}).bind("keydown","alt+down",function(t){t.preventDefault(),e.scrollTo(e.getScrollTargetComment())}).bind("keydown","t",function(t){t.preventDefault(),e.scrollTo($(e.commentsRef).children(".comment.item:first"))}).bind("keydown","b",function(t){t.preventDefault(),e.scrollTo($(e.commentsRef).children(".comment.item:last"))})},e.prototype.gotoChatItem=function(e){var t=_.find(this.chats,{id:e.id});if(t)this.scrollToAfterImgLoaded(e.id);else{var n=void 0,i=void 0;e.chatTo?(n=e.chatTo.username,i="@"+n):e.channel&&(n=e.channel.name,i=""+n),this.chatTo==n?this.activate({id:e.id,username:i},this.routeConfig):window.location=wurl("path")+("#/chat/"+i+"?id="+e.id)}},e.prototype.refreshLatestHandler=function(e){e.stopImmediatePropagation(),this.markId=null,this.isAt?this.listChatDirect(!1):this.listChatChannel(!1)},e}()}),define("chat/chat-service",["exports"],function(e){"use strict";function t(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){function i(r,a){try{var o=t[r](a),s=o.value}catch(e){return void n(e)}return o.done?void e(s):Promise.resolve(s).then(function(e){return i("next",e)},function(e){return i("throw",e)})}return i("next")})}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function e(){n(this,e)}return e.prototype.loginUser=function(){function e(e){return n.apply(this,arguments)}var n=t(regeneratorRuntime.mark(function e(t){var n=this;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&this.user){e.next=3;break}return e.next=3,$.get("/admin/user/loginUser",function(e){e.success&&(n.user=e.data)});case 3:return e.abrupt("return",this.user);case 4:case"end":return e.stop()}},e,this)}));return e}(),e.prototype.listUsers=function(){function e(e){return n.apply(this,arguments)}var n=t(regeneratorRuntime.mark(function e(t){var n=this;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&this.users){e.next=3;break}return e.next=3,$.get("/admin/user/all",{},function(e){e.success&&(n.users=e.data)});case 3:return e.abrupt("return",this.users);case 4:case"end":return e.stop()}},e,this)}));return e}(),e.prototype.listChannels=function(){function e(e){return n.apply(this,arguments)}var n=t(regeneratorRuntime.mark(function e(t){var n=this;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&this.channels){e.next=3;break}return e.next=3,$.get("/admin/channel/listMy",function(e){e.success&&(n.channels=e.data)});case 3:return e.abrupt("return",this.channels);case 4:case"end":return e.stop()}},e,this)}));return e}(),e}();e.default=new i}),define("common/common-constant",[],function(){"use strict";window.nsCons={EVENT_APP_ROUTER_NAVIGATE:"event_app_router_navigate",EVENT_CHAT_MSG_SENDED:"event_chat_msg_sended",EVENT_CHAT_MSG_EDIT_UPLOAD:"event_chat_msg_edit_upload",EVENT_CHAT_SIDEBAR_TOGGLE:"event_chat_sidebar_toggle",EVENT_CHAT_SEARCH_RESULT:"event_chat_search_result",EVENT_CHAT_SEARCH_GOTO_CHAT_ITEM:"event_chat_search_goto_chat_item",EVENT_CHAT_CHANNEL_CREATED:"event_chat_channel_created",EVENT_CHAT_CHANNEL_DELETED:"event_chat_channel_deleted",EVENT_CHAT_CHANNEL_JOINED:"event_chat_channel_joined",EVENT_CHAT_CHANNEL_LEAVED:"event_chat_channel_leaved",EVENT_SHOW_HOTKEYS_MODAL:"event_show_hotkeys_modal",EVENT_CHAT_CHANNEL_MEMBER_ADD_OR_REMOVE:"event_chat_channel_member_add_or_remove",EVENT_CHAT_LAST_ITEM_RENDERED:"event_chat_last_item_rendered",EVENT_CHAT_SHOW_STOW:"event_chat_show_stow",EVENT_CHAT_SHOW_AT:"event_chat_show_at",EVENT_CHAT_SHOW_DIR:"event_chat_show_dir",EVENT_CHAT_SHOW_ATTACH:"event_chat_show_attach",EVENT_CHAT_SHOW_SCHEDULE:"event_chat_show_schedule",EVENT_SCROLLBAR_SCROLL_TO_BOTTOM:"event_scrollbar_scroll_to_bottom",EVENT_CHAT_MSG_INSERT:"event_chat_msg_insert",EVENT_CHAT_MSG_POPUP_SHOW:"event_chat_msg_popup_show",EVENT_CHAT_MEMBER_POPUP_SHOW:"event_chat_member_popup_show",EVENT_CHAT_MSG_WIKI_DIR:"event_chat_msg_wiki_dir",EVENT_CHAT_CONTENT_SCROLL_TO:"event_chat_content_scroll_to",EVENT_CHAT_POLL_UPDATE:"event_chat_poll_update",EVENT_SWITCH_CHAT_TO:"event_switch_chat_to",EVENT_CHANNEL_ACTIONS:"event_channel_actions",EVENT_CHANNEL_LINKS_REFRESH:"event_channel_links_refresh",EVENT_SYSTEM_LINKS_REFRESH:"event_system_links_refresh",EVENT_SCHEDULE_REFRESH:"event_schedule_refresh",EVENT_MODAAL_BEFORE_OPEN:"event_modaal_before_open",EVENT_MODAAL_AFTER_OPEN:"event_modaal_after_open",EVENT_MODAAL_BEFORE_CLOSE:"event_modaal_before_close",EVENT_MODAAL_AFTER_CLOSE:"event_modaal_after_close",EVENT_BLOG_SWITCH:"event_blog_switch",EVENT_BLOG_ACTION:"event_blog_action",EVENT_BLOG_CHANGED:"event_blog_changed",EVENT_SPACE_CHANGED:"event_space_changed",EVENT_BLOG_CREATED:"event_blog_created",EVENT_BLOG_UPDATED:"event_blog_updated",EVENT_BLOG_DELETED:"event_blog_deleted",EVENT_BLOG_TOGGLE_SIDEBAR:"event_blog_toggle_sidebar",EVENT_BLOG_VIEW_CHANGED:"event_blog_view_changed",EVENT_BLOG_STOW_CHANGED:"event_blog_stow_changed",EVENT_BLOG_SAVE:"event_blog_save",EVENT_BLOG_HISTORY_CHANGED:"event_blog_history_changed",EVENT_BLOG_COMMENT_POPUP_SHOW:"event_blog_comment_popup_show",EVENT_BLOG_RIGHT_SIDEBAR_TOGGLE:"event_blog_right_sidebar_toggle",EVENT_BLOG_LEFT_SIDEBAR_TOGGLE:"event_blog_left_sidebar_toggle",EVENT_BLOG_CONTENT_DIMMER_TOGGLE:"event_blog_content_dimmer_toggle",EVENT_BLOG_COMMENT_MSG_INSERT:"event_blog_comment_msg_insert",EVENT_BLOG_COMMENT_ADDED:"event_blog_comment_added",EVENT_BLOG_COMMENT_CHANGED:"event_blog_comment_changed",ACTION_TYPE_SEARCH:"action_type_search",ACTION_TYPE_STOW:"action_type_stow",ACTION_TYPE_AT:"action_type_at",ACTION_TYPE_DIR:"action_type_dir",ACTION_TYPE_ATTACH:"action_type_attach",ACTION_TYPE_SCHEDULE:"action_type_schedule",NUM_TEXT_COMPLETE_MAX_COUNT:20,STR_EMOJI_SEARCH_URL:"http://emoji.muan.co/",KEY_REMEMBER_LAST_CHAT_TO:"tms/remember_last_chat_to",KEY_LOGIN_USERNAME:"tms/login_username",KEY_BLOG_COMMON_SPACE:"tms/blog/common_space"}}),define("common/common-ctx",[],function(){"use strict";var e;window.nsCtx=(e={loginUser:{},isSuper:!1,isAdmin:!1,users:[],channels:[],memberAll:{username:"all",enabled:!0,mails:"",name:"全员"},isAt:!0,chatTo:null,chatId:null},e.isSuper=!1,e.isAdmin=!1,e.blogId=null,e.isModaalOpening=!1,e)}),define("common/common-diff",[],function(){"use strict";var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};!function(e,t){e.JsDiff=t()}(window,function(){return function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return e[i].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var r=n(1),a=i(r),o=n(3),s=n(4),l=n(5),c=n(6),d=n(7),u=n(8),m=n(9),p=n(10),g=n(12),h=n(13);t.Diff=a.default,t.diffChars=o.diffChars,t.diffWords=s.diffWords,t.diffWordsWithSpace=s.diffWordsWithSpace,t.diffLines=l.diffLines,t.diffTrimmedLines=l.diffTrimmedLines,t.diffSentences=c.diffSentences,t.diffCss=d.diffCss,t.diffJson=u.diffJson,t.structuredPatch=p.structuredPatch,t.createTwoFilesPatch=p.createTwoFilesPatch,t.createPatch=p.createPatch,t.applyPatch=m.applyPatch,t.convertChangesToDMP=g.convertChangesToDMP,t.convertChangesToXML=h.convertChangesToXML,t.canonicalize=u.canonicalize},function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}function r(e){this.ignoreWhitespace=e}function a(e,t,n,i){for(var r=0,a=e.length,o=0,s=0;re.length?i:e}),c.value=u.join("")}else c.value=t.slice(o,o+c.count).join("");o+=c.count,c.added||(s+=c.count)}}return e}function o(e){return{newPos:e.newPos,components:e.components.slice(0)}}t.__esModule=!0,t.default=r;var s=n(2),l=i(s);r.prototype={diff:function(e,t,n){function i(e){return n?(setTimeout(function(){n(void 0,e)},0),!0):e}function r(){for(var n=-1*d;n<=d;n+=2){var r=void 0,u=m[n-1],p=m[n+1],g=(p?p.newPos:0)-n;u&&(m[n-1]=void 0);var h=u&&u.newPos+1=l&&g+1>=c)return i(a(r.components,t,e,s.useLongestToken));m[n]=r}else m[n]=void 0}d++}var s=this;if(e=this.castInput(e),t=this.castInput(t),t===e)return i([{value:t}]);if(!t)return i([{value:e,removed:!0}]);if(!e)return i([{value:t,added:!0}]);t=this.removeEmpty(this.tokenize(t)),e=this.removeEmpty(this.tokenize(e));var l=t.length,c=e.length,d=1,u=l+c,m=[{newPos:-1,components:[]}],p=this.extractCommon(m[0],t,e,0);if(m[0].newPos+1>=l&&p+1>=c)return i([{value:t.join("")}]);if(n)!function e(){setTimeout(function(){return d>u?n():void(r()||e())},0)}();else for(;d<=u;){var g=r();if(g)return g}},pushComponent:function(e,t,n){var i=e[e.length-1];i&&i.added===t&&i.removed===n?e[e.length-1]={count:i.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,i){for(var r=t.length,a=n.length,o=e.newPos,s=o-i,l=0;o+1=0;r--){for(var c=i[r],d=0;d0?l(a.lines.slice(-o.context)):[],m-=g.length,p-=g.length)}g.push.apply(g,c.default(r,function(e){return(t.added?"+":"-")+e})),t.added?b+=r.length:h+=r.length}else{if(m)if(r.length<=2*o.context&&e=d.length-2&&r.length<=o.context){var _=/\n$/.test(n),v=/\n$/.test(i);0!=r.length||_?_&&v||g.push("\\ No newline at end of file"):g.splice(f.oldLines,0,"\\ No newline at end of file")}u.push(f),m=0,p=0,g=[]}h+=r.length,b+=r.length}},_=0;_"):r.removed&&t.push(""),t.push(i(r.value)),r.added?t.push(""):r.removed&&t.push("")}return t.join("")}function i(e){var t=e;return t=t.replace(/&/g,"&"),t=t.replace(//g,">"),t=t.replace(/"/g,""")}t.__esModule=!0,t.convertChangesToXML=n}])})}),define("common/common-emoji",["exports"],function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t="search,+1,-1,100,1234,8ball,a,ab,abc,abcd,accept,aerial_tramway,airplane,alarm_clock,alien,ambulance,anchor,angel,anger,angry,anguished,ant,apple,aquarius,aries,arrow_backward,arrow_double_down,arrow_double_up,arrow_down,arrow_down_small,arrow_forward,arrow_heading_down,arrow_heading_up,arrow_left,arrow_lower_left,arrow_lower_right,arrow_right,arrow_right_hook,arrow_up,arrow_up_down,arrow_up_small,arrow_upper_left,arrow_upper_right,arrows_clockwise,arrows_counterclockwise,art,articulated_lorry,astonished,atm,b,baby,baby_bottle,baby_chick,baby_symbol,back,baggage_claim,balloon,ballot_box_with_check,bamboo,banana,bangbang,bank,bar_chart,barber,baseball,basketball,bath,bathtub,battery,bear,bee,beer,beers,beetle,beginner,bell,bento,bicyclist,bike,bikini,bird,birthday,black_circle,black_joker,black_medium_small_square,black_medium_square,black_nib,black_small_square,black_square,black_square_button,blossom,blowfish,blue_book,blue_car,blue_heart,blush,boar,boat,bomb,book,bookmark,bookmark_tabs,books,boom,boot,bouquet,bow,bowling,bowtie,boy,bread,bride_with_veil,bridge_at_night,briefcase,broken_heart,bug,bulb,bullettrain_front,bullettrain_side,bus,busstop,bust_in_silhouette,busts_in_silhouette,cactus,cake,calendar,calling,camel,camera,cancer,candy,capital_abcd,capricorn,car,card_index,carousel_horse,cat,cat2,cd,chart,chart_with_downwards_trend,chart_with_upwards_trend,checkered_flag,cherries,cherry_blossom,chestnut,chicken,children_crossing,chocolate_bar,christmas_tree,church,cinema,circus_tent,city_sunrise,city_sunset,cl,clap,clapper,clipboard,clock1,clock10,clock1030,clock11,clock1130,clock12,clock1230,clock130,clock2,clock230,clock3,clock330,clock4,clock430,clock5,clock530,clock6,clock630,clock7,clock730,clock8,clock830,clock9,clock930,closed_book,closed_lock_with_key,closed_umbrella,cloud,clubs,cn,cocktail,coffee,cold_sweat,collision,computer,confetti_ball,confounded,confused,congratulations,construction,construction_worker,convenience_store,cookie,cool,cop,copyright,corn,couple,couple_with_heart,couplekiss,cow,cow2,credit_card,crescent_moon,crocodile,crossed_flags,crown,cry,crying_cat_face,crystal_ball,cupid,curly_loop,currency_exchange,curry,custard,customs,cyclone,dancer,dancers,dango,dart,dash,date,de,deciduous_tree,department_store,diamond_shape_with_a_dot_inside,diamonds,disappointed,disappointed_relieved,dizzy,dizzy_face,do_not_litter,dog,dog2,dollar,dolls,dolphin,donut,door,doughnut,dragon,dragon_face,dress,dromedary_camel,droplet,dvd,e-mail,ear,ear_of_rice,earth_africa,earth_americas,earth_asia,egg,eggplant,eight,eight_pointed_black_star,eight_spoked_asterisk,electric_plug,elephant,email,end,envelope,es,euro,european_castle,european_post_office,evergreen_tree,exclamation,expressionless,eyeglasses,eyes,facepunch,factory,fallen_leaf,family,fast_forward,fax,fearful,feelsgood,feet,ferris_wheel,file_folder,finnadie,fire,fire_engine,fireworks,first_quarter_moon,first_quarter_moon_with_face,fish,fish_cake,fishing_pole_and_fish,fist,five,flags,flashlight,floppy_disk,flower_playing_cards,flushed,foggy,football,fork_and_knife,fountain,four,four_leaf_clover,fr,free,fried_shrimp,fries,frog,frowning,fu,fuelpump,full_moon,full_moon_with_face,game_die,gb,gem,gemini,ghost,gift,gift_heart,girl,globe_with_meridians,goat,goberserk,godmode,golf,grapes,green_apple,green_book,green_heart,grey_exclamation,grey_question,grimacing,grin,grinning,guardsman,guitar,gun,haircut,hamburger,hammer,hamster,hand,handbag,hankey,hash,hatched_chick,hatching_chick,headphones,hear_no_evil,heart,heart_decoration,heart_eyes,heart_eyes_cat,heartbeat,heartpulse,hearts,heavy_check_mark,heavy_division_sign,heavy_dollar_sign,heavy_exclamation_mark,heavy_minus_sign,heavy_multiplication_x,heavy_plus_sign,helicopter,herb,hibiscus,high_brightness,high_heel,hocho,honey_pot,honeybee,horse,horse_racing,hospital,hotel,hotsprings,hourglass,hourglass_flowing_sand,house,house_with_garden,hurtrealbad,hushed,ice_cream,icecream,id,ideograph_advantage,imp,inbox_tray,incoming_envelope,information_desk_person,information_source,innocent,interrobang,iphone,it,izakaya_lantern,jack_o_lantern,japan,japanese_castle,japanese_goblin,japanese_ogre,jeans,joy,joy_cat,jp,key,keycap_ten,kimono,kiss,kissing,kissing_cat,kissing_closed_eyes,kissing_face,kissing_heart,kissing_smiling_eyes,koala,koko,kr,large_blue_circle,large_blue_diamond,large_orange_diamond,last_quarter_moon,last_quarter_moon_with_face,laughing,leaves,ledger,left_luggage,left_right_arrow,leftwards_arrow_with_hook,lemon,leo,leopard,libra,light_rail,link,lips,lipstick,lock,lock_with_ink_pen,lollipop,loop,loudspeaker,love_hotel,love_letter,low_brightness,m,mag,mag_right,mahjong,mailbox,mailbox_closed,mailbox_with_mail,mailbox_with_no_mail,man,man_with_gua_pi_mao,man_with_turban,mans_shoe,maple_leaf,mask,massage,meat_on_bone,mega,melon,memo,mens,metal,metro,microphone,microscope,milky_way,minibus,minidisc,mobile_phone_off,money_with_wings,moneybag,monkey,monkey_face,monorail,mortar_board,mount_fuji,mountain_bicyclist,mountain_cableway,mountain_railway,mouse,mouse2,movie_camera,moyai,muscle,mushroom,musical_keyboard,musical_note,musical_score,mute,nail_care,name_badge,neckbeard,necktie,negative_squared_cross_mark,neutral_face,new,new_moon,new_moon_with_face,newspaper,ng,nine,no_bell,no_bicycles,no_entry,no_entry_sign,no_good,no_mobile_phones,no_mouth,no_pedestrians,no_smoking,non-potable_water,nose,notebook,notebook_with_decorative_cover,notes,nut_and_bolt,o,o2,ocean,octocat,octopus,oden,office,ok,ok_hand,ok_woman,older_man,older_woman,on,oncoming_automobile,oncoming_bus,oncoming_police_car,oncoming_taxi,one,open_file_folder,open_hands,open_mouth,ophiuchus,orange_book,outbox_tray,ox,package,page_facing_up,page_with_curl,pager,palm_tree,panda_face,paperclip,parking,part_alternation_mark,partly_sunny,passport_control,paw_prints,peach,pear,pencil,pencil2,penguin,pensive,performing_arts,persevere,person_frowning,person_with_blond_hair,person_with_pouting_face,phone,pig,pig2,pig_nose,pill,pineapple,pisces,pizza,plus1,point_down,point_left,point_right,point_up,point_up_2,police_car,poodle,poop,post_office,postal_horn,postbox,potable_water,pouch,poultry_leg,pound,pouting_cat,pray,princess,punch,purple_heart,purse,pushpin,put_litter_in_its_place,question,rabbit,rabbit2,racehorse,radio,radio_button,rage,rage1,rage2,rage3,rage4,railway_car,rainbow,raised_hand,raised_hands,raising_hand,ram,ramen,rat,recycle,red_car,red_circle,registered,relaxed,relieved,repeat,repeat_one,restroom,revolving_hearts,rewind,ribbon,rice,rice_ball,rice_cracker,rice_scene,ring,rocket,roller_coaster,rooster,rose,rotating_light,round_pushpin,rowboat,ru,rugby_football,runner,running,running_shirt_with_sash,sa,sagittarius,sailboat,sake,sandal,santa,satellite,satisfied,saxophone,school,school_satchel,scissors,scorpius,scream,scream_cat,scroll,seat,secret,see_no_evil,seedling,seven,shaved_ice,sheep,shell,ship,shipit,shirt,shit,shoe,shower,signal_strength,six,six_pointed_star,ski,skull,sleeping,sleepy,slot_machine,small_blue_diamond,small_orange_diamond,small_red_triangle,small_red_triangle_down,smile,smile_cat,smiley,smiley_cat,smiling_imp,smirk,smirk_cat,smoking,snail,snake,snowboarder,snowflake,snowman,sob,soccer,soon,sos,sound,space_invader,spades,spaghetti,sparkle,sparkler,sparkles,sparkling_heart,speak_no_evil,speaker,speech_balloon,speedboat,squirrel,star,star2,stars,station,statue_of_liberty,steam_locomotive,stew,straight_ruler,strawberry,stuck_out_tongue,stuck_out_tongue_closed_eyes,stuck_out_tongue_winking_eye,sun_with_face,sunflower,sunglasses,sunny,sunrise,sunrise_over_mountains,surfer,sushi,suspect,suspension_railway,sweat,sweat_drops,sweat_smile,sweet_potato,swimmer,symbols,syringe,tada,tanabata_tree,tangerine,taurus,taxi,tea,telephone,telephone_receiver,telescope,tennis,tent,thought_balloon,three,thumbsdown,thumbsup,ticket,tiger,tiger2,tired_face,tm,toilet,tokyo_tower,tomato,tongue,top,tophat,tractor,traffic_light,train,train2,tram,triangular_flag_on_post,triangular_ruler,trident,triumph,trolleybus,trollface,trophy,tropical_drink,tropical_fish,truck,trumpet,tshirt,tulip,turtle,tv,twisted_rightwards_arrows,two,two_hearts,two_men_holding_hands,two_women_holding_hands,u5272,u5408,u55b6,u6307,u6708,u6709,u6e80,u7121,u7533,u7981,u7a7a,uk,umbrella,unamused,underage,unlock,up,us,v,vertical_traffic_light,vhs,vibration_mode,video_camera,video_game,violin,virgo,volcano,vs,walking,waning_crescent_moon,waning_gibbous_moon,warning,watch,water_buffalo,watermelon,wave,wavy_dash,waxing_crescent_moon,waxing_gibbous_moon,wc,weary,wedding,whale,whale2,wheelchair,white_check_mark,white_circle,white_flower,white_large_square,white_medium_small_square,white_medium_square,white_small_square,white_square_button,wind_chime,wine_glass,wink,wolf,woman,womans_clothes,womans_hat,womens,worried,wrench,x,yellow_heart,yen,yum,zap,zero,zzz";e.default=t.split(",")}),define("common/common-imgs-loaded",[],function(){"use strict";var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};!function(t,n){function i(n){return null==n?String(n):"object"===("undefined"==typeof n?"undefined":e(n))||"function"==typeof n?n instanceof t.NodeList&&"nodelist"||n instanceof t.HTMLCollection&&"htmlcollection"||Object.prototype.toString.call(n).match(/\s([a-z]+)/i)[1].toLowerCase():"undefined"==typeof n?"undefined":e(n)}function r(e){switch(i(e)){case"array":return e;case"undefined":return[];case"nodelist":case"htmlcollection":case"arguments":for(var t=[],n=0,r=e.length;n0&&a.is(":visible"))):(/^(input|select|textarea|button|object)$/.test(l)?(r=!t.disabled,r&&(i=e(t).closest("fieldset")[0],i&&(r=!i.disabled))):r="a"===l?t.href||n:n,r=r||e(t).is("[contenteditable]"),r&&e(t).is(":visible"))},t=function(){function t(t,n){this._container=t,this._target=n,this._container=e(this._container),this._target=e(this._target).addClass("pastable"),this._container.on("paste",function(e){return function(t){var n,i,r,a,o,s,l,c,d,u,m,p,g;if(t.currentTarget!==t.target)return t.preventDefault();if(e._paste_event_fired=!0,null!=(null!=(d=t.originalEvent)?d.clipboardData:void 0))if(n=t.originalEvent.clipboardData,n.items)for(u=n.items,a=0,s=u.length;ac&&(m=o+l*(u-c),m<=s&&(clearInterval(d),n()))},m)}function i(){u=0,m=o,h=!1,clearInterval(d),d=null}function r(){i(),n()}function a(){h=!0}Object.defineProperty(e,"__esModule",{value:!0});var o=6e3,s=3e5,l=6e3,c=10,d=null,u=0,m=o,p=null,g=null,h=!1;e.default={start:function(e,t){d&&i(),p=e,g=t,n()},reset:function(){r()},stop:function(){i()},pause:function(){a()}}}),define("common/common-scrollbar",[],function(){"use strict";!function(e,t){t(e.jQuery)}(window,function(e){function t(t){if(a.webkit&&!t)return{height:0,width:0};if(!a.data.outer){var n={border:"none","box-sizing":"content-box",height:"200px",margin:"0",padding:"0",width:"200px"};a.data.inner=e("
").css(e.extend({},n)),a.data.outer=e("
").css(e.extend({left:"-1000px",overflow:"scroll",position:"absolute",top:"-1000px"},n)).append(a.data.inner).appendTo("body")}return a.data.outer.scrollLeft(1e3).scrollTop(1e3),{height:Math.ceil(a.data.outer.offset().top-a.data.inner.offset().top||0),width:Math.ceil(a.data.outer.offset().left-a.data.inner.offset().left||0)}}function n(){var e=t(!0);return!(e.height||e.width)}function i(e){var t=e.originalEvent;return(!t.axis||t.axis!==t.HORIZONTAL_AXIS)&&!t.wheelDeltaX}var r=!1,a={data:{index:0,name:"scrollbar"},firefox:/firefox/i.test(navigator.userAgent),macosx:/mac/i.test(navigator.platform),msedge:/edge\/\d+/i.test(navigator.userAgent),msie:/(msie|trident)/i.test(navigator.userAgent),mobile:/android|webos|iphone|ipad|ipod|blackberry/i.test(navigator.userAgent),overlay:null,scroll:null,scrolls:[],webkit:/webkit/i.test(navigator.userAgent)&&!/edge\/\d+/i.test(navigator.userAgent)};a.scrolls.add=function(e){this.remove(e).push(e)},a.scrolls.remove=function(t){for(;e.inArray(t,this)>=0;)this.splice(e.inArray(t,this),1);return this};var o={autoScrollSize:!0,autoUpdate:!0,debug:!1,disableBodyScroll:!1,duration:200,ignoreMobile:!1,ignoreOverlay:!1,isRtl:!1,scrollStep:30,showArrows:!1,stepScrolling:!0,scrollx:null,scrolly:null,onDestroy:null,onFallback:null,onInit:null,onScroll:null,onUpdate:null},s=function(i){a.scroll||(a.overlay=n(),a.scroll=t(),c(),e(window).resize(function(){c(!0)})),this.container=i,this.namespace=".scrollbar_"+a.data.index++,this.options=e.extend({},o,window.jQueryScrollbarOptions||{}),this.scrollTo=null,this.scrollx={},this.scrolly={},i.data(a.data.name,this),a.scrolls.add(this)};s.prototype={destroy:function(){if(this.wrapper){this.container.removeData(a.data.name),a.scrolls.remove(this);var t=this.container.scrollLeft(),n=this.container.scrollTop();this.container.insertBefore(this.wrapper).css({height:"",margin:"","max-height":""}).removeClass("scroll-content scroll-scrollx_visible scroll-scrolly_visible").off(this.namespace).scrollLeft(t).scrollTop(n),this.scrollx.scroll.removeClass("scroll-scrollx_visible").find("div").addBack().off(this.namespace),this.scrolly.scroll.removeClass("scroll-scrolly_visible").find("div").addBack().off(this.namespace),this.wrapper.remove(),e(document).add("body").off(this.namespace),e.isFunction(this.options.onDestroy)&&this.options.onDestroy.apply(this,[this.container])}},init:function(t){var n=this,r=this.container,o=this.containerWrapper||r,s=this.namespace,l=e.extend(this.options,t||{}),c={x:this.scrollx,y:this.scrolly},d=this.wrapper,u={},m={scrollLeft:r.scrollLeft(),scrollTop:r.scrollTop()};if(a.mobile&&l.ignoreMobile||a.overlay&&l.ignoreOverlay||a.macosx&&!a.webkit)return e.isFunction(l.onFallback)&&l.onFallback.apply(this,[r]),!1;if(d)u={height:"auto","margin-bottom":a.scroll.height*-1+"px","max-height":""},u[l.isRtl?"margin-left":"margin-right"]=a.scroll.width*-1+"px",o.css(u);else{if(this.wrapper=d=e("
").addClass("scroll-wrapper").addClass(r.attr("class")).css("position","absolute"===r.css("position")?"absolute":"relative").insertBefore(r).append(r),l.isRtl&&d.addClass("scroll--rtl"),r.is("textarea")&&(this.containerWrapper=o=e("
").insertBefore(r).append(r),d.addClass("scroll-textarea")),u={height:"auto","margin-bottom":a.scroll.height*-1+"px","max-height":""},u[l.isRtl?"margin-left":"margin-right"]=a.scroll.width*-1+"px",o.addClass("scroll-content").css(u),r.on("scroll"+s,function(t){var i=r.scrollLeft(),o=r.scrollTop();if(l.isRtl)switch(!0){case a.firefox:i=Math.abs(i);case a.msedge||a.msie:i=r[0].scrollWidth-r[0].clientWidth-i}e.isFunction(l.onScroll)&&l.onScroll.call(n,{maxScroll:c.y.maxScrollOffset,scroll:o,size:c.y.size,visible:c.y.visible},{maxScroll:c.x.maxScrollOffset,scroll:i,size:c.x.size,visible:c.x.visible}),c.x.isVisible&&c.x.scroll.bar.css("left",i*c.x.kx+"px"),c.y.isVisible&&c.y.scroll.bar.css("top",o*c.y.kx+"px")}),d.on("scroll"+s,function(){d.scrollTop(0).scrollLeft(0)}),l.disableBodyScroll){var p=function(e){i(e)?c.y.isVisible&&c.y.mousewheel(e):c.x.isVisible&&c.x.mousewheel(e)};d.on("MozMousePixelScroll"+s,p),d.on("mousewheel"+s,p),a.mobile&&d.on("touchstart"+s,function(t){var n=t.originalEvent.touches&&t.originalEvent.touches[0]||t,i={pageX:n.pageX,pageY:n.pageY},a={left:r.scrollLeft(),top:r.scrollTop()};e(document).on("touchmove"+s,function(e){var t=e.originalEvent.targetTouches&&e.originalEvent.targetTouches[0]||e;r.scrollLeft(a.left+i.pageX-t.pageX),r.scrollTop(a.top+i.pageY-t.pageY),e.preventDefault()}),e(document).on("touchend"+s,function(){e(document).off(s)})})}e.isFunction(l.onInit)&&l.onInit.apply(this,[r])}e.each(c,function(t,o){var d=null,u=1,m="x"===t?"scrollLeft":"scrollTop",p=l.scrollStep,g=function(){var e=r[m]();r[m](e+p),1==u&&e+p>=h&&(e=r[m]()),u==-1&&e+p<=h&&(e=r[m]()),r[m]()==e&&d&&d()},h=0;o.scroll||(o.scroll=n._getScroll(l["scroll"+t]).addClass("scroll-"+t),l.showArrows&&o.scroll.addClass("scroll-element_arrows_visible"),o.mousewheel=function(e){if(!o.isVisible||"x"===t&&i(e))return!0;if("y"===t&&!i(e))return c.x.mousewheel(e),!0;var a=e.originalEvent.wheelDelta*-1||e.originalEvent.detail,s=o.size-o.visible-o.offset;return a||("x"===t&&e.originalEvent.deltaX?a=40*e.originalEvent.deltaX:"y"===t&&e.originalEvent.deltaY&&(a=40*e.originalEvent.deltaY)),(a>0&&h0)&&(h+=a,h<0&&(h=0),h>s&&(h=s),n.scrollTo=n.scrollTo||{},n.scrollTo[m]=h,setTimeout(function(){n.scrollTo&&(r.stop().animate(n.scrollTo,240,"linear",function(){h=r[m]()}),n.scrollTo=null)},1)),e.preventDefault(),!1},o.scroll.on("MozMousePixelScroll"+s,o.mousewheel).on("mousewheel"+s,o.mousewheel).on("mouseenter"+s,function(){h=r[m]()}),o.scroll.find(".scroll-arrow, .scroll-element_track").on("mousedown"+s,function(i){if(1!=i.which)return!0;u=1;var s={eventOffset:i["x"===t?"pageX":"pageY"],maxScrollValue:o.size-o.visible-o.offset,scrollbarOffset:o.scroll.bar.offset()["x"===t?"left":"top"],scrollbarSize:o.scroll.bar["x"===t?"outerWidth":"outerHeight"]()},c=0,b=0;if(e(this).hasClass("scroll-arrow")){if(u=e(this).hasClass("scroll-arrow_more")?1:-1,p=l.scrollStep*u,h=u>0?s.maxScrollValue:0,l.isRtl)switch(!0){case a.firefox:h=u>0?0:s.maxScrollValue*-1;break;case a.msie||a.msedge:}}else u=s.eventOffset>s.scrollbarOffset+s.scrollbarSize?1:s.eventOffset','
','
','
','
','
','
','
','
',"
","
",'
','
','
',"
",'
','
',"
","
","
"].join(""),simple:['
','
','
','
','
',"
","
"].join("") -};return n[t]&&(t=n[t]),t||(t=n.simple),t="string"==typeof t?e(t).appendTo(this.wrapper):e(t),e.extend(t,{bar:t.find(".scroll-bar"),size:t.find(".scroll-element_size"),track:t.find(".scroll-element_track")}),t},_handleMouseDown:function(t,n){var i=this.namespace;return e(document).on("blur"+i,function(){e(document).add("body").off(i),t&&t()}),e(document).on("dragstart"+i,function(e){return e.preventDefault(),!1}),e(document).on("mouseup"+i,function(){e(document).add("body").off(i),t&&t()}),e("body").on("selectstart"+i,function(e){return e.preventDefault(),!1}),n&&n.preventDefault(),!1},_updateScroll:function(t,n){var i=this.container,r=this.containerWrapper||i,o="scroll-scroll"+t+"_visible",s="x"===t?this.scrolly:this.scrollx,l=parseInt(this.container.css("x"===t?"left":"top"),10)||0,c=this.wrapper,d=n.size,u=n.visible+l;n.isVisible=d-u>1,n.isVisible?(n.scroll.addClass(o),s.scroll.addClass(o),r.addClass(o)):(n.scroll.removeClass(o),s.scroll.removeClass(o),r.removeClass(o)),"y"===t&&(i.is("textarea")||d10?(window.console&&console.log("Scroll updates exceed 10"),c=function(){}):(clearTimeout(e),e=setTimeout(c,300))}}()})}),define("common/common-tips",["exports"],function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={"/h1":{key:"ctrl+h",label:"/h1 [标题1] (ctrl+h)",value:"# "},"/h2":{label:"/h2 [标题2]",value:"## "},"/h3":{label:"/h3 [标题3]",value:"### "},"/h4":{label:"/h4 [标题4]",value:"#### "},"/h5":{label:"/h5 [标题5]",value:"##### "},"/h6":{key:"ctrl+shift+h",label:"/h6 [标题6] (ctrl+shift+h)",value:"###### "},"/b":{key:"ctrl+b",label:"/b [粗体] (ctrl+b)",value:"****",ch:2},"/i":{key:"ctrl+i",label:"/i [斜体] (ctrl+i)",value:"**",ch:1},"/s":{label:"/s [删除线]",value:"~~~~",ch:2},"/code":{key:"alt+ctrl+c",label:"/code [代码] (alt+ctrl+c)",value:"```\n\n```\n",line:2,ch2:5},"/quote":{key:"ctrl+'",label:"/quote [引用] (ctrl+')",value:"> "},"/list":{key:"ctrl+l",label:"/list [列表] (ctrl+l)",value:"* "},"/href":{key:"ctrl+k",label:"/href [链接] (ctrl+k)",value:"[](http://)",ch:1},"/img":{key:"alt+ctrl+i",label:"/img [图片] (ctrl+alt+i)",value:"![](http://)",ch:1},"/table":{label:"/table [表格]",value:"| 列1 | 列2 | 列3 |\n| ------ | ------ | ------ |\n| 文本 | 文本 | 文本 |\n"},"/hr":{label:"/hr [分隔线]",value:"\n-----\n"},"/task":{label:"/task [任务列表]",value:"- [ ] 未完成任务\n- [x] 已完成任务",line:1,ch:11,ch2:12},"/details":{label:"/details [折叠详情]",value:"
\n标题详情内容\n
",line:1,ch:11,ch2:25},"/upload":{label:"/upload [上传文件] (ctrl+u)",value:""},"/shortcuts":{label:"/shortcuts [热键] (ctrl+/)",value:""}}}),define("common/common-utils",["exports","wurl","common/common-diff"],function(e,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.CommonUtils=void 0;var r=n(t),a=e.CommonUtils=function(){function e(){i(this,e),this.regExpOS={ios:/(iPad|iPhone|iPod)/g,mobileChrome:/(CriOS)/g,mobile:/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/g,cellphone:/iP(hone|od)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/g}}return e.prototype.getBaseUrl=function(){return"function"==typeof r.default?80==(0,r.default)("port")||443==(0,r.default)("port")?(0,r.default)("protocol")+"://"+(0,r.default)("hostname"):(0,r.default)("protocol")+"://"+(0,r.default)("hostname")+":"+(0,r.default)("port"):""},e.prototype.getUrl=function(){return this.getBaseUrl()+(0,r.default)("path")+"#"+this.getHash()},e.prototype.getHash=function(){var e=(0,r.default)("hash");return e?e.split("?")[0]:""},e.prototype.getBasePath=function(){return this.getBaseUrl()+(0,r.default)("path")},e.prototype.getResourceBase=function(){var e=this.getBasePath();return _.endsWith(e,"/index.html")&&(e=_.replace(e,"/index.html","")),e},e.prototype.redirect2Login=function(e){var t=this.urlQuery("redirect");t?console.log("url has contains ?redirect"):(e=e?e:(0,r.default)(),window.location=this.getBaseUrl()+(0,r.default)("path")+("#/login?redirect="+encodeURIComponent(e)))},e.prototype.urlQuery=function(e,t){if(t){var n=(0,r.default)("?"+e,t);return n||(n=(0,r.default)("?"+e,(0,r.default)("hash",t))),n}return(0,r.default)("?"+e)||(0,r.default)("?"+e,(0,r.default)("hash"))},e.prototype.removeUrlQuery=function(e,t){var n=t?t:window.location.href,i=new RegExp("(&|\\?)?"+e+"=?[^&#]*(.)?","g").exec(n);if(i){if("&"==i[1])return n.replace(new RegExp("&"+e+"=?[^&#]+","g"),"");if("?"==i[1])return"&"!=i[2]?n.replace(new RegExp("\\?"+e+"=?[^&#]*","g"),""):n.replace(new RegExp(""+e+"=?[^&#]*&","g"),"")}return n},e.prototype.isLoginPage=function(){var e=(0,r.default)("hash");return _.startsWith(e,"/login")},e.prototype.errorAutoTry=function(e,t){var n=this;if(!this.isRunning&&!this.isLoginPage()){var i=t?t:10,r=null,a=toastr.error("网络连接错误,"+i+"秒后自动重试!",null,{closeButton:!1,timeOut:"0",preventDuplicates:!1,onclick:function(){clearInterval(n.timer),e&&e()}});this.isRunning=!0,r=setInterval(function(){return 0===i?(clearInterval(r),n.isRunning=!1,toastr.remove(),void(e&&e())):(a&&a.find(".toast-message").text("网络连接错误,"+i+"秒后自动重试!"),void i--)},1e3)}},e.prototype.isElementInViewport=function(e){"function"==typeof jQuery&&e instanceof jQuery&&(e=e[0]);var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)},e.prototype.getChatName=function(e){return _.startsWith(e,"@")?e.substr(1):e},e.prototype.preParse=function(e){var t=e;return $.each(this.parseUsers(e),function(e,n){t=t.replace(new RegExp("{~"+n.username+"}","g"),'**`@'+n.name+"`**")}),t},e.prototype.parseUsers=function(e){for(var t=[],n=/\{~([^\}]*)\}/g,i=n.exec(e);i;){var r=_.find([nsCtx.memberAll].concat(window.tmsUsers?tmsUsers:[]),{username:i[1]}),a=!_.some(t,{username:i[1]});r&&a&&t.push(r),i=n.exec(e)}return t},e.prototype.getUser=function(e){return _.find(tmsUsers,{username:e})},e.prototype.parseUsernames=function(e,t){var n=this.parseUsers(e),i=_.some(n,{username:"all"});return i?_.without(_.map(t,"username"),"all"):_.map(n,"username")},e.prototype.md2html=function(e){return emojify&&(e=emojify.replace(e)),$('
').html(''+marked(this.preParse(e))).wrap("
").parent().html()},e.prototype.diffS=function(e,t,n){var i=["diffChars","diffWords","diffWordsWithSpace","diffLines"];i.includes(n)||(n="diffWords");for(var r='style="background-color: #e6cf56; text-decoration: line-through;"',a='style="background-color: #98e287; text-decoration: none;"',o=JsDiff[n](e,t),s=[],l=0;l"+o[l].value+"":o[l].added?""+o[l].value+"":""+o[l].value,s.push(d)}return"
"+s.join("")+"
"},e.prototype.catalog=function(e){var t=$(":header",e);if(t&&0==t.size())return!1;var n=null,i={pre:null,arr:[]},r=i;return t.each(function(e,t){var i=t.nodeName;if(n)if(n
');return this.prodDir(n,e,t),n},e.prototype.dir=function(e,t){var n=this.catalog(e);return n?this.generateDir(n,t):""},e.prototype.prodDir=function(e,t,n){var i=this;$.each(t.arr,function(t,r){if(r.hasOwnProperty("arr")){var a=$('
');e.append(a),i.prodDir(a,r,n)}else{var o=n?_.uniqueId(n):_.uniqueId("tms-wiki-dir-item-"),s=$('').text($(r).attr("id",o).text()).attr("data-id",o);e.append(s)}})},e.prototype.isElementInViewport=function(e){"function"==typeof jQuery&&e instanceof jQuery&&(e=e[0]);var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)},e.prototype.getCursortPosition=function(e){var t=0;if(document.selection){e.focus();var n=document.selection.createRange();n.moveStart("character",-e.value.length),t=n.text.length}else(e.selectionStart||"0"==e.selectionStart)&&(t=e.selectionStart);return t},e.prototype.setCaretPosition=function(e,t){if(e.setSelectionRange)e.focus(),e.setSelectionRange(t,t);else if(e.createTextRange){var n=e.createTextRange();n.collapse(!0),n.moveEnd("character",t),n.moveStart("character",t),n.select()}},e.prototype.isAbsUrl=function(e){return!!_.startsWith(e,"http://")||(!!_.startsWith(e,"https://")||!!_.startsWith(e,"//"))},e.prototype.escape=function(e,t){return e.replace(t?/&/g:/&(?!#?\w+;)/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")},e.prototype.unescape=function(e){return e.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/g,function(e,t){return t=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})},e.prototype.openNewWin=function(e){e&&!function(){var t=$('').appendTo("body").end();$('').appendTo(t).end().click(),_.delay(function(){t.remove()},200)}()},e.prototype.isAdminUser=function(e){return!(!e||!e.authorities)&&_.some(e.authorities,function(e){return"ROLE_ADMIN"===e.id.authority})},e.prototype.isSuperUser=function(e){return!(!e||!e.authorities)&&_.some(e.authorities,function(e){return"ROLE_SUPER"===e.id.authority})},e.prototype.isSBCcase=function(e){return/[^\x00-\xff]/.test(e)},e.prototype.isHanzi=function(e){return/[\u4e00-\u9fa5]/gi.test(e)},e.prototype.getByteLen=function(e){for(var t=0,n=0;nt)return e.substr(0,i)+"...";return e},e.prototype.isMail=function(e){var t=/^([_a-z0-9-]+)(\.[_a-z0-9-]+)*@([a-z0-9-]+)(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/i;return t.test(e)},e.prototype.isIE=function e(){var t=!window.ActiveXObject&&"ActiveXObject"in window,e="ActiveXObject"in window;return t||e},e.prototype.isIE11=function(){return!window.ActiveXObject&&"ActiveXObject"in window},e.prototype.isIOS=function e(){var t=navigator.userAgent,e=t.match(this.regExpOS.ios),n=t.match(this.regExpOS.mobileChrome);return!(!e||n)},e.prototype.isCellphone=function(){return!!navigator.userAgent.match(this.regExpOS.cellphone)},e.prototype.isMobile=function(){return!!navigator.userAgent.match(this.regExpOS.mobile)},e.prototype.isChrome=function(){return/chrome\/([\d.]+)/.test(navigator.userAgent.toLowerCase())},e.prototype.isSafari=function(){return/version\/([\d.]+)/.test(navigator.userAgent.toLowerCase())},e.prototype.isFirefox=function(){return/firefox\/([\d.]+)/.test(navigator.userAgent.toLowerCase())},e.prototype.isOpera=function(){return/opera.([\d.]+)/.test(navigator.userAgent.toLowerCase())},e.prototype.diffHtml=function(e){var t=["html","head","meta","title","base","link","script","body","div","span"],n="";return e&&(n=e,_.each(t,function(e){n=n.replace(new RegExp("<("+e+")","gi"),"<$1")})),n},e.prototype.encodeHtml=function(e){var t="";return 0==e.length?"":(t=e.replace(/&/g,">"),t=t.replace(//g,">"),t=t.replace(/ /g," "),t=t.replace(/\'/g,"'"),t=t.replace(/\"/g,"""),t=t.replace(/\n/g,"
"))},e.prototype.decodeHtml=function(e){var t="";return 0==e.length?"":(t=e.replace(/>/g,"&"),t=t.replace(/</g,"<"),t=t.replace(/>/g,">"),t=t.replace(/ /g," "),t=t.replace(/'/g,"'"),t=t.replace(/"/g,'"'),t=t.replace(/
/g,"\n"))},e}();e.default=new a}),define("init/config",["exports","aurelia-templating-resources","aurelia-event-aggregator","aurelia-fetch-client","toastr","wurl","common/common-utils","marked","highlight","autosize","nprogress","push","color-hash","isomorphic-fetch","common/common-plugin","common/common-constant","common/common-ctx","common/common-imgs-loaded","modaal"],function(e,t,n,i,r,a,o,s,l,c,d,u,m){"use strict";function p(e){return e&&e.__esModule?e:{default:e}}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.Config=void 0;var h=p(r),b=p(a),f=p(o),v=p(s),y=p(l),E=p(c),w=p(d),x=p(u),C=p(m),S=e.Config=function(){function e(){g(this,e)}return e.prototype.initHttp=function(){return window.json=function(e){return console.log(JSON.stringify(e)),(0,i.json)(e)},window.http=this.aurelia.container.root.get(i.HttpClient),http.configure(function(e){e.withDefaults({credentials:"same-origin",headers:{Accept:"application/json","Content-Type":"application/json","X-Requested-With":"fetch"}}).withInterceptor({request:function(e){return w.default&&w.default.start(),e},requestError:function(e){console.log(e)},response:function(e){return w.default&&w.default.done(),e.ok||(e.json().then(function(e){h.default.error(e.message)}),401!=e.status)?e:(h.default.error("用户未登录!"),void f.default.redirect2Login())},responseError:function(e){h.default.error(e.message,"网络请求错误!"),console.log(e)}})}),this},e.prototype.initToastr=function(){return h.default.options.positionClass="toast-bottom-center",h.default.options.preventDuplicates=!0,this},e.prototype.initMarked=function(){var e=new v.default.Renderer;return e.listitem=function(e){return/^\s*\[[x ]\]\s*/.test(e)?(e=e.replace(/^\s*\[ \]\s*/,' ').replace(/^\s*\[x\]\s*/,' '),'
  • '+e+"
  • "):"
  • "+e+"
  • "},e.link=function(e,t,n){if(this.options.sanitize){try{var i=decodeURIComponent(unescape(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(0===i.indexOf("javascript:")||0===i.indexOf("vbscript:")||0===i.indexOf("data:"))return""}var r=void 0,a=/\/chat\/.+\?id=.+/g.test((0,b.default)("hash",e)),o=/\/blog\/.+\?cid=.+/g.test((0,b.default)("hash",e));return r=a||o||f.default.isAbsUrl(e)&&(0,b.default)("hostname",e)!=(0,b.default)("hostname")?'"},e.codespan=function(e){return''+e+""},e.code=function(e,t,n){var i=e;if(this.options.highlight){var r=this.options.highlight(e,t);null!=r&&r!==e&&(n=!0,e=r)}return t?'
    '+(n?e:f.default.escape(e,!0))+"\n
    \n":'
    '+(n?e:f.default.escape(e,!0))+"\n
    "},v.default.setOptions({renderer:e,breaks:!0,highlight:function(e){return y.default.highlightAuto(e).value}}),this},e.prototype.initAjax=function(){$.ajaxSetup({cache:!1});var e=["/chat/channel/latest","/chat/direct/latest","/chat/channel/poll"];return $(document).ajaxSend(function(t,n,i){var r=_.every(e,function(e){return i.url.lastIndexOf(e)==-1});r&&w.default&&w.default.start()}),$(document).on("ajaxStop",function(){w.default&&w.default.done()}),$(document).ajaxError(function(e,t,n){t&&401==t.status&&f.default.redirect2Login()}),this},e.prototype.initGlobalVar=function(){return window.toastr=h.default,window.wurl=b.default,window.utils=f.default,window.marked=v.default,window.autosize=E.default,window.push=x.default,window.bs=this.aurelia.container.root.get(t.BindingSignaler),window.ea=this.aurelia.container.root.get(n.EventAggregator),window.colorHash=new C.default,this},e.prototype.initAnimateCss=function(){return $.fn.extend({animateCss:function(e){var t="webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend";this.addClass("animated "+e).one(t,function(){$(this).removeClass("animated "+e)})}}),this},e.prototype.initEmoji=function(){return emojify&&emojify.setConfig({img_dir:f.default.getResourceBase()+"/img/emoji"}),this},e.prototype.initModaal=function(){return _.extend($.fn.modaal.options,{close_text:"关闭",close_aria_label:"按[esc]关闭",confirm_button_text:"确认",confirm_cancel_button_text:"取消",confirm_title:"操作确认",accessible_title:"对话框窗口",confirm_content:"

    默认确认对话框内容.

    "}),this},e.prototype.context=function(e){return this.aurelia=e,this},e}();e.default=new S}),define("init/index",["exports","./config","jquery","jquery.scrollto","timeago","lodash","hotkeys"],function(e,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){r.default.context(e).initGlobalVar().initAjax().initToastr().initMarked().initAnimateCss().initEmoji().initModaal()}Object.defineProperty(e,"__esModule",{value:!0}),e.configure=i;var r=n(t)}),define("resources/index",["exports"],function(e){"use strict";function t(e){e.globalResources(["resources/value-converters/vc-common","resources/binding-behaviors/bb-key","resources/attributes/attr-task","resources/attributes/attr-swipebox","resources/attributes/attr-pastable","resources/attributes/attr-autosize","resources/attributes/attr-dropzone","resources/attributes/attr-attr","resources/attributes/attr-c2c","resources/attributes/attr-dimmer","resources/attributes/attr-ui-dropdown","resources/attributes/attr-ui-dropdown-action","resources/attributes/attr-ui-dropdown-hover","resources/attributes/attr-ui-tab","resources/attributes/attr-ui-popup","resources/attributes/attr-ui-checkbox","resources/attributes/attr-tablesort","resources/attributes/attr-textcomplete","resources/attributes/attr-scrollbar","resources/attributes/attr-modaal","resources/elements/em-modal","resources/elements/em-dropdown","resources/elements/em-checkbox","resources/elements/em-confirm-modal","resources/elements/em-hotkeys-modal","resources/elements/em-chat-input","resources/elements/em-chat-top-menu","resources/elements/em-chat-sidebar-left","resources/elements/em-chat-content-item","resources/elements/em-chat-sidebar-right","resources/elements/em-chat-channel-create","resources/elements/em-chat-channel-join","resources/elements/em-chat-channel-edit","resources/elements/em-chat-channel-members-mgr","resources/elements/em-chat-channel-members-show","resources/elements/em-chat-channel-link-mgr","resources/elements/em-chat-system-link-mgr","resources/elements/em-chat-msg-popup","resources/elements/em-chat-member-popup","resources/elements/em-chat-attach","resources/elements/em-chat-schedule","resources/elements/em-chat-schedule-edit","resources/elements/em-chat-schedule-remind","resources/elements/em-chat-share","resources/elements/em-blog-write","resources/elements/em-blog-left-sidebar","resources/elements/em-blog-right-sidebar","resources/elements/em-blog-content","resources/elements/em-blog-top-menu","resources/elements/em-blog-share","resources/elements/em-blog-comment","resources/elements/em-blog-save","resources/elements/em-blog-space-create","resources/elements/em-blog-space-edit","resources/elements/em-blog-space-update","resources/elements/em-blog-history","resources/elements/em-blog-history-view","resources/elements/em-blog-history-diff","resources/elements/em-blog-comment-popup","resources/elements/em-blog-space-auth","resources/elements/em-user-avatar","resources/elements/em-user-edit","resources/elements/em-blog-comment-share"])}Object.defineProperty(e,"__esModule",{value:!0}),e.configure=t}),define("test/test-lifecycle",["exports","aurelia-framework","aurelia-event-aggregator"],function(e,t,n){"use strict";function i(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.TestLifeCycle=void 0;var o,s,l,c;e.TestLifeCycle=(c=l=function(){function e(t){r(this,e),i(this,"prop",s,this),this.eventAggregator=t,console.log("constructor")}return e.prototype.created=function(e){console.log("created")},e.prototype.bind=function(e){console.log("bind")},e.prototype.unbind=function(){console.log("unbind")},e.prototype.attached=function(){console.log("attached")},e.prototype.detached=function(){console.log("detached")},e.prototype.canActivate=function(e,t,n){console.log("canActivate")},e.prototype.activate=function(e,t,n){console.log("activate")},e.prototype.canDeactivate=function(){console.log("canDeactivate")},e.prototype.deactivate=function(){console.log("deactivate")},e}(),l.inject=[n.EventAggregator],o=c,s=a(o.prototype,"prop",[t.bindable],{enumerable:!0,initializer:function(){return null}}),o)}),define("user/user-login",["exports"],function(e){"use strict";function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});e.UserLogin=function(){function e(){t(this,e),this.username="",this.password=""}return e.prototype.attached=function(){$(this.rememberMeRef).checkbox()},e.prototype.kdHandler=function(e){return 13===e.keyCode&&this.loginHandler(),!0},e.prototype.loginHandler=function(){var e=this,t=$(this.rememberMeRef).checkbox("is checked")?"on":"";return $.post("/admin/signin",{username:this.username,password:this.password,"remember-me":t}).done(function(){localStorage&&localStorage.setItem(nsCons.KEY_LOGIN_USERNAME,e.username);var t=utils.urlQuery("redirect");if(t)window.location=decodeURIComponent(t);else{var n=null;localStorage&&(n=localStorage.getItem(nsCons.KEY_REMEMBER_LAST_CHAT_TO)),n?window.location=wurl("path")+("#/chat/"+n):window.location=wurl("path")+("#/chat/@"+e.username)}}).fail(function(e,t,n){401==e.status?toastr.error("用户名密码不正确!"):0!=e.status&&toastr.error("网络连接错误!")}),!0},e}()}),define("user/user-pwd-reset",["exports"],function(e){"use strict";function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});e.UserPwdReset=function(){function e(){t(this,e),this.mail="",this.pwd="",this.isReq=!1,this.token=utils.urlQuery("id")}return e.prototype.resetPwdHandler=function(){var e=this;return $(this.fm).form("is valid")?(this.isReq=!0,void http.fetch("/free/user/pwd/reset",{method:"post",body:json({mail:this.mail,baseUrl:utils.getBaseUrl(),path:wurl("path")})}).then(function(t){t.ok&&t.json().then(function(t){t.success?(toastr.success("重置密码邮件链接发送成功!"),_.delay(function(){window.location="/admin/login"},2e3)):(toastr.error(t.data,"重置密码邮件链接发送失败!"),e.isReq=!1)})})):void toastr.error("邮件地址输入不合法!")},e.prototype.newPwdHandler=function(){var e=this;return $(this.fm2).form("is valid")?(this.isReq=!0,void http.fetch("/free/user/pwd/new",{method:"post",body:json({token:this.token,pwd:this.pwd})}).then(function(t){t.ok&&t.json().then(function(t){t.success?(toastr.success("重置密码成功!"),_.delay(function(){window.location="/admin/login"},2e3)):(toastr.error(t.data,"重置密码失败!"),e.isReq=!1)})})):void toastr.error("新密码输入不合法!")},e.prototype.attached=function(){$(this.fm).form({on:"blur",inline:!0,fields:{mail:["empty","email"]}}),$(this.fm2).form({on:"blur",inline:!0,fields:{mail:["empty","minLength[8]"]}})},e}()}),define("user/user-register",["exports"],function(e){"use strict";function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});e.ViewModel=function(){function e(){t(this,e),this.header="账户激活页面"}return e.prototype.activate=function(e,t,n){var i=this;e.id&&(this.token=e.id,this.isReq=!0,this.header="账户激活中,请稍后...!",http.fetch("/free/user/register/activate",{method:"post",body:json({ -token:this.token})}).then(function(e){e.ok&&(e.json().then(function(e){e.success?i.header="账户激活成功,请返回登录页面登录!":(i.header="账户激活失败!",toastr.error(e.data,"账户激活失败!"))}),i.isReq=!1)}))},e.prototype.attached=function(){$(this.fm).form({on:"blur",inline:!0,fields:{username:{identifier:"username",rules:[{type:"empty"},{type:"minLength[3]"},{type:"regExp",value:/^[a-z]+[a-z0-9\.\-_]*[a-z0-9]+$/,prompt:"小写字母数字.-_组合,字母开头,字母数字结尾"}]},pwd:{identifier:"pwd",rules:[{type:"empty"},{type:"minLength[8]"}]},name:{identifier:"name",rules:[{type:"empty"},{type:"maxLength[20]"}]},mail:{identifier:"mail",rules:[{type:"empty"},{type:"email"}]}}})},e.prototype.okHandler=function(){var e=this;return $(this.fm).form("is valid")?(this.isReq=!0,void http.fetch("/free/user/register",{method:"post",body:json({username:this.username,pwd:this.pwd,name:this.name,mail:this.mail,baseUrl:utils.getBaseUrl(),path:wurl("path")})}).then(function(t){t.ok&&t.json().then(function(t){t.success?(toastr.success("注册成功,请通过接收到的激活邮件激活账户!"),_.delay(function(){window.location="/admin/login"},2e3)):(toastr.error(t.data,"注册失败!"),e.isReq=!1)})})):void toastr.error("账户注册信息输入不合法!")},e}()}),define("resources/attributes/attr-attr",["exports","aurelia-framework","aurelia-dependency-injection"],function(e,t,n){"use strict";function i(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.AttrAttr=void 0;var o,s,l,c,d,u;e.AttrAttr=(o=(0,t.customAttribute)("attr"),s=(0,n.inject)(Element),o(l=s((c=function(){function e(t){r(this,e),i(this,"name",d,this),i(this,"value",u,this),this.element=t}return e.prototype.nameChanged=function(e){},e.prototype.valueChanged=function(e){this.value=e,e?$(this.element).attr(this.name,e):$(this.element).removeAttr(this.name)},e.prototype.bind=function(e){this.valueChanged(this.value)},e.prototype.unbind=function(){},e}(),d=a(c.prototype,"name",[t.bindable],{enumerable:!0,initializer:null}),u=a(c.prototype,"value",[t.bindable],{enumerable:!0,initializer:null}),l=c))||l)||l)}),define("resources/attributes/attr-autosize",["exports","aurelia-framework","aurelia-templating"],function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.AttrAutosize=void 0;var r,a,o;e.AttrAutosize=(r=(0,n.customAttribute)("autosize"),a=(0,t.inject)(Element),r(o=a(o=function(){function e(t){i(this,e),this.element=t}return e.prototype.valueChanged=function(e,t){autosize(this.element)},e.prototype.bind=function(e){this.valueChanged(this.value)},e.prototype.unbind=function(){autosize.destroy(this.elements)},e}())||o)||o)}),define("resources/attributes/attr-c2c",["exports","aurelia-framework","clipboard"],function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.AttrC2cCustomAttribute=void 0;var a,o,s,l=i(n);e.AttrC2cCustomAttribute=(a=(0,t.customAttribute)("c2c"),o=(0,t.inject)(Element),a(s=o(s=function(){function e(t){r(this,e),this.element=t,this._init()}return e.prototype._init=function(){var e=this;$(this.element).append(''),this.clipboard=new l.default($(this.element).find("i.copy.icon")[0],{text:function(t){return e.value?e.value:$(e.element).text()}});var t=$(this.element).find("[data-tooltip]").hover(function(){},function(){$(this).attr("data-tooltip","复制到剪贴板!")});this.clipboard.on("success",function(e){t.attr("data-tooltip","复制成功!")}).on("error",function(e){t.attr("data-tooltip","复制失败!")}),$(this.element).hover(function(){(e.value||$(e.element).text())&&t.show()},function(){t.hide()})},e.prototype.unbind=function(){this.clipboard&&this.clipboard.destroy()},e}())||s)||s)}),define("resources/attributes/attr-dimmer",["exports","aurelia-dependency-injection","aurelia-templating"],function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.AttrDimmer=void 0;var r,a,o;e.AttrDimmer=(r=(0,n.customAttribute)("dimmer"),a=(0,t.inject)(Element),r(o=a(o=function(){function e(t){i(this,e),this.element=t,this.$dimmer=$('
    ')}return e.prototype.valueChanged=function(e){this.value?$(this.element).prepend(this.$dimmer):this.$dimmer.remove()},e.prototype.bind=function(e){this.valueChanged(this.value)},e}())||o)||o)}),define("resources/attributes/attr-dropzone",["exports","aurelia-framework","aurelia-templating","aurelia-event-aggregator"],function(e,t,n,i){"use strict";function r(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.AttrDropzone=void 0;var s,l,c,d,u,m,p;e.AttrDropzone=(s=(0,n.customAttribute)("dropzone"),l=(0,t.inject)(Element,i.EventAggregator),s(c=l((d=function(){function e(t,n){var i=this;a(this,e),r(this,"clickable",u,this),r(this,"target",m,this),r(this,"type",p,this),this.element=t,this.eventAggregator=n,this.subscribe=this.eventAggregator.subscribe(nsCons.EVENT_CHAT_MSG_EDIT_UPLOAD,function(e){e.target===i.target&&$(i.element).click()})}return e.prototype.valueChanged=function(e,t){var n=this.target?this.target:this.element,i=this.type?this.type:nsCtx.isAt?"User":"Channel";$(this.element).parent().addClass("tms-dropzone-preview-hidden"),$(this.element).children().andSelf().dropzone({url:"/admin/file/upload",paramName:"file",clickable:!!this.clickable,dictDefaultMessage:"",maxFilesize:10,addRemoveLinks:!0,dictCancelUpload:"取消上传",dictCancelUploadConfirmation:"确定要取消上传吗?",dictFileTooBig:"文件过大({{filesize}}M),最大限制:{{maxFilesize}}M",init:function(){this.on("sending",function(e,t,n){n.append("toType",i),"Blog"!==i&&n.append("toId",nsCtx.chatTo)}),this.on("success",function(e,t){t.success?($.each(t.data,function(e,t){"Image"==t.type?$(n).insertAtCaret("![{name}]({baseURL}{path}{uuidName}) ".replace(/\{name\}/g,t.name).replace(/\{baseURL\}/g,utils.getBaseUrl()+"/").replace(/\{path\}/g,t.path).replace(/\{uuidName\}/g,t.uuidName)):$(n).insertAtCaret("[{name}]({baseURL}{path}{uuidName}) ".replace(/\{name\}/g,t.name).replace(/\{baseURL\}/g,utils.getBaseUrl()+"/").replace(/\{path\}/g,"admin/file/download/").replace(/\{uuidName\}/g,t.id))}),toastr.success("上传成功!")):toastr.error(t.data,"上传失败!")}),this.on("error",function(e,t,n){toastr.error(t,"上传失败!")}),this.on("complete",function(e){this.removeFile(e)})}})},e.prototype.bind=function(e){this.valueChanged(this.value)},e}(),u=o(d.prototype,"clickable",[t.bindable],{enumerable:!0,initializer:null}),m=o(d.prototype,"target",[t.bindable],{enumerable:!0,initializer:null}),p=o(d.prototype,"type",[t.bindable],{enumerable:!0,initializer:null}),c=d))||c)||c)}),define("resources/attributes/attr-modaal",["exports","aurelia-framework","aurelia-templating"],function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.AttrModaalCustomAttribute=void 0;var r,a,o;e.AttrModaalCustomAttribute=(r=(0,n.customAttribute)("modaal"),a=(0,t.inject)(Element),r(o=a(o=function(){function e(t){i(this,e),this.element=t}return e.prototype.valueChanged=function(e,t){var n=this;_.defer(function(){$(n.element).modaal({fullscreen:!0,overlay_close:!1,before_open:function(){ea.publish(nsCons.EVENT_MODAAL_BEFORE_OPEN,{id:e})},after_open:function(){ea.publish(nsCons.EVENT_MODAAL_AFTER_OPEN,{id:e})},before_close:function(){ea.publish(nsCons.EVENT_MODAAL_BEFORE_CLOSE,{id:e})},after_close:function(){ea.publish(nsCons.EVENT_MODAAL_AFTER_CLOSE,{id:e})}})})},e}())||o)||o)}),define("resources/attributes/attr-pastable",["exports","aurelia-framework","aurelia-templating","common/common-plugin","common/common-paste"],function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.AttrPastable=void 0;var r,a,o;e.AttrPastable=(r=(0,n.customAttribute)("pastable"),a=(0,t.inject)(Element),r(o=a(o=function(){function e(t){i(this,e),this.element=t}return e.prototype.valueChanged=function(e,t){var n=this;$(this.element).pastableTextarea().on("pasteImage",function(e,t){$.post("/admin/file/base64",{dataURL:t.dataURL,type:t.blob.type,toType:nsCtx.isAt?"User":"Channel",toId:nsCtx.chatTo},function(e,t,i){e.success&&$(n.element).insertAtCaret("![{name}]({baseURL}{path}{uuidName})".replace(/\{name\}/g,e.data.name).replace(/\{baseURL\}/g,utils.getBaseUrl()+"/").replace(/\{path\}/g,e.data.path).replace(/\{uuidName\}/g,e.data.uuidName))})}).on("pasteImageError",function(e,t){toastr.error(t.message,"剪贴板粘贴图片错误!")})},e.prototype.bind=function(e){this.valueChanged(this.value)},e}())||o)||o)}),define("resources/attributes/attr-scrollbar",["exports","aurelia-framework","aurelia-templating","common/common-scrollbar"],function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.AttrScrollbarCustomAttribute=void 0;var r,a,o;e.AttrScrollbarCustomAttribute=(r=(0,n.customAttribute)("scrollbar"),a=(0,t.inject)(Element),r(o=a(o=function(){function e(t){i(this,e),this.element=t}return e.prototype.valueChanged=function(e,t){var n=this;this.cls=e?e:$(window).width()<768?"scrollbar-macosx":"scrollbar-outer",jQuery(this.element).addClass(this.cls).scrollbar({onScroll:function(e,t){e.scroll==e.maxScroll&&ea.publish(nsCons.EVENT_SCROLLBAR_SCROLL_TO_BOTTOM,{element:n.element,x:t,y:e})}})},e.prototype.unbind=function(){try{jQuery(this.element).removeClass(this.cls).scrollbar("destroy")}catch(e){}},e}())||o)||o)}),define("resources/attributes/attr-swipebox",["exports","aurelia-framework","aurelia-templating","swipebox"],function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.AttrSwipebox=void 0;var r,a,o;e.AttrSwipebox=(r=(0,n.customAttribute)("swipebox"),a=(0,t.inject)(Element),r(o=a(o=function(){function e(t){i(this,e),this.element=t}return e.prototype.valueChanged=function(e,t){var n=this;$(this.element).on("click","img",function(t){t.preventDefault();var i=($(t.target),[]),r=0;$(n.element).find("img").each(function(e,n){i.push({href:$(n).attr("src"),title:$(n).attr("alt")}),t.target==n&&(r=e)}),$.swipebox(i,{useCSS:!0,useSVG:!0,initialIndexOnArray:r,hideCloseButtonOnMobile:!1,removeBarsOnMobile:!0,hideBarsDelay:3e3,videoMaxWidth:1140,beforeOpen:function(){},afterOpen:null,afterClose:function(){},loopAtEnd:!!e})})},e.prototype.bind=function(e){this.valueChanged(this.value)},e}())||o)||o)}),define("resources/attributes/attr-tablesort",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.AttrTablesortCustomAttribute=void 0;var i,r,a;e.AttrTablesortCustomAttribute=(i=(0,t.customAttribute)("tablesort"),r=(0,t.inject)(Element),i(a=r(a=function(){function e(t){n(this,e),this.element=t}return e.prototype.valueChanged=function(e,t){},e.prototype._init=function(){$(this.element).is("table")?$(this.element).addClass("sortable").tablesort():console.warn("tablesort element is not table tag!")},e.prototype.bind=function(){this._init()},e}())||a)||a)}),define("resources/attributes/attr-task",["exports","aurelia-dependency-injection","aurelia-templating"],function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.AttrTask=void 0;var r,a,o;e.AttrTask=(r=(0,n.customAttribute)("task"),a=(0,t.inject)(Element),r(o=a(o=function(){function e(t){i(this,e),this.task=null,this.bindingCtx=null,this.element=t}return e.prototype.valueChanged=function(e){this.task=e,_.isFunction(this.task)&&_.bind(this.task,this.bindingCtx,this.element)()},e.prototype.bind=function(e){this.bindingCtx=e,this.valueChanged(this.value)},e.prototype.unbind=function(){this.element=null,this.task=null,this.bindingCtx=null},e}())||o)||o)}),define("resources/attributes/attr-textcomplete",["exports","aurelia-framework","aurelia-templating","common/common-tips","common/common-emoji"],function(e,t,n,i,r){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.AttrTextcompleteCustomAttribute=void 0;var s,l,c,d=a(i),u=a(r);e.AttrTextcompleteCustomAttribute=(s=(0,n.customAttribute)("textcomplete"),l=(0,t.inject)(Element),s(c=l(c=function(){function e(t){o(this,e),this.element=t,this.initHotkeys()}return e.prototype.tipsActionHandler=function(e){if("/upload"==e)$(this.element).next(".tms-edit-actions").find("button > .upload.icon").click();else if("/shortcuts"==e)ea.publish(nsCons.EVENT_SHOW_HOTKEYS_MODAL,{});else{if("search"!=e)return!0;_.delay(function(){utils.openNewWin(nsCons.STR_EMOJI_SEARCH_URL)},200)}return!1},e.prototype.valueChanged=function(){var e=this;this.value?(this.members=this.value,$(this.element).textcomplete([{match:/(|\b)(\/.*)$/,search:function(e,t){var n=_.keys(d.default);t($.map(n,function(t){return 0===t.indexOf(e)?t:null}))},template:function(e,t){return d.default[e].label},replace:function(t){return e.tipsActionHandler(t)?(_.defer(function(){autosize.update(e.element)}),e.setCaretPosition(d.default[t].ch2?d.default[t].ch2:d.default[t].ch),"$1"+d.default[t].value):""}},{match:/(^|\s)@(\w*)$/,search:function(t,n){n($.map(e.members,function(e){return e.enabled&&e.username.indexOf(t)>=0?e.username:null}))},template:function(t,n){var i=_.find(e.members,{username:t});return i.name+" - "+i.mails+" ("+i.username+")"},replace:function(e){return"$1{~"+e+"}"}},{match:/(^|\s):([\+\-\w]*)$/,search:function(e,t){t($.map(u.default,function(t){return _.some(t.split("_"),function(t){return 0===t.indexOf(e)})?t:null}))},template:function(e,t){if("search"==e)return"表情查找 - :search";var n=":"+e+":";return emojify.replace(n)+" - "+n},replace:function(t){return e.tipsActionHandler(t)?"$1:"+t+": ":""}}],{appendTo:$(this.element).prev(".textcomplete-container").find(".append-to"),maxCount:nsCons.NUM_TEXT_COMPLETE_MAX_COUNT})):this.unbind()},e.prototype.setCaretPosition=function(e){var t=this;e&&_.delay(function(){var n=utils.getCursortPosition(t.element);utils.setCaretPosition(t.element,n-e)},100)},e.prototype.initHotkeys=function(){var e=this;_.each(_.filter(_.values(d.default),"key"),function(t){$(e.element).bind("keydown",t.key,function(n){n.preventDefault(),$(e.element).insertAtCaret(t.value);var i=utils.getCursortPosition(e.element),r=t.ch2?t.ch2:t.ch;r&&utils.setCaretPosition(e.element,i-r),_.defer(function(){autosize.update(e.element)})})})},e.prototype.unbind=function(){try{$(this.element).textcomplete("destroy")}catch(e){}},e}())||c)||c)}),define("resources/attributes/attr-ui-checkbox",["exports","aurelia-framework","aurelia-templating"],function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.AttrUiCheckboxCustomAttribute=void 0;var r,a,o;e.AttrUiCheckboxCustomAttribute=(r=(0,n.customAttribute)("ui-checkbox"),a=(0,t.inject)(Element),r(o=a(o=function(){function e(t){i(this,e),this.element=t}return e.prototype.valueChanged=function(e,t){$(this.element).checkbox()},e}())||o)||o)}),define("resources/attributes/attr-ui-dropdown-action",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.AttrUiDropdownActionCustomAttribute=void 0;var i,r,a;e.AttrUiDropdownActionCustomAttribute=(i=(0,t.customAttribute)("ui-dropdown-action"),r=(0,t.inject)(Element),i(a=r(a=function(){function e(t){n(this,e),this.element=t}return e.prototype.valueChanged=function(e,t){},e.prototype._init=function(e){var t=this;_.defer(function(){$(t.element).dropdown({action:"hide",context:e})})},e.prototype.bind=function(){this._init(this.value?this.value:window)},e}())||a)||a)}),define("resources/attributes/attr-ui-dropdown-hover",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.AttrUiDropdownHoverCustomAttribute=void 0;var i,r,a;e.AttrUiDropdownHoverCustomAttribute=(i=(0,t.customAttribute)("ui-dropdown-hover"),r=(0,t.inject)(Element),i(a=r(a=function(){function e(t){n(this,e),this.element=t}return e.prototype.valueChanged=function(e,t){},e.prototype._init=function(e){var t=this;_.defer(function(){$(t.element).dropdown({on:"hover",action:e})})},e.prototype.bind=function(){this._init(this.value?this.value:"hide")},e}())||a)||a)}),define("resources/attributes/attr-ui-dropdown",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.AttrUiDropdownCustomAttribute=void 0;var i,r,a;e.AttrUiDropdownCustomAttribute=(i=(0,t.customAttribute)("ui-dropdown"),r=(0,t.inject)(Element),i(a=r(a=function(){function e(t){n(this,e),this.element=t}return e.prototype.valueChanged=function(e,t){},e.prototype._init=function(e){var t=this;_.defer(function(){$(t.element).dropdown({action:e})})},e.prototype.bind=function(){this._init(this.value?this.value:"hide")},e}())||a)||a)}),define("resources/attributes/attr-ui-popup",["exports","aurelia-framework","aurelia-templating"],function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.AttrUiPopupCustomAttribute=void 0;var r,a,o;e.AttrUiPopupCustomAttribute=(r=(0,n.customAttribute)("ui-popup"),a=(0,t.inject)(Element),r(o=a(o=function(){function e(t){i(this,e),this.element=t}return e.prototype.valueChanged=function(e,t){var n=this;_.defer(function(){$(n.element).popup({on:"click",inline:!0,silent:!0,position:e?e:"bottom right",jitter:300,delay:{show:300,hide:300},onShow:function(){},onVisible:function(){}})})},e}())||o)||o)}),define("resources/attributes/attr-ui-tab",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.AttrUiTabCustomAttribute=void 0;var i,r,a;e.AttrUiTabCustomAttribute=(i=(0,t.customAttribute)("ui-tab"),r=(0,t.inject)(Element),i(a=r(a=function(){function e(t){n(this,e),this.element=t}return e.prototype.valueChanged=function(e,t){},e.prototype._init=function(){var e=this;_.defer(function(){$(e.element).find(".item").tab()})},e.prototype.bind=function(){this._init()},e}())||a)||a)}),define("resources/binding-behaviors/bb-key",["exports"],function(e){"use strict";function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e){return e&&e.ctrlKey==this.keyState.ctrl&&e.altKey==this.keyState.alt&&e.shiftKey==this.keyState.shift&&e.keyCode==this.keyState.keyCode&&this.originalMethod(e),!0}Object.defineProperty(e,"__esModule",{value:!0});var i={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,backspace:8,delete:46};e.KeyBindingBehavior=function(){function e(){t(this,e)}return e.prototype.bind=function(e,t){var r=arguments.length<=2||void 0===arguments[2]?13:arguments[2],a=arguments[3],o="updateTarget";e.callSource?o="callSource":e.updateSource&&e.mode===bindingMode.twoWay&&(o="updateSource"),e.originalMethod=e[o],e.originalMethod.originalName=o,e[o]=n;var s=_.isInteger(r)?r:1===r.length?r.charCodeAt(0):i[r];_.isUndefined(s)&&console.warn("Unmapping keyCode for KeyBindingBehavior!"),e.keyState={ctrl:_.includes(a,"ctrl"),alt:_.includes(a,"alt"),shift:_.includes(a,"shift"),keyCode:s}},e.prototype.unbind=function(e,t){e[e.originalMethod.originalName]=e.originalMethod,e.originalMethod=null},e}()}),define("resources/value-converters/vc-common",["exports","jquery-format","timeago"],function(e){"use strict";function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.DiffHtmlValueConverter=e.Nl2brValueConverter=e.EmojiValueConverter=e.UserNameValueConverter=e.SortChannelsValueConverter=e.SortUsernamesValueConverter=e.SortUsersValueConverter=e.SortValueConverter=e.ParseMdValueConverter=e.TimeagoValueConverter=e.NumberValueConverter=e.DateValueConverter=e.LowerValueConverter=e.UpperValueConverter=void 0;var n=timeago();e.UpperValueConverter=function(){function e(){t(this,e)}return e.prototype.toView=function(e){return e&&e.toUpperCase()},e}(),e.LowerValueConverter=function(){function e(){t(this,e)}return e.prototype.toView=function(e){return e&&e.toLowerCase()},e}(),e.DateValueConverter=function(){function e(){t(this,e)}return e.prototype.toView=function(e){var t=arguments.length<=1||void 0===arguments[1]?"yyyy-MM-dd hh:mm:ss":arguments[1];return _.isInteger(_.toNumber(e))?$.format.date(new Date(e),t):e?e:""},e}(),e.NumberValueConverter=function(){function e(){t(this,e)}return e.prototype.toView=function(e){var t=arguments.length<=1||void 0===arguments[1]?"#,##0.00":arguments[1];return _.isNumber(_.toNumber(e))?$.format.number(e,t):e?e:""},e}(),e.TimeagoValueConverter=function(){function e(){t(this,e)}return e.prototype.toView=function(e){return e?n.format(e,"zh_CN"):""},e}(),e.ParseMdValueConverter=function(){function e(){t(this,e)}return e.prototype.toView=function(e){return e?marked(utils.preParse(e)):""},e}(),e.SortValueConverter=function(){function e(){t(this,e)}return e.prototype.toView=function(e,t){return _.isArray(e)?_.sortBy(e,t):e},e}(),e.SortUsersValueConverter=function(){function e(){t(this,e)}return e.prototype.toView=function(e,t){if(_.isArray(e)&&t){var n=_.find(e,{username:t});if(n)return[n].concat(_.reject(e,{username:t}))}return e},e}(),e.SortUsernamesValueConverter=function(){function e(){t(this,e)}return e.prototype.toView=function(e,t){return _.isArray(e)&&t&&_.includes(e,t)?[t].concat(_.without(e,t)):e},e}(),e.SortChannelsValueConverter=function(){function e(){t(this,e)}return e.prototype.toView=function(e){if(_.isArray(e)){var t=_.find(e,{name:"all"});if(t)return[t].concat(_.reject(e,{name:"all"}))}return e},e}(),e.UserNameValueConverter=function(){function e(){t(this,e)}return e.prototype.toView=function(e){var t=_.find(window.tmsUsers,{username:e});return t?t.name:e},e}(),e.EmojiValueConverter=function(){function e(){t(this,e)}return e.prototype.toView=function(e,t){return emojify&&_.defer(function(){emojify.run(t)}),e},e}(),e.Nl2brValueConverter=function(){function e(){t(this,e)}return e.prototype.toView=function(e){return e?_.replace(e,/\n/g,"
    "):e},e}(),e.DiffHtmlValueConverter=function(){function e(){t(this,e)}return e.prototype.toView=function(e,t,n){return e?utils.diffHtml(e):e},e}()}),define("resources/elements/em-blog-comment-popup",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.EmBlogCommentPopup=void 0;var i;e.EmBlogCommentPopup=(0,t.containerless)(i=function(){function e(){var t=this;n(this,e),this.subscribe=ea.subscribe(nsCons.EVENT_BLOG_COMMENT_POPUP_SHOW,function(e){t.id=e.id,t.target=e.target,$(t.target).popup({popup:t.popup,hoverable:!0,inline:!1,movePopup:!1,silent:!0,position:"bottom left",jitter:300,prefer:"opposite",delay:{show:300,hide:300},onShow:function(){$.get("/admin/blog/comment/get",{cid:t.id},function(e){e.success?t.comment=e.data:toastr.error(e.data,"加载失败!")})}}).popup("show")})}return e.prototype.unbind=function(){this.subscribe.dispose()},e}())||i}),define("resources/elements/em-blog-comment-share",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmBlogCommentShare=void 0;var a,o,s,l,c;e.EmBlogCommentShare=(0,t.containerless)((o=function(){function e(){i(this,e),this.shares=[],this.desc="",n(this,"blog",s,this),n(this,"comment",l,this),n(this,"loginUser",c,this),this.basePath=utils.getBasePath()}return e.prototype.attached=function(){var e=this;$(this.searchRef).search({minCharacters:2,cache:!1,selectFirstResult:!0,showNoResults:!1,onSelect:function(t,n){t.item._id=_.uniqueId("share-item-"),t.item._type=t.item.username?"user":"channel",e.shares.push(t.item),_.defer(function(){$(e.inputSearchRef).val("")})},apiSettings:{onResponse:function(t){var n={results:[]};return $.each(t.data.users,function(t,i){_.find(_.filter(e.shares,function(e){return"user"==e._type}),{username:i.username})||n.results.push({item:i,title:' '+i.name+" ("+i.username+")"})}),$.each(t.data.channels,function(t,i){_.find(_.filter(e.shares,function(e){return"channel"==e._type}),{name:i.name})||n.results.push({item:i,title:' '+i.title+" ("+i.name+")"})}),n},url:"/admin/blog/share/to/search?search={query}"}}),$(this.shareRef).popup({on:"click",inline:!0,silent:!0,position:"bottom right",jitter:300,delay:{show:300,hide:300},onVisible:function(){$(e.inputSearchRef).focus()}})},e.prototype.shareSearchKeyupHandler=function(e){if(13===e.keyCode&&!$(this.searchRef).search("is visible")){var t=$(this.inputSearchRef).val();utils.isMail(t)&&(_.find(_.filter(this.shares,function(e){return"mail"==e._type}),{mail:t})||(this.shares.push({_id:_.uniqueId("share-item-"),_type:"mail",mail:t}),$(this.inputSearchRef).val("")))}},e.prototype.show=function(){$(this.shareRef).popup("show")},e.prototype.removeShareHandler=function(e){this.shares=_.reject(this.shares,{_id:e._id})},e.prototype.cancelHandler=function(){this._reset()},e.prototype._reset=function(){this.shares=[],this.desc="",$(this.inputSearchRef).val(""),$(this.shareRef).popup("hide")},e.prototype.shareHandler=function(){var e=this;return 0===this.shares.length?void toastr.error("请先指定博文评论分享用户或者频道或者邮箱!"):void(this.ajaxS=$.post("/admin/blog/comment/share",{basePath:utils.getBasePath(),href:this.basePath+"#/blog/"+this.blog.id+"?cid="+this.comment.id,id:this.comment.id,desc:this.desc,html:utils.md2html(this.comment.content),users:_.chain(this.shares).filter(function(e){return"user"==e._type}).map("username").join().value(),channels:_.chain(this.shares).filter(function(e){return"channel"==e._type}).map("name").join().value(),mails:_.chain(this.shares).filter(function(e){return"mail"==e._type}).map("mail").join().value()},function(t,n,i){t.success?(e._reset(),toastr.success("博文评论分享成功!")):toastr.error(t.data,"博文评论分享失败!")}))},e}(),s=r(o.prototype,"blog",[t.bindable],{enumerable:!0,initializer:null}),l=r(o.prototype,"comment",[t.bindable],{enumerable:!0,initializer:null}),c=r(o.prototype,"loginUser",[t.bindable],{enumerable:!0,initializer:null}),a=o))||a}),define("resources/elements/em-blog-comment",["exports","aurelia-framework","simplemde","dropzone","common/common-emoji"],function(e,t,n,i,r){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmBlogComment=void 0;var c,d,u,m=a(n),p=(a(i),a(r));e.EmBlogComment=(0,t.containerless)((d=function(){function e(){var t=this;s(this,e),this.comments=[],this.baseUrl=utils.getUrl(),this.basePath=utils.getBasePath(),this.offset=0,this.isSuper=nsCtx.isSuper,this.loginUser=nsCtx.loginUser,this.users=nsCtx.users,o(this,"blog",u,this),this.subscribe=ea.subscribe(nsCons.EVENT_BLOG_COMMENT_MSG_INSERT,function(e){t.insertContent(""+e.content),t._scrollTo("b")})}return e.prototype.blogChanged=function(e,t){this._refresh()},e.prototype.unbind=function(){this.subscribe.dispose()},e.prototype._refresh=function(){var e=this;this.blog&&$.get("/admin/blog/comment/query",{id:this.blog.id,page:0,size:1e3},function(t){t.success?!function(){e.comments=t.data.content;var n=utils.urlQuery("cid");n&&_.defer(function(){e.scrollToAfterImgLoaded(n)}),ea.publish(nsCons.EVENT_BLOG_COMMENT_CHANGED,{action:"query",comments:e.comments})}():toastr.error(t.data)})},e.prototype.attached=function(){var e=this;this._init(),$(".em-blog-comment .comments").on("mouseenter",'.markdown-body a[href*="#/blog/"]:not(.pp-not)',function(e){e.preventDefault();var t=$(e.currentTarget),n=utils.urlQuery("cid",t.attr("href"));n&&ea.publish(nsCons.EVENT_BLOG_COMMENT_POPUP_SHOW,{id:n,target:e.currentTarget})}),$(".em-blog-comment .comments").on("dblclick",".comment",function(t){if(t.ctrlKey){var n=$(t.currentTarget).attr("data-id"),i=$(t.currentTarget).find(".content > textarea"),r=_.find(e.comments,{id:+n});(e.isSuper||r.creator.username==e.loginUser.username)&&e.editHandler(r,i)}}),$(".em-blog-comment .comments").on("click",".comment",function(t){e.focusedComment=$(t.currentTarget)}),this.initHotkeys()},e.prototype.initHotkeys=function(){var e=this;$(document).bind("keydown","r",function(t){ -t.preventDefault(),$(".em-blog-content").scrollTo("max",120,{offset:0}),e.simplemde.codemirror.focus()}).bind("keydown","alt+up",function(t){t.preventDefault(),$(".em-blog-content").scrollTo(e.getScrollTargetComment(!0),120,{offset:0})}).bind("keydown","alt+down",function(t){t.preventDefault(),$(".em-blog-content").scrollTo(e.getScrollTargetComment(),120,{offset:0})})},e.prototype.getScrollTargetComment=function(e){if(e)if(this.focusedComment&&1===this.focusedComment.size()){var t=this.focusedComment.find("> a.em-user-avatar");if(utils.isElementInViewport(t)){var n=this.focusedComment.prev(".comment");1===n.size()&&(this.focusedComment=n)}}else this.focusedComment=$(this.blogCommentsRef).children(".comment:first");else if(this.focusedComment&&1===this.focusedComment.size()){var i=this.focusedComment.next(".comment");1===i.size()&&(this.focusedComment=i)}else this.focusedComment=$(this.blogCommentsRef).children(".comment:last");return this.focusedComment},e.prototype._init=function(){var e=this;this.simplemde=new m.default({element:this.commentRef,spellChecker:!1,status:!1,toolbar:[{name:"bold",action:m.default.toggleBold,className:"fa fa-bold",title:"粗体"},{name:"italic",action:m.default.toggleItalic,className:"fa fa-italic",title:"斜体"},{name:"strikethrough",action:m.default.toggleStrikethrough,className:"fa fa-strikethrough",title:"删除线"},{name:"heading",action:m.default.toggleHeadingSmaller,className:"fa fa-header",title:"标题"},{name:"heading-smaller",action:m.default.toggleHeadingSmaller,className:"fa fa-header fa-header-x fa-header-smaller",title:"变小标题"},{name:"heading-bigger",action:m.default.toggleHeadingBigger,className:"fa fa-header fa-header-x fa-header-bigger",title:"变大标题"},"|",{name:"code",action:m.default.toggleCodeBlock,className:"fa fa-code",title:"代码"},{name:"quote",action:m.default.toggleBlockquote,className:"fa fa-quote-left",title:"引用"},{name:"unordered-list",action:m.default.toggleUnorderedList,className:"fa fa-list-ul",title:"无序列表"},{name:"ordered-list",action:m.default.toggleOrderedList,className:"fa fa-list-ol",title:"有序列表"},{name:"tasks",action:function(t){e.insertContent("- [ ] 未完成任务\n- [x] 已完成任务")},className:"fa fa-check-square-o ",title:"任务列表"},{name:"details",action:function(t){e.insertContent("
    \n标题\n

    详情内容

    \n
    ")},className:"fa fa-play ",title:"折叠详情"},"|",{name:"link",action:m.default.drawLink,className:"fa fa-link",title:"创建链接"},{name:"image",action:m.default.drawImage,className:"fa fa-picture-o",title:"插入图片"},{name:"table",action:m.default.drawTable,className:"fa fa-table",title:"插入表格"},{name:"horizontal-rule",action:m.default.drawHorizontalRule,className:"fa fa-minus",title:"插入水平分割线"},"|",{name:"upload",action:function(e){},className:"fa fa-upload",title:"上传文件"},"|",{name:"preview",action:m.default.togglePreview,className:"fa fa-eye no-disable",title:"切换预览"},{name:"guide",action:"https://simplemde.com/markdown-guide",className:"fa fa-question-circle",title:"Markdown指南"}],insertTexts:{table:["","\n\n| 列1 | 列2 | 列3 |\n| ------ | ------ | ------ |\n| 文本 | 文本 | 文本 |\n\n"]},previewRender:function(e,t){return emojify&&(e=emojify.replace(e)),marked(utils.preParse(e))}}),this.simplemde.codemirror.on("keyup",function(t,n){n.ctrlKey&&13==n.keyCode?e.addHandler():27==n.keyCode&&e.simplemde.value("")}),this.$chatMsgInputRef=$(this.markdownRef).find(".CodeMirror textarea"),0===this.$chatMsgInputRef.size()&&(this.$chatMsgInputRef=$(this.markdownRef).find('.CodeMirror [contenteditable="true"]')),this.initPaste(),this.initTextcomplete(),this.initUploadDropzone($(".CodeMirror-wrap",this.markdownRef),function(){return e.$chatMsgInputRef},!1),this.initUploadDropzone($(".editor-toolbar .fa.fa-upload",this.markdownRef),function(){return e.$chatMsgInputRef},!0)},e.prototype.initTextcomplete=function(){var e=this;$(this.$chatMsgInputRef).textcomplete([{match:/(^|\s)@(\w*)$/,search:function(e,t){t($.map(nsCtx.users,function(t){return t.enabled&&t.username.indexOf(e)>=0?t.username:null}))},template:function(e,t){var n=_.find(nsCtx.users,{username:e});return n.name+" - "+n.mails+" ("+n.username+")"},replace:function(e){return"$1{~"+e+"}"}},{match:/(^|\s):([\+\-\w]*)$/,search:function(e,t){t($.map(p.default,function(t){return _.some(t.split("_"),function(t){return 0===t.indexOf(e)})?t:null}))},template:function(e,t){if("search"==e)return"表情查找 - :search";var n=":"+e+":";return emojify.replace(n)+" - "+n},replace:function(t){return e.tipsActionHandler(t)?"$1:"+t+": ":""}}],{appendTo:".tms-blog-comment-status-bar"}),this.simplemde.codemirror.on("keydown",function(t,n){_.includes([13,38,40],n.keyCode)&&e.isTipsShow()&&n.preventDefault()})},e.prototype.isTipsShow=function(){return 1===$(".tms-blog-comment-status-bar").find(".textcomplete-dropdown:visible").size()},e.prototype.tipsActionHandler=function(e){return"search"!=e||(_.delay(function(){utils.openNewWin(nsCons.STR_EMOJI_SEARCH_URL)},200),!1)},e.prototype.unbind=function(){this._reset()},e.prototype._reset=function(){this.blog=null,this.simplemde.value(""),this.simplemde.toTextArea(),this.simplemde=null},e.prototype.insertContent=function(e,t){try{var n=t?t.codemirror:this.simplemde.codemirror,i=n.getCursor();i&&(n.replaceRange(e,i,i),n.focus())}catch(e){console.log(e)}},e.prototype.replyHandler=function(e){this.insertContent("[[回复评论#"+e.id+"]("+this.baseUrl+"?cid="+e.id+"){~"+e.creator.username+"}]\n\n"),this._scrollTo("b")},e.prototype.removeHandler=function(e){var t=this;$.post("/admin/blog/comment/remove",{cid:e.id},function(n,i,r){n.success?(t.comments=_.reject(t.comments,{id:e.id}),toastr.success("博文评论移除成功!"),ea.publish(nsCons.EVENT_BLOG_COMMENT_CHANGED,{action:"removed",comments:t.comments})):toastr.error(n.data,"博文评论移除失败!")})},e.prototype.addHandler=function(){var e=this,t=this.simplemde.value();if(!$.trim(t))return this.simplemde.value(""),void toastr.error("评论内容不能为空!");if(!this.sending){this.sending=!0;var n=utils.md2html(t),i=[nsCtx.memberAll].concat(window.tmsUsers?tmsUsers:[]);$.post("/admin/blog/comment/create",{basePath:utils.getBasePath(),id:this.blog.id,users:utils.parseUsernames(t,i).join(","),content:t,contentHtml:n},function(t,n,i){t.success?(e.comments=[].concat(e.comments,[t.data]),e.simplemde.value(""),toastr.success("博文评论提交成功!"),e.scrollToAfterImgLoaded("b"),ea.publish(nsCons.EVENT_BLOG_COMMENT_ADDED,{}),ea.publish(nsCons.EVENT_BLOG_COMMENT_CHANGED,{action:"created",comments:e.comments})):toastr.error(t.data,"博文评论提交失败!")}).always(function(){e.sending=!1})}},e.prototype.initPaste=function(){var e=this,t=void 0;t=this.$chatMsgInputRef.is("textarea")?$(this.$chatMsgInputRef).pastableTextarea():$(this.$chatMsgInputRef).pastableContenteditable(),t&&t.on("pasteImage",function(t,n){$.post("/admin/file/base64",{dataURL:n.dataURL,type:n.blob.type,toType:"Blog"},function(t,n,i){t.success&&e.insertContent("![{name}]({baseURL}{path}{uuidName})".replace(/\{name\}/g,t.data.name).replace(/\{baseURL\}/g,utils.getBaseUrl()+"/").replace(/\{path\}/g,t.data.path).replace(/\{uuidName\}/g,t.data.uuidName))})}).on("pasteImageError",function(e,t){toastr.error(t.message,"剪贴板粘贴图片错误!")})},e.prototype.initUploadDropzone=function(e,t,n){var i=this;$(e).dropzone({url:"/admin/file/upload",paramName:"file",clickable:!!n,dictDefaultMessage:"",maxFilesize:10,addRemoveLinks:!0,previewsContainer:".em-blog-comment .dropzone-previews",previewTemplate:$(".em-blog-comment .preview-template")[0].innerHTML,dictCancelUpload:"取消上传",dictCancelUploadConfirmation:"确定要取消上传吗?",dictFileTooBig:"文件过大({{filesize}}M),最大限制:{{maxFilesize}}M",init:function(){this.on("sending",function(e,n,i){t()?i.append("toType","Blog"):this.removeAllFiles(!0)}),this.on("success",function(e,t){t.success?($.each(t.data,function(e,t){"Image"==t.type?i.insertContent("![{name}]({baseURL}{path}{uuidName}) ".replace(/\{name\}/g,t.name).replace(/\{baseURL\}/g,utils.getBaseUrl()+"/").replace(/\{path\}/g,t.path).replace(/\{uuidName\}/g,t.uuidName)):i.insertContent("[{name}]({baseURL}{path}{uuidName}) ".replace(/\{name\}/g,t.name).replace(/\{baseURL\}/g,utils.getBaseUrl()+"/").replace(/\{path\}/g,"admin/file/download/").replace(/\{uuidName\}/g,t.id))}),toastr.success("上传成功!")):toastr.error(t.data,"上传失败!")}),this.on("error",function(e,t,n){toastr.error(t,"上传失败!")}),this.on("complete",function(e){this.removeFile(e)})}})},e.prototype.scrollToAfterImgLoaded=function(e){var t=this;_.defer(function(){new ImagesLoaded($(".em-blog-content")[0]).always(function(){t._scrollTo(e)}),t._scrollTo(e)})},e.prototype._scrollTo=function(e){"b"==e?$(".em-blog-content").scrollTo("max"):"t"==e?$(".em-blog-content").scrollTo(0):_.some(this.comments,{id:+e})?($(".em-blog-content").scrollTo('.comment[data-id="'+e+'"]',{offset:this.offset}),$(".em-blog-content").find(".comment[data-id]").removeClass("active"),$(".em-blog-content").find(".comment[data-id="+e+"]").addClass("active")):($(".em-blog-content").scrollTo("max"),toastr.warning("博文评论["+e+"]不存在,可能已经被删除!"))},e.prototype.editHandler=function(e,t){$.get("/admin/blog/comment/get",{cid:e.id},function(n){n.success?(e.version!=n.data.version&&_.extend(e,n.data),e.isEditing=!0,e.contentOld=e.content,_.defer(function(){$(t).focus().select(),autosize.update(t)})):toastr.error(n.data)})},e.prototype.refreshHandler=function(e){$.get("/admin/blog/comment/get",{cid:e.id},function(t){e.version!=t.data.version?(_.extend(e,t.data),toastr.success("刷新同步成功!")):toastr.info("博文评论内容暂无变更!")})},e.prototype.eidtKeydownHandler=function(e,t,n){return!this.sending&&(e.ctrlKey&&13===e.keyCode?(this.editSave(t,n),!1):e.ctrlKey&&85===e.keyCode?($(n).next(".tms-blog-comment-edit-actions").find(".upload").click(),!1):(27===e.keyCode&&this.editCancelHandler(e,t,n),!0))},e.prototype.editOkHandler=function(e,t,n){this.editSave(t,n),t.isEditing=!1},e.prototype.editCancelHandler=function(e,t,n){t.content=t.contentOld,$(n).val(t.content),t.isEditing=!1},e.prototype.editSave=function(e,t){var n=this;this.sending=!0,e.content=$(t).val();var i=utils.md2html(e.content),r=(utils.md2html(e.contentOld),[nsCtx.memberAll].concat(window.tmsUsers?tmsUsers:[]));$.post("/admin/blog/comment/update",{basePath:utils.getBasePath(),id:this.blog.id,cid:e.id,version:e.version,users:utils.parseUsernames(e.content,r).join(","),content:e.content,contentHtml:i,diff:utils.diffS(e.contentOld,e.content)},function(t,n,i){t.success?(toastr.success("博文评论更新成功!"),e.isEditing=!1,e.version=t.data.version):toastr.error(t.data,"博文评论更新失败!")}).always(function(){n.sending=!1})},e.prototype.isZanDone=function(e){var t=e.voteZan;return!!t&&t.split(",").includes(this.loginUser.username)},e.prototype.rateHandler=function(e){$.post("/admin/blog/comment/vote",{cid:e.id,url:utils.getBasePath(),contentHtml:utils.md2html(e.content),type:this.isZanDone(e)?"Cai":"Zan"},function(t,n,i){t.success?_.extend(e,t.data):toastr.error(t.data,"博文投票失败!")})},e.prototype.gotoTopHandler=function(){$(".em-blog-content").scrollTo(0,120)},e}(),u=l(d.prototype,"blog",[t.bindable],{enumerable:!0,initializer:null}),c=d))||c}),define("resources/elements/em-blog-content",["exports","aurelia-framework","clipboard-js","clipboard"],function(e,t,n,i){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.EmBlogContent=void 0;var o,s=r(n),l=r(i);e.EmBlogContent=(0,t.containerless)(o=function(){function e(){var t=this;a(this,e),this.loginUser=nsCtx.loginUser,this.isSuper=nsCtx.isSuper,this.isAdmin=nsCtx.isAdmin,this.subscribe=ea.subscribe(nsCons.EVENT_BLOG_SWITCH,function(e){t.getBlog(),ea.publish(nsCons.EVENT_BLOG_RIGHT_SIDEBAR_TOGGLE,{isHide:!0})}),this.subscribe2=ea.subscribe(nsCons.EVENT_BLOG_CHANGED,function(e){"updated"==e.action&&(_.extend(t.blog,e.blog),_.defer(function(){return t.catalogHandler(!0)}))}),this.subscribe3=ea.subscribe(nsCons.EVENT_BLOG_COMMENT_ADDED,function(e){t.blogFollower||t.getFollower()}),this.subscribe4=ea.subscribe(nsCons.EVENT_BLOG_COMMENT_CHANGED,function(e){t.comments=e.comments}),this.throttleCreateHandler=_.throttle(function(){t.createHandler()},1e3,{trailing:!1}),this.throttleEditHandler=_.throttle(function(){t.editHandler()},1e3,{trailing:!1}),this.throttleCopyHandler=_.throttle(function(){t.copyHandler()},1e3,{trailing:!1})}return e.prototype.unbind=function(){this.subscribe.dispose(),this.subscribe2.dispose(),this.subscribe3.dispose(),this.subscribe4.dispose()},e.prototype.attached=function(){var e=this;this.getBlog(),new l.default(".em-blog-content .tms-clipboard").on("success",function(e){toastr.success("复制到剪贴板成功!")}).on("error",function(e){toastr.error("复制到剪贴板失败!")}),$(".em-blog-content").on("click","code[data-code]",function(e){e.ctrlKey&&(e.stopImmediatePropagation(),e.preventDefault(),s.default.copy($(e.currentTarget).attr("data-code")).then(function(){toastr.success("复制到剪贴板成功!")},function(e){toastr.error("复制到剪贴板失败!")}))}),$(".em-blog-content").on("click",".pre-code-wrapper",function(e){e.ctrlKey&&(e.stopImmediatePropagation(),e.preventDefault(),s.default.copy($(e.currentTarget).find("i[data-clipboard-text]").attr("data-clipboard-text")).then(function(){toastr.success("复制到剪贴板成功!")},function(e){toastr.error("复制到剪贴板失败!")}))}),$(".em-blog-right-sidebar").on("click",".panel-blog-dir .wiki-dir-item",function(e){e.preventDefault(),$(window).width()<=768&&ea.publish(nsCons.EVENT_BLOG_RIGHT_SIDEBAR_TOGGLE,{isHide:!0}),$(".em-blog-content").scrollTo("#"+$(e.currentTarget).attr("data-id"),200,{offset:0})}),$(this.mkbodyRef).on("dblclick",function(t){t.ctrlKey&&(e.blog.openEdit||e.isSuper||e.blog.creator.username==e.loginUser.username)&&e.editHandler()}),$(".em-blog-content").scroll(_.throttle(function(t){try{var n=$(".em-blog-content")[0].scrollHeight,i=$(".em-blog-content")[0].scrollTop,r=1*i/(n-$(".em-blog-content").outerHeight());e.progressWidth=$(".em-blog-content").outerWidth()*r,e.fixDirItem()}catch(t){e.progressWidth=0}},10)),$(this.feedRef).on("mouseenter",'.event a[href*="#/blog/"]:not(.pp-not)',function(e){e.preventDefault();var t=$(e.currentTarget),n=utils.urlQuery("cid",t.attr("href"));n&&ea.publish(nsCons.EVENT_BLOG_COMMENT_POPUP_SHOW,{id:n,target:e.currentTarget})}),this.initHotkeys()},e.prototype.fixDirItem=function e(){var t=null,n=null;if(_.each(this.dirItemIds,function(e){if(n){if(utils.isElementInViewport($("#"+e))&&!utils.isElementInViewport($("#"+n)))return t=e,!1}else if(utils.isElementInViewport($("#"+e)))return t=e,!1}),t){var e=$(".em-blog-right-sidebar .panel-blog-dir").find('.wiki-dir-item[data-id="'+t+'"]');e&&($(".em-blog-right-sidebar .panel-blog-dir").find(".wiki-dir-item[data-id]").removeClass("active"),e.addClass("active"),$(".em-blog-right-sidebar .scrollbar-macosx.scroll-content.scroll-scrolly_visible").scrollTo(e,10,{offset:-120}))}},e.prototype.initHotkeys=function(){var e=this;try{$(document).bind("keyup","e",function(t){t.preventDefault(),(e.blog.openEdit||e.isSuper||e.blog.creator.username==e.loginUser.username)&&e.throttleEditHandler()}).bind("keyup","c",function(t){t.preventDefault(),e.throttleCreateHandler()}).bind("keydown","d",function(t){t.preventDefault(),e.dir&&e.catalogHandler()}).bind("keydown","s",function(t){t.preventDefault(),e.blogShareVm.show()}).bind("keydown","f",function(t){t.preventDefault(),e.followerHandler()}).bind("keydown","t",function(e){e.preventDefault(),$(".em-blog-content").scrollTo(0,200,{offset:0})}).bind("keydown","b",function(e){e.preventDefault(),$(".em-blog-content").scrollTo("max",200,{offset:0})}).bind("keydown","alt+r",function(t){t.preventDefault(),e.refreshHandler()}).bind("keydown","alt+h",function(t){t.preventDefault(),e.historyHandler()}).bind("keydown","alt+l",function(t){t.preventDefault(),e.authHandler()}).bind("keydown","alt+s",function(t){t.preventDefault(),e.stowHandler()}).bind("keydown","alt+c",function(t){t.preventDefault(),e.throttleCopyHandler()}).bind("keydown","alt+m",function(t){t.preventDefault(),e.updateSpaceHandler()}).bind("keydown","alt+o",function(t){t.preventDefault(),e.openEditHandler()}).bind("keydown","alt+ctrl+d",function(t){t.preventDefault(),e.deleteHandler()})}catch(e){console.log(e)}},e.prototype._dir=function(){var e=this;return this.dir=utils.dir($(this.mkbodyRef),"tms-blog-dir-item-"),this.dirItemIds=[],this.dir&&$(this.dir).find("a.item.wiki-dir-item").each(function(t,n){e.dirItemIds.push($(n).attr("data-id"))}),this.dir},e.prototype.getMyLog=function(){var e=this;this.ajaxS=$.get("/admin/blog/log/my",function(t){t.success?e.logs=t.data:toastr.error(t.data)})},e.prototype.getBlog=function(){var e=this;return this.progressWidth=0,!nsCtx.blogId||isNaN(new Number(nsCtx.blogId))?(this.blog=null,void this.getMyLog()):(this.getStow(),this.getFollower(),$.get("/admin/blog/get",{id:nsCtx.blogId},function(t){t.success?(e.blog=t.data,ea.publish(nsCons.EVENT_BLOG_VIEW_CHANGED,e.blog),_.defer(function(){return e.catalogHandler(!0)})):toastr.error(t.data,"获取博文失败!")}))},e.prototype.getStow=function(){var e=this;$.get("/admin/blog/stow/get",{id:nsCtx.blogId},function(t){t.success?e.blogStow=t.data:toastr.error(t.data)})},e.prototype.getFollower=function(){var e=this;$.get("/admin/blog/follower/get",{id:nsCtx.blogId},function(t){t.success?e.blogFollower=t.data:toastr.error(t.data)})},e.prototype.editHandler=function(){nsCtx.isModaalOpening||ea.publish(nsCons.EVENT_BLOG_ACTION,{action:"edit",id:this.blog.id})},e.prototype.deleteHandler=function(){var e=this;(this.isSuper||this.blog.creator.username==this.loginUser.username)&&this.emConfirmModal.show({title:"删除确认",content:"确认要删除该博文吗?",onapprove:function(){$.post("/admin/blog/delete",{id:e.blog.id},function(t,n,i){t.success?(toastr.success("删除博文成功!"),ea.publish(nsCons.EVENT_BLOG_CHANGED,{action:"deleted",blog:e.blog}),ea.publish(nsCons.EVENT_APP_ROUTER_NAVIGATE,{to:"#/blog"})):toastr.error(t.data,"删除博文失败!")})}})},e.prototype.createHandler=function(){nsCtx.isModaalOpening||$('a[href="#modaal-blog-write"]').click()},e.prototype.updateSpaceHandler=function(){(this.isSuper||this.blog.creator.username==this.loginUser.username)&&this.blogSpaceUpdateVm.show(this.blog)},e.prototype.updatePrivatedHandler=function(){var e=this;$.post("/admin/blog/privated/update",{id:this.blog.id,privated:!this.blog.privated},function(t,n,i){t.success?(_.extend(e.blog,t.data),ea.publish(nsCons.EVENT_BLOG_CHANGED,{action:"updated",blog:e.blog}),toastr.success("更新博文可见性成功!")):toastr.error(t.data,"更新博文可见性失败!")})},e.prototype.isZanDone=function(){var e=this.blog.voteZan;return!!e&&e.split(",").includes(this.loginUser.username)},e.prototype.rateHandler=function(){var e=this;$.post("/admin/blog/vote",{id:this.blog.id,url:utils.getBasePath(),contentHtml:utils.md2html(this.blog.content),type:this.isZanDone()?"Cai":"Zan"},function(t,n,i){t.success?_.extend(e.blog,t.data):toastr.error(t.data,"博文投票失败!")})},e.prototype.openEditHandler=function(){var e=this;(this.isSuper||this.blog.creator.username==this.loginUser.username)&&$.post("/admin/blog/openEdit",{id:this.blog.id,open:!this.blog.openEdit},function(t,n,i){t.success?(e.blog.openEdit=!e.blog.openEdit,ea.publish(nsCons.EVENT_BLOG_CHANGED,{action:"updated",blog:e.blog}),toastr.success(e.blog.openEdit?"开放协作编辑成功!":"关闭协作编辑成功!")):toastr.error(t.data,"协作编辑操作失败!")})},e.prototype.refreshHandler=function(){var e=this.getBlog();e&&e.done(function(){toastr.success("刷新操作成功!")})},e.prototype.historyHandler=function(){this.blogHistoryVm.show(this.blog)},e.prototype.catalogHandler=function(){var e=!(arguments.length<=0||void 0===arguments[0])&&arguments[0];ea.publish(nsCons.EVENT_BLOG_RIGHT_SIDEBAR_TOGGLE,{justRefresh:e,action:"dir",dir:this._dir()})},e.prototype.authHandler=function(){(this.isSuper||this.blog.creator.username==this.loginUser.username)&&this.blogSpaceAuthVm.show("blog",this.blog)},e.prototype.copyHandler=function(){nsCtx.isModaalOpening||ea.publish(nsCons.EVENT_BLOG_ACTION,{action:"copy",id:this.blog.id})},e.prototype.stowHandler=function(){var e=this;this.blogStow?$.post("/admin/blog/stow/remove",{sid:this.blogStow.id},function(t,n,i){t.success?(ea.publish(nsCons.EVENT_BLOG_STOW_CHANGED,{action:"remove",data:e.blogStow}),e.blogStow=null,toastr.success("删除博文收藏成功!")):toastr.error(t.data)}):$.post("/admin/blog/stow/add",{id:this.blog.id},function(t,n,i){t.success?(e.blogStow=t.data,ea.publish(nsCons.EVENT_BLOG_STOW_CHANGED,{action:"add",data:e.blogStow}),toastr.success("博文收藏成功!")):toastr.error(t.data)})},e.prototype.followerHandler=function(){var e=this;this.blogFollower?$.post("/admin/blog/follower/remove",{fid:this.blogFollower.id},function(t,n,i){t.success?(e.blogFollower=null,toastr.success("取消博文关注成功!")):toastr.error(t.data)}):$.post("/admin/blog/follower/add",{id:this.blog.id},function(t,n,i){t.success?(e.blogFollower=t.data,toastr.success("博文关注成功!")):toastr.error(t.data)})},e.prototype.dimmerHandler=function(){ea.publish(nsCons.EVENT_BLOG_LEFT_SIDEBAR_TOGGLE,{isHide:!0}),ea.publish(nsCons.EVENT_BLOG_RIGHT_SIDEBAR_TOGGLE,{isHide:!0})},e.prototype.commentsHandler=function(){$(".em-blog-content").scrollTo(".em-blog-comment ",120,{offset:-16})},e.prototype.openFeedEventItemHandler=function(e){e.isOpen=!e.isOpen},e.prototype.feedEventItemMouseleaveHandler=function(e){e.isOpen=!1},e.prototype.refreshFeedHandler=function(){this.getMyLog()},e}())||o}),define("resources/elements/em-blog-history-diff",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.EmBlogHistoryDiff=void 0;var i;e.EmBlogHistoryDiff=(0,t.containerless)(i=function(){function e(){n(this,e)}return e.prototype.showHandler=function(){},e.prototype.approveHandler=function(){},e.prototype.show=function(e,t,n,i){this.f=e,this.s=t,this.fIndex=n,this.sIndex=i,this.diffHtml=utils.diffS(t.content,e.content),this.emModal.show({hideOnApprove:!0,autoDimmer:!1})},e}())||i}),define("resources/elements/em-blog-history-view",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.EmBlogHistoryView=void 0;var i;e.EmBlogHistoryView=(0,t.containerless)(i=function(){function e(){n(this,e),this.isSuper=nsCtx.isSuper,this.loginUser=nsCtx.loginUser}return e.prototype.showHandler=function(){},e.prototype.approveHandler=function(){},e.prototype.show=function(e,t,n){this.blogHistory=e,this.blog=e.blog,this.ver=t,this.isCurrentVer=n,this.emModal.show({hideOnApprove:!0,autoDimmer:!1})},e.prototype.restoreHandler=function(){var e=this;this.ajax1=$.post("/admin/blog/history/restore",{hid:this.blogHistory.id},function(t,n,i){t.success?(ea.publish(nsCons.EVENT_BLOG_CHANGED,{action:"updated",blog:t.data}),ea.publish(nsCons.EVENT_BLOG_HISTORY_CHANGED,{}),toastr.success("博文历史记录还原成功!"),e.emModal.hide()):toastr.error(t.data,"博文历史记录还原失败!")})},e}())||i}),define("resources/elements/em-blog-history",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.EmBlogHistory=void 0;var i;e.EmBlogHistory=(0,t.containerless)(i=function(){function e(){var t=this;n(this,e),this.isSuper=nsCtx.isSuper,this.loginUser=nsCtx.loginUser,this.subscribe=ea.subscribe(nsCons.EVENT_BLOG_HISTORY_CHANGED,function(e){t.refreshHistory()})}return e.prototype.unbind=function(){this.subscribe.dispose()},e.prototype.viewHistoryHandler=function(e,t,n){this.blogHistoryViewVm.show(e,t,n)},e.prototype.refreshHistory=function(){var e=this;$.get("/admin/blog/history/list",{id:this.blog.id},function(t){t.success?(e.oldHistories=t.data,e.histories=_.reverse(_.clone(t.data))):toastr.error(t.data,"获取博文历史失败!")})},e.prototype.showHandler=function(){this.refreshHistory()},e.prototype.approveHandler=function(){},e.prototype.show=function(e){this.blog=e,this.emModal.show({hideOnApprove:!0,autoDimmer:!1})},e.prototype.restoreHandler=function(e){var t=this;this.ajax1=$.post("/admin/blog/history/restore",{hid:e.id},function(e,n,i){e.success?(ea.publish(nsCons.EVENT_BLOG_CHANGED,{action:"updated",blog:e.data}),t.refreshHistory(),toastr.success("博文历史记录还原成功!")):toastr.error(e.data,"博文历史记录还原失败!")})},e.prototype.removeHandler=function(e){var t=this;this.ajax2=$.post("/admin/blog/history/remove",{hid:e.id},function(e,n,i){e.success?(t.refreshHistory(),toastr.success("博文历史记录删除成功!")):toastr.error(e.data,"博文历史记录删除失败!")})},e.prototype.diffHandler=function(){var e=[].concat(this.oldHistories,[this.blog]),t=_.filter(e,"checked");if(t&&t.length>1){var n=t[t.length-1],i=t[t.length-2],r=_.indexOf(e,n),a=_.indexOf(e,i);this.blogHistoryDiffVm.show(n,i,r,a)}else toastr.error("请先选择要比较版本")},e}())||i}),define("resources/elements/em-blog-left-sidebar",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.EmBlogLeftSidebar=void 0;var i;e.EmBlogLeftSidebar=(0,t.containerless)(i=function(){function e(){var t=this;n(this,e),this.isHide=!0,this.blogs=[],this.spaces=[],this.noSpaceBlogs=[],this.loginUser=nsCtx.loginUser,this.isSuper=nsCtx.isSuper,this.filter="",this.spaceStow={name:"我的收藏",open:!1},this.subscribe=ea.subscribe(nsCons.EVENT_BLOG_CHANGED,function(e){"created"==e.action?(t.blogs=[e.blog].concat(t.blogs),t.calcTree(),ea.publish(nsCons.EVENT_APP_ROUTER_NAVIGATE,{to:"#/blog/"+e.blog.id})):"updated"==e.action?(_.extend(_.find(t.blogs,{id:e.blog.id}),e.blog),t.calcTree()):"deleted"==e.action&&(t.blogStows=_.reject(t.blogStows,function(t){return t.blog.id==e.blog.id}),t.blogs=_.reject(t.blogs,{id:e.blog.id}),t.calcTree())}),this.subscribe4=ea.subscribe(nsCons.EVENT_SPACE_CHANGED,function(e){"created"==e.action?(t.spaces=[e.space].concat(t.spaces),t.calcTree()):"updated"==e.action&&(_.extend(_.find(t.spaces,{id:e.space.id}),e.space),t.calcTree())}),this.subscribe2=ea.subscribe(nsCons.EVENT_BLOG_SWITCH,function(e){t.blog=_.find(t.blogs,{id:+nsCtx.blogId})}),this.subscribe3=ea.subscribe(nsCons.EVENT_BLOG_TOGGLE_SIDEBAR,function(e){t.isHide=e}),this.subscribe5=ea.subscribe(nsCons.EVENT_BLOG_STOW_CHANGED,function(e){t._refreshBlogStows()}),this._doFilerDebounce=_.debounce(function(){return t._doFiler()},120,{leading:!0})}return e.prototype.unbind=function(){this.subscribe.dispose(),this.subscribe2.dispose(),this.subscribe3.dispose(),this.subscribe4.dispose(),this.subscribe5.dispose()},e.prototype.attached=function(){this.refresh(),this._refreshSysLinks(),this._refreshBlogStows()},e.prototype._refreshSysLinks=function(){var e=this;$.get("/admin/link/listByApp",function(t){t.success?e.sysLinks=t.data:e.sysLinks=[]})},e.prototype._refreshBlogStows=function(){var e=this;$.get("/admin/blog/stow/listMy",function(t){t.success?e.blogStows=t.data:toastr.error(t.data)})},e.prototype.refresh=function(){var e=this;$.when(this.getSpaces(),this.getBlogTree()).done(function(){e.calcTree()})},e.prototype.calcTree=function(){var e=this;this.noSpaceBlogs=[],$.each(this.spaces,function(t,n){n.blogs=[],$.each(e.blogs,function(e,t){t.space&&t.space.id===n.id&&(n.blogs.push(t),nsCtx.blogId==t.id&&(n.open=!0))})}),this.noSpaceBlogs=_.filter(this.blogs,function(e){return!e.space})},e.prototype.spaceToggleHandler=function(e){e.open=!e.open},e.prototype.getBlogTree=function(){var e=this;return $.get("/admin/blog/listMy",function(t){t.success&&(e.blogs=t.data,e.blog=_.find(e.blogs,{id:+nsCtx.blogId}))})},e.prototype.getSpaces=function(){var e=this;return $.get("/admin/space/listMy",{},function(t){t.success&&(e.spaces=t.data)})},e.prototype.editSpaceHandler=function(e){this.spaceEditVm.show(e)},e.prototype.delSpaceHandler=function(e){var t=this;this.confirmMd.show({onapprove:function(){$.post("/admin/space/delete",{id:e.id},function(n){n.success?(toastr.success("删除空间成功!"),t.spaces=_.reject(t.spaces,{id:e.id})):toastr.error(n.data,"删除空间失败!")})}})},e.prototype.authSpaceHandler=function(e){this.blogSpaceAuthVm.show("space",e)},e.prototype.clearFilterHandler=function(){this.filter="",this._doFilerDebounce()},e.prototype.filterKeyupHandler=function(e){this._doFilerDebounce()},e.prototype._doFiler=function(){var e=this;_.each(this.blogs,function(t){_.includes(_.toLower(t.title),_.toLower(e.filter))?t._hidden=!1:t._hidden=!0}),_.each(this.spaces,function(e){_.some(e.blogs,function(e){return!e._hidden})?(e._hidden=!1,e.open=!0):e._hidden=!0}),_.each(this.blogStows,function(t){_.includes(_.toLower(t.blog.title),_.toLower(e.filter))?t._hidden=!1:t._hidden=!0}),_.some(this.blogStows,function(e){return!e._hidden})?this.spaceStow.open=!0:this.spaceStow.open=!1,this.filter||(_.each(this.spaces,function(e){_.find(e.blogs,{id:+nsCtx.blogId})?e.open=!0:e.open=!1}),this.spaceStow.open=!1)},e}())||i}),define("resources/elements/em-blog-right-sidebar",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.EmBlogRightSidebar=void 0;var i;e.EmBlogRightSidebar=(0,t.containerless)(i=function(){function e(){var t=this;n(this,e),this.subscribe=ea.subscribe(nsCons.EVENT_BLOG_RIGHT_SIDEBAR_TOGGLE,function(e){"dir"==e.action&&$(t.dirRef).empty().append(e.dir)})}return e.prototype.unbind=function(){this.subscribe.dispose()},e}())||i}),define("resources/elements/em-blog-save",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmBlogSave=void 0;var a,o,s;e.EmBlogSave=(0,t.containerless)((o=function(){function e(){var t=this;i(this,e),n(this,"trigger",s,this),this.loginUser=nsCtx.loginUser,this.isSuper=nsCtx.isSuper,this.subscribe=ea.subscribe(nsCons.EVENT_BLOG_SAVE,function(e){t.blogInfo=e,t.show()})}return e.prototype.triggerChanged=function(){var e=this;$(this.trigger).click(function(t){e.show()})},e.prototype.attached=function(){$(this.chk).checkbox()},e.prototype.unbind=function(){this.subscribe.dispose()},e.prototype.show=function(){this.emModal.show({hideOnApprove:!1,autoDimmer:!0})},e.prototype.showHandler=function(){var e=this;$(this.chk).checkbox("set unchecked"),$.get("/admin/space/listMy",function(t){t.success&&(e.spaces=t.data)})},e.prototype.approveHandler=function(e){var t=this,n=utils.md2html(this.blogInfo.content),i=[nsCtx.memberAll].concat(window.tmsUsers?tmsUsers:[]),r=$(this.spacesRef).dropdown("get value");localStorage&&localStorage.setItem(nsCons.KEY_BLOG_COMMON_SPACE,r),$.post("/admin/blog/create",{url:utils.getBasePath(),usernames:utils.parseUsernames(this.blogInfo.content,i).join(","),title:this.blogInfo.title,content:this.blogInfo.content,spaceId:r,privated:$(this.chk).checkbox("is checked"),contentHtml:n},function(n,i,r){n.success?(t.blog=n.data,toastr.success("博文保存成功!"),ea.publish(nsCons.EVENT_BLOG_CHANGED,{action:"created",blog:t.blog}),e.hide(),$('a[href="#modaal-blog-write"]').modaal("close")):toastr.error(n.data,"博文保存失败!")})},e.prototype.initSpacesHandler=function(e){var t=this;e&&_.defer(function(){if($(t.spacesRef).dropdown("clear"),localStorage){var e=localStorage.getItem(nsCons.KEY_BLOG_COMMON_SPACE);e&&$(t.spacesRef).dropdown("set selected",e)}})},e}(),s=r(o.prototype,"trigger",[t.bindable],{enumerable:!0, -initializer:null}),a=o))||a}),define("resources/elements/em-blog-share",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmBlogShare=void 0;var a,o,s;e.EmBlogShare=(0,t.containerless)((o=function(){function e(){i(this,e),this.shares=[],this.desc="",n(this,"blog",s,this),this.basePath=utils.getBasePath()}return e.prototype.attached=function(){var e=this;$(this.searchRef).search({minCharacters:2,cache:!1,selectFirstResult:!0,showNoResults:!1,onSelect:function(t,n){t.item._id=_.uniqueId("share-item-"),t.item._type=t.item.username?"user":"channel",e.shares.push(t.item),_.defer(function(){$(e.inputSearchRef).val("")})},apiSettings:{onResponse:function(t){var n={results:[]};return $.each(t.data.users,function(t,i){_.find(_.filter(e.shares,function(e){return"user"==e._type}),{username:i.username})||n.results.push({item:i,title:' '+i.name+" ("+i.username+")"})}),$.each(t.data.channels,function(t,i){_.find(_.filter(e.shares,function(e){return"channel"==e._type}),{name:i.name})||n.results.push({item:i,title:' '+i.title+" ("+i.name+")"})}),n},url:"/admin/blog/share/to/search?search={query}"}}),$(this.shareRef).popup({on:"click",inline:!0,silent:!0,position:"bottom right",jitter:300,delay:{show:300,hide:300},onVisible:function(){$(e.inputSearchRef).focus()}})},e.prototype.shareSearchKeyupHandler=function(e){if(13===e.keyCode&&!$(this.searchRef).search("is visible")){var t=$(this.inputSearchRef).val();utils.isMail(t)&&(_.find(_.filter(this.shares,function(e){return"mail"==e._type}),{mail:t})||(this.shares.push({_id:_.uniqueId("share-item-"),_type:"mail",mail:t}),$(this.inputSearchRef).val("")))}},e.prototype.show=function(){$(this.shareRef).popup("show")},e.prototype.removeShareHandler=function(e){this.shares=_.reject(this.shares,{_id:e._id})},e.prototype.cancelHandler=function(){this._reset()},e.prototype._reset=function(){this.shares=[],this.desc="",$(this.inputSearchRef).val(""),$(this.shareRef).popup("hide")},e.prototype.shareHandler=function(){var e=this;return 0===this.shares.length?void toastr.error("请先指定博文分享用户或者频道或者邮箱!"):void(this.ajaxS=$.post("/admin/blog/share",{basePath:utils.getBasePath(),id:this.blog.id,desc:this.desc,title:this.blog.title,html:utils.md2html(this.blog.content),users:_.chain(this.shares).filter(function(e){return"user"==e._type}).map("username").join().value(),channels:_.chain(this.shares).filter(function(e){return"channel"==e._type}).map("name").join().value(),mails:_.chain(this.shares).filter(function(e){return"mail"==e._type}).map("mail").join().value()},function(t,n,i){t.success?(e._reset(),toastr.success("博文分享成功!")):toastr.error(t.data,"博文分享失败!")}))},e}(),s=r(o.prototype,"blog",[t.bindable],{enumerable:!0,initializer:null}),a=o))||a}),define("resources/elements/em-blog-space-auth",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.EmBlogSpaceAuth=void 0;var i;e.EmBlogSpaceAuth=(0,t.containerless)(i=function(){function e(){n(this,e),this.shares=[]}return e.prototype._isBlog=function(){return"blog"==this.type},e.prototype.attached=function(){var e=this;$(this.chk).checkbox({onChange:function(){e._isBlog()?$.post("/admin/blog/privated/update",{id:e.authO.id,privated:$(e.chk).checkbox("is checked")},function(t,n,i){t.success?(_.extend(e.authO,t.data),ea.publish(nsCons.EVENT_BLOG_CHANGED,{action:"updated",blog:t.data}),toastr.success("更新博文可见性成功!")):toastr.error(t.data,"更新博文可见性失败!")}):$.post("/admin/space/update",{id:e.authO.id,privated:$(e.chk).checkbox("is checked")},function(t,n,i){t.success?(_.extend(e.authO,t.data),ea.publish(nsCons.EVENT_SPACE_CHANGED,{action:"updated",space:t.data}),toastr.success("更新空间可见性成功!")):toastr.error(t.data,"更新空间可见性失败!")})}}),$(this.searchRef).search({minCharacters:2,cache:!1,selectFirstResult:!0,onSelect:function(t,n){t.item._id=_.uniqueId("share-item-"),_.defer(function(){$(e.inputSearchRef).val("")});var i={id:e.authO.id};t.item.username?_.extend(i,{users:t.item.username}):_.extend(i,{channels:t.item.id}),e._isBlog()?$.post("/admin/blog/auth/add",i,function(n,i,r){n.success?(e.shares.push(t.item),e.authO.blogAuthorities=n.data.blogAuthorities):toastr.error(n.data)}):$.post("/admin/space/auth/add",i,function(n,i,r){n.success?(e.shares.push(t.item),e.authO.spaceAuthorities=n.data.spaceAuthorities):toastr.error(n.data)})},apiSettings:{onResponse:function(t){var n={results:[]};return $.each(t.data.users,function(t,i){_.find(e.shares,{username:i.username})||n.results.push({item:i,title:' '+i.name+" ("+i.username+")"})}),$.each(t.data.channels,function(t,i){_.find(_.filter(e.shares,function(e){return!e.username}),{name:i.name})||n.results.push({item:i,title:' '+i.title+" ("+i.name+")"})}),n},url:"/admin/blog/share/to/search?search={query}"}})},e.prototype.removeShareHandler=function(e){var t=this,n={id:this.authO.id};e.username?_.extend(n,{users:e.username}):_.extend(n,{channels:e.id}),this._isBlog()?$.post("/admin/blog/auth/remove",n,function(n,i,r){n.success?(t.shares=_.reject(t.shares,{_id:e._id}),t.authO.blogAuthorities=n.data.blogAuthorities):toastr.error(n.data)}):$.post("/admin/space/auth/remove",n,function(n,i,r){n.success?(t.shares=_.reject(t.shares,{_id:e._id}),t.authO.spaceAuthorities=n.data.spaceAuthorities):toastr.error(n.data)})},e.prototype._reset=function(){this.shares=[],$(this.inputSearchRef).val("")},e.prototype.show=function(e,t){this.type=e,this.authO=t,this.emModal.show({hideOnApprove:!0,autoDimmer:!1})},e.prototype.showHandler=function(){var e=this;this._reset(),$(this.chk).checkbox(this.authO.privated?"set checked":"set unchecked");var t=void 0;t=this._isBlog()?this.authO.blogAuthorities:this.authO.spaceAuthorities,_.forEach(t,function(t){var n=t.user?t.user:t.channel;n._id=_.uniqueId("share-item-"),e.shares.push(n)})},e.prototype.approveHandler=function(){},e}())||i}),define("resources/elements/em-blog-space-create",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.EmBlogSpaceCreate=void 0;var i;e.EmBlogSpaceCreate=(0,t.containerless)(i=function(){function e(){n(this,e)}return e.prototype.attached=function(){$(this.chk).checkbox()},e.prototype.createHandler=function(){var e=this;this.ajax=$.post("/admin/space/create",{name:this.name,desc:this.desc,privated:$(this.chk).checkbox("is checked")},function(t,n,i){t.success?(e.name="",e.desc="",$(e.chk).checkbox("set unchecked"),toastr.success("空间创建成功!"),$(e.ppRef).popup("hide"),ea.publish(nsCons.EVENT_SPACE_CHANGED,{action:"created",space:t.data})):toastr.error(t.data,"空间创建失败!")})},e}())||i}),define("resources/elements/em-blog-space-edit",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.EmBlogSpaceEdit=void 0;var i;e.EmBlogSpaceEdit=(0,t.containerless)(i=function(){function e(){n(this,e)}return e.prototype.attached=function(){$(this.chk).checkbox()},e.prototype.show=function(e){this.space=e,this.emModal.show({hideOnApprove:!1,autoDimmer:!0})},e.prototype.showHandler=function(){var e=this;$.get("/admin/space/get",{id:this.space.id},function(t){t.success&&(e.space=t.data,$(e.chk).checkbox(e.space.privated?"set checked":"set unchecked"))})},e.prototype.approveHandler=function(e){$.post("/admin/space/update",{id:this.space.id,name:this.space.name,desc:this.space.description,privated:$(this.chk).checkbox("is checked")},function(t,n,i){t.success?(toastr.success("空间更新成功!"),ea.publish(nsCons.EVENT_SPACE_CHANGED,{action:"updated",space:t.data}),e.hide()):toastr.error(t.data,"空间更新失败!")})},e}())||i}),define("resources/elements/em-blog-space-update",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.EmBlogSpaceUpdate=void 0;var i;e.EmBlogSpaceUpdate=(0,t.containerless)(i=function(){function e(){n(this,e),this.loginUser=nsCtx.loginUser,this.isSuper=nsCtx.isSuper}return e.prototype.attached=function(){},e.prototype.show=function(e){this.blog=e,this.emModal.show({hideOnApprove:!1,autoDimmer:!0})},e.prototype.showHandler=function(){var e=this;$.get("/admin/space/listMy",function(t){t.success&&(e.spaces=t.data)})},e.prototype.approveHandler=function(e){var t=$(this.spacesRef).dropdown("get value");$.post("/admin/blog/space/update",{id:this.blog.id,sid:t?t:null},function(t,n,i){t.success?(toastr.success("博文空间更新成功!"),t.data.space||(t.data.space=null),ea.publish(nsCons.EVENT_BLOG_CHANGED,{action:"updated",blog:t.data}),e.hide()):toastr.error(t.data,"博文空间更新失败!")})},e.prototype.initSpacesHandler=function(e){var t=this;e&&_.defer(function(){$(t.spacesRef).dropdown("clear").dropdown("set selected",t.blog.space?t.blog.space.id+"":"")})},e}())||i}),define("resources/elements/em-blog-top-menu",["exports","aurelia-framework","timeago"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.EmBlogTopMenu=void 0;var i,r=timeago();e.EmBlogTopMenu=(0,t.containerless)(i=function(){function e(){var t=this;n(this,e),this.isHide=!0,this.loginUser=nsCtx.loginUser,this.subscribe=ea.subscribe(nsCons.EVENT_BLOG_SWITCH,function(e){t.toggleHandler(!0)}),this.subscribe=ea.subscribe(nsCons.EVENT_BLOG_LEFT_SIDEBAR_TOGGLE,function(e){t.toggleHandler(e.isHide)})}return e.prototype.unbind=function(){this.subscribe.dispose()},e.prototype.attached=function(){var e=this;$(this.logoRef).on("mouseenter",function(t){$(e.logoRef).animateCss("flip")}),$(this.searchRef).search({type:"category",minCharacters:2,onSelect:function(t,n){return $(e.searchRef).search("hide results"),_.defer(function(){return $(e.searchRef).find("input").blur()}),!1},apiSettings:{onResponse:function(e){var t={results:{blogs:{name:"博文 ("+e.data.blogs.length+")",results:[]},comments:{name:"评论 ("+e.data.comments.length+")",results:[]}}};return $.each(e.data.blogs,function(e,n){t.results.blogs.results.push({title:n.title,description:''+n.creator.name+" 创建于 "+r.format(n.createDate,"zh_CN"),url:"#/blog/"+n.id})}),$.each(e.data.comments,function(e,n){t.results.comments.results.push({title:"#/blog/"+n.targetId+"?cid="+n.id,description:''+n.creator.name+" 创建于 "+r.format(n.createDate,"zh_CN")+"
    "+utils.encodeHtml(n.content),url:"#/blog/"+n.targetId+"?cid="+n.id})}),t},url:"/admin/blog/search?search={query}&comment=true&ellipsis=60"}}),this._refreshSysLinks(),"create"==nsCtx.blogId&&_.defer(function(){$('a[href="#modaal-blog-write"]').click()})},e.prototype._refreshSysLinks=function(){var e=this;$.get("/admin/link/listByApp",function(t){t.success?e.sysLinks=t.data:e.sysLinks=[]})},e.prototype.searchBlurHandler=function(){this.isSearchFocus=!1},e.prototype.searchFocusHandler=function(){this.isSearchFocus=!0},e.prototype.toggleHandler=function(e){this.isHide!==e&&(this.isHide=e?e:!this.isHide,ea.publish(nsCons.EVENT_BLOG_TOGGLE_SIDEBAR,this.isHide))},e.prototype.userEditHandler=function(){this.userEditMd.show()},e.prototype.logoutHandler=function(){$.post("/admin/logout").always(function(){utils.redirect2Login()})},e.prototype.searchKeyupHandler=function(e){27==e.keyCode&&$(this.searchRef).search("set value","")},e}())||i}),define("resources/elements/em-blog-write",["exports","aurelia-framework","simplemde","dropzone","common/common-emoji"],function(e,t,n,i,r){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmBlogWrite=void 0;var c,d,u,m,p,g=a(n),h=(a(i),a(r));e.EmBlogWrite=(0,t.containerless)((p=m=function(){function e(){var t=this;s(this,e),o(this,"members",u,this),this.subscribe=ea.subscribe(nsCons.EVENT_MODAAL_AFTER_OPEN,function(n){n.id==e.NAME&&(nsCtx.isModaalOpening=!0,t.init())}),this.subscribe2=ea.subscribe(nsCons.EVENT_MODAAL_BEFORE_CLOSE,function(n){n.id==e.NAME&&(t.destroy(),nsCtx.isModaalOpening=!1)}),this.subscribe3=ea.subscribe(nsCons.EVENT_BLOG_ACTION,function(e){t.action=e.action,$.get("/admin/blog/get",{id:e.id},function(e){e.success&&(t.blog=e.data,$('a[href="#modaal-blog-write"]').click())})}),this.subscribe4=ea.subscribe(nsCons.EVENT_BLOG_CHANGED,function(e){t.action=e.action,"created"===e.action&&(t.blog=e.blog,$("#blog-save-btn span").text("更新"),$("#blog-save-btn").attr("title","ctrl+click更新后关闭窗口"))}),this.blogTitleInputKeyupInit=_.once(function(){$("#blog-title-input").keyup(function(e){var n=$(e.currentTarget);e.shiftKey||13!=e.keyCode?e.shiftKey&&13==e.keyCode?t.simplemde.codemirror.focus():27==e.keyCode&&n.val(""):t.simplemde.value()?t.save(e,!0):t.simplemde.codemirror.focus()})})}return e.prototype.unbind=function(){this.subscribe.dispose(),this.subscribe2.dispose(),this.subscribe3.dispose(),this.subscribe4.dispose()},e.prototype._reset=function(){this.action=null,this.blog=null,$("#blog-save-btn span").text("保存"),$("#blog-save-btn").attr("title","ctrl+click快速保存"),$("#blog-title-input").val(""),this.simplemde.value(""),this.simplemde.toTextArea(),this.simplemde=null},e.prototype._editInit=function(){$("#blog-title-input").val(this.blog.title),this.simplemde.value(this.blog.content),$("#blog-save-btn span").text("更新"),$("#blog-save-btn").attr("title","ctrl+click更新后关闭窗口")},e.prototype._writeInit=function(){var e=this,t=utils.urlQuery("ccid"),n=utils.urlQuery("cdid"),i=null,r=null;t?(i="/admin/chat/channel/get",r=t):n&&(i="/admin/chat/direct/get",r=n),i&&$.get(i,{id:+r},function(t){if(t.success){e.simplemde.value(t.data.content);var n=$("#blog-title-input").val();if(!n){var i=/#{1,6}[\s]+(.+)\n?/g.exec(t.data.content);i&&i.length>1&&$("#blog-title-input").val(i[1])}}else toastr.error(t.data,"获取沟通消息失败!")})},e.prototype._copyInit=function(){$("#blog-title-input").val(this.blog.title+" (副本)"),this.simplemde.value(this.blog.content),this.blog=null},e.prototype.init=function(){var e=this;this.simplemde=new g.default({element:$("#txt-blog-write")[0],spellChecker:!1,toolbar:[{name:"bold",action:g.default.toggleBold,className:"fa fa-bold",title:"粗体"},{name:"italic",action:g.default.toggleItalic,className:"fa fa-italic",title:"斜体"},{name:"strikethrough",action:g.default.toggleStrikethrough,className:"fa fa-strikethrough",title:"删除线"},{name:"heading",action:g.default.toggleHeadingSmaller,className:"fa fa-header",title:"标题"},{name:"heading-smaller",action:g.default.toggleHeadingSmaller,className:"fa fa-header fa-header-x fa-header-smaller",title:"变小标题"},{name:"heading-bigger",action:g.default.toggleHeadingBigger,className:"fa fa-header fa-header-x fa-header-bigger",title:"变大标题"},"|",{name:"code",action:g.default.toggleCodeBlock,className:"fa fa-code",title:"代码"},{name:"quote",action:g.default.toggleBlockquote,className:"fa fa-quote-left",title:"引用"},{name:"unordered-list",action:g.default.toggleUnorderedList,className:"fa fa-list-ul",title:"无序列表"},{name:"ordered-list",action:g.default.toggleOrderedList,className:"fa fa-list-ol",title:"有序列表"},{name:"tasks",action:function(t){e.insertContent("- [ ] 未完成任务\n- [x] 已完成任务")},className:"fa fa-check-square-o ",title:"任务列表"},{name:"details",action:function(t){e.insertContent("
    \n标题\n

    详情内容

    \n
    ")},className:"fa fa-play ",title:"折叠详情"},"|",{name:"link",action:g.default.drawLink,className:"fa fa-link",title:"创建链接"},{name:"image",action:g.default.drawImage,className:"fa fa-picture-o",title:"插入图片"},{name:"table",action:g.default.drawTable,className:"fa fa-table",title:"插入表格"},{name:"horizontal-rule",action:g.default.drawHorizontalRule,className:"fa fa-minus",title:"插入水平分割线"},"|",{name:"upload",action:function(e){},className:"fa fa-upload",title:"上传文件"},"|",{name:"preview",action:g.default.togglePreview,className:"fa fa-eye no-disable",title:"切换预览"},{name:"side-by-side",action:g.default.toggleSideBySide,className:"fa fa-columns no-disable no-mobile",title:"实时预览"},{name:"fullscreen",action:g.default.toggleFullScreen,className:"fa fa-arrows-alt no-disable no-mobile",title:"全屏"},{name:"guide",action:"https://simplemde.com/markdown-guide",className:"fa fa-question-circle",title:"Markdown指南"}],insertTexts:{table:["","\n\n| 列1 | 列2 | 列3 |\n| ------ | ------ | ------ |\n| 文本 | 文本 | 文本 |\n\n"]},previewRender:function(e,t){return emojify&&(e=emojify.replace(e)),marked(utils.preParse(e))}}),this.simplemde.codemirror.on("keyup",function(t,n){if(n.ctrlKey&&13==n.keyCode)e.save(n,!0);else if(27==n.keyCode)e.simplemde.value("");else if(13==n.keyCode){var i=$("#blog-title-input").val();if(!i){var r=/#{1,6}[\s]+(.+)\n?/g.exec(e.simplemde.value());r&&r.length>1&&$("#blog-title-input").val(r[1])}}}),this.$chatMsgInputRef=$("#txt-blog-write-wrapper").find(".CodeMirror textarea"),0===this.$chatMsgInputRef.size()&&(this.$chatMsgInputRef=$("#txt-blog-write-wrapper").find('.CodeMirror [contenteditable="true"]')),"edit"==this.action?this._editInit():"copy"==this.action?this._copyInit():this._writeInit(),$("#blog-title-input").focus(),this.initPaste(),this.initTextcomplete(),this.initUploadDropzone($(".CodeMirror-wrap","#txt-blog-write-wrapper"),function(){return e.$chatMsgInputRef},!1),this.initUploadDropzone($(".editor-toolbar .fa.fa-upload","#txt-blog-write-wrapper"),function(){return e.$chatMsgInputRef},!0),this.blogTitleInputKeyupInit()},e.prototype.close=function(){$('a[href="#modaal-blog-write"]').modaal("close")},e.prototype.initTextcomplete=function(){var e=this;$(this.$chatMsgInputRef).textcomplete([{match:/(^|\s)@(\w*)$/,search:function(e,t){t($.map(nsCtx.users,function(t){return t.enabled&&t.username.indexOf(e)>=0?t.username:null}))},template:function(e,t){var n=_.find(nsCtx.users,{username:e});return n.name+" - "+n.mails+" ("+n.username+")"},replace:function(e){return"$1{~"+e+"}"}},{match:/(^|\s):([\+\-\w]*)$/,search:function(e,t){t($.map(h.default,function(t){return _.some(t.split("_"),function(t){return 0===t.indexOf(e)})?t:null}))},template:function(e,t){if("search"==e)return"表情查找 - :search";var n=":"+e+":";return emojify.replace(n)+" - "+n},replace:function(t){return e.tipsActionHandler(t)?"$1:"+t+": ":""}}],{appendTo:".tms-blog-write-status-bar",maxCount:5}),this.simplemde.codemirror.on("keydown",function(t,n){_.includes([13,38,40],n.keyCode)&&e.isTipsShow()&&n.preventDefault()})},e.prototype.isTipsShow=function(){return 1===$(".tms-blog-write-status-bar").find(".textcomplete-dropdown:visible").size()},e.prototype.tipsActionHandler=function(e){return"search"!=e||(_.delay(function(){utils.openNewWin(nsCons.STR_EMOJI_SEARCH_URL)},200),!1)},e.prototype.initPaste=function(){var e=this,t=void 0;t=this.$chatMsgInputRef.is("textarea")?$(this.$chatMsgInputRef).pastableTextarea():$(this.$chatMsgInputRef).pastableContenteditable(),t&&t.on("pasteImage",function(t,n){$.post("/admin/file/base64",{dataURL:n.dataURL,type:n.blob.type,toType:"Blog"},function(t,n,i){t.success&&e.insertContent("![{name}]({baseURL}{path}{uuidName})".replace(/\{name\}/g,t.data.name).replace(/\{baseURL\}/g,utils.getBaseUrl()+"/").replace(/\{path\}/g,t.data.path).replace(/\{uuidName\}/g,t.data.uuidName))})}).on("pasteImageError",function(e,t){toastr.error(t.message,"剪贴板粘贴图片错误!")})},e.prototype.initUploadDropzone=function(e,t,n){var i=this;$(e).dropzone({url:"/admin/file/upload",paramName:"file",clickable:!!n,dictDefaultMessage:"",maxFilesize:10,addRemoveLinks:!0,previewsContainer:".em-blog-write .dropzone-previews",previewTemplate:$(".em-blog-write .preview-template")[0].innerHTML,dictCancelUpload:"取消上传",dictCancelUploadConfirmation:"确定要取消上传吗?",dictFileTooBig:"文件过大({{filesize}}M),最大限制:{{maxFilesize}}M",init:function(){this.on("sending",function(e,n,i){t()?i.append("toType","Blog"):this.removeAllFiles(!0)}),this.on("success",function(e,t){t.success?($.each(t.data,function(e,t){"Image"==t.type?i.insertContent("![{name}]({baseURL}{path}{uuidName}) ".replace(/\{name\}/g,t.name).replace(/\{baseURL\}/g,utils.getBaseUrl()+"/").replace(/\{path\}/g,t.path).replace(/\{uuidName\}/g,t.uuidName)):i.insertContent("[{name}]({baseURL}{path}{uuidName}) ".replace(/\{name\}/g,t.name).replace(/\{baseURL\}/g,utils.getBaseUrl()+"/").replace(/\{path\}/g,"admin/file/download/").replace(/\{uuidName\}/g,t.id))}),toastr.success("上传成功!")):toastr.error(t.data,"上传失败!")}),this.on("error",function(e,t,n){toastr.error(t,"上传失败!")}),this.on("complete",function(e){this.removeFile(e)})}})},e.prototype.insertContent=function(e,t){try{var n=t?t.codemirror:this.simplemde.codemirror,i=n.getCursor();i&&(n.replaceRange(e,i,i),n.focus())}catch(e){console.log(e)}},e.prototype.destroy=function(){this._reset()},e.prototype.attached=function(){var e=this;$("#blog-save-btn").click(function(t){e.save(t)})},e.prototype.save=function(e,t){var n=this,i=$("#blog-title-input").val(),r=this.simplemde.value();if(!$.trim(i))return $("#blog-title-input").val(""),void toastr.error("标题不能为空!");if(!$.trim(r))return this.simplemde.value(""),void toastr.error("内容不能为空!");if(this.blog){if(this.sending)return;this.sending=!0,$("#blog-save-btn i").show();var a=(utils.md2html(r),[nsCtx.memberAll].concat(window.tmsUsers?tmsUsers:[]));$.post("/admin/blog/update",{url:utils.getBasePath(),id:this.blog.id,version:this.blog.version,usernames:utils.parseUsernames(r,a).join(","),title:i,content:r,diff:utils.diffS(this.blog.content,r)},function(i,r,a){i.success?(n.blog=i.data,toastr.success("博文更新成功!"),ea.publish(nsCons.EVENT_BLOG_CHANGED,{action:"updated",blog:n.blog}),t?e&&e.ctrlKey&&e.shiftKey&&n.close():e&&e.ctrlKey&&n.close()):toastr.error(i.data,"博文更新失败!")}).always(function(){n.sending=!1,$("#blog-save-btn i").hide()})}else e.ctrlKey?$.post("/admin/blog/create",{url:utils.getBasePath(),usernames:utils.parseUsernames(r,[nsCtx.memberAll].concat(window.tmsUsers?tmsUsers:[])).join(","),title:i,content:r,spaceId:"",privated:!1,contentHtml:utils.md2html(r)},function(e,t,i){e.success?(n.blog=e.data,toastr.success("博文保存成功!"),ea.publish(nsCons.EVENT_BLOG_CHANGED,{action:"created",blog:n.blog}),$('a[href="#modaal-blog-write"]').modaal("close")):toastr.error(e.data,"博文保存失败!")}):ea.publish(nsCons.EVENT_BLOG_SAVE,{title:i,content:r})},e}(),m.NAME="blog-create",d=p,u=l(d.prototype,"members",[t.bindable],{enumerable:!0,initializer:null}),c=d))||c}),define("resources/elements/em-chat-attach",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.EmChatAttach=void 0;var i;e.EmChatAttach=(0,t.containerless)(i=function(){function e(){n(this,e),this.type="Image",this.search=""}return e.prototype.attached=function(){$(this.tabRef).find(".item").tab({onVisible:function(e){}})},e.prototype.moreHandler=function(){this._listByPage(!0)},e.prototype._listByPage=function(){var e=this,t=!(arguments.length<=0||void 0===arguments[0])&&arguments[0],n=nsCtx.isAt?"/admin/file/listByUser":"/admin/file/listByChannel";this.ajax=$.get(n,{name:nsCtx.chatTo,type:this.type,page:this.page?t?this.page.number+1:this.page.number:0,size:10,search:this.search},function(n){e.page=n.data,e.moreCnt=e.page.last?0:e.page.totalElements-(e.page.number+1)*e.page.size,t?e.attachs=_.concat(e.attachs,n.data.content):e.attachs=n.data.content})},e.prototype.fetch=function(){this.page=null,this.moreCnt=0,this.attachs=null,$(window).width()>991&&$(this.searchRef).focus(),this._listByPage()},e.prototype.tabClickHandler=function(e){this.type=e,this.fetch()},e.prototype.searchHandler=function(){this.fetch()},e.prototype.keyupHandler=function(e){return 13==e.keyCode?this.fetch():27==e.keyCode&&(this.search="",this.fetch()),!0},e}())||i}),define("resources/elements/em-chat-channel-create",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmChatChannelCreate=void 0;var a,o,s,l,c;e.EmChatChannelCreate=(0,t.containerless)((o=function(){function e(){i(this,e),n(this,"loginUser",s,this),n(this,"trigger",l,this),n(this,"name",c,this),this.activeTab="channel-create",this.nameRegex=/^[a-z][a-z0-9_\-]{0,49}$/}return e.prototype.nameChanged=function(e,t){this.oldName=t,e&&!this.nameRegex.test(e)&&(this.name=this._getOldName())},e.prototype._getOldName=function(){return this.nameRegex.test(this.oldName)||(this.oldName=""),this.oldName},e.prototype.triggerChanged=function(e,t){var n=this;$(this.trigger).click(function(){n.emModal.show({hideOnApprove:!1,autoDimmer:!0})})},e.prototype.showHandler=function(){this._reset()},e.prototype._reset=function(){this.name="",this.title="",this.desc="",$(this.chk).checkbox("set checked"),this.channelJoinVm.refresh()},e.prototype.attached=function(){var e=this;$(this.chk).checkbox(),$(this.tabRef).find(".item").tab({onVisible:function(t){e.activeTab=t}})},e.prototype.approveHandler=function(e){$.post("/admin/channel/create",{name:this.name,title:this.title,desc:this.desc,privated:$(this.chk).checkbox("is checked")},function(t){t.success?(e.hide(),toastr.success("创建频道成功!"),ea.publish(nsCons.EVENT_CHAT_CHANNEL_CREATED,{channel:t.data})):(e.hideDimmer(),toastr.error(t.data,"创建频道失败!"))})},e}(),s=r(o.prototype,"loginUser",[t.bindable],{enumerable:!0,initializer:null}),l=r(o.prototype,"trigger",[t.bindable],{enumerable:!0,initializer:null}),c=r(o.prototype,"name",[t.bindable],{enumerable:!0,initializer:null}),a=o))||a}),define("resources/elements/em-chat-channel-edit",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmChatChannelEdit=void 0;var a,o,s;e.EmChatChannelEdit=(0,t.containerless)((o=function(){function e(){i(this,e),n(this,"channel",s,this)}return e.prototype.channelChanged=function(){if(this.channel){var e=this.channel.privated?"set checked":"set unchecked";$(this.chk).checkbox(e)}},e.prototype.show=function(){this.emModal.show({hideOnApprove:!1,autoDimmer:!0})},e.prototype.showHandler=function(){},e.prototype.attached=function(){$(this.chk).checkbox()},e.prototype.approveHandler=function(e){$.post("/admin/channel/update",{id:this.channel.id,title:this.channel.title,desc:this.channel.description,privated:$(this.chk).checkbox("is checked")},function(t){e.hide(),t.success?toastr.success("更新频道成功!"):toastr.error(t.data,"编辑频道失败!")})},e}(),s=r(o.prototype,"channel",[t.bindable],{enumerable:!0,initializer:null}),a=o))||a}),define("resources/elements/em-chat-channel-join",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmChatChannelJoin=void 0;var a,o,s;e.EmChatChannelJoin=(0,t.containerless)((o=function(){function e(){i(this,e),n(this,"loginUser",s,this)}return e.prototype._getChannels=function(){var e=this;$.get("/admin/channel/list",function(t){t.success?(e.channels=t.data,_.each(e.channels,function(t){t.joined=_.some(t.members,function(t){return t.username==e.loginUser.username})})):toastr.error(t.data,"获取频道列表失败!")})},e.prototype.refresh=function(){this._getChannels()},e.prototype.joinHandler=function(e){this.confirmMd.show({content:'确定要加入频道'+e.title+"吗?",onapprove:function(){$.post("/admin/channel/join",{id:e.id},function(t){t.success?(toastr.success("加入频道成功!"),e.joined=!0,ea.publish(nsCons.EVENT_CHAT_CHANNEL_JOINED,{channel:t.data})):toastr.error(t.data,"加入频道失败!")})}})},e.prototype.leaveHandler=function(e){this.confirmMd.show({content:'确定要离开频道'+e.title+"吗?",onapprove:function(){$.post("/admin/channel/leave",{id:e.id},function(t){t.success?(toastr.success("离开频道成功!"),e.joined=!1,ea.publish(nsCons.EVENT_CHAT_CHANNEL_LEAVED,{channel:t.data})):toastr.error(t.data,"离开频道失败!")})}})},e}(),s=r(o.prototype,"loginUser",[t.bindable],{enumerable:!0,initializer:null}),a=o))||a}),define("resources/elements/em-chat-channel-link-mgr",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0), -a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmChatChannelLinkMgr=void 0;var a,o,s,l;e.EmChatChannelLinkMgr=(0,t.containerless)((o=function(){function e(){i(this,e),n(this,"channel",s,this),n(this,"loginUser",l,this),this.links=[]}return e.prototype.channelChanged=function(e,t){var n=this;this.channel&&$.get("/admin/link/listBy",{channelId:this.channel.id},function(e){e.success?n.links=e.data:n.links=[]})},e.prototype.addHandler=function(){var e=this;$.post("/admin/link/create",{title:this.title,href:this.href,channelId:this.channel.id},function(t,n,i){t.success?(e.title="",e.href="",e.links.push(t.data),ea.publish(nsCons.EVENT_CHANNEL_LINKS_REFRESH,{})):toastr.error(t.data)})},e.prototype.delHandler=function(e){var t=this;$.post("/admin/link/delete",{id:e.id},function(n,i,r){n.success?(t.links=_.reject(t.links,{id:e.id}),ea.publish(nsCons.EVENT_CHANNEL_LINKS_REFRESH,{}),toastr.success("删除成功!")):toastr.error(n.data)})},e.prototype.editHandler=function(e){e.oldTitle=e.title,e.oldHref=e.href,e.isEditing=!0},e.prototype.updateHandler=function(e){$.post("/admin/link/update",{id:e.id,title:e.title,href:e.href},function(t,n,i){t.success?(e.isEditing=!1,ea.publish(nsCons.EVENT_CHANNEL_LINKS_REFRESH,{}),toastr.success("更新成功!")):toastr.error(t.data)})},e.prototype.showHandler=function(){this._reset()},e.prototype._reset=function(){},e.prototype.attached=function(){},e.prototype.show=function(){this.emModal.show({autoDimmer:!1})},e.prototype.approveHandler=function(e){},e}(),s=r(o.prototype,"channel",[t.bindable],{enumerable:!0,initializer:null}),l=r(o.prototype,"loginUser",[t.bindable],{enumerable:!0,initializer:null}),a=o))||a}),define("resources/elements/em-chat-channel-members-mgr",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmChatChannelMembersMgr=void 0;var a,o,s,l;e.EmChatChannelMembersMgr=(0,t.containerless)((o=function(){function e(){var t=this;i(this,e),n(this,"channel",s,this),n(this,"users",l,this),this.membersOpts={onAdd:function(e,n,i){t.emModal.showDimmer(),$.post("/admin/channel/addMember",{id:t.channel.id,members:e,baseUrl:utils.getBaseUrl(),path:wurl("path")},function(e,n,i){e.success?(toastr.success("添加成员成功!"),t.channel.members=e.data.members,ea.publish(nsCons.EVENT_CHAT_CHANNEL_MEMBER_ADD_OR_REMOVE,{type:"add",members:e.data.members})):toastr.error(e.data,"添加成员失败!")}).always(function(){t.emModal.hideDimmer()})},onLabelRemove:function(e){return t.channel.owner.username!=e&&(t.emModal.showDimmer(),void $.post("/admin/channel/removeMember",{id:t.channel.id,members:e,baseUrl:utils.getBaseUrl(),path:wurl("path")},function(e,n,i){e.success?(toastr.success("移除成员成功!"),t.channel.members=e.data.members,ea.publish(nsCons.EVENT_CHAT_CHANNEL_MEMBER_ADD_OR_REMOVE,{type:"remove",members:e.data.members})):toastr.error(e.data,"移除成员失败!")}).always(function(){t.emModal.hideDimmer()}))}}}return e.prototype.channelChanged=function(){var e=this;this.channel&&!function(){var t=_.sortBy(_.map(e.channel.members,"username"));_.defer(function(){$(e.membersRef).dropdown().dropdown("clear").dropdown("set selected",t).dropdown(e.membersOpts)})}()},e.prototype.attached=function(){},e.prototype.initMembersUI=function(e){var t=this;e&&_.defer(function(){t.channelChanged()})},e.prototype.showHandler=function(){$(this.membersRef).dropdown().dropdown("clear"),this.channelChanged()},e.prototype.approveHandler=function(e){},e.prototype.show=function(){this.emModal.show({hideOnApprove:!0,autoDimmer:!1})},e}(),s=r(o.prototype,"channel",[t.bindable],{enumerable:!0,initializer:null}),l=r(o.prototype,"users",[t.bindable],{enumerable:!0,initializer:null}),a=o))||a}),define("resources/elements/em-chat-channel-members-show",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmChatChannelMembersShow=void 0;var a,o,s;e.EmChatChannelMembersShow=(0,t.containerless)((o=function(){function e(){i(this,e),n(this,"channel",s,this)}return e.prototype.showHandler=function(){},e.prototype.approveHandler=function(e){},e.prototype.show=function(){this.emModal.show({hideOnApprove:!0,autoDimmer:!1})},e}(),s=r(o.prototype,"channel",[t.bindable],{enumerable:!0,initializer:null}),a=o))||a}),define("resources/elements/em-chat-content-item",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmChatContentItem=void 0;var a,o,s,l,c,d,u,m,p;e.EmChatContentItem=(a=(0,t.bindable)({defaultBindingMode:t.bindingMode.twoWay}),(0,t.containerless)((s=function(){function e(){var t=this;i(this,e),n(this,"chats",l,this),n(this,"loginUser",c,this),n(this,"isAt",d,this),n(this,"channel",u,this),n(this,"markId",m,this),n(this,"chatTo",p,this),this.members=[],this.basePath=utils.getBasePath(),this.subscribe=ea.subscribe(nsCons.EVENT_CHAT_CHANNEL_MEMBER_ADD_OR_REMOVE,function(e){t.members=[nsCtx.memberAll].concat(e.members)})}return e.prototype.unbind=function(){this.subscribe.dispose()},e.prototype.attached=function(){var e=this;$(".tms-chat-direct").on("click",".markdown-body .at-user",function(e){e.preventDefault(),ea.publish(nsCons.EVENT_CHAT_MSG_INSERT,{content:"{~"+$(e.currentTarget).attr("data-value")+"} "})}),$(".tms-chat-direct").on("mouseenter",'.markdown-body a[href*="#/chat/"]:not(.pp-not)',function(e){e.preventDefault();var t=$(e.currentTarget);ea.publish(nsCons.EVENT_CHAT_MSG_POPUP_SHOW,{id:utils.urlQuery("id",t.attr("href")),target:e.currentTarget})}),$(".tms-chat-direct").on("mouseenter",".tms-content-body .em-chat-content-item",function(e){e.preventDefault();var t=$(e.currentTarget);ea.publish(nsCons.EVENT_CHAT_MSG_WIKI_DIR,{dir:utils.dir(t.find("> .content > .markdown-body"))})}),$(".tms-chat-direct").on("click",".panel-wiki-dir .wiki-dir-item",function(e){e.preventDefault(),ea.publish(nsCons.EVENT_CHAT_CONTENT_SCROLL_TO,{target:$("#"+$(e.currentTarget).attr("data-id"))})}),$(".tms-chat-direct").on("mouseenter","span[data-value].at-user:not(.pp-not),a[data-value].author:not(.pp-not)",function(t){t.preventDefault();var n=$(t.currentTarget);ea.publish(nsCons.EVENT_CHAT_MEMBER_POPUP_SHOW,{channel:e.channel,username:n.attr("data-value"),target:t.currentTarget})}),this.initHotkeys()},e.prototype.channelChanged=function(){this.channel?this.members=[nsCtx.memberAll].concat(this.channel.members):this.members=[]},e.prototype.deleteHandler=function(e){var t=this;this.emConfirmModal.show({onapprove:function(){var n=void 0;n=t.isAt?"/admin/chat/direct/delete":"/admin/chat/channel/delete",$.post(n,{id:e.id},function(n,i,r){n.success?(t.chats=_.reject(t.chats,{id:e.id}),toastr.success("删除消息成功!")):toastr.error(n.data,"删除消息失败!")})}})},e.prototype.initHotkeys=function(){var e=this;$(document).bind("keydown","e",function(t){t.preventDefault();var n=_.findLast(e.chats,function(t){return t.creator.username==e.loginUser.username});n&&e.editHandler(n,$('.em-chat-content-item[data-id="'+n.id+'"]').find("> .content > textarea"))})},e.prototype.editHandler=function(e,t){$.get("/admin/chat/"+(this.isAt?"direct":"channel")+"/get",{id:e.id},function(n){n.success?(e.version!=n.data.version&&_.extend(e,n.data),e.isEditing=!0,e.contentOld=e.content,_.defer(function(){$(t).focus().select(),autosize.update(t)})):toastr.error(n.data)})},e.prototype.editOkHandler=function(e,t,n){this.editSave(t,n),t.isEditing=!1},e.prototype.editCancelHandler=function(e,t,n){t.content=t.contentOld,$(n).val(t.content),t.isEditing=!1},e.prototype.editSave=function(e,t){var n=this;this.sending=!0,e.content=$(t).val();var i=(utils.md2html(e.content),utils.md2html(e.contentOld),void 0),r=void 0;this.isAt?(i="/admin/chat/direct/update",r={baseUrl:utils.getBaseUrl(),path:wurl("path"),id:e.id,content:e.content,diff:utils.diffS(e.contentOld,e.content)}):(i="/admin/chat/channel/update",r={url:utils.getUrl(),id:e.id,version:e.version,usernames:utils.parseUsernames(e.content,this.members).join(","),content:e.content,diff:utils.diffS(e.contentOld,e.content)}),$.post(i,r,function(t,n,i){t.success?(toastr.success("更新消息成功!"),e.isEditing=!1,e.version=t.data.version):toastr.error(t.data,"更新消息失败!")}).always(function(){n.sending=!1})},e.prototype.eidtKeydownHandler=function(e,t,n){return!this.sending&&(e.ctrlKey&&13===e.keyCode?(this.editSave(t,n),!1):e.ctrlKey&&85===e.keyCode?($(n).next(".tms-edit-actions").find(".upload").click(),!1):(27===e.keyCode&&this.editCancelHandler(e,t,n),!0))},e.prototype.notifyRendered=function(e,t){e&&_.defer(function(){ea.publish(nsCons.EVENT_CHAT_LAST_ITEM_RENDERED,{item:t})})},e.prototype.stowHandler=function(e){$.post("/admin/chat/channel/stow",{id:e.id},function(e,t,n){e.success?toastr.success("收藏消息成功!"):toastr.error(e.data,"收藏消息失败!")})},e.prototype.openEditHandler=function(e){$.post("/admin/chat/channel/openEdit",{id:e.id,open:!e.openEdit},function(t,n,i){t.success?(e.openEdit=!e.openEdit,toastr.success((e.openEdit?"开启":"关闭")+"协作编辑成功!")):toastr.success((e.openEdit?"关闭":"开启")+"协作编辑失败!")})},e.prototype.replyHandler=function(e){ea.publish(nsCons.EVENT_CHAT_MSG_INSERT,{content:"[[回复#"+e.id+"]("+utils.getUrl()+"?id="+e.id+"){~"+e.creator.username+"}]\n\n"}),$.post("/admin/chat/channel/markAsReadedByChat",{chatId:e.id})},e.prototype.creatorNameHandler=function(e){ea.publish(nsCons.EVENT_CHAT_MSG_INSERT,{content:"{~"+e.creator.username+"} "})},e.prototype.refreshHandler=function(e){$.get("/admin/chat/channel/get",{id:e.id},function(t){e.version!=t.data.version?(_.extend(e,t.data),toastr.success("刷新同步成功!")):toastr.info("消息内容暂无变更!")})},e.prototype.likeHandler=function(e,t){t&&e.isZanVoted||!t&&e.isCaiVoted||$.post("/admin/chat/channel/vote",{id:e.id,url:utils.getUrl(),contentHtml:utils.md2html(e.content),type:t?"Zan":"Cai"},function(n,i,r){n.success?(_.extend(e,n.data),t?e.isZanVoted=!0:e.isCaiVoted=!0):toastr.error(n.data)})},e}(),l=r(s.prototype,"chats",[a],{enumerable:!0,initializer:null}),c=r(s.prototype,"loginUser",[t.bindable],{enumerable:!0,initializer:null}),d=r(s.prototype,"isAt",[t.bindable],{enumerable:!0,initializer:null}),u=r(s.prototype,"channel",[t.bindable],{enumerable:!0,initializer:null}),m=r(s.prototype,"markId",[t.bindable],{enumerable:!0,initializer:null}),p=r(s.prototype,"chatTo",[t.bindable],{enumerable:!0,initializer:null}),o=s))||o)}),define("resources/elements/em-chat-input",["exports","aurelia-framework","common/common-tips","common/common-emoji","simplemde","textcomplete"],function(e,t,n,i,r){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmChatInput=void 0;var c,d,u,m,p,g=a(n),h=a(i),b=a(r);e.EmChatInput=(0,t.containerless)((d=function(){function e(){var t=this;s(this,e),o(this,"chatTo",u,this),o(this,"isAt",m,this),o(this,"channel",p,this),this.members=[],this.isMobile=utils.isMobile(),this.subscribe=ea.subscribe(nsCons.EVENT_SHOW_HOTKEYS_MODAL,function(e){t.emHotkeysModal.show()}),this.subscribe1=ea.subscribe(nsCons.EVENT_CHAT_CHANNEL_MEMBER_ADD_OR_REMOVE,function(e){t.members=[nsCtx.memberAll].concat(e.members)}),this.subscribe2=ea.subscribe(nsCons.EVENT_CHAT_MSG_INSERT,function(e){t.insertContent(e.content)})}return e.prototype.channelChanged=function(){this.channel?this.members=[nsCtx.memberAll].concat(this.channel.members):this.members=[]},e.prototype.unbind=function(){this.subscribe.dispose(),this.subscribe1.dispose(),this.subscribe2.dispose()},e.prototype.initHotkeys=function(){var e=this;$(document).bind("keydown","r",function(){event.preventDefault(),e.simplemde.codemirror.focus()})},e.prototype.attached=function(){this.initSimpleMDE(this.chatInputRef),this.initDropzone(),this.initPaste(),this.initHotkeys()},e.prototype.initPaste=function(){var e=this,t=void 0;t=this.$chatMsgInputRef.is("textarea")?$(this.$chatMsgInputRef).pastableTextarea():$(this.$chatMsgInputRef).pastableContenteditable(),t&&t.on("pasteImage",function(t,n){$.post("/admin/file/base64",{dataURL:n.dataURL,type:n.blob.type,toType:nsCtx.isAt?"User":"Channel",toId:nsCtx.chatTo},function(t,n,i){t.success&&e.insertContent("![{name}]({baseURL}{path}{uuidName})".replace(/\{name\}/g,t.data.name).replace(/\{baseURL\}/g,utils.getBaseUrl()+"/").replace(/\{path\}/g,t.data.path).replace(/\{uuidName\}/g,t.data.uuidName))})}).on("pasteImageError",function(e,t){toastr.error(t.message,"剪贴板粘贴图片错误!")})},e.prototype.initDropzone=function(){var e=this;this.initUploadDropzone($(".CodeMirror-wrap",this.inputRef),function(){return e.$chatMsgInputRef},!1),this.initUploadDropzone($(this.btnItemUploadRef).children().andSelf(),function(){return e.$chatMsgInputRef},!0),$(this.chatBtnRef).popup({inline:!0,hoverable:!0,position:"bottom left",delay:{show:300,hide:300}})},e.prototype.initUploadDropzone=function(e,t,n){var i=this;$(e).dropzone({url:"/admin/file/upload",paramName:"file",clickable:!!n,dictDefaultMessage:"",maxFilesize:10,addRemoveLinks:!0,previewsContainer:this.chatStatusBarRef,previewTemplate:this.previewTemplateRef.innerHTML,dictCancelUpload:"取消上传",dictCancelUploadConfirmation:"确定要取消上传吗?",dictFileTooBig:"文件过大({{filesize}}M),最大限制:{{maxFilesize}}M",init:function(){this.on("sending",function(e,n,i){t()?(i.append("toType",nsCtx.isAt?"User":"Channel"),i.append("toId",nsCtx.chatTo)):this.removeAllFiles(!0)}),this.on("success",function(e,t){t.success?($.each(t.data,function(e,t){"Image"==t.type?i.insertContent("![{name}]({baseURL}{path}{uuidName}) ".replace(/\{name\}/g,t.name).replace(/\{baseURL\}/g,utils.getBaseUrl()+"/").replace(/\{path\}/g,t.path).replace(/\{uuidName\}/g,t.uuidName)):i.insertContent("[{name}]({baseURL}{path}{uuidName}) ".replace(/\{name\}/g,t.name).replace(/\{baseURL\}/g,utils.getBaseUrl()+"/").replace(/\{path\}/g,"admin/file/download/").replace(/\{uuidName\}/g,t.id))}),toastr.success("上传成功!")):toastr.error(t.data,"上传失败!")}),this.on("error",function(e,t,n){toastr.error(t,"上传失败!")}),this.on("complete",function(e){this.removeFile(e)})}})},e.prototype.initSimpleMDE=function(e){var t=this;this.simplemde=new b.default({element:e,spellChecker:!1,status:!1,autofocus:!0,toolbar:!1,autoDownloadFontAwesome:!1,insertTexts:{table:["","\n\n| 列1 | 列2 | 列3 |\n| ------ | ------ | ------ |\n| 文本 | 文本 | 文本 |\n\n"]},previewRender:function(e,n){return t.simplemde.markdown(utils.preParse(e))}}),this.$chatMsgInputRef=$(this.inputRef).find(".textareaWrapper .CodeMirror textarea"),0===this.$chatMsgInputRef.size()&&(this.$chatMsgInputRef=$(this.inputRef).find('.textareaWrapper .CodeMirror [contenteditable="true"]')),this.initTextcomplete()},e.prototype.initTextcomplete=function(){var e=this;$(this.$chatMsgInputRef).textcomplete([{match:/(|\b)(\/.*)$/,search:function(e,t){var n=_.keys(g.default);t($.map(n,function(t){return 0===t.indexOf(e)?t:null}))},template:function(e,t){return g.default[e].label},replace:function(t){return e.tipsActionHandler(t)?(e.setCaretPosition(g.default[t].line,g.default[t].ch),"$1"+g.default[t].value):""}},{match:/(^|\s)@(\w*)$/,search:function(t,n){n($.map(e.members,function(e){return e.enabled&&e.username.indexOf(t)>=0?e.username:null}))},template:function(t,n){var i=_.find(e.members,{username:t});return i.name+" - "+i.mails+" ("+i.username+")"},replace:function(e){return"$1{~"+e+"}"}},{match:/(^|\s):([\+\-\w]*)$/,search:function(e,t){t($.map(h.default,function(t){return _.some(t.split("_"),function(t){return 0===t.indexOf(e)})?t:null}))},template:function(e,t){if("search"==e)return"表情查找 - :search";var n=":"+e+":";return emojify.replace(n)+" - "+n},replace:function(t){return e.tipsActionHandler(t)?"$1:"+t+": ":""}}],{appendTo:".tms-chat-status-bar",maxCount:nsCons.NUM_TEXT_COMPLETE_MAX_COUNT}),this.simplemde.codemirror.on("keydown",function(t,n){_.includes([13,38,40],n.keyCode)&&e.isTipsShow()?n.preventDefault():n.ctrlKey&&13===n.keyCode?e.sendChatMsg():27===n.keyCode?e.simplemde.value(""):n.ctrlKey&&85==n.keyCode?$(e.btnItemUploadRef).find(".content").click():n.ctrlKey&&191==n.keyCode&&e.emHotkeysModal.show()})},e.prototype.setCaretPosition=function(e,t){var n=this;(e||t)&&_.delay(function(){var i=n.simplemde.codemirror.getCursor();n.simplemde.codemirror.setCursor({line:i.line-(e?e:0),ch:i.line?t?t:0:i.ch-(t?t:0)})},100)},e.prototype.sendChatMsg=function(){var e=this,t=this.simplemde.value();if(!$.trim(t))return void this.simplemde.value("");if(!this.sending){this.sending=!0;var n=utils.md2html(t),i=void 0,r=void 0;this.isAt?(i="/admin/chat/direct/create",r={baseUrl:utils.getBaseUrl(),path:wurl("path"),chatTo:this.chatTo,content:t,contentHtml:n}):(i="/admin/chat/channel/create",r={url:utils.getUrl(),channelId:this.channel.id,usernames:utils.parseUsernames(t,this.members).join(","),content:t,contentHtml:n}),$.post(i,r,function(t,n,i){t.success?(e.simplemde.value(""),ea.publish(nsCons.EVENT_CHAT_MSG_SENDED,{data:t})):toastr.error(t.data,"发送消息失败!")}).always(function(){e.sending=!1})}},e.prototype.sendChatMsgHandler=function(){this.sendChatMsg()},e.prototype.isTipsShow=function(){return 1===$(this.chatStatusBarRef).find(".textcomplete-dropdown:visible").size()},e.prototype.insertContent=function(e,t){try{var n=t?t.codemirror:this.simplemde.codemirror,i=n.getCursor();i&&(n.replaceRange(e,i,i),n.focus())}catch(e){console.log(e)}},e.prototype.tipsActionHandler=function(e){if("/upload"==e)$(this.btnItemUploadRef).find(".content").click();else if("/shortcuts"==e)this.emHotkeysModal.show();else{if("search"!=e)return!0;_.delay(function(){utils.openNewWin(nsCons.STR_EMOJI_SEARCH_URL)},200)}return!1},e}(),u=l(d.prototype,"chatTo",[t.bindable],{enumerable:!0,initializer:null}),m=l(d.prototype,"isAt",[t.bindable],{enumerable:!0,initializer:null}),p=l(d.prototype,"channel",[t.bindable],{enumerable:!0,initializer:null}),c=d))||c}),define("resources/elements/em-chat-member-popup",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.EmChatMemberPopup=void 0;var i;e.EmChatMemberPopup=(0,t.containerless)(i=function(){function e(){var t=this;n(this,e),this.members=[],this.member={},this.subscribe=ea.subscribe(nsCons.EVENT_CHAT_MEMBER_POPUP_SHOW,function(e){if(t.channel=e.channel,t.username=e.username,t.target=e.target,"all"==t.username){if(!t.channel)return;t.members=t.channel.members}else{t.member=utils.getUser(t.username);var n=utils.getUser(t.member.creator);t.member.creatorName=n&&n.name?n.name:t.member.creator}_.defer(function(){$(t.target).popup({popup:t.popup,hoverable:!0,inline:!1,silent:!0,movePopup:!1,position:"bottom left",jitter:300,prefer:"opposite",delay:{show:300,hide:300}}).popup("show")})})}return e.prototype.unbind=function(){this.subscribe.dispose()},e}())||i}),define("resources/elements/em-chat-msg-popup",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.EmChatMsgPopup=void 0;var i;e.EmChatMsgPopup=(0,t.containerless)(i=function(){function e(){var t=this;n(this,e),this.subscribe=ea.subscribe(nsCons.EVENT_CHAT_MSG_POPUP_SHOW,function(e){t.id=e.id,t.target=e.target,$(t.target).popup({popup:t.popup,hoverable:!0,inline:!1,movePopup:!1,silent:!0,position:"bottom left",jitter:300,prefer:"opposite",delay:{show:300,hide:300},onShow:function(){$.get("/admin/chat/channel/get",{id:t.id},function(e){e.success?t.chatMsg=e.data:toastr.error(e.data,"加载失败!")})}}).popup("show")})}return e.prototype.unbind=function(){this.subscribe.dispose()},e}())||i}),define("resources/elements/em-chat-schedule-edit",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmChatScheduleEdit=void 0;var a,o,s;e.EmChatScheduleEdit=(0,t.containerless)((o=function(){function e(){var t=this;i(this,e),n(this,"loginUser",s,this),this.actorsOpts={onAdd:function(e,n,i){$.post("/admin/schedule/addActors",{id:t.event.id,basePath:utils.getBasePath(),actors:e},function(e,t,n){e.success?(toastr.success("添加参与者成功!"),ea.publish(nsCons.EVENT_SCHEDULE_REFRESH,{})):toastr.error(e.data)})},onLabelRemove:function(e){return t.loginUser.username!=e&&void $.post("/admin/schedule/removeActors",{id:t.event.id,basePath:utils.getBasePath(),actors:e},function(e,t,n){e.success?(toastr.success("移除参与者成功!"),ea.publish(nsCons.EVENT_SCHEDULE_REFRESH,{})):toastr.error(e.data)})}}}return e.prototype.attached=function(){$(this.startRef).calendar({today:!0,endCalendar:$(this.endRef)}),$(this.endRef).calendar({today:!0,startCalendar:$(this.startRef)})},e.prototype.initMembersUI=function(e){var t=this;e&&_.defer(function(){var e=[t.loginUser.username];t.event&&(e=_.map(t.event.actors,"username")),$(t.actorsRef).dropdown().dropdown("clear").dropdown("set selected",e).dropdown(t.actorsOpts)})},e.prototype.titleKeyupHandler=function(e){e.ctrlKey&&13===e.keyCode&&this.updateHandler()},e.prototype.clearStartDateHandler=function(){$(this.startRef).calendar("clear")},e.prototype.clearEndDateHandler=function(){$(this.endRef).calendar("clear")},e.prototype.show=function(e){this.event=_.clone(e),this.showHandler(),$(this.scheduleEditRef).popup({on:"click",inline:!0,silent:!0,position:"bottom center",jitter:300,prefer:"opposite",delay:{show:300,hide:300}}).popup("show")},e.prototype.showHandler=function(){var e=this;this.users=window.tmsUsers,$(this.actorsRef).dropdown().dropdown("clear"),_.defer(function(){e.event.start?$(e.startRef).calendar("set date",e.event.start.toDate()):$(e.startRef).calendar("clear"),e.event.end?$(e.endRef).calendar("set date",e.event.end.toDate()):$(e.endRef).calendar("clear");var t=_.map(e.event.actors,"username");$(e.actorsRef).dropdown("set selected",t).dropdown(e.actorsOpts),e.event.creator.username==e.loginUser.username&&$(e.titleRef).focus(),autosize.update(e.titleRef)})},e.prototype.updateHandler=function(){var e=this;if(!this.event.title)return void toastr.error("日程内容不能为空!");var t={id:this.event.id,basePath:utils.getBasePath(),title:this.event.title},n=$(this.startRef).calendar("get date"),i=$(this.endRef).calendar("get date");n?t.startDate=n:t.startDate=new Date,i&&(t.endDate=i),$.post("/admin/schedule/update2",t,function(t,n,i){t.success?(toastr.success("更新日程成功!"),$(e.scheduleEditRef).popup("hide"),ea.publish(nsCons.EVENT_SCHEDULE_REFRESH,{})):toastr.error(t.data)})},e.prototype.delHandler=function(){var e=this;this.emConfirmModal.show({onapprove:function(){$.post("/admin/schedule/delete",{id:e.event.id,basePath:utils.getBasePath()},function(e,t,n){e.success?(toastr.success("日程删除成功!"),ea.publish(nsCons.EVENT_SCHEDULE_REFRESH,{})):toastr.error(e.data)})}})},e}(),s=r(o.prototype,"loginUser",[t.bindable],{enumerable:!0,initializer:null}),a=o))||a}),define("resources/elements/em-chat-schedule-remind",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmChatScheduleRemind=void 0;var a,o,s;e.EmChatScheduleRemind=(0,t.containerless)((o=function(){function e(){i(this,e),n(this,"events",s,this),this.interval=5e3,this.headOffset=6e5,this.reminded=[],this._pollCheck()}return e.prototype.unbind=function(){this.timer&&clearInterval(this.timer)},e.prototype._pollCheck=function(){var e=this;this.timer=setInterval(function(){if(e.events){var t=(new Date).getTime();_.each(e.events,function(n){if(n.start&&!_.includes(e.reminded,n.id)){var i=n.start;i>t&&i '+i.name+" ("+i.username+")"})}),$.each(t.data.channels,function(t,i){_.find(_.filter(e.shares,function(e){return"channel"==e._type}),{name:i.name})||n.results.push({item:i,title:' '+i.title+" ("+i.name+")"})}),n},url:"/admin/blog/share/to/search?search={query}"}}),$(this.shareRef).popup({on:"click",inline:!0,silent:!0,position:"bottom right",jitter:300,delay:{show:300,hide:300},onVisible:function(){$(e.inputSearchRef).focus()}})},e.prototype.shareSearchKeyupHandler=function(e){if(13===e.keyCode&&!$(this.searchRef).search("is visible")){var t=$(this.inputSearchRef).val();utils.isMail(t)&&(_.find(_.filter(this.shares,function(e){return"mail"==e._type}),{mail:t})||(this.shares.push({_id:_.uniqueId("share-item-"),_type:"mail",mail:t}),$(this.inputSearchRef).val("")))}},e.prototype.show=function(){$(this.shareRef).popup("show")},e.prototype.removeShareHandler=function(e){this.shares=_.reject(this.shares,{_id:e._id})},e.prototype.cancelHandler=function(){this._reset()},e.prototype._reset=function(){this.shares=[],this.desc="",$(this.inputSearchRef).val(""),$(this.shareRef).popup("hide")},e.prototype.shareHandler=function(){var e=this;return 0===this.shares.length?void toastr.error("请先指定沟通消息分享用户或者频道或者邮箱!"):void(this.ajaxS=$.post("/admin/chat/"+(this.isAt?"direct":"channel")+"/share",{basePath:utils.getBasePath(),href:this.basePath+"#/chat/"+(this.isAt?"@"+this.loginUser.username:this.channel.name)+"?id="+this.chat.id,id:this.chat.id,desc:this.desc,html:utils.md2html(this.chat.content),users:_.chain(this.shares).filter(function(e){return"user"==e._type}).map("username").join().value(),channels:_.chain(this.shares).filter(function(e){return"channel"==e._type}).map("name").join().value(),mails:_.chain(this.shares).filter(function(e){return"mail"==e._type}).map("mail").join().value()},function(t,n,i){t.success?(e._reset(),toastr.success("沟通消息分享成功!")):toastr.error(t.data,"沟通消息分享失败!")}))},e}(),s=r(o.prototype,"chat",[t.bindable],{enumerable:!0,initializer:null}),l=r(o.prototype,"channel",[t.bindable],{enumerable:!0,initializer:null}),c=r(o.prototype,"loginUser",[t.bindable],{enumerable:!0,initializer:null}),d=r(o.prototype,"isAt",[t.bindable],{enumerable:!0,initializer:null}),a=o))||a}),define("resources/elements/em-chat-sidebar-left",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmChatSidebarLeft=void 0;var a,o,s,l,c,d,u;e.EmChatSidebarLeft=(0,t.containerless)((o=function(){function e(){var t=this;i(this,e),n(this,"users",s,this),n(this,"loginUser",l,this),n(this,"channels",c,this),n(this,"chatTo",d,this),n(this,"isAt",u,this),this.filter="",this.isSuper=nsCtx.isSuper,this.subscribe=ea.subscribe(nsCons.EVENT_CHANNEL_ACTIONS,function(e){t[e.action](e.item)}),this.subscribe1=ea.subscribe(nsCons.EVENT_SYSTEM_LINKS_REFRESH,function(e){t._refreshSysLinks()})}return e.prototype.usersChanged=function(){this._filter()},e.prototype.channelsChanged=function(){this._filter()},e.prototype.loginUserChanged=function(){this.loginUser&&(this.isSuper=utils.isSuperUser(this.loginUser))},e.prototype._refreshSysLinks=function(){var e=this;$.get("/admin/link/listByApp",function(t){t.success?e.sysLinks=t.data:e.sysLinks=[]})},e.prototype.unbind=function(){this.subscribe.dispose(),this.subscribe1.dispose()},e.prototype.bind=function(e,t){this._refreshSysLinks()},e.prototype.attached=function(){var e=this;$(this.logoRef).on("mouseenter",function(t){$(e.logoRef).animateCss("flip")})},e.prototype._filter=function(){var e=this;_.each(this.users,function(t){t.hidden=t.username.indexOf(e.filter)==-1}),_.each(this.channels,function(t){t.hidden=t.name.indexOf(e.filter)==-1})},e.prototype.chatToUserFilerKeyupHanlder=function(e){if(this._filter(),13===e.keyCode){var t=_.find(this.users,{hidden:!1});if(t)return void(window.location=wurl("path")+("#/chat/@"+t.username));var n=_.find(this.channels,{hidden:!1});if(n)return void(window.location=wurl("path")+("#/chat/"+n.name))}},e.prototype.clearFilterHandler=function(){var e=this;this.filter="",_.each(this.users,function(t){t.hidden=t.username.indexOf(e.filter)==-1}),_.each(this.channels,function(t){t.hidden=t.name.indexOf(e.filter)==-1})},e.prototype.editHandler=function(e){this.selectedChannel=e,this.channelEditMd.show()},e.prototype.delHandler=function(e){var t=this;this.confirmMd.show({onapprove:function(){$.post("/admin/channel/delete",{id:e.id},function(n){n.success?(toastr.success("删除频道成功!"),_.remove(t.channels,{id:e.id}),ea.publish(nsCons.EVENT_CHAT_CHANNEL_DELETED,{channel:e})):toastr.error(n.data,"删除频道失败!")})}})},e.prototype.membersMgrHandler=function(e){this.selectedChannel=e,this.channelMembersMgrMd.show()},e.prototype.membersShowHandler=function(e){this.selectedChannel=e,this.channelMembersShowMd.show()},e.prototype.leaveHandler=function(e){this.confirmMd.show({content:'确定要离开频道'+e.title+"吗?",onapprove:function(){$.post("/admin/channel/leave",{id:e.id},function(e){e.success?(toastr.success("离开频道成功!"),ea.publish(nsCons.EVENT_CHAT_CHANNEL_LEAVED,{channel:e.data})):toastr.error(e.data,"离开频道失败!")})}})},e.prototype.switchHandler=function(){ea.publish(nsCons.EVENT_SWITCH_CHAT_TO,{})},e.prototype.addChannelLinkHandler=function(e){this.sysLinkMgrVm.show()},e}(),s=r(o.prototype,"users",[t.bindable],{enumerable:!0,initializer:null}),l=r(o.prototype,"loginUser",[t.bindable],{enumerable:!0,initializer:null}),c=r(o.prototype,"channels",[t.bindable],{enumerable:!0,initializer:null}),d=r(o.prototype,"chatTo",[t.bindable],{enumerable:!0,initializer:null}),u=r(o.prototype,"isAt",[t.bindable],{enumerable:!0,initializer:null}),a=o))||a}),define("resources/elements/em-chat-sidebar-right",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmChatSidebarRight=void 0;var a,o,s,l,c;e.EmChatSidebarRight=(0,t.containerless)((o=function(){function e(){var t,r=this;i(this,e),this.last=!0,n(this,"loginUser",s,this),n(this,"isAt",l,this),n(this,"channel",c,this),this.forAction="",this.forShow="",this.basePath=utils.getBasePath(),this.headerMapping=(t={},t[nsCons.ACTION_TYPE_SEARCH]="无符合检索结果",t[nsCons.ACTION_TYPE_AT]="暂无@消息",t[nsCons.ACTION_TYPE_STOW]="暂无收藏消息",t),this.subscribe=ea.subscribe(nsCons.EVENT_CHAT_SEARCH_RESULT,function(e){r._mappingActionShow(e.action);var t=e.result;r.search=e.search,r.page=t,r.chats=t.content,r.last=t.last,r.moreCnt=t.totalElements-(t.number+1)*t.size}),this.subscribe2=ea.subscribe(nsCons.EVENT_CHAT_SHOW_AT,function(e){r._mappingActionShow(e.action);var t=e.result;r.page=t,r.chats=_.map(t.content,function(e){var t=e.chatChannel;return t.chatAt=e,t}),r.last=t.last,r.moreCnt=t.totalElements-(t.number+1)*t.size}),this.subscribe1=ea.subscribe(nsCons.EVENT_CHAT_SHOW_STOW,function(e){r._mappingActionShow(e.action),r.chats=e.result,r.last=!0}),this.subscribe3=ea.subscribe(nsCons.EVENT_CHAT_SHOW_DIR,function(e){r._mappingActionShow(e.action),$(r.dirRef).empty().append(e.result)}),this.subscribe4=ea.subscribe(nsCons.EVENT_CHAT_SHOW_ATTACH,function(e){r._mappingActionShow(e.action)}),this.subscribe5=ea.subscribe(nsCons.EVENT_CHAT_SHOW_SCHEDULE,function(e){r._mappingActionShow(e.action)})}return e.prototype.unbind=function(){this.subscribe.dispose(),this.subscribe1.dispose(),this.subscribe2.dispose(),this.subscribe3.dispose(),this.subscribe4.dispose(),this.subscribe5.dispose()},e.prototype._mappingActionShow=function(e){this.forAction=e,_.includes([nsCons.ACTION_TYPE_SEARCH,nsCons.ACTION_TYPE_STOW,nsCons.ACTION_TYPE_AT],this.forAction)?this.forShow="chat-msg":_.includes([nsCons.ACTION_TYPE_DIR],this.forAction)?this.forShow="wiki-dir":_.includes([nsCons.ACTION_TYPE_ATTACH],this.forAction)?(this.forShow="chat-attach",this.chatAttachVm.fetch()):_.includes([nsCons.ACTION_TYPE_SCHEDULE],this.forAction)&&(this.forShow="chat-schedule",this.chatScheduleVm.show())},e.prototype.attached=function(){this.initHotkeys()},e.prototype.initHotkeys=function(){var e=this;$(document).bind("keydown","o",function(t){t.preventDefault();var n=_.find(e.chats,{isHover:!0});n&&(n.isOpen=!n.isOpen)})},e.prototype.searchItemMouseleaveHandler=function(e){e.isOpen=!1,e.isHover=!1},e.prototype.searchItemMouseenterHandler=function(e){e.isHover=!0},e.prototype.gotoChatHandler=function(e){ea.publish(nsCons.EVENT_CHAT_SEARCH_GOTO_CHAT_ITEM,{chatItem:e})},e.prototype.openSearchItemHandler=function(e){e.isOpen=!e.isOpen},e.prototype.searchMoreHandler=function(){var e=this;this.forAction==nsCons.ACTION_TYPE_SEARCH?this.searchMoreP=$.get("/admin/chat/direct/search",{search:this.search,size:this.page.size,page:this.page.number+1},function(t){t.success&&(e.chats=_.concat(e.chats,t.data.content),e.page=t.data,e.last=t.data.last,e.moreCnt=t.data.totalElements-(t.data.number+1)*t.data.size)}):this.searchMoreP=$.get("/admin/chat/channel/getAts",{size:this.page.size,page:this.page.number+1},function(t){t.success&&(e.chats=_.concat(e.chats,_.map(t.data.content,function(e){var t=e.chatChannel;return t.chatAt=e,t})),e.page=t.data,e.last=t.data.last,e.moreCnt=t.data.totalElements-(t.data.number+1)*t.data.size)})},e.prototype.removeStowHandler=function(e){var t=this;$.post("/admin/chat/channel/removeStow",{id:e.chatStow.id},function(n,i,r){n.success?(t.chats=_.reject(t.chats,{id:e.id}),toastr.success("移除收藏消息成功!")):toastr.error(n.data,"移除收藏消息失败!")})},e.prototype.removeAtHandler=function(e){var t=this;$.post("/admin/chat/channel/markAsReaded",{chatAtId:e.chatAt.id},function(n,i,r){n.success?t.chats=_.reject(t.chats,{id:e.id}):toastr.error(n.data,"移除@消息失败!")})},e}(),s=r(o.prototype,"loginUser",[t.bindable],{enumerable:!0,initializer:null}),l=r(o.prototype,"isAt",[t.bindable],{enumerable:!0,initializer:null}),c=r(o.prototype,"channel",[t.bindable],{enumerable:!0,initializer:null}),a=o))||a}),define("resources/elements/em-chat-system-link-mgr",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.EmChatSystemLinkMgr=void 0;var i;e.EmChatSystemLinkMgr=(0,t.containerless)(i=function(){function e(){n(this,e),this.links=[]}return e.prototype.addHandler=function(){var e=this;$.post("/admin/link/create",{title:this.title,href:this.href,type:"App"},function(t,n,i){t.success?(e.title="",e.href="",e.links.push(t.data),ea.publish(nsCons.EVENT_SYSTEM_LINKS_REFRESH,{})):toastr.error(t.data)})},e.prototype.delHandler=function(e){var t=this;$.post("/admin/link/delete",{id:e.id},function(n,i,r){n.success?(t.links=_.reject(t.links,{id:e.id}),ea.publish(nsCons.EVENT_SYSTEM_LINKS_REFRESH,{}),toastr.success("删除成功!")):toastr.error(n.data)})},e.prototype.editHandler=function(e){e.oldTitle=e.title,e.oldHref=e.href,e.isEditing=!0},e.prototype.updateHandler=function(e){$.post("/admin/link/update",{id:e.id,title:e.title,href:e.href},function(t,n,i){t.success?(e.isEditing=!1,ea.publish(nsCons.EVENT_SYSTEM_LINKS_REFRESH,{}),toastr.success("更新成功!")):toastr.error(t.data)})},e.prototype.showHandler=function(){var e=this;$.get("/admin/link/listByApp",function(t){t.success?e.links=t.data:e.links=[]})},e.prototype.show=function(){this.emModal.show({autoDimmer:!1})},e.prototype.approveHandler=function(e){},e}())||i}),define("resources/elements/em-chat-top-menu",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmChatTopMenu=void 0;var a,o,s,l,c,d,u,m,p,g,h;e.EmChatTopMenu=(0,t.containerless)((o=function(){function e(){var t=this;i(this,e),n(this,"loginUser",s,this),n(this,"chatUser",l,this),n(this,"users",c,this),n(this,"channels",d,this),n(this,"channel",u,this),n(this,"loginUser",m,this),n(this,"chatId",p,this),n(this,"chatTo",g,this),n(this,"isAt",h,this),this.isRightSidebarShow=!1,this.activeType="",this.ACTION_TYPE_SEARCH=nsCons.ACTION_TYPE_SEARCH,this.ACTION_TYPE_STOW=nsCons.ACTION_TYPE_STOW,this.ACTION_TYPE_AT=nsCons.ACTION_TYPE_AT,this.ACTION_TYPE_DIR=nsCons.ACTION_TYPE_DIR,this.ACTION_TYPE_ATTACH=nsCons.ACTION_TYPE_ATTACH,this.ACTION_TYPE_SCHEDULE=nsCons.ACTION_TYPE_SCHEDULE,this.countAt=null,this.newAtCnt=0,this.channelLinks=[],this.subscribe=ea.subscribe(nsCons.EVENT_CHAT_MSG_WIKI_DIR,function(e){t.dir=e.dir,t.activeType==t.ACTION_TYPE_DIR&&t.isRightSidebarShow&&ea.publish(nsCons.EVENT_CHAT_SHOW_DIR,{action:t.activeType,result:t.dir})}),this.subscribe1=ea.subscribe(nsCons.EVENT_CHAT_POLL_UPDATE,function(e){null!==t.countAt&&t.newAtCnt<=0&&(t.newAtCnt=e.countAt-t.countAt),t.countAt=e.countAt,t.countMyRecentSchedule=e.countMyRecentSchedule}),this.subscribe2=ea.subscribe(nsCons.EVENT_SWITCH_CHAT_TO,function(e){$(t.chatToDropdownRef).dropdown("toggle")}),this.subscribe3=ea.subscribe(nsCons.EVENT_CHANNEL_LINKS_REFRESH,function(e){t._refreshChannelLinks()})}return e.prototype.loginUserChanged=function(){this.loginUser&&(this.isSuper=utils.isSuperUser(this.loginUser))},e.prototype.chatToChanged=function(){$(this.chatToDropdownRef).dropdown("set selected",this.chatId).dropdown("hide")},e.prototype.channelChanged=function(){this._refreshChannelLinks()},e.prototype._refreshChannelLinks=function(){var e=this;this.channel&&$.get("/admin/link/listBy",{channelId:this.channel.id},function(t){t.success?e.channelLinks=t.data:e.channelLinks=[]})},e.prototype.unbind=function(){this.subscribe.dispose(),this.subscribe1.dispose(),this.subscribe2.dispose(),this.subscribe3.dispose()},e.prototype.attached=function(){this.initHotkeys(),this.initSearch()},e.prototype.initSearch=function(){var e=this,t=[];if(localStorage){var n=localStorage.getItem("tms/chat-direct:search");t=n?$.parseJSON(n):[]}this.searchSource=t,$(this.searchRef).search({source:t,onSelect:function(t,n){e.searchHandler()},onResults:function(){$(e.searchRef).search("hide results")}})},e.prototype.searchHandler=function(){var e=this;$(this.searchRef).search("hide results");var t=$(this.searchInputRef).val();if(!t||t.length<2)return void toastr.error("检索条件至少需要两个字符!");this.search=t;var n=!1;$.each(this.searchSource,function(e,i){if(i.title==t)return n=!0,!1}),n||(this.searchSource.splice(0,0,{title:t}),$(this.searchRef).search({source:_.clone(this.searchSource)})),localStorage&&localStorage.setItem("tms/chat-direct:search",JSON.stringify(this.searchSource));var i=void 0,r=void 0;this.isAt?(i="/admin/chat/direct/search",r={search:this.search,size:20,page:0}):(i="/admin/chat/channel/search",r={search:this.search,channelId:this.channel.id,size:20,page:0}),this.searchingP=$.get(i,r,function(t){t.success&&(e.toggleRightSidebar(!0),ea.publish(nsCons.EVENT_CHAT_SEARCH_RESULT,{action:e.activeType,result:t.data,search:e.search}))})},e.prototype.initHotkeys=function(){var e=this;$(document).bind("keydown","s",function(t){t.preventDefault(),e.toggleRightSidebar()}).bind("keydown","ctrl+k",function(t){t.preventDefault(),$(e.chatToDropdownRef).dropdown("toggle")}),$(this.filterChatToUser).bind("keydown","ctrl+k",function(t){t.preventDefault(),$(e.chatToDropdownRef).dropdown("toggle")})},e.prototype.initChatToDropdownHandler=function(e){var t=this;e&&_.defer(function(){$(t.chatToDropdownRef).dropdown().dropdown("set selected",t.chatId).dropdown({onChange:function(e,t,n){window.location=wurl("path")+("#/chat/"+n.attr("data-id"))}})})},e.prototype.searchFocusHandler=function(){$(this.searchInputRef).css("width","auto"),$(this.searchRemoveRef).show(),this.isActiveSearch=!0},e.prototype.searchBlurHandler=function(){$(this.searchInputRef).val()||($(this.searchInputRef).css("width","95px"),$(this.searchRemoveRef).hide(),this.isActiveSearch=!1)},e.prototype.sibebarRightHandler=function(e){this.toggleRightSidebar()},e.prototype.toggleRightSidebar=function(e){_.isUndefined(e)?this.isRightSidebarShow=!this.isRightSidebarShow:this.isRightSidebarShow=e,ea.publish(nsCons.EVENT_CHAT_SIDEBAR_TOGGLE,{isShow:this.isRightSidebarShow})},e.prototype.searchKeyupHandler=function(e){return 13===e.keyCode?(this.activeType=nsCons.ACTION_TYPE_SEARCH,this.searchHandler()):27===e.keyCode&&this.clearSearchHandler(),!0},e.prototype.clearSearchHandler=function(){$(this.searchInputRef).val("").focus()},e.prototype.showStowHandler=function(e){var t=this;return this.isRightSidebarShow&&this.activeType==nsCons.ACTION_TYPE_STOW&&!e.ctrlKey?void this.toggleRightSidebar():(this.activeType=nsCons.ACTION_TYPE_STOW,void(this.ajaxStow=$.get("/admin/chat/channel/getStows",function(e){if(e.success){var n=_.map(e.data,function(e){var t=e.chatChannel;return t.chatStow=e,t});ea.publish(nsCons.EVENT_CHAT_SHOW_STOW,{action:t.activeType,result:_.reverse(n)}),t.toggleRightSidebar(!0)}else toastr.error(e.data,"获取收藏消息失败!")})))},e.prototype.showAtHandler=function(e){var t=this;return this.isRightSidebarShow&&this.activeType==nsCons.ACTION_TYPE_AT&&0==this.newAtCnt&&!e.ctrlKey?void this.toggleRightSidebar():(this.activeType=nsCons.ACTION_TYPE_AT,this.newAtCnt=0,void(this.ajaxAt=$.get("/admin/chat/channel/getAts",{page:0,size:20},function(e){e.success?(ea.publish(nsCons.EVENT_CHAT_SHOW_AT,{action:t.activeType,result:e.data}),t.toggleRightSidebar(!0)):toastr.error(e.data,"获取@消息失败!")})))},e.prototype.logoutHandler=function(){$.post("/admin/logout").always(function(){utils.redirect2Login()})},e.prototype.showWikiDirHandler=function(e){return this.isRightSidebarShow&&this.activeType==nsCons.ACTION_TYPE_DIR&&!e.ctrlKey?void this.toggleRightSidebar():(this.activeType=nsCons.ACTION_TYPE_DIR,ea.publish(nsCons.EVENT_CHAT_SHOW_DIR,{action:this.activeType,result:this.dir}),void this.toggleRightSidebar(!0))},e.prototype.showAttachHandler=function(e){return this.isRightSidebarShow&&this.activeType==nsCons.ACTION_TYPE_ATTACH&&!e.ctrlKey?void this.toggleRightSidebar():(this.activeType=nsCons.ACTION_TYPE_ATTACH,ea.publish(nsCons.EVENT_CHAT_SHOW_ATTACH,{action:this.activeType}),void this.toggleRightSidebar(!0))},e.prototype.showScheduleHandler=function(e){return this.isRightSidebarShow&&this.activeType==nsCons.ACTION_TYPE_SCHEDULE&&!e.ctrlKey?void this.toggleRightSidebar():(this.activeType=nsCons.ACTION_TYPE_SCHEDULE,ea.publish(nsCons.EVENT_CHAT_SHOW_SCHEDULE,{action:this.activeType}),void this.toggleRightSidebar(!0))},e.prototype.userEditHandler=function(){this.userEditMd.show()},e.prototype.membersShowHandler=function(e,t){t.stopImmediatePropagation(),ea.publish(nsCons.EVENT_CHANNEL_ACTIONS,{action:"membersShowHandler",item:e})},e.prototype.leaveHandler=function(e,t){t.stopImmediatePropagation(),ea.publish(nsCons.EVENT_CHANNEL_ACTIONS,{action:"leaveHandler",item:e})},e.prototype.membersMgrHandler=function(e,t){t.stopImmediatePropagation(),ea.publish(nsCons.EVENT_CHANNEL_ACTIONS,{action:"membersMgrHandler",item:e})},e.prototype.editHandler=function(e,t){t.stopImmediatePropagation(),ea.publish(nsCons.EVENT_CHANNEL_ACTIONS,{action:"editHandler",item:e})},e.prototype.delHandler=function(e,t){t.stopImmediatePropagation(),ea.publish(nsCons.EVENT_CHANNEL_ACTIONS,{action:"delHandler",item:e})},e.prototype.viewOrMgrUsersHandler=function(e){this.channel.owner.username==this.loginUser.username?this.membersMgrHandler(this.channel,e):this.membersShowHandler(this.channel,e)},e.prototype.channelInfoHandler=function(e){this.channel.owner.username==this.loginUser.username?this.editHandler(this.channel,e):e.stopImmediatePropagation()},e.prototype.userInfoHandler=function(e){e.stopImmediatePropagation()},e.prototype.stopImmediatePropagationHandler=function(e){e.stopImmediatePropagation()},e.prototype.mailToHandler=function(e){e.stopImmediatePropagation(),window.location="mailto:"+this.chatUser.mails},e.prototype.channelLinksHandler=function(e){e.stopImmediatePropagation(),$(this.channelLinksDdRef).dropdown("toggle")},e.prototype.addChannelLinkHandler=function(e){this.channelLinkMgrVm.show()},e.prototype.openChannelLinkHandler=function(e,t){e.stopImmediatePropagation(),utils.openNewWin(t.href)},e}(),s=r(o.prototype,"loginUser",[t.bindable],{enumerable:!0,initializer:null}),l=r(o.prototype,"chatUser",[t.bindable],{enumerable:!0,initializer:null}),c=r(o.prototype,"users",[t.bindable],{enumerable:!0,initializer:null}),d=r(o.prototype,"channels",[t.bindable],{enumerable:!0,initializer:null}),u=r(o.prototype,"channel",[t.bindable],{enumerable:!0,initializer:null}),m=r(o.prototype,"loginUser",[t.bindable],{enumerable:!0,initializer:null}),p=r(o.prototype,"chatId",[t.bindable],{enumerable:!0,initializer:null}),g=r(o.prototype,"chatTo",[t.bindable],{enumerable:!0,initializer:null}),h=r(o.prototype,"isAt",[t.bindable],{enumerable:!0,initializer:null}),a=o))||a}),define("resources/elements/em-checkbox",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmCheckbox=void 0;var a,o,s,l,c,d,u,m,p,g,h,b;e.EmCheckbox=(a=(0,t.bindable)({defaultBindingMode:t.bindingMode.twoWay}),(0,t.containerless)((s=function(){function e(){i(this,e),n(this,"label",l,this),n(this,"title",c,this),n(this,"classes",d,this),n(this,"onchange",u,this),n(this,"onchecked",m,this),n(this,"onunchecked",p,this),n(this,"emCheckboxAll",g,this),n(this,"checked",h,this),n(this,"signal",b,this)}return e.prototype.checkedChanged=function(e,t){e?$(this.checkbox).checkbox("set checked"):$(this.checkbox).checkbox("set unchecked"),this.signal&&bs.signal(this.signal)},e.prototype.attached=function(){var e=this;$(this.checkbox).checkbox({onChecked:function(){e.checked=!0,_.defer(function(){e.emCheckboxAll&&e.emCheckboxAll.refreshCheckedStatus(),e.onchecked&&e.onchecked(e),e.signal&&bs.signal(e.signal)})},onUnchecked:function(){e.checked=!1,_.defer(function(){e.emCheckboxAll&&e.emCheckboxAll.refreshCheckedStatus(),e.onunchecked&&e.onunchecked(e),e.signal&&bs.signal(e.signal)})},onChange:function(){_.defer(function(){e.onchange&&e.onchange(e)})}}),this.checkedChanged(this.checked)},e}(),l=r(s.prototype,"label",[t.bindable],{enumerable:!0,initializer:null}),c=r(s.prototype,"title",[t.bindable],{enumerable:!0,initializer:null}),d=r(s.prototype,"classes",[t.bindable],{enumerable:!0,initializer:function(){return"fitted"}}),u=r(s.prototype,"onchange",[t.bindable],{enumerable:!0,initializer:null}),m=r(s.prototype,"onchecked",[t.bindable],{enumerable:!0,initializer:null}),p=r(s.prototype,"onunchecked",[t.bindable],{enumerable:!0,initializer:null}),g=r(s.prototype,"emCheckboxAll",[t.bindable],{enumerable:!0,initializer:null}),h=r(s.prototype,"checked",[a],{enumerable:!0,initializer:null}),b=r(s.prototype,"signal",[t.bindable],{enumerable:!0,initializer:null}),o=s))||o)}),define("resources/elements/em-confirm-modal",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.EmConfirmModal=void 0;e.EmConfirmModal=function(){function e(){n(this,e),this.config={}}return e.prototype.detached=function(){$(this.md).remove()},e.prototype.attached=function(){var e=this;$(this.md).modal({closable:!1,allowMultiple:!0,onApprove:function(){e.onapprove&&e.onapprove()},onDeny:function(){e.ondeny&&e.ondeny()}})},e.prototype.reset=function(){this.config={title:"操作确认",content:"确定要执行该操作吗?",warning:!1}},e.prototype.show=function(e){this.reset(),e&&(this.config=_.extend(this.config,e)),e&&e.onapprove&&(this.onapprove=e.onapprove),e&&e.ondeny&&(this.ondeny=e.ondeny),$(this.md).modal("show")},e.prototype.hide=function(){$(this.md).modal("hide")},e}()}),define("resources/elements/em-dropdown",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmDropdown=void 0;var a,o,s,l,c,d,u,m,p;e.EmDropdown=(a=(0,t.bindable)({defaultBindingMode:t.bindingMode.twoWay}),o=function(){function e(){i(this,e),n(this,"name",s,this),n(this,"text",l,this),n(this,"labelProp",c,this),n(this,"valueProp",d,this),n(this,"selectedItem",u,this),n(this,"menuItems",m,this),n(this,"classes",p,this)}return e.prototype.selectedItemChanged=function(e,t){var n=this;e&&_.defer(function(){$(n.dropdown).dropdown("set selected",e)})},e.prototype.menuItemsChanged=function(e,t){_.isEmpty(e)&&($(this.dropdown).dropdown("clear"),this.selectedItem=null)},e.prototype.initDropdownHandler=function(e){var t=this;e&&_.defer(function(){$(t.dropdown).dropdown({onChange:function(e,n,i){t.selectedItem=e}}).dropdown("set selected",t.selectedItem)})},e}(),s=r(o.prototype,"name",[t.bindable],{enumerable:!0,initializer:function(){return _.uniqueId("em-dropdown-")}}),l=r(o.prototype,"text",[t.bindable],{enumerable:!0,initializer:function(){return""}}),c=r(o.prototype,"labelProp",[t.bindable],{enumerable:!0,initializer:function(){return"label"}}),d=r(o.prototype,"valueProp",[t.bindable],{enumerable:!0,initializer:function(){return"value"}}),u=r(o.prototype,"selectedItem",[a],{enumerable:!0,initializer:null}),m=r(o.prototype,"menuItems",[t.bindable],{enumerable:!0,initializer:function(){return[]}}),p=r(o.prototype,"classes",[t.bindable],{enumerable:!0,initializer:function(){return"selection"}}),o)}),define("resources/elements/em-hotkeys-modal",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.EmHotkeysModal=void 0;e.EmHotkeysModal=function(){function e(){n(this,e)}return e.prototype.attached=function(){$(this.md).modal()},e.prototype.show=function(){$(this.md).modal("show")},e}()}),define("resources/elements/em-modal",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0 -})}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmModal=void 0;var a,o,s,l,c,d,u,m,p,g,h;e.EmModal=(0,t.containerless)((o=function(){function e(){i(this,e),n(this,"confirmLabel",s,this),n(this,"cancelLabel",l,this),n(this,"onapprove",c,this),n(this,"ondeny",d,this),n(this,"onshow",u,this),n(this,"onvisible",m,this),n(this,"disabled",p,this),n(this,"classes",g,this),n(this,"showConfirm",h,this),this.options={hideOnApprove:!0,autoDimmer:!0}}return e.prototype.detached=function(){$(this.modal).remove()},e.prototype.attached=function(){var e=this;$(this.modal).modal({closable:!1,autofocus:!1,observeChanges:!0,allowMultiple:!0,onShow:function(){e.onshow&&e.onshow(e)},onVisible:function(){e.onvisible&&e.onvisible(e)},onApprove:function(){return e.options.autoDimmer&&e.showDimmer(),e.onapprove&&e.onapprove(e),e.options.hideOnApprove},onDeny:function(){e.ondeny&&e.ondeny(e)}})},e.prototype.showDimmer=function(){this.loading=!0,$(this.modal).find(".dimmer").dimmer("show")},e.prototype.hideDimmer=function(){this.loading=!1,$(this.modal).find(".dimmer").dimmer("hide")},e.prototype.show=function(e){_.extend(this.options,e),$(this.modal).modal("show")},e.prototype.hide=function(){this.hideDimmer(),$(this.modal).modal("hide")},e.prototype.refresh=function(){var e=this;_.defer(function(){$(e.modal).modal("refresh")})},e}(),s=r(o.prototype,"confirmLabel",[t.bindable],{enumerable:!0,initializer:function(){return"确认"}}),l=r(o.prototype,"cancelLabel",[t.bindable],{enumerable:!0,initializer:function(){return"取消"}}),c=r(o.prototype,"onapprove",[t.bindable],{enumerable:!0,initializer:null}),d=r(o.prototype,"ondeny",[t.bindable],{enumerable:!0,initializer:null}),u=r(o.prototype,"onshow",[t.bindable],{enumerable:!0,initializer:null}),m=r(o.prototype,"onvisible",[t.bindable],{enumerable:!0,initializer:null}),p=r(o.prototype,"disabled",[t.bindable],{enumerable:!0,initializer:function(){return!1}}),g=r(o.prototype,"classes",[t.bindable],{enumerable:!0,initializer:function(){return"small"}}),h=r(o.prototype,"showConfirm",[t.bindable],{enumerable:!0,initializer:function(){return!0}}),a=o))||a}),define("resources/elements/em-user-avatar",["exports","aurelia-framework","color-hash"],function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmUserAvatar=void 0;var s,l,c;i(n),e.EmUserAvatar=(0,t.containerless)((l=function(){function e(){a(this,e),r(this,"user",c,this)}return e.prototype.userChanged=function(){if(this.user){this._calcNameChar();var e=colorHash.rgb(this.user.username);this.bgColor="rgba("+e[0]+", "+e[1]+", "+e[2]+", 0.6)",this.color="rgba("+(255-e[0])+", "+(255-e[1])+", "+(255-e[2])+", 1)"}},e.prototype._calcNameChar=function(){var e=arguments.length<=0||void 0===arguments[0]||arguments[0];this.user.name?this.nameChar=e?_.last(this.user.name):_.first(this.user.name):this.nameChar=e?_.last(this.user.username):_.first(this.user.username)},e.prototype.attached=function(){var e=this;$(this.avatarRef).hover(function(){e._calcNameChar(!1)},function(){e._calcNameChar()})},e}(),c=o(l.prototype,"user",[t.bindable],{enumerable:!0,initializer:null}),s=l))||s}),define("resources/elements/em-user-edit",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmUserEdit=void 0;var a,o,s;e.EmUserEdit=(0,t.containerless)((o=function(){function e(){i(this,e),n(this,"user",s,this)}return e.prototype.show=function(){this.emModal.show({hideOnApprove:!1,autoDimmer:!0})},e.prototype.showHandler=function(){},e.prototype.attached=function(){$(this.frm).form({on:"blur",inline:!0,fields:{name:"empty",mail:["empty","email"]}})},e.prototype._chkOk=function(){var e=this.user.password;return!(e&&e.length<8)||(toastr.error("密码长度不能少于8位字符!"),!1)},e.prototype.approveHandler=function(e){var t=this;this._chkOk()&&$(this.frm).form("is valid")?$.post("/admin/user/update2",{username:this.user.username,password:this.user.password,name:this.user.name,mail:this.user.mails},function(n){e.hide(),t.user.password="",n.success?toastr.success("更新个人信息成功!"):toastr.error(n.data,"更新个人信息失败!")}):e.hideDimmer()},e}(),s=r(o.prototype,"user",[t.bindable],{enumerable:!0,initializer:null}),a=o))||a}),define("aurelia-templating-resources/compose",["exports","aurelia-dependency-injection","aurelia-task-queue","aurelia-templating","aurelia-pal"],function(e,t,n,i,r){"use strict";function a(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function o(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}function s(e,t){return Object.assign(t,{bindingContext:e.bindingContext,overrideContext:e.overrideContext,owningView:e.owningView,container:e.container,viewSlot:e.viewSlot,viewResources:e.viewResources,currentController:e.currentController,host:e.element})}function l(e,t){e.currentInstruction=null,e.compositionEngine.compose(t).then(function(t){e.currentController=t,e.currentViewModel=t?t.viewModel:null})}Object.defineProperty(e,"__esModule",{value:!0}),e.Compose=void 0;var c,d,u,m,p,g,h;e.Compose=(c=(0,i.customElement)("compose"),d=(0,t.inject)(r.DOM.Element,t.Container,i.CompositionEngine,i.ViewSlot,i.ViewResources,n.TaskQueue),c(u=(0,i.noView)(u=d((m=function(){function e(e,t,n,i,r,o){a(this,"model",p,this),a(this,"view",g,this),a(this,"viewModel",h,this),this.element=e,this.container=t,this.compositionEngine=n,this.viewSlot=i,this.viewResources=r,this.taskQueue=o,this.currentController=null,this.currentViewModel=null}return e.prototype.created=function(e){this.owningView=e},e.prototype.bind=function(e,t){this.bindingContext=e,this.overrideContext=t,l(this,s(this,{view:this.view,viewModel:this.viewModel,model:this.model}))},e.prototype.unbind=function(e,t){this.bindingContext=null,this.overrideContext=null;var n=!0,i=!0;this.viewSlot.removeAll(n,i)},e.prototype.modelChanged=function(e,t){var n=this;return this.currentInstruction?void(this.currentInstruction.model=e):void this.taskQueue.queueMicroTask(function(){if(n.currentInstruction)return void(n.currentInstruction.model=e);var t=n.currentViewModel;t&&"function"==typeof t.activate&&t.activate(e)})},e.prototype.viewChanged=function(e,t){var n=this,i=s(this,{view:e,viewModel:this.currentViewModel||this.viewModel,model:this.model});return this.currentInstruction?void(this.currentInstruction=i):(this.currentInstruction=i,void this.taskQueue.queueMicroTask(function(){return l(n,n.currentInstruction)}))},e.prototype.viewModelChanged=function(e,t){var n=this,i=s(this,{viewModel:e,view:this.view,model:this.model});return this.currentInstruction?void(this.currentInstruction=i):(this.currentInstruction=i,void this.taskQueue.queueMicroTask(function(){return l(n,n.currentInstruction)}))},e}(),p=o(m.prototype,"model",[i.bindable],{enumerable:!0,initializer:null}),g=o(m.prototype,"view",[i.bindable],{enumerable:!0,initializer:null}),h=o(m.prototype,"viewModel",[i.bindable],{enumerable:!0,initializer:null}),u=m))||u)||u)||u)}),define("aurelia-templating-resources/if",["exports","aurelia-templating","aurelia-dependency-injection"],function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.If=void 0;var i,r,a;e.If=(i=(0,t.customAttribute)("if"),r=(0,n.inject)(t.BoundViewFactory,t.ViewSlot),i(a=(0,t.templateController)(a=r(a=function(){function e(e,t){this.viewFactory=e,this.viewSlot=t,this.showing=!1,this.view=null,this.bindingContext=null,this.overrideContext=null}return e.prototype.bind=function(e,t){this.bindingContext=e,this.overrideContext=t,this.valueChanged(this.value)},e.prototype.valueChanged=function(e){var t=this;if(this.__queuedChanges)return void this.__queuedChanges.push(e);var n=this._runValueChanged(e);n instanceof Promise&&!function(){var e=t.__queuedChanges=[],i=function n(){if(!e.length)return void(t.__queuedChanges=void 0);var i=t._runValueChanged(e.shift())||Promise.resolve();i.then(n)};n.then(i)}()},e.prototype._runValueChanged=function(e){var t=this;if(!e){var n=void 0;return null!==this.view&&this.showing&&(n=this.viewSlot.remove(this.view),n instanceof Promise?n.then(function(){return t.view.unbind()}):this.view.unbind()),this.showing=!1,n}if(null===this.view&&(this.view=this.viewFactory.create()),this.view.isBound||this.view.bind(this.bindingContext,this.overrideContext),!this.showing)return this.showing=!0,this.viewSlot.add(this.view)},e.prototype.unbind=function(){null!==this.view&&(this.view.unbind(),this.viewFactory.isCaching&&(this.showing&&(this.showing=!1,this.viewSlot.remove(this.view,!0,!0)),this.view.returnToCache(),this.view=null))},e}())||a)||a)||a)}),define("aurelia-templating-resources/with",["exports","aurelia-dependency-injection","aurelia-templating","aurelia-binding"],function(e,t,n,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.With=void 0;var r,a,o;e.With=(r=(0,n.customAttribute)("with"),a=(0,t.inject)(n.BoundViewFactory,n.ViewSlot),r(o=(0,n.templateController)(o=a(o=function(){function e(e,t){this.viewFactory=e,this.viewSlot=t,this.parentOverrideContext=null,this.view=null}return e.prototype.bind=function(e,t){this.parentOverrideContext=t,this.valueChanged(this.value)},e.prototype.valueChanged=function(e){var t=(0,i.createOverrideContext)(e,this.parentOverrideContext);this.view?this.view.bind(e,t):(this.view=this.viewFactory.create(),this.view.bind(e,t),this.viewSlot.add(this.view))},e.prototype.unbind=function(){this.parentOverrideContext=null,this.view&&this.view.unbind()},e}())||o)||o)||o)}),define("aurelia-templating-resources/repeat",["exports","aurelia-dependency-injection","aurelia-binding","aurelia-templating","./repeat-strategy-locator","./repeat-utilities","./analyze-view-factory","./abstract-repeater"],function(e,t,n,i,r,a,o,s){"use strict";function l(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.Repeat=void 0;var m,p,g,h,b,f,_,v;e.Repeat=(m=(0,i.customAttribute)("repeat"),p=(0,t.inject)(i.BoundViewFactory,i.TargetInstruction,i.ViewSlot,i.ViewResources,n.ObserverLocator,r.RepeatStrategyLocator),m(g=(0,i.templateController)(g=p((h=function(e){function t(t,n,i,r,s,d){var u=c(this,e.call(this,{local:"item",viewsRequireLifecycle:(0,o.viewsRequireLifecycle)(t)}));return l(u,"items",b,u),l(u,"local",f,u),l(u,"key",_,u),l(u,"value",v,u),u.viewFactory=t,u.instruction=n,u.viewSlot=i,u.lookupFunctions=r.lookupFunctions,u.observerLocator=s,u.key="key",u.value="value",u.strategyLocator=d,u.ignoreMutation=!1,u.sourceExpression=(0,a.getItemsSourceExpression)(u.instruction,"repeat.for"),u.isOneTime=(0,a.isOneTime)(u.sourceExpression),u.viewsRequireLifecycle=(0,o.viewsRequireLifecycle)(t),u}return d(t,e),t.prototype.call=function(e,t){this[e](this.items,t)},t.prototype.bind=function(e,t){this.scope={bindingContext:e,overrideContext:t},this.matcherBinding=this._captureAndRemoveMatcherBinding(),this.itemsChanged()},t.prototype.unbind=function(){this.scope=null,this.items=null,this.matcherBinding=null,this.viewSlot.removeAll(!0),this._unsubscribeCollection()},t.prototype._unsubscribeCollection=function(){this.collectionObserver&&(this.collectionObserver.unsubscribe(this.callContext,this),this.collectionObserver=null,this.callContext=null)},t.prototype.itemsChanged=function(){if(this._unsubscribeCollection(),this.scope){var e=this.items;if(this.strategy=this.strategyLocator.getStrategy(e),!this.strategy)throw new Error("Value for '"+this.sourceExpression+"' is non-repeatable");this.isOneTime||this._observeInnerCollection()||this._observeCollection(),this.strategy.instanceChanged(this,e)}},t.prototype._getInnerCollection=function(){var e=(0,a.unwrapExpression)(this.sourceExpression);return e?e.evaluate(this.scope,null):null},t.prototype.handleCollectionMutated=function(e,t){this.collectionObserver&&this.strategy.instanceMutated(this,e,t)},t.prototype.handleInnerCollectionMutated=function(e,t){var n=this;if(this.collectionObserver&&!this.ignoreMutation){this.ignoreMutation=!0;var i=this.sourceExpression.evaluate(this.scope,this.lookupFunctions);this.observerLocator.taskQueue.queueMicroTask(function(){return n.ignoreMutation=!1}),i===this.items?this.itemsChanged():this.items=i}},t.prototype._observeInnerCollection=function(){var e=this._getInnerCollection(),t=this.strategyLocator.getStrategy(e);return!!t&&(this.collectionObserver=t.getCollectionObserver(this.observerLocator,e),!!this.collectionObserver&&(this.callContext="handleInnerCollectionMutated",this.collectionObserver.subscribe(this.callContext,this),!0))},t.prototype._observeCollection=function(){var e=this.items;this.collectionObserver=this.strategy.getCollectionObserver(this.observerLocator,e),this.collectionObserver&&(this.callContext="handleCollectionMutated",this.collectionObserver.subscribe(this.callContext,this))},t.prototype._captureAndRemoveMatcherBinding=function(){if(this.viewFactory.viewFactory)for(var e=this.viewFactory.viewFactory.instructions,t=Object.keys(e),n=0;n0?(b=e.removeViews(u,!0,!e.viewsRequireLifecycle),h=function(){for(var o=0;oi;)r--,e.removeView(r,!0,!e.viewsRequireLifecycle);for(var a=e.local,o=0;o0)return Promise.all(o).then(function(){var a=r._handleAddedSplices(e,n,i);(0,t.updateOverrideContexts)(e.views(),a)});var g=this._handleAddedSplices(e,n,i);(0,t.updateOverrideContexts)(e.views(),g)},e.prototype._handleAddedSplices=function(e,n,i){for(var r=void 0,a=void 0,o=n.length,s=0,l=i.length;sc.index)&&(a=r);d0&&(t-=1);t0?Promise.all(d).then(function(){(0,t.updateOverrideContexts)(e.views(),0)}):(0,t.updateOverrideContexts)(e.views(),0)},e.prototype._getViewIndexByKey=function(e,t){var n=void 0,i=void 0,r=void 0;for(n=0,i=e.viewCount();n0?Promise.all(d).then(function(){(0,t.updateOverrideContexts)(e.views(),0)}):(0,t.updateOverrideContexts)(e.views(),0)},e.prototype._getViewIndexByValue=function(e,t){var n=void 0,i=void 0,r=void 0;for(n=0,i=e.viewCount();n0)for(s>i&&(s=i),r=0,a=s;r)<[^<]*)*<\/script>/gi;e.HTMLSanitizer=function(){function e(){}return e.prototype.sanitize=function(e){return e.replace(t,"")},e}()}),define("aurelia-templating-resources/replaceable",["exports","aurelia-dependency-injection","aurelia-templating"],function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Replaceable=void 0;var i,r,a;e.Replaceable=(i=(0,n.customAttribute)("replaceable"),r=(0,t.inject)(n.BoundViewFactory,n.ViewSlot),i(a=(0,n.templateController)(a=r(a=function(){function e(e,t){this.viewFactory=e,this.viewSlot=t,this.view=null}return e.prototype.bind=function(e,t){null===this.view&&(this.view=this.viewFactory.create(),this.viewSlot.add(this.view)),this.view.bind(e,t)},e.prototype.unbind=function(){this.view.unbind()},e}())||a)||a)||a)}),define("aurelia-templating-resources/focus",["exports","aurelia-templating","aurelia-binding","aurelia-dependency-injection","aurelia-task-queue","aurelia-pal"],function(e,t,n,i,r,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Focus=void 0;var o,s,l;e.Focus=(o=(0,t.customAttribute)("focus",n.bindingMode.twoWay),s=(0,i.inject)(a.DOM.Element,r.TaskQueue),o(l=s(l=function(){function e(e,t){var n=this;this.element=e,this.taskQueue=t,this.isAttached=!1,this.needsApply=!1,this.focusListener=function(e){n.value=!0},this.blurListener=function(e){a.DOM.activeElement!==n.element&&(n.value=!1)}}return e.prototype.valueChanged=function(e){this.isAttached?this._apply():this.needsApply=!0},e.prototype._apply=function(){var e=this;this.value?this.taskQueue.queueMicroTask(function(){e.value&&e.element.focus()}):this.element.blur()},e.prototype.attached=function(){this.isAttached=!0,this.needsApply&&(this.needsApply=!1,this._apply()),this.element.addEventListener("focus",this.focusListener),this.element.addEventListener("blur",this.blurListener)},e.prototype.detached=function(){this.isAttached=!1,this.element.removeEventListener("focus",this.focusListener),this.element.removeEventListener("blur",this.blurListener)},e}())||l)||l)}),define("aurelia-templating-resources/css-resource",["exports","aurelia-templating","aurelia-loader","aurelia-dependency-injection","aurelia-path","aurelia-pal"],function(e,t,n,i,r,a){"use strict";function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e,t){if("string"!=typeof t)throw new Error("Failed loading required CSS file: "+e);return t.replace(d,function(t,n){var i=n.charAt(0);return"'"!==i&&'"'!==i||(n=n.substr(1,n.length-2)),"url('"+(0,r.relativeToFile)(n,e)+"')"})}function c(e){var n,i,r=(n=(0,t.resource)(new u(e)),n(i=function(e){function t(){return o(this,e.apply(this,arguments))}return s(t,e),t}(m))||i);return r}Object.defineProperty(e,"__esModule",{value:!0}),e._createCSSResource=c;var d=/url\((?!['"]data)([^)]+)\)/gi,u=function(){function e(e){this.address=e,this._scoped=null,this._global=!1,this._alreadyGloballyInjected=!1}return e.prototype.initialize=function(e,t){this._scoped=new t(this)},e.prototype.register=function(e,t){"scoped"===t?e.registerViewEngineHooks(this._scoped):this._global=!0},e.prototype.load=function(e){var t=this;return e.get(n.Loader).loadText(this.address).catch(function(e){return null}).then(function(e){e=l(t.address,e),t._scoped.css=e,t._global&&(t._alreadyGloballyInjected=!0,a.DOM.injectStyles(e))})},e}(),m=function(){function e(e){this.owner=e,this.css=null}return e.prototype.beforeCompile=function(e,t,n){if(n.targetShadowDOM)a.DOM.injectStyles(this.css,e,!0);else if(a.FEATURE.scopedCSS){var i=a.DOM.injectStyles(this.css,e,!0);i.setAttribute("scoped","scoped")}else this.owner._alreadyGloballyInjected||(a.DOM.injectStyles(this.css),this.owner._alreadyGloballyInjected=!0)},e}()}),define("aurelia-templating-resources/binding-mode-behaviors",["exports","aurelia-binding","aurelia-metadata"],function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TwoWayBindingBehavior=e.OneWayBindingBehavior=e.OneTimeBindingBehavior=void 0;var i,r,a,o,s,l,c={bind:function(e,t,n){e.originalMode=e.mode,e.mode=this.mode},unbind:function(e,t){e.mode=e.originalMode,e.originalMode=null}};e.OneTimeBindingBehavior=(i=(0,n.mixin)(c),i(r=function(){this.mode=t.bindingMode.oneTime})||r),e.OneWayBindingBehavior=(a=(0,n.mixin)(c),a(o=function(){this.mode=t.bindingMode.oneWay})||o),e.TwoWayBindingBehavior=(s=(0,n.mixin)(c),s(l=function(){this.mode=t.bindingMode.twoWay})||l)}),define("aurelia-templating-resources/throttle-binding-behavior",["exports","aurelia-binding"],function(e,t){"use strict";function n(e){var t=this,n=this.throttleState,i=+new Date-n.last;return i>=n.delay?(clearTimeout(n.timeoutId),n.timeoutId=null,n.last=+new Date,void this.throttledMethod(e)):(n.newValue=e,void(null===n.timeoutId&&(n.timeoutId=setTimeout(function(){n.timeoutId=null,n.last=+new Date,t.throttledMethod(n.newValue)},n.delay-i))))}Object.defineProperty(e,"__esModule",{value:!0}),e.ThrottleBindingBehavior=void 0;e.ThrottleBindingBehavior=function(){function e(){}return e.prototype.bind=function(e,i){var r=arguments.length<=2||void 0===arguments[2]?200:arguments[2],a="updateTarget";e.callSource?a="callSource":e.updateSource&&e.mode===t.bindingMode.twoWay&&(a="updateSource"),e.throttledMethod=e[a],e.throttledMethod.originalName=a,e[a]=n,e.throttleState={delay:r,last:0,timeoutId:null}},e.prototype.unbind=function(e,t){var n=e.throttledMethod.originalName;e[n]=e.throttledMethod,e.throttledMethod=null,clearTimeout(e.throttleState.timeoutId),e.throttleState=null},e}()}),define("aurelia-templating-resources/debounce-binding-behavior",["exports","aurelia-binding"],function(e,t){"use strict";function n(e){var t=this,n=this.debounceState;return n.immediate?(n.immediate=!1,void this.debouncedMethod(e)):(clearTimeout(n.timeoutId),void(n.timeoutId=setTimeout(function(){return t.debouncedMethod(e)},n.delay)))}Object.defineProperty(e,"__esModule",{value:!0}),e.DebounceBindingBehavior=void 0;e.DebounceBindingBehavior=function(){function e(){}return e.prototype.bind=function(e,i){var r=arguments.length<=2||void 0===arguments[2]?200:arguments[2],a="updateTarget";e.callSource?a="callSource":e.updateSource&&e.mode===t.bindingMode.twoWay&&(a="updateSource"),e.debouncedMethod=e[a],e.debouncedMethod.originalName=a,e[a]=n,e.debounceState={delay:r,timeoutId:null,immediate:"updateTarget"===a}},e.prototype.unbind=function(e,t){var n=e.debouncedMethod.originalName;e[n]=e.debouncedMethod,e.debouncedMethod=null,clearTimeout(e.debounceState.timeoutId),e.debounceState=null},e}()}),define("aurelia-templating-resources/signal-binding-behavior",["exports","./binding-signaler"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SignalBindingBehavior=void 0;e.SignalBindingBehavior=function(){function e(e){this.signals=e.signals}return e.inject=function(){return[t.BindingSignaler]},e.prototype.bind=function(e,t){if(!e.updateTarget)throw new Error("Only property bindings and string interpolation bindings can be signaled. Trigger, delegate and call bindings cannot be signaled.");if(3===arguments.length){var n=arguments[2],i=this.signals[n]||(this.signals[n]=[]);i.push(e),e.signalName=n}else{if(!(arguments.length>3))throw new Error("Signal name is required.");for(var r=Array.prototype.slice.call(arguments,2),a=r.length;a--;){var o=r[a],s=this.signals[o]||(this.signals[o]=[]);s.push(e)}e.signalName=r}},e.prototype.unbind=function(e,t){var n=e.signalName;if(e.signalName=null,Array.isArray(n))for(var i=n,r=i.length;r--;){var a=i[r],o=this.signals[a];o.splice(o.indexOf(e),1)}else{var s=this.signals[n];s.splice(s.indexOf(e),1)}},e}()}),define("aurelia-templating-resources/binding-signaler",["exports","aurelia-binding"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BindingSignaler=void 0;e.BindingSignaler=function(){function e(){this.signals={}}return e.prototype.signal=function(e){var n=this.signals[e];if(n)for(var i=n.length;i--;)n[i].call(t.sourceContext)},e}()}),define("aurelia-templating-resources/update-trigger-binding-behavior",["exports","aurelia-binding"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UpdateTriggerBindingBehavior=void 0;var n,i,r="The updateTrigger binding behavior requires at least one event name argument: eg ",a="The updateTrigger binding behavior can only be applied to two-way bindings on input/select elements.";e.UpdateTriggerBindingBehavior=(i=n=function(){function e(e){this.eventManager=e}return e.prototype.bind=function(e,n){for(var i=arguments.length,o=Array(i>2?i-2:0),s=2;s]/gm,function(e){return O[e]})}function n(e){return e.nodeName.toLowerCase()}function i(e,t){var n=e&&e.exec(t);return n&&0===n.index}function r(e){return S.test(e)}function a(e){var t,n,i,a,o=e.className+" ";if(o+=e.parentNode?e.parentNode.className:"",n=T.exec(o))return y(n[1])?n[1]:"no-highlight";for(o=o.split(/\s+/),t=0,i=o.length;t"}function s(e){d+=""}function l(e){("start"===e.event?o:s)(e.node)}for(var c=0,d="",u=[];e.length||i.length;){var m=a();if(d+=t(r.substr(c,m[0].offset-c)),c=m[0].offset,m===e){u.reverse().forEach(s);do l(m.splice(0,1)[0]),m=a();while(m===e&&m.length&&m[0].offset===c);u.reverse().forEach(o)}else"start"===m[0].event?u.push(m[0].node):u.pop(),l(m.splice(0,1)[0])}return d+t(r.substr(c))}function c(e){function t(e){return e&&e.source||e}function n(n,i){return new RegExp(t(n),"m"+(e.case_insensitive?"i":"")+(i?"g":""))}function i(r,a){if(!r.compiled){if(r.compiled=!0,r.keywords=r.keywords||r.beginKeywords,r.keywords){var s={},l=function(t,n){e.case_insensitive&&(n=n.toLowerCase()),n.split(" ").forEach(function(e){var n=e.split("|");s[n[0]]=[t,n[1]?Number(n[1]):1]})};"string"==typeof r.keywords?l("keyword",r.keywords):w(r.keywords).forEach(function(e){l(e,r.keywords[e])}),r.keywords=s}r.lexemesRe=n(r.lexemes||/\w+/,!0),a&&(r.beginKeywords&&(r.begin="\\b("+r.beginKeywords.split(" ").join("|")+")\\b"),r.begin||(r.begin=/\B|\b/),r.beginRe=n(r.begin),r.end||r.endsWithParent||(r.end=/\B|\b/),r.end&&(r.endRe=n(r.end)),r.terminator_end=t(r.end)||"",r.endsWithParent&&a.terminator_end&&(r.terminator_end+=(r.end?"|":"")+a.terminator_end)),r.illegal&&(r.illegalRe=n(r.illegal)),null==r.relevance&&(r.relevance=1),r.contains||(r.contains=[]);var c=[];r.contains.forEach(function(e){e.variants?e.variants.forEach(function(t){c.push(o(e,t))}):c.push("self"===e?r:e)}),r.contains=c,r.contains.forEach(function(e){i(e,r)}),r.starts&&i(r.starts,a);var d=r.contains.map(function(e){return e.beginKeywords?"\\.?("+e.begin+")\\.?":e.begin}).concat([r.terminator_end,r.illegal]).map(t).filter(Boolean);r.terminators=d.length?n(d.join("|"),!0):{exec:function(){return null}}}}i(e)}function d(e,n,r,a){function o(e,t){var n,r;for(n=0,r=t.contains.length;n',a+t+o}function g(){var e,n,i,r;if(!w.keywords)return t(T);for(r="",n=0,w.lexemesRe.lastIndex=0,i=w.lexemesRe.exec(T);i;)r+=t(T.substr(n,i.index-n)),e=m(w,i),e?(N+=e[1],r+=p(e[0],t(i[0]))):r+=t(i[0]),n=w.lexemesRe.lastIndex,i=w.lexemesRe.exec(T);return r+t(T.substr(n))}function h(){var e="string"==typeof w.subLanguage;if(e&&!x[w.subLanguage])return t(T);var n=e?d(w.subLanguage,T,!0,C[w.subLanguage]):u(T,w.subLanguage.length?w.subLanguage:void 0);return w.relevance>0&&(N+=n.relevance),e&&(C[w.subLanguage]=n.top),p(n.language,n.value,!1,!0)}function b(){S+=null!=w.subLanguage?h():g(),T=""}function f(e){S+=e.className?p(e.className,"",!0):"",w=Object.create(e,{parent:{value:w}})}function _(e,t){if(T+=e,null==t)return b(),0;var n=o(t,w);if(n)return n.skip?T+=t:(n.excludeBegin&&(T+=t),b(),n.returnBegin||n.excludeBegin||(T=t)),f(n,t),n.returnBegin?0:t.length;var i=s(w,t);if(i){var r=w;r.skip?T+=t:(r.returnEnd||r.excludeEnd||(T+=t),b(),r.excludeEnd&&(T=t));do w.className&&(S+=k),w.skip||(N+=w.relevance),w=w.parent;while(w!==i.parent);return i.starts&&f(i.starts,""),r.returnEnd?0:t.length}if(l(t,w))throw new Error('Illegal lexeme "'+t+'" for mode "'+(w.className||"")+'"');return T+=t,t.length||1}var v=y(e);if(!v)throw new Error('Unknown language: "'+e+'"');c(v);var E,w=a||v,C={},S="";for(E=w;E!==v;E=E.parent)E.className&&(S=p(E.className,"",!0)+S);var T="",N=0;try{for(var O,A,D=0;;){if(w.terminators.lastIndex=D,O=w.terminators.exec(n),!O)break;A=_(n.substr(D,O.index-D),O[0]),D=O.index+A}for(_(n.substr(D)),E=w;E.parent;E=E.parent)E.className&&(S+=k);return{relevance:N,value:S,language:e,top:w}}catch(e){if(e.message&&e.message.indexOf("Illegal")!==-1)return{relevance:0,value:t(n)};throw e}}function u(e,n){n=n||M.languages||w(x);var i={relevance:0,value:t(e)},r=i;return n.filter(y).forEach(function(t){var n=d(t,e,!1);n.language=t,n.relevance>r.relevance&&(r=n),n.relevance>i.relevance&&(r=i,i=n)}),r.language&&(i.second_best=r),i}function m(e){return M.tabReplace||M.useBR?e.replace(N,function(e,t){return M.useBR&&"\n"===e?"
    ":M.tabReplace?t.replace(/\t/g,M.tabReplace):void 0}):e}function p(e,t,n){var i=t?C[t]:n,r=[e.trim()];return e.match(/\bhljs\b/)||r.push("hljs"),e.indexOf(i)===-1&&r.push(i),r.join(" ").trim()}function g(e){var t,n,i,o,c,g=a(e);r(g)||(M.useBR?(t=document.createElementNS("http://www.w3.org/1999/xhtml","div"),t.innerHTML=e.innerHTML.replace(/\n/g,"").replace(//g,"\n")):t=e,c=t.textContent,i=g?d(g,c,!0):u(c),n=s(t),n.length&&(o=document.createElementNS("http://www.w3.org/1999/xhtml","div"),o.innerHTML=i.value,i.value=l(n,s(o),c)),i.value=m(i.value),e.innerHTML=i.value,e.className=p(e.className,g,i.language),e.result={language:i.language,re:i.relevance},i.second_best&&(e.second_best={language:i.second_best.language,re:i.second_best.relevance}))}function h(e){M=o(M,e)}function b(){if(!b.called){b.called=!0;var e=document.querySelectorAll("pre code");E.forEach.call(e,g)}}function f(){addEventListener("DOMContentLoaded",b,!1),addEventListener("load",b,!1)}function _(t,n){var i=x[t]=n(e);i.aliases&&i.aliases.forEach(function(e){C[e]=t})}function v(){return w(x)}function y(e){return e=(e||"").toLowerCase(),x[e]||x[C[e]]}var E=[],w=Object.keys,x={},C={},S=/^(no-?highlight|plain|text)$/i,T=/\blang(?:uage)?-([\w-]+)\b/i,N=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,k="",M={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},O={"&":"&","<":"<",">":">"};return e.highlight=d,e.highlightAuto=u,e.fixMarkup=m,e.highlightBlock=g,e.configure=h,e.initHighlighting=b,e.initHighlightingOnLoad=f,e.registerLanguage=_,e.listLanguages=v,e.getLanguage=y,e.inherit=o,e.IDENT_RE="[a-zA-Z]\\w*",e.UNDERSCORE_IDENT_RE="[a-zA-Z_]\\w*",e.NUMBER_RE="\\b\\d+(\\.\\d+)?",e.C_NUMBER_RE="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BINARY_NUMBER_RE="\\b(0b[01]+)",e.RE_STARTERS_RE="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BACKSLASH_ESCAPE={begin:"\\\\[\\s\\S]",relevance:0},e.APOS_STRING_MODE={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},e.QUOTE_STRING_MODE={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},e.PHRASAL_WORDS_MODE={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|like)\b/},e.COMMENT=function(t,n,i){var r=e.inherit({className:"comment",begin:t,end:n,contains:[]},i||{});return r.contains.push(e.PHRASAL_WORDS_MODE),r.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|XXX):",relevance:0}),r},e.C_LINE_COMMENT_MODE=e.COMMENT("//","$"),e.C_BLOCK_COMMENT_MODE=e.COMMENT("/\\*","\\*/"),e.HASH_COMMENT_MODE=e.COMMENT("#","$"),e.NUMBER_MODE={className:"number",begin:e.NUMBER_RE,relevance:0},e.C_NUMBER_MODE={className:"number",begin:e.C_NUMBER_RE,relevance:0},e.BINARY_NUMBER_MODE={className:"number",begin:e.BINARY_NUMBER_RE,relevance:0},e.CSS_NUMBER_MODE={className:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},e.REGEXP_MODE={className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}]},e.TITLE_MODE={className:"title",begin:e.IDENT_RE,relevance:0},e.UNDERSCORE_TITLE_MODE={className:"title",begin:e.UNDERSCORE_IDENT_RE,relevance:0},e.METHOD_GUARD={begin:"\\.\\s*"+e.UNDERSCORE_IDENT_RE,relevance:0},e}),define("highlight/lib/languages/1c",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="[a-zA-Zа-яА-Я][a-zA-Z0-9_а-яА-Я]*",n="возврат дата для если и или иначе иначеесли исключение конецесли конецпопытки конецпроцедуры конецфункции конеццикла константа не перейти перем перечисление по пока попытка прервать продолжить процедура строка тогда фс функция цикл число экспорт",i="ansitooem oemtoansi ввестивидсубконто ввестидату ввестизначение ввестиперечисление ввестипериод ввестиплансчетов ввестистроку ввестичисло вопрос восстановитьзначение врег выбранныйплансчетов вызватьисключение датагод датамесяц датачисло добавитьмесяц завершитьработусистемы заголовоксистемы записьжурналарегистрации запуститьприложение зафиксироватьтранзакцию значениевстроку значениевстрокувнутр значениевфайл значениеизстроки значениеизстрокивнутр значениеизфайла имякомпьютера имяпользователя каталогвременныхфайлов каталогиб каталогпользователя каталогпрограммы кодсимв командасистемы конгода конецпериодаби конецрассчитанногопериодаби конецстандартногоинтервала конквартала конмесяца коннедели лев лог лог10 макс максимальноеколичествосубконто мин монопольныйрежим названиеинтерфейса названиенабораправ назначитьвид назначитьсчет найти найтипомеченныенаудаление найтиссылки началопериодаби началостандартногоинтервала начатьтранзакцию начгода начквартала начмесяца начнедели номерднягода номерднянедели номернеделигода нрег обработкаожидания окр описаниеошибки основнойжурналрасчетов основнойплансчетов основнойязык открытьформу открытьформумодально отменитьтранзакцию очиститьокносообщений периодстр полноеимяпользователя получитьвремята получитьдатута получитьдокументта получитьзначенияотбора получитьпозициюта получитьпустоезначение получитьта прав праводоступа предупреждение префиксавтонумерации пустаястрока пустоезначение рабочаядаттьпустоезначение рабочаядата разделительстраниц разделительстрок разм разобратьпозициюдокумента рассчитатьрегистрына рассчитатьрегистрыпо сигнал симв символтабуляции создатьобъект сокрл сокрлп сокрп сообщить состояние сохранитьзначение сред статусвозврата стрдлина стрзаменить стрколичествострок стрполучитьстроку стрчисловхождений сформироватьпозициюдокумента счетпокоду текущаядата текущеевремя типзначения типзначениястр удалитьобъекты установитьтана установитьтапо фиксшаблон формат цел шаблон",r={begin:'""'},a={className:"string",begin:'"',end:'"|$',contains:[r]},o={className:"string",begin:"\\|",end:'"|$',contains:[r]};return{case_insensitive:!0,lexemes:t,keywords:{keyword:n,built_in:i},contains:[e.C_LINE_COMMENT_MODE,e.NUMBER_MODE,a,o,{className:"function",begin:"(процедура|функция)",end:"$",lexemes:t,keywords:"процедура функция",contains:[{begin:"экспорт",endsWithParent:!0,lexemes:t,keywords:"экспорт",contains:[e.C_LINE_COMMENT_MODE]},{className:"params",begin:"\\(",end:"\\)",lexemes:t,keywords:"знач",contains:[a,o]},e.C_LINE_COMMENT_MODE,e.inherit(e.TITLE_MODE,{begin:t})]},{className:"meta",begin:"#",end:"$"},{className:"number",begin:"'\\d{2}\\.\\d{2}\\.(\\d{2}|\\d{4})'"}]}}}),define("highlight/lib/languages/abnf",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={ruleDeclaration:"^[a-zA-Z][a-zA-Z0-9-]*",unexpectedChars:"[!@#$^&',?+~`|:]"},n=["ALPHA","BIT","CHAR","CR","CRLF","CTL","DIGIT","DQUOTE","HEXDIG","HTAB","LF","LWSP","OCTET","SP","VCHAR","WSP"],i=e.COMMENT(";","$"),r={className:"symbol",begin:/%b[0-1]+(-[0-1]+|(\.[0-1]+)+){0,1}/},a={className:"symbol",begin:/%d[0-9]+(-[0-9]+|(\.[0-9]+)+){0,1}/},o={className:"symbol",begin:/%x[0-9A-F]+(-[0-9A-F]+|(\.[0-9A-F]+)+){0,1}/},s={className:"symbol",begin:/%[si]/},l={begin:t.ruleDeclaration+"\\s*=",returnBegin:!0,end:/=/,relevance:0,contains:[{className:"attribute",begin:t.ruleDeclaration}]};return{illegal:t.unexpectedChars,keywords:n.join(" "),contains:[l,i,r,a,o,s,e.QUOTE_STRING_MODE,e.NUMBER_MODE]}}}),define("highlight/lib/languages/accesslog",["require","exports","module"],function(e,t,n){n.exports=function(e){return{contains:[{className:"number",begin:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{className:"number",begin:"\\b\\d+\\b",relevance:0},{className:"string",begin:'"(GET|POST|HEAD|PUT|DELETE|CONNECT|OPTIONS|PATCH|TRACE)',end:'"',keywords:"GET POST HEAD PUT DELETE CONNECT OPTIONS PATCH TRACE",illegal:"\\n",relevance:10},{className:"string",begin:/\[/,end:/\]/,illegal:"\\n"},{className:"string",begin:'"',end:'"',illegal:"\\n"}]}}}),define("highlight/lib/languages/actionscript",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="[a-zA-Z_$][a-zA-Z0-9_$]*",n="([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)",i={className:"rest_arg",begin:"[.]{3}",end:t,relevance:10};return{aliases:["as"],keywords:{keyword:"as break case catch class const continue default delete do dynamic each else extends final finally for function get if implements import in include instanceof interface internal is namespace native new override package private protected public return set static super switch this throw try typeof use var void while with",literal:"true false null undefined"},contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,{className:"class",beginKeywords:"package",end:"{",contains:[e.TITLE_MODE]},{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.TITLE_MODE]},{className:"meta",beginKeywords:"import include",end:";",keywords:{"meta-keyword":"import include"}},{className:"function",beginKeywords:"function",end:"[{;]",excludeEnd:!0,illegal:"\\S",contains:[e.TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,i]},{begin:":\\s*"+n}]},e.METHOD_GUARD],illegal:/#/}}}),define("highlight/lib/languages/ada",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="\\d(_|\\d)*",n="[eE][-+]?"+t,i=t+"(\\."+t+")?("+n+")?",r="\\w+",a=t+"#"+r+"(\\."+r+")?#("+n+")?",o="\\b("+a+"|"+i+")",s="[A-Za-z](_?[A-Za-z0-9.])*",l="[]{}%#'\"",c=e.COMMENT("--","$"),d={begin:"\\s+:\\s+",end:"\\s*(:=|;|\\)|=>|$)",illegal:l,contains:[{beginKeywords:"loop for declare others",endsParent:!0},{className:"keyword",beginKeywords:"not null constant access function procedure in out aliased exception"},{className:"type",begin:s,endsParent:!0,relevance:0}]};return{case_insensitive:!0,keywords:{keyword:"abort else new return abs elsif not reverse abstract end accept entry select access exception of separate aliased exit or some all others subtype and for out synchronized array function overriding at tagged generic package task begin goto pragma terminate body private then if procedure type case in protected constant interface is raise use declare range delay limited record when delta loop rem while digits renames with do mod requeue xor",literal:"True False"},contains:[c,{className:"string",begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{className:"string",begin:/'.'/},{className:"number",begin:o,relevance:0},{className:"symbol",begin:"'"+s},{className:"title",begin:"(\\bwith\\s+)?(\\bprivate\\s+)?\\bpackage\\s+(\\bbody\\s+)?",end:"(is|$)",keywords:"package body",excludeBegin:!0,excludeEnd:!0,illegal:l},{begin:"(\\b(with|overriding)\\s+)?\\b(function|procedure)\\s+",end:"(\\bis|\\bwith|\\brenames|\\)\\s*;)",keywords:"overriding function procedure with is renames return",returnBegin:!0,contains:[c,{className:"title",begin:"(\\bwith\\s+)?\\b(function|procedure)\\s+",end:"(\\(|\\s+|$)",excludeBegin:!0,excludeEnd:!0,illegal:l},d,{className:"type",begin:"\\breturn\\s+",end:"(\\s+|;|$)",keywords:"return",excludeBegin:!0,excludeEnd:!0,endsParent:!0,illegal:l}]},{className:"type",begin:"\\b(sub)?type\\s+",end:"\\s+",keywords:"type",excludeBegin:!0,illegal:l},d]}}}),define("highlight/lib/languages/apache",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"number",begin:"[\\$%]\\d+"};return{aliases:["apacheconf"],case_insensitive:!0,contains:[e.HASH_COMMENT_MODE,{className:"section",begin:""},{className:"attribute",begin:/\w+/,relevance:0,keywords:{nomarkup:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{end:/$/,relevance:0,keywords:{literal:"on off all"},contains:[{className:"meta",begin:"\\s\\[",end:"\\]$"},{className:"variable",begin:"[\\$%]\\{",end:"\\}",contains:["self",t]},t,e.QUOTE_STRING_MODE]}}],illegal:/\S/}}}),define("highlight/lib/languages/applescript",["require","exports","module"],function(e,t,n){n.exports=function(e){var t=e.inherit(e.QUOTE_STRING_MODE,{illegal:""}),n={className:"params",begin:"\\(",end:"\\)",contains:["self",e.C_NUMBER_MODE,t]},i=e.COMMENT("--","$"),r=e.COMMENT("\\(\\*","\\*\\)",{contains:["self",i]}),a=[i,r,e.HASH_COMMENT_MODE];return{aliases:["osascript"],keywords:{keyword:"about above after against and around as at back before beginning behind below beneath beside between but by considering contain contains continue copy div does eighth else end equal equals error every exit fifth first for fourth from front get given global if ignoring in into is it its last local me middle mod my ninth not of on onto or over prop property put ref reference repeat returning script second set seventh since sixth some tell tenth that the|0 then third through thru timeout times to transaction try until where while whose with without",literal:"AppleScript false linefeed return pi quote result space tab true",built_in:"alias application boolean class constant date file integer list number real record string text activate beep count delay launch log offset read round run say summarize write character characters contents day frontmost id item length month name paragraph paragraphs rest reverse running time version weekday word words year"},contains:[t,e.C_NUMBER_MODE,{className:"built_in",begin:"\\b(clipboard info|the clipboard|info for|list (disks|folder)|mount volume|path to|(close|open for) access|(get|set) eof|current date|do shell script|get volume settings|random number|set volume|system attribute|system info|time to GMT|(load|run|store) script|scripting components|ASCII (character|number)|localized string|choose (application|color|file|file name|folder|from list|remote application|URL)|display (alert|dialog))\\b|^\\s*return\\b"},{className:"literal",begin:"\\b(text item delimiters|current application|missing value)\\b"},{className:"keyword",begin:"\\b(apart from|aside from|instead of|out of|greater than|isn't|(doesn't|does not) (equal|come before|come after|contain)|(greater|less) than( or equal)?|(starts?|ends|begins?) with|contained by|comes (before|after)|a (ref|reference)|POSIX file|POSIX path|(date|time) string|quoted form)\\b"},{beginKeywords:"on",illegal:"[${=;\\n]",contains:[e.UNDERSCORE_TITLE_MODE,n]}].concat(a),illegal:"//|->|=>|\\[\\["}}}),define("highlight/lib/languages/cpp",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"keyword", -begin:"\\b[a-z\\d_]*_t\\b"},n={className:"string",variants:[{begin:'(u8?|U)?L?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:'(u8?|U)?R"',end:'"',contains:[e.BACKSLASH_ESCAPE]},{begin:"'\\\\?.",end:"'",illegal:"."}]},i={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},r={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{"meta-keyword":"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(n,{className:"meta-string"}),{className:"meta-string",begin:"<",end:">",illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},a=e.IDENT_RE+"\\s*\\(",o={keyword:"int float while private char catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using class asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignof constexpr decltype noexcept static_assert thread_local restrict _Bool complex _Complex _Imaginary atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return",built_in:"std string cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr",literal:"true false nullptr NULL"},s=[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,i,n];return{aliases:["c","cc","h","c++","h++","hpp"],keywords:o,illegal:"",keywords:o,contains:["self",t]},{begin:e.IDENT_RE+"::",keywords:o},{variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:o,contains:s.concat([{begin:/\(/,end:/\)/,keywords:o,contains:s.concat(["self"]),relevance:0}]),relevance:0},{className:"function",begin:"("+e.IDENT_RE+"[\\*&\\s]+)+"+a,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:o,illegal:/[^\w\s\*&]/,contains:[{begin:a,returnBegin:!0,contains:[e.TITLE_MODE],relevance:0},{className:"params",begin:/\(/,end:/\)/,keywords:o,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,i,t]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,r]}]),exports:{preprocessor:r,strings:n,keywords:o}}}}),define("highlight/lib/languages/arduino",["require","exports","module"],function(e,t,n){n.exports=function(e){var t=e.getLanguage("cpp").exports;return{keywords:{keyword:"boolean byte word string String array "+t.keywords.keyword,built_in:"setup loop while catch for if do goto try switch case else default break continue return KeyboardController MouseController SoftwareSerial EthernetServer EthernetClient LiquidCrystal RobotControl GSMVoiceCall EthernetUDP EsploraTFT HttpClient RobotMotor WiFiClient GSMScanner FileSystem Scheduler GSMServer YunClient YunServer IPAddress GSMClient GSMModem Keyboard Ethernet Console GSMBand Esplora Stepper Process WiFiUDP GSM_SMS Mailbox USBHost Firmata PImage Client Server GSMPIN FileIO Bridge Serial EEPROM Stream Mouse Audio Servo File Task GPRS WiFi Wire TFT GSM SPI SD runShellCommandAsynchronously analogWriteResolution retrieveCallingNumber printFirmwareVersion analogReadResolution sendDigitalPortPair noListenOnLocalhost readJoystickButton setFirmwareVersion readJoystickSwitch scrollDisplayRight getVoiceCallStatus scrollDisplayLeft writeMicroseconds delayMicroseconds beginTransmission getSignalStrength runAsynchronously getAsynchronously listenOnLocalhost getCurrentCarrier readAccelerometer messageAvailable sendDigitalPorts lineFollowConfig countryNameWrite runShellCommand readStringUntil rewindDirectory readTemperature setClockDivider readLightSensor endTransmission analogReference detachInterrupt countryNameRead attachInterrupt encryptionType readBytesUntil robotNameWrite readMicrophone robotNameRead cityNameWrite userNameWrite readJoystickY readJoystickX mouseReleased openNextFile scanNetworks noInterrupts digitalWrite beginSpeaker mousePressed isActionDone mouseDragged displayLogos noAutoscroll addParameter remoteNumber getModifiers keyboardRead userNameRead waitContinue processInput parseCommand printVersion readNetworks writeMessage blinkVersion cityNameRead readMessage setDataMode parsePacket isListening setBitOrder beginPacket isDirectory motorsWrite drawCompass digitalRead clearScreen serialEvent rightToLeft setTextSize leftToRight requestFrom keyReleased compassRead analogWrite interrupts WiFiServer disconnect playMelody parseFloat autoscroll getPINUsed setPINUsed setTimeout sendAnalog readSlider analogRead beginWrite createChar motorsStop keyPressed tempoWrite readButton subnetMask debugPrint macAddress writeGreen randomSeed attachGPRS readString sendString remotePort releaseAll mouseMoved background getXChange getYChange answerCall getResult voiceCall endPacket constrain getSocket writeJSON getButton available connected findUntil readBytes exitValue readGreen writeBlue startLoop IPAddress isPressed sendSysex pauseMode gatewayIP setCursor getOemKey tuneWrite noDisplay loadImage switchPIN onRequest onReceive changePIN playFile noBuffer parseInt overflow checkPIN knobRead beginTFT bitClear updateIR bitWrite position writeRGB highByte writeRed setSpeed readBlue noStroke remoteIP transfer shutdown hangCall beginSMS endWrite attached maintain noCursor checkReg checkPUK shiftOut isValid shiftIn pulseIn connect println localIP pinMode getIMEI display noBlink process getBand running beginSD drawBMP lowByte setBand release bitRead prepare pointTo readRed setMode noFill remove listen stroke detach attach noTone exists buffer height bitSet circle config cursor random IRread setDNS endSMS getKey micros millis begin print write ready flush width isPIN blink clear press mkdir rmdir close point yield image BSSID click delay read text move peek beep rect line open seek fill size turn stop home find step tone sqrt RSSI SSID end bit tan cos sin pow map abs max min get run put",literal:"DIGITAL_MESSAGE FIRMATA_STRING ANALOG_MESSAGE REPORT_DIGITAL REPORT_ANALOG INPUT_PULLUP SET_PIN_MODE INTERNAL2V56 SYSTEM_RESET LED_BUILTIN INTERNAL1V1 SYSEX_START INTERNAL EXTERNAL DEFAULT OUTPUT INPUT HIGH LOW"},contains:[t.preprocessor,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE]}}}),define("highlight/lib/languages/armasm",["require","exports","module"],function(e,t,n){n.exports=function(e){return{case_insensitive:!0,aliases:["arm"],lexemes:"\\.?"+e.IDENT_RE,keywords:{meta:".2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .arm .thumb .code16 .code32 .force_thumb .thumb_func .ltorg ALIAS ALIGN ARM AREA ASSERT ATTR CN CODE CODE16 CODE32 COMMON CP DATA DCB DCD DCDU DCDO DCFD DCFDU DCI DCQ DCQU DCW DCWU DN ELIF ELSE END ENDFUNC ENDIF ENDP ENTRY EQU EXPORT EXPORTAS EXTERN FIELD FILL FUNCTION GBLA GBLL GBLS GET GLOBAL IF IMPORT INCBIN INCLUDE INFO KEEP LCLA LCLL LCLS LTORG MACRO MAP MEND MEXIT NOFP OPT PRESERVE8 PROC QN READONLY RELOC REQUIRE REQUIRE8 RLIST FN ROUT SETA SETL SETS SN SPACE SUBT THUMB THUMBX TTL WHILE WEND ",built_in:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 pc lr sp ip sl sb fp a1 a2 a3 a4 v1 v2 v3 v4 v5 v6 v7 v8 f0 f1 f2 f3 f4 f5 f6 f7 p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 q0 q1 q2 q3 q4 q5 q6 q7 q8 q9 q10 q11 q12 q13 q14 q15 cpsr_c cpsr_x cpsr_s cpsr_f cpsr_cx cpsr_cxs cpsr_xs cpsr_xsf cpsr_sf cpsr_cxsf spsr_c spsr_x spsr_s spsr_f spsr_cx spsr_cxs spsr_xs spsr_xsf spsr_sf spsr_cxsf s0 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18 s19 s20 s21 s22 s23 s24 s25 s26 s27 s28 s29 s30 s31 d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 d16 d17 d18 d19 d20 d21 d22 d23 d24 d25 d26 d27 d28 d29 d30 d31 {PC} {VAR} {TRUE} {FALSE} {OPT} {CONFIG} {ENDIAN} {CODESIZE} {CPU} {FPU} {ARCHITECTURE} {PCSTOREOFFSET} {ARMASM_VERSION} {INTER} {ROPI} {RWPI} {SWST} {NOSWST} . @"},contains:[{className:"keyword",begin:"\\b(adc|(qd?|sh?|u[qh]?)?add(8|16)?|usada?8|(q|sh?|u[qh]?)?(as|sa)x|and|adrl?|sbc|rs[bc]|asr|b[lx]?|blx|bxj|cbn?z|tb[bh]|bic|bfc|bfi|[su]bfx|bkpt|cdp2?|clz|clrex|cmp|cmn|cpsi[ed]|cps|setend|dbg|dmb|dsb|eor|isb|it[te]{0,3}|lsl|lsr|ror|rrx|ldm(([id][ab])|f[ds])?|ldr((s|ex)?[bhd])?|movt?|mvn|mra|mar|mul|[us]mull|smul[bwt][bt]|smu[as]d|smmul|smmla|mla|umlaal|smlal?([wbt][bt]|d)|mls|smlsl?[ds]|smc|svc|sev|mia([bt]{2}|ph)?|mrr?c2?|mcrr2?|mrs|msr|orr|orn|pkh(tb|bt)|rbit|rev(16|sh)?|sel|[su]sat(16)?|nop|pop|push|rfe([id][ab])?|stm([id][ab])?|str(ex)?[bhd]?|(qd?)?sub|(sh?|q|u[qh]?)?sub(8|16)|[su]xt(a?h|a?b(16)?)|srs([id][ab])?|swpb?|swi|smi|tst|teq|wfe|wfi|yield)(eq|ne|cs|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al|hs|lo)?[sptrx]?",end:"\\s"},e.COMMENT("[;@]","$",{relevance:0}),e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",relevance:0},{className:"title",begin:"\\|",end:"\\|",illegal:"\\n",relevance:0},{className:"number",variants:[{begin:"[#$=]?0x[0-9a-f]+"},{begin:"[#$=]?0b[01]+"},{begin:"[#$=]\\d+"},{begin:"\\b\\d+"}],relevance:0},{className:"symbol",variants:[{begin:"^[a-z_\\.\\$][a-z0-9_\\.\\$]+"},{begin:"^\\s*[a-z_\\.\\$][a-z0-9_\\.\\$]+:"},{begin:"[=#]\\w+"}],relevance:0}]}}}),define("highlight/lib/languages/xml",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="[A-Za-z0-9\\._:-]+",n={endsWithParent:!0,illegal:/`]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist"],case_insensitive:!0,contains:[{className:"meta",begin:"",relevance:10,contains:[{begin:"\\[",end:"\\]"}]},e.COMMENT("",{relevance:10}),{begin:"<\\!\\[CDATA\\[",end:"\\]\\]>",relevance:10},{begin:/<\?(php)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0}]},{className:"tag",begin:"|$)",end:">",keywords:{name:"style"},contains:[n],starts:{end:"",returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:"|$)",end:">",keywords:{name:"script"},contains:[n],starts:{end:"",returnEnd:!0,subLanguage:["actionscript","javascript","handlebars","xml"]}},{className:"meta",variants:[{begin:/<\?xml/,end:/\?>/,relevance:10},{begin:/<\?\w+/,end:/\?>/}]},{className:"tag",begin:"",contains:[{className:"name",begin:/[^\/><\s]+/,relevance:0},n]}]}}}),define("highlight/lib/languages/asciidoc",["require","exports","module"],function(e,t,n){n.exports=function(e){return{aliases:["adoc"],contains:[e.COMMENT("^/{4,}\\n","\\n/{4,}$",{relevance:10}),e.COMMENT("^//","$",{relevance:0}),{className:"title",begin:"^\\.\\w.*$"},{begin:"^[=\\*]{4,}\\n",end:"\\n^[=\\*]{4,}$",relevance:10},{className:"section",relevance:10,variants:[{begin:"^(={1,5}) .+?( \\1)?$"},{begin:"^[^\\[\\]\\n]+?\\n[=\\-~\\^\\+]{2,}$"}]},{className:"meta",begin:"^:.+?:",end:"\\s",excludeEnd:!0,relevance:10},{className:"meta",begin:"^\\[.+?\\]$",relevance:0},{className:"quote",begin:"^_{4,}\\n",end:"\\n_{4,}$",relevance:10},{className:"code",begin:"^[\\-\\.]{4,}\\n",end:"\\n[\\-\\.]{4,}$",relevance:10},{begin:"^\\+{4,}\\n",end:"\\n\\+{4,}$",contains:[{begin:"<",end:">",subLanguage:"xml",relevance:0}],relevance:10},{className:"bullet",begin:"^(\\*+|\\-+|\\.+|[^\\n]+?::)\\s+"},{className:"symbol",begin:"^(NOTE|TIP|IMPORTANT|WARNING|CAUTION):\\s+",relevance:10},{className:"strong",begin:"\\B\\*(?![\\*\\s])",end:"(\\n{2}|\\*)",contains:[{begin:"\\\\*\\w",relevance:0}]},{className:"emphasis",begin:"\\B'(?!['\\s])",end:"(\\n{2}|')",contains:[{begin:"\\\\'\\w",relevance:0}],relevance:0},{className:"emphasis",begin:"_(?![_\\s])",end:"(\\n{2}|_)",relevance:0},{className:"string",variants:[{begin:"``.+?''"},{begin:"`.+?'"}]},{className:"code",begin:"(`.+?`|\\+.+?\\+)",relevance:0},{className:"code",begin:"^[ \\t]",end:"$",relevance:0},{begin:"^'{3,}[ \\t]*$",relevance:10},{begin:"(link:)?(http|https|ftp|file|irc|image:?):\\S+\\[.*?\\]",returnBegin:!0,contains:[{begin:"(link|image:?):",relevance:0},{className:"link",begin:"\\w",end:"[^\\[]+",relevance:0},{className:"string",begin:"\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0,relevance:0}],relevance:10}]}}}),define("highlight/lib/languages/aspectj",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="false synchronized int abstract float private char boolean static null if const for true while long throw strictfp finally protected import native final return void enum else extends implements break transient new catch instanceof byte super volatile case assert short package default double public try this switch continue throws privileged aspectOf adviceexecution proceed cflowbelow cflow initialization preinitialization staticinitialization withincode target within execution getWithinTypeName handler thisJoinPoint thisJoinPointStaticPart thisEnclosingJoinPointStaticPart declare parents warning error soft precedence thisAspectInstance",n="get set args call";return{keywords:t,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"class",beginKeywords:"aspect",end:/[{;=]/,excludeEnd:!0,illegal:/[:;"\[\]]/,contains:[{beginKeywords:"extends implements pertypewithin perthis pertarget percflowbelow percflow issingleton"},e.UNDERSCORE_TITLE_MODE,{begin:/\([^\)]*/,end:/[)]+/,keywords:t+" "+n,excludeEnd:!1}]},{className:"class",beginKeywords:"class interface",end:/[{;=]/,excludeEnd:!0,relevance:0,keywords:"class interface",illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"pointcut after before around throwing returning",end:/[)]/,excludeEnd:!1,illegal:/["\[\]]/,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,contains:[e.UNDERSCORE_TITLE_MODE]}]},{begin:/[:]/,returnBegin:!0,end:/[{;]/,relevance:0,excludeEnd:!1,keywords:t,illegal:/["\[\]]/,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",keywords:t+" "+n},e.QUOTE_STRING_MODE]},{beginKeywords:"new throw",relevance:0},{className:"function",begin:/\w+ +\w+(\.)?\w+\s*\([^\)]*\)\s*((throws)[\w\s,]+)?[\{;]/,returnBegin:!0,end:/[{;=]/,keywords:t,excludeEnd:!0,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/,relevance:0,keywords:t,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},e.C_NUMBER_MODE,{className:"meta",begin:"@[A-Za-z]+"}]}}}),define("highlight/lib/languages/autohotkey",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={begin:/`[\s\S]/};return{case_insensitive:!0,keywords:{keyword:"Break Continue Else Gosub If Loop Return While",literal:"A|0 true false NOT AND OR",built_in:"ComSpec Clipboard ClipboardAll ErrorLevel"},contains:[{className:"built_in",begin:"A_[a-zA-Z0-9]+"},t,e.inherit(e.QUOTE_STRING_MODE,{contains:[t]}),e.COMMENT(";","$",{relevance:0}),{className:"number",begin:e.NUMBER_RE,relevance:0},{className:"variable",begin:"%",end:"%",illegal:"\\n",contains:[t]},{className:"symbol",contains:[t],variants:[{begin:'^[^\\n";]+::(?!=)'},{begin:'^[^\\n";]+:(?!=)',relevance:0}]},{begin:",\\s*,"}]}}}),define("highlight/lib/languages/autoit",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="ByRef Case Const ContinueCase ContinueLoop Default Dim Do Else ElseIf EndFunc EndIf EndSelect EndSwitch EndWith Enum Exit ExitLoop For Func Global If In Local Next ReDim Return Select Static Step Switch Then To Until Volatile WEnd While With",n="True False And Null Not Or",i="Abs ACos AdlibRegister AdlibUnRegister Asc AscW ASin Assign ATan AutoItSetOption AutoItWinGetTitle AutoItWinSetTitle Beep Binary BinaryLen BinaryMid BinaryToString BitAND BitNOT BitOR BitRotate BitShift BitXOR BlockInput Break Call CDTray Ceiling Chr ChrW ClipGet ClipPut ConsoleRead ConsoleWrite ConsoleWriteError ControlClick ControlCommand ControlDisable ControlEnable ControlFocus ControlGetFocus ControlGetHandle ControlGetPos ControlGetText ControlHide ControlListView ControlMove ControlSend ControlSetText ControlShow ControlTreeView Cos Dec DirCopy DirCreate DirGetSize DirMove DirRemove DllCall DllCallAddress DllCallbackFree DllCallbackGetPtr DllCallbackRegister DllClose DllOpen DllStructCreate DllStructGetData DllStructGetPtr DllStructGetSize DllStructSetData DriveGetDrive DriveGetFileSystem DriveGetLabel DriveGetSerial DriveGetType DriveMapAdd DriveMapDel DriveMapGet DriveSetLabel DriveSpaceFree DriveSpaceTotal DriveStatus EnvGet EnvSet EnvUpdate Eval Execute Exp FileChangeDir FileClose FileCopy FileCreateNTFSLink FileCreateShortcut FileDelete FileExists FileFindFirstFile FileFindNextFile FileFlush FileGetAttrib FileGetEncoding FileGetLongName FileGetPos FileGetShortcut FileGetShortName FileGetSize FileGetTime FileGetVersion FileInstall FileMove FileOpen FileOpenDialog FileRead FileReadLine FileReadToArray FileRecycle FileRecycleEmpty FileSaveDialog FileSelectFolder FileSetAttrib FileSetEnd FileSetPos FileSetTime FileWrite FileWriteLine Floor FtpSetProxy FuncName GUICreate GUICtrlCreateAvi GUICtrlCreateButton GUICtrlCreateCheckbox GUICtrlCreateCombo GUICtrlCreateContextMenu GUICtrlCreateDate GUICtrlCreateDummy GUICtrlCreateEdit GUICtrlCreateGraphic GUICtrlCreateGroup GUICtrlCreateIcon GUICtrlCreateInput GUICtrlCreateLabel GUICtrlCreateList GUICtrlCreateListView GUICtrlCreateListViewItem GUICtrlCreateMenu GUICtrlCreateMenuItem GUICtrlCreateMonthCal GUICtrlCreateObj GUICtrlCreatePic GUICtrlCreateProgress GUICtrlCreateRadio GUICtrlCreateSlider GUICtrlCreateTab GUICtrlCreateTabItem GUICtrlCreateTreeView GUICtrlCreateTreeViewItem GUICtrlCreateUpdown GUICtrlDelete GUICtrlGetHandle GUICtrlGetState GUICtrlRead GUICtrlRecvMsg GUICtrlRegisterListViewSort GUICtrlSendMsg GUICtrlSendToDummy GUICtrlSetBkColor GUICtrlSetColor GUICtrlSetCursor GUICtrlSetData GUICtrlSetDefBkColor GUICtrlSetDefColor GUICtrlSetFont GUICtrlSetGraphic GUICtrlSetImage GUICtrlSetLimit GUICtrlSetOnEvent GUICtrlSetPos GUICtrlSetResizing GUICtrlSetState GUICtrlSetStyle GUICtrlSetTip GUIDelete GUIGetCursorInfo GUIGetMsg GUIGetStyle GUIRegisterMsg GUISetAccelerators GUISetBkColor GUISetCoord GUISetCursor GUISetFont GUISetHelp GUISetIcon GUISetOnEvent GUISetState GUISetStyle GUIStartGroup GUISwitch Hex HotKeySet HttpSetProxy HttpSetUserAgent HWnd InetClose InetGet InetGetInfo InetGetSize InetRead IniDelete IniRead IniReadSection IniReadSectionNames IniRenameSection IniWrite IniWriteSection InputBox Int IsAdmin IsArray IsBinary IsBool IsDeclared IsDllStruct IsFloat IsFunc IsHWnd IsInt IsKeyword IsNumber IsObj IsPtr IsString Log MemGetStats Mod MouseClick MouseClickDrag MouseDown MouseGetCursor MouseGetPos MouseMove MouseUp MouseWheel MsgBox Number ObjCreate ObjCreateInterface ObjEvent ObjGet ObjName OnAutoItExitRegister OnAutoItExitUnRegister Ping PixelChecksum PixelGetColor PixelSearch ProcessClose ProcessExists ProcessGetStats ProcessList ProcessSetPriority ProcessWait ProcessWaitClose ProgressOff ProgressOn ProgressSet Ptr Random RegDelete RegEnumKey RegEnumVal RegRead RegWrite Round Run RunAs RunAsWait RunWait Send SendKeepActive SetError SetExtended ShellExecute ShellExecuteWait Shutdown Sin Sleep SoundPlay SoundSetWaveVolume SplashImageOn SplashOff SplashTextOn Sqrt SRandom StatusbarGetText StderrRead StdinWrite StdioClose StdoutRead String StringAddCR StringCompare StringFormat StringFromASCIIArray StringInStr StringIsAlNum StringIsAlpha StringIsASCII StringIsDigit StringIsFloat StringIsInt StringIsLower StringIsSpace StringIsUpper StringIsXDigit StringLeft StringLen StringLower StringMid StringRegExp StringRegExpReplace StringReplace StringReverse StringRight StringSplit StringStripCR StringStripWS StringToASCIIArray StringToBinary StringTrimLeft StringTrimRight StringUpper Tan TCPAccept TCPCloseSocket TCPConnect TCPListen TCPNameToIP TCPRecv TCPSend TCPShutdown, UDPShutdown TCPStartup, UDPStartup TimerDiff TimerInit ToolTip TrayCreateItem TrayCreateMenu TrayGetMsg TrayItemDelete TrayItemGetHandle TrayItemGetState TrayItemGetText TrayItemSetOnEvent TrayItemSetState TrayItemSetText TraySetClick TraySetIcon TraySetOnEvent TraySetPauseIcon TraySetState TraySetToolTip TrayTip UBound UDPBind UDPCloseSocket UDPOpen UDPRecv UDPSend VarGetType WinActivate WinActive WinClose WinExists WinFlash WinGetCaretPos WinGetClassList WinGetClientSize WinGetHandle WinGetPos WinGetProcess WinGetState WinGetText WinGetTitle WinKill WinList WinMenuSelectItem WinMinimizeAll WinMinimizeAllUndo WinMove WinSetOnTop WinSetState WinSetTitle WinSetTrans WinWait",r={variants:[e.COMMENT(";","$",{relevance:0}),e.COMMENT("#cs","#ce"),e.COMMENT("#comments-start","#comments-end")]},a={begin:"\\$[A-z0-9_]+"},o={className:"string",variants:[{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]},s={variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]},l={className:"meta",begin:"#",end:"$",keywords:{"meta-keyword":"comments include include-once NoTrayIcon OnAutoItStartRegister pragma compile RequireAdmin"},contains:[{begin:/\\\n/,relevance:0},{beginKeywords:"include",keywords:{"meta-keyword":"include"},end:"$",contains:[o,{className:"meta-string",variants:[{begin:"<",end:">"},{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]}]},o,r]},c={className:"symbol",begin:"@[A-z0-9_]+"},d={className:"function",beginKeywords:"Func",end:"$",illegal:"\\$|\\[|%",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:[a,o,s]}]};return{case_insensitive:!0,illegal:/\/\*/,keywords:{keyword:t,built_in:i,literal:n},contains:[r,a,o,s,l,c,d]}}}),define("highlight/lib/languages/avrasm",["require","exports","module"],function(e,t,n){n.exports=function(e){return{case_insensitive:!0,lexemes:"\\.?"+e.IDENT_RE,keywords:{keyword:"adc add adiw and andi asr bclr bld brbc brbs brcc brcs break breq brge brhc brhs brid brie brlo brlt brmi brne brpl brsh brtc brts brvc brvs bset bst call cbi cbr clc clh cli cln clr cls clt clv clz com cp cpc cpi cpse dec eicall eijmp elpm eor fmul fmuls fmulsu icall ijmp in inc jmp ld ldd ldi lds lpm lsl lsr mov movw mul muls mulsu neg nop or ori out pop push rcall ret reti rjmp rol ror sbc sbr sbrc sbrs sec seh sbi sbci sbic sbis sbiw sei sen ser ses set sev sez sleep spm st std sts sub subi swap tst wdr",built_in:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 r17 r18 r19 r20 r21 r22 r23 r24 r25 r26 r27 r28 r29 r30 r31 x|0 xh xl y|0 yh yl z|0 zh zl ucsr1c udr1 ucsr1a ucsr1b ubrr1l ubrr1h ucsr0c ubrr0h tccr3c tccr3a tccr3b tcnt3h tcnt3l ocr3ah ocr3al ocr3bh ocr3bl ocr3ch ocr3cl icr3h icr3l etimsk etifr tccr1c ocr1ch ocr1cl twcr twdr twar twsr twbr osccal xmcra xmcrb eicra spmcsr spmcr portg ddrg ping portf ddrf sreg sph spl xdiv rampz eicrb eimsk gimsk gicr eifr gifr timsk tifr mcucr mcucsr tccr0 tcnt0 ocr0 assr tccr1a tccr1b tcnt1h tcnt1l ocr1ah ocr1al ocr1bh ocr1bl icr1h icr1l tccr2 tcnt2 ocr2 ocdr wdtcr sfior eearh eearl eedr eecr porta ddra pina portb ddrb pinb portc ddrc pinc portd ddrd pind spdr spsr spcr udr0 ucsr0a ucsr0b ubrr0l acsr admux adcsr adch adcl porte ddre pine pinf",meta:".byte .cseg .db .def .device .dseg .dw .endmacro .equ .eseg .exit .include .list .listmac .macro .nolist .org .set"},contains:[e.C_BLOCK_COMMENT_MODE,e.COMMENT(";","$",{relevance:0}),e.C_NUMBER_MODE,e.BINARY_NUMBER_MODE,{className:"number",begin:"\\b(\\$[a-zA-Z0-9]+|0o[0-7]+)"},e.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",illegal:"[^\\\\][^']"},{className:"symbol",begin:"^[A-Za-z0-9_.$]+:"},{className:"meta",begin:"#",end:"$"},{className:"subst",begin:"@[0-9]+"}]}}}),define("highlight/lib/languages/awk",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"variable",variants:[{begin:/\$[\w\d#@][\w\d_]*/},{begin:/\$\{(.*?)}/}]},n="BEGIN END if else while do for in break continue delete next nextfile function func exit|10",i={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/(u|b)?r?'''/,end:/'''/,relevance:10},{begin:/(u|b)?r?"""/,end:/"""/,relevance:10},{begin:/(u|r|ur)'/,end:/'/,relevance:10},{begin:/(u|r|ur)"/,end:/"/,relevance:10},{begin:/(b|br)'/,end:/'/},{begin:/(b|br)"/,end:/"/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]};return{keywords:{keyword:n},contains:[t,i,e.REGEXP_MODE,e.HASH_COMMENT_MODE,e.NUMBER_MODE]}}}),define("highlight/lib/languages/axapta",["require","exports","module"],function(e,t,n){n.exports=function(e){return{keywords:"false int abstract private char boolean static null if for true while long throw finally protected final return void enum else break new catch byte super case short default double public try this switch continue reverse firstfast firstonly forupdate nofetch sum avg minof maxof count order group by asc desc index hint like dispaly edit client server ttsbegin ttscommit str real date container anytype common div mod",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{className:"meta",begin:"#",end:"$"},{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,illegal:":",contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]}]}}}),define("highlight/lib/languages/bash",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"variable",variants:[{begin:/\$[\w\d#@][\w\d_]*/},{begin:/\$\{(.*?)}/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t,{className:"variable",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]}]},i={className:"string",begin:/'/,end:/'/};return{aliases:["sh","zsh"],lexemes:/-?[a-z\._]+/,keywords:{keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",_:"-ne -eq -lt -gt -f -d -e -s -l -a"},contains:[{className:"meta",begin:/^#![^\n]+sh\s*$/,relevance:10},{className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},e.HASH_COMMENT_MODE,n,i,t]}}}),define("highlight/lib/languages/basic",["require","exports","module"],function(e,t,n){n.exports=function(e){return{case_insensitive:!0,illegal:"^.",lexemes:"[a-zA-Z][a-zA-Z0-9_$%!#]*",keywords:{keyword:"ABS ASC AND ATN AUTO|0 BEEP BLOAD|10 BSAVE|10 CALL CALLS CDBL CHAIN CHDIR CHR$|10 CINT CIRCLE CLEAR CLOSE CLS COLOR COM COMMON CONT COS CSNG CSRLIN CVD CVI CVS DATA DATE$ DEFDBL DEFINT DEFSNG DEFSTR DEF|0 SEG USR DELETE DIM DRAW EDIT END ENVIRON ENVIRON$ EOF EQV ERASE ERDEV ERDEV$ ERL ERR ERROR EXP FIELD FILES FIX FOR|0 FRE GET GOSUB|10 GOTO HEX$ IF|0 THEN ELSE|0 INKEY$ INP INPUT INPUT# INPUT$ INSTR IMP INT IOCTL IOCTL$ KEY ON OFF LIST KILL LEFT$ LEN LET LINE LLIST LOAD LOC LOCATE LOF LOG LPRINT USING LSET MERGE MID$ MKDIR MKD$ MKI$ MKS$ MOD NAME NEW NEXT NOISE NOT OCT$ ON OR PEN PLAY STRIG OPEN OPTION BASE OUT PAINT PALETTE PCOPY PEEK PMAP POINT POKE POS PRINT PRINT] PSET PRESET PUT RANDOMIZE READ REM RENUM RESET|0 RESTORE RESUME RETURN|0 RIGHT$ RMDIR RND RSET RUN SAVE SCREEN SGN SHELL SIN SOUND SPACE$ SPC SQR STEP STICK STOP STR$ STRING$ SWAP SYSTEM TAB TAN TIME$ TIMER TROFF TRON TO USR VAL VARPTR VARPTR$ VIEW WAIT WHILE WEND WIDTH WINDOW WRITE XOR"},contains:[e.QUOTE_STRING_MODE,e.COMMENT("REM","$",{relevance:10}),e.COMMENT("'","$",{relevance:0}),{className:"symbol",begin:"^[0-9]+ ",relevance:10},{className:"number",begin:"\\b([0-9]+[0-9edED.]*[#!]?)",relevance:0},{className:"number",begin:"(&[hH][0-9a-fA-F]{1,4})"},{className:"number",begin:"(&[oO][0-7]{1,6})"}]}}}),define("highlight/lib/languages/bnf",["require","exports","module"],function(e,t,n){n.exports=function(e){return{contains:[{className:"attribute",begin://},{begin:/::=/,starts:{end:/$/,contains:[{begin://},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]}}]}}}),define("highlight/lib/languages/brainfuck",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"literal",begin:"[\\+\\-]",relevance:0};return{aliases:["bf"],contains:[e.COMMENT("[^\\[\\]\\.,\\+\\-<> \r\n]","[\\[\\]\\.,\\+\\-<> \r\n]",{returnEnd:!0,relevance:0}),{className:"title",begin:"[\\[\\]]",relevance:0},{className:"string",begin:"[\\.,]",relevance:0},{begin:/\+\+|\-\-/,returnBegin:!0,contains:[t]},t]}}}),define("highlight/lib/languages/cal",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="div mod in and or not xor asserterror begin case do downto else end exit for if of repeat then to until while with var",n="false true",i=[e.C_LINE_COMMENT_MODE,e.COMMENT(/\{/,/\}/,{relevance:0}),e.COMMENT(/\(\*/,/\*\)/,{relevance:10})],r={className:"string",begin:/'/,end:/'/,contains:[{begin:/''/}]},a={className:"string",begin:/(#\d+)+/},o={className:"number",begin:"\\b\\d+(\\.\\d+)?(DT|D|T)",relevance:0},s={className:"string",begin:'"',end:'"'},l={className:"function",beginKeywords:"procedure",end:/[:;]/,keywords:"procedure|10",contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,keywords:t,contains:[r,a]}].concat(i)},c={className:"class",begin:"OBJECT (Table|Form|Report|Dataport|Codeunit|XMLport|MenuSuite|Page|Query) (\\d+) ([^\\r\\n]+)",returnBegin:!0,contains:[e.TITLE_MODE,l]};return{case_insensitive:!0,keywords:{keyword:t,literal:n},illegal:/\/\*/,contains:[r,a,o,s,e.NUMBER_MODE,c,l]}}}),define("highlight/lib/languages/capnproto",["require","exports","module"],function(e,t,n){n.exports=function(e){return{aliases:["capnp"],keywords:{keyword:"struct enum interface union group import using const annotation extends in of on as with from fixed",built_in:"Void Bool Int8 Int16 Int32 Int64 UInt8 UInt16 UInt32 UInt64 Float32 Float64 Text Data AnyPointer AnyStruct Capability List", -literal:"true false"},contains:[e.QUOTE_STRING_MODE,e.NUMBER_MODE,e.HASH_COMMENT_MODE,{className:"meta",begin:/@0x[\w\d]{16};/,illegal:/\n/},{className:"symbol",begin:/@\d+\b/},{className:"class",beginKeywords:"struct enum",end:/\{/,illegal:/\n/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]},{className:"class",beginKeywords:"interface",end:/\{/,illegal:/\n/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]}]}}}),define("highlight/lib/languages/ceylon",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="assembly module package import alias class interface object given value assign void function new of extends satisfies abstracts in out return break continue throw assert dynamic if else switch case for while try catch finally then let this outer super is exists nonempty",n="shared abstract formal default actual variable late native deprecatedfinal sealed annotation suppressWarnings small",i="doc by license see throws tagged",r={className:"subst",excludeBegin:!0,excludeEnd:!0,begin:/``/,end:/``/,keywords:t,relevance:10},a=[{className:"string",begin:'"""',end:'"""',relevance:10},{className:"string",begin:'"',end:'"',contains:[r]},{className:"string",begin:"'",end:"'"},{className:"number",begin:"#[0-9a-fA-F_]+|\\$[01_]+|[0-9_]+(?:\\.[0-9_](?:[eE][+-]?\\d+)?)?[kMGTPmunpf]?",relevance:0}];return r.contains=a,{keywords:{keyword:t+" "+n,meta:i},illegal:"\\$[^01]|#[^0-9a-fA-F]",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),{className:"meta",begin:'@[a-z]\\w*(?:\\:"[^"]*")?'}].concat(a)}}}),define("highlight/lib/languages/clojure",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={"builtin-name":"def defonce cond apply if-not if-let if not not= = < > <= >= == + / * - rem quot neg? pos? delay? symbol? keyword? true? false? integer? empty? coll? list? set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? class? distinct? isa? float? rational? reduced? ratio? odd? even? char? seq? vector? string? map? nil? contains? zero? instance? not-every? not-any? libspec? -> ->> .. . inc compare do dotimes mapcat take remove take-while drop letfn drop-last take-last drop-while while intern condp case reduced cycle split-at split-with repeat replicate iterate range merge zipmap declare line-seq sort comparator sort-by dorun doall nthnext nthrest partition eval doseq await await-for let agent atom send send-off release-pending-sends add-watch mapv filterv remove-watch agent-error restart-agent set-error-handler error-handler set-error-mode! error-mode shutdown-agents quote var fn loop recur throw try monitor-enter monitor-exit defmacro defn defn- macroexpand macroexpand-1 for dosync and or when when-not when-let comp juxt partial sequence memoize constantly complement identity assert peek pop doto proxy defstruct first rest cons defprotocol cast coll deftype defrecord last butlast sigs reify second ffirst fnext nfirst nnext defmulti defmethod meta with-meta ns in-ns create-ns import refer keys select-keys vals key val rseq name namespace promise into transient persistent! conj! assoc! dissoc! pop! disj! use class type num float double short byte boolean bigint biginteger bigdec print-method print-dup throw-if printf format load compile get-in update-in pr pr-on newline flush read slurp read-line subvec with-open memfn time re-find re-groups rand-int rand mod locking assert-valid-fdecl alias resolve ref deref refset swap! reset! set-validator! compare-and-set! alter-meta! reset-meta! commute get-validator alter ref-set ref-history-count ref-min-history ref-max-history ensure sync io! new next conj set! to-array future future-call into-array aset gen-class reduce map filter find empty hash-map hash-set sorted-map sorted-map-by sorted-set sorted-set-by vec vector seq flatten reverse assoc dissoc list disj get union difference intersection extend extend-type extend-protocol int nth delay count concat chunk chunk-buffer chunk-append chunk-first chunk-rest max min dec unchecked-inc-int unchecked-inc unchecked-dec-inc unchecked-dec unchecked-negate unchecked-add-int unchecked-add unchecked-subtract-int unchecked-subtract chunk-next chunk-cons chunked-seq? prn vary-meta lazy-seq spread list* str find-keyword keyword symbol gensym force rationalize"},n="a-zA-Z_\\-!.?+*=<>&#'",i="["+n+"]["+n+"0-9/;:]*",r="[-+]?\\d+(\\.\\d+)?",a={begin:i,relevance:0},o={className:"number",begin:r,relevance:0},s=e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),l=e.COMMENT(";","$",{relevance:0}),c={className:"literal",begin:/\b(true|false|nil)\b/},d={begin:"[\\[\\{]",end:"[\\]\\}]"},u={className:"comment",begin:"\\^"+i},m=e.COMMENT("\\^\\{","\\}"),p={className:"symbol",begin:"[:]{1,2}"+i},g={begin:"\\(",end:"\\)"},h={endsWithParent:!0,relevance:0},b={keywords:t,lexemes:i,className:"name",begin:i,starts:h},f=[g,s,u,m,l,p,d,o,c,a];return g.contains=[e.COMMENT("comment",""),b,h],h.contains=f,d.contains=f,{aliases:["clj"],illegal:/\S/,contains:[g,s,u,m,l,p,d,o,c]}}}),define("highlight/lib/languages/clojure-repl",["require","exports","module"],function(e,t,n){n.exports=function(e){return{contains:[{className:"meta",begin:/^([\w.-]+|\s*#_)=>/,starts:{end:/$/,subLanguage:"clojure"}}]}}}),define("highlight/lib/languages/cmake",["require","exports","module"],function(e,t,n){n.exports=function(e){return{aliases:["cmake.in"],case_insensitive:!0,keywords:{keyword:"add_custom_command add_custom_target add_definitions add_dependencies add_executable add_library add_subdirectory add_test aux_source_directory break build_command cmake_minimum_required cmake_policy configure_file create_test_sourcelist define_property else elseif enable_language enable_testing endforeach endfunction endif endmacro endwhile execute_process export find_file find_library find_package find_path find_program fltk_wrap_ui foreach function get_cmake_property get_directory_property get_filename_component get_property get_source_file_property get_target_property get_test_property if include include_directories include_external_msproject include_regular_expression install link_directories load_cache load_command macro mark_as_advanced message option output_required_files project qt_wrap_cpp qt_wrap_ui remove_definitions return separate_arguments set set_directory_properties set_property set_source_files_properties set_target_properties set_tests_properties site_name source_group string target_link_libraries try_compile try_run unset variable_watch while build_name exec_program export_library_dependencies install_files install_programs install_targets link_libraries make_directory remove subdir_depends subdirs use_mangled_mesa utility_source variable_requires write_file qt5_use_modules qt5_use_package qt5_wrap_cpp on off true false and or equal less greater strless strgreater strequal matches"},contains:[{className:"variable",begin:"\\${",end:"}"},e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE]}}}),define("highlight/lib/languages/coffeescript",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super then unless until loop of by when and or is isnt not",literal:"true false null undefined yes no on off",built_in:"npm require console print module global window document"},n="[A-Za-z$_][0-9A-Za-z$_]*",i={className:"subst",begin:/#\{/,end:/}/,keywords:t},r=[e.BINARY_NUMBER_MODE,e.inherit(e.C_NUMBER_MODE,{starts:{end:"(\\s*/)?",relevance:0}}),{className:"string",variants:[{begin:/'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[e.BACKSLASH_ESCAPE]},{begin:/"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,i]},{begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,i]}]},{className:"regexp",variants:[{begin:"///",end:"///",contains:[i,e.HASH_COMMENT_MODE]},{begin:"//[gim]*",relevance:0},{begin:/\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/}]},{begin:"@"+n},{begin:"`",end:"`",excludeBegin:!0,excludeEnd:!0,subLanguage:"javascript"}];i.contains=r;var a=e.inherit(e.TITLE_MODE,{begin:n}),o="(\\(.*\\))?\\s*\\B[-=]>",s={className:"params",begin:"\\([^\\(]",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:t,contains:["self"].concat(r)}]};return{aliases:["coffee","cson","iced"],keywords:t,illegal:/\/\*/,contains:r.concat([e.COMMENT("###","###"),e.HASH_COMMENT_MODE,{className:"function",begin:"^\\s*"+n+"\\s*=\\s*"+o,end:"[-=]>",returnBegin:!0,contains:[a,s]},{begin:/[:\(,=]\s*/,relevance:0,contains:[{className:"function",begin:o,end:"[-=]>",returnBegin:!0,contains:[s]}]},{className:"class",beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[a]},a]},{begin:n+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}}),define("highlight/lib/languages/coq",["require","exports","module"],function(e,t,n){n.exports=function(e){return{keywords:{keyword:"_ as at cofix else end exists exists2 fix for forall fun if IF in let match mod Prop return Set then Type using where with Abort About Add Admit Admitted All Arguments Assumptions Axiom Back BackTo Backtrack Bind Blacklist Canonical Cd Check Class Classes Close Coercion Coercions CoFixpoint CoInductive Collection Combined Compute Conjecture Conjectures Constant constr Constraint Constructors Context Corollary CreateHintDb Cut Declare Defined Definition Delimit Dependencies DependentDerive Drop eauto End Equality Eval Example Existential Existentials Existing Export exporting Extern Extract Extraction Fact Field Fields File Fixpoint Focus for From Function Functional Generalizable Global Goal Grab Grammar Graph Guarded Heap Hint HintDb Hints Hypotheses Hypothesis ident Identity If Immediate Implicit Import Include Inductive Infix Info Initial Inline Inspect Instance Instances Intro Intros Inversion Inversion_clear Language Left Lemma Let Libraries Library Load LoadPath Local Locate Ltac ML Mode Module Modules Monomorphic Morphism Next NoInline Notation Obligation Obligations Opaque Open Optimize Options Parameter Parameters Parametric Path Paths pattern Polymorphic Preterm Print Printing Program Projections Proof Proposition Pwd Qed Quit Rec Record Recursive Redirect Relation Remark Remove Require Reserved Reset Resolve Restart Rewrite Right Ring Rings Save Scheme Scope Scopes Script Search SearchAbout SearchHead SearchPattern SearchRewrite Section Separate Set Setoid Show Solve Sorted Step Strategies Strategy Structure SubClass Table Tables Tactic Term Test Theorem Time Timeout Transparent Type Typeclasses Types Undelimit Undo Unfocus Unfocused Unfold Universe Universes Unset Unshelve using Variable Variables Variant Verbose Visibility where with",built_in:"abstract absurd admit after apply as assert assumption at auto autorewrite autounfold before bottom btauto by case case_eq cbn cbv change classical_left classical_right clear clearbody cofix compare compute congruence constr_eq constructor contradict contradiction cut cutrewrite cycle decide decompose dependent destruct destruction dintuition discriminate discrR do double dtauto eapply eassumption eauto ecase econstructor edestruct ediscriminate eelim eexact eexists einduction einjection eleft elim elimtype enough equality erewrite eright esimplify_eq esplit evar exact exactly_once exfalso exists f_equal fail field field_simplify field_simplify_eq first firstorder fix fold fourier functional generalize generalizing gfail give_up has_evar hnf idtac in induction injection instantiate intro intro_pattern intros intuition inversion inversion_clear is_evar is_var lapply lazy left lia lra move native_compute nia nsatz omega once pattern pose progress proof psatz quote record red refine reflexivity remember rename repeat replace revert revgoals rewrite rewrite_strat right ring ring_simplify rtauto set setoid_reflexivity setoid_replace setoid_rewrite setoid_symmetry setoid_transitivity shelve shelve_unifiable simpl simple simplify_eq solve specialize split split_Rabs split_Rmult stepl stepr subst sum swap symmetry tactic tauto time timeout top transitivity trivial try tryif unfold unify until using vm_compute with"},contains:[e.QUOTE_STRING_MODE,e.COMMENT("\\(\\*","\\*\\)"),e.C_NUMBER_MODE,{className:"type",excludeBegin:!0,begin:"\\|\\s*",end:"\\w+"},{begin:/[-=]>/}]}}}),define("highlight/lib/languages/cos",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"string",variants:[{begin:'"',end:'"',contains:[{begin:'""',relevance:0}]}]},n={className:"number",begin:"\\b(\\d+(\\.\\d*)?|\\.\\d+)",relevance:0},i="property parameter class classmethod clientmethod extends as break catch close continue do d|0 else elseif for goto halt hang h|0 if job j|0 kill k|0 lock l|0 merge new open quit q|0 read r|0 return set s|0 tcommit throw trollback try tstart use view while write w|0 xecute x|0 zkill znspace zn ztrap zwrite zw zzdump zzwrite print zbreak zinsert zload zprint zremove zsave zzprint mv mvcall mvcrt mvdim mvprint zquit zsync ascii";return{case_insensitive:!0,aliases:["cos","cls"],keywords:i,contains:[n,t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"comment",begin:/;/,end:"$",relevance:0},{className:"built_in",begin:/(?:\$\$?|\.\.)\^?[a-zA-Z]+/},{className:"built_in",begin:/\$\$\$[a-zA-Z]+/},{className:"built_in",begin:/%[a-z]+(?:\.[a-z]+)*/},{className:"symbol",begin:/\^%?[a-zA-Z][\w]*/},{className:"keyword",begin:/##class|##super|#define|#dim/},{begin:/&sql\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,subLanguage:"sql"},{begin:/&(js|jscript|javascript)/,excludeBegin:!0,excludeEnd:!0,subLanguage:"javascript"},{begin:/&html<\s*\s*>/,subLanguage:"xml"}]}}}),define("highlight/lib/languages/crmsh",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="primitive rsc_template",n="group clone ms master location colocation order fencing_topology rsc_ticket acl_target acl_group user role tag xml",i="property rsc_defaults op_defaults",r="params meta operations op rule attributes utilization",a="read write deny defined not_defined in_range date spec in ref reference attribute type xpath version and or lt gt tag lte gte eq ne \\",o="number string",s="Master Started Slave Stopped start promote demote stop monitor true false";return{aliases:["crm","pcmk"],case_insensitive:!0,keywords:{keyword:r+" "+a+" "+o,literal:s},contains:[e.HASH_COMMENT_MODE,{beginKeywords:"node",starts:{end:"\\s*([\\w_-]+:)?",starts:{className:"title",end:"\\s*[\\$\\w_][\\w_-]*"}}},{beginKeywords:t,starts:{className:"title",end:"\\s*[\\$\\w_][\\w_-]*",starts:{end:"\\s*@?[\\w_][\\w_\\.:-]*"}}},{begin:"\\b("+n.split(" ").join("|")+")\\s+",keywords:n,starts:{className:"title",end:"[\\$\\w_][\\w_-]*"}},{beginKeywords:i,starts:{className:"title",end:"\\s*([\\w_-]+:)?"}},e.QUOTE_STRING_MODE,{className:"meta",begin:"(ocf|systemd|service|lsb):[\\w_:-]+",relevance:0},{className:"number",begin:"\\b\\d+(\\.\\d+)?(ms|s|h|m)?",relevance:0},{className:"literal",begin:"[-]?(infinity|inf)",relevance:0},{className:"attr",begin:/([A-Za-z\$_\#][\w_-]+)=/,relevance:0},{className:"tag",begin:"",relevance:0}]}}}),define("highlight/lib/languages/crystal",["require","exports","module"],function(e,t,n){n.exports=function(e){function t(e,t){var n=[{begin:e,end:t}];return n[0].contains=n,n}var n="(_[uif](8|16|32|64))?",i="[a-zA-Z_]\\w*[!?=]?",r="!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",a="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\][=?]?",o={keyword:"abstract alias as asm begin break case class def do else elsif end ensure enum extend for fun if ifdef include instance_sizeof is_a? lib macro module next of out pointerof private protected rescue responds_to? return require self sizeof struct super then type typeof union unless until when while with yield __DIR__ __FILE__ __LINE__",literal:"false nil true"},s={className:"subst",begin:"#{",end:"}",keywords:o},l={className:"template-variable",variants:[{begin:"\\{\\{",end:"\\}\\}"},{begin:"\\{%",end:"%\\}"}],keywords:o},c={className:"string",contains:[e.BACKSLASH_ESCAPE,s],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:"%w?\\(",end:"\\)",contains:t("\\(","\\)")},{begin:"%w?\\[",end:"\\]",contains:t("\\[","\\]")},{begin:"%w?{",end:"}",contains:t("{","}")},{begin:"%w?<",end:">",contains:t("<",">")},{begin:"%w?/",end:"/"},{begin:"%w?%",end:"%"},{begin:"%w?-",end:"-"},{begin:"%w?\\|",end:"\\|"}],relevance:0},d={begin:"("+r+")\\s*",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,s],variants:[{begin:"//[a-z]*",relevance:0},{begin:"/",end:"/[a-z]*"},{begin:"%r\\(",end:"\\)",contains:t("\\(","\\)")},{begin:"%r\\[",end:"\\]",contains:t("\\[","\\]")},{begin:"%r{",end:"}",contains:t("{","}")},{begin:"%r<",end:">",contains:t("<",">")},{begin:"%r/",end:"/"},{begin:"%r%",end:"%"},{begin:"%r-",end:"-"},{begin:"%r\\|",end:"\\|"}]}],relevance:0},u={className:"regexp",contains:[e.BACKSLASH_ESCAPE,s],variants:[{begin:"%r\\(",end:"\\)",contains:t("\\(","\\)")},{begin:"%r\\[",end:"\\]",contains:t("\\[","\\]")},{begin:"%r{",end:"}",contains:t("{","}")},{begin:"%r<",end:">",contains:t("<",">")},{begin:"%r/",end:"/"},{begin:"%r%",end:"%"},{begin:"%r-",end:"-"},{begin:"%r\\|",end:"\\|"}],relevance:0},m={className:"meta",begin:"@\\[",end:"\\]",contains:[e.inherit(e.QUOTE_STRING_MODE,{className:"meta-string"})]},p=[l,c,d,u,m,e.HASH_COMMENT_MODE,{className:"class",beginKeywords:"class module struct",end:"$|;",illegal:/=/,contains:[e.HASH_COMMENT_MODE,e.inherit(e.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{begin:"<"}]},{className:"class",beginKeywords:"lib enum union",end:"$|;",illegal:/=/,contains:[e.HASH_COMMENT_MODE,e.inherit(e.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"})],relevance:10},{className:"function",beginKeywords:"def",end:/\B\b/,contains:[e.inherit(e.TITLE_MODE,{begin:a,endsParent:!0})]},{className:"function",beginKeywords:"fun macro",end:/\B\b/,contains:[e.inherit(e.TITLE_MODE,{begin:a,endsParent:!0})],relevance:5},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(\\!|\\?)?:",relevance:0},{className:"symbol",begin:":",contains:[c,{begin:a}],relevance:0},{className:"number",variants:[{begin:"\\b0b([01_]*[01])"+n},{begin:"\\b0o([0-7_]*[0-7])"+n},{begin:"\\b0x([A-Fa-f0-9_]*[A-Fa-f0-9])"+n},{begin:"\\b(([0-9][0-9_]*[0-9]|[0-9])(\\.[0-9_]*[0-9])?([eE][+-]?[0-9_]*[0-9])?)"+n}],relevance:0}];return s.contains=p,l.contains=p.slice(1),{aliases:["cr"],lexemes:i,keywords:o,contains:p}}}),define("highlight/lib/languages/cs",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={keyword:"abstract as base bool break byte case catch char checked const continue decimal default delegate do double else enum event explicit extern finally fixed float for foreach goto if implicit in int interface internal is lock long object operator out override params private protected public readonly ref sbyte sealed short sizeof stackalloc static string struct switch this try typeof uint ulong unchecked unsafe ushort using virtual void volatile while nameof add alias ascending async await by descending dynamic equals from get global group into join let on orderby partial remove select set value var where yield",literal:"null false true"},n={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},i=e.inherit(n,{illegal:/\n/}),r={className:"subst",begin:"{",end:"}",keywords:t},a=e.inherit(r,{illegal:/\n/}),o={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:"{{"},{begin:"}}"},e.BACKSLASH_ESCAPE,a]},s={className:"string",begin:/\$@"/,end:'"',contains:[{begin:"{{"},{begin:"}}"},{begin:'""'},r]},l=e.inherit(s,{illegal:/\n/,contains:[{begin:"{{"},{begin:"}}"},{begin:'""'},a]});r.contains=[s,o,n,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE],a.contains=[l,o,i,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];var c={variants:[s,o,n,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},d=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?";return{aliases:["csharp"],keywords:t,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:""},{begin:""}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{"meta-keyword":"if else elif endif define undef warning error line region endregion pragma checksum"}},c,e.C_NUMBER_MODE,{beginKeywords:"class interface",end:/[{;=]/,illegal:/[^\s:]/,contains:[e.TITLE_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",end:/[{;=]/,illegal:/[^\s:]/,contains:[e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new return throw await",relevance:0},{className:"function",begin:"("+d+"\\s+)+"+e.IDENT_RE+"\\s*\\(",returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:t,contains:[{begin:e.IDENT_RE+"\\s*\\(",returnBegin:!0,contains:[e.TITLE_MODE],relevance:0},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,relevance:0,contains:[c,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}]}}}),define("highlight/lib/languages/csp",["require","exports","module"],function(e,t,n){n.exports=function(e){return{case_insensitive:!1,lexemes:"[a-zA-Z][a-zA-Z0-9_-]*",keywords:{keyword:"base-uri child-src connect-src default-src font-src form-action frame-ancestors frame-src img-src media-src object-src plugin-types report-uri sandbox script-src style-src"},contains:[{className:"string",begin:"'",end:"'"},{className:"attribute",begin:"^Content",end:":",excludeEnd:!0}]}}}),define("highlight/lib/languages/css",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="[a-zA-Z-][a-zA-Z0-9_-]*",n={begin:/[A-Z\_\.\-]+\s*:/,returnBegin:!0,end:";",endsWithParent:!0,contains:[{className:"attribute",begin:/\S/,end:":",excludeEnd:!0,starts:{endsWithParent:!0,excludeEnd:!0,contains:[{begin:/[\w-]+\(/,returnBegin:!0,contains:[{className:"built_in",begin:/[\w-]+/},{begin:/\(/,end:/\)/,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]}]},e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_BLOCK_COMMENT_MODE,{className:"number",begin:"#[0-9A-Fa-f]+"},{className:"meta",begin:"!important"}]}}]};return{case_insensitive:!0,illegal:/[=\/|'\$]/,contains:[e.C_BLOCK_COMMENT_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/},{className:"selector-class",begin:/\.[A-Za-z0-9_-]+/},{className:"selector-attr",begin:/\[/,end:/\]/,illegal:"$"},{className:"selector-pseudo",begin:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{begin:"@(font-face|page)",lexemes:"[a-z-]+",keywords:"font-face page"},{begin:"@",end:"[{;]",illegal:/:/,contains:[{className:"keyword",begin:/\w+/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:t,relevance:0},{begin:"{",end:"}",illegal:/\S/,contains:[e.C_BLOCK_COMMENT_MODE,n]}]}}}),define("highlight/lib/languages/d",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={keyword:"abstract alias align asm assert auto body break byte case cast catch class const continue debug default delete deprecated do else enum export extern final finally for foreach foreach_reverse|10 goto if immutable import in inout int interface invariant is lazy macro mixin module new nothrow out override package pragma private protected public pure ref return scope shared static struct super switch synchronized template this throw try typedef typeid typeof union unittest version void volatile while with __FILE__ __LINE__ __gshared|10 __thread __traits __DATE__ __EOF__ __TIME__ __TIMESTAMP__ __VENDOR__ __VERSION__",built_in:"bool cdouble cent cfloat char creal dchar delegate double dstring float function idouble ifloat ireal long real short string ubyte ucent uint ulong ushort wchar wstring",literal:"false null true"},n="(0|[1-9][\\d_]*)",i="(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)",r="0[bB][01_]+",a="([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*)",o="0[xX]"+a,s="([eE][+-]?"+i+")",l="("+i+"(\\.\\d*|"+s+")|\\d+\\."+i+i+"|\\."+n+s+"?)",c="(0[xX]("+a+"\\."+a+"|\\.?"+a+")[pP][+-]?"+i+")",d="("+n+"|"+r+"|"+o+")",u="("+c+"|"+l+")",m="\\\\(['\"\\?\\\\abfnrtv]|u[\\dA-Fa-f]{4}|[0-7]{1,3}|x[\\dA-Fa-f]{2}|U[\\dA-Fa-f]{8})|&[a-zA-Z\\d]{2,};",p={className:"number",begin:"\\b"+d+"(L|u|U|Lu|LU|uL|UL)?",relevance:0},g={className:"number",begin:"\\b("+u+"([fF]|L|i|[fF]i|Li)?|"+d+"(i|[fF]i|Li))",relevance:0},h={className:"string",begin:"'("+m+"|.)",end:"'",illegal:"."},b={begin:m,relevance:0},f={className:"string",begin:'"',contains:[b],end:'"[cwd]?'},_={className:"string",begin:'[rq]"',end:'"[cwd]?',relevance:5},v={className:"string",begin:"`",end:"`[cwd]?"},y={className:"string",begin:'x"[\\da-fA-F\\s\\n\\r]*"[cwd]?',relevance:10},E={className:"string",begin:'q"\\{',end:'\\}"'},w={className:"meta",begin:"^#!",end:"$",relevance:5},x={className:"meta",begin:"#(line)",end:"$",relevance:5},C={className:"keyword",begin:"@[a-zA-Z_][a-zA-Z_\\d]*"},S=e.COMMENT("\\/\\+","\\+\\/",{contains:["self"],relevance:10});return{lexemes:e.UNDERSCORE_IDENT_RE,keywords:t,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,S,y,f,_,v,E,g,p,h,w,x,C]}}}),define("highlight/lib/languages/markdown",["require","exports","module"],function(e,t,n){n.exports=function(e){return{aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$"},{begin:"^.+?\\n[=-]{2,}$"}]},{begin:"<",end:">",subLanguage:"xml",relevance:0},{className:"bullet",begin:"^([*+-]|(\\d+\\.))\\s+"},{className:"strong",begin:"[*_]{2}.+?[*_]{2}"},{className:"emphasis",variants:[{begin:"\\*.+?\\*"},{begin:"_.+?_",relevance:0}]},{className:"quote",begin:"^>\\s+",end:"$"},{className:"code",variants:[{begin:"^```w*s*$",end:"^```s*$"},{begin:"`.+?`"},{begin:"^( {4}|\t)",end:"$",relevance:0}]},{begin:"^[-\\*]{3,}",end:"$"},{begin:"\\[.+?\\][\\(\\[].*?[\\)\\]]",returnBegin:!0,contains:[{className:"string",begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0,relevance:0},{className:"link",begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}],relevance:10},{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]}]}}}),define("highlight/lib/languages/dart",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"subst",begin:"\\$\\{",end:"}",keywords:"true false null this is new super"},n={className:"string",variants:[{begin:"r'''",end:"'''"},{begin:'r"""',end:'"""'},{begin:"r'",end:"'",illegal:"\\n"},{begin:'r"',end:'"',illegal:"\\n"},{begin:"'''",end:"'''",contains:[e.BACKSLASH_ESCAPE,t]},{begin:'"""',end:'"""',contains:[e.BACKSLASH_ESCAPE,t]},{begin:"'",end:"'",illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,t]},{begin:'"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,t]}]};t.contains=[e.C_NUMBER_MODE,n];var i={keyword:"assert async await break case catch class const continue default do else enum extends false final finally for if in is new null rethrow return super switch sync this throw true try var void while with yield abstract as dynamic export external factory get implements import library operator part set static typedef",built_in:"print Comparable DateTime Duration Function Iterable Iterator List Map Match Null Object Pattern RegExp Set Stopwatch String StringBuffer StringSink Symbol Type Uri bool double int num document window querySelector querySelectorAll Element ElementList"};return{keywords:i,contains:[n,e.COMMENT("/\\*\\*","\\*/",{subLanguage:"markdown"}),e.COMMENT("///","$",{subLanguage:"markdown"}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},e.C_NUMBER_MODE,{className:"meta",begin:"@[A-Za-z]+"},{begin:"=>"}]}}}),define("highlight/lib/languages/delphi",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="exports register file shl array record property for mod while set ally label uses raise not stored class safecall var interface or private static exit index inherited to else stdcall override shr asm far resourcestring finalization packed virtual out and protected library do xorwrite goto near function end div overload object unit begin string on inline repeat until destructor write message program with read initialization except default nil if case cdecl in downto threadvar of try pascal const external constructor type public then implementation finally published procedure absolute reintroduce operator as is abstract alias assembler bitpacked break continue cppdecl cvar enumerator experimental platform deprecated unimplemented dynamic export far16 forward generic helper implements interrupt iochecks local name nodefault noreturn nostackframe oldfpccall otherwise saveregisters softfloat specialize strict unaligned varargs ",n=[e.C_LINE_COMMENT_MODE,e.COMMENT(/\{/,/\}/,{relevance:0}),e.COMMENT(/\(\*/,/\*\)/,{relevance:10})],i={className:"string",begin:/'/,end:/'/,contains:[{begin:/''/}]},r={className:"string",begin:/(#\d+)+/},a={begin:e.IDENT_RE+"\\s*=\\s*class\\s*\\(",returnBegin:!0,contains:[e.TITLE_MODE]},o={className:"function",beginKeywords:"function constructor destructor procedure",end:/[:;]/,keywords:"function constructor|10 destructor|10 procedure|10",contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,keywords:t,contains:[i,r]}].concat(n)};return{aliases:["dpr","dfm","pas","pascal","freepascal","lazarus","lpr","lfm"],case_insensitive:!0,keywords:t,illegal:/"|\$[G-Zg-z]|\/\*|<\/|\|/,contains:[i,r,e.NUMBER_MODE,a,o].concat(n)}}}),define("highlight/lib/languages/diff",["require","exports","module"],function(e,t,n){n.exports=function(e){return{aliases:["patch"],contains:[{className:"meta",relevance:10,variants:[{begin:/^@@ +\-\d+,\d+ +\+\d+,\d+ +@@$/},{begin:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{begin:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{className:"comment",variants:[{begin:/Index: /,end:/$/},{begin:/={3,}/,end:/$/},{begin:/^\-{3}/,end:/$/},{begin:/^\*{3} /,end:/$/},{begin:/^\+{3}/,end:/$/},{begin:/\*{5}/,end:/\*{5}$/}]},{className:"addition",begin:"^\\+",end:"$"},{className:"deletion",begin:"^\\-",end:"$"},{className:"addition",begin:"^\\!",end:"$"}]}}}),define("highlight/lib/languages/django",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={begin:/\|[A-Za-z]+:?/,keywords:{name:"truncatewords removetags linebreaksbr yesno get_digit timesince random striptags filesizeformat escape linebreaks length_is ljust rjust cut urlize fix_ampersands title floatformat capfirst pprint divisibleby add make_list unordered_list urlencode timeuntil urlizetrunc wordcount stringformat linenumbers slice date dictsort dictsortreversed default_if_none pluralize lower join center default truncatewords_html upper length phone2numeric wordwrap time addslashes slugify first escapejs force_escape iriencode last safe safeseq truncatechars localize unlocalize localtime utc timezone"},contains:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE]};return{aliases:["jinja"],case_insensitive:!0,subLanguage:"xml",contains:[e.COMMENT(/\{%\s*comment\s*%}/,/\{%\s*endcomment\s*%}/),e.COMMENT(/\{#/,/#}/),{className:"template-tag",begin:/\{%/,end:/%}/,contains:[{className:"name",begin:/\w+/,keywords:{name:"comment endcomment load templatetag ifchanged endifchanged if endif firstof for endfor ifnotequal endifnotequal widthratio extends include spaceless endspaceless regroup ifequal endifequal ssi now with cycle url filter endfilter debug block endblock else autoescape endautoescape csrf_token empty elif endwith static trans blocktrans endblocktrans get_static_prefix get_media_prefix plural get_current_language language get_available_languages get_current_language_bidi get_language_info get_language_info_list localize endlocalize localtime endlocaltime timezone endtimezone get_current_timezone verbatim" -},starts:{endsWithParent:!0,keywords:"in by as",contains:[t],relevance:0}}]},{className:"template-variable",begin:/\{\{/,end:/}}/,contains:[t]}]}}}),define("highlight/lib/languages/dns",["require","exports","module"],function(e,t,n){n.exports=function(e){return{aliases:["bind","zone"],keywords:{keyword:"IN A AAAA AFSDB APL CAA CDNSKEY CDS CERT CNAME DHCID DLV DNAME DNSKEY DS HIP IPSECKEY KEY KX LOC MX NAPTR NS NSEC NSEC3 NSEC3PARAM PTR RRSIG RP SIG SOA SRV SSHFP TA TKEY TLSA TSIG TXT"},contains:[e.COMMENT(";","$",{relevance:0}),{className:"meta",begin:/^\$(TTL|GENERATE|INCLUDE|ORIGIN)\b/},{className:"number",begin:"((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))\\b"},{className:"number",begin:"((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]).){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\b"},e.inherit(e.NUMBER_MODE,{begin:/\b\d+[dhwm]?/})]}}}),define("highlight/lib/languages/dockerfile",["require","exports","module"],function(e,t,n){n.exports=function(e){return{aliases:["docker"],case_insensitive:!0,keywords:"from maintainer expose env user onbuild",contains:[e.HASH_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{beginKeywords:"run cmd entrypoint volume add copy workdir label healthcheck",starts:{end:/[^\\]\n/,subLanguage:"bash"}}],illegal:"",illegal:"\\n"}]},t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},r={className:"variable",begin:"\\&[a-z\\d_]*\\b"},a={className:"meta-keyword",begin:"/[a-z][a-z\\d-]*/"},o={className:"symbol",begin:"^\\s*[a-zA-Z_][a-zA-Z\\d_]*:"},s={className:"params",begin:"<",end:">",contains:[n,r]},l={className:"class",begin:/[a-zA-Z_][a-zA-Z\d_@]*\s{/,end:/[{;=]/,returnBegin:!0,excludeEnd:!0},c={className:"class",begin:"/\\s*{",end:"};",relevance:10,contains:[r,a,o,l,s,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,t]};return{keywords:"",contains:[c,r,a,o,l,s,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,t,i,{begin:e.IDENT_RE+"::",keywords:""}]}}}),define("highlight/lib/languages/dust",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="if eq ne lt lte gt gte select default math sep";return{aliases:["dst"],case_insensitive:!0,subLanguage:"xml",contains:[{className:"template-tag",begin:/\{[#\/]/,end:/\}/,illegal:/;/,contains:[{className:"name",begin:/[a-zA-Z\.-]+/,starts:{endsWithParent:!0,relevance:0,contains:[e.QUOTE_STRING_MODE]}}]},{className:"template-variable",begin:/\{/,end:/\}/,illegal:/;/,keywords:t}]}}}),define("highlight/lib/languages/ebnf",["require","exports","module"],function(e,t,n){n.exports=function(e){var t=e.COMMENT(/\(\*/,/\*\)/),n={className:"attribute",begin:/^[ ]*[a-zA-Z][a-zA-Z-]*([\s-]+[a-zA-Z][a-zA-Z]*)*/},i={className:"meta",begin:/\?.*\?/},r={begin:/=/,end:/;/,contains:[t,i,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]};return{illegal:/\S/,contains:[t,n,r]}}}),define("highlight/lib/languages/elixir",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="[a-zA-Z_][a-zA-Z0-9_]*(\\!|\\?)?",n="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",i="and false then defined module in return redo retry end for true self when next until do begin unless nil break not case cond alias while ensure or include use alias fn quote",r={className:"subst",begin:"#\\{",end:"}",lexemes:t,keywords:i},a={className:"string",contains:[e.BACKSLASH_ESCAPE,r],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/}]},o={className:"function",beginKeywords:"def defp defmacro",end:/\B\b/,contains:[e.inherit(e.TITLE_MODE,{begin:t,endsParent:!0})]},s=e.inherit(o,{className:"class",beginKeywords:"defimpl defmodule defprotocol defrecord",end:/\bdo\b|$|;/}),l=[a,e.HASH_COMMENT_MODE,s,o,{className:"symbol",begin:":(?!\\s)",contains:[a,{begin:n}],relevance:0},{className:"symbol",begin:t+":",relevance:0},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{className:"variable",begin:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{begin:"->"},{begin:"("+e.RE_STARTERS_RE+")\\s*",contains:[e.HASH_COMMENT_MODE,{className:"regexp",illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,r],variants:[{begin:"/",end:"/[a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}],relevance:0}];return r.contains=l,{lexemes:t,keywords:i,contains:l}}}),define("highlight/lib/languages/elm",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={variants:[e.COMMENT("--","$"),e.COMMENT("{-","-}",{contains:["self"]})]},n={className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},i={begin:"\\(",end:"\\)",illegal:'"',contains:[{className:"type",begin:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"},t]},r={begin:"{",end:"}",contains:i.contains};return{keywords:"let in if then else case of where module import exposing type alias as infix infixl infixr port effect command subscription",contains:[{beginKeywords:"port effect module",end:"exposing",keywords:"port effect module where command subscription exposing",contains:[i,t],illegal:"\\W\\.|;"},{begin:"import",end:"$",keywords:"import as exposing",contains:[i,t],illegal:"\\W\\.|;"},{begin:"type",end:"$",keywords:"type alias",contains:[n,i,r,t]},{beginKeywords:"infix infixl infixr",end:"$",contains:[e.C_NUMBER_MODE,t]},{begin:"port",end:"$",keywords:"port",contains:[t]},e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,n,e.inherit(e.TITLE_MODE,{begin:"^[_a-z][\\w']*"}),t,{begin:"->|<-"}]}}}),define("highlight/lib/languages/ruby",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",n={keyword:"and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",literal:"true false nil"},i={className:"doctag",begin:"@[A-Za-z]+"},r={begin:"#<",end:">"},a=[e.COMMENT("#","$",{contains:[i]}),e.COMMENT("^\\=begin","^\\=end",{contains:[i],relevance:10}),e.COMMENT("^__END__","\\n$")],o={className:"subst",begin:"#\\{",end:"}",keywords:n},s={className:"string",contains:[e.BACKSLASH_ESCAPE,o],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:"%[qQwWx]?\\(",end:"\\)"},{begin:"%[qQwWx]?\\[",end:"\\]"},{begin:"%[qQwWx]?{",end:"}"},{begin:"%[qQwWx]?<",end:">"},{begin:"%[qQwWx]?/",end:"/"},{begin:"%[qQwWx]?%",end:"%"},{begin:"%[qQwWx]?-",end:"-"},{begin:"%[qQwWx]?\\|",end:"\\|"},{begin:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/},{begin:/<<(-?)\w+$/,end:/^\s*\w+$/}]},l={className:"params",begin:"\\(",end:"\\)",endsParent:!0,keywords:n},c=[s,r,{className:"class",beginKeywords:"class module",end:"$|;",illegal:/=/,contains:[e.inherit(e.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{begin:"<\\s*",contains:[{begin:"("+e.IDENT_RE+"::)?"+e.IDENT_RE}]}].concat(a)},{className:"function",beginKeywords:"def",end:"$|;",contains:[e.inherit(e.TITLE_MODE,{begin:t}),l].concat(a)},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(\\!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[s,{begin:t}],relevance:0},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{className:"params",begin:/\|/,end:/\|/,keywords:n},{begin:"("+e.RE_STARTERS_RE+")\\s*",contains:[r,{className:"regexp",contains:[e.BACKSLASH_ESCAPE,o],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:"%r{",end:"}[a-z]*"},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(a),relevance:0}].concat(a);o.contains=c,l.contains=c;var d="[>?]>",u="[\\w#]+\\(\\w+\\):\\d+:\\d+>",m="(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>",p=[{begin:/^\s*=>/,starts:{end:"$",contains:c}},{className:"meta",begin:"^("+d+"|"+u+"|"+m+")",starts:{end:"$",contains:c}}];return{aliases:["rb","gemspec","podspec","thor","irb"],keywords:n,illegal:/\/\*/,contains:a.concat(p).concat(c)}}}),define("highlight/lib/languages/erb",["require","exports","module"],function(e,t,n){n.exports=function(e){return{subLanguage:"xml",contains:[e.COMMENT("<%#","%>"),{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0}]}}}),define("highlight/lib/languages/erlang-repl",["require","exports","module"],function(e,t,n){n.exports=function(e){return{keywords:{built_in:"spawn spawn_link self",keyword:"after and andalso|10 band begin bnot bor bsl bsr bxor case catch cond div end fun if let not of or orelse|10 query receive rem try when xor"},contains:[{className:"meta",begin:"^[0-9]+> ",relevance:10},e.COMMENT("%","$"),{className:"number",begin:"\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)",relevance:0},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{begin:"\\?(::)?([A-Z]\\w*(::)?)+"},{begin:"->"},{begin:"ok"},{begin:"!"},{begin:"(\\b[a-z'][a-zA-Z0-9_']*:[a-z'][a-zA-Z0-9_']*)|(\\b[a-z'][a-zA-Z0-9_']*)",relevance:0},{begin:"[A-Z][a-zA-Z0-9_']*",relevance:0}]}}}),define("highlight/lib/languages/erlang",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="[a-z'][a-zA-Z0-9_']*",n="("+t+":"+t+"|"+t+")",i={keyword:"after and andalso|10 band begin bnot bor bsl bzr bxor case catch cond div end fun if let not of orelse|10 query receive rem try when xor",literal:"false true"},r=e.COMMENT("%","$"),a={className:"number",begin:"\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)",relevance:0},o={begin:"fun\\s+"+t+"/\\d+"},s={begin:n+"\\(",end:"\\)",returnBegin:!0,relevance:0,contains:[{begin:n,relevance:0},{begin:"\\(",end:"\\)",endsWithParent:!0,returnEnd:!0,relevance:0}]},l={begin:"{",end:"}",relevance:0},c={begin:"\\b_([A-Z][A-Za-z0-9_]*)?",relevance:0},d={begin:"[A-Z][a-zA-Z0-9_]*",relevance:0},u={begin:"#"+e.UNDERSCORE_IDENT_RE,relevance:0,returnBegin:!0,contains:[{begin:"#"+e.UNDERSCORE_IDENT_RE,relevance:0},{begin:"{",end:"}",relevance:0}]},m={beginKeywords:"fun receive if try case",end:"end",keywords:i};m.contains=[r,o,e.inherit(e.APOS_STRING_MODE,{className:""}),m,s,e.QUOTE_STRING_MODE,a,l,c,d,u];var p=[r,o,m,s,e.QUOTE_STRING_MODE,a,l,c,d,u];s.contains[1].contains=p,l.contains=p,u.contains[1].contains=p;var g={className:"params",begin:"\\(",end:"\\)",contains:p};return{aliases:["erl"],keywords:i,illegal:"(",returnBegin:!0,illegal:"\\(|#|//|/\\*|\\\\|:|;",contains:[g,e.inherit(e.TITLE_MODE,{begin:t})],starts:{end:";|\\.",keywords:i,contains:p}},r,{begin:"^-",end:"\\.",relevance:0,excludeEnd:!0,returnBegin:!0,lexemes:"-"+e.IDENT_RE,keywords:"-module -record -undef -export -ifdef -ifndef -author -copyright -doc -vsn -import -include -include_lib -compile -define -else -endif -file -behaviour -behavior -spec",contains:[g]},a,e.QUOTE_STRING_MODE,u,c,d,l,{begin:/\.$/}]}}}),define("highlight/lib/languages/excel",["require","exports","module"],function(e,t,n){n.exports=function(e){return{aliases:["xlsx","xls"],case_insensitive:!0,lexemes:/[a-zA-Z][\w\.]*/,keywords:{built_in:"ABS ACCRINT ACCRINTM ACOS ACOSH ACOT ACOTH AGGREGATE ADDRESS AMORDEGRC AMORLINC AND ARABIC AREAS ASC ASIN ASINH ATAN ATAN2 ATANH AVEDEV AVERAGE AVERAGEA AVERAGEIF AVERAGEIFS BAHTTEXT BASE BESSELI BESSELJ BESSELK BESSELY BETADIST BETA.DIST BETAINV BETA.INV BIN2DEC BIN2HEX BIN2OCT BINOMDIST BINOM.DIST BINOM.DIST.RANGE BINOM.INV BITAND BITLSHIFT BITOR BITRSHIFT BITXOR CALL CEILING CEILING.MATH CEILING.PRECISE CELL CHAR CHIDIST CHIINV CHITEST CHISQ.DIST CHISQ.DIST.RT CHISQ.INV CHISQ.INV.RT CHISQ.TEST CHOOSE CLEAN CODE COLUMN COLUMNS COMBIN COMBINA COMPLEX CONCAT CONCATENATE CONFIDENCE CONFIDENCE.NORM CONFIDENCE.T CONVERT CORREL COS COSH COT COTH COUNT COUNTA COUNTBLANK COUNTIF COUNTIFS COUPDAYBS COUPDAYS COUPDAYSNC COUPNCD COUPNUM COUPPCD COVAR COVARIANCE.P COVARIANCE.S CRITBINOM CSC CSCH CUBEKPIMEMBER CUBEMEMBER CUBEMEMBERPROPERTY CUBERANKEDMEMBER CUBESET CUBESETCOUNT CUBEVALUE CUMIPMT CUMPRINC DATE DATEDIF DATEVALUE DAVERAGE DAY DAYS DAYS360 DB DBCS DCOUNT DCOUNTA DDB DEC2BIN DEC2HEX DEC2OCT DECIMAL DEGREES DELTA DEVSQ DGET DISC DMAX DMIN DOLLAR DOLLARDE DOLLARFR DPRODUCT DSTDEV DSTDEVP DSUM DURATION DVAR DVARP EDATE EFFECT ENCODEURL EOMONTH ERF ERF.PRECISE ERFC ERFC.PRECISE ERROR.TYPE EUROCONVERT EVEN EXACT EXP EXPON.DIST EXPONDIST FACT FACTDOUBLE FALSE|0 F.DIST FDIST F.DIST.RT FILTERXML FIND FINDB F.INV F.INV.RT FINV FISHER FISHERINV FIXED FLOOR FLOOR.MATH FLOOR.PRECISE FORECAST FORECAST.ETS FORECAST.ETS.CONFINT FORECAST.ETS.SEASONALITY FORECAST.ETS.STAT FORECAST.LINEAR FORMULATEXT FREQUENCY F.TEST FTEST FV FVSCHEDULE GAMMA GAMMA.DIST GAMMADIST GAMMA.INV GAMMAINV GAMMALN GAMMALN.PRECISE GAUSS GCD GEOMEAN GESTEP GETPIVOTDATA GROWTH HARMEAN HEX2BIN HEX2DEC HEX2OCT HLOOKUP HOUR HYPERLINK HYPGEOM.DIST HYPGEOMDIST IF|0 IFERROR IFNA IFS IMABS IMAGINARY IMARGUMENT IMCONJUGATE IMCOS IMCOSH IMCOT IMCSC IMCSCH IMDIV IMEXP IMLN IMLOG10 IMLOG2 IMPOWER IMPRODUCT IMREAL IMSEC IMSECH IMSIN IMSINH IMSQRT IMSUB IMSUM IMTAN INDEX INDIRECT INFO INT INTERCEPT INTRATE IPMT IRR ISBLANK ISERR ISERROR ISEVEN ISFORMULA ISLOGICAL ISNA ISNONTEXT ISNUMBER ISODD ISREF ISTEXT ISO.CEILING ISOWEEKNUM ISPMT JIS KURT LARGE LCM LEFT LEFTB LEN LENB LINEST LN LOG LOG10 LOGEST LOGINV LOGNORM.DIST LOGNORMDIST LOGNORM.INV LOOKUP LOWER MATCH MAX MAXA MAXIFS MDETERM MDURATION MEDIAN MID MIDBs MIN MINIFS MINA MINUTE MINVERSE MIRR MMULT MOD MODE MODE.MULT MODE.SNGL MONTH MROUND MULTINOMIAL MUNIT N NA NEGBINOM.DIST NEGBINOMDIST NETWORKDAYS NETWORKDAYS.INTL NOMINAL NORM.DIST NORMDIST NORMINV NORM.INV NORM.S.DIST NORMSDIST NORM.S.INV NORMSINV NOT NOW NPER NPV NUMBERVALUE OCT2BIN OCT2DEC OCT2HEX ODD ODDFPRICE ODDFYIELD ODDLPRICE ODDLYIELD OFFSET OR PDURATION PEARSON PERCENTILE.EXC PERCENTILE.INC PERCENTILE PERCENTRANK.EXC PERCENTRANK.INC PERCENTRANK PERMUT PERMUTATIONA PHI PHONETIC PI PMT POISSON.DIST POISSON POWER PPMT PRICE PRICEDISC PRICEMAT PROB PRODUCT PROPER PV QUARTILE QUARTILE.EXC QUARTILE.INC QUOTIENT RADIANS RAND RANDBETWEEN RANK.AVG RANK.EQ RANK RATE RECEIVED REGISTER.ID REPLACE REPLACEB REPT RIGHT RIGHTB ROMAN ROUND ROUNDDOWN ROUNDUP ROW ROWS RRI RSQ RTD SEARCH SEARCHB SEC SECH SECOND SERIESSUM SHEET SHEETS SIGN SIN SINH SKEW SKEW.P SLN SLOPE SMALL SQL.REQUEST SQRT SQRTPI STANDARDIZE STDEV STDEV.P STDEV.S STDEVA STDEVP STDEVPA STEYX SUBSTITUTE SUBTOTAL SUM SUMIF SUMIFS SUMPRODUCT SUMSQ SUMX2MY2 SUMX2PY2 SUMXMY2 SWITCH SYD T TAN TANH TBILLEQ TBILLPRICE TBILLYIELD T.DIST T.DIST.2T T.DIST.RT TDIST TEXT TEXTJOIN TIME TIMEVALUE T.INV T.INV.2T TINV TODAY TRANSPOSE TREND TRIM TRIMMEAN TRUE|0 TRUNC T.TEST TTEST TYPE UNICHAR UNICODE UPPER VALUE VAR VAR.P VAR.S VARA VARP VARPA VDB VLOOKUP WEBSERVICE WEEKDAY WEEKNUM WEIBULL WEIBULL.DIST WORKDAY WORKDAY.INTL XIRR XNPV XOR YEAR YEARFRAC YIELD YIELDDISC YIELDMAT Z.TEST ZTEST"},contains:[{begin:/^=/,end:/[^=]/,returnEnd:!0,illegal:/=/,relevance:10},{className:"symbol",begin:/\b[A-Z]{1,2}\d+\b/,end:/[^\d]/,excludeEnd:!0,relevance:0},{className:"symbol",begin:/[A-Z]{0,2}\d*:[A-Z]{0,2}\d*/,relevance:0},e.BACKSLASH_ESCAPE,e.QUOTE_STRING_MODE,{className:"number",begin:e.NUMBER_RE+"(%)?",relevance:0},e.COMMENT(/\bN\(/,/\)/,{excludeBegin:!0,excludeEnd:!0,illegal:/\n/})]}}}),define("highlight/lib/languages/fix",["require","exports","module"],function(e,t,n){n.exports=function(e){return{contains:[{begin:/[^\u2401\u0001]+/,end:/[\u2401\u0001]/,excludeEnd:!0,returnBegin:!0,returnEnd:!1,contains:[{begin:/([^\u2401\u0001=]+)/,end:/=([^\u2401\u0001=]+)/,returnEnd:!0,returnBegin:!1,className:"attr"},{begin:/=/,end:/([\u2401\u0001])/,excludeEnd:!0,excludeBegin:!0,className:"string"}]}],case_insensitive:!0}}}),define("highlight/lib/languages/fortran",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"params",begin:"\\(",end:"\\)"},n={literal:".False. .True.",keyword:"kind do while private call intrinsic where elsewhere type endtype endmodule endselect endinterface end enddo endif if forall endforall only contains default return stop then public subroutine|10 function program .and. .or. .not. .le. .eq. .ge. .gt. .lt. goto save else use module select case access blank direct exist file fmt form formatted iostat name named nextrec number opened rec recl sequential status unformatted unit continue format pause cycle exit c_null_char c_alert c_backspace c_form_feed flush wait decimal round iomsg synchronous nopass non_overridable pass protected volatile abstract extends import non_intrinsic value deferred generic final enumerator class associate bind enum c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t c_int_least32_t c_int_least64_t c_int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr c_new_line c_carriage_return c_horizontal_tab c_vertical_tab iso_c_binding c_loc c_funloc c_associated c_f_pointer c_ptr c_funptr iso_fortran_env character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor numeric_storage_size output_unit c_f_procpointer ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode newunit contiguous recursive pad position action delim readwrite eor advance nml interface procedure namelist include sequence elemental pure integer real character complex logical dimension allocatable|10 parameter external implicit|10 none double precision assign intent optional pointer target in out common equivalence data",built_in:"alog alog10 amax0 amax1 amin0 amin1 amod cabs ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp dint dlog dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlgama iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod qnint qsign qsin qsinh qsqrt qtan qtanh abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log log10 max min nint sign sin sinh sqrt tan tanh print write dim lge lgt lle llt mod nullify allocate deallocate adjustl adjustr all allocated any associated bit_size btest ceiling count cshift date_and_time digits dot_product eoshift epsilon exponent floor fraction huge iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul maxexponent maxloc maxval merge minexponent minloc minval modulo mvbits nearest pack present product radix random_number random_seed range repeat reshape rrspacing scale scan selected_int_kind selected_real_kind set_exponent shape size spacing spread sum system_clock tiny transpose trim ubound unpack verify achar iachar transfer dble entry dprod cpu_time command_argument_count get_command get_command_argument get_environment_variable is_iostat_end ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode is_iostat_eor move_alloc new_line selected_char_kind same_type_as extends_type_ofacosh asinh atanh bessel_j0 bessel_j1 bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma hypot norm2 atomic_define atomic_ref execute_command_line leadz trailz storage_size merge_bits bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr num_images parity popcnt poppar shifta shiftl shiftr this_image"};return{case_insensitive:!0,aliases:["f90","f95"],keywords:n,illegal:/\/\*/,contains:[e.inherit(e.APOS_STRING_MODE,{className:"string",relevance:0}),e.inherit(e.QUOTE_STRING_MODE,{className:"string",relevance:0}),{className:"function",beginKeywords:"subroutine function program",illegal:"[${=\\n]",contains:[e.UNDERSCORE_TITLE_MODE,t]},e.COMMENT("!","$",{relevance:0}),{className:"number",begin:"(?=\\b|\\+|\\-|\\.)(?=\\.\\d|\\d)(?:\\d+)?(?:\\.?\\d*)(?:[de][+-]?\\d+)?\\b\\.?",relevance:0}]}}}),define("highlight/lib/languages/fsharp",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={begin:"<",end:">",contains:[e.inherit(e.TITLE_MODE,{begin:/'[a-zA-Z0-9_]+/})]};return{aliases:["fs"],keywords:"abstract and as assert base begin class default delegate do done downcast downto elif else end exception extern false finally for fun function global if in inherit inline interface internal lazy let match member module mutable namespace new null of open or override private public rec return sig static struct then to true try type upcast use val void when while with yield",illegal:/\/\*/,contains:[{className:"keyword",begin:/\b(yield|return|let|do)!/},{className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},{className:"string",begin:'"""',end:'"""'},e.COMMENT("\\(\\*","\\*\\)"),{className:"class",beginKeywords:"type",end:"\\(|=|$",excludeEnd:!0,contains:[e.UNDERSCORE_TITLE_MODE,t]},{className:"meta",begin:"\\[<",end:">\\]",relevance:10},{className:"symbol",begin:"\\B('[A-Za-z])\\b",contains:[e.BACKSLASH_ESCAPE]},e.C_LINE_COMMENT_MODE,e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),e.C_NUMBER_MODE]}}}),define("highlight/lib/languages/gams",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={keyword:"abort acronym acronyms alias all and assign binary card diag display else eq file files for free ge gt if integer le loop lt maximizing minimizing model models ne negative no not option options or ord positive prod put putpage puttl repeat sameas semicont semiint smax smin solve sos1 sos2 sum system table then until using while xor yes",literal:"eps inf na","built-in":"abs arccos arcsin arctan arctan2 Beta betaReg binomial ceil centropy cos cosh cvPower div div0 eDist entropy errorf execSeed exp fact floor frac gamma gammaReg log logBeta logGamma log10 log2 mapVal max min mod ncpCM ncpF ncpVUpow ncpVUsin normal pi poly power randBinomial randLinear randTriangle round rPower sigmoid sign signPower sin sinh slexp sllog10 slrec sqexp sqlog10 sqr sqrec sqrt tan tanh trunc uniform uniformInt vcPower bool_and bool_eqv bool_imp bool_not bool_or bool_xor ifThen rel_eq rel_ge rel_gt rel_le rel_lt rel_ne gday gdow ghour gleap gmillisec gminute gmonth gsecond gyear jdate jnow jstart jtime errorLevel execError gamsRelease gamsVersion handleCollect handleDelete handleStatus handleSubmit heapFree heapLimit heapSize jobHandle jobKill jobStatus jobTerminate licenseLevel licenseStatus maxExecError sleep timeClose timeComp timeElapsed timeExec timeStart"},n={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0},i={className:"symbol",variants:[{begin:/\=[lgenxc]=/},{begin:/\$/}]},r={className:"comment",variants:[{begin:"'",end:"'"},{begin:'"',end:'"'}],illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},a={begin:"/",end:"/",keywords:t,contains:[r,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_NUMBER_MODE]},o={begin:/[a-z][a-z0-9_]*(\([a-z0-9_, ]*\))?[ \t]+/,excludeBegin:!0,end:"$",endsWithParent:!0,contains:[r,a,{className:"comment",begin:/([ ]*[a-z0-9&#*=?@>\\<:\-,()$\[\]_.{}!+%^]+)+/,relevance:0}]};return{aliases:["gms"],case_insensitive:!0,keywords:t,contains:[e.COMMENT(/^\$ontext/,/^\$offtext/),{className:"meta",begin:"^\\$[a-z0-9]+",end:"$",returnBegin:!0,contains:[{className:"meta-keyword",begin:"^\\$[a-z0-9]+"}]},e.COMMENT("^\\*","$"),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{beginKeywords:"set sets parameter parameters variable variables scalar scalars equation equations",end:";",contains:[e.COMMENT("^\\*","$"),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,a,o]},{beginKeywords:"table",end:";",returnBegin:!0,contains:[{beginKeywords:"table",end:"$",contains:[o]},e.COMMENT("^\\*","$"),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_NUMBER_MODE]},{className:"function",begin:/^[a-z][a-z0-9_,\-+' ()$]+\.{2}/,returnBegin:!0,contains:[{className:"title",begin:/^[a-z][a-z0-9_]+/},n,i]},e.C_NUMBER_MODE,i]}}}),define("highlight/lib/languages/gauss",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={keyword:"and bool break call callexe checkinterrupt clear clearg closeall cls comlog compile continue create debug declare delete disable dlibrary dllcall do dos ed edit else elseif enable end endfor endif endp endo errorlog errorlogat expr external fn for format goto gosub graph if keyword let lib library line load loadarray loadexe loadf loadk loadm loadp loads loadx local locate loopnextindex lprint lpwidth lshow matrix msym ndpclex new not open or output outwidth plot plotsym pop prcsn print printdos proc push retp return rndcon rndmod rndmult rndseed run save saveall screen scroll setarray show sparse stop string struct system trace trap threadfor threadendfor threadbegin threadjoin threadstat threadend until use while winprint",built_in:"abs acf aconcat aeye amax amean AmericanBinomCall AmericanBinomCall_Greeks AmericanBinomCall_ImpVol AmericanBinomPut AmericanBinomPut_Greeks AmericanBinomPut_ImpVol AmericanBSCall AmericanBSCall_Greeks AmericanBSCall_ImpVol AmericanBSPut AmericanBSPut_Greeks AmericanBSPut_ImpVol amin amult annotationGetDefaults annotationSetBkd annotationSetFont annotationSetLineColor annotationSetLineStyle annotationSetLineThickness annualTradingDays arccos arcsin areshape arrayalloc arrayindex arrayinit arraytomat asciiload asclabel astd astds asum atan atan2 atranspose axmargin balance band bandchol bandcholsol bandltsol bandrv bandsolpd bar base10 begwind besselj bessely beta box boxcox cdfBeta cdfBetaInv cdfBinomial cdfBinomialInv cdfBvn cdfBvn2 cdfBvn2e cdfCauchy cdfCauchyInv cdfChic cdfChii cdfChinc cdfChincInv cdfExp cdfExpInv cdfFc cdfFnc cdfFncInv cdfGam cdfGenPareto cdfHyperGeo cdfLaplace cdfLaplaceInv cdfLogistic cdfLogisticInv cdfmControlCreate cdfMvn cdfMvn2e cdfMvnce cdfMvne cdfMvt2e cdfMvtce cdfMvte cdfN cdfN2 cdfNc cdfNegBinomial cdfNegBinomialInv cdfNi cdfPoisson cdfPoissonInv cdfRayleigh cdfRayleighInv cdfTc cdfTci cdfTnc cdfTvn cdfWeibull cdfWeibullInv cdir ceil ChangeDir chdir chiBarSquare chol choldn cholsol cholup chrs close code cols colsf combinate combinated complex con cond conj cons ConScore contour conv convertsatostr convertstrtosa corrm corrms corrvc corrx corrxs cos cosh counts countwts crossprd crout croutp csrcol csrlin csvReadM csvReadSA cumprodc cumsumc curve cvtos datacreate datacreatecomplex datalist dataload dataloop dataopen datasave date datestr datestring datestrymd dayinyr dayofweek dbAddDatabase dbClose dbCommit dbCreateQuery dbExecQuery dbGetConnectOptions dbGetDatabaseName dbGetDriverName dbGetDrivers dbGetHostName dbGetLastErrorNum dbGetLastErrorText dbGetNumericalPrecPolicy dbGetPassword dbGetPort dbGetTableHeaders dbGetTables dbGetUserName dbHasFeature dbIsDriverAvailable dbIsOpen dbIsOpenError dbOpen dbQueryBindValue dbQueryClear dbQueryCols dbQueryExecPrepared dbQueryFetchAllM dbQueryFetchAllSA dbQueryFetchOneM dbQueryFetchOneSA dbQueryFinish dbQueryGetBoundValue dbQueryGetBoundValues dbQueryGetField dbQueryGetLastErrorNum dbQueryGetLastErrorText dbQueryGetLastInsertID dbQueryGetLastQuery dbQueryGetPosition dbQueryIsActive dbQueryIsForwardOnly dbQueryIsNull dbQueryIsSelect dbQueryIsValid dbQueryPrepare dbQueryRows dbQuerySeek dbQuerySeekFirst dbQuerySeekLast dbQuerySeekNext dbQuerySeekPrevious dbQuerySetForwardOnly dbRemoveDatabase dbRollback dbSetConnectOptions dbSetDatabaseName dbSetHostName dbSetNumericalPrecPolicy dbSetPort dbSetUserName dbTransaction DeleteFile delif delrows denseToSp denseToSpRE denToZero design det detl dfft dffti diag diagrv digamma doswin DOSWinCloseall DOSWinOpen dotfeq dotfeqmt dotfge dotfgemt dotfgt dotfgtmt dotfle dotflemt dotflt dotfltmt dotfne dotfnemt draw drop dsCreate dstat dstatmt dstatmtControlCreate dtdate dtday dttime dttodtv dttostr dttoutc dtvnormal dtvtodt dtvtoutc dummy dummybr dummydn eig eigh eighv eigv elapsedTradingDays endwind envget eof eqSolve eqSolvemt eqSolvemtControlCreate eqSolvemtOutCreate eqSolveset erf erfc erfccplx erfcplx error etdays ethsec etstr EuropeanBinomCall EuropeanBinomCall_Greeks EuropeanBinomCall_ImpVol EuropeanBinomPut EuropeanBinomPut_Greeks EuropeanBinomPut_ImpVol EuropeanBSCall EuropeanBSCall_Greeks EuropeanBSCall_ImpVol EuropeanBSPut EuropeanBSPut_Greeks EuropeanBSPut_ImpVol exctsmpl exec execbg exp extern eye fcheckerr fclearerr feq feqmt fflush fft ffti fftm fftmi fftn fge fgemt fgets fgetsa fgetsat fgetst fgt fgtmt fileinfo filesa fle flemt floor flt fltmt fmod fne fnemt fonts fopen formatcv formatnv fputs fputst fseek fstrerror ftell ftocv ftos ftostrC gamma gammacplx gammaii gausset gdaAppend gdaCreate gdaDStat gdaDStatMat gdaGetIndex gdaGetName gdaGetNames gdaGetOrders gdaGetType gdaGetTypes gdaGetVarInfo gdaIsCplx gdaLoad gdaPack gdaRead gdaReadByIndex gdaReadSome gdaReadSparse gdaReadStruct gdaReportVarInfo gdaSave gdaUpdate gdaUpdateAndPack gdaVars gdaWrite gdaWrite32 gdaWriteSome getarray getdims getf getGAUSShome getmatrix getmatrix4D getname getnamef getNextTradingDay getNextWeekDay getnr getorders getpath getPreviousTradingDay getPreviousWeekDay getRow getscalar3D getscalar4D getTrRow getwind glm gradcplx gradMT gradMTm gradMTT gradMTTm gradp graphprt graphset hasimag header headermt hess hessMT hessMTg hessMTgw hessMTm hessMTmw hessMTT hessMTTg hessMTTgw hessMTTm hessMTw hessp hist histf histp hsec imag indcv indexcat indices indices2 indicesf indicesfn indnv indsav indx integrate1d integrateControlCreate intgrat2 intgrat3 inthp1 inthp2 inthp3 inthp4 inthpControlCreate intquad1 intquad2 intquad3 intrleav intrleavsa intrsect intsimp inv invpd invswp iscplx iscplxf isden isinfnanmiss ismiss key keyav keyw lag lag1 lagn lapEighb lapEighi lapEighvb lapEighvi lapgEig lapgEigh lapgEighv lapgEigv lapgSchur lapgSvdcst lapgSvds lapgSvdst lapSvdcusv lapSvds lapSvdusv ldlp ldlsol linSolve listwise ln lncdfbvn lncdfbvn2 lncdfmvn lncdfn lncdfn2 lncdfnc lnfact lngammacplx lnpdfmvn lnpdfmvt lnpdfn lnpdft loadd loadstruct loadwind loess loessmt loessmtControlCreate log loglog logx logy lower lowmat lowmat1 ltrisol lu lusol machEpsilon make makevars makewind margin matalloc matinit mattoarray maxbytes maxc maxindc maxv maxvec mbesselei mbesselei0 mbesselei1 mbesseli mbesseli0 mbesseli1 meanc median mergeby mergevar minc minindc minv miss missex missrv moment momentd movingave movingaveExpwgt movingaveWgt nextindex nextn nextnevn nextwind ntos null null1 numCombinations ols olsmt olsmtControlCreate olsqr olsqr2 olsqrmt ones optn optnevn orth outtyp pacf packedToSp packr parse pause pdfCauchy pdfChi pdfExp pdfGenPareto pdfHyperGeo pdfLaplace pdfLogistic pdfn pdfPoisson pdfRayleigh pdfWeibull pi pinv pinvmt plotAddArrow plotAddBar plotAddBox plotAddHist plotAddHistF plotAddHistP plotAddPolar plotAddScatter plotAddShape plotAddTextbox plotAddTS plotAddXY plotArea plotBar plotBox plotClearLayout plotContour plotCustomLayout plotGetDefaults plotHist plotHistF plotHistP plotLayout plotLogLog plotLogX plotLogY plotOpenWindow plotPolar plotSave plotScatter plotSetAxesPen plotSetBar plotSetBarFill plotSetBarStacked plotSetBkdColor plotSetFill plotSetGrid plotSetLegend plotSetLineColor plotSetLineStyle plotSetLineSymbol plotSetLineThickness plotSetNewWindow plotSetTitle plotSetWhichYAxis plotSetXAxisShow plotSetXLabel plotSetXRange plotSetXTicInterval plotSetXTicLabel plotSetYAxisShow plotSetYLabel plotSetYRange plotSetZAxisShow plotSetZLabel plotSurface plotTS plotXY polar polychar polyeval polygamma polyint polymake polymat polymroot polymult polyroot pqgwin previousindex princomp printfm printfmt prodc psi putarray putf putvals pvCreate pvGetIndex pvGetParNames pvGetParVector pvLength pvList pvPack pvPacki pvPackm pvPackmi pvPacks pvPacksi pvPacksm pvPacksmi pvPutParVector pvTest pvUnpack QNewton QNewtonmt QNewtonmtControlCreate QNewtonmtOutCreate QNewtonSet QProg QProgmt QProgmtInCreate qqr qqre qqrep qr qre qrep qrsol qrtsol qtyr qtyre qtyrep quantile quantiled qyr qyre qyrep qz rank rankindx readr real reclassify reclassifyCuts recode recserar recsercp recserrc rerun rescale reshape rets rev rfft rffti rfftip rfftn rfftnp rfftp rndBernoulli rndBeta rndBinomial rndCauchy rndChiSquare rndCon rndCreateState rndExp rndGamma rndGeo rndGumbel rndHyperGeo rndi rndKMbeta rndKMgam rndKMi rndKMn rndKMnb rndKMp rndKMu rndKMvm rndLaplace rndLCbeta rndLCgam rndLCi rndLCn rndLCnb rndLCp rndLCu rndLCvm rndLogNorm rndMTu rndMVn rndMVt rndn rndnb rndNegBinomial rndp rndPoisson rndRayleigh rndStateSkip rndu rndvm rndWeibull rndWishart rotater round rows rowsf rref sampleData satostrC saved saveStruct savewind scale scale3d scalerr scalinfnanmiss scalmiss schtoc schur searchsourcepath seekr select selif seqa seqm setdif setdifsa setvars setvwrmode setwind shell shiftr sin singleindex sinh sleep solpd sortc sortcc sortd sorthc sorthcc sortind sortindc sortmc sortr sortrc spBiconjGradSol spChol spConjGradSol spCreate spDenseSubmat spDiagRvMat spEigv spEye spLDL spline spLU spNumNZE spOnes spreadSheetReadM spreadSheetReadSA spreadSheetWrite spScale spSubmat spToDense spTrTDense spTScalar spZeros sqpSolve sqpSolveMT sqpSolveMTControlCreate sqpSolveMTlagrangeCreate sqpSolveMToutCreate sqpSolveSet sqrt statements stdc stdsc stocv stof strcombine strindx strlen strput strrindx strsect strsplit strsplitPad strtodt strtof strtofcplx strtriml strtrimr strtrunc strtruncl strtruncpad strtruncr submat subscat substute subvec sumc sumr surface svd svd1 svd2 svdcusv svds svdusv sysstate tab tan tanh tempname threadBegin threadEnd threadEndFor threadFor threadJoin threadStat time timedt timestr timeutc title tkf2eps tkf2ps tocart todaydt toeplitz token topolar trapchk trigamma trimr trunc type typecv typef union unionsa uniqindx uniqindxsa unique uniquesa upmat upmat1 upper utctodt utctodtv utrisol vals varCovMS varCovXS varget vargetl varmall varmares varput varputl vartypef vcm vcms vcx vcxs vec vech vecr vector vget view viewxyz vlist vnamecv volume vput vread vtypecv wait waitc walkindex where window writer xlabel xlsGetSheetCount xlsGetSheetSize xlsGetSheetTypes xlsMakeRange xlsReadM xlsReadSA xlsWrite xlsWriteM xlsWriteSA xpnd xtics xy xyz ylabel ytics zeros zeta zlabel ztics", -literal:"DB_AFTER_LAST_ROW DB_ALL_TABLES DB_BATCH_OPERATIONS DB_BEFORE_FIRST_ROW DB_BLOB DB_EVENT_NOTIFICATIONS DB_FINISH_QUERY DB_HIGH_PRECISION DB_LAST_INSERT_ID DB_LOW_PRECISION_DOUBLE DB_LOW_PRECISION_INT32 DB_LOW_PRECISION_INT64 DB_LOW_PRECISION_NUMBERS DB_MULTIPLE_RESULT_SETS DB_NAMED_PLACEHOLDERS DB_POSITIONAL_PLACEHOLDERS DB_PREPARED_QUERIES DB_QUERY_SIZE DB_SIMPLE_LOCKING DB_SYSTEM_TABLES DB_TABLES DB_TRANSACTIONS DB_UNICODE DB_VIEWS"},n={className:"meta",begin:"#",end:"$",keywords:{"meta-keyword":"define definecs|10 undef ifdef ifndef iflight ifdllcall ifmac ifos2win ifunix else endif lineson linesoff srcfile srcline"},contains:[{begin:/\\\n/,relevance:0},{beginKeywords:"include",end:"$",keywords:{"meta-keyword":"include"},contains:[{className:"meta-string",begin:'"',end:'"',illegal:"\\n"}]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},i=e.UNDERSCORE_IDENT_RE+"\\s*\\(?",r=[{className:"params",begin:/\(/,end:/\)/,keywords:t,relevance:0,contains:[e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}];return{aliases:["gss"],case_insensitive:!0,keywords:t,illegal:"(\\{[%#]|[%#]\\})",contains:[e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.COMMENT("@","@"),n,{className:"string",begin:'"',end:'"',contains:[e.BACKSLASH_ESCAPE]},{className:"function",beginKeywords:"proc keyword",end:";",excludeEnd:!0,keywords:t,contains:[{begin:i,returnBegin:!0,contains:[e.UNDERSCORE_TITLE_MODE],relevance:0},e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n].concat(r)},{className:"function",beginKeywords:"fn",end:";",excludeEnd:!0,keywords:t,contains:[{begin:i+e.IDENT_RE+"\\)?\\s*\\=\\s*",returnBegin:!0,contains:[e.UNDERSCORE_TITLE_MODE],relevance:0},e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE].concat(r)},{className:"function",begin:"\\bexternal (proc|keyword|fn)\\s+",end:";",excludeEnd:!0,keywords:t,contains:[{begin:i,returnBegin:!0,contains:[e.UNDERSCORE_TITLE_MODE],relevance:0},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"function",begin:"\\bexternal (matrix|string|array|sparse matrix|struct "+e.IDENT_RE+")\\s+",end:";",excludeEnd:!0,keywords:t,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}]}}}),define("highlight/lib/languages/gcode",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="[A-Z_][A-Z0-9_.]*",n="\\%",i="IF DO WHILE ENDWHILE CALL ENDIF SUB ENDSUB GOTO REPEAT ENDREPEAT EQ LT GT NE GE LE OR XOR",r={className:"meta",begin:"([O])([0-9]+)"},a=[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.COMMENT(/\(/,/\)/),e.inherit(e.C_NUMBER_MODE,{begin:"([-+]?([0-9]*\\.?[0-9]+\\.?))|"+e.C_NUMBER_RE}),e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"name",begin:"([G])([0-9]+\\.?[0-9]?)"},{className:"name",begin:"([M])([0-9]+\\.?[0-9]?)"},{className:"attr",begin:"(VC|VS|#)",end:"(\\d+)"},{className:"attr",begin:"(VZOFX|VZOFY|VZOFZ)"},{className:"built_in",begin:"(ATAN|ABS|ACOS|ASIN|SIN|COS|EXP|FIX|FUP|ROUND|LN|TAN)(\\[)",end:"([-+]?([0-9]*\\.?[0-9]+\\.?))(\\])"},{className:"symbol",variants:[{begin:"N",end:"\\d+",illegal:"\\W"}]}];return{aliases:["nc"],case_insensitive:!0,lexemes:t,keywords:i,contains:[{className:"meta",begin:n},r].concat(a)}}}),define("highlight/lib/languages/gherkin",["require","exports","module"],function(e,t,n){n.exports=function(e){return{aliases:["feature"],keywords:"Feature Background Ability Business Need Scenario Scenarios Scenario Outline Scenario Template Examples Given And Then But When",contains:[{className:"symbol",begin:"\\*",relevance:0},{className:"meta",begin:"@[^@\\s]+"},{begin:"\\|",end:"\\|\\w*$",contains:[{className:"string",begin:"[^|]+"}]},{className:"variable",begin:"<",end:">"},e.HASH_COMMENT_MODE,{className:"string",begin:'"""',end:'"""'},e.QUOTE_STRING_MODE]}}}),define("highlight/lib/languages/glsl",["require","exports","module"],function(e,t,n){n.exports=function(e){return{keywords:{keyword:"break continue discard do else for if return whileattribute binding buffer ccw centroid centroid varying coherent column_major const cw depth_any depth_greater depth_less depth_unchanged early_fragment_tests equal_spacing flat fractional_even_spacing fractional_odd_spacing highp in index inout invariant invocations isolines layout line_strip lines lines_adjacency local_size_x local_size_y local_size_z location lowp max_vertices mediump noperspective offset origin_upper_left out packed patch pixel_center_integer point_mode points precise precision quads r11f_g11f_b10f r16 r16_snorm r16f r16i r16ui r32f r32i r32ui r8 r8_snorm r8i r8ui readonly restrict rg16 rg16_snorm rg16f rg16i rg16ui rg32f rg32i rg32ui rg8 rg8_snorm rg8i rg8ui rgb10_a2 rgb10_a2ui rgba16 rgba16_snorm rgba16f rgba16i rgba16ui rgba32f rgba32i rgba32ui rgba8 rgba8_snorm rgba8i rgba8ui row_major sample shared smooth std140 std430 stream triangle_strip triangles triangles_adjacency uniform varying vertices volatile writeonly",type:"atomic_uint bool bvec2 bvec3 bvec4 dmat2 dmat2x2 dmat2x3 dmat2x4 dmat3 dmat3x2 dmat3x3 dmat3x4 dmat4 dmat4x2 dmat4x3 dmat4x4 double dvec2 dvec3 dvec4 float iimage1D iimage1DArray iimage2D iimage2DArray iimage2DMS iimage2DMSArray iimage2DRect iimage3D iimageBufferiimageCube iimageCubeArray image1D image1DArray image2D image2DArray image2DMS image2DMSArray image2DRect image3D imageBuffer imageCube imageCubeArray int isampler1D isampler1DArray isampler2D isampler2DArray isampler2DMS isampler2DMSArray isampler2DRect isampler3D isamplerBuffer isamplerCube isamplerCubeArray ivec2 ivec3 ivec4 mat2 mat2x2 mat2x3 mat2x4 mat3 mat3x2 mat3x3 mat3x4 mat4 mat4x2 mat4x3 mat4x4 sampler1D sampler1DArray sampler1DArrayShadow sampler1DShadow sampler2D sampler2DArray sampler2DArrayShadow sampler2DMS sampler2DMSArray sampler2DRect sampler2DRectShadow sampler2DShadow sampler3D samplerBuffer samplerCube samplerCubeArray samplerCubeArrayShadow samplerCubeShadow image1D uimage1DArray uimage2D uimage2DArray uimage2DMS uimage2DMSArray uimage2DRect uimage3D uimageBuffer uimageCube uimageCubeArray uint usampler1D usampler1DArray usampler2D usampler2DArray usampler2DMS usampler2DMSArray usampler2DRect usampler3D samplerBuffer usamplerCube usamplerCubeArray uvec2 uvec3 uvec4 vec2 vec3 vec4 void",built_in:"gl_MaxAtomicCounterBindings gl_MaxAtomicCounterBufferSize gl_MaxClipDistances gl_MaxClipPlanes gl_MaxCombinedAtomicCounterBuffers gl_MaxCombinedAtomicCounters gl_MaxCombinedImageUniforms gl_MaxCombinedImageUnitsAndFragmentOutputs gl_MaxCombinedTextureImageUnits gl_MaxComputeAtomicCounterBuffers gl_MaxComputeAtomicCounters gl_MaxComputeImageUniforms gl_MaxComputeTextureImageUnits gl_MaxComputeUniformComponents gl_MaxComputeWorkGroupCount gl_MaxComputeWorkGroupSize gl_MaxDrawBuffers gl_MaxFragmentAtomicCounterBuffers gl_MaxFragmentAtomicCounters gl_MaxFragmentImageUniforms gl_MaxFragmentInputComponents gl_MaxFragmentInputVectors gl_MaxFragmentUniformComponents gl_MaxFragmentUniformVectors gl_MaxGeometryAtomicCounterBuffers gl_MaxGeometryAtomicCounters gl_MaxGeometryImageUniforms gl_MaxGeometryInputComponents gl_MaxGeometryOutputComponents gl_MaxGeometryOutputVertices gl_MaxGeometryTextureImageUnits gl_MaxGeometryTotalOutputComponents gl_MaxGeometryUniformComponents gl_MaxGeometryVaryingComponents gl_MaxImageSamples gl_MaxImageUnits gl_MaxLights gl_MaxPatchVertices gl_MaxProgramTexelOffset gl_MaxTessControlAtomicCounterBuffers gl_MaxTessControlAtomicCounters gl_MaxTessControlImageUniforms gl_MaxTessControlInputComponents gl_MaxTessControlOutputComponents gl_MaxTessControlTextureImageUnits gl_MaxTessControlTotalOutputComponents gl_MaxTessControlUniformComponents gl_MaxTessEvaluationAtomicCounterBuffers gl_MaxTessEvaluationAtomicCounters gl_MaxTessEvaluationImageUniforms gl_MaxTessEvaluationInputComponents gl_MaxTessEvaluationOutputComponents gl_MaxTessEvaluationTextureImageUnits gl_MaxTessEvaluationUniformComponents gl_MaxTessGenLevel gl_MaxTessPatchComponents gl_MaxTextureCoords gl_MaxTextureImageUnits gl_MaxTextureUnits gl_MaxVaryingComponents gl_MaxVaryingFloats gl_MaxVaryingVectors gl_MaxVertexAtomicCounterBuffers gl_MaxVertexAtomicCounters gl_MaxVertexAttribs gl_MaxVertexImageUniforms gl_MaxVertexOutputComponents gl_MaxVertexOutputVectors gl_MaxVertexTextureImageUnits gl_MaxVertexUniformComponents gl_MaxVertexUniformVectors gl_MaxViewports gl_MinProgramTexelOffset gl_BackColor gl_BackLightModelProduct gl_BackLightProduct gl_BackMaterial gl_BackSecondaryColor gl_ClipDistance gl_ClipPlane gl_ClipVertex gl_Color gl_DepthRange gl_EyePlaneQ gl_EyePlaneR gl_EyePlaneS gl_EyePlaneT gl_Fog gl_FogCoord gl_FogFragCoord gl_FragColor gl_FragCoord gl_FragData gl_FragDepth gl_FrontColor gl_FrontFacing gl_FrontLightModelProduct gl_FrontLightProduct gl_FrontMaterial gl_FrontSecondaryColor gl_GlobalInvocationID gl_InstanceID gl_InvocationID gl_Layer gl_LightModel gl_LightSource gl_LocalInvocationID gl_LocalInvocationIndex gl_ModelViewMatrix gl_ModelViewMatrixInverse gl_ModelViewMatrixInverseTranspose gl_ModelViewMatrixTranspose gl_ModelViewProjectionMatrix gl_ModelViewProjectionMatrixInverse gl_ModelViewProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixTranspose gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_Normal gl_NormalMatrix gl_NormalScale gl_NumSamples gl_NumWorkGroups gl_ObjectPlaneQ gl_ObjectPlaneR gl_ObjectPlaneS gl_ObjectPlaneT gl_PatchVerticesIn gl_Point gl_PointCoord gl_PointSize gl_Position gl_PrimitiveID gl_PrimitiveIDIn gl_ProjectionMatrix gl_ProjectionMatrixInverse gl_ProjectionMatrixInverseTranspose gl_ProjectionMatrixTranspose gl_SampleID gl_SampleMask gl_SampleMaskIn gl_SamplePosition gl_SecondaryColor gl_TessCoord gl_TessLevelInner gl_TessLevelOuter gl_TexCoord gl_TextureEnvColor gl_TextureMatrix gl_TextureMatrixInverse gl_TextureMatrixInverseTranspose gl_TextureMatrixTranspose gl_Vertex gl_VertexID gl_ViewportIndex gl_WorkGroupID gl_WorkGroupSize gl_in gl_out EmitStreamVertex EmitVertex EndPrimitive EndStreamPrimitive abs acos acosh all any asin asinh atan atanh atomicAdd atomicAnd atomicCompSwap atomicCounter atomicCounterDecrement atomicCounterIncrement atomicExchange atomicMax atomicMin atomicOr atomicXor barrier bitCount bitfieldExtract bitfieldInsert bitfieldReverse ceil clamp cos cosh cross dFdx dFdy degrees determinant distance dot equal exp exp2 faceforward findLSB findMSB floatBitsToInt floatBitsToUint floor fma fract frexp ftransform fwidth greaterThan greaterThanEqual groupMemoryBarrier imageAtomicAdd imageAtomicAnd imageAtomicCompSwap imageAtomicExchange imageAtomicMax imageAtomicMin imageAtomicOr imageAtomicXor imageLoad imageSize imageStore imulExtended intBitsToFloat interpolateAtCentroid interpolateAtOffset interpolateAtSample inverse inversesqrt isinf isnan ldexp length lessThan lessThanEqual log log2 matrixCompMult max memoryBarrier memoryBarrierAtomicCounter memoryBarrierBuffer memoryBarrierImage memoryBarrierShared min mix mod modf noise1 noise2 noise3 noise4 normalize not notEqual outerProduct packDouble2x32 packHalf2x16 packSnorm2x16 packSnorm4x8 packUnorm2x16 packUnorm4x8 pow radians reflect refract round roundEven shadow1D shadow1DLod shadow1DProj shadow1DProjLod shadow2D shadow2DLod shadow2DProj shadow2DProjLod sign sin sinh smoothstep sqrt step tan tanh texelFetch texelFetchOffset texture texture1D texture1DLod texture1DProj texture1DProjLod texture2D texture2DLod texture2DProj texture2DProjLod texture3D texture3DLod texture3DProj texture3DProjLod textureCube textureCubeLod textureGather textureGatherOffset textureGatherOffsets textureGrad textureGradOffset textureLod textureLodOffset textureOffset textureProj textureProjGrad textureProjGradOffset textureProjLod textureProjLodOffset textureProjOffset textureQueryLevels textureQueryLod textureSize transpose trunc uaddCarry uintBitsToFloat umulExtended unpackDouble2x32 unpackHalf2x16 unpackSnorm2x16 unpackSnorm4x8 unpackUnorm2x16 unpackUnorm4x8 usubBorrow",literal:"true false"},illegal:'"',contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,{className:"meta",begin:"#",end:"$"}]}}}),define("highlight/lib/languages/go",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={keyword:"break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune",literal:"true false iota nil",built_in:"append cap close complex copy imag len make new panic print println real recover delete"};return{aliases:["golang"],keywords:t,illegal:"",end:",\\s+",returnBegin:!0,endsWithParent:!0,contains:[{className:"attr",begin:":\\w+"},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{begin:"\\w+",relevance:0}]}]},{begin:"\\(\\s*",end:"\\s*\\)",excludeEnd:!0,contains:[{begin:"\\w+\\s*=",end:"\\s+",returnBegin:!0,endsWithParent:!0,contains:[{className:"attr",begin:"\\w+",relevance:0},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{begin:"\\w+",relevance:0}]}]}]},{begin:"^\\s*[=~]\\s*"},{begin:"#{",starts:{end:"}",subLanguage:"ruby"}}]}}}),define("highlight/lib/languages/handlebars",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={"builtin-name":"each in with if else unless bindattr action collection debugger log outlet template unbound view yield"};return{aliases:["hbs","html.hbs","html.handlebars"],case_insensitive:!0,subLanguage:"xml",contains:[e.COMMENT("{{!(--)?","(--)?}}"),{className:"template-tag",begin:/\{\{[#\/]/,end:/\}\}/,contains:[{className:"name",begin:/[a-zA-Z\.-]+/,keywords:t,starts:{endsWithParent:!0,relevance:0,contains:[e.QUOTE_STRING_MODE]}}]},{className:"template-variable",begin:/\{\{/,end:/\}\}/,keywords:t}]}}}),define("highlight/lib/languages/haskell",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={variants:[e.COMMENT("--","$"),e.COMMENT("{-","-}",{contains:["self"]})]},n={className:"meta",begin:"{-#",end:"#-}"},i={className:"meta",begin:"^#",end:"$"},r={className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},a={begin:"\\(",end:"\\)",illegal:'"',contains:[n,i,{className:"type",begin:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"},e.inherit(e.TITLE_MODE,{begin:"[_a-z][\\w']*"}),t]},o={begin:"{",end:"}",contains:a.contains};return{aliases:["hs"],keywords:"let in if then else case of where do module import hiding qualified type data newtype deriving class instance as default infix infixl infixr foreign export ccall stdcall cplusplus jvm dotnet safe unsafe family forall mdo proc rec",contains:[{beginKeywords:"module",end:"where",keywords:"module where",contains:[a,t],illegal:"\\W\\.|;"},{begin:"\\bimport\\b",end:"$",keywords:"import qualified as hiding",contains:[a,t],illegal:"\\W\\.|;"},{className:"class",begin:"^(\\s*)?(class|instance)\\b",end:"where",keywords:"class family instance where",contains:[r,a,t]},{className:"class",begin:"\\b(data|(new)?type)\\b",end:"$",keywords:"data family type newtype deriving",contains:[n,r,a,o,t]},{beginKeywords:"default",end:"$",contains:[r,a,t]},{beginKeywords:"infix infixl infixr",end:"$",contains:[e.C_NUMBER_MODE,t]},{begin:"\\bforeign\\b",end:"$",keywords:"foreign import export ccall stdcall cplusplus jvm dotnet safe unsafe",contains:[r,e.QUOTE_STRING_MODE,t]},{className:"meta",begin:"#!\\/usr\\/bin\\/env runhaskell",end:"$"},n,i,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,r,e.inherit(e.TITLE_MODE,{begin:"^[_a-z][\\w']*"}),t,{begin:"->|<-"}]}}}),define("highlight/lib/languages/haxe",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)";return{aliases:["hx"],keywords:{keyword:"break callback case cast catch class continue default do dynamic else enum extends extern for function here if implements import in inline interface never new override package private public return static super switch this throw trace try typedef untyped using var while",literal:"true false null"},contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.TITLE_MODE]},{className:"meta",begin:"#",end:"$",keywords:{"meta-keyword":"if else elseif end error"}},{className:"function",beginKeywords:"function",end:"[{;]",excludeEnd:!0,illegal:"\\S",contains:[e.TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{begin:":\\s*"+t}]}]}}}),define("highlight/lib/languages/hsp",["require","exports","module"],function(e,t,n){n.exports=function(e){return{case_insensitive:!0,lexemes:/[\w\._]+/,keywords:"goto gosub return break repeat loop continue wait await dim sdim foreach dimtype dup dupptr end stop newmod delmod mref run exgoto on mcall assert logmes newlab resume yield onexit onerror onkey onclick oncmd exist delete mkdir chdir dirlist bload bsave bcopy memfile if else poke wpoke lpoke getstr chdpm memexpand memcpy memset notesel noteadd notedel noteload notesave randomize noteunsel noteget split strrep setease button chgdisp exec dialog mmload mmplay mmstop mci pset pget syscolor mes print title pos circle cls font sysfont objsize picload color palcolor palette redraw width gsel gcopy gzoom gmode bmpsave hsvcolor getkey listbox chkbox combox input mesbox buffer screen bgscr mouse objsel groll line clrobj boxf objprm objmode stick grect grotate gsquare gradf objimage objskip objenable celload celdiv celput newcom querycom delcom cnvstow comres axobj winobj sendmsg comevent comevarg sarrayconv callfunc cnvwtos comevdisp libptr system hspstat hspver stat cnt err strsize looplev sublev iparam wparam lparam refstr refdval int rnd strlen length length2 length3 length4 vartype gettime peek wpeek lpeek varptr varuse noteinfo instr abs limit getease str strmid strf getpath strtrim sin cos tan atan sqrt double absf expf logf limitf powf geteasef mousex mousey mousew hwnd hinstance hdc ginfo objinfo dirinfo sysinfo thismod __hspver__ __hsp30__ __date__ __time__ __line__ __file__ _debug __hspdef__ and or xor not screen_normal screen_palette screen_hide screen_fixedsize screen_tool screen_frame gmode_gdi gmode_mem gmode_rgb0 gmode_alpha gmode_rgb0alpha gmode_add gmode_sub gmode_pixela ginfo_mx ginfo_my ginfo_act ginfo_sel ginfo_wx1 ginfo_wy1 ginfo_wx2 ginfo_wy2 ginfo_vx ginfo_vy ginfo_sizex ginfo_sizey ginfo_winx ginfo_winy ginfo_mesx ginfo_mesy ginfo_r ginfo_g ginfo_b ginfo_paluse ginfo_dispx ginfo_dispy ginfo_cx ginfo_cy ginfo_intid ginfo_newid ginfo_sx ginfo_sy objinfo_mode objinfo_bmscr objinfo_hwnd notemax notesize dir_cur dir_exe dir_win dir_sys dir_cmdline dir_desktop dir_mydoc dir_tv font_normal font_bold font_italic font_underline font_strikeout font_antialias objmode_normal objmode_guifont objmode_usefont gsquare_grad msgothic msmincho do until while wend for next _break _continue switch case default swbreak swend ddim ldim alloc m_pi rad2deg deg2rad ease_linear ease_quad_in ease_quad_out ease_quad_inout ease_cubic_in ease_cubic_out ease_cubic_inout ease_quartic_in ease_quartic_out ease_quartic_inout ease_bounce_in ease_bounce_out ease_bounce_inout ease_shake_in ease_shake_out ease_shake_inout ease_loop",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",begin:'{"',end:'"}',contains:[e.BACKSLASH_ESCAPE]},e.COMMENT(";","$",{relevance:0}),{className:"meta",begin:"#",end:"$",keywords:{"meta-keyword":"addion cfunc cmd cmpopt comfunc const defcfunc deffunc define else endif enum epack func global if ifdef ifndef include modcfunc modfunc modinit modterm module pack packopt regcmd runtime undef usecom uselib"},contains:[e.inherit(e.QUOTE_STRING_MODE,{className:"meta-string"}),e.NUMBER_MODE,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"symbol",begin:"^\\*(\\w+|@)"},e.NUMBER_MODE,e.C_NUMBER_MODE]}}}),define("highlight/lib/languages/htmlbars",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="action collection component concat debugger each each-in else get hash if input link-to loc log mut outlet partial query-params render textarea unbound unless with yield view",n={illegal:/\}\}/,begin:/[a-zA-Z0-9_]+=/,returnBegin:!0,relevance:0,contains:[{className:"attr",begin:/[a-zA-Z0-9_]+/}]},i=({illegal:/\}\}/,begin:/\)/,end:/\)/,contains:[{begin:/[a-zA-Z\.\-]+/,keywords:{built_in:t},starts:{endsWithParent:!0,relevance:0,contains:[e.QUOTE_STRING_MODE]}}]},{endsWithParent:!0,relevance:0,keywords:{keyword:"as",built_in:t},contains:[e.QUOTE_STRING_MODE,n,e.NUMBER_MODE]});return{case_insensitive:!0,subLanguage:"xml",contains:[e.COMMENT("{{!(--)?","(--)?}}"),{className:"template-tag",begin:/\{\{[#\/]/,end:/\}\}/,contains:[{className:"name",begin:/[a-zA-Z\.\-]+/,keywords:{"builtin-name":t},starts:i}]},{className:"template-variable",begin:/\{\{[a-zA-Z][a-zA-Z\-]+/,end:/\}\}/,keywords:{keyword:"as",built_in:t},contains:[e.QUOTE_STRING_MODE]}]}}}),define("highlight/lib/languages/http",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="HTTP/[0-9\\.]+";return{aliases:["https"],illegal:"\\S",contains:[{begin:"^"+t,end:"$",contains:[{className:"number",begin:"\\b\\d{3}\\b"}]},{begin:"^[A-Z]+ (.*?) "+t+"$",returnBegin:!0,end:"$",contains:[{className:"string",begin:" ",end:" ",excludeBegin:!0,excludeEnd:!0},{begin:t},{className:"keyword",begin:"[A-Z]+"}]},{className:"attribute",begin:"^\\w",end:": ",excludeEnd:!0,illegal:"\\n|\\s|=",starts:{end:"$",relevance:0}},{begin:"\\n\\n",starts:{subLanguage:[],endsWithParent:!0}}]}}}),define("highlight/lib/languages/inform7",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="\\[",n="\\]";return{aliases:["i7"],case_insensitive:!0,keywords:{keyword:"thing room person man woman animal container supporter backdrop door scenery open closed locked inside gender is are say understand kind of rule"},contains:[{className:"string",begin:'"',end:'"',relevance:0,contains:[{className:"subst",begin:t,end:n}]},{className:"section",begin:/^(Volume|Book|Part|Chapter|Section|Table)\b/,end:"$"},{begin:/^(Check|Carry out|Report|Instead of|To|Rule|When|Before|After)\b/,end:":",contains:[{begin:"\\(This",end:"\\)"}]},{className:"comment",begin:t,end:n,contains:["self"]}]}}}),define("highlight/lib/languages/ini",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]};return{aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[e.COMMENT(";","$"),e.HASH_COMMENT_MODE,{className:"section",begin:/^\s*\[+/,end:/\]+/},{begin:/^[a-z0-9\[\]_-]+\s*=\s*/,end:"$",returnBegin:!0,contains:[{className:"attr",begin:/[a-z0-9\[\]_-]+/},{begin:/=/,endsWithParent:!0,relevance:0,contains:[{className:"literal",begin:/\bon|off|true|false|yes|no\b/},{className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)}/}]},t,{className:"number",begin:/([\+\-]+)?[\d]+_[\d_]+/},e.NUMBER_MODE]}]}]}}}),define("highlight/lib/languages/irpf90",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"params",begin:"\\(",end:"\\)"},n={literal:".False. .True.",keyword:"kind do while private call intrinsic where elsewhere type endtype endmodule endselect endinterface end enddo endif if forall endforall only contains default return stop then public subroutine|10 function program .and. .or. .not. .le. .eq. .ge. .gt. .lt. goto save else use module select case access blank direct exist file fmt form formatted iostat name named nextrec number opened rec recl sequential status unformatted unit continue format pause cycle exit c_null_char c_alert c_backspace c_form_feed flush wait decimal round iomsg synchronous nopass non_overridable pass protected volatile abstract extends import non_intrinsic value deferred generic final enumerator class associate bind enum c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t c_int_least32_t c_int_least64_t c_int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr c_new_line c_carriage_return c_horizontal_tab c_vertical_tab iso_c_binding c_loc c_funloc c_associated c_f_pointer c_ptr c_funptr iso_fortran_env character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor numeric_storage_size output_unit c_f_procpointer ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode newunit contiguous recursive pad position action delim readwrite eor advance nml interface procedure namelist include sequence elemental pure integer real character complex logical dimension allocatable|10 parameter external implicit|10 none double precision assign intent optional pointer target in out common equivalence data begin_provider &begin_provider end_provider begin_shell end_shell begin_template end_template subst assert touch soft_touch provide no_dep free irp_if irp_else irp_endif irp_write irp_read",built_in:"alog alog10 amax0 amax1 amin0 amin1 amod cabs ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp dint dlog dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlgama iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod qnint qsign qsin qsinh qsqrt qtan qtanh abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log log10 max min nint sign sin sinh sqrt tan tanh print write dim lge lgt lle llt mod nullify allocate deallocate adjustl adjustr all allocated any associated bit_size btest ceiling count cshift date_and_time digits dot_product eoshift epsilon exponent floor fraction huge iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul maxexponent maxloc maxval merge minexponent minloc minval modulo mvbits nearest pack present product radix random_number random_seed range repeat reshape rrspacing scale scan selected_int_kind selected_real_kind set_exponent shape size spacing spread sum system_clock tiny transpose trim ubound unpack verify achar iachar transfer dble entry dprod cpu_time command_argument_count get_command get_command_argument get_environment_variable is_iostat_end ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode is_iostat_eor move_alloc new_line selected_char_kind same_type_as extends_type_ofacosh asinh atanh bessel_j0 bessel_j1 bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma hypot norm2 atomic_define atomic_ref execute_command_line leadz trailz storage_size merge_bits bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr num_images parity popcnt poppar shifta shiftl shiftr this_image IRP_ALIGN irp_here" -};return{case_insensitive:!0,keywords:n,illegal:/\/\*/,contains:[e.inherit(e.APOS_STRING_MODE,{className:"string",relevance:0}),e.inherit(e.QUOTE_STRING_MODE,{className:"string",relevance:0}),{className:"function",beginKeywords:"subroutine function program",illegal:"[${=\\n]",contains:[e.UNDERSCORE_TITLE_MODE,t]},e.COMMENT("!","$",{relevance:0}),e.COMMENT("begin_doc","end_doc",{relevance:10}),{className:"number",begin:"(?=\\b|\\+|\\-|\\.)(?=\\.\\d|\\d)(?:\\d+)?(?:\\.?\\d*)(?:[de][+-]?\\d+)?\\b\\.?",relevance:0}]}}}),define("highlight/lib/languages/java",["require","exports","module"],function(e,t,n){n.exports=function(e){var t=e.UNDERSCORE_IDENT_RE+"(<"+e.UNDERSCORE_IDENT_RE+"(\\s*,\\s*"+e.UNDERSCORE_IDENT_RE+")*>)?",n="false synchronized int abstract float private char boolean static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private module requires exports",i="\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?",r={className:"number",begin:i,relevance:0};return{aliases:["jsp"],keywords:n,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"class",beginKeywords:"class interface",end:/[{;=]/,excludeEnd:!0,keywords:"class interface",illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"new throw return else",relevance:0},{className:"function",begin:"("+t+"\\s+)+"+e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:n,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/,keywords:n,relevance:0,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},r,{className:"meta",begin:"@[A-Za-z]+"}]}}}),define("highlight/lib/languages/javascript",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="[A-Za-z$_][0-9A-Za-z$_]*",n={keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await static import from as",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},i={className:"number",variants:[{begin:"\\b(0[bB][01]+)"},{begin:"\\b(0[oO][0-7]+)"},{begin:e.C_NUMBER_RE}],relevance:0},r={className:"subst",begin:"\\$\\{",end:"\\}",keywords:n,contains:[]},a={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,r]};r.contains=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,i,e.REGEXP_MODE];var o=r.contains.concat([e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]);return{aliases:["js","jsx"],keywords:n,contains:[{className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},{className:"meta",begin:/^#!/,end:/$/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,i,{begin:/[{,]\s*/,relevance:0,contains:[{begin:t+"\\s*:",returnBegin:!0,relevance:0,contains:[{className:"attr",begin:t,relevance:0}]}]},{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.REGEXP_MODE,{className:"function",begin:"(\\(.*?\\)|"+t+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:t},{begin:/\(\s*\)/},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:n,contains:o}]}]},{begin://,subLanguage:"xml",contains:[{begin:/<\w+\s*\/>/,skip:!0},{begin:/<\w+/,end:/(\/\w+|\w+\/)>/,skip:!0,contains:[{begin:/<\w+\s*\/>/,skip:!0},"self"]}]}],relevance:0},{className:"function",beginKeywords:"function",end:/\{/,excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:t}),{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:o}],illegal:/\[|%/},{begin:/\$[(.]/},e.METHOD_GUARD,{className:"class",beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"constructor",end:/\{/,excludeEnd:!0}],illegal:/#(?!!)/}}}),define("highlight/lib/languages/json",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={literal:"true false null"},n=[e.QUOTE_STRING_MODE,e.C_NUMBER_MODE],i={end:",",endsWithParent:!0,excludeEnd:!0,contains:n,keywords:t},r={begin:"{",end:"}",contains:[{className:"attr",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE],illegal:"\\n"},e.inherit(i,{begin:/:/})],illegal:"\\S"},a={begin:"\\[",end:"\\]",contains:[e.inherit(i)],illegal:"\\S"};return n.splice(n.length,0,r,a),{contains:n,keywords:t,illegal:"\\S"}}}),define("highlight/lib/languages/julia",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={keyword:"in abstract baremodule begin bitstype break catch ccall const continue do else elseif end export finally for function global if immutable import importall let local macro module quote return try type typealias using while",literal:"true false ARGS CPU_CORES C_NULL DL_LOAD_PATH DevNull ENDIAN_BOM ENV I|0 Inf Inf16 Inf32 InsertionSort JULIA_HOME LOAD_PATH MS_ASYNC MS_INVALIDATE MS_SYNC MergeSort NaN NaN16 NaN32 OS_NAME QuickSort RTLD_DEEPBIND RTLD_FIRST RTLD_GLOBAL RTLD_LAZY RTLD_LOCAL RTLD_NODELETE RTLD_NOLOAD RTLD_NOW RoundDown RoundFromZero RoundNearest RoundToZero RoundUp STDERR STDIN STDOUT VERSION WORD_SIZE catalan cglobal e|0 eu|0 eulergamma golden im nothing pi γ π φ Inf64 NaN64 RoundNearestTiesAway RoundNearestTiesUp ",built_in:"ANY ASCIIString AbstractArray AbstractRNG AbstractSparseArray Any ArgumentError Array Associative Base64Pipe Bidiagonal BigFloat BigInt BitArray BitMatrix BitVector Bool BoundsError Box CFILE Cchar Cdouble Cfloat Char CharString Cint Clong Clonglong ClusterManager Cmd Coff_t Colon Complex Complex128 Complex32 Complex64 Condition Cptrdiff_t Cshort Csize_t Cssize_t Cuchar Cuint Culong Culonglong Cushort Cwchar_t DArray DataType DenseArray Diagonal Dict DimensionMismatch DirectIndexString Display DivideError DomainError EOFError EachLine Enumerate ErrorException Exception Expr Factorization FileMonitor FileOffset Filter Float16 Float32 Float64 FloatRange FloatingPoint Function GetfieldNode GotoNode Hermitian IO IOBuffer IOStream IPv4 IPv6 InexactError Int Int128 Int16 Int32 Int64 Int8 IntSet Integer InterruptException IntrinsicFunction KeyError LabelNode LambdaStaticData LineNumberNode LoadError LocalProcess MIME MathConst MemoryError MersenneTwister Method MethodError MethodTable Module NTuple NewvarNode Nothing Number ObjectIdDict OrdinalRange OverflowError ParseError PollingFileWatcher ProcessExitedException ProcessGroup Ptr QuoteNode Range Range1 Ranges Rational RawFD Real Regex RegexMatch RemoteRef RepString RevString RopeString RoundingMode Set SharedArray Signed SparseMatrixCSC StackOverflowError Stat StatStruct StepRange String SubArray SubString SymTridiagonal Symbol SymbolNode Symmetric SystemError Task TextDisplay Timer TmStruct TopNode Triangular Tridiagonal Type TypeConstructor TypeError TypeName TypeVar UTF16String UTF32String UTF8String UdpSocket Uint Uint128 Uint16 Uint32 Uint64 Uint8 UndefRefError UndefVarError UniformScaling UnionType UnitRange Unsigned Vararg VersionNumber WString WeakKeyDict WeakRef Woodbury Zip AbstractChannel AbstractFloat AbstractString AssertionError Base64DecodePipe Base64EncodePipe BufferStream CapturedException CartesianIndex CartesianRange Channel Cintmax_t CompositeException Cstring Cuintmax_t Cwstring Date DateTime Dims Enum GenSym GlobalRef HTML InitError InvalidStateException Irrational LinSpace LowerTriangular NullException Nullable OutOfMemoryError Pair PartialQuickSort Pipe RandomDevice ReadOnlyMemoryError ReentrantLock Ref RemoteException SegmentationFault SerializationState SimpleVector TCPSocket Text Tuple UDPSocket UInt UInt128 UInt16 UInt32 UInt64 UInt8 UnicodeError Union UpperTriangular Val Void WorkerConfig AbstractMatrix AbstractSparseMatrix AbstractSparseVector AbstractVecOrMat AbstractVector DenseMatrix DenseVecOrMat DenseVector Matrix SharedMatrix SharedVector StridedArray StridedMatrix StridedVecOrMat StridedVector VecOrMat Vector "},n="[A-Za-z_\\u00A1-\\uFFFF][A-Za-z_0-9\\u00A1-\\uFFFF]*",i={lexemes:n,keywords:t,illegal:/<\//},r={className:"type",begin:/::/},a={className:"type",begin:/<:/},o={className:"number",begin:/(\b0x[\d_]*(\.[\d_]*)?|0x\.\d[\d_]*)p[-+]?\d+|\b0[box][a-fA-F0-9][a-fA-F0-9_]*|(\b\d[\d_]*(\.[\d_]*)?|\.\d[\d_]*)([eEfF][-+]?\d+)?/,relevance:0},s={className:"string",begin:/'(.|\\[xXuU][a-zA-Z0-9]+)'/},l={className:"subst",begin:/\$\(/,end:/\)/,keywords:t},c={className:"variable",begin:"\\$"+n},d={className:"string",contains:[e.BACKSLASH_ESCAPE,l,c],variants:[{begin:/\w*"""/,end:/"""\w*/,relevance:10},{begin:/\w*"/,end:/"\w*/}]},u={className:"string",contains:[e.BACKSLASH_ESCAPE,l,c],begin:"`",end:"`"},m={className:"meta",begin:"@"+n},p={className:"comment",variants:[{begin:"#=",end:"=#",relevance:10},{begin:"#",end:"$"}]};return i.contains=[o,s,r,a,d,u,m,p,e.HASH_COMMENT_MODE],l.contains=i.contains,i}}),define("highlight/lib/languages/kotlin",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline interface annotation data sealed internal infix operator out by constructor super trait volatile transient native default",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},i={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},r={className:"subst",variants:[{begin:"\\$"+e.UNDERSCORE_IDENT_RE},{begin:"\\${",end:"}",contains:[e.APOS_STRING_MODE,e.C_NUMBER_MODE]}]},a={className:"string",variants:[{begin:'"""',end:'"""',contains:[r]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,r]}]},o={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},s={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(a,{className:"meta-string"})]}]};return{keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,i,o,s,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,illegal:/fun\s+(<.*>)?[^\s\(]+(\s+[^\s\(]+)\s*=/,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin://,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],relevance:0},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,o,s,a,e.C_NUMBER_MODE]},e.C_BLOCK_COMMENT_MODE]},{className:"class",beginKeywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin://,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,]|$/,excludeBegin:!0,returnEnd:!0},o,s]},a,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:"\n"},e.C_NUMBER_MODE]}}});define("highlight/lib/languages/lasso",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="[a-zA-Z_][\\w.]*",n="<\\?(lasso(script)?|=)",i="\\]|\\?>",r={literal:"true false none minimal full all void and or not bw nbw ew new cn ncn lt lte gt gte eq neq rx nrx ft",built_in:"array date decimal duration integer map pair string tag xml null boolean bytes keyword list locale queue set stack staticarray local var variable global data self inherited currentcapture givenblock",keyword:"cache database_names database_schemanames database_tablenames define_tag define_type email_batch encode_set html_comment handle handle_error header if inline iterate ljax_target link link_currentaction link_currentgroup link_currentrecord link_detail link_firstgroup link_firstrecord link_lastgroup link_lastrecord link_nextgroup link_nextrecord link_prevgroup link_prevrecord log loop namespace_using output_none portal private protect records referer referrer repeating resultset rows search_args search_arguments select sort_args sort_arguments thread_atomic value_list while abort case else fail_if fail_ifnot fail if_empty if_false if_null if_true loop_abort loop_continue loop_count params params_up return return_value run_children soap_definetag soap_lastrequest soap_lastresponse tag_name ascending average by define descending do equals frozen group handle_failure import in into join let match max min on order parent protected provide public require returnhome skip split_thread sum take thread to trait type where with yield yieldhome"},a=e.COMMENT("",{relevance:0}),o={className:"meta",begin:"\\[noprocess\\]",starts:{end:"\\[/noprocess\\]",returnEnd:!0,contains:[a]}},s={className:"meta",begin:"\\[/noprocess|"+n},l={className:"symbol",begin:"'"+t+"'"},c=[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.inherit(e.C_NUMBER_MODE,{begin:e.C_NUMBER_RE+"|(-?infinity|NaN)\\b"}),e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"`",end:"`"},{variants:[{begin:"[#$]"+t},{begin:"#",end:"\\d+",illegal:"\\W"}]},{className:"type",begin:"::\\s*",end:t,illegal:"\\W"},{className:"params",variants:[{begin:"-(?!infinity)"+t,relevance:0},{begin:"(\\.\\.\\.)"}]},{begin:/(->|\.)\s*/,relevance:0,contains:[l]},{className:"class",beginKeywords:"define",returnEnd:!0,end:"\\(|=>",contains:[e.inherit(e.TITLE_MODE,{begin:t+"(=(?!>))?|[-+*/%](?!>)"})]}];return{aliases:["ls","lassoscript"],case_insensitive:!0,lexemes:t+"|&[lg]t;",keywords:r,contains:[{className:"meta",begin:i,relevance:0,starts:{end:"\\[|"+n,returnEnd:!0,relevance:0,contains:[a]}},o,s,{className:"meta",begin:"\\[no_square_brackets",starts:{end:"\\[/no_square_brackets\\]",lexemes:t+"|&[lg]t;",keywords:r,contains:[{className:"meta",begin:i,relevance:0,starts:{end:"\\[noprocess\\]|"+n,returnEnd:!0,contains:[a]}},o,s].concat(c)}},{className:"meta",begin:"\\[",relevance:0},{className:"meta",begin:"^#!",end:"lasso9$",relevance:10}].concat(c)}}});define("highlight/lib/languages/ldif",["require","exports","module"],function(e,t,n){n.exports=function(e){return{contains:[{className:"attribute",begin:"^dn",end:": ",excludeEnd:!0,starts:{end:"$",relevance:0},relevance:10},{className:"attribute",begin:"^\\w",end:": ",excludeEnd:!0,starts:{end:"$",relevance:0}},{className:"literal",begin:"^-",end:"$"},e.HASH_COMMENT_MODE]}}}),define("highlight/lib/languages/less",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="[\\w-]+",n="("+t+"|@{"+t+"})",i=[],r=[],a=function(e){return{className:"string",begin:"~?"+e+".*?"+e}},o=function(e,t,n){return{className:e,begin:t,relevance:n}},s={begin:"\\(",end:"\\)",contains:r,relevance:0};r.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a("'"),a('"'),e.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},o("number","#[0-9A-Fa-f]+\\b"),s,o("variable","@@?"+t,10),o("variable","@{"+t+"}"),o("built_in","~?`[^`]*?`"),{className:"attribute",begin:t+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},{className:"meta",begin:"!important"});var l=r.concat({begin:"{",end:"}",contains:i}),c={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(r)},d={begin:n+"\\s*:",returnBegin:!0,end:"[;}]",relevance:0,contains:[{className:"attribute",begin:n,end:":",excludeEnd:!0,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:r}}]},u={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",returnEnd:!0,contains:r,relevance:0}},m={className:"variable",variants:[{begin:"@"+t+"\\s*:",relevance:15},{begin:"@"+t}],starts:{end:"[;}]",returnEnd:!0,contains:l}},p={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:n,end:"{"}],returnBegin:!0,returnEnd:!0,illegal:"[<='$\"]",relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,c,o("keyword","all\\b"),o("variable","@{"+t+"}"),o("selector-tag",n+"%?",0),o("selector-id","#"+n),o("selector-class","\\."+n,0),o("selector-tag","&",0),{className:"selector-attr",begin:"\\[",end:"\\]"},{className:"selector-pseudo",begin:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{begin:"\\(",end:"\\)",contains:l},{begin:"!important"}]};return i.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,u,m,d,p),{case_insensitive:!0,illegal:"[=>'/<($\"]",contains:i}}}),define("highlight/lib/languages/lisp",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="[a-zA-Z_\\-\\+\\*\\/\\<\\=\\>\\&\\#][a-zA-Z0-9_\\-\\+\\*\\/\\<\\=\\>\\&\\#!]*",n="\\|[^]*?\\|",i="(\\-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s|D|E|F|L|S)(\\+|\\-)?\\d+)?",r={className:"meta",begin:"^#!",end:"$"},a={className:"literal",begin:"\\b(t{1}|nil)\\b"},o={className:"number",variants:[{begin:i,relevance:0},{begin:"#(b|B)[0-1]+(/[0-1]+)?"},{begin:"#(o|O)[0-7]+(/[0-7]+)?"},{begin:"#(x|X)[0-9a-fA-F]+(/[0-9a-fA-F]+)?"},{begin:"#(c|C)\\("+i+" +"+i,end:"\\)"}]},s=e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),l=e.COMMENT(";","$",{relevance:0}),c={begin:"\\*",end:"\\*"},d={className:"symbol",begin:"[:&]"+t},u={begin:t,relevance:0},m={begin:n},p={begin:"\\(",end:"\\)",contains:["self",a,s,o,u]},g={contains:[o,s,c,d,p,u],variants:[{begin:"['`]\\(",end:"\\)"},{begin:"\\(quote ",end:"\\)",keywords:{name:"quote"}},{begin:"'"+n}]},h={variants:[{begin:"'"+t},{begin:"#'"+t+"(::"+t+")*"}]},b={begin:"\\(\\s*",end:"\\)"},f={endsWithParent:!0,relevance:0};return b.contains=[{className:"name",variants:[{begin:t},{begin:n}]},f],f.contains=[g,h,b,a,o,s,l,c,d,m,u],{illegal:/\S/,contains:[o,r,a,s,l,g,h,b,u]}}}),define("highlight/lib/languages/livecodeserver",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={begin:"\\b[gtps][A-Z]+[A-Za-z0-9_\\-]*\\b|\\$_[A-Z]+",relevance:0},n=[e.C_BLOCK_COMMENT_MODE,e.HASH_COMMENT_MODE,e.COMMENT("--","$"),e.COMMENT("[^:]//","$")],i=e.inherit(e.TITLE_MODE,{variants:[{begin:"\\b_*rig[A-Z]+[A-Za-z0-9_\\-]*"},{begin:"\\b_[a-z0-9\\-]+"}]}),r=e.inherit(e.TITLE_MODE,{begin:"\\b([A-Za-z0-9_\\-]+)\\b"});return{case_insensitive:!1,keywords:{keyword:"$_COOKIE $_FILES $_GET $_GET_BINARY $_GET_RAW $_POST $_POST_BINARY $_POST_RAW $_SESSION $_SERVER codepoint codepoints segment segments codeunit codeunits sentence sentences trueWord trueWords paragraph after byte bytes english the until http forever descending using line real8 with seventh for stdout finally element word words fourth before black ninth sixth characters chars stderr uInt1 uInt1s uInt2 uInt2s stdin string lines relative rel any fifth items from middle mid at else of catch then third it file milliseconds seconds second secs sec int1 int1s int4 int4s internet int2 int2s normal text item last long detailed effective uInt4 uInt4s repeat end repeat URL in try into switch to words https token binfile each tenth as ticks tick system real4 by dateItems without char character ascending eighth whole dateTime numeric short first ftp integer abbreviated abbr abbrev private case while if div mod wrap and or bitAnd bitNot bitOr bitXor among not in a an within contains ends with begins the keys of keys",literal:"SIX TEN FORMFEED NINE ZERO NONE SPACE FOUR FALSE COLON CRLF PI COMMA ENDOFFILE EOF EIGHT FIVE QUOTE EMPTY ONE TRUE RETURN CR LINEFEED RIGHT BACKSLASH NULL SEVEN TAB THREE TWO six ten formfeed nine zero none space four false colon crlf pi comma endoffile eof eight five quote empty one true return cr linefeed right backslash null seven tab three two RIVERSION RISTATE FILE_READ_MODE FILE_WRITE_MODE FILE_WRITE_MODE DIR_WRITE_MODE FILE_READ_UMASK FILE_WRITE_UMASK DIR_READ_UMASK DIR_WRITE_UMASK",built_in:"put abs acos aliasReference annuity arrayDecode arrayEncode asin atan atan2 average avg avgDev base64Decode base64Encode baseConvert binaryDecode binaryEncode byteOffset byteToNum cachedURL cachedURLs charToNum cipherNames codepointOffset codepointProperty codepointToNum codeunitOffset commandNames compound compress constantNames cos date dateFormat decompress directories diskSpace DNSServers exp exp1 exp2 exp10 extents files flushEvents folders format functionNames geometricMean global globals hasMemory harmonicMean hostAddress hostAddressToName hostName hostNameToAddress isNumber ISOToMac itemOffset keys len length libURLErrorData libUrlFormData libURLftpCommand libURLLastHTTPHeaders libURLLastRHHeaders libUrlMultipartFormAddPart libUrlMultipartFormData libURLVersion lineOffset ln ln1 localNames log log2 log10 longFilePath lower macToISO matchChunk matchText matrixMultiply max md5Digest median merge millisec millisecs millisecond milliseconds min monthNames nativeCharToNum normalizeText num number numToByte numToChar numToCodepoint numToNativeChar offset open openfiles openProcesses openProcessIDs openSockets paragraphOffset paramCount param params peerAddress pendingMessages platform popStdDev populationStandardDeviation populationVariance popVariance processID random randomBytes replaceText result revCreateXMLTree revCreateXMLTreeFromFile revCurrentRecord revCurrentRecordIsFirst revCurrentRecordIsLast revDatabaseColumnCount revDatabaseColumnIsNull revDatabaseColumnLengths revDatabaseColumnNames revDatabaseColumnNamed revDatabaseColumnNumbered revDatabaseColumnTypes revDatabaseConnectResult revDatabaseCursors revDatabaseID revDatabaseTableNames revDatabaseType revDataFromQuery revdb_closeCursor revdb_columnbynumber revdb_columncount revdb_columnisnull revdb_columnlengths revdb_columnnames revdb_columntypes revdb_commit revdb_connect revdb_connections revdb_connectionerr revdb_currentrecord revdb_cursorconnection revdb_cursorerr revdb_cursors revdb_dbtype revdb_disconnect revdb_execute revdb_iseof revdb_isbof revdb_movefirst revdb_movelast revdb_movenext revdb_moveprev revdb_query revdb_querylist revdb_recordcount revdb_rollback revdb_tablenames revGetDatabaseDriverPath revNumberOfRecords revOpenDatabase revOpenDatabases revQueryDatabase revQueryDatabaseBlob revQueryResult revQueryIsAtStart revQueryIsAtEnd revUnixFromMacPath revXMLAttribute revXMLAttributes revXMLAttributeValues revXMLChildContents revXMLChildNames revXMLCreateTreeFromFileWithNamespaces revXMLCreateTreeWithNamespaces revXMLDataFromXPathQuery revXMLEvaluateXPath revXMLFirstChild revXMLMatchingNode revXMLNextSibling revXMLNodeContents revXMLNumberOfChildren revXMLParent revXMLPreviousSibling revXMLRootNode revXMLRPC_CreateRequest revXMLRPC_Documents revXMLRPC_Error revXMLRPC_GetHost revXMLRPC_GetMethod revXMLRPC_GetParam revXMLText revXMLRPC_Execute revXMLRPC_GetParamCount revXMLRPC_GetParamNode revXMLRPC_GetParamType revXMLRPC_GetPath revXMLRPC_GetPort revXMLRPC_GetProtocol revXMLRPC_GetRequest revXMLRPC_GetResponse revXMLRPC_GetSocket revXMLTree revXMLTrees revXMLValidateDTD revZipDescribeItem revZipEnumerateItems revZipOpenArchives round sampVariance sec secs seconds sentenceOffset sha1Digest shell shortFilePath sin specialFolderPath sqrt standardDeviation statRound stdDev sum sysError systemVersion tan tempName textDecode textEncode tick ticks time to tokenOffset toLower toUpper transpose truewordOffset trunc uniDecode uniEncode upper URLDecode URLEncode URLStatus uuid value variableNames variance version waitDepth weekdayNames wordOffset xsltApplyStylesheet xsltApplyStylesheetFromFile xsltLoadStylesheet xsltLoadStylesheetFromFile add breakpoint cancel clear local variable file word line folder directory URL close socket process combine constant convert create new alias folder directory decrypt delete variable word line folder directory URL dispatch divide do encrypt filter get include intersect kill libURLDownloadToFile libURLFollowHttpRedirects libURLftpUpload libURLftpUploadFile libURLresetAll libUrlSetAuthCallback libURLSetCustomHTTPHeaders libUrlSetExpect100 libURLSetFTPListCommand libURLSetFTPMode libURLSetFTPStopTime libURLSetStatusCallback load multiply socket prepare process post seek rel relative read from process rename replace require resetAll resolve revAddXMLNode revAppendXML revCloseCursor revCloseDatabase revCommitDatabase revCopyFile revCopyFolder revCopyXMLNode revDeleteFolder revDeleteXMLNode revDeleteAllXMLTrees revDeleteXMLTree revExecuteSQL revGoURL revInsertXMLNode revMoveFolder revMoveToFirstRecord revMoveToLastRecord revMoveToNextRecord revMoveToPreviousRecord revMoveToRecord revMoveXMLNode revPutIntoXMLNode revRollBackDatabase revSetDatabaseDriverPath revSetXMLAttribute revXMLRPC_AddParam revXMLRPC_DeleteAllDocuments revXMLAddDTD revXMLRPC_Free revXMLRPC_FreeAll revXMLRPC_DeleteDocument revXMLRPC_DeleteParam revXMLRPC_SetHost revXMLRPC_SetMethod revXMLRPC_SetPort revXMLRPC_SetProtocol revXMLRPC_SetSocket revZipAddItemWithData revZipAddItemWithFile revZipAddUncompressedItemWithData revZipAddUncompressedItemWithFile revZipCancel revZipCloseArchive revZipDeleteItem revZipExtractItemToFile revZipExtractItemToVariable revZipSetProgressCallback revZipRenameItem revZipReplaceItemWithData revZipReplaceItemWithFile revZipOpenArchive send set sort split start stop subtract union unload wait write"},contains:[t,{className:"keyword",begin:"\\bend\\sif\\b"},{className:"function",beginKeywords:"function",end:"$",contains:[t,r,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE,i]},{className:"function",begin:"\\bend\\s+",end:"$",keywords:"end",contains:[r,i],relevance:0},{beginKeywords:"command on",end:"$",contains:[t,r,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE,i]},{className:"meta",variants:[{begin:"<\\?(rev|lc|livecode)",relevance:10},{begin:"<\\?"},{begin:"\\?>"}]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE,i].concat(n),illegal:";$|^\\[|^=|&|{"}}}),define("highlight/lib/languages/livescript",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger case default function var with then unless until loop of by when and or is isnt not it that otherwise from to til fallthrough super case default function var void const let enum export import native __hasProp __extends __slice __bind __indexOf",literal:"true false null undefined yes no on off it that void",built_in:"npm require console print module global window document"},n="[A-Za-z$_](?:-[0-9A-Za-z$_]|[0-9A-Za-z$_])*",i=e.inherit(e.TITLE_MODE,{begin:n}),r={className:"subst",begin:/#\{/,end:/}/,keywords:t},a={className:"subst",begin:/#[A-Za-z$_]/,end:/(?:\-[0-9A-Za-z$_]|[0-9A-Za-z$_])*/,keywords:t},o=[e.BINARY_NUMBER_MODE,{className:"number",begin:"(\\b0[xX][a-fA-F0-9_]+)|(\\b\\d(\\d|_\\d)*(\\.(\\d(\\d|_\\d)*)?)?(_*[eE]([-+]\\d(_\\d|\\d)*)?)?[_a-z]*)",relevance:0,starts:{end:"(\\s*/)?",relevance:0}},{className:"string",variants:[{begin:/'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[e.BACKSLASH_ESCAPE]},{begin:/"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,r,a]},{begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,r,a]},{begin:/\\/,end:/(\s|$)/,excludeEnd:!0}]},{className:"regexp",variants:[{begin:"//",end:"//[gim]*",contains:[r,e.HASH_COMMENT_MODE]},{begin:/\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/}]},{begin:"@"+n},{begin:"``",end:"``",excludeBegin:!0,excludeEnd:!0,subLanguage:"javascript"}];r.contains=o;var s={className:"params",begin:"\\(",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:t,contains:["self"].concat(o)}]};return{aliases:["ls"],keywords:t,illegal:/\/\*/,contains:o.concat([e.COMMENT("\\/\\*","\\*\\/"),e.HASH_COMMENT_MODE,{className:"function",contains:[i,s],returnBegin:!0,variants:[{begin:"("+n+"\\s*(?:=|:=)\\s*)?(\\(.*\\))?\\s*\\B\\->\\*?",end:"\\->\\*?"},{begin:"("+n+"\\s*(?:=|:=)\\s*)?!?(\\(.*\\))?\\s*\\B[-~]{1,2}>\\*?",end:"[-~]{1,2}>\\*?"},{begin:"("+n+"\\s*(?:=|:=)\\s*)?(\\(.*\\))?\\s*\\B!?[-~]{1,2}>\\*?",end:"!?[-~]{1,2}>\\*?"}]},{className:"class",beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[i]},i]},{begin:n+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}}),define("highlight/lib/languages/lsl",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"subst",begin:/\\[tn"\\]/},n={className:"string",begin:'"',end:'"',contains:[t]},i={className:"number",begin:e.C_NUMBER_RE},r={className:"literal",variants:[{begin:"\\b(?:PI|TWO_PI|PI_BY_TWO|DEG_TO_RAD|RAD_TO_DEG|SQRT2)\\b"},{begin:"\\b(?:XP_ERROR_(?:EXPERIENCES_DISABLED|EXPERIENCE_(?:DISABLED|SUSPENDED)|INVALID_(?:EXPERIENCE|PARAMETERS)|KEY_NOT_FOUND|MATURITY_EXCEEDED|NONE|NOT_(?:FOUND|PERMITTED(?:_LAND)?)|NO_EXPERIENCE|QUOTA_EXCEEDED|RETRY_UPDATE|STORAGE_EXCEPTION|STORE_DISABLED|THROTTLED|UNKNOWN_ERROR)|JSON_APPEND|STATUS_(?:PHYSICS|ROTATE_[XYZ]|PHANTOM|SANDBOX|BLOCK_GRAB(?:_OBJECT)?|(?:DIE|RETURN)_AT_EDGE|CAST_SHADOWS|OK|MALFORMED_PARAMS|TYPE_MISMATCH|BOUNDS_ERROR|NOT_(?:FOUND|SUPPORTED)|INTERNAL_ERROR|WHITELIST_FAILED)|AGENT(?:_(?:BY_(?:LEGACY_|USER)NAME|FLYING|ATTACHMENTS|SCRIPTED|MOUSELOOK|SITTING|ON_OBJECT|AWAY|WALKING|IN_AIR|TYPING|CROUCHING|BUSY|ALWAYS_RUN|AUTOPILOT|LIST_(?:PARCEL(?:_OWNER)?|REGION)))?|CAMERA_(?:PITCH|DISTANCE|BEHINDNESS_(?:ANGLE|LAG)|(?:FOCUS|POSITION)(?:_(?:THRESHOLD|LOCKED|LAG))?|FOCUS_OFFSET|ACTIVE)|ANIM_ON|LOOP|REVERSE|PING_PONG|SMOOTH|ROTATE|SCALE|ALL_SIDES|LINK_(?:ROOT|SET|ALL_(?:OTHERS|CHILDREN)|THIS)|ACTIVE|PASS(?:IVE|_(?:ALWAYS|IF_NOT_HANDLED|NEVER))|SCRIPTED|CONTROL_(?:FWD|BACK|(?:ROT_)?(?:LEFT|RIGHT)|UP|DOWN|(?:ML_)?LBUTTON)|PERMISSION_(?:RETURN_OBJECTS|DEBIT|OVERRIDE_ANIMATIONS|SILENT_ESTATE_MANAGEMENT|TAKE_CONTROLS|TRIGGER_ANIMATION|ATTACH|CHANGE_LINKS|(?:CONTROL|TRACK)_CAMERA|TELEPORT)|INVENTORY_(?:TEXTURE|SOUND|OBJECT|SCRIPT|LANDMARK|CLOTHING|NOTECARD|BODYPART|ANIMATION|GESTURE|ALL|NONE)|CHANGED_(?:INVENTORY|COLOR|SHAPE|SCALE|TEXTURE|LINK|ALLOWED_DROP|OWNER|REGION(?:_START)?|TELEPORT|MEDIA)|OBJECT_(?:CLICK_ACTION|HOVER_HEIGHT|LAST_OWNER_ID|(?:PHYSICS|SERVER|STREAMING)_COST|UNKNOWN_DETAIL|CHARACTER_TIME|PHANTOM|PHYSICS|TEMP_ON_REZ|NAME|DESC|POS|PRIM_(?:COUNT|EQUIVALENCE)|RETURN_(?:PARCEL(?:_OWNER)?|REGION)|REZZER_KEY|ROO?T|VELOCITY|OMEGA|OWNER|GROUP|CREATOR|ATTACHED_POINT|RENDER_WEIGHT|(?:BODY_SHAPE|PATHFINDING)_TYPE|(?:RUNNING|TOTAL)_SCRIPT_COUNT|TOTAL_INVENTORY_COUNT|SCRIPT_(?:MEMORY|TIME))|TYPE_(?:INTEGER|FLOAT|STRING|KEY|VECTOR|ROTATION|INVALID)|(?:DEBUG|PUBLIC)_CHANNEL|ATTACH_(?:AVATAR_CENTER|CHEST|HEAD|BACK|PELVIS|MOUTH|CHIN|NECK|NOSE|BELLY|[LR](?:SHOULDER|HAND|FOOT|EAR|EYE|[UL](?:ARM|LEG)|HIP)|(?:LEFT|RIGHT)_PEC|HUD_(?:CENTER_[12]|TOP_(?:RIGHT|CENTER|LEFT)|BOTTOM(?:_(?:RIGHT|LEFT))?)|[LR]HAND_RING1|TAIL_(?:BASE|TIP)|[LR]WING|FACE_(?:JAW|[LR]EAR|[LR]EYE|TOUNGE)|GROIN|HIND_[LR]FOOT)|LAND_(?:LEVEL|RAISE|LOWER|SMOOTH|NOISE|REVERT)|DATA_(?:ONLINE|NAME|BORN|SIM_(?:POS|STATUS|RATING)|PAYINFO)|PAYMENT_INFO_(?:ON_FILE|USED)|REMOTE_DATA_(?:CHANNEL|REQUEST|REPLY)|PSYS_(?:PART_(?:BF_(?:ZERO|ONE(?:_MINUS_(?:DEST_COLOR|SOURCE_(ALPHA|COLOR)))?|DEST_COLOR|SOURCE_(ALPHA|COLOR))|BLEND_FUNC_(DEST|SOURCE)|FLAGS|(?:START|END)_(?:COLOR|ALPHA|SCALE|GLOW)|MAX_AGE|(?:RIBBON|WIND|INTERP_(?:COLOR|SCALE)|BOUNCE|FOLLOW_(?:SRC|VELOCITY)|TARGET_(?:POS|LINEAR)|EMISSIVE)_MASK)|SRC_(?:MAX_AGE|PATTERN|ANGLE_(?:BEGIN|END)|BURST_(?:RATE|PART_COUNT|RADIUS|SPEED_(?:MIN|MAX))|ACCEL|TEXTURE|TARGET_KEY|OMEGA|PATTERN_(?:DROP|EXPLODE|ANGLE(?:_CONE(?:_EMPTY)?)?)))|VEHICLE_(?:REFERENCE_FRAME|TYPE_(?:NONE|SLED|CAR|BOAT|AIRPLANE|BALLOON)|(?:LINEAR|ANGULAR)_(?:FRICTION_TIMESCALE|MOTOR_DIRECTION)|LINEAR_MOTOR_OFFSET|HOVER_(?:HEIGHT|EFFICIENCY|TIMESCALE)|BUOYANCY|(?:LINEAR|ANGULAR)_(?:DEFLECTION_(?:EFFICIENCY|TIMESCALE)|MOTOR_(?:DECAY_)?TIMESCALE)|VERTICAL_ATTRACTION_(?:EFFICIENCY|TIMESCALE)|BANKING_(?:EFFICIENCY|MIX|TIMESCALE)|FLAG_(?:NO_DEFLECTION_UP|LIMIT_(?:ROLL_ONLY|MOTOR_UP)|HOVER_(?:(?:WATER|TERRAIN|UP)_ONLY|GLOBAL_HEIGHT)|MOUSELOOK_(?:STEER|BANK)|CAMERA_DECOUPLED))|PRIM_(?:ALPHA_MODE(?:_(?:BLEND|EMISSIVE|MASK|NONE))?|NORMAL|SPECULAR|TYPE(?:_(?:BOX|CYLINDER|PRISM|SPHERE|TORUS|TUBE|RING|SCULPT))?|HOLE_(?:DEFAULT|CIRCLE|SQUARE|TRIANGLE)|MATERIAL(?:_(?:STONE|METAL|GLASS|WOOD|FLESH|PLASTIC|RUBBER))?|SHINY_(?:NONE|LOW|MEDIUM|HIGH)|BUMP_(?:NONE|BRIGHT|DARK|WOOD|BARK|BRICKS|CHECKER|CONCRETE|TILE|STONE|DISKS|GRAVEL|BLOBS|SIDING|LARGETILE|STUCCO|SUCTION|WEAVE)|TEXGEN_(?:DEFAULT|PLANAR)|SCULPT_(?:TYPE_(?:SPHERE|TORUS|PLANE|CYLINDER|MASK)|FLAG_(?:MIRROR|INVERT))|PHYSICS(?:_(?:SHAPE_(?:CONVEX|NONE|PRIM|TYPE)))?|(?:POS|ROT)_LOCAL|SLICE|TEXT|FLEXIBLE|POINT_LIGHT|TEMP_ON_REZ|PHANTOM|POSITION|SIZE|ROTATION|TEXTURE|NAME|OMEGA|DESC|LINK_TARGET|COLOR|BUMP_SHINY|FULLBRIGHT|TEXGEN|GLOW|MEDIA_(?:ALT_IMAGE_ENABLE|CONTROLS|(?:CURRENT|HOME)_URL|AUTO_(?:LOOP|PLAY|SCALE|ZOOM)|FIRST_CLICK_INTERACT|(?:WIDTH|HEIGHT)_PIXELS|WHITELIST(?:_ENABLE)?|PERMS_(?:INTERACT|CONTROL)|PARAM_MAX|CONTROLS_(?:STANDARD|MINI)|PERM_(?:NONE|OWNER|GROUP|ANYONE)|MAX_(?:URL_LENGTH|WHITELIST_(?:SIZE|COUNT)|(?:WIDTH|HEIGHT)_PIXELS)))|MASK_(?:BASE|OWNER|GROUP|EVERYONE|NEXT)|PERM_(?:TRANSFER|MODIFY|COPY|MOVE|ALL)|PARCEL_(?:MEDIA_COMMAND_(?:STOP|PAUSE|PLAY|LOOP|TEXTURE|URL|TIME|AGENT|UNLOAD|AUTO_ALIGN|TYPE|SIZE|DESC|LOOP_SET)|FLAG_(?:ALLOW_(?:FLY|(?:GROUP_)?SCRIPTS|LANDMARK|TERRAFORM|DAMAGE|CREATE_(?:GROUP_)?OBJECTS)|USE_(?:ACCESS_(?:GROUP|LIST)|BAN_LIST|LAND_PASS_LIST)|LOCAL_SOUND_ONLY|RESTRICT_PUSHOBJECT|ALLOW_(?:GROUP|ALL)_OBJECT_ENTRY)|COUNT_(?:TOTAL|OWNER|GROUP|OTHER|SELECTED|TEMP)|DETAILS_(?:NAME|DESC|OWNER|GROUP|AREA|ID|SEE_AVATARS))|LIST_STAT_(?:MAX|MIN|MEAN|MEDIAN|STD_DEV|SUM(?:_SQUARES)?|NUM_COUNT|GEOMETRIC_MEAN|RANGE)|PAY_(?:HIDE|DEFAULT)|REGION_FLAG_(?:ALLOW_DAMAGE|FIXED_SUN|BLOCK_TERRAFORM|SANDBOX|DISABLE_(?:COLLISIONS|PHYSICS)|BLOCK_FLY|ALLOW_DIRECT_TELEPORT|RESTRICT_PUSHOBJECT)|HTTP_(?:METHOD|MIMETYPE|BODY_(?:MAXLENGTH|TRUNCATED)|CUSTOM_HEADER|PRAGMA_NO_CACHE|VERBOSE_THROTTLE|VERIFY_CERT)|STRING_(?:TRIM(?:_(?:HEAD|TAIL))?)|CLICK_ACTION_(?:NONE|TOUCH|SIT|BUY|PAY|OPEN(?:_MEDIA)?|PLAY|ZOOM)|TOUCH_INVALID_FACE|PROFILE_(?:NONE|SCRIPT_MEMORY)|RC_(?:DATA_FLAGS|DETECT_PHANTOM|GET_(?:LINK_NUM|NORMAL|ROOT_KEY)|MAX_HITS|REJECT_(?:TYPES|AGENTS|(?:NON)?PHYSICAL|LAND))|RCERR_(?:CAST_TIME_EXCEEDED|SIM_PERF_LOW|UNKNOWN)|ESTATE_ACCESS_(?:ALLOWED_(?:AGENT|GROUP)_(?:ADD|REMOVE)|BANNED_AGENT_(?:ADD|REMOVE))|DENSITY|FRICTION|RESTITUTION|GRAVITY_MULTIPLIER|KFM_(?:COMMAND|CMD_(?:PLAY|STOP|PAUSE)|MODE|FORWARD|LOOP|PING_PONG|REVERSE|DATA|ROTATION|TRANSLATION)|ERR_(?:GENERIC|PARCEL_PERMISSIONS|MALFORMED_PARAMS|RUNTIME_PERMISSIONS|THROTTLED)|CHARACTER_(?:CMD_(?:(?:SMOOTH_)?STOP|JUMP)|DESIRED_(?:TURN_)?SPEED|RADIUS|STAY_WITHIN_PARCEL|LENGTH|ORIENTATION|ACCOUNT_FOR_SKIPPED_FRAMES|AVOIDANCE_MODE|TYPE(?:_(?:[ABCD]|NONE))?|MAX_(?:DECEL|TURN_RADIUS|(?:ACCEL|SPEED)))|PURSUIT_(?:OFFSET|FUZZ_FACTOR|GOAL_TOLERANCE|INTERCEPT)|REQUIRE_LINE_OF_SIGHT|FORCE_DIRECT_PATH|VERTICAL|HORIZONTAL|AVOID_(?:CHARACTERS|DYNAMIC_OBSTACLES|NONE)|PU_(?:EVADE_(?:HIDDEN|SPOTTED)|FAILURE_(?:DYNAMIC_PATHFINDING_DISABLED|INVALID_(?:GOAL|START)|NO_(?:NAVMESH|VALID_DESTINATION)|OTHER|TARGET_GONE|(?:PARCEL_)?UNREACHABLE)|(?:GOAL|SLOWDOWN_DISTANCE)_REACHED)|TRAVERSAL_TYPE(?:_(?:FAST|NONE|SLOW))?|CONTENT_TYPE_(?:ATOM|FORM|HTML|JSON|LLSD|RSS|TEXT|XHTML|XML)|GCNP_(?:RADIUS|STATIC)|(?:PATROL|WANDER)_PAUSE_AT_WAYPOINTS|OPT_(?:AVATAR|CHARACTER|EXCLUSION_VOLUME|LEGACY_LINKSET|MATERIAL_VOLUME|OTHER|STATIC_OBSTACLE|WALKABLE)|SIM_STAT_PCT_CHARS_STEPPED)\\b" -},{begin:"\\b(?:FALSE|TRUE)\\b"},{begin:"\\b(?:ZERO_ROTATION)\\b"},{begin:"\\b(?:EOF|JSON_(?:ARRAY|DELETE|FALSE|INVALID|NULL|NUMBER|OBJECT|STRING|TRUE)|NULL_KEY|TEXTURE_(?:BLANK|DEFAULT|MEDIA|PLYWOOD|TRANSPARENT)|URL_REQUEST_(?:GRANTED|DENIED))\\b"},{begin:"\\b(?:ZERO_VECTOR|TOUCH_INVALID_(?:TEXCOORD|VECTOR))\\b"}]},a={className:"built_in",begin:"\\b(?:ll(?:AgentInExperience|(?:Create|DataSize|Delete|KeyCount|Keys|Read|Update)KeyValue|GetExperience(?:Details|ErrorMessage)|ReturnObjectsBy(?:ID|Owner)|Json(?:2List|[GS]etValue|ValueType)|Sin|Cos|Tan|Atan2|Sqrt|Pow|Abs|Fabs|Frand|Floor|Ceil|Round|Vec(?:Mag|Norm|Dist)|Rot(?:Between|2(?:Euler|Fwd|Left|Up))|(?:Euler|Axes)2Rot|Whisper|(?:Region|Owner)?Say|Shout|Listen(?:Control|Remove)?|Sensor(?:Repeat|Remove)?|Detected(?:Name|Key|Owner|Type|Pos|Vel|Grab|Rot|Group|LinkNumber)|Die|Ground|Wind|(?:[GS]et)(?:AnimationOverride|MemoryLimit|PrimMediaParams|ParcelMusicURL|Object(?:Desc|Name)|PhysicsMaterial|Status|Scale|Color|Alpha|Texture|Pos|Rot|Force|Torque)|ResetAnimationOverride|(?:Scale|Offset|Rotate)Texture|(?:Rot)?Target(?:Remove)?|(?:Stop)?MoveToTarget|Apply(?:Rotational)?Impulse|Set(?:KeyframedMotion|ContentType|RegionPos|(?:Angular)?Velocity|Buoyancy|HoverHeight|ForceAndTorque|TimerEvent|ScriptState|Damage|TextureAnim|Sound(?:Queueing|Radius)|Vehicle(?:Type|(?:Float|Vector|Rotation)Param)|(?:Touch|Sit)?Text|Camera(?:Eye|At)Offset|PrimitiveParams|ClickAction|Link(?:Alpha|Color|PrimitiveParams(?:Fast)?|Texture(?:Anim)?|Camera|Media)|RemoteScriptAccessPin|PayPrice|LocalRot)|ScaleByFactor|Get(?:(?:Max|Min)ScaleFactor|ClosestNavPoint|StaticPath|SimStats|Env|PrimitiveParams|Link(?:PrimitiveParams|Number(?:OfSides)?|Key|Name|Media)|HTTPHeader|FreeURLs|Object(?:Details|PermMask|PrimCount)|Parcel(?:MaxPrims|Details|Prim(?:Count|Owners))|Attached(?:List)?|(?:SPMax|Free|Used)Memory|Region(?:Name|TimeDilation|FPS|Corner|AgentCount)|Root(?:Position|Rotation)|UnixTime|(?:Parcel|Region)Flags|(?:Wall|GMT)clock|SimulatorHostname|BoundingBox|GeometricCenter|Creator|NumberOf(?:Prims|NotecardLines|Sides)|Animation(?:List)?|(?:Camera|Local)(?:Pos|Rot)|Vel|Accel|Omega|Time(?:stamp|OfDay)|(?:Object|CenterOf)?Mass|MassMKS|Energy|Owner|(?:Owner)?Key|SunDirection|Texture(?:Offset|Scale|Rot)|Inventory(?:Number|Name|Key|Type|Creator|PermMask)|Permissions(?:Key)?|StartParameter|List(?:Length|EntryType)|Date|Agent(?:Size|Info|Language|List)|LandOwnerAt|NotecardLine|Script(?:Name|State))|(?:Get|Reset|GetAndReset)Time|PlaySound(?:Slave)?|LoopSound(?:Master|Slave)?|(?:Trigger|Stop|Preload)Sound|(?:(?:Get|Delete)Sub|Insert)String|To(?:Upper|Lower)|Give(?:InventoryList|Money)|RezObject|(?:Stop)?LookAt|Sleep|CollisionFilter|(?:Take|Release)Controls|DetachFromAvatar|AttachToAvatar(?:Temp)?|InstantMessage|(?:GetNext)?Email|StopHover|MinEventDelay|RotLookAt|String(?:Length|Trim)|(?:Start|Stop)Animation|TargetOmega|Request(?:Experience)?Permissions|(?:Create|Break)Link|BreakAllLinks|(?:Give|Remove)Inventory|Water|PassTouches|Request(?:Agent|Inventory)Data|TeleportAgent(?:Home|GlobalCoords)?|ModifyLand|CollisionSound|ResetScript|MessageLinked|PushObject|PassCollisions|AxisAngle2Rot|Rot2(?:Axis|Angle)|A(?:cos|sin)|AngleBetween|AllowInventoryDrop|SubStringIndex|List2(?:CSV|Integer|Json|Float|String|Key|Vector|Rot|List(?:Strided)?)|DeleteSubList|List(?:Statistics|Sort|Randomize|(?:Insert|Find|Replace)List)|EdgeOfWorld|AdjustSoundVolume|Key2Name|TriggerSoundLimited|EjectFromLand|(?:CSV|ParseString)2List|OverMyLand|SameGroup|UnSit|Ground(?:Slope|Normal|Contour)|GroundRepel|(?:Set|Remove)VehicleFlags|(?:AvatarOn)?(?:Link)?SitTarget|Script(?:Danger|Profiler)|Dialog|VolumeDetect|ResetOtherScript|RemoteLoadScriptPin|(?:Open|Close)RemoteDataChannel|SendRemoteData|RemoteDataReply|(?:Integer|String)ToBase64|XorBase64|Log(?:10)?|Base64To(?:String|Integer)|ParseStringKeepNulls|RezAtRoot|RequestSimulatorData|ForceMouselook|(?:Load|Release|(?:E|Une)scape)URL|ParcelMedia(?:CommandList|Query)|ModPow|MapDestination|(?:RemoveFrom|AddTo|Reset)Land(?:Pass|Ban)List|(?:Set|Clear)CameraParams|HTTP(?:Request|Response)|TextBox|DetectedTouch(?:UV|Face|Pos|(?:N|Bin)ormal|ST)|(?:MD5|SHA1|DumpList2)String|Request(?:Secure)?URL|Clear(?:Prim|Link)Media|(?:Link)?ParticleSystem|(?:Get|Request)(?:Username|DisplayName)|RegionSayTo|CastRay|GenerateKey|TransferLindenDollars|ManageEstateAccess|(?:Create|Delete)Character|ExecCharacterCmd|Evade|FleeFrom|NavigateTo|PatrolPoints|Pursue|UpdateCharacter|WanderWithin))\\b"};return{illegal:":",contains:[n,{className:"comment",variants:[e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/")]},i,{className:"section",variants:[{begin:"\\b(?:state|default)\\b"},{begin:"\\b(?:state_(?:entry|exit)|touch(?:_(?:start|end))?|(?:land_)?collision(?:_(?:start|end))?|timer|listen|(?:no_)?sensor|control|(?:not_)?at_(?:rot_)?target|money|email|experience_permissions(?:_denied)?|run_time_permissions|changed|attach|dataserver|moving_(?:start|end)|link_message|(?:on|object)_rez|remote_data|http_re(?:sponse|quest)|path_update|transaction_result)\\b"}]},a,r,{className:"type",begin:"\\b(?:integer|float|string|key|vector|quaternion|rotation|list)\\b"}]}}}),define("highlight/lib/languages/lua",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="\\[=*\\[",n="\\]=*\\]",i={begin:t,end:n,contains:["self"]},r=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[i],relevance:10})];return{lexemes:e.UNDERSCORE_IDENT_RE,keywords:{keyword:"and break do else elseif end false for if in local nil not or repeat return then true until while",built_in:"_G _VERSION assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall coroutine debug io math os package string table"},contains:r.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:r}].concat(r)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[i],relevance:5}])}}}),define("highlight/lib/languages/makefile",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"variable",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]};return{aliases:["mk","mak"],contains:[e.HASH_COMMENT_MODE,{begin:/^\w+\s*\W*=/,returnBegin:!0,relevance:0,starts:{end:/\s*\W*=/,excludeEnd:!0,starts:{end:/$/,relevance:0,contains:[t]}}},{className:"section",begin:/^[\w]+:\s*$/},{className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{"meta-keyword":".PHONY"},lexemes:/[\.\w]+/},{begin:/^\t+/,end:/$/,relevance:0,contains:[e.QUOTE_STRING_MODE,t]}]}}}),define("highlight/lib/languages/mathematica",["require","exports","module"],function(e,t,n){n.exports=function(e){return{aliases:["mma"],lexemes:"(\\$|\\b)"+e.IDENT_RE+"\\b",keywords:"AbelianGroup Abort AbortKernels AbortProtect Above Abs Absolute AbsoluteCorrelation AbsoluteCorrelationFunction AbsoluteCurrentValue AbsoluteDashing AbsoluteFileName AbsoluteOptions AbsolutePointSize AbsoluteThickness AbsoluteTime AbsoluteTiming AccountingForm Accumulate Accuracy AccuracyGoal ActionDelay ActionMenu ActionMenuBox ActionMenuBoxOptions Active ActiveItem ActiveStyle AcyclicGraphQ AddOnHelpPath AddTo AdjacencyGraph AdjacencyList AdjacencyMatrix AdjustmentBox AdjustmentBoxOptions AdjustTimeSeriesForecast AffineTransform After AiryAi AiryAiPrime AiryAiZero AiryBi AiryBiPrime AiryBiZero AlgebraicIntegerQ AlgebraicNumber AlgebraicNumberDenominator AlgebraicNumberNorm AlgebraicNumberPolynomial AlgebraicNumberTrace AlgebraicRules AlgebraicRulesData Algebraics AlgebraicUnitQ Alignment AlignmentMarker AlignmentPoint All AllowedDimensions AllowGroupClose AllowInlineCells AllowKernelInitialization AllowReverseGroupClose AllowScriptLevelChange AlphaChannel AlternatingGroup AlternativeHypothesis Alternatives AmbientLight Analytic AnchoredSearch And AndersonDarlingTest AngerJ AngleBracket AngularGauge Animate AnimationCycleOffset AnimationCycleRepetitions AnimationDirection AnimationDisplayTime AnimationRate AnimationRepetitions AnimationRunning Animator AnimatorBox AnimatorBoxOptions AnimatorElements Annotation Annuity AnnuityDue Antialiasing Antisymmetric Apart ApartSquareFree Appearance AppearanceElements AppellF1 Append AppendTo Apply ArcCos ArcCosh ArcCot ArcCoth ArcCsc ArcCsch ArcSec ArcSech ArcSin ArcSinDistribution ArcSinh ArcTan ArcTanh Arg ArgMax ArgMin ArgumentCountQ ARIMAProcess ArithmeticGeometricMean ARMAProcess ARProcess Array ArrayComponents ArrayDepth ArrayFlatten ArrayPad ArrayPlot ArrayQ ArrayReshape ArrayRules Arrays Arrow Arrow3DBox ArrowBox Arrowheads AspectRatio AspectRatioFixed Assert Assuming Assumptions AstronomicalData Asynchronous AsynchronousTaskObject AsynchronousTasks AtomQ Attributes AugmentedSymmetricPolynomial AutoAction AutoDelete AutoEvaluateEvents AutoGeneratedPackage AutoIndent AutoIndentSpacings AutoItalicWords AutoloadPath AutoMatch Automatic AutomaticImageSize AutoMultiplicationSymbol AutoNumberFormatting AutoOpenNotebooks AutoOpenPalettes AutorunSequencing AutoScaling AutoScroll AutoSpacing AutoStyleOptions AutoStyleWords Axes AxesEdge AxesLabel AxesOrigin AxesStyle Axis BabyMonsterGroupB Back Background BackgroundTasksSettings Backslash Backsubstitution Backward Band BandpassFilter BandstopFilter BarabasiAlbertGraphDistribution BarChart BarChart3D BarLegend BarlowProschanImportance BarnesG BarOrigin BarSpacing BartlettHannWindow BartlettWindow BaseForm Baseline BaselinePosition BaseStyle BatesDistribution BattleLemarieWavelet Because BeckmannDistribution Beep Before Begin BeginDialogPacket BeginFrontEndInteractionPacket BeginPackage BellB BellY Below BenfordDistribution BeniniDistribution BenktanderGibratDistribution BenktanderWeibullDistribution BernoulliB BernoulliDistribution BernoulliGraphDistribution BernoulliProcess BernsteinBasis BesselFilterModel BesselI BesselJ BesselJZero BesselK BesselY BesselYZero Beta BetaBinomialDistribution BetaDistribution BetaNegativeBinomialDistribution BetaPrimeDistribution BetaRegularized BetweennessCentrality BezierCurve BezierCurve3DBox BezierCurve3DBoxOptions BezierCurveBox BezierCurveBoxOptions BezierFunction BilateralFilter Binarize BinaryFormat BinaryImageQ BinaryRead BinaryReadList BinaryWrite BinCounts BinLists Binomial BinomialDistribution BinomialProcess BinormalDistribution BiorthogonalSplineWavelet BipartiteGraphQ BirnbaumImportance BirnbaumSaundersDistribution BitAnd BitClear BitGet BitLength BitNot BitOr BitSet BitShiftLeft BitShiftRight BitXor Black BlackmanHarrisWindow BlackmanNuttallWindow BlackmanWindow Blank BlankForm BlankNullSequence BlankSequence Blend Block BlockRandom BlomqvistBeta BlomqvistBetaTest Blue Blur BodePlot BohmanWindow Bold Bookmarks Boole BooleanConsecutiveFunction BooleanConvert BooleanCountingFunction BooleanFunction BooleanGraph BooleanMaxterms BooleanMinimize BooleanMinterms Booleans BooleanTable BooleanVariables BorderDimensions BorelTannerDistribution Bottom BottomHatTransform BoundaryStyle Bounds Box BoxBaselineShift BoxData BoxDimensions Boxed Boxes BoxForm BoxFormFormatTypes BoxFrame BoxID BoxMargins BoxMatrix BoxRatios BoxRotation BoxRotationPoint BoxStyle BoxWhiskerChart Bra BracketingBar BraKet BrayCurtisDistance BreadthFirstScan Break Brown BrownForsytheTest BrownianBridgeProcess BrowserCategory BSplineBasis BSplineCurve BSplineCurve3DBox BSplineCurveBox BSplineCurveBoxOptions BSplineFunction BSplineSurface BSplineSurface3DBox BubbleChart BubbleChart3D BubbleScale BubbleSizes BulletGauge BusinessDayQ ButterflyGraph ButterworthFilterModel Button ButtonBar ButtonBox ButtonBoxOptions ButtonCell ButtonContents ButtonData ButtonEvaluator ButtonExpandable ButtonFrame ButtonFunction ButtonMargins ButtonMinHeight ButtonNote ButtonNotebook ButtonSource ButtonStyle ButtonStyleMenuListing Byte ByteCount ByteOrdering C CachedValue CacheGraphics CalendarData CalendarType CallPacket CanberraDistance Cancel CancelButton CandlestickChart Cap CapForm CapitalDifferentialD CardinalBSplineBasis CarmichaelLambda Cases Cashflow Casoratian Catalan CatalanNumber Catch CauchyDistribution CauchyWindow CayleyGraph CDF CDFDeploy CDFInformation CDFWavelet Ceiling Cell CellAutoOverwrite CellBaseline CellBoundingBox CellBracketOptions CellChangeTimes CellContents CellContext CellDingbat CellDynamicExpression CellEditDuplicate CellElementsBoundingBox CellElementSpacings CellEpilog CellEvaluationDuplicate CellEvaluationFunction CellEventActions CellFrame CellFrameColor CellFrameLabelMargins CellFrameLabels CellFrameMargins CellGroup CellGroupData CellGrouping CellGroupingRules CellHorizontalScrolling CellID CellLabel CellLabelAutoDelete CellLabelMargins CellLabelPositioning CellMargins CellObject CellOpen CellPrint CellProlog Cells CellSize CellStyle CellTags CellularAutomaton CensoredDistribution Censoring Center CenterDot CentralMoment CentralMomentGeneratingFunction CForm ChampernowneNumber ChanVeseBinarize Character CharacterEncoding CharacterEncodingsPath CharacteristicFunction CharacteristicPolynomial CharacterRange Characters ChartBaseStyle ChartElementData ChartElementDataFunction ChartElementFunction ChartElements ChartLabels ChartLayout ChartLegends ChartStyle Chebyshev1FilterModel Chebyshev2FilterModel ChebyshevDistance ChebyshevT ChebyshevU Check CheckAbort CheckAll Checkbox CheckboxBar CheckboxBox CheckboxBoxOptions ChemicalData ChessboardDistance ChiDistribution ChineseRemainder ChiSquareDistribution ChoiceButtons ChoiceDialog CholeskyDecomposition Chop Circle CircleBox CircleDot CircleMinus CirclePlus CircleTimes CirculantGraph CityData Clear ClearAll ClearAttributes ClearSystemCache ClebschGordan ClickPane Clip ClipboardNotebook ClipFill ClippingStyle ClipPlanes ClipRange Clock ClockGauge ClockwiseContourIntegral Close Closed CloseKernels ClosenessCentrality Closing ClosingAutoSave ClosingEvent ClusteringComponents CMYKColor Coarse Coefficient CoefficientArrays CoefficientDomain CoefficientList CoefficientRules CoifletWavelet Collect Colon ColonForm ColorCombine ColorConvert ColorData ColorDataFunction ColorFunction ColorFunctionScaling Colorize ColorNegate ColorOutput ColorProfileData ColorQuantize ColorReplace ColorRules ColorSelectorSettings ColorSeparate ColorSetter ColorSetterBox ColorSetterBoxOptions ColorSlider ColorSpace Column ColumnAlignments ColumnBackgrounds ColumnForm ColumnLines ColumnsEqual ColumnSpacings ColumnWidths CommonDefaultFormatTypes Commonest CommonestFilter CommonUnits CommunityBoundaryStyle CommunityGraphPlot CommunityLabels CommunityRegionStyle CompatibleUnitQ CompilationOptions CompilationTarget Compile Compiled CompiledFunction Complement CompleteGraph CompleteGraphQ CompleteKaryTree CompletionsListPacket Complex Complexes ComplexExpand ComplexInfinity ComplexityFunction ComponentMeasurements ComponentwiseContextMenu Compose ComposeList ComposeSeries Composition CompoundExpression CompoundPoissonDistribution CompoundPoissonProcess CompoundRenewalProcess Compress CompressedData Condition ConditionalExpression Conditioned Cone ConeBox ConfidenceLevel ConfidenceRange ConfidenceTransform ConfigurationPath Congruent Conjugate ConjugateTranspose Conjunction Connect ConnectedComponents ConnectedGraphQ ConnesWindow ConoverTest ConsoleMessage ConsoleMessagePacket ConsolePrint Constant ConstantArray Constants ConstrainedMax ConstrainedMin ContentPadding ContentsBoundingBox ContentSelectable ContentSize Context ContextMenu Contexts ContextToFilename ContextToFileName Continuation Continue ContinuedFraction ContinuedFractionK ContinuousAction ContinuousMarkovProcess ContinuousTimeModelQ ContinuousWaveletData ContinuousWaveletTransform ContourDetect ContourGraphics ContourIntegral ContourLabels ContourLines ContourPlot ContourPlot3D Contours ContourShading ContourSmoothing ContourStyle ContraharmonicMean Control ControlActive ControlAlignment ControllabilityGramian ControllabilityMatrix ControllableDecomposition ControllableModelQ ControllerDuration ControllerInformation ControllerInformationData ControllerLinking ControllerManipulate ControllerMethod ControllerPath ControllerState ControlPlacement ControlsRendering ControlType Convergents ConversionOptions ConversionRules ConvertToBitmapPacket ConvertToPostScript ConvertToPostScriptPacket Convolve ConwayGroupCo1 ConwayGroupCo2 ConwayGroupCo3 CoordinateChartData CoordinatesToolOptions CoordinateTransform CoordinateTransformData CoprimeQ Coproduct CopulaDistribution Copyable CopyDirectory CopyFile CopyTag CopyToClipboard CornerFilter CornerNeighbors Correlation CorrelationDistance CorrelationFunction CorrelationTest Cos Cosh CoshIntegral CosineDistance CosineWindow CosIntegral Cot Coth Count CounterAssignments CounterBox CounterBoxOptions CounterClockwiseContourIntegral CounterEvaluator CounterFunction CounterIncrements CounterStyle CounterStyleMenuListing CountRoots CountryData Covariance CovarianceEstimatorFunction CovarianceFunction CoxianDistribution CoxIngersollRossProcess CoxModel CoxModelFit CramerVonMisesTest CreateArchive CreateDialog CreateDirectory CreateDocument CreateIntermediateDirectories CreatePalette CreatePalettePacket CreateScheduledTask CreateTemporary CreateWindow CriticalityFailureImportance CriticalitySuccessImportance CriticalSection Cross CrossingDetect CrossMatrix Csc Csch CubeRoot Cubics Cuboid CuboidBox Cumulant CumulantGeneratingFunction Cup CupCap Curl CurlyDoubleQuote CurlyQuote CurrentImage CurrentlySpeakingPacket CurrentValue CurvatureFlowFilter CurveClosed Cyan CycleGraph CycleIndexPolynomial Cycles CyclicGroup Cyclotomic Cylinder CylinderBox CylindricalDecomposition D DagumDistribution DamerauLevenshteinDistance DampingFactor Darker Dashed Dashing DataCompression DataDistribution DataRange DataReversed Date DateDelimiters DateDifference DateFunction DateList DateListLogPlot DateListPlot DatePattern DatePlus DateRange DateString DateTicksFormat DaubechiesWavelet DavisDistribution DawsonF DayCount DayCountConvention DayMatchQ DayName DayPlus DayRange DayRound DeBruijnGraph Debug DebugTag Decimal DeclareKnownSymbols DeclarePackage Decompose Decrement DedekindEta Default DefaultAxesStyle DefaultBaseStyle DefaultBoxStyle DefaultButton DefaultColor DefaultControlPlacement DefaultDuplicateCellStyle DefaultDuration DefaultElement DefaultFaceGridsStyle DefaultFieldHintStyle DefaultFont DefaultFontProperties DefaultFormatType DefaultFormatTypeForStyle DefaultFrameStyle DefaultFrameTicksStyle DefaultGridLinesStyle DefaultInlineFormatType DefaultInputFormatType DefaultLabelStyle DefaultMenuStyle DefaultNaturalLanguage DefaultNewCellStyle DefaultNewInlineCellStyle DefaultNotebook DefaultOptions DefaultOutputFormatType DefaultStyle DefaultStyleDefinitions DefaultTextFormatType DefaultTextInlineFormatType DefaultTicksStyle DefaultTooltipStyle DefaultValues Defer DefineExternal DefineInputStreamMethod DefineOutputStreamMethod Definition Degree DegreeCentrality DegreeGraphDistribution DegreeLexicographic DegreeReverseLexicographic Deinitialization Del Deletable Delete DeleteBorderComponents DeleteCases DeleteContents DeleteDirectory DeleteDuplicates DeleteFile DeleteSmallComponents DeleteWithContents DeletionWarning Delimiter DelimiterFlashTime DelimiterMatching Delimiters Denominator DensityGraphics DensityHistogram DensityPlot DependentVariables Deploy Deployed Depth DepthFirstScan Derivative DerivativeFilter DescriptorStateSpace DesignMatrix Det DGaussianWavelet DiacriticalPositioning Diagonal DiagonalMatrix Dialog DialogIndent DialogInput DialogLevel DialogNotebook DialogProlog DialogReturn DialogSymbols Diamond DiamondMatrix DiceDissimilarity DictionaryLookup DifferenceDelta DifferenceOrder DifferenceRoot DifferenceRootReduce Differences DifferentialD DifferentialRoot DifferentialRootReduce DifferentiatorFilter DigitBlock DigitBlockMinimum DigitCharacter DigitCount DigitQ DihedralGroup Dilation Dimensions DiracComb DiracDelta DirectedEdge DirectedEdges DirectedGraph DirectedGraphQ DirectedInfinity Direction Directive Directory DirectoryName DirectoryQ DirectoryStack DirichletCharacter DirichletConvolve DirichletDistribution DirichletL DirichletTransform DirichletWindow DisableConsolePrintPacket DiscreteChirpZTransform DiscreteConvolve DiscreteDelta DiscreteHadamardTransform DiscreteIndicator DiscreteLQEstimatorGains DiscreteLQRegulatorGains DiscreteLyapunovSolve DiscreteMarkovProcess DiscretePlot DiscretePlot3D DiscreteRatio DiscreteRiccatiSolve DiscreteShift DiscreteTimeModelQ DiscreteUniformDistribution DiscreteVariables DiscreteWaveletData DiscreteWaveletPacketTransform DiscreteWaveletTransform Discriminant Disjunction Disk DiskBox DiskMatrix Dispatch DispersionEstimatorFunction Display DisplayAllSteps DisplayEndPacket DisplayFlushImagePacket DisplayForm DisplayFunction DisplayPacket DisplayRules DisplaySetSizePacket DisplayString DisplayTemporary DisplayWith DisplayWithRef DisplayWithVariable DistanceFunction DistanceTransform Distribute Distributed DistributedContexts DistributeDefinitions DistributionChart DistributionDomain DistributionFitTest DistributionParameterAssumptions DistributionParameterQ Dithering Div Divergence Divide DivideBy Dividers Divisible Divisors DivisorSigma DivisorSum DMSList DMSString Do DockedCells DocumentNotebook DominantColors DOSTextFormat Dot DotDashed DotEqual Dotted DoubleBracketingBar DoubleContourIntegral DoubleDownArrow DoubleLeftArrow DoubleLeftRightArrow DoubleLeftTee DoubleLongLeftArrow DoubleLongLeftRightArrow DoubleLongRightArrow DoubleRightArrow DoubleRightTee DoubleUpArrow DoubleUpDownArrow DoubleVerticalBar DoublyInfinite Down DownArrow DownArrowBar DownArrowUpArrow DownLeftRightVector DownLeftTeeVector DownLeftVector DownLeftVectorBar DownRightTeeVector DownRightVector DownRightVectorBar Downsample DownTee DownTeeArrow DownValues DragAndDrop DrawEdges DrawFrontFaces DrawHighlighted Drop DSolve Dt DualLinearProgramming DualSystemsModel DumpGet DumpSave DuplicateFreeQ Dynamic DynamicBox DynamicBoxOptions DynamicEvaluationTimeout DynamicLocation DynamicModule DynamicModuleBox DynamicModuleBoxOptions DynamicModuleParent DynamicModuleValues DynamicName DynamicNamespace DynamicReference DynamicSetting DynamicUpdating DynamicWrapper DynamicWrapperBox DynamicWrapperBoxOptions E EccentricityCentrality EdgeAdd EdgeBetweennessCentrality EdgeCapacity EdgeCapForm EdgeColor EdgeConnectivity EdgeCost EdgeCount EdgeCoverQ EdgeDashing EdgeDelete EdgeDetect EdgeForm EdgeIndex EdgeJoinForm EdgeLabeling EdgeLabels EdgeLabelStyle EdgeList EdgeOpacity EdgeQ EdgeRenderingFunction EdgeRules EdgeShapeFunction EdgeStyle EdgeThickness EdgeWeight Editable EditButtonSettings EditCellTagsSettings EditDistance EffectiveInterest Eigensystem Eigenvalues EigenvectorCentrality Eigenvectors Element ElementData Eliminate EliminationOrder EllipticE EllipticExp EllipticExpPrime EllipticF EllipticFilterModel EllipticK EllipticLog EllipticNomeQ EllipticPi EllipticReducedHalfPeriods EllipticTheta EllipticThetaPrime EmitSound EmphasizeSyntaxErrors EmpiricalDistribution Empty EmptyGraphQ EnableConsolePrintPacket Enabled Encode End EndAdd EndDialogPacket EndFrontEndInteractionPacket EndOfFile EndOfLine EndOfString EndPackage EngineeringForm Enter EnterExpressionPacket EnterTextPacket Entropy EntropyFilter Environment Epilog Equal EqualColumns EqualRows EqualTilde EquatedTo Equilibrium EquirippleFilterKernel Equivalent Erf Erfc Erfi ErlangB ErlangC ErlangDistribution Erosion ErrorBox ErrorBoxOptions ErrorNorm ErrorPacket ErrorsDialogSettings EstimatedDistribution EstimatedProcess EstimatorGains EstimatorRegulator EuclideanDistance EulerE EulerGamma EulerianGraphQ EulerPhi Evaluatable Evaluate Evaluated EvaluatePacket EvaluationCell EvaluationCompletionAction EvaluationElements EvaluationMode EvaluationMonitor EvaluationNotebook EvaluationObject EvaluationOrder Evaluator EvaluatorNames EvenQ EventData EventEvaluator EventHandler EventHandlerTag EventLabels ExactBlackmanWindow ExactNumberQ ExactRootIsolation ExampleData Except ExcludedForms ExcludePods Exclusions ExclusionsStyle Exists Exit ExitDialog Exp Expand ExpandAll ExpandDenominator ExpandFileName ExpandNumerator Expectation ExpectationE ExpectedValue ExpGammaDistribution ExpIntegralE ExpIntegralEi Exponent ExponentFunction ExponentialDistribution ExponentialFamily ExponentialGeneratingFunction ExponentialMovingAverage ExponentialPowerDistribution ExponentPosition ExponentStep Export ExportAutoReplacements ExportPacket ExportString Expression ExpressionCell ExpressionPacket ExpToTrig ExtendedGCD Extension ExtentElementFunction ExtentMarkers ExtentSize ExternalCall ExternalDataCharacterEncoding Extract ExtractArchive ExtremeValueDistribution FaceForm FaceGrids FaceGridsStyle Factor FactorComplete Factorial Factorial2 FactorialMoment FactorialMomentGeneratingFunction FactorialPower FactorInteger FactorList FactorSquareFree FactorSquareFreeList FactorTerms FactorTermsList Fail FailureDistribution False FARIMAProcess FEDisableConsolePrintPacket FeedbackSector FeedbackSectorStyle FeedbackType FEEnableConsolePrintPacket Fibonacci FieldHint FieldHintStyle FieldMasked FieldSize File FileBaseName FileByteCount FileDate FileExistsQ FileExtension FileFormat FileHash FileInformation FileName FileNameDepth FileNameDialogSettings FileNameDrop FileNameJoin FileNames FileNameSetter FileNameSplit FileNameTake FilePrint FileType FilledCurve FilledCurveBox Filling FillingStyle FillingTransform FilterRules FinancialBond FinancialData FinancialDerivative FinancialIndicator Find FindArgMax FindArgMin FindClique FindClusters FindCurvePath FindDistributionParameters FindDivisions FindEdgeCover FindEdgeCut FindEulerianCycle FindFaces FindFile FindFit FindGeneratingFunction FindGeoLocation FindGeometricTransform FindGraphCommunities FindGraphIsomorphism FindGraphPartition FindHamiltonianCycle FindIndependentEdgeSet FindIndependentVertexSet FindInstance FindIntegerNullVector FindKClan FindKClique FindKClub FindKPlex FindLibrary FindLinearRecurrence FindList FindMaximum FindMaximumFlow FindMaxValue FindMinimum FindMinimumCostFlow FindMinimumCut FindMinValue FindPermutation FindPostmanTour FindProcessParameters FindRoot FindSequenceFunction FindSettings FindShortestPath FindShortestTour FindThreshold FindVertexCover FindVertexCut Fine FinishDynamic FiniteAbelianGroupCount FiniteGroupCount FiniteGroupData First FirstPassageTimeDistribution FischerGroupFi22 FischerGroupFi23 FischerGroupFi24Prime FisherHypergeometricDistribution FisherRatioTest FisherZDistribution Fit FitAll FittedModel FixedPoint FixedPointList FlashSelection Flat Flatten FlattenAt FlatTopWindow FlipView Floor FlushPrintOutputPacket Fold FoldList Font FontColor FontFamily FontForm FontName FontOpacity FontPostScriptName FontProperties FontReencoding FontSize FontSlant FontSubstitutions FontTracking FontVariations FontWeight For ForAll Format FormatRules FormatType FormatTypeAutoConvert FormatValues FormBox FormBoxOptions FortranForm Forward ForwardBackward Fourier FourierCoefficient FourierCosCoefficient FourierCosSeries FourierCosTransform FourierDCT FourierDCTFilter FourierDCTMatrix FourierDST FourierDSTMatrix FourierMatrix FourierParameters FourierSequenceTransform FourierSeries FourierSinCoefficient FourierSinSeries FourierSinTransform FourierTransform FourierTrigSeries FractionalBrownianMotionProcess FractionalPart FractionBox FractionBoxOptions FractionLine Frame FrameBox FrameBoxOptions Framed FrameInset FrameLabel Frameless FrameMargins FrameStyle FrameTicks FrameTicksStyle FRatioDistribution FrechetDistribution FreeQ FrequencySamplingFilterKernel FresnelC FresnelS Friday FrobeniusNumber FrobeniusSolve FromCharacterCode FromCoefficientRules FromContinuedFraction FromDate FromDigits FromDMS Front FrontEndDynamicExpression FrontEndEventActions FrontEndExecute FrontEndObject FrontEndResource FrontEndResourceString FrontEndStackSize FrontEndToken FrontEndTokenExecute FrontEndValueCache FrontEndVersion FrontFaceColor FrontFaceOpacity Full FullAxes FullDefinition FullForm FullGraphics FullOptions FullSimplify Function FunctionExpand FunctionInterpolation FunctionSpace FussellVeselyImportance GaborFilter GaborMatrix GaborWavelet GainMargins GainPhaseMargins Gamma GammaDistribution GammaRegularized GapPenalty Gather GatherBy GaugeFaceElementFunction GaugeFaceStyle GaugeFrameElementFunction GaugeFrameSize GaugeFrameStyle GaugeLabels GaugeMarkers GaugeStyle GaussianFilter GaussianIntegers GaussianMatrix GaussianWindow GCD GegenbauerC General GeneralizedLinearModelFit GenerateConditions GeneratedCell GeneratedParameters GeneratingFunction Generic GenericCylindricalDecomposition GenomeData GenomeLookup GeodesicClosing GeodesicDilation GeodesicErosion GeodesicOpening GeoDestination GeodesyData GeoDirection GeoDistance GeoGridPosition GeometricBrownianMotionProcess GeometricDistribution GeometricMean GeometricMeanFilter GeometricTransformation GeometricTransformation3DBox GeometricTransformation3DBoxOptions GeometricTransformationBox GeometricTransformationBoxOptions GeoPosition GeoPositionENU GeoPositionXYZ GeoProjectionData GestureHandler GestureHandlerTag Get GetBoundingBoxSizePacket GetContext GetEnvironment GetFileName GetFrontEndOptionsDataPacket GetLinebreakInformationPacket GetMenusPacket GetPageBreakInformationPacket Glaisher GlobalClusteringCoefficient GlobalPreferences GlobalSession Glow GoldenRatio GompertzMakehamDistribution GoodmanKruskalGamma GoodmanKruskalGammaTest Goto Grad Gradient GradientFilter GradientOrientationFilter Graph GraphAssortativity GraphCenter GraphComplement GraphData GraphDensity GraphDiameter GraphDifference GraphDisjointUnion GraphDistance GraphDistanceMatrix GraphElementData GraphEmbedding GraphHighlight GraphHighlightStyle GraphHub Graphics Graphics3D Graphics3DBox Graphics3DBoxOptions GraphicsArray GraphicsBaseline GraphicsBox GraphicsBoxOptions GraphicsColor GraphicsColumn GraphicsComplex GraphicsComplex3DBox GraphicsComplex3DBoxOptions GraphicsComplexBox GraphicsComplexBoxOptions GraphicsContents GraphicsData GraphicsGrid GraphicsGridBox GraphicsGroup GraphicsGroup3DBox GraphicsGroup3DBoxOptions GraphicsGroupBox GraphicsGroupBoxOptions GraphicsGrouping GraphicsHighlightColor GraphicsRow GraphicsSpacing GraphicsStyle GraphIntersection GraphLayout GraphLinkEfficiency GraphPeriphery GraphPlot GraphPlot3D GraphPower GraphPropertyDistribution GraphQ GraphRadius GraphReciprocity GraphRoot GraphStyle GraphUnion Gray GrayLevel GreatCircleDistance Greater GreaterEqual GreaterEqualLess GreaterFullEqual GreaterGreater GreaterLess GreaterSlantEqual GreaterTilde Green Grid GridBaseline GridBox GridBoxAlignment GridBoxBackground GridBoxDividers GridBoxFrame GridBoxItemSize GridBoxItemStyle GridBoxOptions GridBoxSpacings GridCreationSettings GridDefaultElement GridElementStyleOptions GridFrame GridFrameMargins GridGraph GridLines GridLinesStyle GroebnerBasis GroupActionBase GroupCentralizer GroupElementFromWord GroupElementPosition GroupElementQ GroupElements GroupElementToWord GroupGenerators GroupMultiplicationTable GroupOrbits GroupOrder GroupPageBreakWithin GroupSetwiseStabilizer GroupStabilizer GroupStabilizerChain Gudermannian GumbelDistribution HaarWavelet HadamardMatrix HalfNormalDistribution HamiltonianGraphQ HammingDistance HammingWindow HankelH1 HankelH2 HankelMatrix HannPoissonWindow HannWindow HaradaNortonGroupHN HararyGraph HarmonicMean HarmonicMeanFilter HarmonicNumber Hash HashTable Haversine HazardFunction Head HeadCompose Heads HeavisideLambda HeavisidePi HeavisideTheta HeldGroupHe HeldPart HelpBrowserLookup HelpBrowserNotebook HelpBrowserSettings HermiteDecomposition HermiteH HermitianMatrixQ HessenbergDecomposition Hessian HexadecimalCharacter Hexahedron HexahedronBox HexahedronBoxOptions HiddenSurface HighlightGraph HighlightImage HighpassFilter HigmanSimsGroupHS HilbertFilter HilbertMatrix Histogram Histogram3D HistogramDistribution HistogramList HistogramTransform HistogramTransformInterpolation HitMissTransform HITSCentrality HodgeDual HoeffdingD HoeffdingDTest Hold HoldAll HoldAllComplete HoldComplete HoldFirst HoldForm HoldPattern HoldRest HolidayCalendar HomeDirectory HomePage Horizontal HorizontalForm HorizontalGauge HorizontalScrollPosition HornerForm HotellingTSquareDistribution HoytDistribution HTMLSave Hue HumpDownHump HumpEqual HurwitzLerchPhi HurwitzZeta HyperbolicDistribution HypercubeGraph HyperexponentialDistribution Hyperfactorial Hypergeometric0F1 Hypergeometric0F1Regularized Hypergeometric1F1 Hypergeometric1F1Regularized Hypergeometric2F1 Hypergeometric2F1Regularized HypergeometricDistribution HypergeometricPFQ HypergeometricPFQRegularized HypergeometricU Hyperlink HyperlinkCreationSettings Hyphenation HyphenationOptions HypoexponentialDistribution HypothesisTestData I Identity IdentityMatrix If IgnoreCase Im Image Image3D Image3DSlices ImageAccumulate ImageAdd ImageAdjust ImageAlign ImageApply ImageAspectRatio ImageAssemble ImageCache ImageCacheValid ImageCapture ImageChannels ImageClip ImageColorSpace ImageCompose ImageConvolve ImageCooccurrence ImageCorners ImageCorrelate ImageCorrespondingPoints ImageCrop ImageData ImageDataPacket ImageDeconvolve ImageDemosaic ImageDifference ImageDimensions ImageDistance ImageEffect ImageFeatureTrack ImageFileApply ImageFileFilter ImageFileScan ImageFilter ImageForestingComponents ImageForwardTransformation ImageHistogram ImageKeypoints ImageLevels ImageLines ImageMargins ImageMarkers ImageMeasurements ImageMultiply ImageOffset ImagePad ImagePadding ImagePartition ImagePeriodogram ImagePerspectiveTransformation ImageQ ImageRangeCache ImageReflect ImageRegion ImageResize ImageResolution ImageRotate ImageRotated ImageScaled ImageScan ImageSize ImageSizeAction ImageSizeCache ImageSizeMultipliers ImageSizeRaw ImageSubtract ImageTake ImageTransformation ImageTrim ImageType ImageValue ImageValuePositions Implies Import ImportAutoReplacements ImportString ImprovementImportance In IncidenceGraph IncidenceList IncidenceMatrix IncludeConstantBasis IncludeFileExtension IncludePods IncludeSingularTerm Increment Indent IndentingNewlineSpacings IndentMaxFraction IndependenceTest IndependentEdgeSetQ IndependentUnit IndependentVertexSetQ Indeterminate IndexCreationOptions Indexed IndexGraph IndexTag Inequality InexactNumberQ InexactNumbers Infinity Infix Information Inherited InheritScope Initialization InitializationCell InitializationCellEvaluation InitializationCellWarning InlineCounterAssignments InlineCounterIncrements InlineRules Inner Inpaint Input InputAliases InputAssumptions InputAutoReplacements InputField InputFieldBox InputFieldBoxOptions InputForm InputGrouping InputNamePacket InputNotebook InputPacket InputSettings InputStream InputString InputStringPacket InputToBoxFormPacket Insert InsertionPointObject InsertResults Inset Inset3DBox Inset3DBoxOptions InsetBox InsetBoxOptions Install InstallService InString Integer IntegerDigits IntegerExponent IntegerLength IntegerPart IntegerPartitions IntegerQ Integers IntegerString Integral Integrate Interactive InteractiveTradingChart Interlaced Interleaving InternallyBalancedDecomposition InterpolatingFunction InterpolatingPolynomial Interpolation InterpolationOrder InterpolationPoints InterpolationPrecision Interpretation InterpretationBox InterpretationBoxOptions InterpretationFunction InterpretTemplate InterquartileRange Interrupt InterruptSettings Intersection Interval IntervalIntersection IntervalMemberQ IntervalUnion Inverse InverseBetaRegularized InverseCDF InverseChiSquareDistribution InverseContinuousWaveletTransform InverseDistanceTransform InverseEllipticNomeQ InverseErf InverseErfc InverseFourier InverseFourierCosTransform InverseFourierSequenceTransform InverseFourierSinTransform InverseFourierTransform InverseFunction InverseFunctions InverseGammaDistribution InverseGammaRegularized InverseGaussianDistribution InverseGudermannian InverseHaversine InverseJacobiCD InverseJacobiCN InverseJacobiCS InverseJacobiDC InverseJacobiDN InverseJacobiDS InverseJacobiNC InverseJacobiND InverseJacobiNS InverseJacobiSC InverseJacobiSD InverseJacobiSN InverseLaplaceTransform InversePermutation InverseRadon InverseSeries InverseSurvivalFunction InverseWaveletTransform InverseWeierstrassP InverseZTransform Invisible InvisibleApplication InvisibleTimes IrreduciblePolynomialQ IsolatingInterval IsomorphicGraphQ IsotopeData Italic Item ItemBox ItemBoxOptions ItemSize ItemStyle ItoProcess JaccardDissimilarity JacobiAmplitude Jacobian JacobiCD JacobiCN JacobiCS JacobiDC JacobiDN JacobiDS JacobiNC JacobiND JacobiNS JacobiP JacobiSC JacobiSD JacobiSN JacobiSymbol JacobiZeta JankoGroupJ1 JankoGroupJ2 JankoGroupJ3 JankoGroupJ4 JarqueBeraALMTest JohnsonDistribution Join Joined JoinedCurve JoinedCurveBox JoinForm JordanDecomposition JordanModelDecomposition K KagiChart KaiserBesselWindow KaiserWindow KalmanEstimator KalmanFilter KarhunenLoeveDecomposition KaryTree KatzCentrality KCoreComponents KDistribution KelvinBei KelvinBer KelvinKei KelvinKer KendallTau KendallTauTest KernelExecute KernelMixtureDistribution KernelObject Kernels Ket Khinchin KirchhoffGraph KirchhoffMatrix KleinInvariantJ KnightTourGraph KnotData KnownUnitQ KolmogorovSmirnovTest KroneckerDelta KroneckerModelDecomposition KroneckerProduct KroneckerSymbol KuiperTest KumaraswamyDistribution Kurtosis KuwaharaFilter Label Labeled LabeledSlider LabelingFunction LabelStyle LaguerreL LambdaComponents LambertW LanczosWindow LandauDistribution Language LanguageCategory LaplaceDistribution LaplaceTransform Laplacian LaplacianFilter LaplacianGaussianFilter Large Larger Last Latitude LatitudeLongitude LatticeData LatticeReduce Launch LaunchKernels LayeredGraphPlot LayerSizeFunction LayoutInformation LCM LeafCount LeapYearQ LeastSquares LeastSquaresFilterKernel Left LeftArrow LeftArrowBar LeftArrowRightArrow LeftDownTeeVector LeftDownVector LeftDownVectorBar LeftRightArrow LeftRightVector LeftTee LeftTeeArrow LeftTeeVector LeftTriangle LeftTriangleBar LeftTriangleEqual LeftUpDownVector LeftUpTeeVector LeftUpVector LeftUpVectorBar LeftVector LeftVectorBar LegendAppearance Legended LegendFunction LegendLabel LegendLayout LegendMargins LegendMarkers LegendMarkerSize LegendreP LegendreQ LegendreType Length LengthWhile LerchPhi Less LessEqual LessEqualGreater LessFullEqual LessGreater LessLess LessSlantEqual LessTilde LetterCharacter LetterQ Level LeveneTest LeviCivitaTensor LevyDistribution Lexicographic LibraryFunction LibraryFunctionError LibraryFunctionInformation LibraryFunctionLoad LibraryFunctionUnload LibraryLoad LibraryUnload LicenseID LiftingFilterData LiftingWaveletTransform LightBlue LightBrown LightCyan Lighter LightGray LightGreen Lighting LightingAngle LightMagenta LightOrange LightPink LightPurple LightRed LightSources LightYellow Likelihood Limit LimitsPositioning LimitsPositioningTokens LindleyDistribution Line Line3DBox LinearFilter LinearFractionalTransform LinearModelFit LinearOffsetFunction LinearProgramming LinearRecurrence LinearSolve LinearSolveFunction LineBox LineBreak LinebreakAdjustments LineBreakChart LineBreakWithin LineColor LineForm LineGraph LineIndent LineIndentMaxFraction LineIntegralConvolutionPlot LineIntegralConvolutionScale LineLegend LineOpacity LineSpacing LineWrapParts LinkActivate LinkClose LinkConnect LinkConnectedQ LinkCreate LinkError LinkFlush LinkFunction LinkHost LinkInterrupt LinkLaunch LinkMode LinkObject LinkOpen LinkOptions LinkPatterns LinkProtocol LinkRead LinkReadHeld LinkReadyQ Links LinkWrite LinkWriteHeld LiouvilleLambda List Listable ListAnimate ListContourPlot ListContourPlot3D ListConvolve ListCorrelate ListCurvePathPlot ListDeconvolve ListDensityPlot Listen ListFourierSequenceTransform ListInterpolation ListLineIntegralConvolutionPlot ListLinePlot ListLogLinearPlot ListLogLogPlot ListLogPlot ListPicker ListPickerBox ListPickerBoxBackground ListPickerBoxOptions ListPlay ListPlot ListPlot3D ListPointPlot3D ListPolarPlot ListQ ListStreamDensityPlot ListStreamPlot ListSurfacePlot3D ListVectorDensityPlot ListVectorPlot ListVectorPlot3D ListZTransform Literal LiteralSearch LocalClusteringCoefficient LocalizeVariables LocationEquivalenceTest LocationTest Locator LocatorAutoCreate LocatorBox LocatorBoxOptions LocatorCentering LocatorPane LocatorPaneBox LocatorPaneBoxOptions LocatorRegion Locked Log Log10 Log2 LogBarnesG LogGamma LogGammaDistribution LogicalExpand LogIntegral LogisticDistribution LogitModelFit LogLikelihood LogLinearPlot LogLogisticDistribution LogLogPlot LogMultinormalDistribution LogNormalDistribution LogPlot LogRankTest LogSeriesDistribution LongEqual Longest LongestAscendingSequence LongestCommonSequence LongestCommonSequencePositions LongestCommonSubsequence LongestCommonSubsequencePositions LongestMatch LongForm Longitude LongLeftArrow LongLeftRightArrow LongRightArrow Loopback LoopFreeGraphQ LowerCaseQ LowerLeftArrow LowerRightArrow LowerTriangularize LowpassFilter LQEstimatorGains LQGRegulator LQOutputRegulatorGains LQRegulatorGains LUBackSubstitution LucasL LuccioSamiComponents LUDecomposition LyapunovSolve LyonsGroupLy MachineID MachineName MachineNumberQ MachinePrecision MacintoshSystemPageSetup Magenta Magnification Magnify MainSolve MaintainDynamicCaches Majority MakeBoxes MakeExpression MakeRules MangoldtLambda ManhattanDistance Manipulate Manipulator MannWhitneyTest MantissaExponent Manual Map MapAll MapAt MapIndexed MAProcess MapThread MarcumQ MardiaCombinedTest MardiaKurtosisTest MardiaSkewnessTest MarginalDistribution MarkovProcessProperties Masking MatchingDissimilarity MatchLocalNameQ MatchLocalNames MatchQ Material MathematicaNotation MathieuC MathieuCharacteristicA MathieuCharacteristicB MathieuCharacteristicExponent MathieuCPrime MathieuGroupM11 MathieuGroupM12 MathieuGroupM22 MathieuGroupM23 MathieuGroupM24 MathieuS MathieuSPrime MathMLForm MathMLText Matrices MatrixExp MatrixForm MatrixFunction MatrixLog MatrixPlot MatrixPower MatrixQ MatrixRank Max MaxBend MaxDetect MaxExtraBandwidths MaxExtraConditions MaxFeatures MaxFilter Maximize MaxIterations MaxMemoryUsed MaxMixtureKernels MaxPlotPoints MaxPoints MaxRecursion MaxStableDistribution MaxStepFraction MaxSteps MaxStepSize MaxValue MaxwellDistribution McLaughlinGroupMcL Mean MeanClusteringCoefficient MeanDegreeConnectivity MeanDeviation MeanFilter MeanGraphDistance MeanNeighborDegree MeanShift MeanShiftFilter Median MedianDeviation MedianFilter Medium MeijerG MeixnerDistribution MemberQ MemoryConstrained MemoryInUse Menu MenuAppearance MenuCommandKey MenuEvaluator MenuItem MenuPacket MenuSortingValue MenuStyle MenuView MergeDifferences Mesh MeshFunctions MeshRange MeshShading MeshStyle Message MessageDialog MessageList MessageName MessageOptions MessagePacket Messages MessagesNotebook MetaCharacters MetaInformation Method MethodOptions MexicanHatWavelet MeyerWavelet Min MinDetect MinFilter MinimalPolynomial MinimalStateSpaceModel Minimize Minors MinRecursion MinSize MinStableDistribution Minus MinusPlus MinValue Missing MissingDataMethod MittagLefflerE MixedRadix MixedRadixQuantity MixtureDistribution Mod Modal Mode Modular ModularLambda Module Modulus MoebiusMu Moment Momentary MomentConvert MomentEvaluate MomentGeneratingFunction Monday Monitor MonomialList MonomialOrder MonsterGroupM MorletWavelet MorphologicalBinarize MorphologicalBranchPoints MorphologicalComponents MorphologicalEulerNumber MorphologicalGraph MorphologicalPerimeter MorphologicalTransform Most MouseAnnotation MouseAppearance MouseAppearanceTag MouseButtons Mouseover MousePointerNote MousePosition MovingAverage MovingMedian MoyalDistribution MultiedgeStyle MultilaunchWarning MultiLetterItalics MultiLetterStyle MultilineFunction Multinomial MultinomialDistribution MultinormalDistribution MultiplicativeOrder Multiplicity Multiselection MultivariateHypergeometricDistribution MultivariatePoissonDistribution MultivariateTDistribution N NakagamiDistribution NameQ Names NamespaceBox Nand NArgMax NArgMin NBernoulliB NCache NDSolve NDSolveValue Nearest NearestFunction NeedCurrentFrontEndPackagePacket NeedCurrentFrontEndSymbolsPacket NeedlemanWunschSimilarity Needs Negative NegativeBinomialDistribution NegativeMultinomialDistribution NeighborhoodGraph Nest NestedGreaterGreater NestedLessLess NestedScriptRules NestList NestWhile NestWhileList NevilleThetaC NevilleThetaD NevilleThetaN NevilleThetaS NewPrimitiveStyle NExpectation Next NextPrime NHoldAll NHoldFirst NHoldRest NicholsGridLines NicholsPlot NIntegrate NMaximize NMaxValue NMinimize NMinValue NominalVariables NonAssociative NoncentralBetaDistribution NoncentralChiSquareDistribution NoncentralFRatioDistribution NoncentralStudentTDistribution NonCommutativeMultiply NonConstants None NonlinearModelFit NonlocalMeansFilter NonNegative NonPositive Nor NorlundB Norm Normal NormalDistribution NormalGrouping Normalize NormalizedSquaredEuclideanDistance NormalsFunction NormFunction Not NotCongruent NotCupCap NotDoubleVerticalBar Notebook NotebookApply NotebookAutoSave NotebookClose NotebookConvertSettings NotebookCreate NotebookCreateReturnObject NotebookDefault NotebookDelete NotebookDirectory NotebookDynamicExpression NotebookEvaluate NotebookEventActions NotebookFileName NotebookFind NotebookFindReturnObject NotebookGet NotebookGetLayoutInformationPacket NotebookGetMisspellingsPacket NotebookInformation NotebookInterfaceObject NotebookLocate NotebookObject NotebookOpen NotebookOpenReturnObject NotebookPath NotebookPrint NotebookPut NotebookPutReturnObject NotebookRead NotebookResetGeneratedCells Notebooks NotebookSave NotebookSaveAs NotebookSelection NotebookSetupLayoutInformationPacket NotebooksMenu NotebookWrite NotElement NotEqualTilde NotExists NotGreater NotGreaterEqual NotGreaterFullEqual NotGreaterGreater NotGreaterLess NotGreaterSlantEqual NotGreaterTilde NotHumpDownHump NotHumpEqual NotLeftTriangle NotLeftTriangleBar NotLeftTriangleEqual NotLess NotLessEqual NotLessFullEqual NotLessGreater NotLessLess NotLessSlantEqual NotLessTilde NotNestedGreaterGreater NotNestedLessLess NotPrecedes NotPrecedesEqual NotPrecedesSlantEqual NotPrecedesTilde NotReverseElement NotRightTriangle NotRightTriangleBar NotRightTriangleEqual NotSquareSubset NotSquareSubsetEqual NotSquareSuperset NotSquareSupersetEqual NotSubset NotSubsetEqual NotSucceeds NotSucceedsEqual NotSucceedsSlantEqual NotSucceedsTilde NotSuperset NotSupersetEqual NotTilde NotTildeEqual NotTildeFullEqual NotTildeTilde NotVerticalBar NProbability NProduct NProductFactors NRoots NSolve NSum NSumTerms Null NullRecords NullSpace NullWords Number NumberFieldClassNumber NumberFieldDiscriminant NumberFieldFundamentalUnits NumberFieldIntegralBasis NumberFieldNormRepresentatives NumberFieldRegulator NumberFieldRootsOfUnity NumberFieldSignature NumberForm NumberFormat NumberMarks NumberMultiplier NumberPadding NumberPoint NumberQ NumberSeparator NumberSigns NumberString Numerator NumericFunction NumericQ NuttallWindow NValues NyquistGridLines NyquistPlot O ObservabilityGramian ObservabilityMatrix ObservableDecomposition ObservableModelQ OddQ Off Offset OLEData On ONanGroupON OneIdentity Opacity Open OpenAppend Opener OpenerBox OpenerBoxOptions OpenerView OpenFunctionInspectorPacket Opening OpenRead OpenSpecialOptions OpenTemporary OpenWrite Operate OperatingSystem OptimumFlowData Optional OptionInspectorSettings OptionQ Options OptionsPacket OptionsPattern OptionValue OptionValueBox OptionValueBoxOptions Or Orange Order OrderDistribution OrderedQ Ordering Orderless OrnsteinUhlenbeckProcess Orthogonalize Out Outer OutputAutoOverwrite OutputControllabilityMatrix OutputControllableModelQ OutputForm OutputFormData OutputGrouping OutputMathEditExpression OutputNamePacket OutputResponse OutputSizeLimit OutputStream Over OverBar OverDot Overflow OverHat Overlaps Overlay OverlayBox OverlayBoxOptions Overscript OverscriptBox OverscriptBoxOptions OverTilde OverVector OwenT OwnValues PackingMethod PaddedForm Padding PadeApproximant PadLeft PadRight PageBreakAbove PageBreakBelow PageBreakWithin PageFooterLines PageFooters PageHeaderLines PageHeaders PageHeight PageRankCentrality PageWidth PairedBarChart PairedHistogram PairedSmoothHistogram PairedTTest PairedZTest PaletteNotebook PalettePath Pane PaneBox PaneBoxOptions Panel PanelBox PanelBoxOptions Paneled PaneSelector PaneSelectorBox PaneSelectorBoxOptions PaperWidth ParabolicCylinderD ParagraphIndent ParagraphSpacing ParallelArray ParallelCombine ParallelDo ParallelEvaluate Parallelization Parallelize ParallelMap ParallelNeeds ParallelProduct ParallelSubmit ParallelSum ParallelTable ParallelTry Parameter ParameterEstimator ParameterMixtureDistribution ParameterVariables ParametricFunction ParametricNDSolve ParametricNDSolveValue ParametricPlot ParametricPlot3D ParentConnect ParentDirectory ParentForm Parenthesize ParentList ParetoDistribution Part PartialCorrelationFunction PartialD ParticleData Partition PartitionsP PartitionsQ ParzenWindow PascalDistribution PassEventsDown PassEventsUp Paste PasteBoxFormInlineCells PasteButton Path PathGraph PathGraphQ Pattern PatternSequence PatternTest PauliMatrix PaulWavelet Pause PausedTime PDF PearsonChiSquareTest PearsonCorrelationTest PearsonDistribution PerformanceGoal PeriodicInterpolation Periodogram PeriodogramArray PermutationCycles PermutationCyclesQ PermutationGroup PermutationLength PermutationList PermutationListQ PermutationMax PermutationMin PermutationOrder PermutationPower PermutationProduct PermutationReplace Permutations PermutationSupport Permute PeronaMalikFilter Perpendicular PERTDistribution PetersenGraph PhaseMargins Pi Pick PIDData PIDDerivativeFilter PIDFeedforward PIDTune Piecewise PiecewiseExpand PieChart PieChart3D PillaiTrace PillaiTraceTest Pink Pivoting PixelConstrained PixelValue PixelValuePositions Placed Placeholder PlaceholderReplace Plain PlanarGraphQ Play PlayRange Plot Plot3D Plot3Matrix PlotDivision PlotJoined PlotLabel PlotLayout PlotLegends PlotMarkers PlotPoints PlotRange PlotRangeClipping PlotRangePadding PlotRegion PlotStyle Plus PlusMinus Pochhammer PodStates PodWidth Point Point3DBox PointBox PointFigureChart PointForm PointLegend PointSize PoissonConsulDistribution PoissonDistribution PoissonProcess PoissonWindow PolarAxes PolarAxesOrigin PolarGridLines PolarPlot PolarTicks PoleZeroMarkers PolyaAeppliDistribution PolyGamma Polygon Polygon3DBox Polygon3DBoxOptions PolygonBox PolygonBoxOptions PolygonHoleScale PolygonIntersections PolygonScale PolyhedronData PolyLog PolynomialExtendedGCD PolynomialForm PolynomialGCD PolynomialLCM PolynomialMod PolynomialQ PolynomialQuotient PolynomialQuotientRemainder PolynomialReduce PolynomialRemainder Polynomials PopupMenu PopupMenuBox PopupMenuBoxOptions PopupView PopupWindow Position Positive PositiveDefiniteMatrixQ PossibleZeroQ Postfix PostScript Power PowerDistribution PowerExpand PowerMod PowerModList PowerSpectralDensity PowersRepresentations PowerSymmetricPolynomial Precedence PrecedenceForm Precedes PrecedesEqual PrecedesSlantEqual PrecedesTilde Precision PrecisionGoal PreDecrement PredictionRoot PreemptProtect PreferencesPath Prefix PreIncrement Prepend PrependTo PreserveImageOptions Previous PriceGraphDistribution PrimaryPlaceholder Prime PrimeNu PrimeOmega PrimePi PrimePowerQ PrimeQ Primes PrimeZetaP PrimitiveRoot PrincipalComponents PrincipalValue Print PrintAction PrintForm PrintingCopies PrintingOptions PrintingPageRange PrintingStartingPageNumber PrintingStyleEnvironment PrintPrecision PrintTemporary Prism PrismBox PrismBoxOptions PrivateCellOptions PrivateEvaluationOptions PrivateFontOptions PrivateFrontEndOptions PrivateNotebookOptions PrivatePaths Probability ProbabilityDistribution ProbabilityPlot ProbabilityPr ProbabilityScalePlot ProbitModelFit ProcessEstimator ProcessParameterAssumptions ProcessParameterQ ProcessStateDomain ProcessTimeDomain Product ProductDistribution ProductLog ProgressIndicator ProgressIndicatorBox ProgressIndicatorBoxOptions Projection Prolog PromptForm Properties Property PropertyList PropertyValue Proportion Proportional Protect Protected ProteinData Pruning PseudoInverse Purple Put PutAppend Pyramid PyramidBox PyramidBoxOptions QBinomial QFactorial QGamma QHypergeometricPFQ QPochhammer QPolyGamma QRDecomposition QuadraticIrrationalQ Quantile QuantilePlot Quantity QuantityForm QuantityMagnitude QuantityQ QuantityUnit Quartics QuartileDeviation Quartiles QuartileSkewness QueueingNetworkProcess QueueingProcess QueueProperties Quiet Quit Quotient QuotientRemainder RadialityCentrality RadicalBox RadicalBoxOptions RadioButton RadioButtonBar RadioButtonBox RadioButtonBoxOptions Radon RamanujanTau RamanujanTauL RamanujanTauTheta RamanujanTauZ Random RandomChoice RandomComplex RandomFunction RandomGraph RandomImage RandomInteger RandomPermutation RandomPrime RandomReal RandomSample RandomSeed RandomVariate RandomWalkProcess Range RangeFilter RangeSpecification RankedMax RankedMin Raster Raster3D Raster3DBox Raster3DBoxOptions RasterArray RasterBox RasterBoxOptions Rasterize RasterSize Rational RationalFunctions Rationalize Rationals Ratios Raw RawArray RawBoxes RawData RawMedium RayleighDistribution Re Read ReadList ReadProtected Real RealBlockDiagonalForm RealDigits RealExponent Reals Reap Record RecordLists RecordSeparators Rectangle RectangleBox RectangleBoxOptions RectangleChart RectangleChart3D RecurrenceFilter RecurrenceTable RecurringDigitsForm Red Reduce RefBox ReferenceLineStyle ReferenceMarkers ReferenceMarkerStyle Refine ReflectionMatrix ReflectionTransform Refresh RefreshRate RegionBinarize RegionFunction RegionPlot RegionPlot3D RegularExpression Regularization Reinstall Release ReleaseHold ReliabilityDistribution ReliefImage ReliefPlot Remove RemoveAlphaChannel RemoveAsynchronousTask Removed RemoveInputStreamMethod RemoveOutputStreamMethod RemoveProperty RemoveScheduledTask RenameDirectory RenameFile RenderAll RenderingOptions RenewalProcess RenkoChart Repeated RepeatedNull RepeatedString Replace ReplaceAll ReplaceHeldPart ReplaceImageValue ReplaceList ReplacePart ReplacePixelValue ReplaceRepeated Resampling Rescale RescalingTransform ResetDirectory ResetMenusPacket ResetScheduledTask Residue Resolve Rest Resultant ResumePacket Return ReturnExpressionPacket ReturnInputFormPacket ReturnPacket ReturnTextPacket Reverse ReverseBiorthogonalSplineWavelet ReverseElement ReverseEquilibrium ReverseGraph ReverseUpEquilibrium RevolutionAxis RevolutionPlot3D RGBColor RiccatiSolve RiceDistribution RidgeFilter RiemannR RiemannSiegelTheta RiemannSiegelZ Riffle Right RightArrow RightArrowBar RightArrowLeftArrow RightCosetRepresentative RightDownTeeVector RightDownVector RightDownVectorBar RightTee RightTeeArrow RightTeeVector RightTriangle RightTriangleBar RightTriangleEqual RightUpDownVector RightUpTeeVector RightUpVector RightUpVectorBar RightVector RightVectorBar RiskAchievementImportance RiskReductionImportance RogersTanimotoDissimilarity Root RootApproximant RootIntervals RootLocusPlot RootMeanSquare RootOfUnityQ RootReduce Roots RootSum Rotate RotateLabel RotateLeft RotateRight RotationAction RotationBox RotationBoxOptions RotationMatrix RotationTransform Round RoundImplies RoundingRadius Row RowAlignments RowBackgrounds RowBox RowHeights RowLines RowMinHeight RowReduce RowsEqual RowSpacings RSolve RudvalisGroupRu Rule RuleCondition RuleDelayed RuleForm RulerUnits Run RunScheduledTask RunThrough RuntimeAttributes RuntimeOptions RussellRaoDissimilarity SameQ SameTest SampleDepth SampledSoundFunction SampledSoundList SampleRate SamplingPeriod SARIMAProcess SARMAProcess SatisfiabilityCount SatisfiabilityInstances SatisfiableQ Saturday Save Saveable SaveAutoDelete SaveDefinitions SawtoothWave Scale Scaled ScaleDivisions ScaledMousePosition ScaleOrigin ScalePadding ScaleRanges ScaleRangeStyle ScalingFunctions ScalingMatrix ScalingTransform Scan ScheduledTaskActiveQ ScheduledTaskData ScheduledTaskObject ScheduledTasks SchurDecomposition ScientificForm ScreenRectangle ScreenStyleEnvironment ScriptBaselineShifts ScriptLevel ScriptMinSize ScriptRules ScriptSizeMultipliers Scrollbars ScrollingOptions ScrollPosition Sec Sech SechDistribution SectionGrouping SectorChart SectorChart3D SectorOrigin SectorSpacing SeedRandom Select Selectable SelectComponents SelectedCells SelectedNotebook Selection SelectionAnimate SelectionCell SelectionCellCreateCell SelectionCellDefaultStyle SelectionCellParentStyle SelectionCreateCell SelectionDebuggerTag SelectionDuplicateCell SelectionEvaluate SelectionEvaluateCreateCell SelectionMove SelectionPlaceholder SelectionSetStyle SelectWithContents SelfLoops SelfLoopStyle SemialgebraicComponentInstances SendMail Sequence SequenceAlignment SequenceForm SequenceHold SequenceLimit Series SeriesCoefficient SeriesData SessionTime Set SetAccuracy SetAlphaChannel SetAttributes Setbacks SetBoxFormNamesPacket SetDelayed SetDirectory SetEnvironment SetEvaluationNotebook SetFileDate SetFileLoadingContext SetNotebookStatusLine SetOptions SetOptionsPacket SetPrecision SetProperty SetSelectedNotebook SetSharedFunction SetSharedVariable SetSpeechParametersPacket SetStreamPosition SetSystemOptions Setter SetterBar SetterBox SetterBoxOptions Setting SetValue Shading Shallow ShannonWavelet ShapiroWilkTest Share Sharpen ShearingMatrix ShearingTransform ShenCastanMatrix Short ShortDownArrow Shortest ShortestMatch ShortestPathFunction ShortLeftArrow ShortRightArrow ShortUpArrow Show ShowAutoStyles ShowCellBracket ShowCellLabel ShowCellTags ShowClosedCellArea ShowContents ShowControls ShowCursorTracker ShowGroupOpenCloseIcon ShowGroupOpener ShowInvisibleCharacters ShowPageBreaks ShowPredictiveInterface ShowSelection ShowShortBoxForm ShowSpecialCharacters ShowStringCharacters ShowSyntaxStyles ShrinkingDelay ShrinkWrapBoundingBox SiegelTheta SiegelTukeyTest Sign Signature SignedRankTest SignificanceLevel SignPadding SignTest SimilarityRules SimpleGraph SimpleGraphQ Simplify Sin Sinc SinghMaddalaDistribution SingleEvaluation SingleLetterItalics SingleLetterStyle SingularValueDecomposition SingularValueList SingularValuePlot SingularValues Sinh SinhIntegral SinIntegral SixJSymbol Skeleton SkeletonTransform SkellamDistribution Skewness SkewNormalDistribution Skip SliceDistribution Slider Slider2D Slider2DBox Slider2DBoxOptions SliderBox SliderBoxOptions SlideView Slot SlotSequence Small SmallCircle Smaller SmithDelayCompensator SmithWatermanSimilarity SmoothDensityHistogram SmoothHistogram SmoothHistogram3D SmoothKernelDistribution SocialMediaData Socket SokalSneathDissimilarity Solve SolveAlways SolveDelayed Sort SortBy Sound SoundAndGraphics SoundNote SoundVolume Sow Space SpaceForm Spacer Spacings Span SpanAdjustments SpanCharacterRounding SpanFromAbove SpanFromBoth SpanFromLeft SpanLineThickness SpanMaxSize SpanMinSize SpanningCharacters SpanSymmetric SparseArray SpatialGraphDistribution Speak SpeakTextPacket SpearmanRankTest SpearmanRho Spectrogram SpectrogramArray Specularity SpellingCorrection SpellingDictionaries SpellingDictionariesPath SpellingOptions SpellingSuggestionsPacket Sphere SphereBox SphericalBesselJ SphericalBesselY SphericalHankelH1 SphericalHankelH2 SphericalHarmonicY SphericalPlot3D SphericalRegion SpheroidalEigenvalue SpheroidalJoiningFactor SpheroidalPS SpheroidalPSPrime SpheroidalQS SpheroidalQSPrime SpheroidalRadialFactor SpheroidalS1 SpheroidalS1Prime SpheroidalS2 SpheroidalS2Prime Splice SplicedDistribution SplineClosed SplineDegree SplineKnots SplineWeights Split SplitBy SpokenString Sqrt SqrtBox SqrtBoxOptions Square SquaredEuclideanDistance SquareFreeQ SquareIntersection SquaresR SquareSubset SquareSubsetEqual SquareSuperset SquareSupersetEqual SquareUnion SquareWave StabilityMargins StabilityMarginsStyle StableDistribution Stack StackBegin StackComplete StackInhibit StandardDeviation StandardDeviationFilter StandardForm Standardize StandbyDistribution Star StarGraph StartAsynchronousTask StartingStepSize StartOfLine StartOfString StartScheduledTask StartupSound StateDimensions StateFeedbackGains StateOutputEstimator StateResponse StateSpaceModel StateSpaceRealization StateSpaceTransform StationaryDistribution StationaryWaveletPacketTransform StationaryWaveletTransform StatusArea StatusCentrality StepMonitor StieltjesGamma StirlingS1 StirlingS2 StopAsynchronousTask StopScheduledTask StrataVariables StratonovichProcess StreamColorFunction StreamColorFunctionScaling StreamDensityPlot StreamPlot StreamPoints StreamPosition Streams StreamScale StreamStyle String StringBreak StringByteCount StringCases StringCount StringDrop StringExpression StringForm StringFormat StringFreeQ StringInsert StringJoin StringLength StringMatchQ StringPosition StringQ StringReplace StringReplaceList StringReplacePart StringReverse StringRotateLeft StringRotateRight StringSkeleton StringSplit StringTake StringToStream StringTrim StripBoxes StripOnInput StripWrapperBoxes StrokeForm StructuralImportance StructuredArray StructuredSelection StruveH StruveL Stub StudentTDistribution Style StyleBox StyleBoxAutoDelete StyleBoxOptions StyleData StyleDefinitions StyleForm StyleKeyMapping StyleMenuListing StyleNameDialogSettings StyleNames StylePrint StyleSheetPath Subfactorial Subgraph SubMinus SubPlus SubresultantPolynomialRemainders SubresultantPolynomials Subresultants Subscript SubscriptBox SubscriptBoxOptions Subscripted Subset SubsetEqual Subsets SubStar Subsuperscript SubsuperscriptBox SubsuperscriptBoxOptions Subtract SubtractFrom SubValues Succeeds SucceedsEqual SucceedsSlantEqual SucceedsTilde SuchThat Sum SumConvergence Sunday SuperDagger SuperMinus SuperPlus Superscript SuperscriptBox SuperscriptBoxOptions Superset SupersetEqual SuperStar Surd SurdForm SurfaceColor SurfaceGraphics SurvivalDistribution SurvivalFunction SurvivalModel SurvivalModelFit SuspendPacket SuzukiDistribution SuzukiGroupSuz SwatchLegend Switch Symbol SymbolName SymletWavelet Symmetric SymmetricGroup SymmetricMatrixQ SymmetricPolynomial SymmetricReduction Symmetrize SymmetrizedArray SymmetrizedArrayRules SymmetrizedDependentComponents SymmetrizedIndependentComponents SymmetrizedReplacePart SynchronousInitialization SynchronousUpdating Syntax SyntaxForm SyntaxInformation SyntaxLength SyntaxPacket SyntaxQ SystemDialogInput SystemException SystemHelpPath SystemInformation SystemInformationData SystemOpen SystemOptions SystemsModelDelay SystemsModelDelayApproximate SystemsModelDelete SystemsModelDimensions SystemsModelExtract SystemsModelFeedbackConnect SystemsModelLabels SystemsModelOrder SystemsModelParallelConnect SystemsModelSeriesConnect SystemsModelStateFeedbackConnect SystemStub Tab TabFilling Table TableAlignments TableDepth TableDirections TableForm TableHeadings TableSpacing TableView TableViewBox TabSpacings TabView TabViewBox TabViewBoxOptions TagBox TagBoxNote TagBoxOptions TaggingRules TagSet TagSetDelayed TagStyle TagUnset Take TakeWhile Tally Tan Tanh TargetFunctions TargetUnits TautologyQ TelegraphProcess TemplateBox TemplateBoxOptions TemplateSlotSequence TemporalData Temporary TemporaryVariable TensorContract TensorDimensions TensorExpand TensorProduct TensorQ TensorRank TensorReduce TensorSymmetry TensorTranspose TensorWedge Tetrahedron TetrahedronBox TetrahedronBoxOptions TeXForm TeXSave Text Text3DBox Text3DBoxOptions TextAlignment TextBand TextBoundingBox TextBox TextCell TextClipboardType TextData TextForm TextJustification TextLine TextPacket TextParagraph TextRecognize TextRendering TextStyle Texture TextureCoordinateFunction TextureCoordinateScaling Therefore ThermometerGauge Thick Thickness Thin Thinning ThisLink ThompsonGroupTh Thread ThreeJSymbol Threshold Through Throw Thumbnail Thursday Ticks TicksStyle Tilde TildeEqual TildeFullEqual TildeTilde TimeConstrained TimeConstraint Times TimesBy TimeSeriesForecast TimeSeriesInvertibility TimeUsed TimeValue TimeZone Timing Tiny TitleGrouping TitsGroupT ToBoxes ToCharacterCode ToColor ToContinuousTimeModel ToDate ToDiscreteTimeModel ToeplitzMatrix ToExpression ToFileName Together Toggle ToggleFalse Toggler TogglerBar TogglerBox TogglerBoxOptions ToHeldExpression ToInvertibleTimeSeries TokenWords Tolerance ToLowerCase ToNumberField TooBig Tooltip TooltipBox TooltipBoxOptions TooltipDelay TooltipStyle Top TopHatTransform TopologicalSort ToRadicals ToRules ToString Total TotalHeight TotalVariationFilter TotalWidth TouchscreenAutoZoom TouchscreenControlPlacement ToUpperCase Tr Trace TraceAbove TraceAction TraceBackward TraceDepth TraceDialog TraceForward TraceInternal TraceLevel TraceOff TraceOn TraceOriginal TracePrint TraceScan TrackedSymbols TradingChart TraditionalForm TraditionalFunctionNotation TraditionalNotation TraditionalOrder TransferFunctionCancel TransferFunctionExpand TransferFunctionFactor TransferFunctionModel TransferFunctionPoles TransferFunctionTransform TransferFunctionZeros TransformationFunction TransformationFunctions TransformationMatrix TransformedDistribution TransformedField Translate TranslationTransform TransparentColor Transpose TreeForm TreeGraph TreeGraphQ TreePlot TrendStyle TriangleWave TriangularDistribution Trig TrigExpand TrigFactor TrigFactorList Trigger TrigReduce TrigToExp TrimmedMean True TrueQ TruncatedDistribution TsallisQExponentialDistribution TsallisQGaussianDistribution TTest Tube TubeBezierCurveBox TubeBezierCurveBoxOptions TubeBox TubeBSplineCurveBox TubeBSplineCurveBoxOptions Tuesday TukeyLambdaDistribution TukeyWindow Tuples TuranGraph TuringMachine Transparent UnateQ Uncompress Undefined UnderBar Underflow Underlined Underoverscript UnderoverscriptBox UnderoverscriptBoxOptions Underscript UnderscriptBox UnderscriptBoxOptions UndirectedEdge UndirectedGraph UndirectedGraphQ UndocumentedTestFEParserPacket UndocumentedTestGetSelectionPacket Unequal Unevaluated UniformDistribution UniformGraphDistribution UniformSumDistribution Uninstall Union UnionPlus Unique UnitBox UnitConvert UnitDimensions Unitize UnitRootTest UnitSimplify UnitStep UnitTriangle UnitVector Unprotect UnsameQ UnsavedVariables Unset UnsetShared UntrackedVariables Up UpArrow UpArrowBar UpArrowDownArrow Update UpdateDynamicObjects UpdateDynamicObjectsSynchronous UpdateInterval UpDownArrow UpEquilibrium UpperCaseQ UpperLeftArrow UpperRightArrow UpperTriangularize Upsample UpSet UpSetDelayed UpTee UpTeeArrow UpValues URL URLFetch URLFetchAsynchronous URLSave URLSaveAsynchronous UseGraphicsRange Using UsingFrontEnd V2Get ValidationLength Value ValueBox ValueBoxOptions ValueForm ValueQ ValuesData Variables Variance VarianceEquivalenceTest VarianceEstimatorFunction VarianceGammaDistribution VarianceTest VectorAngle VectorColorFunction VectorColorFunctionScaling VectorDensityPlot VectorGlyphData VectorPlot VectorPlot3D VectorPoints VectorQ Vectors VectorScale VectorStyle Vee Verbatim Verbose VerboseConvertToPostScriptPacket VerifyConvergence VerifySolutions VerifyTestAssumptions Version VersionNumber VertexAdd VertexCapacity VertexColors VertexComponent VertexConnectivity VertexCoordinateRules VertexCoordinates VertexCorrelationSimilarity VertexCosineSimilarity VertexCount VertexCoverQ VertexDataCoordinates VertexDegree VertexDelete VertexDiceSimilarity VertexEccentricity VertexInComponent VertexInDegree VertexIndex VertexJaccardSimilarity VertexLabeling VertexLabels VertexLabelStyle VertexList VertexNormals VertexOutComponent VertexOutDegree VertexQ VertexRenderingFunction VertexReplace VertexShape VertexShapeFunction VertexSize VertexStyle VertexTextureCoordinates VertexWeight Vertical VerticalBar VerticalForm VerticalGauge VerticalSeparator VerticalSlider VerticalTilde ViewAngle ViewCenter ViewMatrix ViewPoint ViewPointSelectorSettings ViewPort ViewRange ViewVector ViewVertical VirtualGroupData Visible VisibleCell VoigtDistribution VonMisesDistribution WaitAll WaitAsynchronousTask WaitNext WaitUntil WakebyDistribution WalleniusHypergeometricDistribution WaringYuleDistribution WatershedComponents WatsonUSquareTest WattsStrogatzGraphDistribution WaveletBestBasis WaveletFilterCoefficients WaveletImagePlot WaveletListPlot WaveletMapIndexed WaveletMatrixPlot WaveletPhi WaveletPsi WaveletScale WaveletScalogram WaveletThreshold WeaklyConnectedComponents WeaklyConnectedGraphQ WeakStationarity WeatherData WeberE Wedge Wednesday WeibullDistribution WeierstrassHalfPeriods WeierstrassInvariants WeierstrassP WeierstrassPPrime WeierstrassSigma WeierstrassZeta WeightedAdjacencyGraph WeightedAdjacencyMatrix WeightedData WeightedGraphQ Weights WelchWindow WheelGraph WhenEvent Which While White Whitespace WhitespaceCharacter WhittakerM WhittakerW WienerFilter WienerProcess WignerD WignerSemicircleDistribution WilksW WilksWTest WindowClickSelect WindowElements WindowFloating WindowFrame WindowFrameElements WindowMargins WindowMovable WindowOpacity WindowSelected WindowSize WindowStatusArea WindowTitle WindowToolbars WindowWidth With WolframAlpha WolframAlphaDate WolframAlphaQuantity WolframAlphaResult Word WordBoundary WordCharacter WordData WordSearch WordSeparators WorkingPrecision Write WriteString Wronskian XMLElement XMLObject Xnor Xor Yellow YuleDissimilarity ZernikeR ZeroSymmetric ZeroTest ZeroWidthTimes Zeta ZetaZero ZipfDistribution ZTest ZTransform $Aborted $ActivationGroupID $ActivationKey $ActivationUserRegistered $AddOnsDirectory $AssertFunction $Assumptions $AsynchronousTask $BaseDirectory $BatchInput $BatchOutput $BoxForms $ByteOrdering $Canceled $CharacterEncoding $CharacterEncodings $CommandLine $CompilationTarget $ConditionHold $ConfiguredKernels $Context $ContextPath $ControlActiveSetting $CreationDate $CurrentLink $DateStringFormat $DefaultFont $DefaultFrontEnd $DefaultImagingDevice $DefaultPath $Display $DisplayFunction $DistributedContexts $DynamicEvaluation $Echo $Epilog $ExportFormats $Failed $FinancialDataSource $FormatType $FrontEnd $FrontEndSession $GeoLocation $HistoryLength $HomeDirectory $HTTPCookies $IgnoreEOF $ImagingDevices $ImportFormats $InitialDirectory $Input $InputFileName $InputStreamMethods $Inspector $InstallationDate $InstallationDirectory $InterfaceEnvironment $IterationLimit $KernelCount $KernelID $Language $LaunchDirectory $LibraryPath $LicenseExpirationDate $LicenseID $LicenseProcesses $LicenseServer $LicenseSubprocesses $LicenseType $Line $Linked $LinkSupported $LoadedFiles $MachineAddresses $MachineDomain $MachineDomains $MachineEpsilon $MachineID $MachineName $MachinePrecision $MachineType $MaxExtraPrecision $MaxLicenseProcesses $MaxLicenseSubprocesses $MaxMachineNumber $MaxNumber $MaxPiecewiseCases $MaxPrecision $MaxRootDegree $MessageGroups $MessageList $MessagePrePrint $Messages $MinMachineNumber $MinNumber $MinorReleaseNumber $MinPrecision $ModuleNumber $NetworkLicense $NewMessage $NewSymbol $Notebooks $NumberMarks $Off $OperatingSystem $Output $OutputForms $OutputSizeLimit $OutputStreamMethods $Packages $ParentLink $ParentProcessID $PasswordFile $PatchLevelID $Path $PathnameSeparator $PerformanceGoal $PipeSupported $Post $Pre $PreferencesDirectory $PrePrint $PreRead $PrintForms $PrintLiteral $ProcessID $ProcessorCount $ProcessorType $ProductInformation $ProgramName $RandomState $RecursionLimit $ReleaseNumber $RootDirectory $ScheduledTask $ScriptCommandLine $SessionID $SetParentLink $SharedFunctions $SharedVariables $SoundDisplay $SoundDisplayFunction $SuppressInputFormHeads $SynchronousEvaluation $SyntaxHandler $System $SystemCharacterEncoding $SystemID $SystemWordLength $TemporaryDirectory $TemporaryPrefix $TextStyle $TimedOut $TimeUnit $TimeZone $TopDirectory $TraceOff $TraceOn $TracePattern $TracePostAction $TracePreAction $Urgent $UserAddOnsDirectory $UserBaseDirectory $UserDocumentsDirectory $UserName $Version $VersionNumber", -contains:[{className:"comment",begin:/\(\*/,end:/\*\)/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{begin:/\{/,end:/\}/,illegal:/:/}]}}}),define("highlight/lib/languages/matlab",["require","exports","module"],function(e,t,n){n.exports=function(e){var t=[e.C_NUMBER_MODE,{className:"string",begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE,{begin:"''"}]}],n={relevance:0,contains:[{begin:/'['\.]*/}]};return{keywords:{keyword:"break case catch classdef continue else elseif end enumerated events for function global if methods otherwise parfor persistent properties return spmd switch try while",built_in:"sin sind sinh asin asind asinh cos cosd cosh acos acosd acosh tan tand tanh atan atand atan2 atanh sec secd sech asec asecd asech csc cscd csch acsc acscd acsch cot cotd coth acot acotd acoth hypot exp expm1 log log1p log10 log2 pow2 realpow reallog realsqrt sqrt nthroot nextpow2 abs angle complex conj imag real unwrap isreal cplxpair fix floor ceil round mod rem sign airy besselj bessely besselh besseli besselk beta betainc betaln ellipj ellipke erf erfc erfcx erfinv expint gamma gammainc gammaln psi legendre cross dot factor isprime primes gcd lcm rat rats perms nchoosek factorial cart2sph cart2pol pol2cart sph2cart hsv2rgb rgb2hsv zeros ones eye repmat rand randn linspace logspace freqspace meshgrid accumarray size length ndims numel disp isempty isequal isequalwithequalnans cat reshape diag blkdiag tril triu fliplr flipud flipdim rot90 find sub2ind ind2sub bsxfun ndgrid permute ipermute shiftdim circshift squeeze isscalar isvector ans eps realmax realmin pi i inf nan isnan isinf isfinite j why compan gallery hadamard hankel hilb invhilb magic pascal rosser toeplitz vander wilkinson"},illegal:'(//|"|#|/\\*|\\s+/\\w+)',contains:[{className:"function",beginKeywords:"function",end:"$",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",variants:[{begin:"\\(",end:"\\)"},{begin:"\\[",end:"\\]"}]}]},{begin:/[a-zA-Z_][a-zA-Z_0-9]*'['\.]*/,returnBegin:!0,relevance:0,contains:[{begin:/[a-zA-Z_][a-zA-Z_0-9]*/,relevance:0},n.contains[0]]},{begin:"\\[",end:"\\]",contains:t,relevance:0,starts:n},{begin:"\\{",end:/}/,contains:t,relevance:0,starts:n},{begin:/\)/,relevance:0,starts:n},e.COMMENT("^\\s*\\%\\{\\s*$","^\\s*\\%\\}\\s*$"),e.COMMENT("\\%","$")].concat(t)}}}),define("highlight/lib/languages/maxima",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="if then else elseif for thru do while unless step in and or not",n="true false unknown inf minf ind und %e %i %pi %phi %gamma",i=" abasep abs absint absolute_real_time acos acosh acot acoth acsc acsch activate addcol add_edge add_edges addmatrices addrow add_vertex add_vertices adjacency_matrix adjoin adjoint af agd airy airy_ai airy_bi airy_dai airy_dbi algsys alg_type alias allroots alphacharp alphanumericp amortization %and annuity_fv annuity_pv antid antidiff AntiDifference append appendfile apply apply1 apply2 applyb1 apropos args arit_amortization arithmetic arithsum array arrayapply arrayinfo arraymake arraysetapply ascii asec asech asin asinh askinteger asksign assoc assoc_legendre_p assoc_legendre_q assume assume_external_byte_order asympa at atan atan2 atanh atensimp atom atvalue augcoefmatrix augmented_lagrangian_method av average_degree backtrace bars barsplot barsplot_description base64 base64_decode bashindices batch batchload bc2 bdvac belln benefit_cost bern bernpoly bernstein_approx bernstein_expand bernstein_poly bessel bessel_i bessel_j bessel_k bessel_simplify bessel_y beta beta_incomplete beta_incomplete_generalized beta_incomplete_regularized bezout bfallroots bffac bf_find_root bf_fmin_cobyla bfhzeta bfloat bfloatp bfpsi bfpsi0 bfzeta biconnected_components bimetric binomial bipartition block blockmatrixp bode_gain bode_phase bothcoef box boxplot boxplot_description break bug_report build_info|10 buildq build_sample burn cabs canform canten cardinality carg cartan cartesian_product catch cauchy_matrix cbffac cdf_bernoulli cdf_beta cdf_binomial cdf_cauchy cdf_chi2 cdf_continuous_uniform cdf_discrete_uniform cdf_exp cdf_f cdf_gamma cdf_general_finite_discrete cdf_geometric cdf_gumbel cdf_hypergeometric cdf_laplace cdf_logistic cdf_lognormal cdf_negative_binomial cdf_noncentral_chi2 cdf_noncentral_student_t cdf_normal cdf_pareto cdf_poisson cdf_rank_sum cdf_rayleigh cdf_signed_rank cdf_student_t cdf_weibull cdisplay ceiling central_moment cequal cequalignore cf cfdisrep cfexpand cgeodesic cgreaterp cgreaterpignore changename changevar chaosgame charat charfun charfun2 charlist charp charpoly chdir chebyshev_t chebyshev_u checkdiv check_overlaps chinese cholesky christof chromatic_index chromatic_number cint circulant_graph clear_edge_weight clear_rules clear_vertex_label clebsch_gordan clebsch_graph clessp clesspignore close closefile cmetric coeff coefmatrix cograd col collapse collectterms columnop columnspace columnswap columnvector combination combine comp2pui compare compfile compile compile_file complement_graph complete_bipartite_graph complete_graph complex_number_p components compose_functions concan concat conjugate conmetderiv connected_components connect_vertices cons constant constantp constituent constvalue cont2part content continuous_freq contortion contour_plot contract contract_edge contragrad contrib_ode convert coord copy copy_file copy_graph copylist copymatrix cor cos cosh cot coth cov cov1 covdiff covect covers crc24sum create_graph create_list csc csch csetup cspline ctaylor ct_coordsys ctransform ctranspose cube_graph cuboctahedron_graph cunlisp cv cycle_digraph cycle_graph cylindrical days360 dblint deactivate declare declare_constvalue declare_dimensions declare_fundamental_dimensions declare_fundamental_units declare_qty declare_translated declare_unit_conversion declare_units declare_weights decsym defcon define define_alt_display define_variable defint defmatch defrule defstruct deftaylor degree_sequence del delete deleten delta demo demoivre denom depends derivdegree derivlist describe desolve determinant dfloat dgauss_a dgauss_b dgeev dgemm dgeqrf dgesv dgesvd diag diagmatrix diag_matrix diagmatrixp diameter diff digitcharp dimacs_export dimacs_import dimension dimensionless dimensions dimensions_as_list direct directory discrete_freq disjoin disjointp disolate disp dispcon dispform dispfun dispJordan display disprule dispterms distrib divide divisors divsum dkummer_m dkummer_u dlange dodecahedron_graph dotproduct dotsimp dpart draw draw2d draw3d drawdf draw_file draw_graph dscalar echelon edge_coloring edge_connectivity edges eigens_by_jacobi eigenvalues eigenvectors eighth einstein eivals eivects elapsed_real_time elapsed_run_time ele2comp ele2polynome ele2pui elem elementp elevation_grid elim elim_allbut eliminate eliminate_using ellipse elliptic_e elliptic_ec elliptic_eu elliptic_f elliptic_kc elliptic_pi ematrix empty_graph emptyp endcons entermatrix entertensor entier equal equalp equiv_classes erf erfc erf_generalized erfi errcatch error errormsg errors euler ev eval_string evenp every evolution evolution2d evundiff example exp expand expandwrt expandwrt_factored expint expintegral_chi expintegral_ci expintegral_e expintegral_e1 expintegral_ei expintegral_e_simplify expintegral_li expintegral_shi expintegral_si explicit explose exponentialize express expt exsec extdiff extract_linear_equations extremal_subset ezgcd %f f90 facsum factcomb factor factorfacsum factorial factorout factorsum facts fast_central_elements fast_linsolve fasttimes featurep fernfale fft fib fibtophi fifth filename_merge file_search file_type fillarray findde find_root find_root_abs find_root_error find_root_rel first fix flatten flength float floatnump floor flower_snark flush flush1deriv flushd flushnd flush_output fmin_cobyla forget fortran fourcos fourexpand fourier fourier_elim fourint fourintcos fourintsin foursimp foursin fourth fposition frame_bracket freeof freshline fresnel_c fresnel_s from_adjacency_matrix frucht_graph full_listify fullmap fullmapl fullratsimp fullratsubst fullsetify funcsolve fundamental_dimensions fundamental_units fundef funmake funp fv g0 g1 gamma gamma_greek gamma_incomplete gamma_incomplete_generalized gamma_incomplete_regularized gauss gauss_a gauss_b gaussprob gcd gcdex gcdivide gcfac gcfactor gd generalized_lambert_w genfact gen_laguerre genmatrix gensym geo_amortization geo_annuity_fv geo_annuity_pv geomap geometric geometric_mean geosum get getcurrentdirectory get_edge_weight getenv get_lu_factors get_output_stream_string get_pixel get_plot_option get_tex_environment get_tex_environment_default get_vertex_label gfactor gfactorsum ggf girth global_variances gn gnuplot_close gnuplot_replot gnuplot_reset gnuplot_restart gnuplot_start go Gosper GosperSum gr2d gr3d gradef gramschmidt graph6_decode graph6_encode graph6_export graph6_import graph_center graph_charpoly graph_eigenvalues graph_flow graph_order graph_periphery graph_product graph_size graph_union great_rhombicosidodecahedron_graph great_rhombicuboctahedron_graph grid_graph grind grobner_basis grotzch_graph hamilton_cycle hamilton_path hankel hankel_1 hankel_2 harmonic harmonic_mean hav heawood_graph hermite hessian hgfred hilbertmap hilbert_matrix hipow histogram histogram_description hodge horner hypergeometric i0 i1 %ibes ic1 ic2 ic_convert ichr1 ichr2 icosahedron_graph icosidodecahedron_graph icurvature ident identfor identity idiff idim idummy ieqn %if ifactors iframes ifs igcdex igeodesic_coords ilt image imagpart imetric implicit implicit_derivative implicit_plot indexed_tensor indices induced_subgraph inferencep inference_result infix info_display init_atensor init_ctensor in_neighbors innerproduct inpart inprod inrt integerp integer_partitions integrate intersect intersection intervalp intopois intosum invariant1 invariant2 inverse_fft inverse_jacobi_cd inverse_jacobi_cn inverse_jacobi_cs inverse_jacobi_dc inverse_jacobi_dn inverse_jacobi_ds inverse_jacobi_nc inverse_jacobi_nd inverse_jacobi_ns inverse_jacobi_sc inverse_jacobi_sd inverse_jacobi_sn invert invert_by_adjoint invert_by_lu inv_mod irr is is_biconnected is_bipartite is_connected is_digraph is_edge_in_graph is_graph is_graph_or_digraph ishow is_isomorphic isolate isomorphism is_planar isqrt isreal_p is_sconnected is_tree is_vertex_in_graph items_inference %j j0 j1 jacobi jacobian jacobi_cd jacobi_cn jacobi_cs jacobi_dc jacobi_dn jacobi_ds jacobi_nc jacobi_nd jacobi_ns jacobi_p jacobi_sc jacobi_sd jacobi_sn JF jn join jordan julia julia_set julia_sin %k kdels kdelta kill killcontext kostka kron_delta kronecker_product kummer_m kummer_u kurtosis kurtosis_bernoulli kurtosis_beta kurtosis_binomial kurtosis_chi2 kurtosis_continuous_uniform kurtosis_discrete_uniform kurtosis_exp kurtosis_f kurtosis_gamma kurtosis_general_finite_discrete kurtosis_geometric kurtosis_gumbel kurtosis_hypergeometric kurtosis_laplace kurtosis_logistic kurtosis_lognormal kurtosis_negative_binomial kurtosis_noncentral_chi2 kurtosis_noncentral_student_t kurtosis_normal kurtosis_pareto kurtosis_poisson kurtosis_rayleigh kurtosis_student_t kurtosis_weibull label labels lagrange laguerre lambda lambert_w laplace laplacian_matrix last lbfgs lc2kdt lcharp lc_l lcm lc_u ldefint ldisp ldisplay legendre_p legendre_q leinstein length let letrules letsimp levi_civita lfreeof lgtreillis lhs li liediff limit Lindstedt linear linearinterpol linear_program linear_regression line_graph linsolve listarray list_correlations listify list_matrix_entries list_nc_monomials listoftens listofvars listp lmax lmin load loadfile local locate_matrix_entry log logcontract log_gamma lopow lorentz_gauge lowercasep lpart lratsubst lreduce lriemann lsquares_estimates lsquares_estimates_approximate lsquares_estimates_exact lsquares_mse lsquares_residual_mse lsquares_residuals lsum ltreillis lu_backsub lucas lu_factor %m macroexpand macroexpand1 make_array makebox makefact makegamma make_graph make_level_picture makelist makeOrders make_poly_continent make_poly_country make_polygon make_random_state make_rgb_picture makeset make_string_input_stream make_string_output_stream make_transform mandelbrot mandelbrot_set map mapatom maplist matchdeclare matchfix mat_cond mat_fullunblocker mat_function mathml_display mat_norm matrix matrixmap matrixp matrix_size mattrace mat_trace mat_unblocker max max_clique max_degree max_flow maximize_lp max_independent_set max_matching maybe md5sum mean mean_bernoulli mean_beta mean_binomial mean_chi2 mean_continuous_uniform mean_deviation mean_discrete_uniform mean_exp mean_f mean_gamma mean_general_finite_discrete mean_geometric mean_gumbel mean_hypergeometric mean_laplace mean_logistic mean_lognormal mean_negative_binomial mean_noncentral_chi2 mean_noncentral_student_t mean_normal mean_pareto mean_poisson mean_rayleigh mean_student_t mean_weibull median median_deviation member mesh metricexpandall mgf1_sha1 min min_degree min_edge_cut minfactorial minimalPoly minimize_lp minimum_spanning_tree minor minpack_lsquares minpack_solve min_vertex_cover min_vertex_cut mkdir mnewton mod mode_declare mode_identity ModeMatrix moebius mon2schur mono monomial_dimensions multibernstein_poly multi_display_for_texinfo multi_elem multinomial multinomial_coeff multi_orbit multiplot_mode multi_pui multsym multthru mycielski_graph nary natural_unit nc_degree ncexpt ncharpoly negative_picture neighbors new newcontext newdet new_graph newline newton new_variable next_prime nicedummies niceindices ninth nofix nonarray noncentral_moment nonmetricity nonnegintegerp nonscalarp nonzeroandfreeof notequal nounify nptetrad npv nroots nterms ntermst nthroot nullity nullspace num numbered_boundaries numberp number_to_octets num_distinct_partitions numerval numfactor num_partitions nusum nzeta nzetai nzetar octets_to_number octets_to_oid odd_girth oddp ode2 ode_check odelin oid_to_octets op opena opena_binary openr openr_binary openw openw_binary operatorp opsubst optimize %or orbit orbits ordergreat ordergreatp orderless orderlessp orthogonal_complement orthopoly_recur orthopoly_weight outermap out_neighbors outofpois pade parabolic_cylinder_d parametric parametric_surface parg parGosper parse_string parse_timedate part part2cont partfrac partition partition_set partpol path_digraph path_graph pathname_directory pathname_name pathname_type pdf_bernoulli pdf_beta pdf_binomial pdf_cauchy pdf_chi2 pdf_continuous_uniform pdf_discrete_uniform pdf_exp pdf_f pdf_gamma pdf_general_finite_discrete pdf_geometric pdf_gumbel pdf_hypergeometric pdf_laplace pdf_logistic pdf_lognormal pdf_negative_binomial pdf_noncentral_chi2 pdf_noncentral_student_t pdf_normal pdf_pareto pdf_poisson pdf_rank_sum pdf_rayleigh pdf_signed_rank pdf_student_t pdf_weibull pearson_skewness permanent permut permutation permutations petersen_graph petrov pickapart picture_equalp picturep piechart piechart_description planar_embedding playback plog plot2d plot3d plotdf ploteq plsquares pochhammer points poisdiff poisexpt poisint poismap poisplus poissimp poissubst poistimes poistrim polar polarform polartorect polar_to_xy poly_add poly_buchberger poly_buchberger_criterion poly_colon_ideal poly_content polydecomp poly_depends_p poly_elimination_ideal poly_exact_divide poly_expand poly_expt poly_gcd polygon poly_grobner poly_grobner_equal poly_grobner_member poly_grobner_subsetp poly_ideal_intersection poly_ideal_polysaturation poly_ideal_polysaturation1 poly_ideal_saturation poly_ideal_saturation1 poly_lcm poly_minimization polymod poly_multiply polynome2ele polynomialp poly_normal_form poly_normalize poly_normalize_list poly_polysaturation_extension poly_primitive_part poly_pseudo_divide poly_reduced_grobner poly_reduction poly_saturation_extension poly_s_polynomial poly_subtract polytocompanion pop postfix potential power_mod powerseries powerset prefix prev_prime primep primes principal_components print printf printfile print_graph printpois printprops prodrac product properties propvars psi psubst ptriangularize pui pui2comp pui2ele pui2polynome pui_direct puireduc push put pv qput qrange qty quad_control quad_qag quad_qagi quad_qagp quad_qags quad_qawc quad_qawf quad_qawo quad_qaws quadrilateral quantile quantile_bernoulli quantile_beta quantile_binomial quantile_cauchy quantile_chi2 quantile_continuous_uniform quantile_discrete_uniform quantile_exp quantile_f quantile_gamma quantile_general_finite_discrete quantile_geometric quantile_gumbel quantile_hypergeometric quantile_laplace quantile_logistic quantile_lognormal quantile_negative_binomial quantile_noncentral_chi2 quantile_noncentral_student_t quantile_normal quantile_pareto quantile_poisson quantile_rayleigh quantile_student_t quantile_weibull quartile_skewness quit qunit quotient racah_v racah_w radcan radius random random_bernoulli random_beta random_binomial random_bipartite_graph random_cauchy random_chi2 random_continuous_uniform random_digraph random_discrete_uniform random_exp random_f random_gamma random_general_finite_discrete random_geometric random_graph random_graph1 random_gumbel random_hypergeometric random_laplace random_logistic random_lognormal random_negative_binomial random_network random_noncentral_chi2 random_noncentral_student_t random_normal random_pareto random_permutation random_poisson random_rayleigh random_regular_graph random_student_t random_tournament random_tree random_weibull range rank rat ratcoef ratdenom ratdiff ratdisrep ratexpand ratinterpol rational rationalize ratnumer ratnump ratp ratsimp ratsubst ratvars ratweight read read_array read_binary_array read_binary_list read_binary_matrix readbyte readchar read_hashed_array readline read_list read_matrix read_nested_list readonly read_xpm real_imagpart_to_conjugate realpart realroots rearray rectangle rectform rectform_log_if_constant recttopolar rediff reduce_consts reduce_order region region_boundaries region_boundaries_plus rem remainder remarray rembox remcomps remcon remcoord remfun remfunction remlet remove remove_constvalue remove_dimensions remove_edge remove_fundamental_dimensions remove_fundamental_units remove_plot_option remove_vertex rempart remrule remsym remvalue rename rename_file reset reset_displays residue resolvante resolvante_alternee1 resolvante_bipartite resolvante_diedrale resolvante_klein resolvante_klein3 resolvante_produit_sym resolvante_unitaire resolvante_vierer rest resultant return reveal reverse revert revert2 rgb2level rhs ricci riemann rinvariant risch rk rmdir rncombine romberg room rootscontract round row rowop rowswap rreduce run_testsuite %s save saving scalarp scaled_bessel_i scaled_bessel_i0 scaled_bessel_i1 scalefactors scanmap scatterplot scatterplot_description scene schur2comp sconcat scopy scsimp scurvature sdowncase sec sech second sequal sequalignore set_alt_display setdifference set_draw_defaults set_edge_weight setelmx setequalp setify setp set_partitions set_plot_option set_prompt set_random_state set_tex_environment set_tex_environment_default setunits setup_autoload set_up_dot_simplifications set_vertex_label seventh sexplode sf sha1sum sha256sum shortest_path shortest_weighted_path show showcomps showratvars sierpinskiale sierpinskimap sign signum similaritytransform simp_inequality simplify_sum simplode simpmetderiv simtran sin sinh sinsert sinvertcase sixth skewness skewness_bernoulli skewness_beta skewness_binomial skewness_chi2 skewness_continuous_uniform skewness_discrete_uniform skewness_exp skewness_f skewness_gamma skewness_general_finite_discrete skewness_geometric skewness_gumbel skewness_hypergeometric skewness_laplace skewness_logistic skewness_lognormal skewness_negative_binomial skewness_noncentral_chi2 skewness_noncentral_student_t skewness_normal skewness_pareto skewness_poisson skewness_rayleigh skewness_student_t skewness_weibull slength smake small_rhombicosidodecahedron_graph small_rhombicuboctahedron_graph smax smin smismatch snowmap snub_cube_graph snub_dodecahedron_graph solve solve_rec solve_rec_rat some somrac sort sparse6_decode sparse6_encode sparse6_export sparse6_import specint spherical spherical_bessel_j spherical_bessel_y spherical_hankel1 spherical_hankel2 spherical_harmonic spherical_to_xyz splice split sposition sprint sqfr sqrt sqrtdenest sremove sremovefirst sreverse ssearch ssort sstatus ssubst ssubstfirst staircase standardize standardize_inverse_trig starplot starplot_description status std std1 std_bernoulli std_beta std_binomial std_chi2 std_continuous_uniform std_discrete_uniform std_exp std_f std_gamma std_general_finite_discrete std_geometric std_gumbel std_hypergeometric std_laplace std_logistic std_lognormal std_negative_binomial std_noncentral_chi2 std_noncentral_student_t std_normal std_pareto std_poisson std_rayleigh std_student_t std_weibull stemplot stirling stirling1 stirling2 strim striml strimr string stringout stringp strong_components struve_h struve_l sublis sublist sublist_indices submatrix subsample subset subsetp subst substinpart subst_parallel substpart substring subvar subvarp sum sumcontract summand_to_rec supcase supcontext symbolp symmdifference symmetricp system take_channel take_inference tan tanh taylor taylorinfo taylorp taylor_simplifier taytorat tcl_output tcontract tellrat tellsimp tellsimpafter tentex tenth test_mean test_means_difference test_normality test_proportion test_proportions_difference test_rank_sum test_sign test_signed_rank test_variance test_variance_ratio tex tex1 tex_display texput %th third throw time timedate timer timer_info tldefint tlimit todd_coxeter toeplitz tokens to_lisp topological_sort to_poly to_poly_solve totaldisrep totalfourier totient tpartpol trace tracematrix trace_options transform_sample translate translate_file transpose treefale tree_reduce treillis treinat triangle triangularize trigexpand trigrat trigreduce trigsimp trunc truncate truncated_cube_graph truncated_dodecahedron_graph truncated_icosahedron_graph truncated_tetrahedron_graph tr_warnings_get tube tutte_graph ueivects uforget ultraspherical underlying_graph undiff union unique uniteigenvectors unitp units unit_step unitvector unorder unsum untellrat untimer untrace uppercasep uricci uriemann uvect vandermonde_matrix var var1 var_bernoulli var_beta var_binomial var_chi2 var_continuous_uniform var_discrete_uniform var_exp var_f var_gamma var_general_finite_discrete var_geometric var_gumbel var_hypergeometric var_laplace var_logistic var_lognormal var_negative_binomial var_noncentral_chi2 var_noncentral_student_t var_normal var_pareto var_poisson var_rayleigh var_student_t var_weibull vector vectorpotential vectorsimp verbify vers vertex_coloring vertex_connectivity vertex_degree vertex_distance vertex_eccentricity vertex_in_degree vertex_out_degree vertices vertices_to_cycle vertices_to_path %w weyl wheel_graph wiener_index wigner_3j wigner_6j wigner_9j with_stdout write_binary_data writebyte write_data writefile wronskian xreduce xthru %y Zeilberger zeroequiv zerofor zeromatrix zeromatrixp zeta zgeev zheev zlange zn_add_table zn_carmichael_lambda zn_characteristic_factors zn_determinant zn_factor_generators zn_invert_by_lu zn_log zn_mult_table absboxchar activecontexts adapt_depth additive adim aform algebraic algepsilon algexact aliases allbut all_dotsimp_denoms allocation allsym alphabetic animation antisymmetric arrays askexp assume_pos assume_pos_pred assumescalar asymbol atomgrad atrig1 axes axis_3d axis_bottom axis_left axis_right axis_top azimuth background background_color backsubst berlefact bernstein_explicit besselexpand beta_args_sum_to_integer beta_expand bftorat bftrunc bindtest border boundaries_array box boxchar breakup %c capping cauchysum cbrange cbtics center cflength cframe_flag cnonmet_flag color color_bar color_bar_tics colorbox columns commutative complex cone context contexts contour contour_levels cosnpiflag ctaypov ctaypt ctayswitch ctayvar ct_coords ctorsion_flag ctrgsimp cube current_let_rule_package cylinder data_file_name debugmode decreasing default_let_rule_package delay dependencies derivabbrev derivsubst detout diagmetric diff dim dimensions dispflag display2d|10 display_format_internal distribute_over doallmxops domain domxexpt domxmxops domxnctimes dontfactor doscmxops doscmxplus dot0nscsimp dot0simp dot1simp dotassoc dotconstrules dotdistrib dotexptsimp dotident dotscrules draw_graph_program draw_realpart edge_color edge_coloring edge_partition edge_type edge_width %edispflag elevation %emode endphi endtheta engineering_format_floats enhanced3d %enumer epsilon_lp erfflag erf_representation errormsg error_size error_syms error_type %e_to_numlog eval even evenfun evflag evfun ev_point expandwrt_denom expintexpand expintrep expon expop exptdispflag exptisolate exptsubst facexpand facsum_combine factlim factorflag factorial_expand factors_only fb feature features file_name file_output_append file_search_demo file_search_lisp file_search_maxima|10 file_search_tests file_search_usage file_type_lisp file_type_maxima|10 fill_color fill_density filled_func fixed_vertices flipflag float2bf font font_size fortindent fortspaces fpprec fpprintprec functions gamma_expand gammalim gdet genindex gensumnum GGFCFMAX GGFINFINITY globalsolve gnuplot_command gnuplot_curve_styles gnuplot_curve_titles gnuplot_default_term_command gnuplot_dumb_term_command gnuplot_file_args gnuplot_file_name gnuplot_out_file gnuplot_pdf_term_command gnuplot_pm3d gnuplot_png_term_command gnuplot_postamble gnuplot_preamble gnuplot_ps_term_command gnuplot_svg_term_command gnuplot_term gnuplot_view_args Gosper_in_Zeilberger gradefs grid grid2d grind halfangles head_angle head_both head_length head_type height hypergeometric_representation %iargs ibase icc1 icc2 icounter idummyx ieqnprint ifb ifc1 ifc2 ifg ifgi ifr iframe_bracket_form ifri igeowedge_flag ikt1 ikt2 imaginary inchar increasing infeval infinity inflag infolists inm inmc1 inmc2 intanalysis integer integervalued integrate_use_rootsof integration_constant integration_constant_counter interpolate_color intfaclim ip_grid ip_grid_in irrational isolate_wrt_times iterations itr julia_parameter %k1 %k2 keepfloat key key_pos kinvariant kt label label_alignment label_orientation labels lassociative lbfgs_ncorrections lbfgs_nfeval_max leftjust legend letrat let_rule_packages lfg lg lhospitallim limsubst linear linear_solver linechar linel|10 linenum line_type linewidth line_width linsolve_params linsolvewarn lispdisp listarith listconstvars listdummyvars lmxchar load_pathname loadprint logabs logarc logcb logconcoeffp logexpand lognegint logsimp logx logx_secondary logy logy_secondary logz lriem m1pbranch macroexpansion macros mainvar manual_demo maperror mapprint matrix_element_add matrix_element_mult matrix_element_transpose maxapplydepth maxapplyheight maxima_tempdir|10 maxima_userdir|10 maxnegex MAX_ORD maxposex maxpsifracdenom maxpsifracnum maxpsinegint maxpsiposint maxtayorder mesh_lines_color method mod_big_prime mode_check_errorp mode_checkp mode_check_warnp mod_test mod_threshold modular_linear_solver modulus multiplicative multiplicities myoptions nary negdistrib negsumdispflag newline newtonepsilon newtonmaxiter nextlayerfactor niceindicespref nm nmc noeval nolabels nonegative_lp noninteger nonscalar noun noundisp nouns np npi nticks ntrig numer numer_pbranch obase odd oddfun opacity opproperties opsubst optimprefix optionset orientation origin orthopoly_returns_intervals outative outchar packagefile palette partswitch pdf_file pfeformat phiresolution %piargs piece pivot_count_sx pivot_max_sx plot_format plot_options plot_realpart png_file pochhammer_max_index points pointsize point_size points_joined point_type poislim poisson poly_coefficient_ring poly_elimination_order polyfactor poly_grobner_algorithm poly_grobner_debug poly_monomial_order poly_primary_elimination_order poly_return_term_list poly_secondary_elimination_order poly_top_reduction_only posfun position powerdisp pred prederror primep_number_of_tests product_use_gamma program programmode promote_float_to_bigfloat prompt proportional_axes props psexpand ps_file radexpand radius radsubstflag rassociative ratalgdenom ratchristof ratdenomdivide rateinstein ratepsilon ratfac rational ratmx ratprint ratriemann ratsimpexpons ratvarswitch ratweights ratweyl ratwtlvl real realonly redraw refcheck resolution restart resultant ric riem rmxchar %rnum_list rombergabs rombergit rombergmin rombergtol rootsconmode rootsepsilon run_viewer same_xy same_xyz savedef savefactors scalar scalarmatrixp scale scale_lp setcheck setcheckbreak setval show_edge_color show_edges show_edge_type show_edge_width show_id show_label showtime show_vertex_color show_vertex_size show_vertex_type show_vertices show_weight simp simplified_output simplify_products simpproduct simpsum sinnpiflag solvedecomposes solveexplicit solvefactors solvenullwarn solveradcan solvetrigwarn space sparse sphere spring_embedding_depth sqrtdispflag stardisp startphi starttheta stats_numer stringdisp structures style sublis_apply_lambda subnumsimp sumexpand sumsplitfact surface surface_hide svg_file symmetric tab taylordepth taylor_logexpand taylor_order_coefficients taylor_truncate_polynomials tensorkill terminal testsuite_files thetaresolution timer_devalue title tlimswitch tr track transcompile transform transform_xy translate_fast_arrays transparent transrun tr_array_as_ref tr_bound_function_applyp tr_file_tty_messagesp tr_float_can_branch_complex tr_function_call_default trigexpandplus trigexpandtimes triginverses trigsign trivial_solutions tr_numer tr_optimize_max_loop tr_semicompile tr_state_vars tr_warn_bad_function_calls tr_warn_fexpr tr_warn_meval tr_warn_mode tr_warn_undeclared tr_warn_undefined_variable tstep ttyoff tube_extremes ufg ug %unitexpand unit_vectors uric uriem use_fast_arrays user_preamble usersetunits values vect_cross verbose vertex_color vertex_coloring vertex_partition vertex_size vertex_type view warnings weyl width windowname windowtitle wired_surface wireframe xaxis xaxis_color xaxis_secondary xaxis_type xaxis_width xlabel xlabel_secondary xlength xrange xrange_secondary xtics xtics_axis xtics_rotate xtics_rotate_secondary xtics_secondary xtics_secondary_axis xu_grid x_voxel xy_file xyplane xy_scale yaxis yaxis_color yaxis_secondary yaxis_type yaxis_width ylabel ylabel_secondary ylength yrange yrange_secondary ytics ytics_axis ytics_rotate ytics_rotate_secondary ytics_secondary ytics_secondary_axis yv_grid y_voxel yx_ratio zaxis zaxis_color zaxis_type zaxis_width zeroa zerob zerobern zeta%pi zlabel zlabel_rotate zlength zmin zn_primroot_limit zn_primroot_pretest",r="_ __ %|0 %%|0";return{lexemes:"[A-Za-z_%][0-9A-Za-z_%]*",keywords:{keyword:t,literal:n,built_in:i,symbol:r},contains:[{className:"comment",begin:"/\\*",end:"\\*/",contains:["self"]},e.QUOTE_STRING_MODE,{className:"number",relevance:0,variants:[{begin:"\\b(\\d+|\\d+\\.|\\.\\d+|\\d+\\.\\d+)[Ee][-+]?\\d+\\b"},{begin:"\\b(\\d+|\\d+\\.|\\.\\d+|\\d+\\.\\d+)[Bb][-+]?\\d+\\b",relevance:10},{begin:"\\b(\\.\\d+|\\d+\\.\\d+)\\b"},{begin:"\\b(\\d+|0[0-9A-Za-z]+)\\.?\\b"}]}],illegal:/@/}}}),define("highlight/lib/languages/mel",["require","exports","module"],function(e,t,n){n.exports=function(e){return{keywords:"int float string vector matrix if else switch case default while do for in break continue global proc return about abs addAttr addAttributeEditorNodeHelp addDynamic addNewShelfTab addPP addPanelCategory addPrefixToName advanceToNextDrivenKey affectedNet affects aimConstraint air alias aliasAttr align alignCtx alignCurve alignSurface allViewFit ambientLight angle angleBetween animCone animCurveEditor animDisplay animView annotate appendStringArray applicationName applyAttrPreset applyTake arcLenDimContext arcLengthDimension arclen arrayMapper art3dPaintCtx artAttrCtx artAttrPaintVertexCtx artAttrSkinPaintCtx artAttrTool artBuildPaintMenu artFluidAttrCtx artPuttyCtx artSelectCtx artSetPaintCtx artUserPaintCtx assignCommand assignInputDevice assignViewportFactories attachCurve attachDeviceAttr attachSurface attrColorSliderGrp attrCompatibility attrControlGrp attrEnumOptionMenu attrEnumOptionMenuGrp attrFieldGrp attrFieldSliderGrp attrNavigationControlGrp attrPresetEditWin attributeExists attributeInfo attributeMenu attributeQuery autoKeyframe autoPlace bakeClip bakeFluidShading bakePartialHistory bakeResults bakeSimulation basename basenameEx batchRender bessel bevel bevelPlus binMembership bindSkin blend2 blendShape blendShapeEditor blendShapePanel blendTwoAttr blindDataType boneLattice boundary boxDollyCtx boxZoomCtx bufferCurve buildBookmarkMenu buildKeyframeMenu button buttonManip CBG cacheFile cacheFileCombine cacheFileMerge cacheFileTrack camera cameraView canCreateManip canvas capitalizeString catch catchQuiet ceil changeSubdivComponentDisplayLevel changeSubdivRegion channelBox character characterMap characterOutlineEditor characterize chdir checkBox checkBoxGrp checkDefaultRenderGlobals choice circle circularFillet clamp clear clearCache clip clipEditor clipEditorCurrentTimeCtx clipSchedule clipSchedulerOutliner clipTrimBefore closeCurve closeSurface cluster cmdFileOutput cmdScrollFieldExecuter cmdScrollFieldReporter cmdShell coarsenSubdivSelectionList collision color colorAtPoint colorEditor colorIndex colorIndexSliderGrp colorSliderButtonGrp colorSliderGrp columnLayout commandEcho commandLine commandPort compactHairSystem componentEditor compositingInterop computePolysetVolume condition cone confirmDialog connectAttr connectControl connectDynamic connectJoint connectionInfo constrain constrainValue constructionHistory container containsMultibyte contextInfo control convertFromOldLayers convertIffToPsd convertLightmap convertSolidTx convertTessellation convertUnit copyArray copyFlexor copyKey copySkinWeights cos cpButton cpCache cpClothSet cpCollision cpConstraint cpConvClothToMesh cpForces cpGetSolverAttr cpPanel cpProperty cpRigidCollisionFilter cpSeam cpSetEdit cpSetSolverAttr cpSolver cpSolverTypes cpTool cpUpdateClothUVs createDisplayLayer createDrawCtx createEditor createLayeredPsdFile createMotionField createNewShelf createNode createRenderLayer createSubdivRegion cross crossProduct ctxAbort ctxCompletion ctxEditMode ctxTraverse currentCtx currentTime currentTimeCtx currentUnit curve curveAddPtCtx curveCVCtx curveEPCtx curveEditorCtx curveIntersect curveMoveEPCtx curveOnSurface curveSketchCtx cutKey cycleCheck cylinder dagPose date defaultLightListCheckBox defaultNavigation defineDataServer defineVirtualDevice deformer deg_to_rad delete deleteAttr deleteShadingGroupsAndMaterials deleteShelfTab deleteUI deleteUnusedBrushes delrandstr detachCurve detachDeviceAttr detachSurface deviceEditor devicePanel dgInfo dgdirty dgeval dgtimer dimWhen directKeyCtx directionalLight dirmap dirname disable disconnectAttr disconnectJoint diskCache displacementToPoly displayAffected displayColor displayCull displayLevelOfDetail displayPref displayRGBColor displaySmoothness displayStats displayString displaySurface distanceDimContext distanceDimension doBlur dolly dollyCtx dopeSheetEditor dot dotProduct doubleProfileBirailSurface drag dragAttrContext draggerContext dropoffLocator duplicate duplicateCurve duplicateSurface dynCache dynControl dynExport dynExpression dynGlobals dynPaintEditor dynParticleCtx dynPref dynRelEdPanel dynRelEditor dynamicLoad editAttrLimits editDisplayLayerGlobals editDisplayLayerMembers editRenderLayerAdjustment editRenderLayerGlobals editRenderLayerMembers editor editorTemplate effector emit emitter enableDevice encodeString endString endsWith env equivalent equivalentTol erf error eval evalDeferred evalEcho event exactWorldBoundingBox exclusiveLightCheckBox exec executeForEachObject exists exp expression expressionEditorListen extendCurve extendSurface extrude fcheck fclose feof fflush fgetline fgetword file fileBrowserDialog fileDialog fileExtension fileInfo filetest filletCurve filter filterCurve filterExpand filterStudioImport findAllIntersections findAnimCurves findKeyframe findMenuItem findRelatedSkinCluster finder firstParentOf fitBspline flexor floatEq floatField floatFieldGrp floatScrollBar floatSlider floatSlider2 floatSliderButtonGrp floatSliderGrp floor flow fluidCacheInfo fluidEmitter fluidVoxelInfo flushUndo fmod fontDialog fopen formLayout format fprint frameLayout fread freeFormFillet frewind fromNativePath fwrite gamma gauss geometryConstraint getApplicationVersionAsFloat getAttr getClassification getDefaultBrush getFileList getFluidAttr getInputDeviceRange getMayaPanelTypes getModifiers getPanel getParticleAttr getPluginResource getenv getpid glRender glRenderEditor globalStitch gmatch goal gotoBindPose grabColor gradientControl gradientControlNoAttr graphDollyCtx graphSelectContext graphTrackCtx gravity grid gridLayout group groupObjectsByName HfAddAttractorToAS HfAssignAS HfBuildEqualMap HfBuildFurFiles HfBuildFurImages HfCancelAFR HfConnectASToHF HfCreateAttractor HfDeleteAS HfEditAS HfPerformCreateAS HfRemoveAttractorFromAS HfSelectAttached HfSelectAttractors HfUnAssignAS hardenPointCurve hardware hardwareRenderPanel headsUpDisplay headsUpMessage help helpLine hermite hide hilite hitTest hotBox hotkey hotkeyCheck hsv_to_rgb hudButton hudSlider hudSliderButton hwReflectionMap hwRender hwRenderLoad hyperGraph hyperPanel hyperShade hypot iconTextButton iconTextCheckBox iconTextRadioButton iconTextRadioCollection iconTextScrollList iconTextStaticLabel ikHandle ikHandleCtx ikHandleDisplayScale ikSolver ikSplineHandleCtx ikSystem ikSystemInfo ikfkDisplayMethod illustratorCurves image imfPlugins inheritTransform insertJoint insertJointCtx insertKeyCtx insertKnotCurve insertKnotSurface instance instanceable instancer intField intFieldGrp intScrollBar intSlider intSliderGrp interToUI internalVar intersect iprEngine isAnimCurve isConnected isDirty isParentOf isSameObject isTrue isValidObjectName isValidString isValidUiName isolateSelect itemFilter itemFilterAttr itemFilterRender itemFilterType joint jointCluster jointCtx jointDisplayScale jointLattice keyTangent keyframe keyframeOutliner keyframeRegionCurrentTimeCtx keyframeRegionDirectKeyCtx keyframeRegionDollyCtx keyframeRegionInsertKeyCtx keyframeRegionMoveKeyCtx keyframeRegionScaleKeyCtx keyframeRegionSelectKeyCtx keyframeRegionSetKeyCtx keyframeRegionTrackCtx keyframeStats lassoContext lattice latticeDeformKeyCtx launch launchImageEditor layerButton layeredShaderPort layeredTexturePort layout layoutDialog lightList lightListEditor lightListPanel lightlink lineIntersection linearPrecision linstep listAnimatable listAttr listCameras listConnections listDeviceAttachments listHistory listInputDeviceAxes listInputDeviceButtons listInputDevices listMenuAnnotation listNodeTypes listPanelCategories listRelatives listSets listTransforms listUnselected listerEditor loadFluid loadNewShelf loadPlugin loadPluginLanguageResources loadPrefObjects localizedPanelLabel lockNode loft log longNameOf lookThru ls lsThroughFilter lsType lsUI Mayatomr mag makeIdentity makeLive makePaintable makeRoll makeSingleSurface makeTubeOn makebot manipMoveContext manipMoveLimitsCtx manipOptions manipRotateContext manipRotateLimitsCtx manipScaleContext manipScaleLimitsCtx marker match max memory menu menuBarLayout menuEditor menuItem menuItemToShelf menuSet menuSetPref messageLine min minimizeApp mirrorJoint modelCurrentTimeCtx modelEditor modelPanel mouse movIn movOut move moveIKtoFK moveKeyCtx moveVertexAlongDirection multiProfileBirailSurface mute nParticle nameCommand nameField namespace namespaceInfo newPanelItems newton nodeCast nodeIconButton nodeOutliner nodePreset nodeType noise nonLinear normalConstraint normalize nurbsBoolean nurbsCopyUVSet nurbsCube nurbsEditUV nurbsPlane nurbsSelect nurbsSquare nurbsToPoly nurbsToPolygonsPref nurbsToSubdiv nurbsToSubdivPref nurbsUVSet nurbsViewDirectionVector objExists objectCenter objectLayer objectType objectTypeUI obsoleteProc oceanNurbsPreviewPlane offsetCurve offsetCurveOnSurface offsetSurface openGLExtension openMayaPref optionMenu optionMenuGrp optionVar orbit orbitCtx orientConstraint outlinerEditor outlinerPanel overrideModifier paintEffectsDisplay pairBlend palettePort paneLayout panel panelConfiguration panelHistory paramDimContext paramDimension paramLocator parent parentConstraint particle particleExists particleInstancer particleRenderInfo partition pasteKey pathAnimation pause pclose percent performanceOptions pfxstrokes pickWalk picture pixelMove planarSrf plane play playbackOptions playblast plugAttr plugNode pluginInfo pluginResourceUtil pointConstraint pointCurveConstraint pointLight pointMatrixMult pointOnCurve pointOnSurface pointPosition poleVectorConstraint polyAppend polyAppendFacetCtx polyAppendVertex polyAutoProjection polyAverageNormal polyAverageVertex polyBevel polyBlendColor polyBlindData polyBoolOp polyBridgeEdge polyCacheMonitor polyCheck polyChipOff polyClipboard polyCloseBorder polyCollapseEdge polyCollapseFacet polyColorBlindData polyColorDel polyColorPerVertex polyColorSet polyCompare polyCone polyCopyUV polyCrease polyCreaseCtx polyCreateFacet polyCreateFacetCtx polyCube polyCut polyCutCtx polyCylinder polyCylindricalProjection polyDelEdge polyDelFacet polyDelVertex polyDuplicateAndConnect polyDuplicateEdge polyEditUV polyEditUVShell polyEvaluate polyExtrudeEdge polyExtrudeFacet polyExtrudeVertex polyFlipEdge polyFlipUV polyForceUV polyGeoSampler polyHelix polyInfo polyInstallAction polyLayoutUV polyListComponentConversion polyMapCut polyMapDel polyMapSew polyMapSewMove polyMergeEdge polyMergeEdgeCtx polyMergeFacet polyMergeFacetCtx polyMergeUV polyMergeVertex polyMirrorFace polyMoveEdge polyMoveFacet polyMoveFacetUV polyMoveUV polyMoveVertex polyNormal polyNormalPerVertex polyNormalizeUV polyOptUvs polyOptions polyOutput polyPipe polyPlanarProjection polyPlane polyPlatonicSolid polyPoke polyPrimitive polyPrism polyProjection polyPyramid polyQuad polyQueryBlindData polyReduce polySelect polySelectConstraint polySelectConstraintMonitor polySelectCtx polySelectEditCtx polySeparate polySetToFaceNormal polySewEdge polyShortestPathCtx polySmooth polySoftEdge polySphere polySphericalProjection polySplit polySplitCtx polySplitEdge polySplitRing polySplitVertex polyStraightenUVBorder polySubdivideEdge polySubdivideFacet polyToSubdiv polyTorus polyTransfer polyTriangulate polyUVSet polyUnite polyWedgeFace popen popupMenu pose pow preloadRefEd print progressBar progressWindow projFileViewer projectCurve projectTangent projectionContext projectionManip promptDialog propModCtx propMove psdChannelOutliner psdEditTextureFile psdExport psdTextureFile putenv pwd python querySubdiv quit rad_to_deg radial radioButton radioButtonGrp radioCollection radioMenuItemCollection rampColorPort rand randomizeFollicles randstate rangeControl readTake rebuildCurve rebuildSurface recordAttr recordDevice redo reference referenceEdit referenceQuery refineSubdivSelectionList refresh refreshAE registerPluginResource rehash reloadImage removeJoint removeMultiInstance removePanelCategory rename renameAttr renameSelectionList renameUI render renderGlobalsNode renderInfo renderLayerButton renderLayerParent renderLayerPostProcess renderLayerUnparent renderManip renderPartition renderQualityNode renderSettings renderThumbnailUpdate renderWindowEditor renderWindowSelectContext renderer reorder reorderDeformers requires reroot resampleFluid resetAE resetPfxToPolyCamera resetTool resolutionNode retarget reverseCurve reverseSurface revolve rgb_to_hsv rigidBody rigidSolver roll rollCtx rootOf rot rotate rotationInterpolation roundConstantRadius rowColumnLayout rowLayout runTimeCommand runup sampleImage saveAllShelves saveAttrPreset saveFluid saveImage saveInitialState saveMenu savePrefObjects savePrefs saveShelf saveToolSettings scale scaleBrushBrightness scaleComponents scaleConstraint scaleKey scaleKeyCtx sceneEditor sceneUIReplacement scmh scriptCtx scriptEditorInfo scriptJob scriptNode scriptTable scriptToShelf scriptedPanel scriptedPanelType scrollField scrollLayout sculpt searchPathArray seed selLoadSettings select selectContext selectCurveCV selectKey selectKeyCtx selectKeyframeRegionCtx selectMode selectPref selectPriority selectType selectedNodes selectionConnection separator setAttr setAttrEnumResource setAttrMapping setAttrNiceNameResource setConstraintRestPosition setDefaultShadingGroup setDrivenKeyframe setDynamic setEditCtx setEditor setFluidAttr setFocus setInfinity setInputDeviceMapping setKeyCtx setKeyPath setKeyframe setKeyframeBlendshapeTargetWts setMenuMode setNodeNiceNameResource setNodeTypeFlag setParent setParticleAttr setPfxToPolyCamera setPluginResource setProject setStampDensity setStartupMessage setState setToolTo setUITemplate setXformManip sets shadingConnection shadingGeometryRelCtx shadingLightRelCtx shadingNetworkCompare shadingNode shapeCompare shelfButton shelfLayout shelfTabLayout shellField shortNameOf showHelp showHidden showManipCtx showSelectionInTitle showShadingGroupAttrEditor showWindow sign simplify sin singleProfileBirailSurface size sizeBytes skinCluster skinPercent smoothCurve smoothTangentSurface smoothstep snap2to2 snapKey snapMode snapTogetherCtx snapshot soft softMod softModCtx sort sound soundControl source spaceLocator sphere sphrand spotLight spotLightPreviewPort spreadSheetEditor spring sqrt squareSurface srtContext stackTrace startString startsWith stitchAndExplodeShell stitchSurface stitchSurfacePoints strcmp stringArrayCatenate stringArrayContains stringArrayCount stringArrayInsertAtIndex stringArrayIntersector stringArrayRemove stringArrayRemoveAtIndex stringArrayRemoveDuplicates stringArrayRemoveExact stringArrayToString stringToStringArray strip stripPrefixFromName stroke subdAutoProjection subdCleanTopology subdCollapse subdDuplicateAndConnect subdEditUV subdListComponentConversion subdMapCut subdMapSewMove subdMatchTopology subdMirror subdToBlind subdToPoly subdTransferUVsToCache subdiv subdivCrease subdivDisplaySmoothness substitute substituteAllString substituteGeometry substring surface surfaceSampler surfaceShaderList swatchDisplayPort switchTable symbolButton symbolCheckBox sysFile system tabLayout tan tangentConstraint texLatticeDeformContext texManipContext texMoveContext texMoveUVShellContext texRotateContext texScaleContext texSelectContext texSelectShortestPathCtx texSmudgeUVContext texWinToolCtx text textCurves textField textFieldButtonGrp textFieldGrp textManip textScrollList textToShelf textureDisplacePlane textureHairColor texturePlacementContext textureWindow threadCount threePointArcCtx timeControl timePort timerX toNativePath toggle toggleAxis toggleWindowVisibility tokenize tokenizeList tolerance tolower toolButton toolCollection toolDropped toolHasOptions toolPropertyWindow torus toupper trace track trackCtx transferAttributes transformCompare transformLimits translator trim trunc truncateFluidCache truncateHairCache tumble tumbleCtx turbulence twoPointArcCtx uiRes uiTemplate unassignInputDevice undo undoInfo ungroup uniform unit unloadPlugin untangleUV untitledFileName untrim upAxis updateAE userCtx uvLink uvSnapshot validateShelfName vectorize view2dToolCtx viewCamera viewClipPlane viewFit viewHeadOn viewLookAt viewManip viewPlace viewSet visor volumeAxis vortex waitCursor warning webBrowser webBrowserPrefs whatIs window windowPref wire wireContext workspace wrinkle wrinkleContext writeTake xbmLangPathList xform", -illegal:""},{begin:"<=",relevance:0},{begin:"=>",relevance:0},{begin:"/\\\\"},{begin:"\\\\/"}]},l={className:"built_in",variants:[{begin:":-\\|-->"},{begin:"=",relevance:0}]};return{aliases:["m","moo"],keywords:t,contains:[s,l,n,e.C_BLOCK_COMMENT_MODE,i,e.NUMBER_MODE,r,a,{begin:/:-/}]}}}),define("highlight/lib/languages/mipsasm",["require","exports","module"],function(e,t,n){n.exports=function(e){return{case_insensitive:!0,aliases:["mips"],lexemes:"\\.?"+e.IDENT_RE,keywords:{meta:".2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .ltorg ",built_in:"$0 $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 $16 $17 $18 $19 $20 $21 $22 $23 $24 $25 $26 $27 $28 $29 $30 $31 zero at v0 v1 a0 a1 a2 a3 a4 a5 a6 a7 t0 t1 t2 t3 t4 t5 t6 t7 t8 t9 s0 s1 s2 s3 s4 s5 s6 s7 s8 k0 k1 gp sp fp ra $f0 $f1 $f2 $f2 $f4 $f5 $f6 $f7 $f8 $f9 $f10 $f11 $f12 $f13 $f14 $f15 $f16 $f17 $f18 $f19 $f20 $f21 $f22 $f23 $f24 $f25 $f26 $f27 $f28 $f29 $f30 $f31 Context Random EntryLo0 EntryLo1 Context PageMask Wired EntryHi HWREna BadVAddr Count Compare SR IntCtl SRSCtl SRSMap Cause EPC PRId EBase Config Config1 Config2 Config3 LLAddr Debug DEPC DESAVE CacheErr ECC ErrorEPC TagLo DataLo TagHi DataHi WatchLo WatchHi PerfCtl PerfCnt "},contains:[{className:"keyword",begin:"\\b(addi?u?|andi?|b(al)?|beql?|bgez(al)?l?|bgtzl?|blezl?|bltz(al)?l?|bnel?|cl[oz]|divu?|ext|ins|j(al)?|jalr(.hb)?|jr(.hb)?|lbu?|lhu?|ll|lui|lw[lr]?|maddu?|mfhi|mflo|movn|movz|move|msubu?|mthi|mtlo|mul|multu?|nop|nor|ori?|rotrv?|sb|sc|se[bh]|sh|sllv?|slti?u?|srav?|srlv?|subu?|sw[lr]?|xori?|wsbh|abs.[sd]|add.[sd]|alnv.ps|bc1[ft]l?|c.(s?f|un|u?eq|[ou]lt|[ou]le|ngle?|seq|l[et]|ng[et]).[sd]|(ceil|floor|round|trunc).[lw].[sd]|cfc1|cvt.d.[lsw]|cvt.l.[dsw]|cvt.ps.s|cvt.s.[dlw]|cvt.s.p[lu]|cvt.w.[dls]|div.[ds]|ldx?c1|luxc1|lwx?c1|madd.[sd]|mfc1|mov[fntz]?.[ds]|msub.[sd]|mth?c1|mul.[ds]|neg.[ds]|nmadd.[ds]|nmsub.[ds]|p[lu][lu].ps|recip.fmt|r?sqrt.[ds]|sdx?c1|sub.[ds]|suxc1|swx?c1|break|cache|d?eret|[de]i|ehb|mfc0|mtc0|pause|prefx?|rdhwr|rdpgpr|sdbbp|ssnop|synci?|syscall|teqi?|tgei?u?|tlb(p|r|w[ir])|tlti?u?|tnei?|wait|wrpgpr)",end:"\\s"},e.COMMENT("[;#]","$"),e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",relevance:0},{className:"title",begin:"\\|",end:"\\|",illegal:"\\n",relevance:0},{className:"number",variants:[{begin:"0x[0-9a-f]+"},{begin:"\\b-?\\d+"}],relevance:0},{className:"symbol",variants:[{begin:"^\\s*[a-z_\\.\\$][a-z0-9_\\.\\$]+:"},{begin:"^\\s*[0-9]+:"},{begin:"[0-9]+[bf]"}],relevance:0}],illegal:"/"}}}),define("highlight/lib/languages/mizar",["require","exports","module"],function(e,t,n){n.exports=function(e){return{keywords:"environ vocabularies notations constructors definitions registrations theorems schemes requirements begin end definition registration cluster existence pred func defpred deffunc theorem proof let take assume then thus hence ex for st holds consider reconsider such that and in provided of as from be being by means equals implies iff redefine define now not or attr is mode suppose per cases set thesis contradiction scheme reserve struct correctness compatibility coherence symmetry assymetry reflexivity irreflexivity connectedness uniqueness commutativity idempotence involutiveness projectivity",contains:[e.COMMENT("::","$")]}}}),define("highlight/lib/languages/perl",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when",n={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:t},i={begin:"->{",end:"}"},r={variants:[{begin:/\$\d/},{begin:/[\$%@](\^\w\b|#\w+(::\w+)*|{\w+}|\w+(::\w*)*)/},{begin:/[\$%@][^\s\w{]/,relevance:0}]},a=[e.BACKSLASH_ESCAPE,n,r],o=[r,e.HASH_COMMENT_MODE,e.COMMENT("^\\=\\w","\\=cut",{endsWithParent:!0}),i,{className:"string",contains:a,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*\\<",end:"\\>",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:"{\\w+}",contains:[],relevance:0},{begin:"-?\\w+\\s*\\=\\>",contains:[],relevance:0}]},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",begin:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",relevance:10},{className:"regexp",begin:"(m|qr)?/",end:"/[a-z]*",contains:[e.BACKSLASH_ESCAPE],relevance:0}]},{className:"function",beginKeywords:"sub",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return n.contains=o,i.contains=o,{aliases:["pl","pm"],lexemes:/[\w\.]+/,keywords:t,contains:o}}}),define("highlight/lib/languages/mojolicious",["require","exports","module"],function(e,t,n){n.exports=function(e){return{subLanguage:"xml",contains:[{className:"meta",begin:"^__(END|DATA)__$"},{begin:"^\\s*%{1,2}={0,2}",end:"$",subLanguage:"perl"},{begin:"<%{1,2}={0,2}",end:"={0,1}%>",subLanguage:"perl",excludeBegin:!0,excludeEnd:!0}]}}}),define("highlight/lib/languages/monkey",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"number",relevance:0,variants:[{begin:"[$][a-fA-F0-9]+"},e.NUMBER_MODE]};return{case_insensitive:!0,keywords:{keyword:"public private property continue exit extern new try catch eachin not abstract final select case default const local global field end if then else elseif endif while wend repeat until forever for to step next return module inline throw import",built_in:"DebugLog DebugStop Error Print ACos ACosr ASin ASinr ATan ATan2 ATan2r ATanr Abs Abs Ceil Clamp Clamp Cos Cosr Exp Floor Log Max Max Min Min Pow Sgn Sgn Sin Sinr Sqrt Tan Tanr Seed PI HALFPI TWOPI",literal:"true false null and or shl shr mod"},illegal:/\/\*/,contains:[e.COMMENT("#rem","#end"),e.COMMENT("'","$",{relevance:0}),{className:"function",beginKeywords:"function method",end:"[(=:]|$",illegal:/\n/,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"class",beginKeywords:"class interface",end:"$",contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{className:"built_in",begin:"\\b(self|super)\\b"},{className:"meta",begin:"\\s*#",end:"$",keywords:{"meta-keyword":"if else elseif endif end then"}},{className:"meta",begin:"^\\s*strict\\b"},{beginKeywords:"alias",end:"=",contains:[e.UNDERSCORE_TITLE_MODE]},e.QUOTE_STRING_MODE,t]}}}),define("highlight/lib/languages/moonscript",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={keyword:"if then not for in while do return else elseif break continue switch and or unless when class extends super local import export from using",literal:"true false nil",built_in:"_G _VERSION assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall coroutine debug io math os package string table"},n="[A-Za-z$_][0-9A-Za-z$_]*",i={className:"subst",begin:/#\{/,end:/}/,keywords:t},r=[e.inherit(e.C_NUMBER_MODE,{starts:{end:"(\\s*/)?",relevance:0}}),{className:"string",variants:[{begin:/'/,end:/'/,contains:[e.BACKSLASH_ESCAPE]},{begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,i]}]},{className:"built_in",begin:"@__"+e.IDENT_RE},{begin:"@"+e.IDENT_RE},{begin:e.IDENT_RE+"\\\\"+e.IDENT_RE}];i.contains=r;var a=e.inherit(e.TITLE_MODE,{begin:n}),o="(\\(.*\\))?\\s*\\B[-=]>",s={className:"params",begin:"\\([^\\(]",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:t,contains:["self"].concat(r)}]};return{aliases:["moon"],keywords:t,illegal:/\/\*/,contains:r.concat([e.COMMENT("--","$"),{className:"function",begin:"^\\s*"+n+"\\s*=\\s*"+o,end:"[-=]>",returnBegin:!0,contains:[a,s]},{begin:/[\(,:=]\s*/,relevance:0,contains:[{className:"function",begin:o,end:"[-=]>",returnBegin:!0,contains:[s]}]},{className:"class",beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[a]},a]},{className:"name",begin:n+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}}),define("highlight/lib/languages/nginx",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"variable",variants:[{begin:/\$\d+/},{begin:/\$\{/,end:/}/},{begin:"[\\$\\@]"+e.UNDERSCORE_IDENT_RE}]},n={endsWithParent:!0,lexemes:"[a-z/_]+",keywords:{literal:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},relevance:0,illegal:"=>",contains:[e.HASH_COMMENT_MODE,{className:"string",contains:[e.BACKSLASH_ESCAPE,t],variants:[{begin:/"/,end:/"/},{begin:/'/,end:/'/}]},{begin:"([a-z]+):/",end:"\\s",endsWithParent:!0,excludeEnd:!0,contains:[t]},{className:"regexp",contains:[e.BACKSLASH_ESCAPE,t],variants:[{begin:"\\s\\^",end:"\\s|{|;",returnEnd:!0},{begin:"~\\*?\\s+",end:"\\s|{|;",returnEnd:!0},{begin:"\\*(\\.[a-z\\-]+)+"},{begin:"([a-z\\-]+\\.)+\\*"}]},{className:"number",begin:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{className:"number",begin:"\\b\\d+[kKmMgGdshdwy]*\\b",relevance:0},t]};return{aliases:["nginxconf"],contains:[e.HASH_COMMENT_MODE,{begin:e.UNDERSCORE_IDENT_RE+"\\s+{",returnBegin:!0,end:"{",contains:[{className:"section",begin:e.UNDERSCORE_IDENT_RE}],relevance:0},{begin:e.UNDERSCORE_IDENT_RE+"\\s",end:";|{",returnBegin:!0,contains:[{className:"attribute",begin:e.UNDERSCORE_IDENT_RE,starts:n}],relevance:0}],illegal:"[^\\s\\}]"}}}),define("highlight/lib/languages/nimrod",["require","exports","module"],function(e,t,n){n.exports=function(e){return{aliases:["nim"],keywords:{keyword:"addr and as asm bind block break case cast const continue converter discard distinct div do elif else end enum except export finally for from generic if import in include interface is isnot iterator let macro method mixin mod nil not notin object of or out proc ptr raise ref return shl shr static template try tuple type using var when while with without xor yield",literal:"shared guarded stdin stdout stderr result true false",built_in:"int int8 int16 int32 int64 uint uint8 uint16 uint32 uint64 float float32 float64 bool char string cstring pointer expr stmt void auto any range array openarray varargs seq set clong culong cchar cschar cshort cint csize clonglong cfloat cdouble clongdouble cuchar cushort cuint culonglong cstringarray semistatic"},contains:[{className:"meta",begin:/{\./,end:/\.}/,relevance:10},{className:"string",begin:/[a-zA-Z]\w*"/,end:/"/,contains:[{begin:/""/}]},{className:"string",begin:/([a-zA-Z]\w*)?"""/,end:/"""/},e.QUOTE_STRING_MODE,{className:"type",begin:/\b[A-Z]\w+\b/,relevance:0},{className:"number",relevance:0,variants:[{begin:/\b(0[xX][0-9a-fA-F][_0-9a-fA-F]*)('?[iIuU](8|16|32|64))?/},{begin:/\b(0o[0-7][_0-7]*)('?[iIuUfF](8|16|32|64))?/},{begin:/\b(0(b|B)[01][_01]*)('?[iIuUfF](8|16|32|64))?/},{begin:/\b(\d[_\d]*)('?[iIuUfF](8|16|32|64))?/}]},e.HASH_COMMENT_MODE]}}}),define("highlight/lib/languages/nix",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={keyword:"rec with let in inherit assert if else then",literal:"true false or and null",built_in:"import abort baseNameOf dirOf isNull builtins map removeAttrs throw toString derivation"},n={className:"subst",begin:/\$\{/,end:/}/,keywords:t},i={begin:/[a-zA-Z0-9-_]+(\s*=)/,returnBegin:!0,relevance:0,contains:[{className:"attr",begin:/\S+/}]},r={className:"string",contains:[n],variants:[{begin:"''",end:"''"},{begin:'"',end:'"'}]},a=[e.NUMBER_MODE,e.HASH_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,r,i];return n.contains=a,{aliases:["nixos"],keywords:t,contains:a}}}),define("highlight/lib/languages/nsis",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"variable",begin:"\\$(ADMINTOOLS|APPDATA|CDBURN_AREA|CMDLINE|COMMONFILES32|COMMONFILES64|COMMONFILES|COOKIES|DESKTOP|DOCUMENTS|EXEDIR|EXEFILE|EXEPATH|FAVORITES|FONTS|HISTORY|HWNDPARENT|INSTDIR|INTERNET_CACHE|LANGUAGE|LOCALAPPDATA|MUSIC|NETHOOD|OUTDIR|PICTURES|PLUGINSDIR|PRINTHOOD|PROFILE|PROGRAMFILES32|PROGRAMFILES64|PROGRAMFILES|QUICKLAUNCH|RECENT|RESOURCES_LOCALIZED|RESOURCES|SENDTO|SMPROGRAMS|SMSTARTUP|STARTMENU|SYSDIR|TEMP|TEMPLATES|VIDEOS|WINDIR)"},n={className:"variable",begin:"\\$+{[a-zA-Z0-9_]+}"},i={className:"variable",begin:"\\$+[a-zA-Z0-9_]+",illegal:"\\(\\){}"},r={className:"variable",begin:"\\$+\\([a-zA-Z0-9_]+\\)"},a={className:"built_in",begin:"(ARCHIVE|FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_NORMAL|FILE_ATTRIBUTE_OFFLINE|FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_SYSTEM|FILE_ATTRIBUTE_TEMPORARY|HKCR|HKCU|HKDD|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_DYN_DATA|HKEY_LOCAL_MACHINE|HKEY_PERFORMANCE_DATA|HKEY_USERS|HKLM|HKPD|HKU|IDABORT|IDCANCEL|IDIGNORE|IDNO|IDOK|IDRETRY|IDYES|MB_ABORTRETRYIGNORE|MB_DEFBUTTON1|MB_DEFBUTTON2|MB_DEFBUTTON3|MB_DEFBUTTON4|MB_ICONEXCLAMATION|MB_ICONINFORMATION|MB_ICONQUESTION|MB_ICONSTOP|MB_OK|MB_OKCANCEL|MB_RETRYCANCEL|MB_RIGHT|MB_RTLREADING|MB_SETFOREGROUND|MB_TOPMOST|MB_USERICON|MB_YESNO|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SYSTEM|TEMPORARY)"},o={className:"keyword",begin:"\\!(addincludedir|addplugindir|appendfile|cd|define|delfile|echo|else|endif|error|execute|finalize|getdllversionsystem|ifdef|ifmacrodef|ifmacrondef|ifndef|if|include|insertmacro|macroend|macro|makensis|packhdr|searchparse|searchreplace|tempfile|undef|verbose|warning)"};return{case_insensitive:!1,keywords:{keyword:"Abort AddBrandingImage AddSize AllowRootDirInstall AllowSkipFiles AutoCloseWindow BGFont BGGradient BrandingText BringToFront Call CallInstDLL Caption ChangeUI CheckBitmap ClearErrors CompletedText ComponentText CopyFiles CRCCheck CreateDirectory CreateFont CreateShortCut Delete DeleteINISec DeleteINIStr DeleteRegKey DeleteRegValue DetailPrint DetailsButtonText DirText DirVar DirVerify EnableWindow EnumRegKey EnumRegValue Exch Exec ExecShell ExecWait ExpandEnvStrings File FileBufSize FileClose FileErrorText FileOpen FileRead FileReadByte FileReadUTF16LE FileReadWord FileSeek FileWrite FileWriteByte FileWriteUTF16LE FileWriteWord FindClose FindFirst FindNext FindWindow FlushINI FunctionEnd GetCurInstType GetCurrentAddress GetDlgItem GetDLLVersion GetDLLVersionLocal GetErrorLevel GetFileTime GetFileTimeLocal GetFullPathName GetFunctionAddress GetInstDirError GetLabelAddress GetTempFileName Goto HideWindow Icon IfAbort IfErrors IfFileExists IfRebootFlag IfSilent InitPluginsDir InstallButtonText InstallColors InstallDir InstallDirRegKey InstProgressFlags InstType InstTypeGetText InstTypeSetText IntCmp IntCmpU IntFmt IntOp IsWindow LangString LicenseBkColor LicenseData LicenseForceSelection LicenseLangString LicenseText LoadLanguageFile LockWindow LogSet LogText ManifestDPIAware ManifestSupportedOS MessageBox MiscButtonText Name Nop OutFile Page PageCallbacks PageExEnd Pop Push Quit ReadEnvStr ReadINIStr ReadRegDWORD ReadRegStr Reboot RegDLL Rename RequestExecutionLevel ReserveFile Return RMDir SearchPath SectionEnd SectionGetFlags SectionGetInstTypes SectionGetSize SectionGetText SectionGroupEnd SectionIn SectionSetFlags SectionSetInstTypes SectionSetSize SectionSetText SendMessage SetAutoClose SetBrandingImage SetCompress SetCompressor SetCompressorDictSize SetCtlColors SetCurInstType SetDatablockOptimize SetDateSave SetDetailsPrint SetDetailsView SetErrorLevel SetErrors SetFileAttributes SetFont SetOutPath SetOverwrite SetPluginUnload SetRebootFlag SetRegView SetShellVarContext SetSilent ShowInstDetails ShowUninstDetails ShowWindow SilentInstall SilentUnInstall Sleep SpaceTexts StrCmp StrCmpS StrCpy StrLen SubCaption SubSectionEnd Unicode UninstallButtonText UninstallCaption UninstallIcon UninstallSubCaption UninstallText UninstPage UnRegDLL Var VIAddVersionKey VIFileVersion VIProductVersion WindowIcon WriteINIStr WriteRegBin WriteRegDWORD WriteRegExpandStr WriteRegStr WriteUninstaller XPStyle",literal:"admin all auto both colored current false force hide highest lastused leave listonly none normal notset off on open print show silent silentlog smooth textonly true user "},contains:[e.HASH_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",begin:'"',end:'"',illegal:"\\n",contains:[{begin:"\\$(\\\\(n|r|t)|\\$)"},t,n,i,r]},e.COMMENT(";","$",{relevance:0}),{className:"function",beginKeywords:"Function PageEx Section SectionGroup SubSection",end:"$"},o,n,i,r,a,e.NUMBER_MODE,{begin:e.IDENT_RE+"::"+e.IDENT_RE}]}}}),define("highlight/lib/languages/objectivec",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n={keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required @encode @package @import @defs @compatibility_alias __bridge __bridge_transfer __bridge_retained __bridge_retain __covariant __contravariant __kindof _Nonnull _Nullable _Null_unspecified __FUNCTION__ __PRETTY_FUNCTION__ __attribute__ getter setter retain unsafe_unretained nonnull nullable null_unspecified null_resettable class instancetype NS_DESIGNATED_INITIALIZER NS_UNAVAILABLE NS_REQUIRES_SUPER NS_RETURNS_INNER_POINTER NS_INLINE NS_AVAILABLE NS_DEPRECATED NS_ENUM NS_OPTIONS NS_SWIFT_UNAVAILABLE NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_REFINED_FOR_SWIFT NS_SWIFT_NAME NS_SWIFT_NOTHROW NS_DURING NS_HANDLER NS_ENDHANDLER NS_VALUERETURN NS_VOIDRETURN",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"},i=/[a-zA-Z@][a-zA-Z0-9_]*/,r="@interface @class @protocol @implementation";return{aliases:["mm","objc","obj-c"],keywords:n,lexemes:i,illegal:""}]}]},{className:"class",begin:"("+r.split(" ").join("|")+")\\b",end:"({|$)",excludeEnd:!0,keywords:r,lexemes:i,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}}),define("highlight/lib/languages/ocaml",["require","exports","module"],function(e,t,n){n.exports=function(e){return{aliases:["ml"],keywords:{keyword:"and as assert asr begin class constraint do done downto else end exception external for fun function functor if in include inherit! inherit initializer land lazy let lor lsl lsr lxor match method!|10 method mod module mutable new object of open! open or private rec sig struct then to try type val! val virtual when while with parser value",built_in:"array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 string unit in_channel out_channel ref",literal:"true false"},illegal:/\/\/|>>/,lexemes:"[a-z_]\\w*!?",contains:[{className:"literal",begin:"\\[(\\|\\|)?\\]|\\(\\)",relevance:0},e.COMMENT("\\(\\*","\\*\\)",{contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{className:"type",begin:"`[A-Z][\\w']*"},{className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},{begin:"[a-z_]\\w*'[\\w']*",relevance:0},e.inherit(e.APOS_STRING_MODE,{className:"string",relevance:0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"number",begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",relevance:0},{begin:/[-=]>/}]}}}),define("highlight/lib/languages/openscad",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"keyword",begin:"\\$(f[asn]|t|vp[rtd]|children)"},n={className:"literal",begin:"false|true|PI|undef"},i={className:"number",begin:"\\b\\d+(\\.\\d+)?(e-?\\d+)?",relevance:0},r=e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),a={className:"meta",keywords:{"meta-keyword":"include use"},begin:"include|use <",end:">"},o={className:"params",begin:"\\(",end:"\\)",contains:["self",i,r,t,n]},s={begin:"[*!#%]",relevance:0},l={className:"function",beginKeywords:"module function",end:"\\=|\\{",contains:[o,e.UNDERSCORE_TITLE_MODE]};return{aliases:["scad"],keywords:{keyword:"function module include use for intersection_for if else \\%",literal:"false true PI undef",built_in:"circle square polygon text sphere cube cylinder polyhedron translate rotate scale resize mirror multmatrix color offset hull minkowski union difference intersection abs sign sin cos tan acos asin atan atan2 floor round ceil ln log pow sqrt exp rands min max concat lookup str chr search version version_num norm cross parent_module echo import import_dxf dxf_linear_extrude linear_extrude rotate_extrude surface projection render children dxf_cross dxf_dim let assign"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,i,a,r,t,s,l]}}}),define("highlight/lib/languages/oxygene",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="abstract add and array as asc aspect assembly async begin break block by case class concat const copy constructor continue create default delegate desc distinct div do downto dynamic each else empty end ensure enum equals event except exit extension external false final finalize finalizer finally flags for forward from function future global group has if implementation implements implies in index inherited inline interface into invariants is iterator join locked locking loop matching method mod module namespace nested new nil not notify nullable of old on operator or order out override parallel params partial pinned private procedure property protected public queryable raise read readonly record reintroduce remove repeat require result reverse sealed select self sequence set shl shr skip static step soft take then to true try tuple type union unit unsafe until uses using var virtual raises volatile where while with write xor yield await mapped deprecated stdcall cdecl pascal register safecall overload library platform reference packed strict published autoreleasepool selector strong weak unretained",n=e.COMMENT("{","}",{relevance:0}),i=e.COMMENT("\\(\\*","\\*\\)",{relevance:10}),r={className:"string",begin:"'",end:"'",contains:[{begin:"''"}]},a={className:"string",begin:"(#\\d+)+"},o={className:"function",beginKeywords:"function constructor destructor procedure method",end:"[:;]",keywords:"function constructor|10 destructor|10 procedure|10 method|10",contains:[e.TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",keywords:t,contains:[r,a]},n,i]};return{case_insensitive:!0,lexemes:/\.?\w+/,keywords:t,illegal:'("|\\$[G-Zg-z]|\\/\\*||->)',contains:[n,i,e.C_LINE_COMMENT_MODE,r,a,e.NUMBER_MODE,o,{className:"class",begin:"=\\bclass\\b",end:"end;",keywords:t,contains:[r,a,n,i,e.C_LINE_COMMENT_MODE,o]}]}}}),define("highlight/lib/languages/parser3",["require","exports","module"],function(e,t,n){n.exports=function(e){var t=e.COMMENT("{","}",{contains:["self"]});return{subLanguage:"xml",relevance:0,contains:[e.COMMENT("^#","$"),e.COMMENT("\\^rem{","}",{relevance:10,contains:[t]}),{className:"meta",begin:"^@(?:BASE|USE|CLASS|OPTIONS)$",relevance:10},{className:"title",begin:"@[\\w\\-]+\\[[\\w^;\\-]*\\](?:\\[[\\w^;\\-]*\\])?(?:.*)$"},{className:"variable",begin:"\\$\\{?[\\w\\-\\.\\:]+\\}?"},{className:"keyword",begin:"\\^[\\w\\-\\.\\:]+"},{className:"number",begin:"\\^#[0-9a-fA-F]+"},e.C_NUMBER_MODE]}}}),define("highlight/lib/languages/pf",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"variable",begin:/\$[\w\d#@][\w\d_]*/},n={className:"variable",begin:/<(?!\/)/,end:/>/};return{aliases:["pf.conf"],lexemes:/[a-z0-9_<>-]+/,keywords:{built_in:"block match pass load anchor|5 antispoof|10 set table",keyword:"in out log quick on rdomain inet inet6 proto from port os to routeallow-opts divert-packet divert-reply divert-to flags group icmp-typeicmp6-type label once probability recieved-on rtable prio queuetos tag tagged user keep fragment for os dropaf-to|10 binat-to|10 nat-to|10 rdr-to|10 bitmask least-stats random round-robinsource-hash static-portdup-to reply-to route-toparent bandwidth default min max qlimitblock-policy debug fingerprints hostid limit loginterface optimizationreassemble ruleset-optimization basic none profile skip state-defaultsstate-policy timeoutconst counters persistno modulate synproxy state|5 floating if-bound no-sync pflow|10 sloppysource-track global rule max-src-nodes max-src-states max-src-connmax-src-conn-rate overload flushscrub|5 max-mss min-ttl no-df|10 random-id",literal:"all any no-route self urpf-failed egress|5 unknown"},contains:[e.HASH_COMMENT_MODE,e.NUMBER_MODE,e.QUOTE_STRING_MODE,t,n]}}}),define("highlight/lib/languages/php",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={begin:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"},n={className:"meta",begin:/<\?(php)?|\?>/},i={className:"string",contains:[e.BACKSLASH_ESCAPE,n],variants:[{begin:'b"',end:'"'},{begin:"b'",end:"'"},e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null})]},r={variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]};return{aliases:["php3","php4","php5","php6"],case_insensitive:!0,keywords:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",contains:[e.HASH_COMMENT_MODE,e.COMMENT("//","$",{contains:[n]}),e.COMMENT("/\\*","\\*/",{contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.COMMENT("__halt_compiler.+?;",!1,{endsWithParent:!0,keywords:"__halt_compiler",lexemes:e.UNDERSCORE_IDENT_RE}),{className:"string",begin:/<<<['"]?\w+['"]?$/,end:/^\w+;?$/,contains:[e.BACKSLASH_ESCAPE,{className:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]}]},n,{className:"keyword",begin:/\$this\b/},t,{begin:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{className:"function",beginKeywords:"function",end:/[;{]/,excludeEnd:!0,illegal:"\\$|\\[|%",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:["self",t,e.C_BLOCK_COMMENT_MODE,i,r]}]},{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,illegal:/[:\(\$"]/,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",end:";",illegal:/[\.']/,contains:[e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"use",end:";",contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"=>"},i,r]}}}),define("highlight/lib/languages/pony",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={keyword:"actor addressof and as be break class compile_error compile_intrinsicconsume continue delegate digestof do else elseif embed end errorfor fun if ifdef in interface is isnt lambda let match new not objector primitive recover repeat return struct then trait try type until use var where while with xor",meta:"iso val tag trn box ref",literal:"this false true"},n={className:"string",begin:'"""',end:'"""', -relevance:10},i={className:"string",begin:'"',end:'"',contains:[e.BACKSLASH_ESCAPE]},r={className:"string",begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE],relevance:0},a={className:"type",begin:"\\b_?[A-Z][\\w]*",relevance:0},o={begin:e.IDENT_RE+"'",relevance:0},s={className:"class",beginKeywords:"class actor",end:"$",contains:[e.TITLE_MODE,e.C_LINE_COMMENT_MODE]},l={className:"function",beginKeywords:"new fun",end:"=>",contains:[e.TITLE_MODE,{begin:/\(/,end:/\)/,contains:[a,o,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE]},{begin:/:/,endsWithParent:!0,contains:[a]},e.C_LINE_COMMENT_MODE]};return{keywords:t,contains:[s,l,a,n,i,r,o,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}}}),define("highlight/lib/languages/powershell",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={begin:"`[\\s\\S]",relevance:0},n={className:"variable",variants:[{begin:/\$[\w\d][\w\d_:]*/}]},i={className:"literal",begin:/\$(null|true|false)\b/},r={className:"string",variants:[{begin:/"/,end:/"/},{begin:/@"/,end:/^"@/}],contains:[t,n,{className:"variable",begin:/\$[A-z]/,end:/[^A-z]/}]},a={className:"string",variants:[{begin:/'/,end:/'/},{begin:/@'/,end:/^'@/}]},o={className:"doctag",variants:[{begin:/\.(synopsis|description|example|inputs|outputs|notes|link|component|role|functionality)/},{begin:/\.(parameter|forwardhelptargetname|forwardhelpcategory|remotehelprunspace|externalhelp)\s+\S+/}]},s=e.inherit(e.COMMENT(null,null),{variants:[{begin:/#/,end:/$/},{begin:/<#/,end:/#>/}],contains:[o]});return{aliases:["ps"],lexemes:/-?[A-z\.\-]+/,case_insensitive:!0,keywords:{keyword:"if else foreach return function do while until elseif begin for trap data dynamicparam end break throw param continue finally in switch exit filter try process catch",built_in:"Add-Computer Add-Content Add-History Add-JobTrigger Add-Member Add-PSSnapin Add-Type Checkpoint-Computer Clear-Content Clear-EventLog Clear-History Clear-Host Clear-Item Clear-ItemProperty Clear-Variable Compare-Object Complete-Transaction Connect-PSSession Connect-WSMan Convert-Path ConvertFrom-Csv ConvertFrom-Json ConvertFrom-SecureString ConvertFrom-StringData ConvertTo-Csv ConvertTo-Html ConvertTo-Json ConvertTo-SecureString ConvertTo-Xml Copy-Item Copy-ItemProperty Debug-Process Disable-ComputerRestore Disable-JobTrigger Disable-PSBreakpoint Disable-PSRemoting Disable-PSSessionConfiguration Disable-WSManCredSSP Disconnect-PSSession Disconnect-WSMan Disable-ScheduledJob Enable-ComputerRestore Enable-JobTrigger Enable-PSBreakpoint Enable-PSRemoting Enable-PSSessionConfiguration Enable-ScheduledJob Enable-WSManCredSSP Enter-PSSession Exit-PSSession Export-Alias Export-Clixml Export-Console Export-Counter Export-Csv Export-FormatData Export-ModuleMember Export-PSSession ForEach-Object Format-Custom Format-List Format-Table Format-Wide Get-Acl Get-Alias Get-AuthenticodeSignature Get-ChildItem Get-Command Get-ComputerRestorePoint Get-Content Get-ControlPanelItem Get-Counter Get-Credential Get-Culture Get-Date Get-Event Get-EventLog Get-EventSubscriber Get-ExecutionPolicy Get-FormatData Get-Host Get-HotFix Get-Help Get-History Get-IseSnippet Get-Item Get-ItemProperty Get-Job Get-JobTrigger Get-Location Get-Member Get-Module Get-PfxCertificate Get-Process Get-PSBreakpoint Get-PSCallStack Get-PSDrive Get-PSProvider Get-PSSession Get-PSSessionConfiguration Get-PSSnapin Get-Random Get-ScheduledJob Get-ScheduledJobOption Get-Service Get-TraceSource Get-Transaction Get-TypeData Get-UICulture Get-Unique Get-Variable Get-Verb Get-WinEvent Get-WmiObject Get-WSManCredSSP Get-WSManInstance Group-Object Import-Alias Import-Clixml Import-Counter Import-Csv Import-IseSnippet Import-LocalizedData Import-PSSession Import-Module Invoke-AsWorkflow Invoke-Command Invoke-Expression Invoke-History Invoke-Item Invoke-RestMethod Invoke-WebRequest Invoke-WmiMethod Invoke-WSManAction Join-Path Limit-EventLog Measure-Command Measure-Object Move-Item Move-ItemProperty New-Alias New-Event New-EventLog New-IseSnippet New-Item New-ItemProperty New-JobTrigger New-Object New-Module New-ModuleManifest New-PSDrive New-PSSession New-PSSessionConfigurationFile New-PSSessionOption New-PSTransportOption New-PSWorkflowExecutionOption New-PSWorkflowSession New-ScheduledJobOption New-Service New-TimeSpan New-Variable New-WebServiceProxy New-WinEvent New-WSManInstance New-WSManSessionOption Out-Default Out-File Out-GridView Out-Host Out-Null Out-Printer Out-String Pop-Location Push-Location Read-Host Receive-Job Register-EngineEvent Register-ObjectEvent Register-PSSessionConfiguration Register-ScheduledJob Register-WmiEvent Remove-Computer Remove-Event Remove-EventLog Remove-Item Remove-ItemProperty Remove-Job Remove-JobTrigger Remove-Module Remove-PSBreakpoint Remove-PSDrive Remove-PSSession Remove-PSSnapin Remove-TypeData Remove-Variable Remove-WmiObject Remove-WSManInstance Rename-Computer Rename-Item Rename-ItemProperty Reset-ComputerMachinePassword Resolve-Path Restart-Computer Restart-Service Restore-Computer Resume-Job Resume-Service Save-Help Select-Object Select-String Select-Xml Send-MailMessage Set-Acl Set-Alias Set-AuthenticodeSignature Set-Content Set-Date Set-ExecutionPolicy Set-Item Set-ItemProperty Set-JobTrigger Set-Location Set-PSBreakpoint Set-PSDebug Set-PSSessionConfiguration Set-ScheduledJob Set-ScheduledJobOption Set-Service Set-StrictMode Set-TraceSource Set-Variable Set-WmiInstance Set-WSManInstance Set-WSManQuickConfig Show-Command Show-ControlPanelItem Show-EventLog Sort-Object Split-Path Start-Job Start-Process Start-Service Start-Sleep Start-Transaction Start-Transcript Stop-Computer Stop-Job Stop-Process Stop-Service Stop-Transcript Suspend-Job Suspend-Service Tee-Object Test-ComputerSecureChannel Test-Connection Test-ModuleManifest Test-Path Test-PSSessionConfigurationFile Trace-Command Unblock-File Undo-Transaction Unregister-Event Unregister-PSSessionConfiguration Unregister-ScheduledJob Update-FormatData Update-Help Update-List Update-TypeData Use-Transaction Wait-Event Wait-Job Wait-Process Where-Object Write-Debug Write-Error Write-EventLog Write-Host Write-Output Write-Progress Write-Verbose Write-Warning",nomarkup:"-ne -eq -lt -gt -ge -le -not -like -notlike -match -notmatch -contains -notcontains -in -notin -replace"},contains:[t,e.NUMBER_MODE,r,a,i,n,s]}}}),define("highlight/lib/languages/processing",["require","exports","module"],function(e,t,n){n.exports=function(e){return{keywords:{keyword:"BufferedReader PVector PFont PImage PGraphics HashMap boolean byte char color double float int long String Array FloatDict FloatList IntDict IntList JSONArray JSONObject Object StringDict StringList Table TableRow XML false synchronized int abstract float private char boolean static null if const for true while long throw strictfp finally protected import native final return void enum else break transient new catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private",literal:"P2D P3D HALF_PI PI QUARTER_PI TAU TWO_PI",title:"setup draw",built_in:"displayHeight displayWidth mouseY mouseX mousePressed pmouseX pmouseY key keyCode pixels focused frameCount frameRate height width size createGraphics beginDraw createShape loadShape PShape arc ellipse line point quad rect triangle bezier bezierDetail bezierPoint bezierTangent curve curveDetail curvePoint curveTangent curveTightness shape shapeMode beginContour beginShape bezierVertex curveVertex endContour endShape quadraticVertex vertex ellipseMode noSmooth rectMode smooth strokeCap strokeJoin strokeWeight mouseClicked mouseDragged mouseMoved mousePressed mouseReleased mouseWheel keyPressed keyPressedkeyReleased keyTyped print println save saveFrame day hour millis minute month second year background clear colorMode fill noFill noStroke stroke alpha blue brightness color green hue lerpColor red saturation modelX modelY modelZ screenX screenY screenZ ambient emissive shininess specular add createImage beginCamera camera endCamera frustum ortho perspective printCamera printProjection cursor frameRate noCursor exit loop noLoop popStyle pushStyle redraw binary boolean byte char float hex int str unbinary unhex join match matchAll nf nfc nfp nfs split splitTokens trim append arrayCopy concat expand reverse shorten sort splice subset box sphere sphereDetail createInput createReader loadBytes loadJSONArray loadJSONObject loadStrings loadTable loadXML open parseXML saveTable selectFolder selectInput beginRaw beginRecord createOutput createWriter endRaw endRecord PrintWritersaveBytes saveJSONArray saveJSONObject saveStream saveStrings saveXML selectOutput popMatrix printMatrix pushMatrix resetMatrix rotate rotateX rotateY rotateZ scale shearX shearY translate ambientLight directionalLight lightFalloff lights lightSpecular noLights normal pointLight spotLight image imageMode loadImage noTint requestImage tint texture textureMode textureWrap blend copy filter get loadPixels set updatePixels blendMode loadShader PShaderresetShader shader createFont loadFont text textFont textAlign textLeading textMode textSize textWidth textAscent textDescent abs ceil constrain dist exp floor lerp log mag map max min norm pow round sq sqrt acos asin atan atan2 cos degrees radians sin tan noise noiseDetail noiseSeed random randomGaussian randomSeed"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE]}}}),define("highlight/lib/languages/profile",["require","exports","module"],function(e,t,n){n.exports=function(e){return{contains:[e.C_NUMBER_MODE,{begin:"[a-zA-Z_][\\da-zA-Z_]+\\.[\\da-zA-Z_]{1,3}",end:":",excludeEnd:!0},{begin:"(ncalls|tottime|cumtime)",end:"$",keywords:"ncalls tottime|10 cumtime|10 filename",relevance:10},{begin:"function calls",end:"$",contains:[e.C_NUMBER_MODE],relevance:10},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"\\(",end:"\\)$",excludeBegin:!0,excludeEnd:!0,relevance:0}]}}}),define("highlight/lib/languages/prolog",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={begin:/[a-z][A-Za-z0-9_]*/,relevance:0},n={className:"symbol",variants:[{begin:/[A-Z][a-zA-Z0-9_]*/},{begin:/_[A-Za-z0-9_]*/}],relevance:0},i={begin:/\(/,end:/\)/,relevance:0},r={begin:/\[/,end:/\]/},a={className:"comment",begin:/%/,end:/$/,contains:[e.PHRASAL_WORDS_MODE]},o={className:"string",begin:/`/,end:/`/,contains:[e.BACKSLASH_ESCAPE]},s={className:"string",begin:/0\'(\\\'|.)/},l={className:"string",begin:/0\'\\s/},c={begin:/:-/},d=[t,n,i,c,r,a,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,o,s,l,e.C_NUMBER_MODE];return i.contains=d,r.contains=d,{contains:d.concat([{begin:/\.$/}])}}}),define("highlight/lib/languages/protobuf",["require","exports","module"],function(e,t,n){n.exports=function(e){return{keywords:{keyword:"package import option optional required repeated group",built_in:"double float int32 int64 uint32 uint64 sint32 sint64 fixed32 fixed64 sfixed32 sfixed64 bool string bytes",literal:"true false"},contains:[e.QUOTE_STRING_MODE,e.NUMBER_MODE,e.C_LINE_COMMENT_MODE,{className:"class",beginKeywords:"message enum service",end:/\{/,illegal:/\n/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]},{className:"function",beginKeywords:"rpc",end:/;/,excludeEnd:!0,keywords:"rpc returns"},{begin:/^\s*[A-Z_]+/,end:/\s*=/,excludeEnd:!0}]}}}),define("highlight/lib/languages/puppet",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={keyword:"and case default else elsif false if in import enherits node or true undef unless main settings $string ",literal:"alias audit before loglevel noop require subscribe tag owner ensure group mode name|0 changes context force incl lens load_path onlyif provider returns root show_diff type_check en_address ip_address realname command environment hour monute month monthday special target weekday creates cwd ogoutput refresh refreshonly tries try_sleep umask backup checksum content ctime force ignore links mtime purge recurse recurselimit replace selinux_ignore_defaults selrange selrole seltype seluser source souirce_permissions sourceselect validate_cmd validate_replacement allowdupe attribute_membership auth_membership forcelocal gid ia_load_module members system host_aliases ip allowed_trunk_vlans description device_url duplex encapsulation etherchannel native_vlan speed principals allow_root auth_class auth_type authenticate_user k_of_n mechanisms rule session_owner shared options device fstype enable hasrestart directory present absent link atboot blockdevice device dump pass remounts poller_tag use message withpath adminfile allow_virtual allowcdrom category configfiles flavor install_options instance package_settings platform responsefile status uninstall_options vendor unless_system_user unless_uid binary control flags hasstatus manifest pattern restart running start stop allowdupe auths expiry gid groups home iterations key_membership keys managehome membership password password_max_age password_min_age profile_membership profiles project purge_ssh_keys role_membership roles salt shell uid baseurl cost descr enabled enablegroups exclude failovermethod gpgcheck gpgkey http_caching include includepkgs keepalive metadata_expire metalink mirrorlist priority protect proxy proxy_password proxy_username repo_gpgcheck s3_enabled skip_if_unavailable sslcacert sslclientcert sslclientkey sslverify mounted",built_in:"architecture augeasversion blockdevices boardmanufacturer boardproductname boardserialnumber cfkey dhcp_servers domain ec2_ ec2_userdata facterversion filesystems ldom fqdn gid hardwareisa hardwaremodel hostname id|0 interfaces ipaddress ipaddress_ ipaddress6 ipaddress6_ iphostnumber is_virtual kernel kernelmajversion kernelrelease kernelversion kernelrelease kernelversion lsbdistcodename lsbdistdescription lsbdistid lsbdistrelease lsbmajdistrelease lsbminordistrelease lsbrelease macaddress macaddress_ macosx_buildversion macosx_productname macosx_productversion macosx_productverson_major macosx_productversion_minor manufacturer memoryfree memorysize netmask metmask_ network_ operatingsystem operatingsystemmajrelease operatingsystemrelease osfamily partitions path physicalprocessorcount processor processorcount productname ps puppetversion rubysitedir rubyversion selinux selinux_config_mode selinux_config_policy selinux_current_mode selinux_current_mode selinux_enforced selinux_policyversion serialnumber sp_ sshdsakey sshecdsakey sshrsakey swapencrypted swapfree swapsize timezone type uniqueid uptime uptime_days uptime_hours uptime_seconds uuid virtual vlans xendomains zfs_version zonenae zones zpool_version"},n=e.COMMENT("#","$"),i="([A-Za-z_]|::)(\\w|::)*",r=e.inherit(e.TITLE_MODE,{begin:i}),a={className:"variable",begin:"\\$"+i},o={className:"string",contains:[e.BACKSLASH_ESCAPE,a],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/}]};return{aliases:["pp"],contains:[n,a,o,{beginKeywords:"class",end:"\\{|;",illegal:/=/,contains:[r,n]},{beginKeywords:"define",end:/\{/,contains:[{className:"section",begin:e.IDENT_RE,endsParent:!0}]},{begin:e.IDENT_RE+"\\s+\\{",returnBegin:!0,end:/\S/,contains:[{className:"keyword",begin:e.IDENT_RE},{begin:/\{/,end:/\}/,keywords:t,relevance:0,contains:[o,n,{begin:"[a-zA-Z_]+\\s*=>",returnBegin:!0,end:"=>",contains:[{className:"attr",begin:e.IDENT_RE}]},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},a]}],relevance:0}]}}}),define("highlight/lib/languages/purebasic",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"string",begin:'(~)?"',end:'"',illegal:"\\n"},n={className:"symbol",begin:"#[a-zA-Z_]\\w*\\$?"};return{aliases:["pb","pbi"],keywords:"And As Break CallDebugger Case CompilerCase CompilerDefault CompilerElse CompilerEndIf CompilerEndSelect CompilerError CompilerIf CompilerSelect Continue Data DataSection EndDataSection Debug DebugLevel Default Define Dim DisableASM DisableDebugger DisableExplicit Else ElseIf EnableASM EnableDebugger EnableExplicit End EndEnumeration EndIf EndImport EndInterface EndMacro EndProcedure EndSelect EndStructure EndStructureUnion EndWith Enumeration Extends FakeReturn For Next ForEach ForEver Global Gosub Goto If Import ImportC IncludeBinary IncludeFile IncludePath Interface Macro NewList Not Or ProcedureReturn Protected Prototype PrototypeC Read ReDim Repeat Until Restore Return Select Shared Static Step Structure StructureUnion Swap To Wend While With XIncludeFile XOr Procedure ProcedureC ProcedureCDLL ProcedureDLL Declare DeclareC DeclareCDLL DeclareDLL",contains:[e.COMMENT(";","$",{relevance:0}),{className:"function",begin:"\\b(Procedure|Declare)(C|CDLL|DLL)?\\b",end:"\\(",excludeEnd:!0,returnBegin:!0,contains:[{className:"keyword",begin:"(Procedure|Declare)(C|CDLL|DLL)?",excludeEnd:!0},{className:"type",begin:"\\.\\w*"},e.UNDERSCORE_TITLE_MODE]},t,n]}}}),define("highlight/lib/languages/python",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"meta",begin:/^(>>>|\.\.\.) /},n={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/(u|b)?r?'''/,end:/'''/,contains:[t],relevance:10},{begin:/(u|b)?r?"""/,end:/"""/,contains:[t],relevance:10},{begin:/(u|r|ur)'/,end:/'/,relevance:10},{begin:/(u|r|ur)"/,end:/"/,relevance:10},{begin:/(b|br)'/,end:/'/},{begin:/(b|br)"/,end:/"/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},i={className:"number",relevance:0,variants:[{begin:e.BINARY_NUMBER_RE+"[lLjJ]?"},{begin:"\\b(0o[0-7]+)[lLjJ]?"},{begin:e.C_NUMBER_RE+"[lLjJ]?"}]},r={className:"params",begin:/\(/,end:/\)/,contains:["self",t,i,n]};return{aliases:["py","gyp"],keywords:{keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda async await nonlocal|10 None True False",built_in:"Ellipsis NotImplemented"},illegal:/(<\/|->|\?)/,contains:[t,i,n,e.HASH_COMMENT_MODE,{variants:[{className:"function",beginKeywords:"def",relevance:10},{className:"class",beginKeywords:"class"}],end:/:/,illegal:/[${=;\n,]/,contains:[e.UNDERSCORE_TITLE_MODE,r,{begin:/->/,endsWithParent:!0,keywords:"None"}]},{className:"meta",begin:/^[\t ]*@/,end:/$/},{begin:/\b(print|exec)\(/}]}}}),define("highlight/lib/languages/q",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={keyword:"do while select delete by update from",literal:"0b 1b",built_in:"neg not null string reciprocal floor ceiling signum mod xbar xlog and or each scan over prior mmu lsq inv md5 ltime gtime count first var dev med cov cor all any rand sums prds mins maxs fills deltas ratios avgs differ prev next rank reverse iasc idesc asc desc msum mcount mavg mdev xrank mmin mmax xprev rotate distinct group where flip type key til get value attr cut set upsert raze union inter except cross sv vs sublist enlist read0 read1 hopen hclose hdel hsym hcount peach system ltrim rtrim trim lower upper ssr view tables views cols xcols keys xkey xcol xasc xdesc fkeys meta lj aj aj0 ij pj asof uj ww wj wj1 fby xgroup ungroup ej save load rsave rload show csv parse eval min max avg wavg wsum sin cos tan sum",type:"`float `double int `timestamp `timespan `datetime `time `boolean `symbol `char `byte `short `long `real `month `date `minute `second `guid"};return{aliases:["k","kdb"],keywords:t,lexemes:/(`?)[A-Za-z0-9_]+\b/,contains:[e.C_LINE_COMMENT_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE]}}}),define("highlight/lib/languages/qml",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={keyword:"in of on if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await import",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Behavior bool color coordinate date double enumeration font geocircle georectangle geoshape int list matrix4x4 parent point quaternion real rect size string url var variant vector2d vector3d vector4dPromise"},n="[a-zA-Z_][a-zA-Z0-9\\._]*",i={className:"keyword",begin:"\\bproperty\\b",starts:{className:"string",end:"(:|=|;|,|//|/\\*|$)",returnEnd:!0}},r={className:"keyword",begin:"\\bsignal\\b",starts:{className:"string",end:"(\\(|:|=|;|,|//|/\\*|$)",returnEnd:!0}},a={className:"attribute",begin:"\\bid\\s*:",starts:{className:"string",end:n,returnEnd:!1}},o={begin:n+"\\s*:",returnBegin:!0,contains:[{className:"attribute",begin:n,end:"\\s*:",excludeEnd:!0,relevance:0}],relevance:0},s={begin:n+"\\s*{",end:"{",returnBegin:!0,relevance:0,contains:[e.inherit(e.TITLE_MODE,{begin:n})]};return{aliases:["qt"],case_insensitive:!1,keywords:t,contains:[{className:"meta",begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,{className:"subst",begin:"\\$\\{",end:"\\}"}]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"number",variants:[{begin:"\\b(0[bB][01]+)"},{begin:"\\b(0[oO][0-7]+)"},{begin:e.C_NUMBER_RE}],relevance:0},{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.REGEXP_MODE,{begin:/\s*[);\]]/,relevance:0,subLanguage:"xml"}],relevance:0},r,i,{className:"function",beginKeywords:"function",end:/\{/,excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/}),{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}],illegal:/\[|%/},{begin:"\\."+e.IDENT_RE,relevance:0},a,o,s],illegal:/#/}}}),define("highlight/lib/languages/r",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="([a-zA-Z]|\\.[a-zA-Z.])[a-zA-Z0-9._]*";return{contains:[e.HASH_COMMENT_MODE,{begin:t,lexemes:t,keywords:{keyword:"function if in break next repeat else for return switch while try tryCatch stop warning require library attach detach source setMethod setGeneric setGroupGeneric setClass ...",literal:"NULL NA TRUE FALSE T F Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10"},relevance:0},{className:"number",begin:"0[xX][0-9a-fA-F]+[Li]?\\b",relevance:0},{className:"number",begin:"\\d+(?:[eE][+\\-]?\\d*)?L\\b",relevance:0},{className:"number",begin:"\\d+\\.(?!\\d)(?:i\\b)?",relevance:0},{className:"number",begin:"\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b",relevance:0},{className:"number",begin:"\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b",relevance:0},{begin:"`",end:"`",relevance:0},{className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:'"',end:'"'},{begin:"'",end:"'"}]}]}}}),define("highlight/lib/languages/rib",["require","exports","module"],function(e,t,n){n.exports=function(e){return{keywords:"ArchiveRecord AreaLightSource Atmosphere Attribute AttributeBegin AttributeEnd Basis Begin Blobby Bound Clipping ClippingPlane Color ColorSamples ConcatTransform Cone CoordinateSystem CoordSysTransform CropWindow Curves Cylinder DepthOfField Detail DetailRange Disk Displacement Display End ErrorHandler Exposure Exterior Format FrameAspectRatio FrameBegin FrameEnd GeneralPolygon GeometricApproximation Geometry Hider Hyperboloid Identity Illuminate Imager Interior LightSource MakeCubeFaceEnvironment MakeLatLongEnvironment MakeShadow MakeTexture Matte MotionBegin MotionEnd NuPatch ObjectBegin ObjectEnd ObjectInstance Opacity Option Orientation Paraboloid Patch PatchMesh Perspective PixelFilter PixelSamples PixelVariance Points PointsGeneralPolygons PointsPolygons Polygon Procedural Projection Quantize ReadArchive RelativeDetail ReverseOrientation Rotate Scale ScreenWindow ShadingInterpolation ShadingRate Shutter Sides Skew SolidBegin SolidEnd Sphere SubdivisionMesh Surface TextureCoordinates Torus Transform TransformBegin TransformEnd TransformPoints Translate TrimCurve WorldBegin WorldEnd",illegal:""}]}}}),define("highlight/lib/languages/scala",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"meta",begin:"@[A-Za-z]+"},n={className:"subst",variants:[{begin:"\\$[A-Za-z0-9_]+"},{begin:"\\${",end:"}"}]},i={className:"string",variants:[{begin:'"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:'"""',end:'"""',relevance:10},{begin:'[a-z]+"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,n]},{className:"string",begin:'[a-z]+"""',end:'"""',contains:[n],relevance:10}]},r={className:"symbol",begin:"'\\w[\\w\\d_]*(?!')"},a={className:"type",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},o={className:"title",begin:/[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/,relevance:0},s={className:"class",beginKeywords:"class object trait type",end:/[:={\[\n;]/,excludeEnd:!0,contains:[{beginKeywords:"extends with",relevance:10},{begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0,relevance:0,contains:[a]},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,relevance:0,contains:[a]},o]},l={className:"function",beginKeywords:"def",end:/[:={\[(\n;]/,excludeEnd:!0,contains:[o]};return{keywords:{literal:"true false null",keyword:"type yield lazy override def with val var sealed abstract private trait object if forSome for while throw finally protected extends import final return else break new catch super class case package default try this match continue throws implicit"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,i,r,a,l,s,e.C_NUMBER_MODE,t]}}}),define("highlight/lib/languages/scheme",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="[^\\(\\)\\[\\]\\{\\}\",'`;#|\\\\\\s]+",n="(\\-|\\+)?\\d+([./]\\d+)?",i=n+"[+\\-]"+n+"i",r={"builtin-name":"case-lambda call/cc class define-class exit-handler field import inherit init-field interface let*-values let-values let/ec mixin opt-lambda override protect provide public rename require require-for-syntax syntax syntax-case syntax-error unit/sig unless when with-syntax and begin call-with-current-continuation call-with-input-file call-with-output-file case cond define define-syntax delay do dynamic-wind else for-each if lambda let let* let-syntax letrec letrec-syntax map or syntax-rules ' * + , ,@ - ... / ; < <= = => > >= ` abs acos angle append apply asin assoc assq assv atan boolean? caar cadr call-with-input-file call-with-output-file call-with-values car cdddar cddddr cdr ceiling char->integer char-alphabetic? char-ci<=? char-ci=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase char-upper-case? char-whitespace? char<=? char=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt floor force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm length list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vector max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt string string->list string->number string->symbol string-append string-ci<=? string-ci=? string-ci>? string-copy string-fill! string-length string-ref string-set! string<=? string=? string>? string? substring symbol->string symbol? tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! with-input-from-file with-output-to-file write write-char zero?"},a={className:"meta",begin:"^#!",end:"$"},o={className:"literal",begin:"(#t|#f|#\\\\"+t+"|#\\\\.)"},s={className:"number",variants:[{begin:n,relevance:0},{begin:i,relevance:0},{begin:"#b[0-1]+(/[0-1]+)?"},{begin:"#o[0-7]+(/[0-7]+)?"},{begin:"#x[0-9a-f]+(/[0-9a-f]+)?"}]},l=e.QUOTE_STRING_MODE,c=[e.COMMENT(";","$",{relevance:0}),e.COMMENT("#\\|","\\|#")],d={begin:t,relevance:0},u={className:"symbol",begin:"'"+t},m={endsWithParent:!0,relevance:0},p={begin:/'/,contains:[{begin:"\\(",end:"\\)",contains:["self",o,l,s,d,u]}]},g={className:"name",begin:t,lexemes:t,keywords:r},h={begin:/lambda/,endsWithParent:!0,returnBegin:!0,contains:[g,{begin:/\(/,end:/\)/,endsParent:!0,contains:[d]}]},b={variants:[{begin:"\\(",end:"\\)"},{begin:"\\[",end:"\\]"}],contains:[h,g,m]};return m.contains=[o,s,l,d,u,p,b].concat(c),{illegal:/\S/,contains:[a,s,l,u,p,b].concat(c)}}}),define("highlight/lib/languages/scilab",["require","exports","module"],function(e,t,n){n.exports=function(e){var t=[e.C_NUMBER_MODE,{className:"string",begin:"'|\"",end:"'|\"",contains:[e.BACKSLASH_ESCAPE,{begin:"''"}]}];return{aliases:["sci"],lexemes:/%?\w+/,keywords:{keyword:"abort break case clear catch continue do elseif else endfunction end for function global if pause return resume select try then while",literal:"%f %F %t %T %pi %eps %inf %nan %e %i %z %s",built_in:"abs and acos asin atan ceil cd chdir clearglobal cosh cos cumprod deff disp error exec execstr exists exp eye gettext floor fprintf fread fsolve imag isdef isempty isinfisnan isvector lasterror length load linspace list listfiles log10 log2 log max min msprintf mclose mopen ones or pathconvert poly printf prod pwd rand real round sinh sin size gsort sprintf sqrt strcat strcmps tring sum system tanh tan type typename warning zeros matrix"},illegal:'("|#|/\\*|\\s+/\\w+)',contains:[{className:"function",beginKeywords:"function",end:"$",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)"}]},{begin:"[a-zA-Z_][a-zA-Z_0-9]*('+[\\.']*|[\\.']+)",end:"",relevance:0},{begin:"\\[",end:"\\]'*[\\.']*",relevance:0,contains:t},e.COMMENT("//","$")].concat(t)}}}),define("highlight/lib/languages/scss",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="[a-zA-Z-][a-zA-Z0-9_-]*",n={className:"variable",begin:"(\\$"+t+")\\b"},i={className:"number",begin:"#[0-9A-Fa-f]+"};({className:"attribute",begin:"[A-Z\\_\\.\\-]+",end:":",excludeEnd:!0,illegal:"[^\\s]",starts:{endsWithParent:!0,excludeEnd:!0,contains:[i,e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"!important"}]}});return{case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"selector-id",begin:"\\#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},{className:"selector-attr",begin:"\\[",end:"\\]",illegal:"$"},{className:"selector-tag",begin:"\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|mark|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\\b",relevance:0},{begin:":(visited|valid|root|right|required|read-write|read-only|out-range|optional|only-of-type|only-child|nth-of-type|nth-last-of-type|nth-last-child|nth-child|not|link|left|last-of-type|last-child|lang|invalid|indeterminate|in-range|hover|focus|first-of-type|first-line|first-letter|first-child|first|enabled|empty|disabled|default|checked|before|after|active)"},{begin:"::(after|before|choices|first-letter|first-line|repeat-index|repeat-item|selection|value)"},n,{className:"attribute",begin:"\\b(z-index|word-wrap|word-spacing|word-break|width|widows|white-space|visibility|vertical-align|unicode-bidi|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform-style|transform-origin|transform|top|text-underline-position|text-transform|text-shadow|text-rendering|text-overflow|text-indent|text-decoration-style|text-decoration-line|text-decoration-color|text-decoration|text-align-last|text-align|tab-size|table-layout|right|resize|quotes|position|pointer-events|perspective-origin|perspective|page-break-inside|page-break-before|page-break-after|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-y|overflow-x|overflow-wrap|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|order|opacity|object-position|object-fit|normal|none|nav-up|nav-right|nav-left|nav-index|nav-down|min-width|min-height|max-width|max-height|mask|marks|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|letter-spacing|left|justify-content|initial|inherit|ime-mode|image-orientation|image-resolution|image-rendering|icon|hyphens|height|font-weight|font-variant-ligatures|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-language-override|font-kerning|font-feature-settings|font-family|font|float|flex-wrap|flex-shrink|flex-grow|flex-flow|flex-direction|flex-basis|flex|filter|empty-cells|display|direction|cursor|counter-reset|counter-increment|content|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|columns|color|clip-path|clip|clear|caption-side|break-inside|break-before|break-after|box-sizing|box-shadow|box-decoration-break|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-left-width|border-left-style|border-left-color|border-left|border-image-width|border-image-source|border-image-slice|border-image-repeat|border-image-outset|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-attachment|background-blend-mode|background|backface-visibility|auto|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation|align-self|align-items|align-content)\\b",illegal:"[^\\s]"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:":",end:";",contains:[n,i,e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"meta",begin:"!important"}]},{begin:"@",end:"[{;]",keywords:"mixin include extend for if else each while charset import debug media page content font-face namespace warn",contains:[n,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,i,e.CSS_NUMBER_MODE,{begin:"\\s[A-Za-z0-9_.-]+",relevance:0}]}]}}}),define("highlight/lib/languages/smali",["require","exports","module"],function(e,t,n){n.exports=function(e){var t=["add","and","cmp","cmpg","cmpl","const","div","double","float","goto","if","int","long","move","mul","neg","new","nop","not","or","rem","return","shl","shr","sput","sub","throw","ushr","xor"],n=["aget","aput","array","check","execute","fill","filled","goto/16","goto/32","iget","instance","invoke","iput","monitor","packed","sget","sparse"],i=["transient","constructor","abstract","final","synthetic","public","private","protected","static","bridge","system"];return{aliases:["smali"],contains:[{className:"string",begin:'"',end:'"',relevance:0},e.COMMENT("#","$",{relevance:0}),{className:"keyword",variants:[{begin:"\\s*\\.end\\s[a-zA-Z0-9]*"},{begin:"^[ ]*\\.[a-zA-Z]*",relevance:0},{begin:"\\s:[a-zA-Z_0-9]*",relevance:0},{begin:"\\s("+i.join("|")+")"}]},{className:"built_in",variants:[{begin:"\\s("+t.join("|")+")\\s"},{begin:"\\s("+t.join("|")+")((\\-|/)[a-zA-Z0-9]+)+\\s",relevance:10},{begin:"\\s("+n.join("|")+")((\\-|/)[a-zA-Z0-9]+)*\\s",relevance:10}]},{className:"class",begin:"L[^(;:\n]*;",relevance:0},{begin:"[vp][0-9]+"}]}}}),define("highlight/lib/languages/smalltalk",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="[a-z][a-zA-Z0-9_]*",n={className:"string",begin:"\\$.{1}"},i={className:"symbol",begin:"#"+e.UNDERSCORE_IDENT_RE};return{aliases:["st"],keywords:"self super nil true false thisContext",contains:[e.COMMENT('"','"'),e.APOS_STRING_MODE,{className:"type",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},{begin:t+":",relevance:0},e.C_NUMBER_MODE,i,n,{begin:"\\|[ ]*"+t+"([ ]+"+t+")*[ ]*\\|",returnBegin:!0,end:/\|/,illegal:/\S/,contains:[{begin:"(\\|[ ]*)?"+t}]},{begin:"\\#\\(",end:"\\)",contains:[e.APOS_STRING_MODE,n,e.C_NUMBER_MODE,i]}]}}}),define("highlight/lib/languages/sml",["require","exports","module"],function(e,t,n){n.exports=function(e){return{aliases:["ml"],keywords:{keyword:"abstype and andalso as case datatype do else end eqtype exception fn fun functor handle if in include infix infixr let local nonfix of op open orelse raise rec sharing sig signature struct structure then type val with withtype where while",built_in:"array bool char exn int list option order real ref string substring vector unit word",literal:"true false NONE SOME LESS EQUAL GREATER nil"},illegal:/\/\/|>>/,lexemes:"[a-z_]\\w*!?",contains:[{className:"literal",begin:/\[(\|\|)?\]|\(\)/,relevance:0},e.COMMENT("\\(\\*","\\*\\)",{contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{className:"type",begin:"`[A-Z][\\w']*"},{className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},{begin:"[a-z_]\\w*'[\\w']*"},e.inherit(e.APOS_STRING_MODE,{className:"string",relevance:0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"number",begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",relevance:0},{begin:/[-=]>/}]}}}),define("highlight/lib/languages/sqf",["require","exports","module"],function(e,t,n){n.exports=function(e){var t=e.getLanguage("cpp").exports,n={className:"string",variants:[{begin:'"',end:'"',contains:[{begin:'""',relevance:0}]},{begin:"'",end:"'",contains:[{begin:"''",relevance:0}]}]};return{aliases:["sqf"],case_insensitive:!0,keywords:{keyword:"case catch default do else exit exitWith for forEach from if switch then throw to try while with",built_in:"or plus abs accTime acos action actionKeys actionKeysImages actionKeysNames actionKeysNamesArray actionName activateAddons activatedAddons activateKey addAction addBackpack addBackpackCargo addBackpackCargoGlobal addBackpackGlobal addCamShake addCuratorAddons addCuratorCameraArea addCuratorEditableObjects addCuratorEditingArea addCuratorPoints addEditorObject addEventHandler addGoggles addGroupIcon addHandgunItem addHeadgear addItem addItemCargo addItemCargoGlobal addItemPool addItemToBackpack addItemToUniform addItemToVest addLiveStats addMagazine addMagazine array addMagazineAmmoCargo addMagazineCargo addMagazineCargoGlobal addMagazineGlobal addMagazinePool addMagazines addMagazineTurret addMenu addMenuItem addMissionEventHandler addMPEventHandler addMusicEventHandler addPrimaryWeaponItem addPublicVariableEventHandler addRating addResources addScore addScoreSide addSecondaryWeaponItem addSwitchableUnit addTeamMember addToRemainsCollector addUniform addVehicle addVest addWaypoint addWeapon addWeaponCargo addWeaponCargoGlobal addWeaponGlobal addWeaponPool addWeaponTurret agent agents AGLToASL aimedAtTarget aimPos airDensityRTD airportSide AISFinishHeal alive allControls allCurators allDead allDeadMen allDisplays allGroups allMapMarkers allMines allMissionObjects allow3DMode allowCrewInImmobile allowCuratorLogicIgnoreAreas allowDamage allowDammage allowFileOperations allowFleeing allowGetIn allPlayers allSites allTurrets allUnits allUnitsUAV allVariables ammo and animate animateDoor animationPhase animationState append armoryPoints arrayIntersect asin ASLToAGL ASLToATL assert assignAsCargo assignAsCargoIndex assignAsCommander assignAsDriver assignAsGunner assignAsTurret assignCurator assignedCargo assignedCommander assignedDriver assignedGunner assignedItems assignedTarget assignedTeam assignedVehicle assignedVehicleRole assignItem assignTeam assignToAirport atan atan2 atg ATLToASL attachedObject attachedObjects attachedTo attachObject attachTo attackEnabled backpack backpackCargo backpackContainer backpackItems backpackMagazines backpackSpaceFor behaviour benchmark binocular blufor boundingBox boundingBoxReal boundingCenter breakOut breakTo briefingName buildingExit buildingPos buttonAction buttonSetAction cadetMode call callExtension camCommand camCommit camCommitPrepared camCommitted camConstuctionSetParams camCreate camDestroy cameraEffect cameraEffectEnableHUD cameraInterest cameraOn cameraView campaignConfigFile camPreload camPreloaded camPrepareBank camPrepareDir camPrepareDive camPrepareFocus camPrepareFov camPrepareFovRange camPreparePos camPrepareRelPos camPrepareTarget camSetBank camSetDir camSetDive camSetFocus camSetFov camSetFovRange camSetPos camSetRelPos camSetTarget camTarget camUseNVG canAdd canAddItemToBackpack canAddItemToUniform canAddItemToVest cancelSimpleTaskDestination canFire canMove canSlingLoad canStand canUnloadInCombat captive captiveNum cbChecked cbSetChecked ceil cheatsEnabled checkAIFeature civilian className clearAllItemsFromBackpack clearBackpackCargo clearBackpackCargoGlobal clearGroupIcons clearItemCargo clearItemCargoGlobal clearItemPool clearMagazineCargo clearMagazineCargoGlobal clearMagazinePool clearOverlay clearRadio clearWeaponCargo clearWeaponCargoGlobal clearWeaponPool closeDialog closeDisplay closeOverlay collapseObjectTree combatMode commandArtilleryFire commandChat commander commandFire commandFollow commandFSM commandGetOut commandingMenu commandMove commandRadio commandStop commandTarget commandWatch comment commitOverlay compile compileFinal completedFSM composeText configClasses configFile configHierarchy configName configProperties configSourceMod configSourceModList connectTerminalToUAV controlNull controlsGroupCtrl copyFromClipboard copyToClipboard copyWaypoints cos count countEnemy countFriendly countSide countType countUnknown createAgent createCenter createDialog createDiaryLink createDiaryRecord createDiarySubject createDisplay createGearDialog createGroup createGuardedPoint createLocation createMarker createMarkerLocal createMenu createMine createMissionDisplay createSimpleTask createSite createSoundSource createTask createTeam createTrigger createUnit createUnit array createVehicle createVehicle array createVehicleCrew createVehicleLocal crew ctrlActivate ctrlAddEventHandler ctrlAutoScrollDelay ctrlAutoScrollRewind ctrlAutoScrollSpeed ctrlChecked ctrlClassName ctrlCommit ctrlCommitted ctrlCreate ctrlDelete ctrlEnable ctrlEnabled ctrlFade ctrlHTMLLoaded ctrlIDC ctrlIDD ctrlMapAnimAdd ctrlMapAnimClear ctrlMapAnimCommit ctrlMapAnimDone ctrlMapCursor ctrlMapMouseOver ctrlMapScale ctrlMapScreenToWorld ctrlMapWorldToScreen ctrlModel ctrlModelDirAndUp ctrlModelScale ctrlParent ctrlPosition ctrlRemoveAllEventHandlers ctrlRemoveEventHandler ctrlScale ctrlSetActiveColor ctrlSetAutoScrollDelay ctrlSetAutoScrollRewind ctrlSetAutoScrollSpeed ctrlSetBackgroundColor ctrlSetChecked ctrlSetEventHandler ctrlSetFade ctrlSetFocus ctrlSetFont ctrlSetFontH1 ctrlSetFontH1B ctrlSetFontH2 ctrlSetFontH2B ctrlSetFontH3 ctrlSetFontH3B ctrlSetFontH4 ctrlSetFontH4B ctrlSetFontH5 ctrlSetFontH5B ctrlSetFontH6 ctrlSetFontH6B ctrlSetFontHeight ctrlSetFontHeightH1 ctrlSetFontHeightH2 ctrlSetFontHeightH3 ctrlSetFontHeightH4 ctrlSetFontHeightH5 ctrlSetFontHeightH6 ctrlSetFontP ctrlSetFontPB ctrlSetForegroundColor ctrlSetModel ctrlSetModelDirAndUp ctrlSetModelScale ctrlSetPosition ctrlSetScale ctrlSetStructuredText ctrlSetText ctrlSetTextColor ctrlSetTooltip ctrlSetTooltipColorBox ctrlSetTooltipColorShade ctrlSetTooltipColorText ctrlShow ctrlShown ctrlText ctrlTextHeight ctrlType ctrlVisible curatorAddons curatorCamera curatorCameraArea curatorCameraAreaCeiling curatorCoef curatorEditableObjects curatorEditingArea curatorEditingAreaType curatorMouseOver curatorPoints curatorRegisteredObjects curatorSelected curatorWaypointCost currentChannel currentCommand currentMagazine currentMagazineDetail currentMagazineDetailTurret currentMagazineTurret currentMuzzle currentNamespace currentTask currentTasks currentThrowable currentVisionMode currentWaypoint currentWeapon currentWeaponMode currentWeaponTurret currentZeroing cursorTarget customChat customRadio cutFadeOut cutObj cutRsc cutText damage date dateToNumber daytime deActivateKey debriefingText debugFSM debugLog deg deleteAt deleteCenter deleteCollection deleteEditorObject deleteGroup deleteIdentity deleteLocation deleteMarker deleteMarkerLocal deleteRange deleteResources deleteSite deleteStatus deleteTeam deleteVehicle deleteVehicleCrew deleteWaypoint detach detectedMines diag activeMissionFSMs diag activeSQFScripts diag activeSQSScripts diag captureFrame diag captureSlowFrame diag fps diag fpsMin diag frameNo diag log diag logSlowFrame diag tickTime dialog diarySubjectExists didJIP didJIPOwner difficulty difficultyEnabled difficultyEnabledRTD direction directSay disableAI disableCollisionWith disableConversation disableDebriefingStats disableSerialization disableTIEquipment disableUAVConnectability disableUserInput displayAddEventHandler displayCtrl displayNull displayRemoveAllEventHandlers displayRemoveEventHandler displaySetEventHandler dissolveTeam distance distance2D distanceSqr distributionRegion doArtilleryFire doFire doFollow doFSM doGetOut doMove doorPhase doStop doTarget doWatch drawArrow drawEllipse drawIcon drawIcon3D drawLine drawLine3D drawLink drawLocation drawRectangle driver drop east echo editObject editorSetEventHandler effectiveCommander emptyPositions enableAI enableAIFeature enableAttack enableCamShake enableCaustics enableCollisionWith enableCopilot enableDebriefingStats enableDiagLegend enableEndDialog enableEngineArtillery enableEnvironment enableFatigue enableGunLights enableIRLasers enableMimics enablePersonTurret enableRadio enableReload enableRopeAttach enableSatNormalOnDetail enableSaving enableSentences enableSimulation enableSimulationGlobal enableTeamSwitch enableUAVConnectability enableUAVWaypoints endLoadingScreen endMission engineOn enginesIsOnRTD enginesRpmRTD enginesTorqueRTD entities estimatedEndServerTime estimatedTimeLeft evalObjectArgument everyBackpack everyContainer exec execEditorScript execFSM execVM exp expectedDestination eyeDirection eyePos face faction fadeMusic fadeRadio fadeSound fadeSpeech failMission fillWeaponsFromPool find findCover findDisplay findEditorObject findEmptyPosition findEmptyPositionReady findNearestEnemy finishMissionInit finite fire fireAtTarget firstBackpack flag flagOwner fleeing floor flyInHeight fog fogForecast fogParams forceAddUniform forceEnd forceMap forceRespawn forceSpeed forceWalk forceWeaponFire forceWeatherChange forEachMember forEachMemberAgent forEachMemberTeam format formation formationDirection formationLeader formationMembers formationPosition formationTask formatText formLeader freeLook fromEditor fuel fullCrew gearSlotAmmoCount gearSlotData getAllHitPointsDamage getAmmoCargo getArray getArtilleryAmmo getArtilleryComputerSettings getArtilleryETA getAssignedCuratorLogic getAssignedCuratorUnit getBackpackCargo getBleedingRemaining getBurningValue getCargoIndex getCenterOfMass getClientState getConnectedUAV getDammage getDescription getDir getDirVisual getDLCs getEditorCamera getEditorMode getEditorObjectScope getElevationOffset getFatigue getFriend getFSMVariable getFuelCargo getGroupIcon getGroupIconParams getGroupIcons getHideFrom getHit getHitIndex getHitPointDamage getItemCargo getMagazineCargo getMarkerColor getMarkerPos getMarkerSize getMarkerType getMass getModelInfo getNumber getObjectArgument getObjectChildren getObjectDLC getObjectMaterials getObjectProxy getObjectTextures getObjectType getObjectViewDistance getOxygenRemaining getPersonUsedDLCs getPlayerChannel getPlayerUID getPos getPosASL getPosASLVisual getPosASLW getPosATL getPosATLVisual getPosVisual getPosWorld getRepairCargo getResolution getShadowDistance getSlingLoad getSpeed getSuppression getTerrainHeightASL getText getVariable getWeaponCargo getWPPos glanceAt globalChat globalRadio goggles goto group groupChat groupFromNetId groupIconSelectable groupIconsVisible groupId groupOwner groupRadio groupSelectedUnits groupSelectUnit grpNull gunner gusts halt handgunItems handgunMagazine handgunWeapon handsHit hasInterface hasWeapon hcAllGroups hcGroupParams hcLeader hcRemoveAllGroups hcRemoveGroup hcSelected hcSelectGroup hcSetGroup hcShowBar hcShownBar headgear hideBody hideObject hideObjectGlobal hint hintC hintCadet hintSilent hmd hostMission htmlLoad HUDMovementLevels humidity image importAllGroups importance in incapacitatedState independent inflame inflamed inGameUISetEventHandler inheritsFrom initAmbientLife inputAction inRangeOfArtillery insertEditorObject intersect isAbleToBreathe isAgent isArray isAutoHoverOn isAutonomous isAutotest isBleeding isBurning isClass isCollisionLightOn isCopilotEnabled isDedicated isDLCAvailable isEngineOn isEqualTo isFlashlightOn isFlatEmpty isForcedWalk isFormationLeader isHidden isInRemainsCollector isInstructorFigureEnabled isIRLaserOn isKeyActive isKindOf isLightOn isLocalized isManualFire isMarkedForCollection isMultiplayer isNil isNull isNumber isObjectHidden isObjectRTD isOnRoad isPipEnabled isPlayer isRealTime isServer isShowing3DIcons isSteamMission isStreamFriendlyUIEnabled isText isTouchingGround isTurnedOut isTutHintsEnabled isUAVConnectable isUAVConnected isUniformAllowed isWalking isWeaponDeployed isWeaponRested itemCargo items itemsWithMagazines join joinAs joinAsSilent joinSilent joinString kbAddDatabase kbAddDatabaseTargets kbAddTopic kbHasTopic kbReact kbRemoveTopic kbTell kbWasSaid keyImage keyName knowsAbout land landAt landResult language laserTarget lbAdd lbClear lbColor lbCurSel lbData lbDelete lbIsSelected lbPicture lbSelection lbSetColor lbSetCurSel lbSetData lbSetPicture lbSetPictureColor lbSetPictureColorDisabled lbSetPictureColorSelected lbSetSelectColor lbSetSelectColorRight lbSetSelected lbSetTooltip lbSetValue lbSize lbSort lbSortByValue lbText lbValue leader leaderboardDeInit leaderboardGetRows leaderboardInit leaveVehicle libraryCredits libraryDisclaimers lifeState lightAttachObject lightDetachObject lightIsOn lightnings limitSpeed linearConversion lineBreak lineIntersects lineIntersectsObjs lineIntersectsSurfaces lineIntersectsWith linkItem list listObjects ln lnbAddArray lnbAddColumn lnbAddRow lnbClear lnbColor lnbCurSelRow lnbData lnbDeleteColumn lnbDeleteRow lnbGetColumnsPosition lnbPicture lnbSetColor lnbSetColumnsPos lnbSetCurSelRow lnbSetData lnbSetPicture lnbSetText lnbSetValue lnbSize lnbText lnbValue load loadAbs loadBackpack loadFile loadGame loadIdentity loadMagazine loadOverlay loadStatus loadUniform loadVest local localize locationNull locationPosition lock lockCameraTo lockCargo lockDriver locked lockedCargo lockedDriver lockedTurret lockTurret lockWP log logEntities lookAt lookAtPos magazineCargo magazines magazinesAllTurrets magazinesAmmo magazinesAmmoCargo magazinesAmmoFull magazinesDetail magazinesDetailBackpack magazinesDetailUniform magazinesDetailVest magazinesTurret magazineTurretAmmo mapAnimAdd mapAnimClear mapAnimCommit mapAnimDone mapCenterOnCamera mapGridPosition markAsFinishedOnSteam markerAlpha markerBrush markerColor markerDir markerPos markerShape markerSize markerText markerType max members min mineActive mineDetectedBy missionConfigFile missionName missionNamespace missionStart mod modelToWorld modelToWorldVisual moonIntensity morale move moveInAny moveInCargo moveInCommander moveInDriver moveInGunner moveInTurret moveObjectToEnd moveOut moveTime moveTo moveToCompleted moveToFailed musicVolume name name location nameSound nearEntities nearestBuilding nearestLocation nearestLocations nearestLocationWithDubbing nearestObject nearestObjects nearObjects nearObjectsReady nearRoads nearSupplies nearTargets needReload netId netObjNull newOverlay nextMenuItemIndex nextWeatherChange nMenuItems not numberToDate objectCurators objectFromNetId objectParent objNull objStatus onBriefingGroup onBriefingNotes onBriefingPlan onBriefingTeamSwitch onCommandModeChanged onDoubleClick onEachFrame onGroupIconClick onGroupIconOverEnter onGroupIconOverLeave onHCGroupSelectionChanged onMapSingleClick onPlayerConnected onPlayerDisconnected onPreloadFinished onPreloadStarted onShowNewObject onTeamSwitch openCuratorInterface openMap openYoutubeVideo opfor or orderGetIn overcast overcastForecast owner param params parseNumber parseText parsingNamespace particlesQuality pi pickWeaponPool pitch playableSlotsNumber playableUnits playAction playActionNow player playerRespawnTime playerSide playersNumber playGesture playMission playMove playMoveNow playMusic playScriptedMission playSound playSound3D position positionCameraToWorld posScreenToWorld posWorldToScreen ppEffectAdjust ppEffectCommit ppEffectCommitted ppEffectCreate ppEffectDestroy ppEffectEnable ppEffectForceInNVG precision preloadCamera preloadObject preloadSound preloadTitleObj preloadTitleRsc preprocessFile preprocessFileLineNumbers primaryWeapon primaryWeaponItems primaryWeaponMagazine priority private processDiaryLink productVersion profileName profileNamespace profileNameSteam progressLoadingScreen progressPosition progressSetPosition publicVariable publicVariableClient publicVariableServer pushBack putWeaponPool queryItemsPool queryMagazinePool queryWeaponPool rad radioChannelAdd radioChannelCreate radioChannelRemove radioChannelSetCallSign radioChannelSetLabel radioVolume rain rainbow random rank rankId rating rectangular registeredTasks registerTask reload reloadEnabled remoteControl remoteExec remoteExecCall removeAction removeAllActions removeAllAssignedItems removeAllContainers removeAllCuratorAddons removeAllCuratorCameraAreas removeAllCuratorEditingAreas removeAllEventHandlers removeAllHandgunItems removeAllItems removeAllItemsWithMagazines removeAllMissionEventHandlers removeAllMPEventHandlers removeAllMusicEventHandlers removeAllPrimaryWeaponItems removeAllWeapons removeBackpack removeBackpackGlobal removeCuratorAddons removeCuratorCameraArea removeCuratorEditableObjects removeCuratorEditingArea removeDrawIcon removeDrawLinks removeEventHandler removeFromRemainsCollector removeGoggles removeGroupIcon removeHandgunItem removeHeadgear removeItem removeItemFromBackpack removeItemFromUniform removeItemFromVest removeItems removeMagazine removeMagazineGlobal removeMagazines removeMagazinesTurret removeMagazineTurret removeMenuItem removeMissionEventHandler removeMPEventHandler removeMusicEventHandler removePrimaryWeaponItem removeSecondaryWeaponItem removeSimpleTask removeSwitchableUnit removeTeamMember removeUniform removeVest removeWeapon removeWeaponGlobal removeWeaponTurret requiredVersion resetCamShake resetSubgroupDirection resistance resize resources respawnVehicle restartEditorCamera reveal revealMine reverse reversedMouseY roadsConnectedTo roleDescription ropeAttachedObjects ropeAttachedTo ropeAttachEnabled ropeAttachTo ropeCreate ropeCut ropeEndPosition ropeLength ropes ropeUnwind ropeUnwound rotorsForcesRTD rotorsRpmRTD round runInitScript safeZoneH safeZoneW safeZoneWAbs safeZoneX safeZoneXAbs safeZoneY saveGame saveIdentity saveJoysticks saveOverlay saveProfileNamespace saveStatus saveVar savingEnabled say say2D say3D scopeName score scoreSide screenToWorld scriptDone scriptName scriptNull scudState secondaryWeapon secondaryWeaponItems secondaryWeaponMagazine select selectBestPlaces selectDiarySubject selectedEditorObjects selectEditorObject selectionPosition selectLeader selectNoPlayer selectPlayer selectWeapon selectWeaponTurret sendAUMessage sendSimpleCommand sendTask sendTaskResult sendUDPMessage serverCommand serverCommandAvailable serverCommandExecutable serverName serverTime set setAccTime setAirportSide setAmmo setAmmoCargo setAperture setApertureNew setArmoryPoints setAttributes setAutonomous setBehaviour setBleedingRemaining setCameraInterest setCamShakeDefParams setCamShakeParams setCamUseTi setCaptive setCenterOfMass setCollisionLight setCombatMode setCompassOscillation setCuratorCameraAreaCeiling setCuratorCoef setCuratorEditingAreaType setCuratorWaypointCost setCurrentChannel setCurrentTask setCurrentWaypoint setDamage setDammage setDate setDebriefingText setDefaultCamera setDestination setDetailMapBlendPars setDir setDirection setDrawIcon setDropInterval setEditorMode setEditorObjectScope setEffectCondition setFace setFaceAnimation setFatigue setFlagOwner setFlagSide setFlagTexture setFog setFog array setFormation setFormationTask setFormDir setFriend setFromEditor setFSMVariable setFuel setFuelCargo setGroupIcon setGroupIconParams setGroupIconsSelectable setGroupIconsVisible setGroupId setGroupIdGlobal setGroupOwner setGusts setHideBehind setHit setHitIndex setHitPointDamage setHorizonParallaxCoef setHUDMovementLevels setIdentity setImportance setLeader setLightAmbient setLightAttenuation setLightBrightness setLightColor setLightDayLight setLightFlareMaxDistance setLightFlareSize setLightIntensity setLightnings setLightUseFlare setLocalWindParams setMagazineTurretAmmo setMarkerAlpha setMarkerAlphaLocal setMarkerBrush setMarkerBrushLocal setMarkerColor setMarkerColorLocal setMarkerDir setMarkerDirLocal setMarkerPos setMarkerPosLocal setMarkerShape setMarkerShapeLocal setMarkerSize setMarkerSizeLocal setMarkerText setMarkerTextLocal setMarkerType setMarkerTypeLocal setMass setMimic setMousePosition setMusicEffect setMusicEventHandler setName setNameSound setObjectArguments setObjectMaterial setObjectProxy setObjectTexture setObjectTextureGlobal setObjectViewDistance setOvercast setOwner setOxygenRemaining setParticleCircle setParticleClass setParticleFire setParticleParams setParticleRandom setPilotLight setPiPEffect setPitch setPlayable setPlayerRespawnTime setPos setPosASL setPosASL2 setPosASLW setPosATL setPosition setPosWorld setRadioMsg setRain setRainbow setRandomLip setRank setRectangular setRepairCargo setShadowDistance setSide setSimpleTaskDescription setSimpleTaskDestination setSimpleTaskTarget setSimulWeatherLayers setSize setSkill setSkill array setSlingLoad setSoundEffect setSpeaker setSpeech setSpeedMode setStatValue setSuppression setSystemOfUnits setTargetAge setTaskResult setTaskState setTerrainGrid setText setTimeMultiplier setTitleEffect setTriggerActivation setTriggerArea setTriggerStatements setTriggerText setTriggerTimeout setTriggerType setType setUnconscious setUnitAbility setUnitPos setUnitPosWeak setUnitRank setUnitRecoilCoefficient setUnloadInCombat setUserActionText setVariable setVectorDir setVectorDirAndUp setVectorUp setVehicleAmmo setVehicleAmmoDef setVehicleArmor setVehicleId setVehicleLock setVehiclePosition setVehicleTiPars setVehicleVarName setVelocity setVelocityTransformation setViewDistance setVisibleIfTreeCollapsed setWaves setWaypointBehaviour setWaypointCombatMode setWaypointCompletionRadius setWaypointDescription setWaypointFormation setWaypointHousePosition setWaypointLoiterRadius setWaypointLoiterType setWaypointName setWaypointPosition setWaypointScript setWaypointSpeed setWaypointStatements setWaypointTimeout setWaypointType setWaypointVisible setWeaponReloadingTime setWind setWindDir setWindForce setWindStr setWPPos show3DIcons showChat showCinemaBorder showCommandingMenu showCompass showCuratorCompass showGPS showHUD showLegend showMap shownArtilleryComputer shownChat shownCompass shownCuratorCompass showNewEditorObject shownGPS shownHUD shownMap shownPad shownRadio shownUAVFeed shownWarrant shownWatch showPad showRadio showSubtitles showUAVFeed showWarrant showWatch showWaypoint side sideChat sideEnemy sideFriendly sideLogic sideRadio sideUnknown simpleTasks simulationEnabled simulCloudDensity simulCloudOcclusion simulInClouds simulWeatherSync sin size sizeOf skill skillFinal skipTime sleep sliderPosition sliderRange sliderSetPosition sliderSetRange sliderSetSpeed sliderSpeed slingLoadAssistantShown soldierMagazines someAmmo sort soundVolume spawn speaker speed speedMode splitString sqrt squadParams stance startLoadingScreen step stop stopped str sunOrMoon supportInfo suppressFor surfaceIsWater surfaceNormal surfaceType swimInDepth switchableUnits switchAction switchCamera switchGesture switchLight switchMove synchronizedObjects synchronizedTriggers synchronizedWaypoints synchronizeObjectsAdd synchronizeObjectsRemove synchronizeTrigger synchronizeWaypoint synchronizeWaypoint trigger systemChat systemOfUnits tan targetKnowledge targetsAggregate targetsQuery taskChildren taskCompleted taskDescription taskDestination taskHint taskNull taskParent taskResult taskState teamMember teamMemberNull teamName teams teamSwitch teamSwitchEnabled teamType terminate terrainIntersect terrainIntersectASL text text location textLog textLogFormat tg time timeMultiplier titleCut titleFadeOut titleObj titleRsc titleText toArray toLower toString toUpper triggerActivated triggerActivation triggerArea triggerAttachedVehicle triggerAttachObject triggerAttachVehicle triggerStatements triggerText triggerTimeout triggerTimeoutCurrent triggerType turretLocal turretOwner turretUnit tvAdd tvClear tvCollapse tvCount tvCurSel tvData tvDelete tvExpand tvPicture tvSetCurSel tvSetData tvSetPicture tvSetPictureColor tvSetTooltip tvSetValue tvSort tvSortByValue tvText tvValue type typeName typeOf UAVControl uiNamespace uiSleep unassignCurator unassignItem unassignTeam unassignVehicle underwater uniform uniformContainer uniformItems uniformMagazines unitAddons unitBackpack unitPos unitReady unitRecoilCoefficient units unitsBelowHeight unlinkItem unlockAchievement unregisterTask updateDrawIcon updateMenuItem updateObjectTree useAudioTimeForMoves vectorAdd vectorCos vectorCrossProduct vectorDiff vectorDir vectorDirVisual vectorDistance vectorDistanceSqr vectorDotProduct vectorFromTo vectorMagnitude vectorMagnitudeSqr vectorMultiply vectorNormalized vectorUp vectorUpVisual vehicle vehicleChat vehicleRadio vehicles vehicleVarName velocity velocityModelSpace verifySignature vest vestContainer vestItems vestMagazines viewDistance visibleCompass visibleGPS visibleMap visiblePosition visiblePositionASL visibleWatch waitUntil waves waypointAttachedObject waypointAttachedVehicle waypointAttachObject waypointAttachVehicle waypointBehaviour waypointCombatMode waypointCompletionRadius waypointDescription waypointFormation waypointHousePosition waypointLoiterRadius waypointLoiterType waypointName waypointPosition waypoints waypointScript waypointsEnabledUAV waypointShow waypointSpeed waypointStatements waypointTimeout waypointTimeoutCurrent waypointType waypointVisible weaponAccessories weaponCargo weaponDirection weaponLowered weapons weaponsItems weaponsItemsCargo weaponState weaponsTurret weightRTD west WFSideText wind windDir windStr wingsForcesRTD worldName worldSize worldToModel worldToModelVisual worldToScreen _forEachIndex _this _x", -literal:"true false nil"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.NUMBER_MODE,n,t.preprocessor],illegal:/#/}}}),define("highlight/lib/languages/sql",["require","exports","module"],function(e,t,n){n.exports=function(e){var t=e.COMMENT("--","$");return{case_insensitive:!0,illegal:/[<>{}*#]/,contains:[{beginKeywords:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke comment",end:/;/,endsWithParent:!0,lexemes:/[\w\.]+/,keywords:{keyword:"abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias allocate allow alter always analyze ancillary and any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound buffer_cache buffer_pool build bulk by byte byteordermark bytes cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain export export_set extended extent external external_1 external_2 externally extract failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour http id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists keep keep_duplicates key keys kill language large last last_day last_insert_id last_value lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop low low_priority lower lpad lrtrim ltrim main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second section securefile security seed segment select self sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime table tables tablespace tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek",literal:"true false null",built_in:"array bigint binary bit blob boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text varchar varying void"},contains:[{className:"string",begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE,{begin:"''"}]},{className:"string",begin:'"',end:'"',contains:[e.BACKSLASH_ESCAPE,{begin:'""'}]},{className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,t]},e.C_BLOCK_COMMENT_MODE,t]}}}),define("highlight/lib/languages/stan",["require","exports","module"],function(e,t,n){n.exports=function(e){return{contains:[e.HASH_COMMENT_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:e.UNDERSCORE_IDENT_RE,lexemes:e.UNDERSCORE_IDENT_RE,keywords:{name:"for in while repeat until if then else",symbol:"bernoulli bernoulli_logit binomial binomial_logit beta_binomial hypergeometric categorical categorical_logit ordered_logistic neg_binomial neg_binomial_2 neg_binomial_2_log poisson poisson_log multinomial normal exp_mod_normal skew_normal student_t cauchy double_exponential logistic gumbel lognormal chi_square inv_chi_square scaled_inv_chi_square exponential inv_gamma weibull frechet rayleigh wiener pareto pareto_type_2 von_mises uniform multi_normal multi_normal_prec multi_normal_cholesky multi_gp multi_gp_cholesky multi_student_t gaussian_dlm_obs dirichlet lkj_corr lkj_corr_cholesky wishart inv_wishart","selector-tag":"int real vector simplex unit_vector ordered positive_ordered row_vector matrix cholesky_factor_corr cholesky_factor_cov corr_matrix cov_matrix",title:"functions model data parameters quantities transformed generated",literal:"true false"},relevance:0},{className:"number",begin:"0[xX][0-9a-fA-F]+[Li]?\\b",relevance:0},{className:"number",begin:"0[xX][0-9a-fA-F]+[Li]?\\b",relevance:0},{className:"number",begin:"\\d+(?:[eE][+\\-]?\\d*)?L\\b",relevance:0},{className:"number",begin:"\\d+\\.(?!\\d)(?:i\\b)?",relevance:0},{className:"number",begin:"\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b",relevance:0},{className:"number",begin:"\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b",relevance:0}]}}}),define("highlight/lib/languages/stata",["require","exports","module"],function(e,t,n){n.exports=function(e){return{aliases:["do","ado"],case_insensitive:!0,keywords:"if else in foreach for forv forva forval forvalu forvalue forvalues by bys bysort xi quietly qui capture about ac ac_7 acprplot acprplot_7 adjust ado adopath adoupdate alpha ameans an ano anov anova anova_estat anova_terms anovadef aorder ap app appe appen append arch arch_dr arch_estat arch_p archlm areg areg_p args arima arima_dr arima_estat arima_p as asmprobit asmprobit_estat asmprobit_lf asmprobit_mfx__dlg asmprobit_p ass asse asser assert avplot avplot_7 avplots avplots_7 bcskew0 bgodfrey binreg bip0_lf biplot bipp_lf bipr_lf bipr_p biprobit bitest bitesti bitowt blogit bmemsize boot bootsamp bootstrap bootstrap_8 boxco_l boxco_p boxcox boxcox_6 boxcox_p bprobit br break brier bro brow brows browse brr brrstat bs bs_7 bsampl_w bsample bsample_7 bsqreg bstat bstat_7 bstat_8 bstrap bstrap_7 ca ca_estat ca_p cabiplot camat canon canon_8 canon_8_p canon_estat canon_p cap caprojection capt captu captur capture cat cc cchart cchart_7 cci cd censobs_table centile cf char chdir checkdlgfiles checkestimationsample checkhlpfiles checksum chelp ci cii cl class classutil clear cli clis clist clo clog clog_lf clog_p clogi clogi_sw clogit clogit_lf clogit_p clogitp clogl_sw cloglog clonevar clslistarray cluster cluster_measures cluster_stop cluster_tree cluster_tree_8 clustermat cmdlog cnr cnre cnreg cnreg_p cnreg_sw cnsreg codebook collaps4 collapse colormult_nb colormult_nw compare compress conf confi confir confirm conren cons const constr constra constrai constrain constraint continue contract copy copyright copysource cor corc corr corr2data corr_anti corr_kmo corr_smc corre correl correla correlat correlate corrgram cou coun count cox cox_p cox_sw coxbase coxhaz coxvar cprplot cprplot_7 crc cret cretu cretur creturn cross cs cscript cscript_log csi ct ct_is ctset ctst_5 ctst_st cttost cumsp cumsp_7 cumul cusum cusum_7 cutil d|0 datasig datasign datasigna datasignat datasignatu datasignatur datasignature datetof db dbeta de dec deco decod decode deff des desc descr descri describ describe destring dfbeta dfgls dfuller di di_g dir dirstats dis discard disp disp_res disp_s displ displa display distinct do doe doed doedi doedit dotplot dotplot_7 dprobit drawnorm drop ds ds_util dstdize duplicates durbina dwstat dydx e|0 ed edi edit egen eivreg emdef en enc enco encod encode eq erase ereg ereg_lf ereg_p ereg_sw ereghet ereghet_glf ereghet_glf_sh ereghet_gp ereghet_ilf ereghet_ilf_sh ereghet_ip eret eretu eretur ereturn err erro error est est_cfexist est_cfname est_clickable est_expand est_hold est_table est_unhold est_unholdok estat estat_default estat_summ estat_vce_only esti estimates etodow etof etomdy ex exi exit expand expandcl fac fact facto factor factor_estat factor_p factor_pca_rotated factor_rotate factormat fcast fcast_compute fcast_graph fdades fdadesc fdadescr fdadescri fdadescrib fdadescribe fdasav fdasave fdause fh_st file open file read file close file filefilter fillin find_hlp_file findfile findit findit_7 fit fl fli flis flist for5_0 form forma format fpredict frac_154 frac_adj frac_chk frac_cox frac_ddp frac_dis frac_dv frac_in frac_mun frac_pp frac_pq frac_pv frac_wgt frac_xo fracgen fracplot fracplot_7 fracpoly fracpred fron_ex fron_hn fron_p fron_tn fron_tn2 frontier ftodate ftoe ftomdy ftowdate g|0 gamhet_glf gamhet_gp gamhet_ilf gamhet_ip gamma gamma_d2 gamma_p gamma_sw gammahet gdi_hexagon gdi_spokes ge gen gene gener genera generat generate genrank genstd genvmean gettoken gl gladder gladder_7 glim_l01 glim_l02 glim_l03 glim_l04 glim_l05 glim_l06 glim_l07 glim_l08 glim_l09 glim_l10 glim_l11 glim_l12 glim_lf glim_mu glim_nw1 glim_nw2 glim_nw3 glim_p glim_v1 glim_v2 glim_v3 glim_v4 glim_v5 glim_v6 glim_v7 glm glm_6 glm_p glm_sw glmpred glo glob globa global glogit glogit_8 glogit_p gmeans gnbre_lf gnbreg gnbreg_5 gnbreg_p gomp_lf gompe_sw gomper_p gompertz gompertzhet gomphet_glf gomphet_glf_sh gomphet_gp gomphet_ilf gomphet_ilf_sh gomphet_ip gphdot gphpen gphprint gprefs gprobi_p gprobit gprobit_8 gr gr7 gr_copy gr_current gr_db gr_describe gr_dir gr_draw gr_draw_replay gr_drop gr_edit gr_editviewopts gr_example gr_example2 gr_export gr_print gr_qscheme gr_query gr_read gr_rename gr_replay gr_save gr_set gr_setscheme gr_table gr_undo gr_use graph graph7 grebar greigen greigen_7 greigen_8 grmeanby grmeanby_7 gs_fileinfo gs_filetype gs_graphinfo gs_stat gsort gwood h|0 hadimvo hareg hausman haver he heck_d2 heckma_p heckman heckp_lf heckpr_p heckprob hel help hereg hetpr_lf hetpr_p hetprob hettest hexdump hilite hist hist_7 histogram hlogit hlu hmeans hotel hotelling hprobit hreg hsearch icd9 icd9_ff icd9p iis impute imtest inbase include inf infi infil infile infix inp inpu input ins insheet insp inspe inspec inspect integ inten intreg intreg_7 intreg_p intrg2_ll intrg_ll intrg_ll2 ipolate iqreg ir irf irf_create irfm iri is_svy is_svysum isid istdize ivprob_1_lf ivprob_lf ivprobit ivprobit_p ivreg ivreg_footnote ivtob_1_lf ivtob_lf ivtobit ivtobit_p jackknife jacknife jknife jknife_6 jknife_8 jkstat joinby kalarma1 kap kap_3 kapmeier kappa kapwgt kdensity kdensity_7 keep ksm ksmirnov ktau kwallis l|0 la lab labe label labelbook ladder levels levelsof leverage lfit lfit_p li lincom line linktest lis list lloghet_glf lloghet_glf_sh lloghet_gp lloghet_ilf lloghet_ilf_sh lloghet_ip llogi_sw llogis_p llogist llogistic llogistichet lnorm_lf lnorm_sw lnorma_p lnormal lnormalhet lnormhet_glf lnormhet_glf_sh lnormhet_gp lnormhet_ilf lnormhet_ilf_sh lnormhet_ip lnskew0 loadingplot loc loca local log logi logis_lf logistic logistic_p logit logit_estat logit_p loglogs logrank loneway lookfor lookup lowess lowess_7 lpredict lrecomp lroc lroc_7 lrtest ls lsens lsens_7 lsens_x lstat ltable ltable_7 ltriang lv lvr2plot lvr2plot_7 m|0 ma mac macr macro makecns man manova manova_estat manova_p manovatest mantel mark markin markout marksample mat mat_capp mat_order mat_put_rr mat_rapp mata mata_clear mata_describe mata_drop mata_matdescribe mata_matsave mata_matuse mata_memory mata_mlib mata_mosave mata_rename mata_which matalabel matcproc matlist matname matr matri matrix matrix_input__dlg matstrik mcc mcci md0_ md1_ md1debug_ md2_ md2debug_ mds mds_estat mds_p mdsconfig mdslong mdsmat mdsshepard mdytoe mdytof me_derd mean means median memory memsize meqparse mer merg merge mfp mfx mhelp mhodds minbound mixed_ll mixed_ll_reparm mkassert mkdir mkmat mkspline ml ml_5 ml_adjs ml_bhhhs ml_c_d ml_check ml_clear ml_cnt ml_debug ml_defd ml_e0 ml_e0_bfgs ml_e0_cycle ml_e0_dfp ml_e0i ml_e1 ml_e1_bfgs ml_e1_bhhh ml_e1_cycle ml_e1_dfp ml_e2 ml_e2_cycle ml_ebfg0 ml_ebfr0 ml_ebfr1 ml_ebh0q ml_ebhh0 ml_ebhr0 ml_ebr0i ml_ecr0i ml_edfp0 ml_edfr0 ml_edfr1 ml_edr0i ml_eds ml_eer0i ml_egr0i ml_elf ml_elf_bfgs ml_elf_bhhh ml_elf_cycle ml_elf_dfp ml_elfi ml_elfs ml_enr0i ml_enrr0 ml_erdu0 ml_erdu0_bfgs ml_erdu0_bhhh ml_erdu0_bhhhq ml_erdu0_cycle ml_erdu0_dfp ml_erdu0_nrbfgs ml_exde ml_footnote ml_geqnr ml_grad0 ml_graph ml_hbhhh ml_hd0 ml_hold ml_init ml_inv ml_log ml_max ml_mlout ml_mlout_8 ml_model ml_nb0 ml_opt ml_p ml_plot ml_query ml_rdgrd ml_repor ml_s_e ml_score ml_searc ml_technique ml_unhold mleval mlf_ mlmatbysum mlmatsum mlog mlogi mlogit mlogit_footnote mlogit_p mlopts mlsum mlvecsum mnl0_ mor more mov move mprobit mprobit_lf mprobit_p mrdu0_ mrdu1_ mvdecode mvencode mvreg mvreg_estat n|0 nbreg nbreg_al nbreg_lf nbreg_p nbreg_sw nestreg net newey newey_7 newey_p news nl nl_7 nl_9 nl_9_p nl_p nl_p_7 nlcom nlcom_p nlexp2 nlexp2_7 nlexp2a nlexp2a_7 nlexp3 nlexp3_7 nlgom3 nlgom3_7 nlgom4 nlgom4_7 nlinit nllog3 nllog3_7 nllog4 nllog4_7 nlog_rd nlogit nlogit_p nlogitgen nlogittree nlpred no nobreak noi nois noisi noisil noisily note notes notes_dlg nptrend numlabel numlist odbc old_ver olo olog ologi ologi_sw ologit ologit_p ologitp on one onew onewa oneway op_colnm op_comp op_diff op_inv op_str opr opro oprob oprob_sw oprobi oprobi_p oprobit oprobitp opts_exclusive order orthog orthpoly ou out outf outfi outfil outfile outs outsh outshe outshee outsheet ovtest pac pac_7 palette parse parse_dissim pause pca pca_8 pca_display pca_estat pca_p pca_rotate pcamat pchart pchart_7 pchi pchi_7 pcorr pctile pentium pergram pergram_7 permute permute_8 personal peto_st pkcollapse pkcross pkequiv pkexamine pkexamine_7 pkshape pksumm pksumm_7 pl plo plot plugin pnorm pnorm_7 poisgof poiss_lf poiss_sw poisso_p poisson poisson_estat post postclose postfile postutil pperron pr prais prais_e prais_e2 prais_p predict predictnl preserve print pro prob probi probit probit_estat probit_p proc_time procoverlay procrustes procrustes_estat procrustes_p profiler prog progr progra program prop proportion prtest prtesti pwcorr pwd q\\s qby qbys qchi qchi_7 qladder qladder_7 qnorm qnorm_7 qqplot qqplot_7 qreg qreg_c qreg_p qreg_sw qu quadchk quantile quantile_7 que quer query range ranksum ratio rchart rchart_7 rcof recast reclink recode reg reg3 reg3_p regdw regr regre regre_p2 regres regres_p regress regress_estat regriv_p remap ren rena renam rename renpfix repeat replace report reshape restore ret retu retur return rm rmdir robvar roccomp roccomp_7 roccomp_8 rocf_lf rocfit rocfit_8 rocgold rocplot rocplot_7 roctab roctab_7 rolling rologit rologit_p rot rota rotat rotate rotatemat rreg rreg_p ru run runtest rvfplot rvfplot_7 rvpplot rvpplot_7 sa safesum sample sampsi sav save savedresults saveold sc sca scal scala scalar scatter scm_mine sco scob_lf scob_p scobi_sw scobit scor score scoreplot scoreplot_help scree screeplot screeplot_help sdtest sdtesti se search separate seperate serrbar serrbar_7 serset set set_defaults sfrancia sh she shel shell shewhart shewhart_7 signestimationsample signrank signtest simul simul_7 simulate simulate_8 sktest sleep slogit slogit_d2 slogit_p smooth snapspan so sor sort spearman spikeplot spikeplot_7 spikeplt spline_x split sqreg sqreg_p sret sretu sretur sreturn ssc st st_ct st_hc st_hcd st_hcd_sh st_is st_issys st_note st_promo st_set st_show st_smpl st_subid stack statsby statsby_8 stbase stci stci_7 stcox stcox_estat stcox_fr stcox_fr_ll stcox_p stcox_sw stcoxkm stcoxkm_7 stcstat stcurv stcurve stcurve_7 stdes stem stepwise stereg stfill stgen stir stjoin stmc stmh stphplot stphplot_7 stphtest stphtest_7 stptime strate strate_7 streg streg_sw streset sts sts_7 stset stsplit stsum sttocc sttoct stvary stweib su suest suest_8 sum summ summa summar summari summariz summarize sunflower sureg survcurv survsum svar svar_p svmat svy svy_disp svy_dreg svy_est svy_est_7 svy_estat svy_get svy_gnbreg_p svy_head svy_header svy_heckman_p svy_heckprob_p svy_intreg_p svy_ivreg_p svy_logistic_p svy_logit_p svy_mlogit_p svy_nbreg_p svy_ologit_p svy_oprobit_p svy_poisson_p svy_probit_p svy_regress_p svy_sub svy_sub_7 svy_x svy_x_7 svy_x_p svydes svydes_8 svygen svygnbreg svyheckman svyheckprob svyintreg svyintreg_7 svyintrg svyivreg svylc svylog_p svylogit svymarkout svymarkout_8 svymean svymlog svymlogit svynbreg svyolog svyologit svyoprob svyoprobit svyopts svypois svypois_7 svypoisson svyprobit svyprobt svyprop svyprop_7 svyratio svyreg svyreg_p svyregress svyset svyset_7 svyset_8 svytab svytab_7 svytest svytotal sw sw_8 swcnreg swcox swereg swilk swlogis swlogit swologit swoprbt swpois swprobit swqreg swtobit swweib symmetry symmi symplot symplot_7 syntax sysdescribe sysdir sysuse szroeter ta tab tab1 tab2 tab_or tabd tabdi tabdis tabdisp tabi table tabodds tabodds_7 tabstat tabu tabul tabula tabulat tabulate te tempfile tempname tempvar tes test testnl testparm teststd tetrachoric time_it timer tis tob tobi tobit tobit_p tobit_sw token tokeni tokeniz tokenize tostring total translate translator transmap treat_ll treatr_p treatreg trim trnb_cons trnb_mean trpoiss_d2 trunc_ll truncr_p truncreg tsappend tset tsfill tsline tsline_ex tsreport tsrevar tsrline tsset tssmooth tsunab ttest ttesti tut_chk tut_wait tutorial tw tware_st two twoway twoway__fpfit_serset twoway__function_gen twoway__histogram_gen twoway__ipoint_serset twoway__ipoints_serset twoway__kdensity_gen twoway__lfit_serset twoway__normgen_gen twoway__pci_serset twoway__qfit_serset twoway__scatteri_serset twoway__sunflower_gen twoway_ksm_serset ty typ type typeof u|0 unab unabbrev unabcmd update us use uselabel var var_mkcompanion var_p varbasic varfcast vargranger varirf varirf_add varirf_cgraph varirf_create varirf_ctable varirf_describe varirf_dir varirf_drop varirf_erase varirf_graph varirf_ograph varirf_rename varirf_set varirf_table varlist varlmar varnorm varsoc varstable varstable_w varstable_w2 varwle vce vec vec_fevd vec_mkphi vec_p vec_p_w vecirf_create veclmar veclmar_w vecnorm vecnorm_w vecrank vecstable verinst vers versi versio version view viewsource vif vwls wdatetof webdescribe webseek webuse weib1_lf weib2_lf weib_lf weib_lf0 weibhet_glf weibhet_glf_sh weibhet_glfa weibhet_glfa_sh weibhet_gp weibhet_ilf weibhet_ilf_sh weibhet_ilfa weibhet_ilfa_sh weibhet_ip weibu_sw weibul_p weibull weibull_c weibull_s weibullhet wh whelp whi which whil while wilc_st wilcoxon win wind windo window winexec wntestb wntestb_7 wntestq xchart xchart_7 xcorr xcorr_7 xi xi_6 xmlsav xmlsave xmluse xpose xsh xshe xshel xshell xt_iis xt_tis xtab_p xtabond xtbin_p xtclog xtcloglog xtcloglog_8 xtcloglog_d2 xtcloglog_pa_p xtcloglog_re_p xtcnt_p xtcorr xtdata xtdes xtfront_p xtfrontier xtgee xtgee_elink xtgee_estat xtgee_makeivar xtgee_p xtgee_plink xtgls xtgls_p xthaus xthausman xtht_p xthtaylor xtile xtint_p xtintreg xtintreg_8 xtintreg_d2 xtintreg_p xtivp_1 xtivp_2 xtivreg xtline xtline_ex xtlogit xtlogit_8 xtlogit_d2 xtlogit_fe_p xtlogit_pa_p xtlogit_re_p xtmixed xtmixed_estat xtmixed_p xtnb_fe xtnb_lf xtnbreg xtnbreg_pa_p xtnbreg_refe_p xtpcse xtpcse_p xtpois xtpoisson xtpoisson_d2 xtpoisson_pa_p xtpoisson_refe_p xtpred xtprobit xtprobit_8 xtprobit_d2 xtprobit_re_p xtps_fe xtps_lf xtps_ren xtps_ren_8 xtrar_p xtrc xtrc_p xtrchh xtrefe_p xtreg xtreg_be xtreg_fe xtreg_ml xtreg_pa_p xtreg_re xtregar xtrere_p xtset xtsf_ll xtsf_llti xtsum xttab xttest0 xttobit xttobit_8 xttobit_p xttrans yx yxview__barlike_draw yxview_area_draw yxview_bar_draw yxview_dot_draw yxview_dropline_draw yxview_function_draw yxview_iarrow_draw yxview_ilabels_draw yxview_normal_draw yxview_pcarrow_draw yxview_pcbarrow_draw yxview_pccapsym_draw yxview_pcscatter_draw yxview_pcspike_draw yxview_rarea_draw yxview_rbar_draw yxview_rbarm_draw yxview_rcap_draw yxview_rcapsym_draw yxview_rconnected_draw yxview_rline_draw yxview_rscatter_draw yxview_rspike_draw yxview_spike_draw yxview_sunflower_draw zap_s zinb zinb_llf zinb_plf zip zip_llf zip_p zip_plf zt_ct_5 zt_hc_5 zt_hcd_5 zt_is_5 zt_iss_5 zt_sho_5 zt_smp_5 ztbase_5 ztcox_5 ztdes_5 ztereg_5 ztfill_5 ztgen_5 ztir_5 ztjoin_5 ztnb ztnb_p ztp ztp_p zts_5 ztset_5 ztspli_5 ztsum_5 zttoct_5 ztvary_5 ztweib_5",contains:[{className:"symbol",begin:/`[a-zA-Z0-9_]+'/},{className:"variable",begin:/\$\{?[a-zA-Z0-9_]+\}?/},{className:"string",variants:[{begin:'`"[^\r\n]*?"\''},{begin:'"[^\r\n"]*"'}]},{className:"built_in",variants:[{begin:"\\b(abs|acos|asin|atan|atan2|atanh|ceil|cloglog|comb|cos|digamma|exp|floor|invcloglog|invlogit|ln|lnfact|lnfactorial|lngamma|log|log10|max|min|mod|reldif|round|sign|sin|sqrt|sum|tan|tanh|trigamma|trunc|betaden|Binomial|binorm|binormal|chi2|chi2tail|dgammapda|dgammapdada|dgammapdadx|dgammapdx|dgammapdxdx|F|Fden|Ftail|gammaden|gammap|ibeta|invbinomial|invchi2|invchi2tail|invF|invFtail|invgammap|invibeta|invnchi2|invnFtail|invnibeta|invnorm|invnormal|invttail|nbetaden|nchi2|nFden|nFtail|nibeta|norm|normal|normalden|normd|npnchi2|tden|ttail|uniform|abbrev|char|index|indexnot|length|lower|ltrim|match|plural|proper|real|regexm|regexr|regexs|reverse|rtrim|string|strlen|strlower|strltrim|strmatch|strofreal|strpos|strproper|strreverse|strrtrim|strtrim|strupper|subinstr|subinword|substr|trim|upper|word|wordcount|_caller|autocode|byteorder|chop|clip|cond|e|epsdouble|epsfloat|group|inlist|inrange|irecode|matrix|maxbyte|maxdouble|maxfloat|maxint|maxlong|mi|minbyte|mindouble|minfloat|minint|minlong|missing|r|recode|replay|return|s|scalar|d|date|day|dow|doy|halfyear|mdy|month|quarter|week|year|d|daily|dofd|dofh|dofm|dofq|dofw|dofy|h|halfyearly|hofd|m|mofd|monthly|q|qofd|quarterly|tin|twithin|w|weekly|wofd|y|yearly|yh|ym|yofd|yq|yw|cholesky|colnumb|colsof|corr|det|diag|diag0cnt|el|get|hadamard|I|inv|invsym|issym|issymmetric|J|matmissing|matuniform|mreldif|nullmat|rownumb|rowsof|sweep|syminv|trace|vec|vecdiag)(?=\\(|$)"}]},e.COMMENT("^[ \t]*\\*.*$",!1),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}}}),define("highlight/lib/languages/step21",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="[A-Z_][A-Z0-9_.]*",n={keyword:"HEADER ENDSEC DATA"},i={className:"meta",begin:"ISO-10303-21;",relevance:10},r={className:"meta",begin:"END-ISO-10303-21;",relevance:10};return{aliases:["p21","step","stp"],case_insensitive:!0,lexemes:t,keywords:n,contains:[i,r,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.COMMENT("/\\*\\*!","\\*/"),e.C_NUMBER_MODE,e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"'",end:"'"},{className:"symbol",variants:[{begin:"#",end:"\\d+",illegal:"\\W"}]}]}}}),define("highlight/lib/languages/stylus",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"variable",begin:"\\$"+e.IDENT_RE},n={className:"number",begin:"#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})"},i=["charset","css","debug","extend","font-face","for","import","include","media","mixin","page","warn","while"],r=["after","before","first-letter","first-line","active","first-child","focus","hover","lang","link","visited"],a=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],o="[\\.\\s\\n\\[\\:,]",s=["align-content","align-items","align-self","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","auto","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","clip-path","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","font","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-variant-ligatures","font-weight","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inherit","initial","justify-content","left","letter-spacing","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","mask","max-height","max-width","min-height","min-width","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","perspective","perspective-origin","pointer-events","position","quotes","resize","right","tab-size","table-layout","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-indent","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","white-space","widows","width","word-break","word-spacing","word-wrap","z-index"],l=["\\?","(\\bReturn\\b)","(\\bEnd\\b)","(\\bend\\b)","(\\bdef\\b)",";","#\\s","\\*\\s","===\\s","\\|","%"]; -return{aliases:["styl"],case_insensitive:!1,keywords:"if else for in",illegal:"("+l.join("|")+")",contains:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,{begin:"\\.[a-zA-Z][a-zA-Z0-9_-]*"+o,returnBegin:!0,contains:[{className:"selector-class",begin:"\\.[a-zA-Z][a-zA-Z0-9_-]*"}]},{begin:"\\#[a-zA-Z][a-zA-Z0-9_-]*"+o,returnBegin:!0,contains:[{className:"selector-id",begin:"\\#[a-zA-Z][a-zA-Z0-9_-]*"}]},{begin:"\\b("+a.join("|")+")"+o,returnBegin:!0,contains:[{className:"selector-tag",begin:"\\b[a-zA-Z][a-zA-Z0-9_-]*"}]},{begin:"&?:?:\\b("+r.join("|")+")"+o},{begin:"@("+i.join("|")+")\\b"},t,e.CSS_NUMBER_MODE,e.NUMBER_MODE,{className:"function",begin:"^[a-zA-Z][a-zA-Z0-9_-]*\\(.*\\)",illegal:"[\\n]",returnBegin:!0,contains:[{className:"title",begin:"\\b[a-zA-Z][a-zA-Z0-9_-]*"},{className:"params",begin:/\(/,end:/\)/,contains:[n,t,e.APOS_STRING_MODE,e.CSS_NUMBER_MODE,e.NUMBER_MODE,e.QUOTE_STRING_MODE]}]},{className:"attribute",begin:"\\b("+s.reverse().join("|")+")\\b",starts:{end:/;|$/,contains:[n,t,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.CSS_NUMBER_MODE,e.NUMBER_MODE,e.C_BLOCK_COMMENT_MODE],illegal:/\./,relevance:0}}]}}}),define("highlight/lib/languages/subunit",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"string",begin:"\\[\n(multipart)?",end:"\\]\n"},n={className:"string",begin:"\\d{4}-\\d{2}-\\d{2}(\\s+)\\d{2}:\\d{2}:\\d{2}.\\d+Z"},i={className:"string",begin:"(\\+|-)\\d+"},r={className:"keyword",relevance:10,variants:[{begin:"^(test|testing|success|successful|failure|error|skip|xfail|uxsuccess)(:?)\\s+(test)?"},{begin:"^progress(:?)(\\s+)?(pop|push)?"},{begin:"^tags:"},{begin:"^time:"}]};return{case_insensitive:!0,contains:[t,n,i,r]}}}),define("highlight/lib/languages/swift",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={keyword:"__COLUMN__ __FILE__ __FUNCTION__ __LINE__ as as! as? associativity break case catch class continue convenience default defer deinit didSet do dynamic dynamicType else enum extension fallthrough false final for func get guard if import in indirect infix init inout internal is lazy left let mutating nil none nonmutating operator optional override postfix precedence prefix private protocol Protocol public repeat required rethrows return right self Self set static struct subscript super switch throw throws true try try! try? Type typealias unowned var weak where while willSet",literal:"true false nil",built_in:"abs advance alignof alignofValue anyGenerator assert assertionFailure bridgeFromObjectiveC bridgeFromObjectiveCUnconditional bridgeToObjectiveC bridgeToObjectiveCUnconditional c contains count countElements countLeadingZeros debugPrint debugPrintln distance dropFirst dropLast dump encodeBitsAsWords enumerate equal fatalError filter find getBridgedObjectiveCType getVaList indices insertionSort isBridgedToObjectiveC isBridgedVerbatimToObjectiveC isUniquelyReferenced isUniquelyReferencedNonObjC join lazy lexicographicalCompare map max maxElement min minElement numericCast overlaps partition posix precondition preconditionFailure print println quickSort readLine reduce reflect reinterpretCast reverse roundUpToAlignment sizeof sizeofValue sort split startsWith stride strideof strideofValue swap toString transcode underestimateCount unsafeAddressOf unsafeBitCast unsafeDowncast unsafeUnwrap unsafeReflect withExtendedLifetime withObjectAtPlusZero withUnsafePointer withUnsafePointerToObject withUnsafeMutablePointer withUnsafeMutablePointers withUnsafePointer withUnsafePointers withVaList zip"},n={className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},i=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r={className:"subst",begin:/\\\(/,end:"\\)",keywords:t,contains:[]},a={className:"number",begin:"\\b([\\d_]+(\\.[\\deE_]+)?|0x[a-fA-F0-9_]+(\\.[a-fA-F0-9p_]+)?|0b[01_]+|0o[0-7_]+)\\b",relevance:0},o=e.inherit(e.QUOTE_STRING_MODE,{contains:[r,e.BACKSLASH_ESCAPE]});return r.contains=[a],{keywords:t,contains:[o,e.C_LINE_COMMENT_MODE,i,n,a,{className:"function",beginKeywords:"func",end:"{",excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/}),{begin://},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,contains:["self",a,o,e.C_BLOCK_COMMENT_MODE,{begin:":"}],illegal:/["']/}],illegal:/\[|%/},{className:"class",beginKeywords:"struct protocol class extension enum",keywords:t,end:"\\{",excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/})]},{className:"meta",begin:"(@warn_unused_result|@exported|@lazy|@noescape|@NSCopying|@NSManaged|@objc|@convention|@required|@noreturn|@IBAction|@IBDesignable|@IBInspectable|@IBOutlet|@infix|@prefix|@postfix|@autoclosure|@testable|@available|@nonobjc|@NSApplicationMain|@UIApplicationMain)"},{beginKeywords:"import",end:/$/,contains:[e.C_LINE_COMMENT_MODE,i]}]}}}),define("highlight/lib/languages/taggerscript",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"comment",begin:/\$noop\(/,end:/\)/,contains:[{begin:/\(/,end:/\)/,contains:["self",{begin:/\\./}]}],relevance:10},n={className:"keyword",begin:/\$(?!noop)[a-zA-Z][_a-zA-Z0-9]*/,end:/\(/,excludeEnd:!0},i={className:"variable",begin:/%[_a-zA-Z0-9:]*/,end:"%"},r={className:"symbol",begin:/\\./};return{contains:[t,n,i,r]}}}),define("highlight/lib/languages/yaml",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={literal:"{ } true false yes no Yes No True False null"},n="^[ \\-]*",i="[a-zA-Z_][\\w\\-]*",r={className:"attr",variants:[{begin:n+i+":"},{begin:n+'"'+i+'":'},{begin:n+"'"+i+"':"}]},a={className:"template-variable",variants:[{begin:"{{",end:"}}"},{begin:"%{",end:"}"}]},o={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/}],contains:[e.BACKSLASH_ESCAPE,a]};return{case_insensitive:!0,aliases:["yml","YAML","yaml"],contains:[r,{className:"meta",begin:"^---s*$",relevance:10},{className:"string",begin:"[\\|>] *$",returnEnd:!0,contains:o.contains,end:r.variants[0].begin},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!!"+e.UNDERSCORE_IDENT_RE},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"^ *-",relevance:0},o,e.HASH_COMMENT_MODE,e.C_NUMBER_MODE],keywords:t}}}),define("highlight/lib/languages/tap",["require","exports","module"],function(e,t,n){n.exports=function(e){return{case_insensitive:!0,contains:[e.HASH_COMMENT_MODE,{className:"meta",variants:[{begin:"^TAP version (\\d+)$"},{begin:"^1\\.\\.(\\d+)$"}]},{begin:"(s+)?---$",end:"\\.\\.\\.$",subLanguage:"yaml",relevance:0},{className:"number",begin:" (\\d+) "},{className:"symbol",variants:[{begin:"^ok"},{begin:"^not ok"}]}]}}}),define("highlight/lib/languages/tcl",["require","exports","module"],function(e,t,n){n.exports=function(e){return{aliases:["tk"],keywords:"after append apply array auto_execok auto_import auto_load auto_mkindex auto_mkindex_old auto_qualify auto_reset bgerror binary break catch cd chan clock close concat continue dde dict encoding eof error eval exec exit expr fblocked fconfigure fcopy file fileevent filename flush for foreach format gets glob global history http if incr info interp join lappend|10 lassign|10 lindex|10 linsert|10 list llength|10 load lrange|10 lrepeat|10 lreplace|10 lreverse|10 lsearch|10 lset|10 lsort|10 mathfunc mathop memory msgcat namespace open package parray pid pkg::create pkg_mkIndex platform platform::shell proc puts pwd read refchan regexp registry regsub|10 rename return safe scan seek set socket source split string subst switch tcl_endOfWord tcl_findLibrary tcl_startOfNextWord tcl_startOfPreviousWord tcl_wordBreakAfter tcl_wordBreakBefore tcltest tclvars tell time tm trace unknown unload unset update uplevel upvar variable vwait while",contains:[e.COMMENT(";[ \\t]*#","$"),e.COMMENT("^[ \\t]*#","$"),{beginKeywords:"proc",end:"[\\{]",excludeEnd:!0,contains:[{className:"title",begin:"[ \\t\\n\\r]+(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"[ \\t\\n\\r]",endsWithParent:!0,excludeEnd:!0}]},{excludeEnd:!0,variants:[{begin:"\\$(\\{)?(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*\\(([a-zA-Z0-9_])*\\)",end:"[^a-zA-Z0-9_\\}\\$]"},{begin:"\\$(\\{)?(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"(\\))?[^a-zA-Z0-9_\\}\\$]"}]},{className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null})]},{className:"number",variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]}]}}}),define("highlight/lib/languages/tex",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"tag",begin:/\\/,relevance:0,contains:[{className:"name",variants:[{begin:/[a-zA-Zа-яА-я]+[*]?/},{begin:/[^a-zA-Zа-яА-я0-9]/}],starts:{endsWithParent:!0,relevance:0,contains:[{className:"string",variants:[{begin:/\[/,end:/\]/},{begin:/\{/,end:/\}/}]},{begin:/\s*=\s*/,endsWithParent:!0,relevance:0,contains:[{className:"number",begin:/-?\d*\.?\d+(pt|pc|mm|cm|in|dd|cc|ex|em)?/}]}]}}]};return{contains:[t,{className:"formula",contains:[t],relevance:0,variants:[{begin:/\$\$/,end:/\$\$/},{begin:/\$/,end:/\$/}]},e.COMMENT("%","$",{relevance:0})]}}}),define("highlight/lib/languages/thrift",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="bool byte i16 i32 i64 double string binary";return{keywords:{keyword:"namespace const typedef struct enum service exception void oneway set list map required optional",built_in:t,literal:"true false"},contains:[e.QUOTE_STRING_MODE,e.NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"class",beginKeywords:"struct enum service exception",end:/\{/,illegal:/\n/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]},{begin:"\\b(set|list|map)\\s*<",end:">",keywords:t,contains:["self"]}]}}}),define("highlight/lib/languages/tp",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"number",begin:"[1-9][0-9]*",relevance:0},n={className:"symbol",begin:":[^\\]]+"},i={className:"built_in",begin:"(AR|P|PAYLOAD|PR|R|SR|RSR|LBL|VR|UALM|MESSAGE|UTOOL|UFRAME|TIMER| TIMER_OVERFLOW|JOINT_MAX_SPEED|RESUME_PROG|DIAG_REC)\\[",end:"\\]",contains:["self",t,n]},r={className:"built_in",begin:"(AI|AO|DI|DO|F|RI|RO|UI|UO|GI|GO|SI|SO)\\[",end:"\\]",contains:["self",t,e.QUOTE_STRING_MODE,n]};return{keywords:{keyword:"ABORT ACC ADJUST AND AP_LD BREAK CALL CNT COL CONDITION CONFIG DA DB DIV DETECT ELSE END ENDFOR ERR_NUM ERROR_PROG FINE FOR GP GUARD INC IF JMP LINEAR_MAX_SPEED LOCK MOD MONITOR OFFSET Offset OR OVERRIDE PAUSE PREG PTH RT_LD RUN SELECT SKIP Skip TA TB TO TOOL_OFFSET Tool_Offset UF UT UFRAME_NUM UTOOL_NUM UNLOCK WAIT X Y Z W P R STRLEN SUBSTR FINDSTR VOFFSET PROG ATTR MN POS",literal:"ON OFF max_speed LPOS JPOS ENABLE DISABLE START STOP RESET"},contains:[i,r,{className:"keyword",begin:"/(PROG|ATTR|MN|POS|END)\\b"},{className:"keyword",begin:"(CALL|RUN|POINT_LOGIC|LBL)\\b"},{className:"keyword",begin:"\\b(ACC|CNT|Skip|Offset|PSPD|RT_LD|AP_LD|Tool_Offset)"},{className:"number",begin:"\\d+(sec|msec|mm/sec|cm/min|inch/min|deg/sec|mm|in|cm)?\\b",relevance:0},e.COMMENT("//","[;$]"),e.COMMENT("!","[;$]"),e.COMMENT("--eg:","$"),e.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"'"},e.C_NUMBER_MODE,{className:"variable",begin:"\\$[A-Za-z0-9_]+"}]}}}),define("highlight/lib/languages/twig",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"params",begin:"\\(",end:"\\)"},n="attribute block constant cycle date dump include max min parent random range source template_from_string",i={beginKeywords:n,keywords:{name:n},relevance:0,contains:[t]},r={begin:/\|[A-Za-z_]+:?/,keywords:"abs batch capitalize convert_encoding date date_modify default escape first format join json_encode keys last length lower merge nl2br number_format raw replace reverse round slice sort split striptags title trim upper url_encode",contains:[i]},a="autoescape block do embed extends filter flush for if import include macro sandbox set spaceless use verbatim";return a=a+" "+a.split(" ").map(function(e){return"end"+e}).join(" "),{aliases:["craftcms"],case_insensitive:!0,subLanguage:"xml",contains:[e.COMMENT(/\{#/,/#}/),{className:"template-tag",begin:/\{%/,end:/%}/,contains:[{className:"name",begin:/\w+/,keywords:a,starts:{endsWithParent:!0,contains:[r,i],relevance:0}}]},{className:"template-variable",begin:/\{\{/,end:/}}/,contains:["self",r,i]}]}}}),define("highlight/lib/languages/typescript",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const class public private protected get set super static implements enum export import declare type namespace abstract",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document any number boolean string void"};return{aliases:["ts"],keywords:t,contains:[{className:"meta",begin:/^\s*['"]use strict['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,{className:"subst",begin:"\\$\\{",end:"\\}"}]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"number",variants:[{begin:"\\b(0[bB][01]+)"},{begin:"\\b(0[oO][0-7]+)"},{begin:e.C_NUMBER_RE}],relevance:0},{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.REGEXP_MODE],relevance:0},{className:"function",begin:"function",end:/[\{;]/,excludeEnd:!0,keywords:t,contains:["self",e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/}),{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:/["'\(]/}],illegal:/%/,relevance:0},{beginKeywords:"constructor",end:/\{/,excludeEnd:!0},{begin:/module\./,keywords:{built_in:"module"},relevance:0},{beginKeywords:"module",end:/\{/,excludeEnd:!0},{beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:"interface extends"},{begin:/\$[(.]/},{begin:"\\."+e.IDENT_RE,relevance:0}]}}}),define("highlight/lib/languages/vala",["require","exports","module"],function(e,t,n){n.exports=function(e){return{keywords:{keyword:"char uchar unichar int uint long ulong short ushort int8 int16 int32 int64 uint8 uint16 uint32 uint64 float double bool struct enum string void weak unowned owned async signal static abstract interface override virtual delegate if while do for foreach else switch case break default return try catch public private protected internal using new this get set const stdout stdin stderr var",built_in:"DBus GLib CCode Gee Object Gtk Posix",literal:"false true null"},contains:[{className:"class",beginKeywords:"class interface namespace",end:"{",excludeEnd:!0,illegal:"[^,:\\n\\s\\.]",contains:[e.UNDERSCORE_TITLE_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",begin:'"""',end:'"""',relevance:5},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{className:"meta",begin:"^#",end:"$",relevance:2}]}}}),define("highlight/lib/languages/vbnet",["require","exports","module"],function(e,t,n){n.exports=function(e){return{aliases:["vb"],case_insensitive:!0,keywords:{keyword:"addhandler addressof alias and andalso aggregate ansi as assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into is isfalse isnot istrue join key let lib like loop me mid mod module mustinherit mustoverride mybase myclass namespace narrowing new next not notinheritable notoverridable of off on operator option optional or order orelse overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim rem removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly xor",built_in:"boolean byte cbool cbyte cchar cdate cdec cdbl char cint clng cobj csbyte cshort csng cstr ctype date decimal directcast double gettype getxmlnamespace iif integer long object sbyte short single string trycast typeof uinteger ulong ushort",literal:"true false nothing"},illegal:"//|{|}|endif|gosub|variant|wend",contains:[e.inherit(e.QUOTE_STRING_MODE,{contains:[{begin:'""'}]}),e.COMMENT("'","$",{returnBegin:!0,contains:[{className:"doctag",begin:"'''|",contains:[e.PHRASAL_WORDS_MODE]},{className:"doctag",begin:"",contains:[e.PHRASAL_WORDS_MODE]}]}),e.C_NUMBER_MODE,{className:"meta",begin:"#",end:"$",keywords:{"meta-keyword":"if else elseif end region externalsource"}}]}}}),define("highlight/lib/languages/vbscript",["require","exports","module"],function(e,t,n){n.exports=function(e){return{aliases:["vbs"],case_insensitive:!0,keywords:{keyword:"call class const dim do loop erase execute executeglobal exit for each next function if then else on error option explicit new private property let get public randomize redim rem select case set stop sub while wend with end to elseif is or xor and not class_initialize class_terminate default preserve in me byval byref step resume goto",built_in:"lcase month vartype instrrev ubound setlocale getobject rgb getref string weekdayname rnd dateadd monthname now day minute isarray cbool round formatcurrency conversions csng timevalue second year space abs clng timeserial fixs len asc isempty maths dateserial atn timer isobject filter weekday datevalue ccur isdate instr datediff formatdatetime replace isnull right sgn array snumeric log cdbl hex chr lbound msgbox ucase getlocale cos cdate cbyte rtrim join hour oct typename trim strcomp int createobject loadpicture tan formatnumber mid scriptenginebuildversion scriptengine split scriptengineminorversion cint sin datepart ltrim sqr scriptenginemajorversion time derived eval date formatpercent exp inputbox left ascw chrw regexp server response request cstr err",literal:"true false null nothing empty"},illegal:"//",contains:[e.inherit(e.QUOTE_STRING_MODE,{contains:[{begin:'""'}]}),e.COMMENT(/'/,/$/,{relevance:0}),e.C_NUMBER_MODE]}}}),define("highlight/lib/languages/vbscript-html",["require","exports","module"],function(e,t,n){n.exports=function(e){return{subLanguage:"xml",contains:[{begin:"<%",end:"%>",subLanguage:"vbscript"}]}}}),define("highlight/lib/languages/verilog",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={keyword:"accept_on alias always always_comb always_ff always_latch and assert assign assume automatic before begin bind bins binsof bit break buf|0 bufif0 bufif1 byte case casex casez cell chandle checker class clocking cmos config const constraint context continue cover covergroup coverpoint cross deassign default defparam design disable dist do edge else end endcase endchecker endclass endclocking endconfig endfunction endgenerate endgroup endinterface endmodule endpackage endprimitive endprogram endproperty endspecify endsequence endtable endtask enum event eventually expect export extends extern final first_match for force foreach forever fork forkjoin function generate|5 genvar global highz0 highz1 if iff ifnone ignore_bins illegal_bins implements implies import incdir include initial inout input inside instance int integer interconnect interface intersect join join_any join_none large let liblist library local localparam logic longint macromodule matches medium modport module nand negedge nettype new nexttime nmos nor noshowcancelled not notif0 notif1 or output package packed parameter pmos posedge primitive priority program property protected pull0 pull1 pulldown pullup pulsestyle_ondetect pulsestyle_onevent pure rand randc randcase randsequence rcmos real realtime ref reg reject_on release repeat restrict return rnmos rpmos rtran rtranif0 rtranif1 s_always s_eventually s_nexttime s_until s_until_with scalared sequence shortint shortreal showcancelled signed small soft solve specify specparam static string strong strong0 strong1 struct super supply0 supply1 sync_accept_on sync_reject_on table tagged task this throughout time timeprecision timeunit tran tranif0 tranif1 tri tri0 tri1 triand trior trireg type typedef union unique unique0 unsigned until until_with untyped use uwire var vectored virtual void wait wait_order wand weak weak0 weak1 while wildcard wire with within wor xnor xor",literal:"null",built_in:"$finish $stop $exit $fatal $error $warning $info $realtime $time $printtimescale $bitstoreal $bitstoshortreal $itor $signed $cast $bits $stime $timeformat $realtobits $shortrealtobits $rtoi $unsigned $asserton $assertkill $assertpasson $assertfailon $assertnonvacuouson $assertoff $assertcontrol $assertpassoff $assertfailoff $assertvacuousoff $isunbounded $sampled $fell $changed $past_gclk $fell_gclk $changed_gclk $rising_gclk $steady_gclk $coverage_control $coverage_get $coverage_save $set_coverage_db_name $rose $stable $past $rose_gclk $stable_gclk $future_gclk $falling_gclk $changing_gclk $display $coverage_get_max $coverage_merge $get_coverage $load_coverage_db $typename $unpacked_dimensions $left $low $increment $clog2 $ln $log10 $exp $sqrt $pow $floor $ceil $sin $cos $tan $countbits $onehot $isunknown $fatal $warning $dimensions $right $high $size $asin $acos $atan $atan2 $hypot $sinh $cosh $tanh $asinh $acosh $atanh $countones $onehot0 $error $info $random $dist_chi_square $dist_erlang $dist_exponential $dist_normal $dist_poisson $dist_t $dist_uniform $q_initialize $q_remove $q_exam $async$and$array $async$nand$array $async$or$array $async$nor$array $sync$and$array $sync$nand$array $sync$or$array $sync$nor$array $q_add $q_full $psprintf $async$and$plane $async$nand$plane $async$or$plane $async$nor$plane $sync$and$plane $sync$nand$plane $sync$or$plane $sync$nor$plane $system $display $displayb $displayh $displayo $strobe $strobeb $strobeh $strobeo $write $readmemb $readmemh $writememh $value$plusargs $dumpvars $dumpon $dumplimit $dumpports $dumpportson $dumpportslimit $writeb $writeh $writeo $monitor $monitorb $monitorh $monitoro $writememb $dumpfile $dumpoff $dumpall $dumpflush $dumpportsoff $dumpportsall $dumpportsflush $fclose $fdisplay $fdisplayb $fdisplayh $fdisplayo $fstrobe $fstrobeb $fstrobeh $fstrobeo $swrite $swriteb $swriteh $swriteo $fscanf $fread $fseek $fflush $feof $fopen $fwrite $fwriteb $fwriteh $fwriteo $fmonitor $fmonitorb $fmonitorh $fmonitoro $sformat $sformatf $fgetc $ungetc $fgets $sscanf $rewind $ftell $ferror"};return{aliases:["v","sv","svh"],case_insensitive:!1,keywords:t,lexemes:/[\w\$]+/,contains:[e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE,e.QUOTE_STRING_MODE,{className:"number",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"\\b((\\d+'(b|h|o|d|B|H|O|D))[0-9xzXZa-fA-F_]+)"},{begin:"\\B(('(b|h|o|d|B|H|O|D))[0-9xzXZa-fA-F_]+)"},{begin:"\\b([0-9_])+",relevance:0}]},{className:"variable",variants:[{begin:"#\\((?!parameter).+\\)"},{begin:"\\.\\w+",relevance:0}]},{className:"meta",begin:"`",end:"$",keywords:{"meta-keyword":"define __FILE__ __LINE__ begin_keywords celldefine default_nettype define else elsif end_keywords endcelldefine endif ifdef ifndef include line nounconnected_drive pragma resetall timescale unconnected_drive undef undefineall"},relevance:0}]}}}),define("highlight/lib/languages/vhdl",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="\\d(_|\\d)*",n="[eE][-+]?"+t,i=t+"(\\."+t+")?("+n+")?",r="\\w+",a=t+"#"+r+"(\\."+r+")?#("+n+")?",o="\\b("+a+"|"+i+")";return{case_insensitive:!0,keywords:{keyword:"abs access after alias all and architecture array assert assume assume_guarantee attribute begin block body buffer bus case component configuration constant context cover disconnect downto default else elsif end entity exit fairness file for force function generate generic group guarded if impure in inertial inout is label library linkage literal loop map mod nand new next nor not null of on open or others out package port postponed procedure process property protected pure range record register reject release rem report restrict restrict_guarantee return rol ror select sequence severity shared signal sla sll sra srl strong subtype then to transport type unaffected units until use variable vmode vprop vunit wait when while with xnor xor",built_in:"boolean bit character integer time delay_length natural positive string bit_vector file_open_kind file_open_status std_logic std_logic_vector unsigned signed boolean_vector integer_vector std_ulogic std_ulogic_vector unresolved_unsigned u_unsigned unresolved_signed u_signedreal_vector time_vector",literal:"false true note warning error failure line text side width"},illegal:"{",contains:[e.C_BLOCK_COMMENT_MODE,e.COMMENT("--","$"),e.QUOTE_STRING_MODE,{className:"number",begin:o,relevance:0},{className:"string",begin:"'(U|X|0|1|Z|W|L|H|-)'",contains:[e.BACKSLASH_ESCAPE]},{className:"symbol",begin:"'[A-Za-z](_?[A-Za-z0-9])*",contains:[e.BACKSLASH_ESCAPE]}]}}}),define("highlight/lib/languages/vim",["require","exports","module"],function(e,t,n){n.exports=function(e){return{lexemes:/[!#@\w]+/,keywords:{keyword:"N|0 P|0 X|0 a|0 ab abc abo al am an|0 ar arga argd arge argdo argg argl argu as au aug aun b|0 bN ba bad bd be bel bf bl bm bn bo bp br brea breaka breakd breakl bro bufdo buffers bun bw c|0 cN cNf ca cabc caddb cad caddf cal cat cb cc ccl cd ce cex cf cfir cgetb cgete cg changes chd che checkt cl cla clo cm cmapc cme cn cnew cnf cno cnorea cnoreme co col colo com comc comp con conf cope cp cpf cq cr cs cst cu cuna cunme cw delm deb debugg delc delf dif diffg diffo diffp diffpu diffs diffthis dig di dl dell dj dli do doautoa dp dr ds dsp e|0 ea ec echoe echoh echom echon el elsei em en endfo endf endt endw ene ex exe exi exu f|0 files filet fin fina fini fir fix fo foldc foldd folddoc foldo for fu go gr grepa gu gv ha helpf helpg helpt hi hid his ia iabc if ij il im imapc ime ino inorea inoreme int is isp iu iuna iunme j|0 ju k|0 keepa kee keepj lN lNf l|0 lad laddb laddf la lan lat lb lc lch lcl lcs le lefta let lex lf lfir lgetb lgete lg lgr lgrepa lh ll lla lli lmak lm lmapc lne lnew lnf ln loadk lo loc lockv lol lope lp lpf lr ls lt lu lua luad luaf lv lvimgrepa lw m|0 ma mak map mapc marks mat me menut mes mk mks mksp mkv mkvie mod mz mzf nbc nb nbs new nm nmapc nme nn nnoreme noa no noh norea noreme norm nu nun nunme ol o|0 om omapc ome on ono onoreme opt ou ounme ow p|0 profd prof pro promptr pc ped pe perld po popu pp pre prev ps pt ptN ptf ptj ptl ptn ptp ptr pts pu pw py3 python3 py3d py3f py pyd pyf quita qa rec red redi redr redraws reg res ret retu rew ri rightb rub rubyd rubyf rund ru rv sN san sa sal sav sb sbN sba sbf sbl sbm sbn sbp sbr scrip scripte scs se setf setg setl sf sfir sh sim sig sil sl sla sm smap smapc sme sn sni sno snor snoreme sor so spelld spe spelli spellr spellu spellw sp spr sre st sta startg startr star stopi stj sts sun sunm sunme sus sv sw sy synti sync tN tabN tabc tabdo tabe tabf tabfir tabl tabm tabnew tabn tabo tabp tabr tabs tab ta tags tc tcld tclf te tf th tj tl tm tn to tp tr try ts tu u|0 undoj undol una unh unl unlo unm unme uns up ve verb vert vim vimgrepa vi viu vie vm vmapc vme vne vn vnoreme vs vu vunme windo w|0 wN wa wh wi winc winp wn wp wq wqa ws wu wv x|0 xa xmapc xm xme xn xnoreme xu xunme y|0 z|0 ~ Next Print append abbreviate abclear aboveleft all amenu anoremenu args argadd argdelete argedit argglobal arglocal argument ascii autocmd augroup aunmenu buffer bNext ball badd bdelete behave belowright bfirst blast bmodified bnext botright bprevious brewind break breakadd breakdel breaklist browse bunload bwipeout change cNext cNfile cabbrev cabclear caddbuffer caddexpr caddfile call catch cbuffer cclose center cexpr cfile cfirst cgetbuffer cgetexpr cgetfile chdir checkpath checktime clist clast close cmap cmapclear cmenu cnext cnewer cnfile cnoremap cnoreabbrev cnoremenu copy colder colorscheme command comclear compiler continue confirm copen cprevious cpfile cquit crewind cscope cstag cunmap cunabbrev cunmenu cwindow delete delmarks debug debuggreedy delcommand delfunction diffupdate diffget diffoff diffpatch diffput diffsplit digraphs display deletel djump dlist doautocmd doautoall deletep drop dsearch dsplit edit earlier echo echoerr echohl echomsg else elseif emenu endif endfor endfunction endtry endwhile enew execute exit exusage file filetype find finally finish first fixdel fold foldclose folddoopen folddoclosed foldopen function global goto grep grepadd gui gvim hardcopy help helpfind helpgrep helptags highlight hide history insert iabbrev iabclear ijump ilist imap imapclear imenu inoremap inoreabbrev inoremenu intro isearch isplit iunmap iunabbrev iunmenu join jumps keepalt keepmarks keepjumps lNext lNfile list laddexpr laddbuffer laddfile last language later lbuffer lcd lchdir lclose lcscope left leftabove lexpr lfile lfirst lgetbuffer lgetexpr lgetfile lgrep lgrepadd lhelpgrep llast llist lmake lmap lmapclear lnext lnewer lnfile lnoremap loadkeymap loadview lockmarks lockvar lolder lopen lprevious lpfile lrewind ltag lunmap luado luafile lvimgrep lvimgrepadd lwindow move mark make mapclear match menu menutranslate messages mkexrc mksession mkspell mkvimrc mkview mode mzscheme mzfile nbclose nbkey nbsart next nmap nmapclear nmenu nnoremap nnoremenu noautocmd noremap nohlsearch noreabbrev noremenu normal number nunmap nunmenu oldfiles open omap omapclear omenu only onoremap onoremenu options ounmap ounmenu ownsyntax print profdel profile promptfind promptrepl pclose pedit perl perldo pop popup ppop preserve previous psearch ptag ptNext ptfirst ptjump ptlast ptnext ptprevious ptrewind ptselect put pwd py3do py3file python pydo pyfile quit quitall qall read recover redo redir redraw redrawstatus registers resize retab return rewind right rightbelow ruby rubydo rubyfile rundo runtime rviminfo substitute sNext sandbox sargument sall saveas sbuffer sbNext sball sbfirst sblast sbmodified sbnext sbprevious sbrewind scriptnames scriptencoding scscope set setfiletype setglobal setlocal sfind sfirst shell simalt sign silent sleep slast smagic smapclear smenu snext sniff snomagic snoremap snoremenu sort source spelldump spellgood spellinfo spellrepall spellundo spellwrong split sprevious srewind stop stag startgreplace startreplace startinsert stopinsert stjump stselect sunhide sunmap sunmenu suspend sview swapname syntax syntime syncbind tNext tabNext tabclose tabedit tabfind tabfirst tablast tabmove tabnext tabonly tabprevious tabrewind tag tcl tcldo tclfile tearoff tfirst throw tjump tlast tmenu tnext topleft tprevious trewind tselect tunmenu undo undojoin undolist unabbreviate unhide unlet unlockvar unmap unmenu unsilent update vglobal version verbose vertical vimgrep vimgrepadd visual viusage view vmap vmapclear vmenu vnew vnoremap vnoremenu vsplit vunmap vunmenu write wNext wall while winsize wincmd winpos wnext wprevious wqall wsverb wundo wviminfo xit xall xmapclear xmap xmenu xnoremap xnoremenu xunmap xunmenu yank",built_in:"synIDtrans atan2 range matcharg did_filetype asin feedkeys xor argv complete_check add getwinposx getqflist getwinposy screencol clearmatches empty extend getcmdpos mzeval garbagecollect setreg ceil sqrt diff_hlID inputsecret get getfperm getpid filewritable shiftwidth max sinh isdirectory synID system inputrestore winline atan visualmode inputlist tabpagewinnr round getregtype mapcheck hasmapto histdel argidx findfile sha256 exists toupper getcmdline taglist string getmatches bufnr strftime winwidth bufexists strtrans tabpagebuflist setcmdpos remote_read printf setloclist getpos getline bufwinnr float2nr len getcmdtype diff_filler luaeval resolve libcallnr foldclosedend reverse filter has_key bufname str2float strlen setline getcharmod setbufvar index searchpos shellescape undofile foldclosed setqflist buflisted strchars str2nr virtcol floor remove undotree remote_expr winheight gettabwinvar reltime cursor tabpagenr finddir localtime acos getloclist search tanh matchend rename gettabvar strdisplaywidth type abs py3eval setwinvar tolower wildmenumode log10 spellsuggest bufloaded synconcealed nextnonblank server2client complete settabwinvar executable input wincol setmatches getftype hlID inputsave searchpair or screenrow line settabvar histadd deepcopy strpart remote_peek and eval getftime submatch screenchar winsaveview matchadd mkdir screenattr getfontname libcall reltimestr getfsize winnr invert pow getbufline byte2line soundfold repeat fnameescape tagfiles sin strwidth spellbadword trunc maparg log lispindent hostname setpos globpath remote_foreground getchar synIDattr fnamemodify cscope_connection stridx winbufnr indent min complete_add nr2char searchpairpos inputdialog values matchlist items hlexists strridx browsedir expand fmod pathshorten line2byte argc count getwinvar glob foldtextresult getreg foreground cosh matchdelete has char2nr simplify histget searchdecl iconv winrestcmd pumvisible writefile foldlevel haslocaldir keys cos matchstr foldtext histnr tan tempname getcwd byteidx getbufvar islocked escape eventhandler remote_send serverlist winrestview synstack pyeval prevnonblank readfile cindent filereadable changenr exp" -},illegal:/;/,contains:[e.NUMBER_MODE,e.APOS_STRING_MODE,{className:"string",begin:/"(\\"|\n\\|[^"\n])*"/},e.COMMENT('"',"$"),{className:"variable",begin:/[bwtglsav]:[\w\d_]*/},{className:"function",beginKeywords:"function function!",end:"$",relevance:0,contains:[e.TITLE_MODE,{className:"params",begin:"\\(",end:"\\)"}]},{className:"symbol",begin:/<[\w-]+>/}]}}}),define("highlight/lib/languages/x86asm",["require","exports","module"],function(e,t,n){n.exports=function(e){return{case_insensitive:!0,lexemes:"[.%]?"+e.IDENT_RE,keywords:{keyword:"lock rep repe repz repne repnz xaquire xrelease bnd nobnd aaa aad aam aas adc add and arpl bb0_reset bb1_reset bound bsf bsr bswap bt btc btr bts call cbw cdq cdqe clc cld cli clts cmc cmp cmpsb cmpsd cmpsq cmpsw cmpxchg cmpxchg486 cmpxchg8b cmpxchg16b cpuid cpu_read cpu_write cqo cwd cwde daa das dec div dmint emms enter equ f2xm1 fabs fadd faddp fbld fbstp fchs fclex fcmovb fcmovbe fcmove fcmovnb fcmovnbe fcmovne fcmovnu fcmovu fcom fcomi fcomip fcomp fcompp fcos fdecstp fdisi fdiv fdivp fdivr fdivrp femms feni ffree ffreep fiadd ficom ficomp fidiv fidivr fild fimul fincstp finit fist fistp fisttp fisub fisubr fld fld1 fldcw fldenv fldl2e fldl2t fldlg2 fldln2 fldpi fldz fmul fmulp fnclex fndisi fneni fninit fnop fnsave fnstcw fnstenv fnstsw fpatan fprem fprem1 fptan frndint frstor fsave fscale fsetpm fsin fsincos fsqrt fst fstcw fstenv fstp fstsw fsub fsubp fsubr fsubrp ftst fucom fucomi fucomip fucomp fucompp fxam fxch fxtract fyl2x fyl2xp1 hlt ibts icebp idiv imul in inc incbin insb insd insw int int01 int1 int03 int3 into invd invpcid invlpg invlpga iret iretd iretq iretw jcxz jecxz jrcxz jmp jmpe lahf lar lds lea leave les lfence lfs lgdt lgs lidt lldt lmsw loadall loadall286 lodsb lodsd lodsq lodsw loop loope loopne loopnz loopz lsl lss ltr mfence monitor mov movd movq movsb movsd movsq movsw movsx movsxd movzx mul mwait neg nop not or out outsb outsd outsw packssdw packsswb packuswb paddb paddd paddsb paddsiw paddsw paddusb paddusw paddw pand pandn pause paveb pavgusb pcmpeqb pcmpeqd pcmpeqw pcmpgtb pcmpgtd pcmpgtw pdistib pf2id pfacc pfadd pfcmpeq pfcmpge pfcmpgt pfmax pfmin pfmul pfrcp pfrcpit1 pfrcpit2 pfrsqit1 pfrsqrt pfsub pfsubr pi2fd pmachriw pmaddwd pmagw pmulhriw pmulhrwa pmulhrwc pmulhw pmullw pmvgezb pmvlzb pmvnzb pmvzb pop popa popad popaw popf popfd popfq popfw por prefetch prefetchw pslld psllq psllw psrad psraw psrld psrlq psrlw psubb psubd psubsb psubsiw psubsw psubusb psubusw psubw punpckhbw punpckhdq punpckhwd punpcklbw punpckldq punpcklwd push pusha pushad pushaw pushf pushfd pushfq pushfw pxor rcl rcr rdshr rdmsr rdpmc rdtsc rdtscp ret retf retn rol ror rdm rsdc rsldt rsm rsts sahf sal salc sar sbb scasb scasd scasq scasw sfence sgdt shl shld shr shrd sidt sldt skinit smi smint smintold smsw stc std sti stosb stosd stosq stosw str sub svdc svldt svts swapgs syscall sysenter sysexit sysret test ud0 ud1 ud2b ud2 ud2a umov verr verw fwait wbinvd wrshr wrmsr xadd xbts xchg xlatb xlat xor cmove cmovz cmovne cmovnz cmova cmovnbe cmovae cmovnb cmovb cmovnae cmovbe cmovna cmovg cmovnle cmovge cmovnl cmovl cmovnge cmovle cmovng cmovc cmovnc cmovo cmovno cmovs cmovns cmovp cmovpe cmovnp cmovpo je jz jne jnz ja jnbe jae jnb jb jnae jbe jna jg jnle jge jnl jl jnge jle jng jc jnc jo jno js jns jpo jnp jpe jp sete setz setne setnz seta setnbe setae setnb setnc setb setnae setcset setbe setna setg setnle setge setnl setl setnge setle setng sets setns seto setno setpe setp setpo setnp addps addss andnps andps cmpeqps cmpeqss cmpleps cmpless cmpltps cmpltss cmpneqps cmpneqss cmpnleps cmpnless cmpnltps cmpnltss cmpordps cmpordss cmpunordps cmpunordss cmpps cmpss comiss cvtpi2ps cvtps2pi cvtsi2ss cvtss2si cvttps2pi cvttss2si divps divss ldmxcsr maxps maxss minps minss movaps movhps movlhps movlps movhlps movmskps movntps movss movups mulps mulss orps rcpps rcpss rsqrtps rsqrtss shufps sqrtps sqrtss stmxcsr subps subss ucomiss unpckhps unpcklps xorps fxrstor fxrstor64 fxsave fxsave64 xgetbv xsetbv xsave xsave64 xsaveopt xsaveopt64 xrstor xrstor64 prefetchnta prefetcht0 prefetcht1 prefetcht2 maskmovq movntq pavgb pavgw pextrw pinsrw pmaxsw pmaxub pminsw pminub pmovmskb pmulhuw psadbw pshufw pf2iw pfnacc pfpnacc pi2fw pswapd maskmovdqu clflush movntdq movnti movntpd movdqa movdqu movdq2q movq2dq paddq pmuludq pshufd pshufhw pshuflw pslldq psrldq psubq punpckhqdq punpcklqdq addpd addsd andnpd andpd cmpeqpd cmpeqsd cmplepd cmplesd cmpltpd cmpltsd cmpneqpd cmpneqsd cmpnlepd cmpnlesd cmpnltpd cmpnltsd cmpordpd cmpordsd cmpunordpd cmpunordsd cmppd comisd cvtdq2pd cvtdq2ps cvtpd2dq cvtpd2pi cvtpd2ps cvtpi2pd cvtps2dq cvtps2pd cvtsd2si cvtsd2ss cvtsi2sd cvtss2sd cvttpd2pi cvttpd2dq cvttps2dq cvttsd2si divpd divsd maxpd maxsd minpd minsd movapd movhpd movlpd movmskpd movupd mulpd mulsd orpd shufpd sqrtpd sqrtsd subpd subsd ucomisd unpckhpd unpcklpd xorpd addsubpd addsubps haddpd haddps hsubpd hsubps lddqu movddup movshdup movsldup clgi stgi vmcall vmclear vmfunc vmlaunch vmload vmmcall vmptrld vmptrst vmread vmresume vmrun vmsave vmwrite vmxoff vmxon invept invvpid pabsb pabsw pabsd palignr phaddw phaddd phaddsw phsubw phsubd phsubsw pmaddubsw pmulhrsw pshufb psignb psignw psignd extrq insertq movntsd movntss lzcnt blendpd blendps blendvpd blendvps dppd dpps extractps insertps movntdqa mpsadbw packusdw pblendvb pblendw pcmpeqq pextrb pextrd pextrq phminposuw pinsrb pinsrd pinsrq pmaxsb pmaxsd pmaxud pmaxuw pminsb pminsd pminud pminuw pmovsxbw pmovsxbd pmovsxbq pmovsxwd pmovsxwq pmovsxdq pmovzxbw pmovzxbd pmovzxbq pmovzxwd pmovzxwq pmovzxdq pmuldq pmulld ptest roundpd roundps roundsd roundss crc32 pcmpestri pcmpestrm pcmpistri pcmpistrm pcmpgtq popcnt getsec pfrcpv pfrsqrtv movbe aesenc aesenclast aesdec aesdeclast aesimc aeskeygenassist vaesenc vaesenclast vaesdec vaesdeclast vaesimc vaeskeygenassist vaddpd vaddps vaddsd vaddss vaddsubpd vaddsubps vandpd vandps vandnpd vandnps vblendpd vblendps vblendvpd vblendvps vbroadcastss vbroadcastsd vbroadcastf128 vcmpeq_ospd vcmpeqpd vcmplt_ospd vcmpltpd vcmple_ospd vcmplepd vcmpunord_qpd vcmpunordpd vcmpneq_uqpd vcmpneqpd vcmpnlt_uspd vcmpnltpd vcmpnle_uspd vcmpnlepd vcmpord_qpd vcmpordpd vcmpeq_uqpd vcmpnge_uspd vcmpngepd vcmpngt_uspd vcmpngtpd vcmpfalse_oqpd vcmpfalsepd vcmpneq_oqpd vcmpge_ospd vcmpgepd vcmpgt_ospd vcmpgtpd vcmptrue_uqpd vcmptruepd vcmplt_oqpd vcmple_oqpd vcmpunord_spd vcmpneq_uspd vcmpnlt_uqpd vcmpnle_uqpd vcmpord_spd vcmpeq_uspd vcmpnge_uqpd vcmpngt_uqpd vcmpfalse_ospd vcmpneq_ospd vcmpge_oqpd vcmpgt_oqpd vcmptrue_uspd vcmppd vcmpeq_osps vcmpeqps vcmplt_osps vcmpltps vcmple_osps vcmpleps vcmpunord_qps vcmpunordps vcmpneq_uqps vcmpneqps vcmpnlt_usps vcmpnltps vcmpnle_usps vcmpnleps vcmpord_qps vcmpordps vcmpeq_uqps vcmpnge_usps vcmpngeps vcmpngt_usps vcmpngtps vcmpfalse_oqps vcmpfalseps vcmpneq_oqps vcmpge_osps vcmpgeps vcmpgt_osps vcmpgtps vcmptrue_uqps vcmptrueps vcmplt_oqps vcmple_oqps vcmpunord_sps vcmpneq_usps vcmpnlt_uqps vcmpnle_uqps vcmpord_sps vcmpeq_usps vcmpnge_uqps vcmpngt_uqps vcmpfalse_osps vcmpneq_osps vcmpge_oqps vcmpgt_oqps vcmptrue_usps vcmpps vcmpeq_ossd vcmpeqsd vcmplt_ossd vcmpltsd vcmple_ossd vcmplesd vcmpunord_qsd vcmpunordsd vcmpneq_uqsd vcmpneqsd vcmpnlt_ussd vcmpnltsd vcmpnle_ussd vcmpnlesd vcmpord_qsd vcmpordsd vcmpeq_uqsd vcmpnge_ussd vcmpngesd vcmpngt_ussd vcmpngtsd vcmpfalse_oqsd vcmpfalsesd vcmpneq_oqsd vcmpge_ossd vcmpgesd vcmpgt_ossd vcmpgtsd vcmptrue_uqsd vcmptruesd vcmplt_oqsd vcmple_oqsd vcmpunord_ssd vcmpneq_ussd vcmpnlt_uqsd vcmpnle_uqsd vcmpord_ssd vcmpeq_ussd vcmpnge_uqsd vcmpngt_uqsd vcmpfalse_ossd vcmpneq_ossd vcmpge_oqsd vcmpgt_oqsd vcmptrue_ussd vcmpsd vcmpeq_osss vcmpeqss vcmplt_osss vcmpltss vcmple_osss vcmpless vcmpunord_qss vcmpunordss vcmpneq_uqss vcmpneqss vcmpnlt_usss vcmpnltss vcmpnle_usss vcmpnless vcmpord_qss vcmpordss vcmpeq_uqss vcmpnge_usss vcmpngess vcmpngt_usss vcmpngtss vcmpfalse_oqss vcmpfalsess vcmpneq_oqss vcmpge_osss vcmpgess vcmpgt_osss vcmpgtss vcmptrue_uqss vcmptruess vcmplt_oqss vcmple_oqss vcmpunord_sss vcmpneq_usss vcmpnlt_uqss vcmpnle_uqss vcmpord_sss vcmpeq_usss vcmpnge_uqss vcmpngt_uqss vcmpfalse_osss vcmpneq_osss vcmpge_oqss vcmpgt_oqss vcmptrue_usss vcmpss vcomisd vcomiss vcvtdq2pd vcvtdq2ps vcvtpd2dq vcvtpd2ps vcvtps2dq vcvtps2pd vcvtsd2si vcvtsd2ss vcvtsi2sd vcvtsi2ss vcvtss2sd vcvtss2si vcvttpd2dq vcvttps2dq vcvttsd2si vcvttss2si vdivpd vdivps vdivsd vdivss vdppd vdpps vextractf128 vextractps vhaddpd vhaddps vhsubpd vhsubps vinsertf128 vinsertps vlddqu vldqqu vldmxcsr vmaskmovdqu vmaskmovps vmaskmovpd vmaxpd vmaxps vmaxsd vmaxss vminpd vminps vminsd vminss vmovapd vmovaps vmovd vmovq vmovddup vmovdqa vmovqqa vmovdqu vmovqqu vmovhlps vmovhpd vmovhps vmovlhps vmovlpd vmovlps vmovmskpd vmovmskps vmovntdq vmovntqq vmovntdqa vmovntpd vmovntps vmovsd vmovshdup vmovsldup vmovss vmovupd vmovups vmpsadbw vmulpd vmulps vmulsd vmulss vorpd vorps vpabsb vpabsw vpabsd vpacksswb vpackssdw vpackuswb vpackusdw vpaddb vpaddw vpaddd vpaddq vpaddsb vpaddsw vpaddusb vpaddusw vpalignr vpand vpandn vpavgb vpavgw vpblendvb vpblendw vpcmpestri vpcmpestrm vpcmpistri vpcmpistrm vpcmpeqb vpcmpeqw vpcmpeqd vpcmpeqq vpcmpgtb vpcmpgtw vpcmpgtd vpcmpgtq vpermilpd vpermilps vperm2f128 vpextrb vpextrw vpextrd vpextrq vphaddw vphaddd vphaddsw vphminposuw vphsubw vphsubd vphsubsw vpinsrb vpinsrw vpinsrd vpinsrq vpmaddwd vpmaddubsw vpmaxsb vpmaxsw vpmaxsd vpmaxub vpmaxuw vpmaxud vpminsb vpminsw vpminsd vpminub vpminuw vpminud vpmovmskb vpmovsxbw vpmovsxbd vpmovsxbq vpmovsxwd vpmovsxwq vpmovsxdq vpmovzxbw vpmovzxbd vpmovzxbq vpmovzxwd vpmovzxwq vpmovzxdq vpmulhuw vpmulhrsw vpmulhw vpmullw vpmulld vpmuludq vpmuldq vpor vpsadbw vpshufb vpshufd vpshufhw vpshuflw vpsignb vpsignw vpsignd vpslldq vpsrldq vpsllw vpslld vpsllq vpsraw vpsrad vpsrlw vpsrld vpsrlq vptest vpsubb vpsubw vpsubd vpsubq vpsubsb vpsubsw vpsubusb vpsubusw vpunpckhbw vpunpckhwd vpunpckhdq vpunpckhqdq vpunpcklbw vpunpcklwd vpunpckldq vpunpcklqdq vpxor vrcpps vrcpss vrsqrtps vrsqrtss vroundpd vroundps vroundsd vroundss vshufpd vshufps vsqrtpd vsqrtps vsqrtsd vsqrtss vstmxcsr vsubpd vsubps vsubsd vsubss vtestps vtestpd vucomisd vucomiss vunpckhpd vunpckhps vunpcklpd vunpcklps vxorpd vxorps vzeroall vzeroupper pclmullqlqdq pclmulhqlqdq pclmullqhqdq pclmulhqhqdq pclmulqdq vpclmullqlqdq vpclmulhqlqdq vpclmullqhqdq vpclmulhqhqdq vpclmulqdq vfmadd132ps vfmadd132pd vfmadd312ps vfmadd312pd vfmadd213ps vfmadd213pd vfmadd123ps vfmadd123pd vfmadd231ps vfmadd231pd vfmadd321ps vfmadd321pd vfmaddsub132ps vfmaddsub132pd vfmaddsub312ps vfmaddsub312pd vfmaddsub213ps vfmaddsub213pd vfmaddsub123ps vfmaddsub123pd vfmaddsub231ps vfmaddsub231pd vfmaddsub321ps vfmaddsub321pd vfmsub132ps vfmsub132pd vfmsub312ps vfmsub312pd vfmsub213ps vfmsub213pd vfmsub123ps vfmsub123pd vfmsub231ps vfmsub231pd vfmsub321ps vfmsub321pd vfmsubadd132ps vfmsubadd132pd vfmsubadd312ps vfmsubadd312pd vfmsubadd213ps vfmsubadd213pd vfmsubadd123ps vfmsubadd123pd vfmsubadd231ps vfmsubadd231pd vfmsubadd321ps vfmsubadd321pd vfnmadd132ps vfnmadd132pd vfnmadd312ps vfnmadd312pd vfnmadd213ps vfnmadd213pd vfnmadd123ps vfnmadd123pd vfnmadd231ps vfnmadd231pd vfnmadd321ps vfnmadd321pd vfnmsub132ps vfnmsub132pd vfnmsub312ps vfnmsub312pd vfnmsub213ps vfnmsub213pd vfnmsub123ps vfnmsub123pd vfnmsub231ps vfnmsub231pd vfnmsub321ps vfnmsub321pd vfmadd132ss vfmadd132sd vfmadd312ss vfmadd312sd vfmadd213ss vfmadd213sd vfmadd123ss vfmadd123sd vfmadd231ss vfmadd231sd vfmadd321ss vfmadd321sd vfmsub132ss vfmsub132sd vfmsub312ss vfmsub312sd vfmsub213ss vfmsub213sd vfmsub123ss vfmsub123sd vfmsub231ss vfmsub231sd vfmsub321ss vfmsub321sd vfnmadd132ss vfnmadd132sd vfnmadd312ss vfnmadd312sd vfnmadd213ss vfnmadd213sd vfnmadd123ss vfnmadd123sd vfnmadd231ss vfnmadd231sd vfnmadd321ss vfnmadd321sd vfnmsub132ss vfnmsub132sd vfnmsub312ss vfnmsub312sd vfnmsub213ss vfnmsub213sd vfnmsub123ss vfnmsub123sd vfnmsub231ss vfnmsub231sd vfnmsub321ss vfnmsub321sd rdfsbase rdgsbase rdrand wrfsbase wrgsbase vcvtph2ps vcvtps2ph adcx adox rdseed clac stac xstore xcryptecb xcryptcbc xcryptctr xcryptcfb xcryptofb montmul xsha1 xsha256 llwpcb slwpcb lwpval lwpins vfmaddpd vfmaddps vfmaddsd vfmaddss vfmaddsubpd vfmaddsubps vfmsubaddpd vfmsubaddps vfmsubpd vfmsubps vfmsubsd vfmsubss vfnmaddpd vfnmaddps vfnmaddsd vfnmaddss vfnmsubpd vfnmsubps vfnmsubsd vfnmsubss vfrczpd vfrczps vfrczsd vfrczss vpcmov vpcomb vpcomd vpcomq vpcomub vpcomud vpcomuq vpcomuw vpcomw vphaddbd vphaddbq vphaddbw vphadddq vphaddubd vphaddubq vphaddubw vphaddudq vphadduwd vphadduwq vphaddwd vphaddwq vphsubbw vphsubdq vphsubwd vpmacsdd vpmacsdqh vpmacsdql vpmacssdd vpmacssdqh vpmacssdql vpmacsswd vpmacssww vpmacswd vpmacsww vpmadcsswd vpmadcswd vpperm vprotb vprotd vprotq vprotw vpshab vpshad vpshaq vpshaw vpshlb vpshld vpshlq vpshlw vbroadcasti128 vpblendd vpbroadcastb vpbroadcastw vpbroadcastd vpbroadcastq vpermd vpermpd vpermps vpermq vperm2i128 vextracti128 vinserti128 vpmaskmovd vpmaskmovq vpsllvd vpsllvq vpsravd vpsrlvd vpsrlvq vgatherdpd vgatherqpd vgatherdps vgatherqps vpgatherdd vpgatherqd vpgatherdq vpgatherqq xabort xbegin xend xtest andn bextr blci blcic blsi blsic blcfill blsfill blcmsk blsmsk blsr blcs bzhi mulx pdep pext rorx sarx shlx shrx tzcnt tzmsk t1mskc valignd valignq vblendmpd vblendmps vbroadcastf32x4 vbroadcastf64x4 vbroadcasti32x4 vbroadcasti64x4 vcompresspd vcompressps vcvtpd2udq vcvtps2udq vcvtsd2usi vcvtss2usi vcvttpd2udq vcvttps2udq vcvttsd2usi vcvttss2usi vcvtudq2pd vcvtudq2ps vcvtusi2sd vcvtusi2ss vexpandpd vexpandps vextractf32x4 vextractf64x4 vextracti32x4 vextracti64x4 vfixupimmpd vfixupimmps vfixupimmsd vfixupimmss vgetexppd vgetexpps vgetexpsd vgetexpss vgetmantpd vgetmantps vgetmantsd vgetmantss vinsertf32x4 vinsertf64x4 vinserti32x4 vinserti64x4 vmovdqa32 vmovdqa64 vmovdqu32 vmovdqu64 vpabsq vpandd vpandnd vpandnq vpandq vpblendmd vpblendmq vpcmpltd vpcmpled vpcmpneqd vpcmpnltd vpcmpnled vpcmpd vpcmpltq vpcmpleq vpcmpneqq vpcmpnltq vpcmpnleq vpcmpq vpcmpequd vpcmpltud vpcmpleud vpcmpnequd vpcmpnltud vpcmpnleud vpcmpud vpcmpequq vpcmpltuq vpcmpleuq vpcmpnequq vpcmpnltuq vpcmpnleuq vpcmpuq vpcompressd vpcompressq vpermi2d vpermi2pd vpermi2ps vpermi2q vpermt2d vpermt2pd vpermt2ps vpermt2q vpexpandd vpexpandq vpmaxsq vpmaxuq vpminsq vpminuq vpmovdb vpmovdw vpmovqb vpmovqd vpmovqw vpmovsdb vpmovsdw vpmovsqb vpmovsqd vpmovsqw vpmovusdb vpmovusdw vpmovusqb vpmovusqd vpmovusqw vpord vporq vprold vprolq vprolvd vprolvq vprord vprorq vprorvd vprorvq vpscatterdd vpscatterdq vpscatterqd vpscatterqq vpsraq vpsravq vpternlogd vpternlogq vptestmd vptestmq vptestnmd vptestnmq vpxord vpxorq vrcp14pd vrcp14ps vrcp14sd vrcp14ss vrndscalepd vrndscaleps vrndscalesd vrndscaless vrsqrt14pd vrsqrt14ps vrsqrt14sd vrsqrt14ss vscalefpd vscalefps vscalefsd vscalefss vscatterdpd vscatterdps vscatterqpd vscatterqps vshuff32x4 vshuff64x2 vshufi32x4 vshufi64x2 kandnw kandw kmovw knotw kortestw korw kshiftlw kshiftrw kunpckbw kxnorw kxorw vpbroadcastmb2q vpbroadcastmw2d vpconflictd vpconflictq vplzcntd vplzcntq vexp2pd vexp2ps vrcp28pd vrcp28ps vrcp28sd vrcp28ss vrsqrt28pd vrsqrt28ps vrsqrt28sd vrsqrt28ss vgatherpf0dpd vgatherpf0dps vgatherpf0qpd vgatherpf0qps vgatherpf1dpd vgatherpf1dps vgatherpf1qpd vgatherpf1qps vscatterpf0dpd vscatterpf0dps vscatterpf0qpd vscatterpf0qps vscatterpf1dpd vscatterpf1dps vscatterpf1qpd vscatterpf1qps prefetchwt1 bndmk bndcl bndcu bndcn bndmov bndldx bndstx sha1rnds4 sha1nexte sha1msg1 sha1msg2 sha256rnds2 sha256msg1 sha256msg2 hint_nop0 hint_nop1 hint_nop2 hint_nop3 hint_nop4 hint_nop5 hint_nop6 hint_nop7 hint_nop8 hint_nop9 hint_nop10 hint_nop11 hint_nop12 hint_nop13 hint_nop14 hint_nop15 hint_nop16 hint_nop17 hint_nop18 hint_nop19 hint_nop20 hint_nop21 hint_nop22 hint_nop23 hint_nop24 hint_nop25 hint_nop26 hint_nop27 hint_nop28 hint_nop29 hint_nop30 hint_nop31 hint_nop32 hint_nop33 hint_nop34 hint_nop35 hint_nop36 hint_nop37 hint_nop38 hint_nop39 hint_nop40 hint_nop41 hint_nop42 hint_nop43 hint_nop44 hint_nop45 hint_nop46 hint_nop47 hint_nop48 hint_nop49 hint_nop50 hint_nop51 hint_nop52 hint_nop53 hint_nop54 hint_nop55 hint_nop56 hint_nop57 hint_nop58 hint_nop59 hint_nop60 hint_nop61 hint_nop62 hint_nop63",built_in:"ip eip rip al ah bl bh cl ch dl dh sil dil bpl spl r8b r9b r10b r11b r12b r13b r14b r15b ax bx cx dx si di bp sp r8w r9w r10w r11w r12w r13w r14w r15w eax ebx ecx edx esi edi ebp esp eip r8d r9d r10d r11d r12d r13d r14d r15d rax rbx rcx rdx rsi rdi rbp rsp r8 r9 r10 r11 r12 r13 r14 r15 cs ds es fs gs ss st st0 st1 st2 st3 st4 st5 st6 st7 mm0 mm1 mm2 mm3 mm4 mm5 mm6 mm7 xmm0 xmm1 xmm2 xmm3 xmm4 xmm5 xmm6 xmm7 xmm8 xmm9 xmm10 xmm11 xmm12 xmm13 xmm14 xmm15 xmm16 xmm17 xmm18 xmm19 xmm20 xmm21 xmm22 xmm23 xmm24 xmm25 xmm26 xmm27 xmm28 xmm29 xmm30 xmm31 ymm0 ymm1 ymm2 ymm3 ymm4 ymm5 ymm6 ymm7 ymm8 ymm9 ymm10 ymm11 ymm12 ymm13 ymm14 ymm15 ymm16 ymm17 ymm18 ymm19 ymm20 ymm21 ymm22 ymm23 ymm24 ymm25 ymm26 ymm27 ymm28 ymm29 ymm30 ymm31 zmm0 zmm1 zmm2 zmm3 zmm4 zmm5 zmm6 zmm7 zmm8 zmm9 zmm10 zmm11 zmm12 zmm13 zmm14 zmm15 zmm16 zmm17 zmm18 zmm19 zmm20 zmm21 zmm22 zmm23 zmm24 zmm25 zmm26 zmm27 zmm28 zmm29 zmm30 zmm31 k0 k1 k2 k3 k4 k5 k6 k7 bnd0 bnd1 bnd2 bnd3 cr0 cr1 cr2 cr3 cr4 cr8 dr0 dr1 dr2 dr3 dr8 tr3 tr4 tr5 tr6 tr7 r0 r1 r2 r3 r4 r5 r6 r7 r0b r1b r2b r3b r4b r5b r6b r7b r0w r1w r2w r3w r4w r5w r6w r7w r0d r1d r2d r3d r4d r5d r6d r7d r0h r1h r2h r3h r0l r1l r2l r3l r4l r5l r6l r7l r8l r9l r10l r11l r12l r13l r14l r15l db dw dd dq dt ddq do dy dz resb resw resd resq rest resdq reso resy resz incbin equ times byte word dword qword nosplit rel abs seg wrt strict near far a32 ptr",meta:"%define %xdefine %+ %undef %defstr %deftok %assign %strcat %strlen %substr %rotate %elif %else %endif %if %ifmacro %ifctx %ifidn %ifidni %ifid %ifnum %ifstr %iftoken %ifempty %ifenv %error %warning %fatal %rep %endrep %include %push %pop %repl %pathsearch %depend %use %arg %stacksize %local %line %comment %endcomment .nolist __FILE__ __LINE__ __SECT__ __BITS__ __OUTPUT_FORMAT__ __DATE__ __TIME__ __DATE_NUM__ __TIME_NUM__ __UTC_DATE__ __UTC_TIME__ __UTC_DATE_NUM__ __UTC_TIME_NUM__ __PASS__ struc endstruc istruc at iend align alignb sectalign daz nodaz up down zero default option assume public bits use16 use32 use64 default section segment absolute extern global common cpu float __utf16__ __utf16le__ __utf16be__ __utf32__ __utf32le__ __utf32be__ __float8__ __float16__ __float32__ __float64__ __float80m__ __float80e__ __float128l__ __float128h__ __Infinity__ __QNaN__ __SNaN__ Inf NaN QNaN SNaN float8 float16 float32 float64 float80m float80e float128l float128h __FLOAT_DAZ__ __FLOAT_ROUND__ __FLOAT__"},contains:[e.COMMENT(";","$",{relevance:0}),{className:"number",variants:[{begin:"\\b(?:([0-9][0-9_]*)?\\.[0-9_]*(?:[eE][+-]?[0-9_]+)?|(0[Xx])?[0-9][0-9_]*\\.?[0-9_]*(?:[pP](?:[+-]?[0-9_]+)?)?)\\b",relevance:0},{begin:"\\$[0-9][0-9A-Fa-f]*",relevance:0},{begin:"\\b(?:[0-9A-Fa-f][0-9A-Fa-f_]*[Hh]|[0-9][0-9_]*[DdTt]?|[0-7][0-7_]*[QqOo]|[0-1][0-1_]*[BbYy])\\b"},{begin:"\\b(?:0[Xx][0-9A-Fa-f_]+|0[DdTt][0-9_]+|0[QqOo][0-7_]+|0[BbYy][0-1_]+)\\b"}]},e.QUOTE_STRING_MODE,{className:"string",variants:[{begin:"'",end:"[^\\\\]'"},{begin:"`",end:"[^\\\\]`"}],relevance:0},{className:"symbol",variants:[{begin:"^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)"},{begin:"^\\s*%%[A-Za-z0-9_$#@~.?]*:"}],relevance:0},{className:"subst",begin:"%[0-9]+",relevance:0},{className:"subst",begin:"%!S+",relevance:0},{className:"meta",begin:/^\s*\.[\w_-]+/}]}}}),define("highlight/lib/languages/xl",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="ObjectLoader Animate MovieCredits Slides Filters Shading Materials LensFlare Mapping VLCAudioVideo StereoDecoder PointCloud NetworkAccess RemoteControl RegExp ChromaKey Snowfall NodeJS Speech Charts",n={keyword:"if then else do while until for loop import with is as where when by data constant integer real text name boolean symbol infix prefix postfix block tree",literal:"true false nil",built_in:"in mod rem and or xor not abs sign floor ceil sqrt sin cos tan asin acos atan exp expm1 log log2 log10 log1p pi at text_length text_range text_find text_replace contains page slide basic_slide title_slide title subtitle fade_in fade_out fade_at clear_color color line_color line_width texture_wrap texture_transform texture scale_?x scale_?y scale_?z? translate_?x translate_?y translate_?z? rotate_?x rotate_?y rotate_?z? rectangle circle ellipse sphere path line_to move_to quad_to curve_to theme background contents locally time mouse_?x mouse_?y mouse_buttons "+t},i={className:"string",begin:'"',end:'"',illegal:"\\n"},r={className:"string",begin:"'",end:"'",illegal:"\\n"},a={className:"string",begin:"<<",end:">>"},o={className:"number",begin:"[0-9]+#[0-9A-Z_]+(\\.[0-9-A-Z_]+)?#?([Ee][+-]?[0-9]+)?"},s={beginKeywords:"import",end:"$",keywords:n,contains:[i]},l={className:"function",begin:/[a-z][^\n]*->/,returnBegin:!0,end:/->/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,keywords:n}})]};return{aliases:["tao"],lexemes:/[a-zA-Z][a-zA-Z0-9_?]*/,keywords:n,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,i,r,a,l,s,o,e.NUMBER_MODE]}}}),define("highlight/lib/languages/xquery",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="for let if while then else return where group by xquery encoding versionmodule namespace boundary-space preserve strip default collation base-uri orderingcopy-namespaces order declare import schema namespace function option in allowing emptyat tumbling window sliding window start when only end when previous next stable ascendingdescending empty greatest least some every satisfies switch case typeswitch try catch andor to union intersect instance of treat as castable cast map array delete insert intoreplace value rename copy modify update",n="false true xs:string xs:integer element item xs:date xs:datetime xs:float xs:double xs:decimal QName xs:anyURI xs:long xs:int xs:short xs:byte attribute",i={begin:/\$[a-zA-Z0-9\-]+/},r={className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},a={className:"string",variants:[{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]},o={className:"meta",begin:"%\\w+"},s={className:"comment",begin:"\\(:",end:":\\)",relevance:10,contains:[{className:"doctag",begin:"@\\w+"}]},l={begin:"{",end:"}"},c=[i,a,r,s,o,l];return l.contains=c,{aliases:["xpath","xq"],case_insensitive:!1,lexemes:/[a-zA-Z\$][a-zA-Z0-9_:\-]*/,illegal:/(proc)|(abstract)|(extends)|(until)|(#)/,keywords:{keyword:t,literal:n},contains:c}}}),define("highlight/lib/languages/zephir",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:'b"',end:'"'},{begin:"b'",end:"'"},e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null})]},n={variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]};return{aliases:["zep"],case_insensitive:!0,keywords:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var let while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally int uint long ulong char uchar double float bool boolean stringlikely unlikely",contains:[e.C_LINE_COMMENT_MODE,e.HASH_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.COMMENT("__halt_compiler.+?;",!1,{endsWithParent:!0,keywords:"__halt_compiler",lexemes:e.UNDERSCORE_IDENT_RE}),{className:"string",begin:"<<<['\"]?\\w+['\"]?$",end:"^\\w+;",contains:[e.BACKSLASH_ESCAPE]},{begin:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{className:"function",beginKeywords:"function",end:/[;{]/,excludeEnd:!0,illegal:"\\$|\\[|%",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:["self",e.C_BLOCK_COMMENT_MODE,t,n]}]},{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,illegal:/[:\(\$"]/,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",end:";",illegal:/[\.']/,contains:[e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"use",end:";",contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"=>"},t,n]}}}),define("text!app.html",["module"],function(e){e.exports='\r\n'}),define("text!blog/blog.html",["module"],function(e){e.exports="\r\n"}),define("text!app.css",["module"],function(e){e.exports="html,\nbody {\n height: 100%;\n overflow: hidden;\n}\n::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n}\n::-webkit-scrollbar-thumb {\n border-radius: 6px;\n background-color: #c6c6c6;\n}\n::-webkit-scrollbar-thumb:hover {\n background: #999;\n}\n@media only screen and (min-width: 768px) {\n .ui.modal.tms-md450 {\n width: 450px!important;\n margin-left: -225px !important;\n }\n .ui.modal.tms-md510 {\n width: 510px!important;\n margin-left: -255px !important;\n }\n .ui.modal.tms-md540 {\n width: 540px!important;\n margin-left: -275px !important;\n }\n}\n/* for swipebox */\n#swipebox-overlay {\n background: rgba(13, 13, 13, 0.5) !important;\n}\n.keyboard {\n background: #fff;\n font-weight: 700;\n padding: 2px .35rem;\n font-size: .8rem;\n margin: 0 2px;\n border-radius: .25rem;\n color: #3d3c40;\n border-bottom: 2px solid #9e9ea6;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);\n text-shadow: none;\n}\n#nprogress .spinner {\n display: none!important;\n}\n.tms-dropzone-preview-hidden .dz-preview {\n display: none!important;\n}\n"}),define("text!chat/chat-direct.html",["module"],function(e){e.exports='\r\n'}),define("text!common.css",["module"],function(e){e.exports="code.nx {\n background-color: #F8F8F8;\n border: 1px solid #EAEAEA;\n border-radius: 3px 3px 3px 3px;\n margin: 0 2px;\n padding: 0 5px;\n white-space: nowrap;\n}\n.markdown-body .pre-code-wrapper {\n position: relative;\n}\n.markdown-body .pre-code-wrapper > i.copy.icon {\n display: none;\n position: absolute;\n top: 0;\n right: 0;\n cursor: pointer;\n}\n.markdown-body .pre-code-wrapper:hover > i.copy.icon {\n display: block;\n}\n.tms-disabled {\n cursor: default;\n opacity: .45!important;\n background-image: none!important;\n box-shadow: none!important;\n pointer-events: none!important;\n}\n.tms-hidden {\n display: none!important;\n}\n.animated {\n -webkit-animation-duration: 1s;\n animation-duration: 1s;\n -webkit-animation-fill-mode: both;\n animation-fill-mode: both;\n}\n@keyframes flip {\n from {\n -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -360deg);\n transform: perspective(400px) rotate3d(0, 1, 0, -360deg);\n -webkit-animation-timing-function: ease-out;\n animation-timing-function: ease-out;\n }\n 40% {\n -webkit-transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -190deg);\n transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -190deg);\n -webkit-animation-timing-function: ease-out;\n animation-timing-function: ease-out;\n }\n 50% {\n -webkit-transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -170deg);\n transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -170deg);\n -webkit-animation-timing-function: ease-in;\n animation-timing-function: ease-in;\n }\n 80% {\n -webkit-transform: perspective(400px) scale3d(0.95, 0.95, 0.95);\n transform: perspective(400px) scale3d(0.95, 0.95, 0.95);\n -webkit-animation-timing-function: ease-in;\n animation-timing-function: ease-in;\n }\n to {\n -webkit-transform: perspective(400px);\n transform: perspective(400px);\n -webkit-animation-timing-function: ease-in;\n animation-timing-function: ease-in;\n }\n}\n.animated.flip {\n -webkit-backface-visibility: visible;\n backface-visibility: visible;\n -webkit-animation-name: flip;\n animation-name: flip;\n}\n.cbutton {\n position: relative;\n}\n.cbutton::after {\n position: absolute;\n top: 50%;\n left: 50%;\n margin: -7px 0 0 -7px;\n width: 14px;\n height: 14px;\n border-radius: 50%;\n content: '';\n opacity: 0;\n pointer-events: none;\n}\n/* Novak */\n.cbutton--effect-novak::after {\n background: rgba(111, 148, 182, 0.25);\n}\n.cbutton--effect-novak.cbutton--click::after {\n -webkit-animation: anim-effect-novak 0.5s forwards;\n animation: anim-effect-novak 0.5s forwards;\n}\n@-webkit-keyframes anim-effect-novak {\n 0% {\n opacity: 1;\n -webkit-transform: scale3d(0.1, 0.1, 1);\n transform: scale3d(0.1, 0.1, 1);\n }\n 100% {\n opacity: 0;\n -webkit-transform: scale3d(8, 8, 1);\n transform: scale3d(30, 30, 1);\n }\n}\n@keyframes anim-effect-novak {\n 0% {\n opacity: 1;\n -webkit-transform: scale3d(0.1, 0.1, 1);\n transform: scale3d(0.1, 0.1, 1);\n }\n 100% {\n opacity: 0;\n -webkit-transform: scale3d(8, 8, 1);\n transform: scale3d(30, 30, 1);\n }\n}\n.emoji {\n width: 1.5em;\n height: 1.5em;\n display: inline-block;\n margin-bottom: -0.25em;\n background-size: contain;\n}\n"; -}),define("text!test/test-lifecycle.html",["module"],function(e){e.exports='\r\n'}),define("text!override.css",["module"],function(e){e.exports=".ui.dimmer {\n background-color: rgba(0, 0, 0, 0.5) !important;\n}\n.ui.dimmer.page.modals {\n z-index: 10000;\n}\n.ui.modal > .actions > .ui.left.floated.button {\n margin-left: 3.5px;\n}\n.ui.list .list .item {\n display: list-item !important;\n table-layout: fixed;\n height: auto!important;\n visibility: visible!important;\n}\n.ui.list .list .item:after {\n content: '';\n display: block;\n height: 0;\n clear: both;\n visibility: hidden;\n}\n#swipebox-bottom-bar,\n#swipebox-top-bar {\n background: rgba(0, 0, 0, 0.3) !important;\n}\n"}),define("text!blog/blog.css",["module"],function(e){e.exports=""}),define("text!user/user-login.html",["module"],function(e){e.exports='\r\n'}),define("text!user/user-pwd-reset.html",["module"],function(e){e.exports='\r\n'}),define("text!chat/chat-direct.css",["module"],function(e){e.exports=".tms-chat-direct {\n height: 100%;\n}\n.tms-chat-direct .ui.comments {\n min-height: calc(100% - 170px);\n}\n.tms-chat-direct .ui.comments > .comment > .content {\n display: block!important;\n}\n.tms-chat-direct .tms-edit-textarea {\n width: 100%;\n}\n.tms-chat-direct .ui.selection.list > .item {\n cursor: default;\n}\n.tms-chat-direct .ui.search .prompt {\n border-radius: .28571429rem;\n}\n.tms-chat-direct .tms-content {\n position: relative;\n margin-left: 220px;\n top: 60px;\n height: calc(100% - 60px);\n}\n.tms-chat-direct .tms-content.tms-sidebar-show .tms-right-sidebar {\n width: 388px;\n border-left: 1px #e9e9e9 solid;\n -webkit-transition: width 0.15s ease-out 0s;\n transition: width 0.15s ease-out 0s;\n margin: 4px;\n margin-right: 0;\n}\n@media only screen and (max-width: 767px) {\n .tms-chat-direct .tms-content {\n margin-left: 0;\n }\n}\n.tms-chat-direct .tms-content .tms-content-body {\n width: 100%;\n height: 100%;\n max-width: 100%;\n padding-bottom: 73px;\n}\n.tms-chat-direct .tms-content .tms-content-body .tms-comments-container {\n width: 100%;\n height: 100%;\n overflow: auto;\n}\n.tms-chat-direct .tms-content .tms-content-body .ui.comments {\n overflow: hidden;\n max-width: none;\n margin-bottom: 12px;\n margin-top: 10px;\n}\n.tms-chat-direct .tms-content .tms-content-body .ui.comments > .ui.basic.button {\n display: block;\n margin-right: 0;\n}\n.tms-chat-direct .tms-content .tms-content-body .ui.comments .tms-pre-more {\n margin-bottom: 10px;\n}\n.tms-chat-direct .tms-content .tms-content-body .ui.comments .tms-next-more {\n margin-top: 10px;\n position: relative;\n}\n.tms-chat-direct .tms-content .tms-content-body .ui.comments .tms-next-more .ui.icon.button {\n position: absolute;\n top: 2px;\n right: -1px;\n}\n.tms-chat-direct .tms-content .tms-content-body .tms-go {\n position: fixed;\n left: 240px;\n}\n.tms-chat-direct .tms-content .tms-content-body .tms-go .ui.button {\n margin: 0;\n background-color: rgba(224, 225, 226, 0.5);\n}\n.tms-chat-direct .tms-content .tms-content-body .tms-go .ui.button:hover {\n background-color: #CACBCD;\n}\n@media only screen and (max-width: 767px) {\n .tms-chat-direct .tms-content .tms-content-body .tms-go {\n left: 20px;\n }\n}\n.tms-chat-direct .tms-content .tms-content-body .tms-go-head {\n top: 80px;\n}\n.tms-chat-direct .tms-content .tms-content-body .tms-go-foot {\n bottom: 90px;\n}\n.tms-chat-direct .tms-right-sidebar {\n position: absolute;\n top: 0;\n right: 0;\n width: 0;\n bottom: 0;\n overflow: hidden;\n padding-top: 10px;\n padding-bottom: 10px;\n}\n.tms-chat-direct .tms-right-sidebar .comments .ui.button.tms-search-more {\n display: block;\n margin: 0;\n}\n.tms-chat-direct .tms-right-sidebar .comments .comment .markdown-body {\n max-height: 65px;\n overflow-y: hidden;\n}\n.tms-chat-direct .tms-right-sidebar .comments .comment .markdown-body.tms-open {\n max-height: none;\n overflow-y: auto;\n padding-bottom: 20px;\n}\n.tms-chat-direct .tms-right-sidebar .comments .comment .tms-btn-open-search-item {\n display: none;\n height: 25px;\n background-color: rgba(0, 0, 0, 0.1);\n position: absolute;\n bottom: 0;\n right: 0;\n left: 0;\n text-align: center;\n padding-top: 2px;\n}\n.tms-chat-direct .tms-right-sidebar .comments .comment:hover .tms-btn-open-search-item {\n display: block;\n}\n@media only screen and (max-width: 767px) {\n .tms-chat-direct .tms-left-sidebar {\n display: none;\n }\n .tms-chat-direct .tms-right-sidebar {\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n top: 59px;\n background-color: white;\n margin-left: 0!important;\n }\n .tms-chat-direct .tms-right-sidebar .panel-chat-msg .ui.basic.segment.minimal.selection.list.segment.comments {\n padding-left: 0;\n padding-right: 0;\n }\n .tms-chat-direct .tms-sidebar-show .tms-right-sidebar {\n width: 100%!important;\n }\n}\n.tms-chat-direct .tms-edit-actions .left.button {\n border-top-left-radius: 0;\n}\n.tms-chat-direct .tms-edit-actions .right.button {\n border-top-right-radius: 0;\n}\n.tms-chat-progress {\n position: absolute;\n display: inline-block;\n top: 60px;\n left: 0;\n width: 0;\n height: 2px;\n margin-left: 220px;\n background-color: #c6c6c6;\n box-shadow: 0px 0px 8px 0px #c6c6c6;\n}\n@media only screen and (max-width: 767px) {\n .tms-chat-progress {\n margin-left: 0;\n }\n}\n"}),define("text!user/user-register.html",["module"],function(e){e.exports='\r\n'}),define("text!chat/md-github.css",["module"],function(e){e.exports='.markdown-body {\n font-size: 14px;\n line-height: 1.6;\n}\n.markdown-body > br,\n.markdown-body ul br .markdown-body ol br {\n display: none;\n}\n.markdown-body > *:first-child {\n margin-top: 0 !important;\n}\n.markdown-body > *:last-child {\n margin-bottom: 0 !important;\n}\n.markdown-body a {\n word-break: break-all;\n}\n.markdown-body a.absent {\n color: #CC0000;\n}\n.markdown-body a.anchor {\n bottom: 0;\n cursor: pointer;\n display: block;\n left: 0;\n margin-left: -30px;\n padding-left: 30px;\n position: absolute;\n top: 0;\n}\n.markdown-body h1,\n.markdown-body h2,\n.markdown-body h3,\n.markdown-body h4,\n.markdown-body h5,\n.markdown-body h6 {\n cursor: text;\n font-weight: bold;\n margin: 20px 0 10px;\n padding: 0;\n position: relative;\n word-break: break-all;\n}\n.markdown-body h1 .mini-icon-link,\n.markdown-body h2 .mini-icon-link,\n.markdown-body h3 .mini-icon-link,\n.markdown-body h4 .mini-icon-link,\n.markdown-body h5 .mini-icon-link,\n.markdown-body h6 .mini-icon-link {\n color: #000000;\n display: none;\n}\n.markdown-body h1:hover a.anchor,\n.markdown-body h2:hover a.anchor,\n.markdown-body h3:hover a.anchor,\n.markdown-body h4:hover a.anchor,\n.markdown-body h5:hover a.anchor,\n.markdown-body h6:hover a.anchor {\n line-height: 1;\n margin-left: -22px;\n padding-left: 0;\n text-decoration: none;\n top: 15%;\n}\n.markdown-body h1:hover a.anchor .mini-icon-link,\n.markdown-body h2:hover a.anchor .mini-icon-link,\n.markdown-body h3:hover a.anchor .mini-icon-link,\n.markdown-body h4:hover a.anchor .mini-icon-link,\n.markdown-body h5:hover a.anchor .mini-icon-link,\n.markdown-body h6:hover a.anchor .mini-icon-link {\n display: inline-block;\n}\n.markdown-body h1 tt,\n.markdown-body h1 code,\n.markdown-body h2 tt,\n.markdown-body h2 code,\n.markdown-body h3 tt,\n.markdown-body h3 code,\n.markdown-body h4 tt,\n.markdown-body h4 code,\n.markdown-body h5 tt,\n.markdown-body h5 code,\n.markdown-body h6 tt,\n.markdown-body h6 code {\n font-size: inherit;\n}\n.markdown-body h1 {\n color: #000000;\n font-size: 28px;\n}\n.markdown-body h2 {\n border-bottom: 1px solid #CCCCCC;\n color: #000000;\n font-size: 24px;\n}\n.markdown-body h3 {\n font-size: 18px;\n}\n.markdown-body h4 {\n font-size: 16px;\n}\n.markdown-body h5 {\n font-size: 14px;\n}\n.markdown-body h6 {\n color: #777777;\n font-size: 14px;\n}\n.markdown-body p,\n.markdown-body blockquote,\n.markdown-body ul,\n.markdown-body ol,\n.markdown-body dl,\n.markdown-body table,\n.markdown-body pre {\n margin: 15px 0;\n}\n.markdown-body hr {\n overflow: hidden;\n background: 0 0;\n}\n.markdown-body hr:before {\n display: table;\n content: "";\n}\n.markdown-body hr:after {\n display: table;\n clear: both;\n content: "";\n}\n.markdown-body hr {\n height: 4px;\n padding: 0;\n margin: 16px 0;\n background-color: #e7e7e7;\n border: 0;\n}\n.markdown-body hr {\n -moz-box-sizing: content-box;\n box-sizing: content-box;\n}\n.markdown-body > h2:first-child,\n.markdown-body > h1:first-child,\n.markdown-body > h1:first-child + h2,\n.markdown-body > h3:first-child,\n.markdown-body > h4:first-child,\n.markdown-body > h5:first-child,\n.markdown-body > h6:first-child {\n margin-top: 0;\n padding-top: 0;\n}\n.markdown-body a:first-child h1,\n.markdown-body a:first-child h2,\n.markdown-body a:first-child h3,\n.markdown-body a:first-child h4,\n.markdown-body a:first-child h5,\n.markdown-body a:first-child h6 {\n margin-top: 0;\n padding-top: 0;\n}\n.markdown-body h1 + p,\n.markdown-body h2 + p,\n.markdown-body h3 + p,\n.markdown-body h4 + p,\n.markdown-body h5 + p,\n.markdown-body h6 + p {\n margin-top: 0;\n}\n.markdown-body li p.first {\n display: inline-block;\n}\n.markdown-body ul,\n.markdown-body ol {\n padding-left: 30px;\n}\n.markdown-body ul.no-list,\n.markdown-body ol.no-list {\n list-style-type: none;\n padding: 0;\n}\n.markdown-body ul li > *:first-child,\n.markdown-body ol li > *:first-child {\n margin-top: 0;\n}\n.markdown-body ul ul,\n.markdown-body ul ol,\n.markdown-body ol ol,\n.markdown-body ol ul {\n margin-bottom: 0;\n}\n.markdown-body dl {\n padding: 0;\n}\n.markdown-body dl dt {\n font-size: 14px;\n font-style: italic;\n font-weight: bold;\n margin: 15px 0 5px;\n padding: 0;\n}\n.markdown-body dl dt:first-child {\n padding: 0;\n}\n.markdown-body dl dt > *:first-child {\n margin-top: 0;\n}\n.markdown-body dl dt > *:last-child {\n margin-bottom: 0;\n}\n.markdown-body dl dd {\n margin: 0 0 15px;\n padding: 0 15px;\n}\n.markdown-body dl dd > *:first-child {\n margin-top: 0;\n}\n.markdown-body dl dd > *:last-child {\n margin-bottom: 0;\n}\n.markdown-body blockquote {\n border-left: 4px solid #DDDDDD;\n color: #777777;\n padding: 0 15px;\n}\n.markdown-body blockquote > *:first-child {\n margin-top: 0;\n}\n.markdown-body blockquote > *:last-child {\n margin-bottom: 0;\n}\n.markdown-body table th {\n font-weight: bold;\n}\n.markdown-body table th,\n.markdown-body table td {\n border: 1px solid #CCCCCC;\n padding: 6px 13px;\n}\n.markdown-body table tr {\n background-color: #FFFFFF;\n border-top: 1px solid #CCCCCC;\n}\n.markdown-body table tr:nth-child(2n) {\n background-color: #F8F8F8;\n}\n.markdown-body img {\n max-width: 100%;\n}\n.markdown-body span.frame {\n display: block;\n overflow: hidden;\n}\n.markdown-body span.frame > span {\n border: 1px solid #DDDDDD;\n display: block;\n float: left;\n margin: 13px 0 0;\n overflow: hidden;\n padding: 7px;\n width: auto;\n}\n.markdown-body span.frame span img {\n display: block;\n float: left;\n}\n.markdown-body span.frame span span {\n clear: both;\n color: #333333;\n display: block;\n padding: 5px 0 0;\n}\n.markdown-body span.align-center {\n clear: both;\n display: block;\n overflow: hidden;\n}\n.markdown-body span.align-center > span {\n display: block;\n margin: 13px auto 0;\n overflow: hidden;\n text-align: center;\n}\n.markdown-body span.align-center span img {\n margin: 0 auto;\n text-align: center;\n}\n.markdown-body span.align-right {\n clear: both;\n display: block;\n overflow: hidden;\n}\n.markdown-body span.align-right > span {\n display: block;\n margin: 13px 0 0;\n overflow: hidden;\n text-align: right;\n}\n.markdown-body span.align-right span img {\n margin: 0;\n text-align: right;\n}\n.markdown-body span.float-left {\n display: block;\n float: left;\n margin-right: 13px;\n overflow: hidden;\n}\n.markdown-body span.float-left span {\n margin: 13px 0 0;\n}\n.markdown-body span.float-right {\n display: block;\n float: right;\n margin-left: 13px;\n overflow: hidden;\n}\n.markdown-body span.float-right > span {\n display: block;\n margin: 13px auto 0;\n overflow: hidden;\n text-align: right;\n}\n.markdown-body code,\n.markdown-body tt {\n background-color: #F8F8F8;\n border: 1px solid #EAEAEA;\n border-radius: 3px 3px 3px 3px;\n margin: 0 2px;\n padding: 0 5px;\n /* white-space: nowrap; */\n white-space: normal;\n word-break: break-all;\n}\n.markdown-body pre > code {\n background: none repeat scroll 0 0 transparent;\n border: medium none;\n margin: 0;\n padding: 0;\n white-space: pre;\n}\n.markdown-body .highlight pre,\n.markdown-body pre {\n background-color: #F8F8F8;\n border: 1px solid #CCCCCC;\n border-radius: 3px 3px 3px 3px;\n font-size: 13px;\n line-height: 19px;\n overflow: auto;\n padding: 6px 10px;\n}\n.markdown-body pre code,\n.markdown-body pre tt {\n background-color: transparent;\n border: medium none;\n}\n'}),define("text!resources/elements/em-blog-comment-popup.html",["module"],function(e){e.exports='\r\n'}),define("text!common/common-scrollbar.css",["module"],function(e){e.exports='/*************** SCROLLBAR BASE CSS ***************/\n.scroll-wrapper {\n overflow: hidden !important;\n padding: 0 !important;\n position: relative;\n width: 100%;\n height: 100%;\n}\n.scroll-wrapper > .scroll-content {\n border: none !important;\n box-sizing: content-box !important;\n height: auto;\n left: 0;\n margin: 0;\n max-height: none;\n max-width: none !important;\n overflow: scroll !important;\n padding: 0;\n position: relative !important;\n top: 0;\n width: auto !important;\n}\n.scroll-wrapper > .scroll-content::-webkit-scrollbar {\n height: 0;\n width: 0;\n}\n.scroll-element {\n display: none;\n}\n.scroll-element,\n.scroll-element div {\n box-sizing: content-box;\n}\n.scroll-element.scroll-x.scroll-scrollx_visible,\n.scroll-element.scroll-y.scroll-scrolly_visible {\n display: block;\n}\n.scroll-element .scroll-bar,\n.scroll-element .scroll-arrow {\n cursor: default;\n}\n.scroll-textarea {\n border: 1px solid #cccccc;\n border-top-color: #999999;\n}\n.scroll-textarea > .scroll-content {\n overflow: hidden !important;\n}\n.scroll-textarea > .scroll-content > textarea {\n border: none !important;\n box-sizing: border-box;\n height: 100% !important;\n margin: 0;\n max-height: none !important;\n max-width: none !important;\n overflow: scroll !important;\n outline: none;\n padding: 2px;\n position: relative !important;\n top: 0;\n width: 100% !important;\n}\n.scroll-textarea > .scroll-content > textarea::-webkit-scrollbar {\n height: 0;\n width: 0;\n}\n/*************** SIMPLE OUTER SCROLLBAR ***************/\n.scrollbar-outer > .scroll-element,\n.scrollbar-outer > .scroll-element div {\n border: none;\n margin: 0;\n padding: 0;\n position: absolute;\n z-index: 10;\n}\n.scrollbar-outer > .scroll-element {\n background-color: #ffffff;\n}\n.scrollbar-outer > .scroll-element div {\n display: block;\n height: 100%;\n left: 0;\n top: 0;\n width: 100%;\n}\n.scrollbar-outer > .scroll-element.scroll-x {\n bottom: 0;\n height: 12px;\n left: 0;\n width: 100%;\n}\n.scrollbar-outer > .scroll-element.scroll-y {\n height: 100%;\n right: 0;\n top: 0;\n width: 12px;\n}\n.scrollbar-outer > .scroll-element.scroll-x .scroll-element_outer {\n height: 8px;\n top: 2px;\n}\n.scrollbar-outer > .scroll-element.scroll-y .scroll-element_outer {\n left: 2px;\n width: 8px;\n}\n.scrollbar-outer > .scroll-element .scroll-element_outer {\n overflow: hidden;\n}\n.scrollbar-outer > .scroll-element .scroll-element_track {\n background-color: #eeeeee;\n}\n.scrollbar-outer > .scroll-element .scroll-element_outer,\n.scrollbar-outer > .scroll-element .scroll-element_track,\n.scrollbar-outer > .scroll-element .scroll-bar {\n -webkit-border-radius: 8px;\n -moz-border-radius: 8px;\n border-radius: 8px;\n}\n.scrollbar-outer > .scroll-element .scroll-bar {\n background-color: #d9d9d9;\n}\n.scrollbar-outer > .scroll-element .scroll-bar:hover {\n background-color: #c2c2c2;\n}\n.scrollbar-outer > .scroll-element.scroll-draggable .scroll-bar {\n background-color: #919191;\n}\n/* scrollbar height/width & offset from container borders */\n.scrollbar-outer > .scroll-content.scroll-scrolly_visible {\n left: -12px;\n margin-left: 12px;\n}\n.scrollbar-outer > .scroll-content.scroll-scrollx_visible {\n top: -12px;\n margin-top: 12px;\n}\n.scrollbar-outer > .scroll-element.scroll-x .scroll-bar {\n min-width: 10px;\n}\n.scrollbar-outer > .scroll-element.scroll-y .scroll-bar {\n min-height: 10px;\n}\n/* update scrollbar offset if both scrolls are visible */\n.scrollbar-outer > .scroll-element.scroll-x.scroll-scrolly_visible .scroll-element_track {\n left: -14px;\n}\n.scrollbar-outer > .scroll-element.scroll-y.scroll-scrollx_visible .scroll-element_track {\n top: -14px;\n}\n.scrollbar-outer > .scroll-element.scroll-x.scroll-scrolly_visible .scroll-element_size {\n left: -14px;\n}\n.scrollbar-outer > .scroll-element.scroll-y.scroll-scrollx_visible .scroll-element_size {\n top: -14px;\n}\n/*************** SCROLLBAR MAC OS X ***************/\n.scrollbar-macosx > .scroll-element,\n.scrollbar-macosx > .scroll-element div {\n background: none;\n border: none;\n margin: 0;\n padding: 0;\n position: absolute;\n z-index: 10;\n}\n.scrollbar-macosx > .scroll-element div {\n display: block;\n height: 100%;\n left: 0;\n top: 0;\n width: 100%;\n}\n.scrollbar-macosx > .scroll-element .scroll-element_track {\n display: none;\n}\n.scrollbar-macosx > .scroll-element .scroll-bar {\n background-color: #6C6E71;\n display: block;\n -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";\n filter: alpha(opacity=0);\n opacity: 0;\n -webkit-border-radius: 7px;\n -moz-border-radius: 7px;\n border-radius: 7px;\n -webkit-transition: opacity 0.2s linear;\n -moz-transition: opacity 0.2s linear;\n -o-transition: opacity 0.2s linear;\n -ms-transition: opacity 0.2s linear;\n transition: opacity 0.2s linear;\n}\n.scrollbar-macosx:hover > .scroll-element .scroll-bar,\n.scrollbar-macosx > .scroll-element.scroll-draggable .scroll-bar {\n -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=70)";\n filter: alpha(opacity=70);\n opacity: 0.7;\n}\n.scrollbar-macosx > .scroll-element.scroll-x {\n bottom: 0px;\n height: 0px;\n left: 0;\n min-width: 100%;\n overflow: visible;\n width: 100%;\n}\n.scrollbar-macosx > .scroll-element.scroll-y {\n height: 100%;\n min-height: 100%;\n right: 0px;\n top: 0;\n width: 0px;\n}\n/* scrollbar height/width & offset from container borders */\n.scrollbar-macosx > .scroll-element.scroll-x .scroll-bar {\n height: 7px;\n min-width: 10px;\n top: -9px;\n}\n.scrollbar-macosx > .scroll-element.scroll-y .scroll-bar {\n left: -9px;\n min-height: 10px;\n width: 7px;\n}\n.scrollbar-macosx > .scroll-element.scroll-x .scroll-element_outer {\n left: 2px;\n}\n.scrollbar-macosx > .scroll-element.scroll-x .scroll-element_size {\n left: -4px;\n}\n.scrollbar-macosx > .scroll-element.scroll-y .scroll-element_outer {\n top: 2px;\n}\n.scrollbar-macosx > .scroll-element.scroll-y .scroll-element_size {\n top: -4px;\n}\n/* update scrollbar offset if both scrolls are visible */\n.scrollbar-macosx > .scroll-element.scroll-x.scroll-scrolly_visible .scroll-element_size {\n left: -11px;\n}\n.scrollbar-macosx > .scroll-element.scroll-y.scroll-scrollx_visible .scroll-element_size {\n top: -11px;\n}\n'}),define("text!resources/elements/em-blog-comment-share.html",["module"],function(e){e.exports='\r\n'}),define("text!user/user-login.css",["module"],function(e){e.exports=".tms-user-login {\n width: 100%;\n min-height: 100%;\n background-color: #5a3636;\n overflow: hidden;\n}\n.tms-user-login .container {\n width: 300px;\n top: 50px;\n margin-left: auto;\n margin-right: auto;\n position: relative;\n}\n.tms-user-login h2 {\n color: rgba(197, 164, 164, 0.8) !important;\n}\n.tms-user-login .ui.form {\n background-color: #353131;\n}\n.tms-user-login .ui.error.message {\n background-color: #5a3636;\n}\n.tms-user-login .ui.error.message .header {\n color: #e0b4b4;\n}\n.tms-user-login .ui.checkbox label {\n color: #ad8b8b;\n}\n.tms-user-login .ui.checkbox input:focus ~ label {\n color: #ad8b8b;\n}\n.tms-user-login .ui.checkbox label:hover {\n color: #ad8b8b;\n}\n.tms-user-login .ui.button {\n background-color: #5a3636;\n color: #ad8b75;\n}\n"}),define("text!resources/elements/em-blog-comment.html",["module"],function(e){e.exports='\r\n'; -}),define("text!user/user-pwd-reset.css",["module"],function(e){e.exports=".tms-user-pwd-reset {\n height: 100%;\n}\n.tms-user-pwd-reset .tms-flex {\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n"}),define("text!resources/elements/em-blog-content.html",["module"],function(e){e.exports='\r\n'}),define("text!user/user-register.css",["module"],function(e){e.exports=".tms-user-register {\n height: 100%;\n}\n.tms-user-register .tms-flex {\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n"}),define("text!resources/elements/em-blog-comment-popup.css",["module"],function(e){e.exports=""}),define("text!resources/elements/em-blog-history-diff.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-blog-comment-share.css",["module"],function(e){e.exports=".em-blog-comment-share.ui.popup {\n max-width: 100%;\n width: 255px;\n}\n.em-blog-comment-share.ui.popup .ui.input {\n width: 225px;\n}\n.em-blog-comment-share.ui.popup textarea {\n /* width: 195px!important; */\n}\n.em-blog-comment-share.ui.popup .ui.search > .results .result {\n cursor: pointer!important;\n display: block!important;\n color: rgba(0, 0, 0, 0.87) !important;\n border-bottom: 1px solid rgba(34, 36, 38, 0.1) !important;\n margin: 0!important;\n}\n.em-blog-comment-share.ui.popup .ui.list > .item {\n color: rgba(0, 0, 0, 0.87);\n}\n.em-blog-comment-share:after {\n content: '';\n clear: both;\n}\n.em-blog-comment-share .footer {\n margin-top: 16px;\n}\n.em-blog-comment-share .footer .btn-cancel {\n float: right;\n margin: 6px 0 0 8px!important;\n}\n"}),define("text!resources/elements/em-blog-history-view.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-blog-comment.css",["module"],function(e){e.exports='.em-blog-comment {\n margin-top: 32px;\n margin-bottom: 32px;\n}\n.em-blog-comment .ui.comments {\n max-width: 100%;\n}\n.em-blog-comment .ui.comments > .ui.dividing.header {\n margin-bottom: 0;\n}\n.em-blog-comment .ui.comments .comment {\n margin-top: 0;\n}\n.em-blog-comment .ui.comments .comment:hover {\n background: rgba(0, 0, 0, 0.03);\n color: rgba(0, 0, 0, 0.8);\n}\n.em-blog-comment .ui.comments .comment:hover .content .tools {\n display: block;\n}\n.em-blog-comment .ui.comments .comment:hover:before {\n width: 4px;\n}\n.em-blog-comment .ui.comments .comment > .ui.divider {\n margin-bottom: 0;\n}\n.em-blog-comment .ui.comments .comment .content .tms-blog-comment-edit-textarea {\n width: 100%;\n}\n.em-blog-comment .ui.comments .comment .content .textcomplete-container {\n position: relative;\n}\n.em-blog-comment .ui.comments .comment .content .textcomplete-container .append-to {\n position: absolute;\n left: 0;\n bottom: 0;\n width: 100%;\n}\n.em-blog-comment .ui.comments .comment .content > .tools {\n position: absolute;\n right: 0;\n bottom: 0;\n display: none;\n}\n.em-blog-comment .ui.comments .comment .content > .tools > .ui.button {\n margin: 0;\n background-color: rgba(224, 225, 226, 0.5);\n}\n.em-blog-comment .ui.comments .comment .content > .tools > .ui.button:hover {\n background-color: #e0e1e2;\n}\n.em-blog-comment .ui.comments .comment.active {\n background-color: #f5f5f5;\n}\n.em-blog-comment .ui.comments .comment.active:before {\n width: 4px;\n}\n.em-blog-comment .ui.comments .comment:before {\n content: "";\n position: absolute;\n z-index: -1;\n top: -2px;\n left: -4px;\n bottom: 1px;\n background: #2098D1;\n width: 0;\n -webkit-transition-property: width;\n transition-property: width;\n -webkit-transition-duration: 0.3s;\n transition-duration: 0.3s;\n -webkit-transition-timing-function: ease-out;\n transition-timing-function: ease-out;\n}\n.em-blog-comment .ui.comments .comment:nth-child(2):before {\n top: -1px;\n}\n.em-blog-comment .CodeMirror {\n min-height: 60px;\n}\n.em-blog-comment .CodeMirror-scroll {\n min-height: 60px;\n}\n.em-blog-comment .dropzone {\n position: relative;\n}\n.em-blog-comment .dropzone .tms-blog-comment-status-bar-wrapper {\n position: relative;\n width: 100%;\n height: 0;\n}\n.em-blog-comment .dropzone .tms-blog-comment-status-bar-wrapper .tms-blog-comment-status-bar {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n}\n.em-blog-comment .dropzone .tms-blog-comment-status-bar-wrapper .dropzone-previews {\n position: absolute;\n left: 0;\n bottom: -7px;\n width: 100%;\n}\n.em-blog-comment .dropzone .tms-blog-comment-status-bar-wrapper .dropzone-previews .dz-preview {\n width: 100%;\n margin: 0;\n}\n.em-blog-comment .dropzone .tms-blog-comment-status-bar-wrapper .dropzone-previews .dz-preview .dz-progress {\n height: 2px;\n background-color: #aaa;\n border: none;\n}\n.em-blog-comment .dropzone .tms-blog-comment-status-bar-wrapper .dropzone-previews .dz-preview .dz-remove {\n display: none;\n}\n'}),define("text!resources/elements/em-blog-history.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-blog-content.css",["module"],function(e){e.exports=".em-blog-content {\n transition: width 0.15s ease-out 0s;\n position: fixed;\n top: 55px;\n left: 300px;\n width: calc(100% - 300px) !important;\n height: calc(100% - 55px) !important;\n padding: 16px;\n overflow: auto;\n}\n.right-sidebar-show .em-blog-content {\n width: calc(100% - 600px) !important;\n}\n@media only screen and (max-width: 767px) {\n .right-sidebar-show .em-blog-content {\n width: 100%!important;\n }\n}\n@media only screen and (max-width: 767px) {\n .em-blog-content {\n left: 0;\n width: 100%!important;\n }\n}\n.em-blog-content > .header {\n margin-bottom: 24px;\n}\n.em-blog-content > .header .ui.header .sub.header {\n color: #707070;\n font-size: 12px;\n margin-top: 8px;\n}\n.em-blog-content > .header .ui.header .sub.header a.author {\n cursor: pointer;\n}\n.em-blog-content > .header .ui.header .sub.header .readCnt {\n cursor: pointer;\n margin-left: 16px;\n}\n.em-blog-content > .header .ui.header .sub.header .readCnt a {\n cursor: pointer;\n}\n.em-blog-content > .header .ui.header .sub.header .commentCnt {\n cursor: pointer;\n margin-left: 16px;\n}\n.em-blog-content > .header .ui.header .sub.header .commentCnt a {\n cursor: pointer;\n}\n.em-blog-content .topbar {\n position: relative;\n height: 30px;\n margin-bottom: 8px;\n}\n.em-blog-content .topbar > .ui.breadcrumb {\n line-height: 30px;\n}\n.em-blog-content .topbar:after {\n content: '';\n clear: both;\n}\n.em-blog-content .topbar .actions {\n float: right;\n}\n.em-blog-content .topbar .actions > .ui.basic.button {\n padding: 8px;\n box-shadow: none;\n}\n.em-blog-content .topbar .actions > .ui.basic.button:hover {\n box-shadow: 0 0 0 1px rgba(34, 36, 38, 0.35) inset, 0 0 0 0 rgba(34, 36, 38, 0.15) inset;\n}\n.em-blog-content .topbar .actions > .ui.basic.button > i.icon {\n margin-right: 2px;\n}\n.em-blog-content .topbar .actions > .ui.basic.button > i.icon.hide {\n position: relative;\n top: -1px;\n}\n.em-blog-content .topbar .actions > .ui.basic.button > i.icon.unhide {\n position: relative;\n top: -1px;\n}\n.em-blog-content > .ui.message .content > span {\n display: inline-block;\n margin-top: 10px;\n}\n.em-blog-content > .ui.message .content .ui.button {\n position: relative;\n top: -5px;\n left: 10px;\n}\n.em-blog-content .footer {\n margin-top: 16px;\n}\n.em-blog-content .footer > span {\n font-size: 12px;\n}\n.em-blog-content .footer .rate {\n margin-right: 16px;\n cursor: pointer;\n color: #4183c4;\n}\n.em-blog-content > .ui.feed {\n margin-bottom: 25px!important;\n}\n.em-blog-content > .ui.feed > .event {\n position: relative;\n}\n.em-blog-content > .ui.feed > .event.opened > .content .extra.text:hover {\n max-height: none;\n overflow-y: auto;\n padding-bottom: 25px;\n}\n.em-blog-content > .ui.feed > .event > .label + .content {\n max-width: calc(100% - 50px);\n}\n.em-blog-content > .ui.feed > .event > .content .extra.text {\n position: relative;\n max-width: none;\n min-height: 25px;\n max-height: 60px;\n overflow-y: hidden;\n}\n.em-blog-content > .ui.feed > .event > .content .extra.text:hover > .btn-open {\n display: block;\n}\n.em-blog-content > .ui.feed > .event > .content .extra.text > .btn-open {\n display: none;\n height: 25px;\n background-color: rgba(0, 0, 0, 0.1);\n position: absolute;\n bottom: 0;\n right: 0;\n left: 0;\n text-align: center;\n padding-top: 2px;\n}\n.em-blog-content > .ui.feed > .event > .content .extra.text pre {\n white-space: pre-wrap;\n white-space: -moz-pre-wrap;\n white-space: -pre-wrap;\n white-space: -o-pre-wrap;\n word-wrap: break-word;\n word-break: break-all;\n}\n.em-blog-content > .ui.feed > .event.active {\n background: rgba(0, 0, 0, 0.03);\n}\n.em-blog-content > .ui.feed > .event.active:before {\n width: 4px;\n}\n.em-blog-content > .ui.feed > .event:hover {\n background: rgba(0, 0, 0, 0.03);\n}\n.em-blog-content > .ui.feed > .event:hover:before {\n width: 4px;\n}\n.em-blog-content > .ui.feed > .event:before {\n content: \"\";\n position: absolute;\n top: 0;\n left: -4px;\n bottom: 0;\n background: #2098D1;\n width: 0;\n -webkit-transition-property: width;\n transition-property: width;\n -webkit-transition-duration: 0.3s;\n transition-duration: 0.3s;\n -webkit-transition-timing-function: ease-out;\n transition-timing-function: ease-out;\n}\n.tms-blog-progress {\n position: absolute;\n display: inline-block;\n top: 55px;\n left: 0;\n width: 0;\n height: 2px;\n margin-left: 300px;\n background-color: #2185d0;\n box-shadow: 0px 0px 8px 0px #205081;\n}\n@media only screen and (max-width: 767px) {\n .tms-blog-progress {\n margin-left: 0;\n }\n}\n.em-blog-content-wrapper {\n position: fixed;\n top: 55px;\n width: calc(100vw) !important;\n height: calc(100% - 55px) !important;\n}\n@media only screen and (max-width: 767px) {\n .tms-blog.left-sidebar-show .em-blog-content-wrapper > .ui.dimmer {\n display: block;\n opacity: 1;\n }\n .tms-blog.right-sidebar-show .em-blog-content-wrapper > .ui.dimmer {\n display: block;\n opacity: 1;\n }\n .tms-blog .em-blog-content-wrapper > .ui.dimmer {\n display: none;\n }\n}\n"; -}),define("text!resources/elements/em-blog-left-sidebar.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-blog-history-diff.css",["module"],function(e){e.exports=".em-blog-history-diff > .content {\n max-height: 300px;\n overflow-y: auto;\n}\n"}),define("text!resources/elements/em-blog-right-sidebar.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-blog-history-view.css",["module"],function(e){e.exports=".em-blog-history-view > .topbar {\n margin-bottom: 16px;\n}\n.em-blog-history-view > .content {\n max-height: 300px;\n overflow-y: auto;\n}\n"}),define("text!resources/elements/em-blog-save.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-blog-history.css",["module"],function(e){e.exports=".em-blog-history > .topbar {\n margin-bottom: 16px;\n}\n.em-blog-history > .content {\n max-height: 300px;\n overflow-y: auto;\n}\n.em-blog-history .ui.table td a {\n cursor: pointer;\n}\n"}),define("text!resources/elements/em-blog-share.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-blog-left-sidebar.css",["module"],function(e){e.exports=".em-blog-left-sidebar.ui.left.sidebar {\n transition: left 0.15s ease-out 0s;\n width: 300px;\n top: 55px;\n left: 0;\n height: calc(100% - 55px) !important;\n background-color: #f5f5f5;\n box-shadow: none!important;\n}\n@media only screen and (max-width: 767px) {\n .em-blog-left-sidebar.ui.left.sidebar {\n z-index: 104;\n }\n .em-blog-left-sidebar.ui.left.sidebar.mobile-hide {\n left: -300px;\n }\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body {\n height: calc(100% - 40px) !important;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.space.list {\n padding: 16px;\n padding-left: 15px;\n margin-bottom: 0px;\n padding-bottom: 8px;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.space.list > .item {\n position: relative;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.space.list > .item:hover {\n box-shadow: 0px 0px 2px -1px #5791cb;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.space.list > .item:hover > .actions {\n display: inline-block;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.space.list > .item > .icon {\n padding-right: 0;\n position: relative;\n top: -1px;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.space.list > .item > .content {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 245px;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.space.list > .item > .actions {\n display: none;\n position: absolute;\n right: 0;\n top: -2px;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.space.list .ui.bulleted.list {\n padding-left: 16px;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.space.list .ui.bulleted.list > div.item {\n max-width: 220px;\n padding-top: 5px;\n padding-bottom: 5px;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.space.list .ui.bulleted.list > div.item > a {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n min-width: 220px;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.space.list .ui.bulleted.list > div.item:before {\n color: #999;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.space.list .ui.bulleted.list > div.item.active {\n font-weight: bold;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.space.list .ui.bulleted.list > div.item.active > a {\n color: black;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.space.list .ui.bulleted.list > div.item:hover {\n background-color: rgba(232, 224, 224, 0.5);\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.space.list .ui.bulleted.list > div.item.aurelia-hide {\n display: none!important;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.bulleted.list.no-space {\n padding: 20px;\n margin-top: 0px;\n padding-top: 0px;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.bulleted.list.no-space > div.item {\n padding-top: 5px;\n padding-bottom: 5px;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.bulleted.list.no-space > div.item > a {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n min-width: 242px;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.bulleted.list.no-space > div.item:before {\n color: #999;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.bulleted.list.no-space > div.item.active {\n font-weight: bold;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.bulleted.list.no-space > div.item.active > a {\n color: black;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.bulleted.list.no-space > div.item:hover {\n background-color: rgba(232, 224, 224, 0.5);\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-footer {\n position: absolute;\n width: 100%;\n height: 40px;\n left: 0;\n bottom: 0;\n background-color: #efe4e4;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-footer .ui.menu {\n border: none;\n border-radius: 0;\n background-color: #e8e0e0;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-footer .ui.menu > .item.tms-search {\n position: relative;\n height: 40px;\n max-width: 207px;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-footer .ui.menu > .item.tms-search:before {\n width: 0;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-footer .ui.menu > .item.tms-search > .remove.icon {\n position: absolute;\n right: 5px;\n top: 13px;\n}\n"}),define("text!resources/elements/em-blog-space-auth.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-blog-right-sidebar.css",["module"],function(e){e.exports=".em-blog-right-sidebar {\n width: 300px;\n background-color: #f5f5f5;\n position: fixed;\n top: 55px;\n right: -300px;\n height: calc(100% - 55px);\n transition: right 0.15s ease-out 0s;\n}\n.right-sidebar-show .em-blog-right-sidebar {\n right: 0;\n}\n.em-blog-right-sidebar .panel-blog-dir {\n padding: 16px;\n}\n.em-blog-right-sidebar .panel-blog-dir .wiki-dir-item.active {\n background-color: #e8e0e0;\n}\n"}),define("text!resources/elements/em-blog-save.css",["module"],function(e){e.exports=""}),define("text!resources/elements/em-blog-space-create.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-blog-space-edit.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-blog-share.css",["module"],function(e){e.exports=".em-blog-share.ui.popup {\n max-width: 100%;\n width: 255px;\n}\n.em-blog-share.ui.popup .ui.input {\n width: 225px;\n}\n.em-blog-share:after {\n content: '';\n clear: both;\n}\n.em-blog-share .footer {\n margin-top: 16px;\n}\n.em-blog-share .footer .btn-cancel {\n float: right;\n margin-top: 6px;\n margin-left: 8px;\n}\n"}),define("text!resources/elements/em-blog-space-update.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-blog-space-auth.css",["module"],function(e){e.exports=".em-blog-space-auth > .ui.form {\n margin-bottom: 16px;\n}\n.em-blog-space-auth .tms-header {\n margin-bottom: 8px;\n}\n.em-blog-space-auth .ui.search .prompt {\n border-radius: .28571429rem;\n}\n"}),define("text!resources/elements/em-blog-top-menu.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-blog-space-create.css",["module"],function(e){e.exports=".em-blog-space-create.ui.popup .ui.form {\n width: 260px;\n}\n"}),define("text!resources/elements/em-blog-space-edit.css",["module"],function(e){e.exports=""}),define("text!resources/elements/em-blog-write.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-blog-space-update.css",["module"],function(e){e.exports=""}),define("text!resources/elements/em-chat-attach.html",["module"],function(e){e.exports='\r\n'; -}),define("text!resources/elements/em-chat-channel-create.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-blog-top-menu.css",["module"],function(e){e.exports=".em-blog-top-menu.ui.inverted.blue.menu {\n background-color: #205081;\n height: 55px;\n z-index: 103;\n}\n.em-blog-top-menu.ui.inverted.blue.menu .item.tms-toggle {\n display: none;\n}\n.em-blog-top-menu.ui.inverted.blue.menu .item.tms-toggle i.icon {\n margin-right: 0;\n}\n.em-blog-top-menu.ui.inverted.blue.menu .item.tms-links i.icon {\n margin-right: 0;\n}\n.em-blog-top-menu.ui.inverted.blue.menu .right.menu .item .ui.icon.input input {\n background-color: #103a65;\n color: white;\n}\n.em-blog-top-menu.ui.inverted.blue.menu .right.menu .item .ui.icon.input input:focus {\n border-color: rgba(34, 36, 38, 0.15);\n box-shadow: none;\n}\n.em-blog-top-menu.ui.inverted.blue.menu .right.menu .item .ui.icon.input i.icon.search:before {\n color: #a3aab0;\n}\n.em-blog-top-menu.ui.inverted.blue.menu .right.menu .item .ui.search > .results {\n max-height: 350px;\n overflow-y: auto;\n left: -150px;\n}\n@media only screen and (max-width: 767px) {\n .em-blog-top-menu.ui.inverted.blue.menu .item.tms-links {\n display: none;\n }\n .em-blog-top-menu.ui.inverted.blue.menu .item.tms-logo {\n display: none;\n }\n .em-blog-top-menu.ui.inverted.blue.menu .item.header {\n display: none;\n }\n .em-blog-top-menu.ui.inverted.blue.menu .item.tms-toggle {\n display: flex;\n }\n .em-blog-top-menu.ui.inverted.blue.menu .right.menu .item .ui.search .ui.input {\n width: 100px;\n }\n .em-blog-top-menu.ui.inverted.blue.menu.search-focus .tms-logo {\n display: none;\n }\n .em-blog-top-menu.ui.inverted.blue.menu.search-focus .tms-create {\n display: none;\n }\n .em-blog-top-menu.ui.inverted.blue.menu.search-focus .right.menu .item .ui.search .ui.input {\n width: initial;\n transition: width 0.15s ease-out 0s;\n }\n .em-blog-top-menu.ui.inverted.blue.menu.search-focus .right.menu .tms-login-user {\n display: none;\n }\n}\n"}),define("text!resources/elements/em-chat-channel-edit.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-blog-write.css",["module"],function(e){e.exports="@media only screen and (max-width: 827px) {\n .modaal-wrapper .modaal-close {\n top: initial!important;\n bottom: 10px;\n z-index: 2;\n }\n}\n.em-blog-write {\n margin-top: -30px;\n margin-bottom: 20px;\n}\n.em-blog-write > .wrapper {\n max-width: 768px;\n margin: auto;\n}\n.em-blog-write > .wrapper > .title {\n position: fixed;\n z-index: 2;\n margin-bottom: 8px;\n width: calc(100% - 60px);\n background-color: white;\n padding-top: 18px;\n box-shadow: 0px 1px 0px 0px #dddddd;\n}\n@media only screen and (min-width: 828px) {\n .em-blog-write > .wrapper > .title {\n width: 768px;\n }\n}\n.em-blog-write > .wrapper > .title > .ui.input {\n padding-right: 80px;\n}\n.em-blog-write > .wrapper > .title > .ui.button {\n position: absolute;\n right: 0;\n top: 15px;\n}\n.em-blog-write > .wrapper > .content {\n padding-top: 60px;\n}\n.em-blog-write > .wrapper > .content .editor-toolbar.fullscreen {\n z-index: 800;\n}\n.em-blog-write .dropzone {\n position: relative;\n}\n.em-blog-write .dropzone .dropzone-previews {\n position: absolute;\n top: 48px;\n width: 100%;\n}\n.em-blog-write .dropzone .dropzone-previews .dz-preview {\n width: 100%;\n margin: 0;\n}\n.em-blog-write .dropzone .dropzone-previews .dz-preview .dz-progress {\n height: 2px;\n background-color: #aaa;\n border: none;\n}\n.em-blog-write .dropzone .dropzone-previews .dz-preview .dz-remove {\n display: none;\n}\n.em-blog-write .tms-blog-write-status-bar-wrapper {\n position: fixed;\n z-index: 800;\n height: 0;\n top: 120px;\n width: calc(100% - 60px);\n}\n@media only screen and (min-width: 828px) {\n .em-blog-write .tms-blog-write-status-bar-wrapper {\n width: 768px;\n }\n}\n.em-blog-write .tms-blog-write-status-bar-wrapper .tms-blog-write-status-bar {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n}\n"}),define("text!resources/elements/em-chat-channel-join.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-chat-attach.css",["module"],function(e){e.exports=".em-chat-attach.ui.basic.segment {\n margin-bottom: 0;\n padding-top: 0;\n}\n.em-chat-attach .ui.basic.button {\n display: block;\n margin-right: 0;\n}\n.em-chat-attach .ui.list .description {\n font-size: 12px;\n margin-top: 3px;\n}\n.em-chat-attach.ui.menu {\n margin-top: 0;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.em-chat-attach.ui.menu > .item {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n display: block!important;\n text-align: center;\n}\n.em-chat-attach.tms-attach-search-input {\n padding: 0 10px;\n}\n"}),define("text!resources/elements/em-chat-channel-link-mgr.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-chat-channel-create.css",["module"],function(e){e.exports=".tms-em-chat-channel-create .tms-join {\n max-height: 315px;\n overflow-y: auto;\n}\n.tms-em-chat-channel-create .ui.form > .field > label {\n width: 35px!important;\n}\n"}),define("text!resources/elements/em-chat-channel-members-mgr.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-chat-channel-link-mgr.css",["module"],function(e){e.exports="@media only screen and (min-width: 768px) {\n .tms-em-chat-channel-link-mgr .ui.form .one.wide.field {\n padding: 0;\n }\n}\n"}),define("text!resources/elements/em-chat-channel-members-show.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-chat-channel-members-mgr.css",["module"],function(e){e.exports=".tms-em-chat-channel-members-mgr .ui.dropdown span.owner + i.delete.icon {\n display: none;\n}\n.tms-em-chat-channel-members-mgr .ui.dropdown span.disabled-user {\n text-decoration: line-through;\n font-style: italic;\n}\n.tms-em-chat-channel-members-mgr .member-table {\n max-height: 315px;\n overflow-y: auto;\n}\n"}),define("text!resources/elements/em-chat-content-item.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-chat-channel-members-show.css",["module"],function(e){e.exports=".em-chat-channel-members-show {\n max-height: 300px;\n overflow-y: auto;\n}\n"}),define("text!resources/elements/em-chat-input.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-chat-content-item.css",["module"],function(e){e.exports='.em-chat-content-item .textcomplete-container {\n position: relative;\n}\n.em-chat-content-item .textcomplete-container .append-to {\n position: absolute;\n left: 0;\n bottom: 0;\n width: 100%;\n}\n.ui.comments .em-chat-content-item.comment > .avatar ~ .content {\n margin-left: 3em;\n}\n.ui.comments .em-chat-content-item.comment .actions > a {\n margin-right: 5px;\n}\n.ui.comments .em-chat-content-item.comment .actions .dropdown > a .ellipsis.icon {\n margin-right: 0;\n}\n.ui.comments .em-chat-content-item.comment .actions .dropdown .item.tms-red {\n color: red;\n}\n.ui.comments .em-chat-content-item.comment:hover .tools {\n display: block;\n}\n.ui.comments .em-chat-content-item.comment:hover:before {\n width: 4px;\n}\n.ui.comments .em-chat-content-item.comment.active:before {\n width: 4px;\n}\n.ui.comments .em-chat-content-item.comment:before {\n content: "";\n position: absolute;\n z-index: -1;\n top: 0;\n left: 0;\n bottom: 0;\n background: #2098D1;\n width: 0;\n -webkit-transition-property: width;\n transition-property: width;\n -webkit-transition-duration: 0.3s;\n transition-duration: 0.3s;\n -webkit-transition-timing-function: ease-out;\n transition-timing-function: ease-out;\n}\n@media only screen and (max-width: 767px) {\n .em-chat-content-item > .content > .metadata > .rating {\n display: none!important;\n }\n}\n.em-chat-content-item > .content > .markdown-body span.at-user {\n cursor: pointer;\n}\n.em-chat-content-item > .content > .tools {\n position: absolute;\n right: 0;\n bottom: 0;\n display: none;\n}\n.em-chat-content-item > .content > .tools > .ui.button {\n margin: 0;\n background-color: rgba(224, 225, 226, 0.5);\n}\n.em-chat-content-item > .content > .tools > .ui.button:hover {\n background-color: #e0e1e2;\n}\n'}),define("text!resources/elements/em-chat-member-popup.html",["module"],function(e){e.exports='\r\n'; -}),define("text!resources/elements/em-chat-input.css",["module"],function(e){e.exports='.tms-em-chat-input.ui.segment {\n margin: 0;\n position: fixed;\n bottom: 0;\n left: 220px;\n right: 0;\n background-color: white;\n padding-bottom: 22px;\n}\n@media only screen and (max-width: 767px) {\n .tms-em-chat-input.ui.segment {\n left: 0;\n }\n}\n.tms-em-chat-input.ui.segment .tms-chat-status-bar .dz-preview {\n display: block!important;\n width: auto!important;\n background: #e0e1e2;\n margin: 0;\n padding: 7px;\n}\n.tms-em-chat-input.ui.segment .ui[class*="left action"].input > textarea {\n border-top-left-radius: 0!important;\n border-bottom-left-radius: 0!important;\n border-left-color: transparent!important;\n}\n.tms-em-chat-input.ui.segment .textareaWrapper {\n width: calc(100% - 35px);\n border: 1px solid rgba(34, 36, 38, 0.15);\n border-top-right-radius: .28571429rem;\n border-bottom-right-radius: .28571429rem;\n}\n.tms-em-chat-input.ui.segment .textareaWrapper .CodeMirror,\n.tms-em-chat-input.ui.segment .textareaWrapper .CodeMirror-scroll {\n min-height: 0;\n border: none;\n border-top-right-radius: .28571429rem;\n}\n.tms-em-chat-input.ui.segment .textareaWrapper .CodeMirror-scroll {\n max-height: 300px;\n}\n.tms-em-chat-input.ui.segment .ui.input {\n margin-right: 5px;\n}\n.tms-em-chat-input.ui.segment .ui.input i.send.icon {\n z-index: 1;\n right: 7px!important;\n}\n.tms-em-chat-input.ui.segment .ui.input textarea {\n resize: none;\n width: 100%;\n padding-right: 2.67142857em!important;\n margin: 0;\n max-width: 100%;\n outline: 0;\n -webkit-tap-highlight-color: rgba(255, 255, 255, 0);\n text-align: left;\n display: block;\n padding: .67861429em 1em;\n background: #FFF;\n border: none;\n color: rgba(0, 0, 0, 0.87);\n box-shadow: none;\n border-top-right-radius: .28571429rem;\n border-bottom-right-radius: .28571429rem;\n}\n.tms-em-chat-input .CodeMirror-lines {\n margin-right: 30px;\n}\n.tms-em-chat-input .ui.vertical.menu.popup {\n width: 145px;\n}\n.tms-em-chat-input .ui.vertical.menu.popup a.item > i.icon {\n float: left;\n margin: 0 .35714286em 0 0;\n}\n@media only screen and (min-width: 768px) {\n .tms-chat-direct .tms-content.tms-sidebar-show .tms-em-chat-input {\n right: 392px;\n }\n}\n.textcomplete-dropdown {\n position: static!important;\n border: 1px solid #ddd;\n background-color: white;\n list-style: none;\n padding: 0;\n margin: 0;\n border-radius: 5px;\n}\n.textcomplete-dropdown li {\n /* border-top: 1px solid #ddd; */\n padding: 2px 5px;\n}\n.textcomplete-dropdown li:first-child {\n border-top: none;\n border-top-left-radius: 5px;\n border-top-right-radius: 5px;\n}\n.textcomplete-dropdown li:last-child {\n border-bottom-left-radius: 5px;\n border-bottom-right-radius: 5px;\n}\n.textcomplete-dropdown li:hover,\n.textcomplete-dropdown .active {\n background-color: #439fe0;\n}\n.textcomplete-dropdown a:hover {\n cursor: pointer;\n}\n.textcomplete-dropdown li.textcomplete-item a {\n color: black;\n}\n.textcomplete-dropdown li.textcomplete-item:hover a,\n.textcomplete-dropdown li.textcomplete-item.active a {\n color: white;\n}\n'}),define("text!resources/elements/em-chat-msg-popup.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-chat-schedule-edit.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-chat-member-popup.css",["module"],function(e){e.exports=".tms-chat-member-popup .ui.cards {\n margin-top: 0!important;\n}\n.tms-chat-member-popup .ui.cards .card {\n margin-top: 0!important;\n}\n.tms-chat-member-popup .ui.cards .card .ui.list > .item {\n border-radius: 0!important;\n}\n"}),define("text!resources/elements/em-chat-schedule-remind.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-chat-schedule-edit.css",["module"],function(e){e.exports=".em-chat-schedule-edit .ui.form {\n width: 300px;\n}\n.em-chat-schedule-edit .ui.form .ui.calendar {\n width: 200px;\n}\n.em-chat-schedule-edit .ui.form .tms-date-field {\n position: relative;\n}\n.em-chat-schedule-edit .ui.form .tms-date-field .ui.button {\n position: absolute;\n top: 0;\n right: 0;\n}\n.em-chat-schedule-edit .ui.form .ui.dropdown {\n width: 265px!important;\n min-height: 30px;\n}\n.em-chat-schedule-edit .ui.form .ui.dropdown > a.ui.label > input.owner + i.delete.icon {\n display: none;\n}\n.tms-schedule-edit-target {\n display: inline-block;\n width: 1px;\n height: 1px;\n position: absolute;\n right: 188px;\n top: 30px;\n}\n"}),define("text!resources/elements/em-chat-schedule.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-chat-schedule-remind.css",["module"],function(e){e.exports=".em-chat-schedule-remind .ui.table tr > td:first-child {\n font-weight: bold;\n}\n"}),define("text!resources/elements/em-chat-share.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-chat-schedule.css",["module"],function(e){e.exports=".em-chat-schedule {\n position: relative;\n height: 100%;\n}\n.em-chat-schedule .tms-add {\n position: absolute;\n right: 170px;\n top: 0;\n}\n.em-chat-schedule .ui.form {\n width: 300px;\n}\n.em-chat-schedule .ui.form .ui.calendar {\n width: 200px;\n}\n.em-chat-schedule .ui.form .tms-date-field {\n position: relative;\n}\n.em-chat-schedule .ui.form .tms-date-field .ui.button {\n position: absolute;\n top: 0;\n right: 0;\n}\n.em-chat-schedule .ui.form .ui.dropdown {\n width: 265px!important;\n min-height: auto;\n}\n.em-chat-schedule .ui.form .ui.dropdown > a.ui.label > input.owner + i.delete.icon {\n display: none;\n}\n"}),define("text!resources/elements/em-chat-sidebar-left.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-chat-share.css",["module"],function(e){e.exports=".em-chat-share.ui.popup {\n max-width: 100%;\n width: 255px;\n}\n.em-chat-share.ui.popup .ui.input {\n width: 225px;\n}\n.em-chat-share.ui.popup textarea {\n width: 195px!important;\n}\n.em-chat-share.ui.popup .ui.search > .results .result {\n cursor: pointer!important;\n display: block!important;\n color: rgba(0, 0, 0, 0.87) !important;\n border-bottom: 1px solid rgba(34, 36, 38, 0.1) !important;\n margin: 0!important;\n}\n.em-chat-share.ui.popup .ui.list > .item {\n color: rgba(0, 0, 0, 0.87);\n}\n.em-chat-share:after {\n content: '';\n clear: both;\n}\n.em-chat-share .footer {\n margin-top: 16px;\n}\n.em-chat-share .footer .btn-cancel {\n float: right;\n margin: 6px 0 0 8px!important;\n}\n"}),define("text!resources/elements/em-chat-sidebar-right.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-chat-sidebar-left.css",["module"],function(e){e.exports=".tms-left-sidebar {\n overflow: hidden;\n}\n.tms-left-sidebar .tms-body {\n position: absolute;\n top: 98px;\n width: 220px;\n height: calc(100% - 150px);\n overflow: hidden;\n padding-right: 2px;\n}\n.tms-left-sidebar .tms-body i.circular.icon {\n box-shadow: 0 0 0 0.1em #4183c4 inset;\n}\n.tms-left-sidebar .tms-body .title {\n position: relative;\n margin-left: 10px;\n}\n.tms-left-sidebar .tms-body .title .ui.header {\n display: inline-block;\n margin-top: 2px;\n margin-bottom: 0;\n}\n.tms-left-sidebar .tms-body .title i.plus.icon {\n position: absolute;\n right: 10px;\n font-size: 12px;\n width: 12px!important;\n height: 12px!important;\n}\n.tms-left-sidebar .tms-body .ui.list {\n margin-top: 10px;\n padding-top: 5px;\n box-shadow: 0px -1px 1px -1px rgba(65, 131, 196, 0.5);\n}\n.tms-left-sidebar .tms-body .ui.list > .item {\n padding-left: 16px;\n border-radius: 0;\n}\n.tms-left-sidebar .tms-body .ui.list > .item > .icon + .content {\n padding: 0;\n}\n.tms-left-sidebar .tms-body .ui.list > .item.active {\n background: rgba(0, 0, 0, 0.2);\n}\n.tms-left-sidebar .tms-body .ui.list > .item:hover {\n background: rgba(0, 0, 0, 0.1) !important;\n}\n.tms-left-sidebar .tms-body .ui.list > .item.disabled-user {\n text-decoration: line-through;\n font-style: italic;\n}\n.tms-left-sidebar .tms-body .tms-name {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 160px;\n}\n.tms-left-sidebar .tms-body .tms-channels .ui.list a.item {\n position: relative;\n}\n.tms-left-sidebar .tms-body .tms-channels .ui.list a.item:hover .actions {\n display: inline-block;\n}\n.tms-left-sidebar .tms-body .tms-channels .actions {\n display: none;\n position: absolute;\n right: 10px;\n top: 5px;\n}\n.tms-left-sidebar .tms-body .scroll-element.scroll-y {\n background-color: #4d394b;\n}\n.tms-left-sidebar.ui.left.sidebar {\n background-color: #4d394b;\n width: 220px;\n}\n.tms-left-sidebar.ui.left.sidebar * {\n color: #4183c4!important;\n}\n.tms-left-sidebar.ui.left.sidebar .tms-header {\n padding: 9px 16px;\n box-shadow: 0 1px 1px -1px #4183c4;\n}\n.tms-left-sidebar.ui.left.sidebar .tms-header > input {\n background-color: transparent;\n border: 1px rgba(103, 104, 104, 0.5) solid;\n font-size: 12px;\n padding: 4px;\n width: 188px;\n outline: none;\n margin-top: 10px;\n border-radius: 2px;\n}\n.tms-left-sidebar.ui.left.sidebar .tms-header > input::-webkit-input-placeholder {\n color: rgba(103, 104, 104, 0.5) !important;\n}\n.tms-left-sidebar.ui.left.sidebar .tms-header > input::-moz-placeholder {\n color: rgba(103, 104, 104, 0.5) !important;\n}\n.tms-left-sidebar.ui.left.sidebar .tms-header > input:-ms-input-placeholder {\n color: rgba(103, 104, 104, 0.5) !important;\n}\n.tms-left-sidebar.ui.left.sidebar .tms-header > input:focus::-webkit-input-placeholder {\n color: #676868 !important;\n}\n.tms-left-sidebar.ui.left.sidebar .tms-header > input:focus::-moz-placeholder {\n color: #676868 !important;\n}\n.tms-left-sidebar.ui.left.sidebar .tms-header > input:focus:-ms-input-placeholder {\n color: #676868 !important;\n}\n.tms-left-sidebar.ui.left.sidebar .tms-header h1.ui.header {\n margin: 0;\n}\n.tms-left-sidebar.ui.left.sidebar .tms-header h1.ui.header img {\n width: 30px;\n height: 30px;\n margin: 0;\n}\n.tms-left-sidebar.ui.left.sidebar .tms-header i.close.icon {\n position: absolute;\n right: 16px;\n top: 57px;\n}\n.tms-left-sidebar .tms-footer {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.tms-left-sidebar .tms-footer .ui.menu {\n border-radius: 0;\n background-color: rgba(27, 28, 29, 0.2) !important;\n}\n.tms-left-sidebar .tms-footer .ui.menu .dropdown.item .menu {\n border-radius: 0;\n}\n.tms-left-sidebar .tms-footer .ui.menu .item {\n font-size: 12px!important;\n}\n.tms-left-sidebar .tms-footer .ui.menu .item:before {\n width: 0;\n}\n.tms-left-sidebar .tms-footer .ui.menu .ui.button.item {\n width: 140px;\n margin-right: 0;\n padding-left: 0;\n}\n.tms-left-sidebar .tms-footer .ui.menu .ui.button.item .visible.content {\n margin-right: 0;\n width: 100%;\n}\n.tms-left-sidebar .tms-footer .ui.menu .right.menu .ui.dropdown .menu .header {\n min-width: 150px;\n position: relative;\n}\n.tms-left-sidebar .tms-footer .ui.menu .right.menu .ui.dropdown .menu .header .plus.icon {\n position: absolute;\n right: 0;\n top: -7px;\n}\n"; -}),define("text!resources/elements/em-chat-system-link-mgr.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-chat-sidebar-right.css",["module"],function(e){e.exports=".em-chat-sidebar-right .panel-wiki-dir {\n height: 100%;\n padding-left: 15px;\n overflow-y: auto;\n}\n.em-chat-sidebar-right .panel-chat-schedule {\n height: calc(100% - 10px);\n overflow: hidden;\n}\n"}),define("text!resources/elements/em-chat-top-menu.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-chat-system-link-mgr.css",["module"],function(e){e.exports="@media only screen and (min-width: 768px) {\n .tms-em-chat-system-link-mgr .ui.form .one.wide.field {\n padding: 0;\n }\n}\n"}),define("text!resources/elements/em-checkbox.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-chat-top-menu.css",["module"],function(e){e.exports=".tms-em-chat-top-menu.ui.top.menu {\n padding-left: 220px;\n height: 60px;\n}\n@media only screen and (max-width: 767px) {\n .tms-em-chat-top-menu.ui.top.menu .tms-chat-at.tms-hide {\n display: none;\n }\n}\n.tms-em-chat-top-menu.ui.top.menu .item.tms-item:before {\n display: none;\n}\n@media only screen and (max-width: 767px) {\n .tms-em-chat-top-menu.ui.top.menu .right.menu .item.tms-login-user.tms-hide {\n display: none;\n }\n}\n.tms-em-chat-top-menu.ui.top.menu .right.menu .item.tms-item {\n padding-left: 0;\n padding-right: 5px;\n}\n@media only screen and (max-width: 767px) {\n .tms-em-chat-top-menu.ui.top.menu .right.menu .item.tms-item.tms-hide {\n display: none;\n }\n .tms-em-chat-top-menu.ui.top.menu .right.menu .item.tms-item.tms-mobile-hide {\n display: none;\n }\n}\n.tms-em-chat-top-menu.ui.top.menu .right.menu .item.tms-item button .ui.floating.label {\n top: 0;\n right: 0;\n left: auto;\n}\n.tms-em-chat-top-menu.ui.top.menu .right.menu .item.tms-item.ui.dropdown {\n display: none;\n padding-left: 5px;\n margin-right: 5px;\n}\n@media only screen and (max-width: 767px) {\n .tms-em-chat-top-menu.ui.top.menu .right.menu .item.tms-item.ui.dropdown {\n display: flex;\n }\n}\n.tms-em-chat-top-menu.ui.top.menu .right.menu .item.tms-item.ui.dropdown > i.icon {\n margin-left: 5px;\n}\n.tms-em-chat-top-menu.ui.top.menu .right.menu .item.tms-item.ui.dropdown .menu > .item .ui.button {\n margin: 0;\n}\n.tms-em-chat-top-menu.ui.top.menu .right.menu .item.tms-item.ui.dropdown .menu > .item .ui.button i.icon {\n margin: 0;\n}\n@media only screen and (max-width: 767px) {\n .tms-em-chat-top-menu.ui.top.menu .right.menu .item.tms-search {\n padding-left: 10px;\n padding-right: 10px;\n }\n}\n.tms-em-chat-top-menu.ui.top.menu .right.menu .ui.search input {\n width: 95px;\n transition: width 0.15s ease-out 0s;\n}\n.tms-em-chat-top-menu.ui.top.menu .right.menu .ui.search i.remove.icon {\n display: none;\n position: absolute;\n right: 0;\n left: auto;\n}\n@media only screen and (max-width: 767px) {\n .tms-em-chat-top-menu.ui.top.menu {\n padding-left: 0;\n }\n}\n.tms-em-chat-top-menu.ui.top.menu .ui.basic.button {\n box-shadow: none;\n}\n@media only screen and (min-width: 768px) {\n .tms-em-chat-top-menu > .tms-chat-at.ui.dropdown {\n min-width: 175px;\n padding-top: 0;\n padding-left: 13px;\n padding-bottom: 20px;\n }\n .tms-em-chat-top-menu > .tms-chat-at.ui.dropdown.item:before {\n width: 0;\n }\n}\n.tms-em-chat-top-menu > .tms-chat-at.ui.dropdown > .text > .actions {\n display: none;\n}\n.tms-em-chat-top-menu > .tms-chat-at.ui.dropdown > .tms-metadata {\n position: absolute;\n display: flex;\n top: 35px;\n font-size: 12px;\n left: 0;\n height: 15px;\n}\n.tms-em-chat-top-menu > .tms-chat-at.ui.dropdown > .tms-metadata .item:before {\n top: 5px;\n height: 50%;\n}\n.tms-em-chat-top-menu > .tms-chat-at.ui.dropdown > .tms-metadata .item.tms-channel-info:before {\n width: 0;\n}\n.tms-em-chat-top-menu > .tms-chat-at.ui.dropdown > .tms-metadata .item.tms-user-info:before {\n width: 0;\n}\n@media only screen and (max-width: 767px) {\n .tms-em-chat-top-menu > .tms-chat-at.ui.dropdown > .tms-metadata {\n display: none;\n }\n}\n.tms-em-chat-top-menu > .tms-chat-at.ui.dropdown > .tms-metadata .tms-channel-links .menu .header {\n min-width: 200px;\n}\n@media only screen and (max-width: 767px) {\n .tms-em-chat-top-menu > .tms-chat-at.ui.dropdown > .text {\n display: none;\n }\n .tms-em-chat-top-menu > .tms-chat-at.ui.dropdown > .dropdown.icon {\n margin-left: 6px;\n margin-right: 6px;\n }\n}\n.tms-em-chat-top-menu > .tms-chat-at.ui.dropdown .menu > .header i.plus.icon {\n position: absolute;\n right: 5px;\n top: 7px;\n}\n.tms-em-chat-top-menu > .tms-chat-at.ui.dropdown .menu > .item:hover .actions {\n display: inline-block;\n}\n.tms-em-chat-top-menu > .tms-chat-at.ui.dropdown .menu > .item .icon {\n margin-right: 4px!important;\n}\n.tms-em-chat-top-menu > .tms-chat-at.ui.dropdown .menu > .item > .actions {\n display: none;\n position: absolute;\n right: 5px;\n top: 10px;\n}\n.tms-em-chat-top-menu > .tms-chat-at.ui.dropdown .menu > .item > .actions .large.ellipsis.horizontal.icon {\n font-size: 1.3em!important;\n}\n.tms-em-chat-top-menu > .tms-chat-at.ui.dropdown .menu > .item.disabled-user {\n text-decoration: line-through;\n font-style: italic;\n}\n"}),define("text!resources/elements/em-checkbox.css",["module"],function(e){e.exports=""}),define("text!resources/elements/em-confirm-modal.html",["module"],function(e){e.exports='\n'}),define("text!resources/elements/em-hotkeys-modal.css",["module"],function(e){e.exports=".tms-em-hotkeys-modal ul {\n padding-left: 30px;\n}\n.tms-em-hotkeys-modal ul.no_bullets {\n margin: 0 0 2rem;\n}\n.tms-em-hotkeys-modal ul.no_bullets li {\n line-height: 2rem;\n list-style-type: none;\n padding: 0;\n font-size: 1rem;\n font-weight: 700;\n}\n.tms-em-hotkeys-modal > .content {\n background-color: rgba(11, 7, 11, 0.78) !important;\n}\n.tms-em-hotkeys-modal .keyboard i.icon {\n margin-right: 0px!important;\n}\n.tms-em-hotkeys-modal .subtle_silver {\n color: #9e9ea6!important;\n}\n.tms-em-hotkeys-modal .ui.grid .column {\n padding: 0!important;\n}\n"}),define("text!resources/elements/em-dropdown.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-user-avatar.css",["module"],function(e){e.exports=".em-user-avatar.avatar.ui.mini.circular.image {\n width: 35px;\n height: 35px;\n font-size: 35px;\n background-color: rgba(150, 178, 183, 0.4);\n text-align: center;\n margin: 0;\n padding-right: 0;\n}\n.em-user-avatar .text-char {\n display: inline-block;\n height: 35px;\n line-height: 35px;\n vertical-align: top;\n}\n"}),define("text!resources/elements/em-hotkeys-modal.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-user-edit.css",["module"],function(e){e.exports=".tms-em-user-edit .ui.form .field > label {\n width: 45px!important;\n}\n.tms-em-user-edit .ui.form .field .user-username {\n margin-left: 0;\n}\n.em-user-edit-modal {\n /* Tablet & PC */\n}\n@media only screen and (min-width: 768px) {\n .em-user-edit-modal {\n width: 500px!important;\n margin-left: -250px !important;\n }\n}\n"}),define("text!resources/elements/em-modal.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-user-avatar.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-user-edit.html",["module"],function(e){e.exports='\r\n'; -}); \ No newline at end of file diff --git a/scripts/app-bundle-f886e8179d.js b/scripts/app-bundle-f886e8179d.js deleted file mode 100644 index 2b7f929dcba5eaa530f8e4afd102e6d0e85d91f3..0000000000000000000000000000000000000000 --- a/scripts/app-bundle-f886e8179d.js +++ /dev/null @@ -1,29 +0,0 @@ -define("app",["exports","tms-semantic-ui","semantic-ui-calendar","jquery-format"],function(e){"use strict";function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.App=void 0;e.App=function(){function e(){var n=this;t(this,e),this.init(),this.initCalendar(),this.subscribe=ea.subscribe(nsCons.EVENT_APP_ROUTER_NAVIGATE,function(e){n.router&&n.router.navigate(""+e.to)})}return e.prototype.unbind=function(){this.subscribe.dispose()},e.prototype.init=function(){$.fn.dropdown.settings.forceSelection=!1,_.extend($.fn.form.settings.prompt,{empty:"{name}不能为空",checked:"{name}必须被勾选",email:"{name}必须是正确的邮件格式",url:"{name}必须是正确的URL格式",regExp:"{name}验证格式不正确",integer:"{name}必须为一个整数",decimal:"{name}必须为一个小数",number:"{name}必须设置为一个数字",is:'{name}必须符合规则"{ruleValue}"',isExactly:'{name}必须精确匹配"{ruleValue}"',not:'{name}不能设置为"{ruleValue}"',notExactly:'{name}不能准确设置为"{ruleValue}"',contain:'{name}需要包含"{ruleValue}"',containExactly:'{name}需要精确包含"{ruleValue}"',doesntContain:'{name}不能包含"{ruleValue}"',doesntContainExactly:'{name}不能精确包含"{ruleValue}"',minLength:"{name}必须至少包含{ruleValue}个字符",length:"{name}必须为{ruleValue}个字符",exactLength:"{name}必须为{ruleValue}个字符",maxLength:"{name}必须不能超过{ruleValue}个字符",match:"{name}必须匹配{ruleValue}字段",different:"{name}必须不同于{ruleValue}字段",creditCard:"{name}必须是一个正确的信用卡数字格式",minCount:"{name}必须至少包含{ruleValue}个选择项",exactCount:"{name}必须准确包含{ruleValue}个选择项",maxCount:"{name} 必须有{ruleValue}或者更少个选择项"})},e.prototype.initCalendar=function(){return $.fn.calendar.settings.text={days:["日","一","二","三","四","五","六"],months:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],monthsShort:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],today:"今天",now:"现在",am:"上午",pm:"下午"},$.fn.calendar.settings.formatter.date=function(e,t){if(!e)return"";e.getDate(),e.getMonth()+1,e.getFullYear();return $.format.date(e,"yyyy-MM-dd")},this},e.prototype.configureRouter=function(e,t){var n=null;localStorage&&(n=localStorage.getItem(nsCons.KEY_REMEMBER_LAST_CHAT_TO)),e.map([{route:["pwd-reset"],name:"reset",moduleId:"user/user-pwd-reset",nav:!1,title:"密码重置 | TMS"},{route:["register"],name:"register",moduleId:"user/user-register",nav:!1,title:"用户注册 | TMS"},{route:["chat/:username"],name:"chat",moduleId:"chat/chat-direct",nav:!1,title:"私聊 | TMS"},{route:["blog"],name:"chat",moduleId:"blog/blog",nav:!1,title:"博文 | TMS"},{route:["blog/:id"],name:"chat",moduleId:"blog/blog",nav:!1,title:"博文 | TMS"},{route:["login"],name:"login",moduleId:"user/user-login",nav:!1,title:"登录 | TMS"},{route:["test"],name:"test",moduleId:"test/test-lifecycle",nav:!1,title:"测试 | TMS"},{route:"",redirect:"chat/"+(n?n:"@admin")}]),this.router=t},e.prototype.activate=function(e,t,n){},e}()}),define("environment",["exports"],function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={debug:!1,testing:!1}}),define("main",["exports","./environment"],function(e,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){e.use.standardConfiguration().feature("init").feature("resources"),r.default.debug&&e.use.developmentLogging(),r.default.testing&&e.use.plugin("aurelia-testing"),e.start().then(function(){return e.setRoot()})}Object.defineProperty(e,"__esModule",{value:!0}),e.configure=i;var r=n(t);Promise.config({warnings:{wForgottenReturn:!1}})}),define("blog/blog",["exports","aurelia-framework","chat/chat-service"],function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.Blog=void 0;var a=i(n);e.Blog=function(){function e(){var t=this;r(this,e),this.rightSidebarShow=!1,this.isHide=!0,this.subscribe=ea.subscribe(nsCons.EVENT_BLOG_VIEW_CHANGED,function(e){t.routeConfig&&t.routeConfig.navModel.setTitle(e.title+" | 博文 | TMS")}),this.subscribe1=ea.subscribe(nsCons.EVENT_BLOG_RIGHT_SIDEBAR_TOGGLE,function(e){e.justRefresh||(e&&!_.isUndefined(e.isHide)?t.rightSidebarShow=!e.isHide:t.rightSidebarShow=!t.rightSidebarShow)}),this.subscribe2=ea.subscribe(nsCons.EVENT_BLOG_TOGGLE_SIDEBAR,function(e){t.isHide=e})}return e.prototype.unbind=function(){this.subscribe.dispose(),this.subscribe1.dispose(),this.subscribe2.dispose(),clearInterval(this.timeagoTimer)},e.prototype.attached=function(){var e=this,t=timeago();this.timeagoTimer=setInterval(function(){$(e.blogContainerRef).find("[data-timeago]").each(function(e,n){$(n).text(t.format($(n).attr("data-timeago"),"zh_CN"))})},5e3),$(".tms-blog").on("mouseenter","span[data-value].at-user:not(.pp-not),a[data-value].author:not(.pp-not)",function(e){e.preventDefault();var t=$(e.currentTarget);ea.publish(nsCons.EVENT_CHAT_MEMBER_POPUP_SHOW,{username:t.attr("data-value"),target:e.currentTarget})}),$(".tms-blog .em-blog-content").on("click","a.avatar[data-value], a.author[data-value], .at-user[data-value]",function(e){e.preventDefault(),ea.publish(nsCons.EVENT_BLOG_COMMENT_MSG_INSERT,{content:"{~"+$(e.currentTarget).attr("data-value")+"} "})})},e.prototype.detached=function(){},e.prototype.activate=function(e,t,n){return this.routeConfig=t,nsCtx.blogId=e.id,ea.publish(nsCons.EVENT_BLOG_SWITCH,{id:e.id}),Promise.all([a.default.loginUser().then(function(e){nsCtx.loginUser=e,nsCtx.isSuper=utils.isSuperUser(e),nsCtx.isAdmin=utils.isAdminUser(e)}),a.default.listUsers().then(function(e){nsCtx.users=e,window.tmsUsers=e})])},e}()}),define("chat/chat-direct",["exports","aurelia-framework","common/common-poll","clipboard","clipboard-js","dropzone","./chat-service"],function(e,t,n,i,r,a,o){"use strict";function s(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.ChatDirect=void 0;var c=s(n),d=s(i),u=s(r),m=s(a),p=s(o),g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};e.ChatDirect=function(){function e(){l(this,e),this.offset=0,this.first=!0,this.last=!0,this.originalHref=wurl(),this.users=[],this.channels=[],this.chatTo=null,m.default.autoDiscover=!1,this.poll=c.default,new d.default(".tms-chat-direct .tms-clipboard").on("success",function(e){toastr.success("复制到剪贴板成功!")}).on("error",function(e){toastr.error("复制到剪贴板失败!")}),this.initSubscribeEvent()}return e.prototype.initSubscribeEvent=function(){var e=this;this.subscribe=ea.subscribe(nsCons.EVENT_CHAT_MSG_SENDED,function(t){c.default.reset(),e.first||(e.isAt?e.listChatDirect(!1):e.listChatChannel(!1))}),this.subscribe2=ea.subscribe(nsCons.EVENT_CHAT_SIDEBAR_TOGGLE,function(t){if(e.isRightSidebarShow=t.isShow,e.isRightSidebarShow){var n=$(e.contentRef).width()-392;$(e.contentBodyRef).width(n),$(e.contentBodyRef).children(".scroll-wrapper").width(n)}else $(e.contentBodyRef).css("width","100%"),$(e.contentBodyRef).children(".scroll-wrapper").css("width","100%")}),this.subscribe3=ea.subscribe(nsCons.EVENT_CHAT_CHANNEL_CREATED,function(t){e.channels.splice(0,0,t.channel)}),this.subscribe4=ea.subscribe(nsCons.EVENT_CHAT_SEARCH_GOTO_CHAT_ITEM,function(t){e.gotoChatItem(t.chatItem)}),this.subscribe5=ea.subscribe(nsCons.EVENT_CHAT_CHANNEL_DELETED,function(t){e.isAt||t.channel.name!=e.chatTo||(window.location=wurl("path")+("#/chat/@"+e.loginUser.username)),e.channels=[].concat(e.channels)}),this.subscribe6=ea.subscribe(nsCons.EVENT_CHAT_CHANNEL_JOINED,function(t){e.channels.splice(0,0,t.channel)}),this.subscribe7=ea.subscribe(nsCons.EVENT_CHAT_CHANNEL_LEAVED,function(t){e.isAt||t.channel.name!=e.chatTo||(window.location=wurl("path")+("#/chat/@"+e.loginUser.username)),e.channels=_.reject(e.channels,{id:t.channel.id})}),this.subscribe8=ea.subscribe(nsCons.EVENT_CHAT_LAST_ITEM_RENDERED,function(t){t.item.__scroll&&(e.scrollToAfterImgLoaded(e.markId?e.markId:"b"),delete t.item.__scroll,e.markId=null)}),this.subscribe9=ea.subscribe(nsCons.EVENT_SCROLLBAR_SCROLL_TO_BOTTOM,function(t){e.scrollbarRef==t.element&&c.default.reset()}),this.subscribe10=ea.subscribe(nsCons.EVENT_CHAT_CONTENT_SCROLL_TO,function(t){e.scrollTo(t.target)})},e.prototype.unbind=function(){this.subscribe.dispose(),this.subscribe2.dispose(),this.subscribe3.dispose(),this.subscribe4.dispose(),this.subscribe5.dispose(),this.subscribe6.dispose(),this.subscribe7.dispose(),this.subscribe8.dispose(),this.subscribe9.dispose(),this.subscribe10.dispose(),clearInterval(this.timeagoTimer),c.default.stop()},e.prototype.activate=function(e,t,n){var i=this;return this._reset(),this.markId=e.id,this.routeConfig=t,this.chatId&&(this.preChatId=this.chatId),this.chatId=nsCtx.chatId=e.username,localStorage&&localStorage.setItem(nsCons.KEY_REMEMBER_LAST_CHAT_TO,this.chatId),this.isAt=nsCtx.isAt=_.startsWith(e.username,"@"),this.chatTo=nsCtx.chatTo=utils.getChatName(e.username),this.markId&&history.replaceState(null,"",utils.removeUrlQuery("id")),Promise.all([p.default.loginUser(!1).then(function(e){i.loginUser=e,nsCtx.loginUser=e,nsCtx.isSuper=utils.isSuperUser(i.loginUser),nsCtx.isAdmin=utils.isAdminUser(i.loginUser)}),p.default.listUsers(!1).then(function(e){if(i.users=e,nsCtx.users=e,window.tmsUsers=e,i.isAt)if(i.channel=null,i.user=_.find(i.users,{username:i.chatTo}),i.user){var n=i.user?i.user.name:i.chatTo;t.navModel.setTitle(n+" | 私聊 | TMS"),i.listChatDirect(!0)}else toastr.error("聊天用户["+i.chatTo+"]不存在或者没有权限访问!"),i.preChatId?window.location=wurl("path")+("#/chat/"+i.preChatId):window.location=wurl("path")+("#/chat/@"+i.loginUser.username)}),p.default.listChannels(!1).then(function(e){i.channels=e,nsCtx.channels=e,i.isAt||(i.user=null,i.channel=_.find(i.channels,{name:i.chatTo}),i.channel?(t.navModel.setTitle(i.channel.title+" | 频道 | TMS"),i.listChatChannel(!0)):(toastr.error("聊天频道["+i.chatTo+"]不存在或者没有权限访问!"),i.preChatId?window.location=wurl("path")+("#/chat/"+i.preChatId):window.location=wurl("path")+("#/chat/@"+i.loginUser.username)))})])},e.prototype._reset=function(){this.progressWidth=0,this.chats=null,this.first=!0,this.last=!0},e.prototype.lastMoreHandler=function(){var e=this,t=_.first(this.chats).id,n=void 0,i=void 0;this.isAt?(n="/admin/chat/direct/more",i={last:!0,start:t,size:20,chatTo:this.chatTo}):(n="/admin/chat/channel/more",i={last:!0,start:t,size:20,channelId:this.channel.id}),this.lastMoreP=$.get(n,i,function(n){n.success?(e.chats=_.unionBy(_.reverse(n.data),e.chats),e.last=n.msgs[0]-n.data.length<=0,!e.last&&(e.lastCnt=n.msgs[0]-n.data.length),e.scrollToAfterImgLoaded(t)):toastr.error(n.data,"获取更多消息失败!")})},e.prototype.firstMoreHandler=function(){var e=this,t=_.last(this.chats).id,n=void 0,i=void 0;this.isAt?(n="/admin/chat/direct/more",i={last:!1,start:t,size:20,chatTo:this.chatTo}):(n="/admin/chat/channel/more",i={last:!1,start:t,size:20,channelId:this.channel.id}),this.nextMoreP=$.get(n,i,function(n){n.success?(e.chats=_.unionBy(e.chats,n.data),e.first=n.msgs[0]-n.data.length<=0,!e.first&&(e.firstCnt=n.msgs[0]-n.data.length),e.scrollToAfterImgLoaded(t)):toastr.error(n.data,"获取更多消息失败!")})},e.prototype.listChatChannel=function(e){var t=this,n={size:20,channelId:this.channel.id};this.markId&&e&&(n.id=this.markId),$.get("/admin/chat/channel/listBy",n,function(e){t.processChats(e)})},e.prototype.listChatDirect=function(e){var t=this,n={size:20,chatTo:this.chatTo};this.markId&&e&&(n.id=this.markId),$.get("/admin/chat/direct/list",n,function(e){t.processChats(e)})},e.prototype.processChats=function(e){if(e.success){this.chats=_.reverse(e.data.content);var t=_.last(this.chats);t&&(t.__scroll=!0),this.last=e.data.last,this.first=e.data.first,!this.last&&(this.lastCnt=e.data.totalElements-e.data.numberOfElements),!this.first&&(this.firstCnt=e.data.size*e.data.number)}},e.prototype._scrollTo=function(e){"b"==e?$(this.commentsRef).parent(".scroll-content").scrollTo("max"):"t"==e?$(this.commentsRef).parent(".scroll-content").scrollTo(0):_.some(this.chats,{id:+e})?($(this.commentsRef).parent(".scroll-content").scrollTo('.comment[data-id="'+e+'"]',{offset:this.offset}),$(this.commentsRef).find(".comment[data-id]").removeClass("active"),$(this.commentsRef).find(".comment[data-id="+e+"]").addClass("active")):($(this.commentsRef).parent(".scroll-content").scrollTo("max"),toastr.warning("消息["+e+"]不存在,可能已经被删除!"))},e.prototype.scrollToAfterImgLoaded=function(e){var t=this;_.defer(function(){new ImagesLoaded(t.commentsRef).always(function(){t._scrollTo(e)}),t._scrollTo(e)})},e.prototype.doPoll=function(){var e=this;c.default.start(function(t,n){e._pollChats(t,n),e._poll(t,n)})},e.prototype._poll=function(e,t){var n=this,i=_.last(this.chats);!this.pollOnGoing&&!this.isAt&&this.channel&&i&&(this.pollOnGoing=!0,$.get("/admin/chat/channel/poll",{channelId:this.channel.id,lastChatChannelId:i.id,isAt:!0},function(e){if(e.success){if(n.countAt&&e.data.countAt>n.countAt){var t=e.data.countAt-n.countAt;push.create("TMS沟通@消息通知",{body:"你有"+t+"条新的@消息!",icon:{x16:"img/tms-x16.ico",x32:"img/tms-x32.png"},timeout:5e3})}n.countAt=e.data.countAt,ea.publish(nsCons.EVENT_CHAT_POLL_UPDATE,{countAt:e.data.countAt,countMyRecentSchedule:e.data.countMyRecentSchedule})}}).always(function(){n.pollOnGoing=!1}))},e.prototype._pollChats=function(e,t){var n=this;if(!this.pollChatsOngoing&&this.chats&&this.first){var i=_.last(this.chats),r=void 0,a=void 0;this.isAt?(r="/admin/chat/direct/latest",a={id:i?i.id:0,chatTo:this.chatTo}):(r="/admin/chat/channel/latest",a={id:i?i.id:0,channelId:this.channel.id}),this.pollChatsOngoing=!0,$.get(r,a,function(e){if(e.success){if(!n._checkPollResultOk(e))return;n._checkNeedNotify(e),n.chats=_.unionBy(n.chats,e.data,"id"),n.scrollToAfterImgLoaded("b")}else toastr.error(e.data,"轮询获取消息失败!")}).fail(function(n,i){t(),utils.errorAutoTry(function(){e()})}).always(function(){n.pollChatsOngoing=!1})}},e.prototype._checkNeedNotify=function(e){var t=this;if(0==e.data.length)return!1;var n=_.some(e.data,function(e){return e.creator.username==t.loginUser.username});n||push.create("TMS沟通频道消息通知",{body:"频道["+this.channel.title+"]有新消息了!",icon:{x16:"img/tms-x16.ico",x32:"img/tms-x32.png"},timeout:5e3})},e.prototype._checkPollResultOk=function(e){if(0==e.data.length)return!1;var t=_.first(e.data);return this.isAt?_.has(t,"chatTo"):_.has(t,"channel")},e.prototype.bind=function(e){this.doPoll()},e.prototype.attached=function(){var e=this,t=timeago();this.timeagoTimer=setInterval(function(){$(e.chatContainerRef).find("[data-timeago]").each(function(e,n){$(n).text(t.format($(n).attr("data-timeago"),"zh_CN"))})},5e3),this.initHotkeys(),this.initFocusedComment(),$(this.scrollbarRef).on("mouseenter",".em-chat-content-item",function(t){t.preventDefault();var n=$(t.currentTarget);e.$hoveredItem=n,e.isShowHead=!utils.isElementInViewport(n.children(".em-user-avatar"));var i=n.next(".em-chat-content-item");1===i.size()?e.isShowFoot=!utils.isElementInViewport(i.children(".em-user-avatar")):e.isShowFoot=!1}).on("mouseleave",function(t){t.preventDefault(),e.isShowHead=!1,e.isShowFoot=!1}),$(this.commentsRef).on("click",".cbutton",function(e){e.preventDefault();var t=$(this);t.addClass("cbutton--click"),setTimeout(function(){t.removeClass("cbutton--click")},500)}),$(this.chatContainerRef).on("click","code[data-code]",function(e){e.ctrlKey&&(e.stopImmediatePropagation(),e.preventDefault(),u.default.copy($(e.currentTarget).attr("data-code")).then(function(){toastr.success("复制到剪贴板成功!")},function(e){toastr.error("复制到剪贴板失败!")}))}),$(this.chatContainerRef).on("click",".pre-code-wrapper",function(e){e.ctrlKey&&(e.stopImmediatePropagation(),e.preventDefault(),u.default.copy($(e.currentTarget).find("i[data-clipboard-text]").attr("data-clipboard-text")).then(function(){toastr.success("复制到剪贴板成功!")},function(e){toastr.error("复制到剪贴板失败!")}))}),$('.tms-comments-container[ref="scrollbarRef"]').scroll(_.throttle(function(t){try{var n=$(t.currentTarget)[0].scrollHeight,i=$(t.currentTarget)[0].scrollTop,r=1*i/(n-$(t.currentTarget).outerHeight());e.progressWidth=$(t.currentTarget).outerWidth()*r}catch(t){e.progressWidth=0}},10))},e.prototype.goHeadHandler=function(){var e=this;this.scrollTo(this.$hoveredItem,500,function(){e.isShowHead=!1})},e.prototype.goFootHandler=function(){var e=this;this.scrollTo(this.$hoveredItem.next(),500,function(){e.isShowFoot=!1})},e.prototype.initFocusedComment=function(){var e=this;$(this.commentsRef).on("click",".comment.item",function(t){e.focusedComment=$(t.currentTarget)}).on("dblclick",".comment.item",function(t){if(t.ctrlKey){var n=function(){var n=$(t.currentTarget).attr("data-id"),i=$(t.currentTarget).find(".content > textarea"),r=_.find(e.chats,{id:Number.parseInt(n)});return r.openEdit||r.creator.username==e.loginUser.username?void $.get("/admin/chat/"+(e.isAt?"direct":"channel")+"/get",{id:r.id},function(e){e.success?(r.version!=e.data.version&&_.extend(r,e.data),r.isEditing=!0,r.contentOld=r.content,_.defer(function(){i.focus().select(),autosize.update(i.get(0))})):toastr.error(e.data)}):{v:void 0}}();if("object"===("undefined"==typeof n?"undefined":g(n)))return n.v}})},e.prototype.getScrollTargetComment=function(e){if(e)if(this.focusedComment&&1===this.focusedComment.size()){var t=this.focusedComment.find("> a.em-user-avatar");if(utils.isElementInViewport(t)){var n=this.focusedComment.prev(".comment.item");1===n.size()&&(this.focusedComment=n)}}else this.focusedComment=$(this.commentsRef).children(".comment.item:first");else if(this.focusedComment&&1===this.focusedComment.size()){var i=this.focusedComment.next(".comment.item");1===i.size()&&(this.focusedComment=i)}else this.focusedComment=$(this.commentsRef).children(".comment.item:last");return this.focusedComment},e.prototype.scrollTo=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments[2];this.focusedComment=e,$(this.commentsRef).parent(".scroll-content").scrollTo(e,t,{offset:this.offset,onAfter:n})},e.prototype.initHotkeys=function(){var e=this;$(document).bind("keydown","ctrl+u",function(t){t.preventDefault(),$(e.emChatInputRef.btnItemUploadRef).find(".content").click()}).bind("keydown","ctrl+/",function(t){t.preventDefault(),e.emChatInputRef.emHotkeysModal.show()}).bind("keydown","alt+up",function(t){t.preventDefault(),e.scrollTo(e.getScrollTargetComment(!0))}).bind("keydown","alt+down",function(t){t.preventDefault(),e.scrollTo(e.getScrollTargetComment())}).bind("keydown","t",function(t){t.preventDefault(),e.scrollTo($(e.commentsRef).children(".comment.item:first"))}).bind("keydown","b",function(t){t.preventDefault(),e.scrollTo($(e.commentsRef).children(".comment.item:last"))})},e.prototype.gotoChatItem=function(e){var t=_.find(this.chats,{id:e.id});if(t)this.scrollToAfterImgLoaded(e.id);else{var n=void 0,i=void 0;e.chatTo?(n=e.chatTo.username,i="@"+n):e.channel&&(n=e.channel.name,i=""+n),this.chatTo==n?this.activate({id:e.id,username:i},this.routeConfig):window.location=wurl("path")+("#/chat/"+i+"?id="+e.id)}},e.prototype.refreshLatestHandler=function(e){e.stopImmediatePropagation(),this.markId=null,this.isAt?this.listChatDirect(!1):this.listChatChannel(!1)},e}()}),define("chat/chat-service",["exports"],function(e){"use strict";function t(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){function i(r,a){try{var o=t[r](a),s=o.value}catch(e){return void n(e)}return o.done?void e(s):Promise.resolve(s).then(function(e){i("next",e)},function(e){i("throw",e)})}return i("next")})}}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function e(){n(this,e)}return e.prototype.loginUser=function(){function e(e){return n.apply(this,arguments)}var n=t(regeneratorRuntime.mark(function e(t){var n=this;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&this.user){e.next=3;break}return e.next=3,$.get("/admin/user/loginUser",function(e){e.success&&(n.user=e.data)});case 3:return e.abrupt("return",this.user);case 4:case"end":return e.stop()}},e,this)}));return e}(),e.prototype.listUsers=function(){function e(e){return n.apply(this,arguments)}var n=t(regeneratorRuntime.mark(function e(t){var n=this;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&this.users){e.next=3;break}return e.next=3,$.get("/admin/user/all",{},function(e){e.success&&(n.users=e.data)});case 3:return e.abrupt("return",this.users);case 4:case"end":return e.stop()}},e,this)}));return e}(),e.prototype.listChannels=function(){function e(e){return n.apply(this,arguments)}var n=t(regeneratorRuntime.mark(function e(t){var n=this;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&this.channels){e.next=3;break}return e.next=3,$.get("/admin/channel/listMy",function(e){e.success&&(n.channels=e.data)});case 3:return e.abrupt("return",this.channels);case 4:case"end":return e.stop()}},e,this)}));return e}(),e}();e.default=new i}),define("common/common-constant",[],function(){"use strict";window.nsCons={EVENT_APP_ROUTER_NAVIGATE:"event_app_router_navigate",EVENT_CHAT_MSG_SENDED:"event_chat_msg_sended",EVENT_CHAT_MSG_EDIT_UPLOAD:"event_chat_msg_edit_upload",EVENT_CHAT_SIDEBAR_TOGGLE:"event_chat_sidebar_toggle",EVENT_CHAT_SEARCH_RESULT:"event_chat_search_result",EVENT_CHAT_SEARCH_GOTO_CHAT_ITEM:"event_chat_search_goto_chat_item",EVENT_CHAT_CHANNEL_CREATED:"event_chat_channel_created",EVENT_CHAT_CHANNEL_DELETED:"event_chat_channel_deleted",EVENT_CHAT_CHANNEL_JOINED:"event_chat_channel_joined",EVENT_CHAT_CHANNEL_LEAVED:"event_chat_channel_leaved",EVENT_SHOW_HOTKEYS_MODAL:"event_show_hotkeys_modal",EVENT_CHAT_CHANNEL_MEMBER_ADD_OR_REMOVE:"event_chat_channel_member_add_or_remove",EVENT_CHAT_LAST_ITEM_RENDERED:"event_chat_last_item_rendered",EVENT_CHAT_SHOW_STOW:"event_chat_show_stow",EVENT_CHAT_SHOW_AT:"event_chat_show_at",EVENT_CHAT_SHOW_DIR:"event_chat_show_dir",EVENT_CHAT_SHOW_ATTACH:"event_chat_show_attach",EVENT_CHAT_SHOW_SCHEDULE:"event_chat_show_schedule",EVENT_SCROLLBAR_SCROLL_TO_BOTTOM:"event_scrollbar_scroll_to_bottom",EVENT_CHAT_MSG_INSERT:"event_chat_msg_insert",EVENT_CHAT_MSG_POPUP_SHOW:"event_chat_msg_popup_show",EVENT_CHAT_MEMBER_POPUP_SHOW:"event_chat_member_popup_show",EVENT_CHAT_MSG_WIKI_DIR:"event_chat_msg_wiki_dir",EVENT_CHAT_CONTENT_SCROLL_TO:"event_chat_content_scroll_to",EVENT_CHAT_POLL_UPDATE:"event_chat_poll_update",EVENT_SWITCH_CHAT_TO:"event_switch_chat_to",EVENT_CHANNEL_ACTIONS:"event_channel_actions",EVENT_CHANNEL_LINKS_REFRESH:"event_channel_links_refresh",EVENT_SYSTEM_LINKS_REFRESH:"event_system_links_refresh",EVENT_SCHEDULE_REFRESH:"event_schedule_refresh",EVENT_MODAAL_BEFORE_OPEN:"event_modaal_before_open",EVENT_MODAAL_AFTER_OPEN:"event_modaal_after_open",EVENT_MODAAL_BEFORE_CLOSE:"event_modaal_before_close",EVENT_MODAAL_AFTER_CLOSE:"event_modaal_after_close",EVENT_BLOG_SWITCH:"event_blog_switch",EVENT_BLOG_ACTION:"event_blog_action",EVENT_BLOG_CHANGED:"event_blog_changed",EVENT_SPACE_CHANGED:"event_space_changed",EVENT_BLOG_CREATED:"event_blog_created",EVENT_BLOG_UPDATED:"event_blog_updated",EVENT_BLOG_DELETED:"event_blog_deleted",EVENT_BLOG_TOGGLE_SIDEBAR:"event_blog_toggle_sidebar",EVENT_BLOG_VIEW_CHANGED:"event_blog_view_changed",EVENT_BLOG_STOW_CHANGED:"event_blog_stow_changed",EVENT_BLOG_SAVE:"event_blog_save",EVENT_BLOG_HISTORY_CHANGED:"event_blog_history_changed",EVENT_BLOG_COMMENT_POPUP_SHOW:"event_blog_comment_popup_show",EVENT_BLOG_RIGHT_SIDEBAR_TOGGLE:"event_blog_right_sidebar_toggle",EVENT_BLOG_LEFT_SIDEBAR_TOGGLE:"event_blog_left_sidebar_toggle",EVENT_BLOG_CONTENT_DIMMER_TOGGLE:"event_blog_content_dimmer_toggle",EVENT_BLOG_COMMENT_MSG_INSERT:"event_blog_comment_msg_insert",EVENT_BLOG_COMMENT_ADDED:"event_blog_comment_added",EVENT_BLOG_COMMENT_CHANGED:"event_blog_comment_changed",ACTION_TYPE_SEARCH:"action_type_search",ACTION_TYPE_STOW:"action_type_stow",ACTION_TYPE_AT:"action_type_at",ACTION_TYPE_DIR:"action_type_dir",ACTION_TYPE_ATTACH:"action_type_attach",ACTION_TYPE_SCHEDULE:"action_type_schedule",NUM_TEXT_COMPLETE_MAX_COUNT:20,STR_EMOJI_SEARCH_URL:"http://emoji.muan.co/",KEY_REMEMBER_LAST_CHAT_TO:"tms/remember_last_chat_to",KEY_LOGIN_USERNAME:"tms/login_username",KEY_BLOG_COMMON_SPACE:"tms/blog/common_space"}}),define("common/common-ctx",[],function(){"use strict";var e;window.nsCtx=(e={loginUser:{},isSuper:!1,isAdmin:!1,users:[],channels:[],memberAll:{username:"all",enabled:!0,mails:"",name:"全员"},isAt:!0,chatTo:null,chatId:null},e.isSuper=!1,e.isAdmin=!1,e.blogId=null,e.isModaalOpening=!1,e)}),define("common/common-diff",[],function(){"use strict";var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(e,t){e.JsDiff=t()}(window,function(){return function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return e[i].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var r=n(1),a=i(r),o=n(3),s=n(4),l=n(5),c=n(6),d=n(7),u=n(8),m=n(9),p=n(10),g=n(12),h=n(13);t.Diff=a.default,t.diffChars=o.diffChars,t.diffWords=s.diffWords,t.diffWordsWithSpace=s.diffWordsWithSpace,t.diffLines=l.diffLines,t.diffTrimmedLines=l.diffTrimmedLines,t.diffSentences=c.diffSentences,t.diffCss=d.diffCss,t.diffJson=u.diffJson,t.structuredPatch=p.structuredPatch,t.createTwoFilesPatch=p.createTwoFilesPatch,t.createPatch=p.createPatch,t.applyPatch=m.applyPatch,t.convertChangesToDMP=g.convertChangesToDMP,t.convertChangesToXML=h.convertChangesToXML,t.canonicalize=u.canonicalize},function(e,t,n){function i(e){return e&&e.__esModule?e:{default:e}}function r(e){this.ignoreWhitespace=e}function a(e,t,n,i){for(var r=0,a=e.length,o=0,s=0;re.length?i:e}),c.value=u.join("")}else c.value=t.slice(o,o+c.count).join("");o+=c.count,c.added||(s+=c.count)}}return e}function o(e){return{newPos:e.newPos,components:e.components.slice(0)}}t.__esModule=!0,t.default=r;var s=n(2),l=i(s);r.prototype={diff:function(e,t,n){function i(e){return n?(setTimeout(function(){n(void 0,e)},0),!0):e}function r(){for(var n=-1*d;n<=d;n+=2){var r=void 0,u=m[n-1],p=m[n+1],g=(p?p.newPos:0)-n;u&&(m[n-1]=void 0);var h=u&&u.newPos+1=l&&g+1>=c)return i(a(r.components,t,e,s.useLongestToken));m[n]=r}else m[n]=void 0}d++}var s=this;if(e=this.castInput(e),t=this.castInput(t),t===e)return i([{value:t}]);if(!t)return i([{value:e,removed:!0}]);if(!e)return i([{value:t,added:!0}]);t=this.removeEmpty(this.tokenize(t)),e=this.removeEmpty(this.tokenize(e));var l=t.length,c=e.length,d=1,u=l+c,m=[{newPos:-1,components:[]}],p=this.extractCommon(m[0],t,e,0);if(m[0].newPos+1>=l&&p+1>=c)return i([{value:t.join("")}]);if(n)!function e(){setTimeout(function(){return d>u?n():void(r()||e())},0)}();else for(;d<=u;){var g=r();if(g)return g}},pushComponent:function(e,t,n){var i=e[e.length-1];i&&i.added===t&&i.removed===n?e[e.length-1]={count:i.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,i){for(var r=t.length,a=n.length,o=e.newPos,s=o-i,l=0;o+1=0;r--){for(var c=i[r],d=0;d0?l(a.lines.slice(-o.context)):[],m-=g.length,p-=g.length)}g.push.apply(g,c.default(r,function(e){return(t.added?"+":"-")+e})),t.added?b+=r.length:h+=r.length}else{if(m)if(r.length<=2*o.context&&e=d.length-2&&r.length<=o.context){var _=/\n$/.test(n),v=/\n$/.test(i);0!=r.length||_?_&&v||g.push("\\ No newline at end of file"):g.splice(f.oldLines,0,"\\ No newline at end of file")}u.push(f),m=0,p=0,g=[]}h+=r.length,b+=r.length}},_=0;_"):r.removed&&t.push(""),t.push(i(r.value)),r.added?t.push(""):r.removed&&t.push("")}return t.join("")}function i(e){var t=e;return t=t.replace(/&/g,"&"),t=t.replace(//g,">"),t=t.replace(/"/g,""")}t.__esModule=!0,t.convertChangesToXML=n}])})}),define("common/common-emoji",["exports"],function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t="search,+1,-1,100,1234,8ball,a,ab,abc,abcd,accept,aerial_tramway,airplane,alarm_clock,alien,ambulance,anchor,angel,anger,angry,anguished,ant,apple,aquarius,aries,arrow_backward,arrow_double_down,arrow_double_up,arrow_down,arrow_down_small,arrow_forward,arrow_heading_down,arrow_heading_up,arrow_left,arrow_lower_left,arrow_lower_right,arrow_right,arrow_right_hook,arrow_up,arrow_up_down,arrow_up_small,arrow_upper_left,arrow_upper_right,arrows_clockwise,arrows_counterclockwise,art,articulated_lorry,astonished,atm,b,baby,baby_bottle,baby_chick,baby_symbol,back,baggage_claim,balloon,ballot_box_with_check,bamboo,banana,bangbang,bank,bar_chart,barber,baseball,basketball,bath,bathtub,battery,bear,bee,beer,beers,beetle,beginner,bell,bento,bicyclist,bike,bikini,bird,birthday,black_circle,black_joker,black_medium_small_square,black_medium_square,black_nib,black_small_square,black_square,black_square_button,blossom,blowfish,blue_book,blue_car,blue_heart,blush,boar,boat,bomb,book,bookmark,bookmark_tabs,books,boom,boot,bouquet,bow,bowling,bowtie,boy,bread,bride_with_veil,bridge_at_night,briefcase,broken_heart,bug,bulb,bullettrain_front,bullettrain_side,bus,busstop,bust_in_silhouette,busts_in_silhouette,cactus,cake,calendar,calling,camel,camera,cancer,candy,capital_abcd,capricorn,car,card_index,carousel_horse,cat,cat2,cd,chart,chart_with_downwards_trend,chart_with_upwards_trend,checkered_flag,cherries,cherry_blossom,chestnut,chicken,children_crossing,chocolate_bar,christmas_tree,church,cinema,circus_tent,city_sunrise,city_sunset,cl,clap,clapper,clipboard,clock1,clock10,clock1030,clock11,clock1130,clock12,clock1230,clock130,clock2,clock230,clock3,clock330,clock4,clock430,clock5,clock530,clock6,clock630,clock7,clock730,clock8,clock830,clock9,clock930,closed_book,closed_lock_with_key,closed_umbrella,cloud,clubs,cn,cocktail,coffee,cold_sweat,collision,computer,confetti_ball,confounded,confused,congratulations,construction,construction_worker,convenience_store,cookie,cool,cop,copyright,corn,couple,couple_with_heart,couplekiss,cow,cow2,credit_card,crescent_moon,crocodile,crossed_flags,crown,cry,crying_cat_face,crystal_ball,cupid,curly_loop,currency_exchange,curry,custard,customs,cyclone,dancer,dancers,dango,dart,dash,date,de,deciduous_tree,department_store,diamond_shape_with_a_dot_inside,diamonds,disappointed,disappointed_relieved,dizzy,dizzy_face,do_not_litter,dog,dog2,dollar,dolls,dolphin,donut,door,doughnut,dragon,dragon_face,dress,dromedary_camel,droplet,dvd,e-mail,ear,ear_of_rice,earth_africa,earth_americas,earth_asia,egg,eggplant,eight,eight_pointed_black_star,eight_spoked_asterisk,electric_plug,elephant,email,end,envelope,es,euro,european_castle,european_post_office,evergreen_tree,exclamation,expressionless,eyeglasses,eyes,facepunch,factory,fallen_leaf,family,fast_forward,fax,fearful,feelsgood,feet,ferris_wheel,file_folder,finnadie,fire,fire_engine,fireworks,first_quarter_moon,first_quarter_moon_with_face,fish,fish_cake,fishing_pole_and_fish,fist,five,flags,flashlight,floppy_disk,flower_playing_cards,flushed,foggy,football,fork_and_knife,fountain,four,four_leaf_clover,fr,free,fried_shrimp,fries,frog,frowning,fu,fuelpump,full_moon,full_moon_with_face,game_die,gb,gem,gemini,ghost,gift,gift_heart,girl,globe_with_meridians,goat,goberserk,godmode,golf,grapes,green_apple,green_book,green_heart,grey_exclamation,grey_question,grimacing,grin,grinning,guardsman,guitar,gun,haircut,hamburger,hammer,hamster,hand,handbag,hankey,hash,hatched_chick,hatching_chick,headphones,hear_no_evil,heart,heart_decoration,heart_eyes,heart_eyes_cat,heartbeat,heartpulse,hearts,heavy_check_mark,heavy_division_sign,heavy_dollar_sign,heavy_exclamation_mark,heavy_minus_sign,heavy_multiplication_x,heavy_plus_sign,helicopter,herb,hibiscus,high_brightness,high_heel,hocho,honey_pot,honeybee,horse,horse_racing,hospital,hotel,hotsprings,hourglass,hourglass_flowing_sand,house,house_with_garden,hurtrealbad,hushed,ice_cream,icecream,id,ideograph_advantage,imp,inbox_tray,incoming_envelope,information_desk_person,information_source,innocent,interrobang,iphone,it,izakaya_lantern,jack_o_lantern,japan,japanese_castle,japanese_goblin,japanese_ogre,jeans,joy,joy_cat,jp,key,keycap_ten,kimono,kiss,kissing,kissing_cat,kissing_closed_eyes,kissing_face,kissing_heart,kissing_smiling_eyes,koala,koko,kr,large_blue_circle,large_blue_diamond,large_orange_diamond,last_quarter_moon,last_quarter_moon_with_face,laughing,leaves,ledger,left_luggage,left_right_arrow,leftwards_arrow_with_hook,lemon,leo,leopard,libra,light_rail,link,lips,lipstick,lock,lock_with_ink_pen,lollipop,loop,loudspeaker,love_hotel,love_letter,low_brightness,m,mag,mag_right,mahjong,mailbox,mailbox_closed,mailbox_with_mail,mailbox_with_no_mail,man,man_with_gua_pi_mao,man_with_turban,mans_shoe,maple_leaf,mask,massage,meat_on_bone,mega,melon,memo,mens,metal,metro,microphone,microscope,milky_way,minibus,minidisc,mobile_phone_off,money_with_wings,moneybag,monkey,monkey_face,monorail,mortar_board,mount_fuji,mountain_bicyclist,mountain_cableway,mountain_railway,mouse,mouse2,movie_camera,moyai,muscle,mushroom,musical_keyboard,musical_note,musical_score,mute,nail_care,name_badge,neckbeard,necktie,negative_squared_cross_mark,neutral_face,new,new_moon,new_moon_with_face,newspaper,ng,nine,no_bell,no_bicycles,no_entry,no_entry_sign,no_good,no_mobile_phones,no_mouth,no_pedestrians,no_smoking,non-potable_water,nose,notebook,notebook_with_decorative_cover,notes,nut_and_bolt,o,o2,ocean,octocat,octopus,oden,office,ok,ok_hand,ok_woman,older_man,older_woman,on,oncoming_automobile,oncoming_bus,oncoming_police_car,oncoming_taxi,one,open_file_folder,open_hands,open_mouth,ophiuchus,orange_book,outbox_tray,ox,package,page_facing_up,page_with_curl,pager,palm_tree,panda_face,paperclip,parking,part_alternation_mark,partly_sunny,passport_control,paw_prints,peach,pear,pencil,pencil2,penguin,pensive,performing_arts,persevere,person_frowning,person_with_blond_hair,person_with_pouting_face,phone,pig,pig2,pig_nose,pill,pineapple,pisces,pizza,plus1,point_down,point_left,point_right,point_up,point_up_2,police_car,poodle,poop,post_office,postal_horn,postbox,potable_water,pouch,poultry_leg,pound,pouting_cat,pray,princess,punch,purple_heart,purse,pushpin,put_litter_in_its_place,question,rabbit,rabbit2,racehorse,radio,radio_button,rage,rage1,rage2,rage3,rage4,railway_car,rainbow,raised_hand,raised_hands,raising_hand,ram,ramen,rat,recycle,red_car,red_circle,registered,relaxed,relieved,repeat,repeat_one,restroom,revolving_hearts,rewind,ribbon,rice,rice_ball,rice_cracker,rice_scene,ring,rocket,roller_coaster,rooster,rose,rotating_light,round_pushpin,rowboat,ru,rugby_football,runner,running,running_shirt_with_sash,sa,sagittarius,sailboat,sake,sandal,santa,satellite,satisfied,saxophone,school,school_satchel,scissors,scorpius,scream,scream_cat,scroll,seat,secret,see_no_evil,seedling,seven,shaved_ice,sheep,shell,ship,shipit,shirt,shit,shoe,shower,signal_strength,six,six_pointed_star,ski,skull,sleeping,sleepy,slot_machine,small_blue_diamond,small_orange_diamond,small_red_triangle,small_red_triangle_down,smile,smile_cat,smiley,smiley_cat,smiling_imp,smirk,smirk_cat,smoking,snail,snake,snowboarder,snowflake,snowman,sob,soccer,soon,sos,sound,space_invader,spades,spaghetti,sparkle,sparkler,sparkles,sparkling_heart,speak_no_evil,speaker,speech_balloon,speedboat,squirrel,star,star2,stars,station,statue_of_liberty,steam_locomotive,stew,straight_ruler,strawberry,stuck_out_tongue,stuck_out_tongue_closed_eyes,stuck_out_tongue_winking_eye,sun_with_face,sunflower,sunglasses,sunny,sunrise,sunrise_over_mountains,surfer,sushi,suspect,suspension_railway,sweat,sweat_drops,sweat_smile,sweet_potato,swimmer,symbols,syringe,tada,tanabata_tree,tangerine,taurus,taxi,tea,telephone,telephone_receiver,telescope,tennis,tent,thought_balloon,three,thumbsdown,thumbsup,ticket,tiger,tiger2,tired_face,tm,toilet,tokyo_tower,tomato,tongue,top,tophat,tractor,traffic_light,train,train2,tram,triangular_flag_on_post,triangular_ruler,trident,triumph,trolleybus,trollface,trophy,tropical_drink,tropical_fish,truck,trumpet,tshirt,tulip,turtle,tv,twisted_rightwards_arrows,two,two_hearts,two_men_holding_hands,two_women_holding_hands,u5272,u5408,u55b6,u6307,u6708,u6709,u6e80,u7121,u7533,u7981,u7a7a,uk,umbrella,unamused,underage,unlock,up,us,v,vertical_traffic_light,vhs,vibration_mode,video_camera,video_game,violin,virgo,volcano,vs,walking,waning_crescent_moon,waning_gibbous_moon,warning,watch,water_buffalo,watermelon,wave,wavy_dash,waxing_crescent_moon,waxing_gibbous_moon,wc,weary,wedding,whale,whale2,wheelchair,white_check_mark,white_circle,white_flower,white_large_square,white_medium_small_square,white_medium_square,white_small_square,white_square_button,wind_chime,wine_glass,wink,wolf,woman,womans_clothes,womans_hat,womens,worried,wrench,x,yellow_heart,yen,yum,zap,zero,zzz";e.default=t.split(",")}),define("common/common-imgs-loaded",[],function(){"use strict";var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(t,n){function i(n){return null==n?String(n):"object"===("undefined"==typeof n?"undefined":e(n))||"function"==typeof n?n instanceof t.NodeList&&"nodelist"||n instanceof t.HTMLCollection&&"htmlcollection"||Object.prototype.toString.call(n).match(/\s([a-z]+)/i)[1].toLowerCase():"undefined"==typeof n?"undefined":e(n)}function r(e){switch(i(e)){case"array":return e;case"undefined":return[];case"nodelist":case"htmlcollection":case"arguments":for(var t=[],n=0,r=e.length;n0&&a.is(":visible"))):(/^(input|select|textarea|button|object)$/.test(l)?(r=!t.disabled,r&&(i=e(t).closest("fieldset")[0],i&&(r=!i.disabled))):r="a"===l?t.href||n:n,r=r||e(t).is("[contenteditable]"),r&&e(t).is(":visible"))},t=function(){function t(t,n){this._container=t,this._target=n,this._container=e(this._container),this._target=e(this._target).addClass("pastable"),this._container.on("paste",function(e){return function(t){var n,i,r,a,o,s,l,c,d,u,m,p,g;if(t.currentTarget!==t.target)return t.preventDefault();if(e._paste_event_fired=!0,null!=(null!=(d=t.originalEvent)?d.clipboardData:void 0))if(n=t.originalEvent.clipboardData,n.items)for(u=n.items,a=0,s=u.length;ac&&(m=o+l*(u-c),m<=s&&(clearInterval(d),n()))},m)}function i(){u=0,m=o,h=!1,clearInterval(d),d=null}function r(){i(),n()}function a(){h=!0}Object.defineProperty(e,"__esModule",{value:!0});var o=6e3,s=3e5,l=6e3,c=10,d=null,u=0,m=o,p=null,g=null,h=!1;e.default={start:function(e,t){d&&i(),p=e,g=t,n()},reset:function(){r()},stop:function(){i()},pause:function(){a()}}}),define("common/common-scrollbar",[],function(){"use strict";!function(e,t){t(e.jQuery)}(window,function(e){function t(t){if(a.webkit&&!t)return{height:0,width:0};if(!a.data.outer){var n={border:"none","box-sizing":"content-box",height:"200px",margin:"0",padding:"0",width:"200px"};a.data.inner=e("
    ").css(e.extend({},n)),a.data.outer=e("
    ").css(e.extend({left:"-1000px",overflow:"scroll",position:"absolute",top:"-1000px"},n)).append(a.data.inner).appendTo("body")}return a.data.outer.scrollLeft(1e3).scrollTop(1e3),{height:Math.ceil(a.data.outer.offset().top-a.data.inner.offset().top||0),width:Math.ceil(a.data.outer.offset().left-a.data.inner.offset().left||0)}}function n(){var e=t(!0);return!(e.height||e.width)}function i(e){var t=e.originalEvent;return(!t.axis||t.axis!==t.HORIZONTAL_AXIS)&&!t.wheelDeltaX}var r=!1,a={data:{index:0,name:"scrollbar"},firefox:/firefox/i.test(navigator.userAgent),macosx:/mac/i.test(navigator.platform),msedge:/edge\/\d+/i.test(navigator.userAgent),msie:/(msie|trident)/i.test(navigator.userAgent),mobile:/android|webos|iphone|ipad|ipod|blackberry/i.test(navigator.userAgent),overlay:null,scroll:null,scrolls:[],webkit:/webkit/i.test(navigator.userAgent)&&!/edge\/\d+/i.test(navigator.userAgent)};a.scrolls.add=function(e){this.remove(e).push(e)},a.scrolls.remove=function(t){for(;e.inArray(t,this)>=0;)this.splice(e.inArray(t,this),1);return this};var o={autoScrollSize:!0,autoUpdate:!0,debug:!1,disableBodyScroll:!1,duration:200,ignoreMobile:!1,ignoreOverlay:!1,isRtl:!1,scrollStep:30,showArrows:!1,stepScrolling:!0,scrollx:null,scrolly:null,onDestroy:null,onFallback:null,onInit:null,onScroll:null,onUpdate:null},s=function(i){a.scroll||(a.overlay=n(),a.scroll=t(),c(),e(window).resize(function(){c(!0)})),this.container=i,this.namespace=".scrollbar_"+a.data.index++,this.options=e.extend({},o,window.jQueryScrollbarOptions||{}),this.scrollTo=null,this.scrollx={},this.scrolly={},i.data(a.data.name,this),a.scrolls.add(this)};s.prototype={destroy:function(){if(this.wrapper){this.container.removeData(a.data.name),a.scrolls.remove(this);var t=this.container.scrollLeft(),n=this.container.scrollTop();this.container.insertBefore(this.wrapper).css({height:"",margin:"","max-height":""}).removeClass("scroll-content scroll-scrollx_visible scroll-scrolly_visible").off(this.namespace).scrollLeft(t).scrollTop(n),this.scrollx.scroll.removeClass("scroll-scrollx_visible").find("div").addBack().off(this.namespace),this.scrolly.scroll.removeClass("scroll-scrolly_visible").find("div").addBack().off(this.namespace),this.wrapper.remove(),e(document).add("body").off(this.namespace),e.isFunction(this.options.onDestroy)&&this.options.onDestroy.apply(this,[this.container])}},init:function(t){var n=this,r=this.container,o=this.containerWrapper||r,s=this.namespace,l=e.extend(this.options,t||{}),c={x:this.scrollx,y:this.scrolly},d=this.wrapper,u={},m={scrollLeft:r.scrollLeft(),scrollTop:r.scrollTop()};if(a.mobile&&l.ignoreMobile||a.overlay&&l.ignoreOverlay||a.macosx&&!a.webkit)return e.isFunction(l.onFallback)&&l.onFallback.apply(this,[r]),!1;if(d)u={height:"auto","margin-bottom":a.scroll.height*-1+"px","max-height":""},u[l.isRtl?"margin-left":"margin-right"]=a.scroll.width*-1+"px",o.css(u);else{if(this.wrapper=d=e("
    ").addClass("scroll-wrapper").addClass(r.attr("class")).css("position","absolute"===r.css("position")?"absolute":"relative").insertBefore(r).append(r),l.isRtl&&d.addClass("scroll--rtl"),r.is("textarea")&&(this.containerWrapper=o=e("
    ").insertBefore(r).append(r),d.addClass("scroll-textarea")),u={height:"auto","margin-bottom":a.scroll.height*-1+"px","max-height":""},u[l.isRtl?"margin-left":"margin-right"]=a.scroll.width*-1+"px",o.addClass("scroll-content").css(u),r.on("scroll"+s,function(t){var i=r.scrollLeft(),o=r.scrollTop();if(l.isRtl)switch(!0){case a.firefox:i=Math.abs(i);case a.msedge||a.msie:i=r[0].scrollWidth-r[0].clientWidth-i}e.isFunction(l.onScroll)&&l.onScroll.call(n,{maxScroll:c.y.maxScrollOffset,scroll:o,size:c.y.size,visible:c.y.visible},{maxScroll:c.x.maxScrollOffset,scroll:i,size:c.x.size,visible:c.x.visible}),c.x.isVisible&&c.x.scroll.bar.css("left",i*c.x.kx+"px"),c.y.isVisible&&c.y.scroll.bar.css("top",o*c.y.kx+"px")}),d.on("scroll"+s,function(){d.scrollTop(0).scrollLeft(0)}),l.disableBodyScroll){var p=function(e){i(e)?c.y.isVisible&&c.y.mousewheel(e):c.x.isVisible&&c.x.mousewheel(e)};d.on("MozMousePixelScroll"+s,p),d.on("mousewheel"+s,p),a.mobile&&d.on("touchstart"+s,function(t){var n=t.originalEvent.touches&&t.originalEvent.touches[0]||t,i={pageX:n.pageX,pageY:n.pageY},a={left:r.scrollLeft(),top:r.scrollTop()};e(document).on("touchmove"+s,function(e){var t=e.originalEvent.targetTouches&&e.originalEvent.targetTouches[0]||e;r.scrollLeft(a.left+i.pageX-t.pageX),r.scrollTop(a.top+i.pageY-t.pageY),e.preventDefault()}),e(document).on("touchend"+s,function(){e(document).off(s)})})}e.isFunction(l.onInit)&&l.onInit.apply(this,[r])}e.each(c,function(t,o){var d=null,u=1,m="x"===t?"scrollLeft":"scrollTop",p=l.scrollStep,g=function(){var e=r[m]();r[m](e+p),1==u&&e+p>=h&&(e=r[m]()),u==-1&&e+p<=h&&(e=r[m]()),r[m]()==e&&d&&d()},h=0;o.scroll||(o.scroll=n._getScroll(l["scroll"+t]).addClass("scroll-"+t),l.showArrows&&o.scroll.addClass("scroll-element_arrows_visible"),o.mousewheel=function(e){if(!o.isVisible||"x"===t&&i(e))return!0;if("y"===t&&!i(e))return c.x.mousewheel(e),!0;var a=e.originalEvent.wheelDelta*-1||e.originalEvent.detail,s=o.size-o.visible-o.offset;return a||("x"===t&&e.originalEvent.deltaX?a=40*e.originalEvent.deltaX:"y"===t&&e.originalEvent.deltaY&&(a=40*e.originalEvent.deltaY)),(a>0&&h0)&&(h+=a,h<0&&(h=0),h>s&&(h=s),n.scrollTo=n.scrollTo||{},n.scrollTo[m]=h,setTimeout(function(){n.scrollTo&&(r.stop().animate(n.scrollTo,240,"linear",function(){h=r[m]()}),n.scrollTo=null)},1)),e.preventDefault(),!1},o.scroll.on("MozMousePixelScroll"+s,o.mousewheel).on("mousewheel"+s,o.mousewheel).on("mouseenter"+s,function(){h=r[m]()}),o.scroll.find(".scroll-arrow, .scroll-element_track").on("mousedown"+s,function(i){if(1!=i.which)return!0;u=1;var s={eventOffset:i["x"===t?"pageX":"pageY"],maxScrollValue:o.size-o.visible-o.offset,scrollbarOffset:o.scroll.bar.offset()["x"===t?"left":"top"],scrollbarSize:o.scroll.bar["x"===t?"outerWidth":"outerHeight"]()},c=0,b=0;if(e(this).hasClass("scroll-arrow")){if(u=e(this).hasClass("scroll-arrow_more")?1:-1,p=l.scrollStep*u,h=u>0?s.maxScrollValue:0,l.isRtl)switch(!0){case a.firefox:h=u>0?0:s.maxScrollValue*-1;break;case a.msie||a.msedge:}}else u=s.eventOffset>s.scrollbarOffset+s.scrollbarSize?1:s.eventOffset','
    ','
    ','
    ','
    ','
    ','
    ','
    ','
    ',"
    ","
    ",'
    ','
    ','
    ',"
    ",'
    ','
    ',"
    ","
    ","
    "].join(""),simple:['
    ','
    ','
    ','
    ','
    ',"
    ","
    "].join("") -};return n[t]&&(t=n[t]),t||(t=n.simple),t="string"==typeof t?e(t).appendTo(this.wrapper):e(t),e.extend(t,{bar:t.find(".scroll-bar"),size:t.find(".scroll-element_size"),track:t.find(".scroll-element_track")}),t},_handleMouseDown:function(t,n){var i=this.namespace;return e(document).on("blur"+i,function(){e(document).add("body").off(i),t&&t()}),e(document).on("dragstart"+i,function(e){return e.preventDefault(),!1}),e(document).on("mouseup"+i,function(){e(document).add("body").off(i),t&&t()}),e("body").on("selectstart"+i,function(e){return e.preventDefault(),!1}),n&&n.preventDefault(),!1},_updateScroll:function(t,n){var i=this.container,r=this.containerWrapper||i,o="scroll-scroll"+t+"_visible",s="x"===t?this.scrolly:this.scrollx,l=parseInt(this.container.css("x"===t?"left":"top"),10)||0,c=this.wrapper,d=n.size,u=n.visible+l;n.isVisible=d-u>1,n.isVisible?(n.scroll.addClass(o),s.scroll.addClass(o),r.addClass(o)):(n.scroll.removeClass(o),s.scroll.removeClass(o),r.removeClass(o)),"y"===t&&(i.is("textarea")||d10?(window.console&&console.log("Scroll updates exceed 10"),c=function(){}):(clearTimeout(e),e=setTimeout(c,300))}}()})}),define("common/common-tips",["exports"],function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={"/h1":{key:"ctrl+h",label:"/h1 [标题1] (ctrl+h)",value:"# "},"/h2":{label:"/h2 [标题2]",value:"## "},"/h3":{label:"/h3 [标题3]",value:"### "},"/h4":{label:"/h4 [标题4]",value:"#### "},"/h5":{label:"/h5 [标题5]",value:"##### "},"/h6":{key:"ctrl+shift+h",label:"/h6 [标题6] (ctrl+shift+h)",value:"###### "},"/b":{key:"ctrl+b",label:"/b [粗体] (ctrl+b)",value:"****",ch:2},"/i":{key:"ctrl+i",label:"/i [斜体] (ctrl+i)",value:"**",ch:1},"/s":{label:"/s [删除线]",value:"~~~~",ch:2},"/code":{key:"alt+ctrl+c",label:"/code [代码] (alt+ctrl+c)",value:"```\n\n```\n",line:2,ch2:5},"/quote":{key:"ctrl+'",label:"/quote [引用] (ctrl+')",value:"> "},"/list":{key:"ctrl+l",label:"/list [列表] (ctrl+l)",value:"* "},"/href":{key:"ctrl+k",label:"/href [链接] (ctrl+k)",value:"[](http://)",ch:1},"/img":{key:"alt+ctrl+i",label:"/img [图片] (ctrl+alt+i)",value:"![](http://)",ch:1},"/table":{label:"/table [表格]",value:"| 列1 | 列2 | 列3 |\n| ------ | ------ | ------ |\n| 文本 | 文本 | 文本 |\n"},"/hr":{label:"/hr [分隔线]",value:"\n-----\n"},"/task":{label:"/task [任务列表]",value:"- [ ] 未完成任务\n- [x] 已完成任务",line:1,ch:11,ch2:12},"/details":{label:"/details [折叠详情]",value:"
    \n标题详情内容\n
    ",line:1,ch:11,ch2:25},"/upload":{label:"/upload [上传文件] (ctrl+u)",value:""},"/shortcuts":{label:"/shortcuts [热键] (ctrl+/)",value:""}}}),define("common/common-utils",["exports","wurl","common/common-diff"],function(e,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.CommonUtils=void 0;var r=n(t),a=e.CommonUtils=function(){function e(){i(this,e),this.regExpOS={ios:/(iPad|iPhone|iPod)/g,mobileChrome:/(CriOS)/g,mobile:/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/g,cellphone:/iP(hone|od)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/g}}return e.prototype.getBaseUrl=function(){return"function"==typeof r.default?80==(0,r.default)("port")||443==(0,r.default)("port")?(0,r.default)("protocol")+"://"+(0,r.default)("hostname"):(0,r.default)("protocol")+"://"+(0,r.default)("hostname")+":"+(0,r.default)("port"):""},e.prototype.getUrl=function(){return this.getBaseUrl()+(0,r.default)("path")+"#"+this.getHash()},e.prototype.getHash=function(){var e=(0,r.default)("hash");return e?e.split("?")[0]:""},e.prototype.getBasePath=function(){return this.getBaseUrl()+(0,r.default)("path")},e.prototype.getResourceBase=function(){var e=this.getBasePath();return _.endsWith(e,"/index.html")&&(e=_.replace(e,"/index.html","")),e},e.prototype.redirect2Login=function(e){var t=this.urlQuery("redirect");t?console.log("url has contains ?redirect"):(e=e?e:(0,r.default)(),window.location=this.getBaseUrl()+(0,r.default)("path")+("#/login?redirect="+encodeURIComponent(e)))},e.prototype.urlQuery=function(e,t){if(t){var n=(0,r.default)("?"+e,t);return n||(n=(0,r.default)("?"+e,(0,r.default)("hash",t))),n}return(0,r.default)("?"+e)||(0,r.default)("?"+e,(0,r.default)("hash"))},e.prototype.removeUrlQuery=function(e,t){var n=t?t:window.location.href,i=new RegExp("(&|\\?)?"+e+"=?[^&#]*(.)?","g").exec(n);if(i){if("&"==i[1])return n.replace(new RegExp("&"+e+"=?[^&#]+","g"),"");if("?"==i[1])return"&"!=i[2]?n.replace(new RegExp("\\?"+e+"=?[^&#]*","g"),""):n.replace(new RegExp(""+e+"=?[^&#]*&","g"),"")}return n},e.prototype.isLoginPage=function(){var e=(0,r.default)("hash");return _.startsWith(e,"/login")},e.prototype.errorAutoTry=function(e,t){var n=this;if(!this.isRunning&&!this.isLoginPage()){var i=t?t:10,r=null,a=toastr.error("网络连接错误,"+i+"秒后自动重试!",null,{closeButton:!1,timeOut:"0",preventDuplicates:!1,onclick:function(){clearInterval(n.timer),e&&e()}});this.isRunning=!0,r=setInterval(function(){return 0===i?(clearInterval(r),n.isRunning=!1,toastr.remove(),void(e&&e())):(a&&a.find(".toast-message").text("网络连接错误,"+i+"秒后自动重试!"),void i--)},1e3)}},e.prototype.isElementInViewport=function(e){"function"==typeof jQuery&&e instanceof jQuery&&(e=e[0]);var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)},e.prototype.getChatName=function(e){return _.startsWith(e,"@")?e.substr(1):e},e.prototype.preParse=function(e){var t=e;return $.each(this.parseUsers(e),function(e,n){t=t.replace(new RegExp("{~"+n.username+"}","g"),'**`@'+n.name+"`**")}),t},e.prototype.parseUsers=function(e){for(var t=[],n=/\{~([^\}]*)\}/g,i=n.exec(e);i;){var r=_.find([nsCtx.memberAll].concat(window.tmsUsers?tmsUsers:[]),{username:i[1]}),a=!_.some(t,{username:i[1]});r&&a&&t.push(r),i=n.exec(e)}return t},e.prototype.getUser=function(e){return _.find(tmsUsers,{username:e})},e.prototype.parseUsernames=function(e,t){var n=this.parseUsers(e),i=_.some(n,{username:"all"});return i?_.without(_.map(t,"username"),"all"):_.map(n,"username")},e.prototype.md2html=function(e){return emojify&&(e=emojify.replace(e)),$('
    ').html(''+marked(this.preParse(e))).wrap("
    ").parent().html()},e.prototype.diffS=function(e,t,n){var i=["diffChars","diffWords","diffWordsWithSpace","diffLines"];i.includes(n)||(n="diffWords");for(var r='style="background-color: #e6cf56; text-decoration: line-through;"',a='style="background-color: #98e287; text-decoration: none;"',o=JsDiff[n](e,t),s=[],l=0;l"+o[l].value+"":o[l].added?""+o[l].value+"":""+o[l].value,s.push(d)}return"
    "+s.join("")+"
    "},e.prototype.catalog=function(e){var t=$(":header",e);if(t&&0==t.size())return!1;var n=null,i={pre:null,arr:[]},r=i;return t.each(function(e,t){var i=t.nodeName;if(n)if(n
    ');return this.prodDir(n,e,t),n},e.prototype.dir=function(e,t){var n=this.catalog(e);return n?this.generateDir(n,t):""},e.prototype.prodDir=function(e,t,n){var i=this;$.each(t.arr,function(t,r){if(r.hasOwnProperty("arr")){var a=$('
    ');e.append(a),i.prodDir(a,r,n)}else{var o=n?_.uniqueId(n):_.uniqueId("tms-wiki-dir-item-"),s=$('
    ').text($(r).attr("id",o).text()).attr("data-id",o);e.append(s)}})},e.prototype.isElementInViewport=function(e){"function"==typeof jQuery&&e instanceof jQuery&&(e=e[0]);var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)},e.prototype.getCursortPosition=function(e){var t=0;if(document.selection){e.focus();var n=document.selection.createRange();n.moveStart("character",-e.value.length),t=n.text.length}else(e.selectionStart||"0"==e.selectionStart)&&(t=e.selectionStart);return t},e.prototype.setCaretPosition=function(e,t){if(e.setSelectionRange)e.focus(),e.setSelectionRange(t,t);else if(e.createTextRange){var n=e.createTextRange();n.collapse(!0),n.moveEnd("character",t),n.moveStart("character",t),n.select()}},e.prototype.isAbsUrl=function(e){return!!_.startsWith(e,"http://")||(!!_.startsWith(e,"https://")||!!_.startsWith(e,"//"))},e.prototype.escape=function(e,t){return e.replace(t?/&/g:/&(?!#?\w+;)/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")},e.prototype.unescape=function(e){return e.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/g,function(e,t){return t=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})},e.prototype.openNewWin=function(e){e&&!function(){var t=$('').appendTo("body").end();$('').appendTo(t).end().click(),_.delay(function(){t.remove()},200)}()},e.prototype.isAdminUser=function(e){return!(!e||!e.authorities)&&_.some(e.authorities,function(e){return"ROLE_ADMIN"===e.id.authority})},e.prototype.isSuperUser=function(e){return!(!e||!e.authorities)&&_.some(e.authorities,function(e){return"ROLE_SUPER"===e.id.authority})},e.prototype.isSBCcase=function(e){return/[^\x00-\xff]/.test(e)},e.prototype.isHanzi=function(e){return/[\u4e00-\u9fa5]/gi.test(e)},e.prototype.getByteLen=function(e){for(var t=0,n=0;nt)return e.substr(0,i)+"...";return e},e.prototype.isMail=function(e){var t=/^([_a-z0-9-]+)(\.[_a-z0-9-]+)*@([a-z0-9-]+)(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/i;return t.test(e)},e.prototype.isIE=function e(){var t=!window.ActiveXObject&&"ActiveXObject"in window,e="ActiveXObject"in window;return t||e},e.prototype.isIE11=function(){return!window.ActiveXObject&&"ActiveXObject"in window},e.prototype.isIOS=function e(){var t=navigator.userAgent,e=t.match(this.regExpOS.ios),n=t.match(this.regExpOS.mobileChrome);return!(!e||n)},e.prototype.isCellphone=function(){return!!navigator.userAgent.match(this.regExpOS.cellphone)},e.prototype.isMobile=function(){return!!navigator.userAgent.match(this.regExpOS.mobile)},e.prototype.isChrome=function(){return/chrome\/([\d.]+)/.test(navigator.userAgent.toLowerCase())},e.prototype.isSafari=function(){return/version\/([\d.]+)/.test(navigator.userAgent.toLowerCase())},e.prototype.isFirefox=function(){return/firefox\/([\d.]+)/.test(navigator.userAgent.toLowerCase())},e.prototype.isOpera=function(){return/opera.([\d.]+)/.test(navigator.userAgent.toLowerCase())},e.prototype.diffHtml=function(e){var t=["html","head","meta","title","base","link","script","body","div","span"],n="";return e&&(n=e,_.each(t,function(e){n=n.replace(new RegExp("<("+e+")","gi"),"<$1")})),n},e.prototype.encodeHtml=function(e){var t="";return 0==e.length?"":(t=e.replace(/&/g,">"),t=t.replace(//g,">"),t=t.replace(/ /g," "),t=t.replace(/\'/g,"'"),t=t.replace(/\"/g,"""),t=t.replace(/\n/g,"
    "))},e.prototype.decodeHtml=function(e){var t="";return 0==e.length?"":(t=e.replace(/>/g,"&"),t=t.replace(/</g,"<"),t=t.replace(/>/g,">"),t=t.replace(/ /g," "),t=t.replace(/'/g,"'"),t=t.replace(/"/g,'"'),t=t.replace(/
    /g,"\n"))},e}();e.default=new a}),define("init/config",["exports","aurelia-templating-resources","aurelia-event-aggregator","aurelia-fetch-client","toastr","wurl","common/common-utils","marked","highlight","autosize","nprogress","push","color-hash","isomorphic-fetch","common/common-plugin","common/common-constant","common/common-ctx","common/common-imgs-loaded","modaal"],function(e,t,n,i,r,a,o,s,l,c,d,u,m){"use strict";function p(e){return e&&e.__esModule?e:{default:e}}function g(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.Config=void 0;var h=p(r),b=p(a),f=p(o),v=p(s),y=p(l),E=p(c),w=p(d),x=p(u),C=p(m),S=e.Config=function(){function e(){g(this,e)}return e.prototype.initHttp=function(){return window.json=function(e){return console.log(JSON.stringify(e)),(0,i.json)(e)},window.http=this.aurelia.container.root.get(i.HttpClient),http.configure(function(e){e.withDefaults({credentials:"same-origin",headers:{Accept:"application/json","Content-Type":"application/json","X-Requested-With":"fetch"}}).withInterceptor({request:function(e){return w.default&&w.default.start(),e},requestError:function(e){console.log(e)},response:function(e){return w.default&&w.default.done(),e.ok||(e.json().then(function(e){h.default.error(e.message)}),401!=e.status)?e:(h.default.error("用户未登录!"),void f.default.redirect2Login())},responseError:function(e){h.default.error(e.message,"网络请求错误!"),console.log(e)}})}),this},e.prototype.initToastr=function(){return h.default.options.positionClass="toast-bottom-center",h.default.options.preventDuplicates=!0,this},e.prototype.initMarked=function(){var e=new v.default.Renderer;return e.listitem=function(e){return/^\s*\[[x ]\]\s*/.test(e)?(e=e.replace(/^\s*\[ \]\s*/,' ').replace(/^\s*\[x\]\s*/,' '),'
  • '+e+"
  • "):"
  • "+e+"
  • "},e.link=function(e,t,n){if(this.options.sanitize){try{var i=decodeURIComponent(unescape(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(0===i.indexOf("javascript:")||0===i.indexOf("vbscript:")||0===i.indexOf("data:"))return""}var r=void 0,a=/\/chat\/.+\?id=.+/g.test((0,b.default)("hash",e)),o=/\/blog\/.+\?cid=.+/g.test((0,b.default)("hash",e));return r=a||o||f.default.isAbsUrl(e)&&(0,b.default)("hostname",e)!=(0,b.default)("hostname")?'"},e.codespan=function(e){return''+e+""},e.code=function(e,t,n){var i=e;if(this.options.highlight){var r=this.options.highlight(e,t);null!=r&&r!==e&&(n=!0,e=r)}return t?'
    '+(n?e:f.default.escape(e,!0))+"\n
    \n":'
    '+(n?e:f.default.escape(e,!0))+"\n
    "},v.default.setOptions({renderer:e,breaks:!0,highlight:function(e){return y.default.highlightAuto(e).value}}),this},e.prototype.initAjax=function(){$.ajaxSetup({cache:!1});var e=["/chat/channel/latest","/chat/direct/latest","/chat/channel/poll"];return $(document).ajaxSend(function(t,n,i){var r=_.every(e,function(e){return i.url.lastIndexOf(e)==-1});r&&w.default&&w.default.start()}),$(document).on("ajaxStop",function(){w.default&&w.default.done()}),$(document).ajaxError(function(e,t,n){t&&401==t.status&&f.default.redirect2Login()}),this},e.prototype.initGlobalVar=function(){return window.toastr=h.default,window.wurl=b.default,window.utils=f.default,window.marked=v.default,window.autosize=E.default,window.push=x.default,window.bs=this.aurelia.container.root.get(t.BindingSignaler),window.ea=this.aurelia.container.root.get(n.EventAggregator),window.colorHash=new C.default,this},e.prototype.initAnimateCss=function(){return $.fn.extend({animateCss:function(e){var t="webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend";this.addClass("animated "+e).one(t,function(){$(this).removeClass("animated "+e)})}}),this},e.prototype.initEmoji=function(){return emojify&&emojify.setConfig({img_dir:f.default.getResourceBase()+"/img/emoji"}),this},e.prototype.initModaal=function(){return _.extend($.fn.modaal.options,{close_text:"关闭",close_aria_label:"按[esc]关闭",confirm_button_text:"确认",confirm_cancel_button_text:"取消",confirm_title:"操作确认",accessible_title:"对话框窗口",confirm_content:"

    默认确认对话框内容.

    "}),this},e.prototype.context=function(e){return this.aurelia=e,this},e}();e.default=new S}),define("init/index",["exports","./config","jquery","jquery.scrollto","timeago","lodash","hotkeys"],function(e,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){r.default.context(e).initGlobalVar().initAjax().initToastr().initMarked().initAnimateCss().initEmoji().initModaal()}Object.defineProperty(e,"__esModule",{value:!0}),e.configure=i;var r=n(t)}),define("resources/index",["exports"],function(e){"use strict";function t(e){e.globalResources(["resources/value-converters/vc-common","resources/binding-behaviors/bb-key","resources/attributes/attr-task","resources/attributes/attr-swipebox","resources/attributes/attr-pastable","resources/attributes/attr-autosize","resources/attributes/attr-dropzone","resources/attributes/attr-attr","resources/attributes/attr-c2c","resources/attributes/attr-dimmer","resources/attributes/attr-ui-dropdown","resources/attributes/attr-ui-dropdown-action","resources/attributes/attr-ui-dropdown-hover","resources/attributes/attr-ui-tab","resources/attributes/attr-ui-popup","resources/attributes/attr-ui-checkbox","resources/attributes/attr-tablesort","resources/attributes/attr-textcomplete","resources/attributes/attr-scrollbar","resources/attributes/attr-modaal","resources/elements/em-modal","resources/elements/em-dropdown","resources/elements/em-checkbox","resources/elements/em-confirm-modal","resources/elements/em-hotkeys-modal","resources/elements/em-chat-input","resources/elements/em-chat-top-menu","resources/elements/em-chat-sidebar-left","resources/elements/em-chat-content-item","resources/elements/em-chat-sidebar-right","resources/elements/em-chat-channel-create","resources/elements/em-chat-channel-join","resources/elements/em-chat-channel-edit","resources/elements/em-chat-channel-members-mgr","resources/elements/em-chat-channel-members-show","resources/elements/em-chat-channel-link-mgr","resources/elements/em-chat-system-link-mgr","resources/elements/em-chat-msg-popup","resources/elements/em-chat-member-popup","resources/elements/em-chat-attach","resources/elements/em-chat-schedule","resources/elements/em-chat-schedule-edit","resources/elements/em-chat-schedule-remind","resources/elements/em-chat-share","resources/elements/em-blog-write","resources/elements/em-blog-left-sidebar","resources/elements/em-blog-right-sidebar","resources/elements/em-blog-content","resources/elements/em-blog-top-menu","resources/elements/em-blog-share","resources/elements/em-blog-comment","resources/elements/em-blog-save","resources/elements/em-blog-space-create","resources/elements/em-blog-space-edit","resources/elements/em-blog-space-update","resources/elements/em-blog-history","resources/elements/em-blog-history-view","resources/elements/em-blog-history-diff","resources/elements/em-blog-comment-popup","resources/elements/em-blog-space-auth","resources/elements/em-user-avatar","resources/elements/em-user-edit","resources/elements/em-blog-comment-share"])}Object.defineProperty(e,"__esModule",{value:!0}),e.configure=t}),define("test/test-lifecycle",["exports","aurelia-framework","aurelia-event-aggregator"],function(e,t,n){"use strict";function i(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.TestLifeCycle=void 0;var o,s,l,c;e.TestLifeCycle=(c=l=function(){function e(t){r(this,e),i(this,"prop",s,this),this.eventAggregator=t,console.log("constructor")}return e.prototype.created=function(e){console.log("created")},e.prototype.bind=function(e){console.log("bind")},e.prototype.unbind=function(){console.log("unbind")},e.prototype.attached=function(){console.log("attached")},e.prototype.detached=function(){console.log("detached")},e.prototype.canActivate=function(e,t,n){console.log("canActivate")},e.prototype.activate=function(e,t,n){console.log("activate")},e.prototype.canDeactivate=function(){console.log("canDeactivate")},e.prototype.deactivate=function(){console.log("deactivate")},e}(),l.inject=[n.EventAggregator],o=c,s=a(o.prototype,"prop",[t.bindable],{enumerable:!0,initializer:function(){return null}}),o)}),define("user/user-login",["exports"],function(e){"use strict";function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});e.UserLogin=function(){function e(){t(this,e),this.username="",this.password=""}return e.prototype.attached=function(){$(this.rememberMeRef).checkbox()},e.prototype.kdHandler=function(e){return 13===e.keyCode&&this.loginHandler(),!0},e.prototype.loginHandler=function(){var e=this,t=$(this.rememberMeRef).checkbox("is checked")?"on":"";return $.post("/admin/signin",{username:this.username,password:this.password,"remember-me":t}).done(function(){localStorage&&localStorage.setItem(nsCons.KEY_LOGIN_USERNAME,e.username);var t=utils.urlQuery("redirect");if(t)window.location=decodeURIComponent(t);else{var n=null;localStorage&&(n=localStorage.getItem(nsCons.KEY_REMEMBER_LAST_CHAT_TO)),n?window.location=wurl("path")+("#/chat/"+n):window.location=wurl("path")+("#/chat/@"+e.username)}}).fail(function(e,t,n){401==e.status?toastr.error("用户名密码不正确!"):0!=e.status&&toastr.error("网络连接错误!")}),!0},e}()}),define("user/user-pwd-reset",["exports"],function(e){"use strict";function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});e.UserPwdReset=function(){function e(){t(this,e),this.mail="",this.pwd="",this.isReq=!1,this.token=utils.urlQuery("id")}return e.prototype.resetPwdHandler=function(){var e=this;return $(this.fm).form("is valid")?(this.isReq=!0,void http.fetch("/free/user/pwd/reset",{method:"post",body:json({mail:this.mail,baseUrl:utils.getBaseUrl(),path:wurl("path")})}).then(function(t){t.ok&&t.json().then(function(t){t.success?(toastr.success("重置密码邮件链接发送成功!"),_.delay(function(){window.location="/admin/login"},2e3)):(toastr.error(t.data,"重置密码邮件链接发送失败!"),e.isReq=!1)})})):void toastr.error("邮件地址输入不合法!")},e.prototype.newPwdHandler=function(){var e=this;return $(this.fm2).form("is valid")?(this.isReq=!0,void http.fetch("/free/user/pwd/new",{method:"post",body:json({token:this.token,pwd:this.pwd})}).then(function(t){t.ok&&t.json().then(function(t){t.success?(toastr.success("重置密码成功!"),_.delay(function(){window.location="/admin/login"},2e3)):(toastr.error(t.data,"重置密码失败!"),e.isReq=!1)})})):void toastr.error("新密码输入不合法!")},e.prototype.attached=function(){$(this.fm).form({on:"blur",inline:!0,fields:{mail:["empty","email"]}}),$(this.fm2).form({on:"blur",inline:!0,fields:{mail:["empty","minLength[8]"]}})},e}()}),define("user/user-register",["exports"],function(e){"use strict";function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});e.ViewModel=function(){function e(){t(this,e),this.header="账户激活页面"}return e.prototype.activate=function(e,t,n){var i=this;e.id&&(this.token=e.id,this.isReq=!0,this.header="账户激活中,请稍后...!",http.fetch("/free/user/register/activate",{method:"post",body:json({ -token:this.token})}).then(function(e){e.ok&&(e.json().then(function(e){e.success?i.header="账户激活成功,请返回登录页面登录!":(i.header="账户激活失败!",toastr.error(e.data,"账户激活失败!"))}),i.isReq=!1)}))},e.prototype.attached=function(){$(this.fm).form({on:"blur",inline:!0,fields:{username:{identifier:"username",rules:[{type:"empty"},{type:"minLength[3]"},{type:"regExp",value:/^[a-z]+[a-z0-9\.\-_]*[a-z0-9]+$/,prompt:"小写字母数字.-_组合,字母开头,字母数字结尾"}]},pwd:{identifier:"pwd",rules:[{type:"empty"},{type:"minLength[8]"}]},name:{identifier:"name",rules:[{type:"empty"},{type:"maxLength[20]"}]},mail:{identifier:"mail",rules:[{type:"empty"},{type:"email"}]}}})},e.prototype.okHandler=function(){var e=this;return $(this.fm).form("is valid")?(this.isReq=!0,void http.fetch("/free/user/register",{method:"post",body:json({username:this.username,pwd:this.pwd,name:this.name,mail:this.mail,baseUrl:utils.getBaseUrl(),path:wurl("path")})}).then(function(t){t.ok&&t.json().then(function(t){t.success?(toastr.success("注册成功,请通过接收到的激活邮件激活账户!"),_.delay(function(){window.location="/admin/login"},2e3)):(toastr.error(t.data,"注册失败!"),e.isReq=!1)})})):void toastr.error("账户注册信息输入不合法!")},e}()}),define("resources/attributes/attr-attr",["exports","aurelia-framework","aurelia-dependency-injection"],function(e,t,n){"use strict";function i(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.AttrAttr=void 0;var o,s,l,c,d,u;e.AttrAttr=(o=(0,t.customAttribute)("attr"),s=(0,n.inject)(Element),o(l=s((c=function(){function e(t){r(this,e),i(this,"name",d,this),i(this,"value",u,this),this.element=t}return e.prototype.nameChanged=function(e){},e.prototype.valueChanged=function(e){this.value=e,e?$(this.element).attr(this.name,e):$(this.element).removeAttr(this.name)},e.prototype.bind=function(e){this.valueChanged(this.value)},e.prototype.unbind=function(){},e}(),d=a(c.prototype,"name",[t.bindable],{enumerable:!0,initializer:null}),u=a(c.prototype,"value",[t.bindable],{enumerable:!0,initializer:null}),l=c))||l)||l)}),define("resources/attributes/attr-autosize",["exports","aurelia-framework","aurelia-templating"],function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.AttrAutosize=void 0;var r,a,o;e.AttrAutosize=(r=(0,n.customAttribute)("autosize"),a=(0,t.inject)(Element),r(o=a(o=function(){function e(t){i(this,e),this.element=t}return e.prototype.valueChanged=function(e,t){autosize(this.element)},e.prototype.bind=function(e){this.valueChanged(this.value)},e.prototype.unbind=function(){autosize.destroy(this.elements)},e}())||o)||o)}),define("resources/attributes/attr-c2c",["exports","aurelia-framework","clipboard"],function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.AttrC2cCustomAttribute=void 0;var a,o,s,l=i(n);e.AttrC2cCustomAttribute=(a=(0,t.customAttribute)("c2c"),o=(0,t.inject)(Element),a(s=o(s=function(){function e(t){r(this,e),this.element=t,this._init()}return e.prototype._init=function(){var e=this;$(this.element).append(''),this.clipboard=new l.default($(this.element).find("i.copy.icon")[0],{text:function(t){return e.value?e.value:$(e.element).text()}});var t=$(this.element).find("[data-tooltip]").hover(function(){},function(){$(this).attr("data-tooltip","复制到剪贴板!")});this.clipboard.on("success",function(e){t.attr("data-tooltip","复制成功!")}).on("error",function(e){t.attr("data-tooltip","复制失败!")}),$(this.element).hover(function(){(e.value||$(e.element).text())&&t.show()},function(){t.hide()})},e.prototype.unbind=function(){this.clipboard&&this.clipboard.destroy()},e}())||s)||s)}),define("resources/attributes/attr-dimmer",["exports","aurelia-dependency-injection","aurelia-templating"],function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.AttrDimmer=void 0;var r,a,o;e.AttrDimmer=(r=(0,n.customAttribute)("dimmer"),a=(0,t.inject)(Element),r(o=a(o=function(){function e(t){i(this,e),this.element=t,this.$dimmer=$('
    ')}return e.prototype.valueChanged=function(e){this.value?$(this.element).prepend(this.$dimmer):this.$dimmer.remove()},e.prototype.bind=function(e){this.valueChanged(this.value)},e}())||o)||o)}),define("resources/attributes/attr-dropzone",["exports","aurelia-framework","aurelia-templating","aurelia-event-aggregator"],function(e,t,n,i){"use strict";function r(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.AttrDropzone=void 0;var s,l,c,d,u,m,p;e.AttrDropzone=(s=(0,n.customAttribute)("dropzone"),l=(0,t.inject)(Element,i.EventAggregator),s(c=l((d=function(){function e(t,n){var i=this;a(this,e),r(this,"clickable",u,this),r(this,"target",m,this),r(this,"type",p,this),this.element=t,this.eventAggregator=n,this.subscribe=this.eventAggregator.subscribe(nsCons.EVENT_CHAT_MSG_EDIT_UPLOAD,function(e){e.target===i.target&&$(i.element).click()})}return e.prototype.valueChanged=function(e,t){var n=this.target?this.target:this.element,i=this.type?this.type:nsCtx.isAt?"User":"Channel";$(this.element).parent().addClass("tms-dropzone-preview-hidden"),$(this.element).children().andSelf().dropzone({url:"/admin/file/upload",paramName:"file",clickable:!!this.clickable,dictDefaultMessage:"",maxFilesize:10,addRemoveLinks:!0,dictCancelUpload:"取消上传",dictCancelUploadConfirmation:"确定要取消上传吗?",dictFileTooBig:"文件过大({{filesize}}M),最大限制:{{maxFilesize}}M",init:function(){this.on("sending",function(e,t,n){n.append("toType",i),"Blog"!==i&&n.append("toId",nsCtx.chatTo)}),this.on("success",function(e,t){t.success?($.each(t.data,function(e,t){"Image"==t.type?$(n).insertAtCaret("![{name}]({baseURL}{path}{uuidName}) ".replace(/\{name\}/g,t.name).replace(/\{baseURL\}/g,utils.getBaseUrl()+"/").replace(/\{path\}/g,t.path).replace(/\{uuidName\}/g,t.uuidName)):$(n).insertAtCaret("[{name}]({baseURL}{path}{uuidName}) ".replace(/\{name\}/g,t.name).replace(/\{baseURL\}/g,utils.getBaseUrl()+"/").replace(/\{path\}/g,"admin/file/download/").replace(/\{uuidName\}/g,t.id))}),toastr.success("上传成功!")):toastr.error(t.data,"上传失败!")}),this.on("error",function(e,t,n){toastr.error(t,"上传失败!")}),this.on("complete",function(e){this.removeFile(e)})}})},e.prototype.bind=function(e){this.valueChanged(this.value)},e}(),u=o(d.prototype,"clickable",[t.bindable],{enumerable:!0,initializer:null}),m=o(d.prototype,"target",[t.bindable],{enumerable:!0,initializer:null}),p=o(d.prototype,"type",[t.bindable],{enumerable:!0,initializer:null}),c=d))||c)||c)}),define("resources/attributes/attr-modaal",["exports","aurelia-framework","aurelia-templating"],function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.AttrModaalCustomAttribute=void 0;var r,a,o;e.AttrModaalCustomAttribute=(r=(0,n.customAttribute)("modaal"),a=(0,t.inject)(Element),r(o=a(o=function(){function e(t){i(this,e),this.element=t}return e.prototype.valueChanged=function(e,t){var n=this;_.defer(function(){$(n.element).modaal({fullscreen:!0,overlay_close:!1,before_open:function(){ea.publish(nsCons.EVENT_MODAAL_BEFORE_OPEN,{id:e})},after_open:function(){ea.publish(nsCons.EVENT_MODAAL_AFTER_OPEN,{id:e})},before_close:function(){ea.publish(nsCons.EVENT_MODAAL_BEFORE_CLOSE,{id:e})},after_close:function(){ea.publish(nsCons.EVENT_MODAAL_AFTER_CLOSE,{id:e})}})})},e}())||o)||o)}),define("resources/attributes/attr-pastable",["exports","aurelia-framework","aurelia-templating","common/common-plugin","common/common-paste"],function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.AttrPastable=void 0;var r,a,o;e.AttrPastable=(r=(0,n.customAttribute)("pastable"),a=(0,t.inject)(Element),r(o=a(o=function(){function e(t){i(this,e),this.element=t}return e.prototype.valueChanged=function(e,t){var n=this;$(this.element).pastableTextarea().on("pasteImage",function(e,t){$.post("/admin/file/base64",{dataURL:t.dataURL,type:t.blob.type,toType:nsCtx.isAt?"User":"Channel",toId:nsCtx.chatTo},function(e,t,i){e.success&&$(n.element).insertAtCaret("![{name}]({baseURL}{path}{uuidName})".replace(/\{name\}/g,e.data.name).replace(/\{baseURL\}/g,utils.getBaseUrl()+"/").replace(/\{path\}/g,e.data.path).replace(/\{uuidName\}/g,e.data.uuidName))})}).on("pasteImageError",function(e,t){toastr.error(t.message,"剪贴板粘贴图片错误!")})},e.prototype.bind=function(e){this.valueChanged(this.value)},e}())||o)||o)}),define("resources/attributes/attr-scrollbar",["exports","aurelia-framework","aurelia-templating","common/common-scrollbar"],function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.AttrScrollbarCustomAttribute=void 0;var r,a,o;e.AttrScrollbarCustomAttribute=(r=(0,n.customAttribute)("scrollbar"),a=(0,t.inject)(Element),r(o=a(o=function(){function e(t){i(this,e),this.element=t}return e.prototype.valueChanged=function(e,t){var n=this;this.cls=e?e:$(window).width()<768?"scrollbar-macosx":"scrollbar-outer",jQuery(this.element).addClass(this.cls).scrollbar({onScroll:function(e,t){e.scroll==e.maxScroll&&ea.publish(nsCons.EVENT_SCROLLBAR_SCROLL_TO_BOTTOM,{element:n.element,x:t,y:e})}})},e.prototype.unbind=function(){try{jQuery(this.element).removeClass(this.cls).scrollbar("destroy")}catch(e){}},e}())||o)||o)}),define("resources/attributes/attr-swipebox",["exports","aurelia-framework","aurelia-templating","swipebox"],function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.AttrSwipebox=void 0;var r,a,o;e.AttrSwipebox=(r=(0,n.customAttribute)("swipebox"),a=(0,t.inject)(Element),r(o=a(o=function(){function e(t){i(this,e),this.element=t}return e.prototype.valueChanged=function(e,t){var n=this;$(this.element).on("click","img",function(t){t.preventDefault();var i=($(t.target),[]),r=0;$(n.element).find("img").each(function(e,n){i.push({href:$(n).attr("src"),title:$(n).attr("alt")}),t.target==n&&(r=e)}),$.swipebox(i,{useCSS:!0,useSVG:!0,initialIndexOnArray:r,hideCloseButtonOnMobile:!1,removeBarsOnMobile:!0,hideBarsDelay:3e3,videoMaxWidth:1140,beforeOpen:function(){},afterOpen:null,afterClose:function(){},loopAtEnd:!!e})})},e.prototype.bind=function(e){this.valueChanged(this.value)},e}())||o)||o)}),define("resources/attributes/attr-tablesort",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.AttrTablesortCustomAttribute=void 0;var i,r,a;e.AttrTablesortCustomAttribute=(i=(0,t.customAttribute)("tablesort"),r=(0,t.inject)(Element),i(a=r(a=function(){function e(t){n(this,e),this.element=t}return e.prototype.valueChanged=function(e,t){},e.prototype._init=function(){$(this.element).is("table")?$(this.element).addClass("sortable").tablesort():console.warn("tablesort element is not table tag!")},e.prototype.bind=function(){this._init()},e}())||a)||a)}),define("resources/attributes/attr-task",["exports","aurelia-dependency-injection","aurelia-templating"],function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.AttrTask=void 0;var r,a,o;e.AttrTask=(r=(0,n.customAttribute)("task"),a=(0,t.inject)(Element),r(o=a(o=function(){function e(t){i(this,e),this.task=null,this.bindingCtx=null,this.element=t}return e.prototype.valueChanged=function(e){this.task=e,_.isFunction(this.task)&&_.bind(this.task,this.bindingCtx,this.element)()},e.prototype.bind=function(e){this.bindingCtx=e,this.valueChanged(this.value)},e.prototype.unbind=function(){this.element=null,this.task=null,this.bindingCtx=null},e}())||o)||o)}),define("resources/attributes/attr-textcomplete",["exports","aurelia-framework","aurelia-templating","common/common-tips","common/common-emoji"],function(e,t,n,i,r){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.AttrTextcompleteCustomAttribute=void 0;var s,l,c,d=a(i),u=a(r);e.AttrTextcompleteCustomAttribute=(s=(0,n.customAttribute)("textcomplete"),l=(0,t.inject)(Element),s(c=l(c=function(){function e(t){o(this,e),this.element=t,this.initHotkeys()}return e.prototype.tipsActionHandler=function(e){if("/upload"==e)$(this.element).next(".tms-edit-actions").find("button > .upload.icon").click();else if("/shortcuts"==e)ea.publish(nsCons.EVENT_SHOW_HOTKEYS_MODAL,{});else{if("search"!=e)return!0;_.delay(function(){utils.openNewWin(nsCons.STR_EMOJI_SEARCH_URL)},200)}return!1},e.prototype.valueChanged=function(){var e=this;this.value?(this.members=this.value,$(this.element).textcomplete([{match:/(|\b)(\/.*)$/,search:function(e,t){var n=_.keys(d.default);t($.map(n,function(t){return 0===t.indexOf(e)?t:null}))},template:function(e,t){return d.default[e].label},replace:function(t){return e.tipsActionHandler(t)?(_.defer(function(){autosize.update(e.element)}),e.setCaretPosition(d.default[t].ch2?d.default[t].ch2:d.default[t].ch),"$1"+d.default[t].value):""}},{match:/(^|\s)@(\w*)$/,search:function(t,n){n($.map(e.members,function(e){return e.enabled&&e.username.indexOf(t)>=0?e.username:null}))},template:function(t,n){var i=_.find(e.members,{username:t});return i.name+" - "+i.mails+" ("+i.username+")"},replace:function(e){return"$1{~"+e+"}"}},{match:/(^|\s):([\+\-\w]*)$/,search:function(e,t){t($.map(u.default,function(t){return _.some(t.split("_"),function(t){return 0===t.indexOf(e)})?t:null}))},template:function(e,t){if("search"==e)return"表情查找 - :search";var n=":"+e+":";return emojify.replace(n)+" - "+n},replace:function(t){return e.tipsActionHandler(t)?"$1:"+t+": ":""}}],{appendTo:$(this.element).prev(".textcomplete-container").find(".append-to"),maxCount:nsCons.NUM_TEXT_COMPLETE_MAX_COUNT})):this.unbind()},e.prototype.setCaretPosition=function(e){var t=this;e&&_.delay(function(){var n=utils.getCursortPosition(t.element);utils.setCaretPosition(t.element,n-e)},100)},e.prototype.initHotkeys=function(){var e=this;_.each(_.filter(_.values(d.default),"key"),function(t){$(e.element).bind("keydown",t.key,function(n){n.preventDefault(),$(e.element).insertAtCaret(t.value);var i=utils.getCursortPosition(e.element),r=t.ch2?t.ch2:t.ch;r&&utils.setCaretPosition(e.element,i-r),_.defer(function(){autosize.update(e.element)})})})},e.prototype.unbind=function(){try{$(this.element).textcomplete("destroy")}catch(e){}},e}())||c)||c)}),define("resources/attributes/attr-ui-checkbox",["exports","aurelia-framework","aurelia-templating"],function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.AttrUiCheckboxCustomAttribute=void 0;var r,a,o;e.AttrUiCheckboxCustomAttribute=(r=(0,n.customAttribute)("ui-checkbox"),a=(0,t.inject)(Element),r(o=a(o=function(){function e(t){i(this,e),this.element=t}return e.prototype.valueChanged=function(e,t){$(this.element).checkbox()},e}())||o)||o)}),define("resources/attributes/attr-ui-dropdown-action",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.AttrUiDropdownActionCustomAttribute=void 0;var i,r,a;e.AttrUiDropdownActionCustomAttribute=(i=(0,t.customAttribute)("ui-dropdown-action"),r=(0,t.inject)(Element),i(a=r(a=function(){function e(t){n(this,e),this.element=t}return e.prototype.valueChanged=function(e,t){},e.prototype._init=function(e){var t=this;_.defer(function(){$(t.element).dropdown({action:"hide",context:e})})},e.prototype.bind=function(){this._init(this.value?this.value:window)},e}())||a)||a)}),define("resources/attributes/attr-ui-dropdown-hover",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.AttrUiDropdownHoverCustomAttribute=void 0;var i,r,a;e.AttrUiDropdownHoverCustomAttribute=(i=(0,t.customAttribute)("ui-dropdown-hover"),r=(0,t.inject)(Element),i(a=r(a=function(){function e(t){n(this,e),this.element=t}return e.prototype.valueChanged=function(e,t){},e.prototype._init=function(e){var t=this;_.defer(function(){$(t.element).dropdown({on:"hover",action:e})})},e.prototype.bind=function(){this._init(this.value?this.value:"hide")},e}())||a)||a)}),define("resources/attributes/attr-ui-dropdown",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.AttrUiDropdownCustomAttribute=void 0;var i,r,a;e.AttrUiDropdownCustomAttribute=(i=(0,t.customAttribute)("ui-dropdown"),r=(0,t.inject)(Element),i(a=r(a=function(){function e(t){n(this,e),this.element=t}return e.prototype.valueChanged=function(e,t){},e.prototype._init=function(e){var t=this;_.defer(function(){$(t.element).dropdown({action:e})})},e.prototype.bind=function(){this._init(this.value?this.value:"hide")},e}())||a)||a)}),define("resources/attributes/attr-ui-popup",["exports","aurelia-framework","aurelia-templating"],function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.AttrUiPopupCustomAttribute=void 0;var r,a,o;e.AttrUiPopupCustomAttribute=(r=(0,n.customAttribute)("ui-popup"),a=(0,t.inject)(Element),r(o=a(o=function(){function e(t){i(this,e),this.element=t}return e.prototype.valueChanged=function(e,t){var n=this;_.defer(function(){$(n.element).popup({on:"click",inline:!0,silent:!0,position:e?e:"bottom right",jitter:300,delay:{show:300,hide:300},onShow:function(){},onVisible:function(){}})})},e}())||o)||o)}),define("resources/attributes/attr-ui-tab",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.AttrUiTabCustomAttribute=void 0;var i,r,a;e.AttrUiTabCustomAttribute=(i=(0,t.customAttribute)("ui-tab"),r=(0,t.inject)(Element),i(a=r(a=function(){function e(t){n(this,e),this.element=t}return e.prototype.valueChanged=function(e,t){},e.prototype._init=function(){var e=this;_.defer(function(){$(e.element).find(".item").tab()})},e.prototype.bind=function(){this._init()},e}())||a)||a)}),define("resources/binding-behaviors/bb-key",["exports"],function(e){"use strict";function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e){return e&&e.ctrlKey==this.keyState.ctrl&&e.altKey==this.keyState.alt&&e.shiftKey==this.keyState.shift&&e.keyCode==this.keyState.keyCode&&this.originalMethod(e),!0}Object.defineProperty(e,"__esModule",{value:!0});var i={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,backspace:8,delete:46};e.KeyBindingBehavior=function(){function e(){t(this,e)}return e.prototype.bind=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:13,a=arguments[3],o="updateTarget";e.callSource?o="callSource":e.updateSource&&e.mode===bindingMode.twoWay&&(o="updateSource"),e.originalMethod=e[o],e.originalMethod.originalName=o,e[o]=n;var s=_.isInteger(r)?r:1===r.length?r.charCodeAt(0):i[r];_.isUndefined(s)&&console.warn("Unmapping keyCode for KeyBindingBehavior!"),e.keyState={ctrl:_.includes(a,"ctrl"),alt:_.includes(a,"alt"),shift:_.includes(a,"shift"),keyCode:s}},e.prototype.unbind=function(e,t){e[e.originalMethod.originalName]=e.originalMethod,e.originalMethod=null},e}()}),define("resources/elements/em-blog-comment-popup",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.EmBlogCommentPopup=void 0;var i;e.EmBlogCommentPopup=(0,t.containerless)(i=function(){function e(){var t=this;n(this,e),this.subscribe=ea.subscribe(nsCons.EVENT_BLOG_COMMENT_POPUP_SHOW,function(e){t.id=e.id,t.target=e.target,$(t.target).popup({popup:t.popup,hoverable:!0,inline:!1,movePopup:!1,silent:!0,position:"bottom left",jitter:300,prefer:"opposite",delay:{show:300,hide:300},onShow:function(){$.get("/admin/blog/comment/get",{cid:t.id},function(e){e.success?t.comment=e.data:toastr.error(e.data,"加载失败!")})}}).popup("show")})}return e.prototype.unbind=function(){this.subscribe.dispose()},e}())||i}),define("resources/elements/em-blog-comment-share",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmBlogCommentShare=void 0;var a,o,s,l,c;e.EmBlogCommentShare=(0,t.containerless)((o=function(){function e(){i(this,e),this.shares=[],this.desc="",n(this,"blog",s,this),n(this,"comment",l,this),n(this,"loginUser",c,this),this.basePath=utils.getBasePath()}return e.prototype.attached=function(){var e=this;$(this.searchRef).search({minCharacters:2,cache:!1,selectFirstResult:!0,showNoResults:!1,onSelect:function(t,n){t.item._id=_.uniqueId("share-item-"),t.item._type=t.item.username?"user":"channel",e.shares.push(t.item),_.defer(function(){$(e.inputSearchRef).val("")})},apiSettings:{onResponse:function(t){var n={results:[]};return $.each(t.data.users,function(t,i){_.find(_.filter(e.shares,function(e){return"user"==e._type}),{username:i.username})||n.results.push({item:i,title:' '+i.name+" ("+i.username+")"})}),$.each(t.data.channels,function(t,i){_.find(_.filter(e.shares,function(e){return"channel"==e._type}),{name:i.name})||n.results.push({item:i,title:' '+i.title+" ("+i.name+")"})}),n},url:"/admin/blog/share/to/search?search={query}"}}),$(this.shareRef).popup({on:"click",inline:!0,silent:!0,position:"bottom right",jitter:300,delay:{show:300,hide:300},onVisible:function(){$(e.inputSearchRef).focus()}})},e.prototype.shareSearchKeyupHandler=function(e){if(13===e.keyCode&&!$(this.searchRef).search("is visible")){var t=$(this.inputSearchRef).val();utils.isMail(t)&&(_.find(_.filter(this.shares,function(e){return"mail"==e._type}),{mail:t})||(this.shares.push({_id:_.uniqueId("share-item-"),_type:"mail",mail:t}),$(this.inputSearchRef).val("")))}},e.prototype.show=function(){$(this.shareRef).popup("show")},e.prototype.removeShareHandler=function(e){this.shares=_.reject(this.shares,{_id:e._id})},e.prototype.cancelHandler=function(){this._reset()},e.prototype._reset=function(){this.shares=[],this.desc="",$(this.inputSearchRef).val(""),$(this.shareRef).popup("hide")},e.prototype.shareHandler=function(){var e=this;return 0===this.shares.length?void toastr.error("请先指定博文评论分享用户或者频道或者邮箱!"):void(this.ajaxS=$.post("/admin/blog/comment/share",{basePath:utils.getBasePath(),href:this.basePath+"#/blog/"+this.blog.id+"?cid="+this.comment.id,id:this.comment.id,desc:this.desc,html:utils.md2html(this.comment.content),users:_.chain(this.shares).filter(function(e){return"user"==e._type}).map("username").join().value(),channels:_.chain(this.shares).filter(function(e){return"channel"==e._type}).map("name").join().value(),mails:_.chain(this.shares).filter(function(e){return"mail"==e._type}).map("mail").join().value()},function(t,n,i){t.success?(e._reset(),toastr.success("博文评论分享成功!")):toastr.error(t.data,"博文评论分享失败!")}))},e}(),s=r(o.prototype,"blog",[t.bindable],{enumerable:!0,initializer:null}),l=r(o.prototype,"comment",[t.bindable],{enumerable:!0,initializer:null}),c=r(o.prototype,"loginUser",[t.bindable],{enumerable:!0,initializer:null}),a=o))||a}),define("resources/elements/em-blog-comment",["exports","aurelia-framework","simplemde","dropzone","common/common-emoji"],function(e,t,n,i,r){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmBlogComment=void 0;var c,d,u,m=a(n),p=(a(i),a(r));e.EmBlogComment=(0,t.containerless)((d=function(){function e(){var t=this;s(this,e),this.comments=[],this.baseUrl=utils.getUrl(),this.basePath=utils.getBasePath(),this.offset=0,this.isSuper=nsCtx.isSuper,this.loginUser=nsCtx.loginUser,this.users=nsCtx.users,o(this,"blog",u,this),this.subscribe=ea.subscribe(nsCons.EVENT_BLOG_COMMENT_MSG_INSERT,function(e){t.insertContent(""+e.content),t._scrollTo("b")})}return e.prototype.blogChanged=function(e,t){this._refresh()},e.prototype.unbind=function(){this.subscribe.dispose()},e.prototype._refresh=function(){var e=this;this.blog&&$.get("/admin/blog/comment/query",{id:this.blog.id,page:0,size:1e3},function(t){t.success?!function(){e.comments=t.data.content;var n=utils.urlQuery("cid");n&&_.defer(function(){e.scrollToAfterImgLoaded(n)}),ea.publish(nsCons.EVENT_BLOG_COMMENT_CHANGED,{action:"query",comments:e.comments})}():toastr.error(t.data)})},e.prototype.attached=function(){var e=this;this._init(),$(".em-blog-comment .comments").on("mouseenter",'.markdown-body a[href*="#/blog/"]:not(.pp-not)',function(e){e.preventDefault();var t=$(e.currentTarget),n=utils.urlQuery("cid",t.attr("href"));n&&ea.publish(nsCons.EVENT_BLOG_COMMENT_POPUP_SHOW,{id:n,target:e.currentTarget})}),$(".em-blog-comment .comments").on("dblclick",".comment",function(t){if(t.ctrlKey){var n=$(t.currentTarget).attr("data-id"),i=$(t.currentTarget).find(".content > textarea"),r=_.find(e.comments,{id:+n});(e.isSuper||r.creator.username==e.loginUser.username)&&e.editHandler(r,i)}}),$(".em-blog-comment .comments").on("click",".comment",function(t){e.focusedComment=$(t.currentTarget)}),this.initHotkeys()},e.prototype.initHotkeys=function(){var e=this;$(document).bind("keydown","r",function(t){t.preventDefault(),$(".em-blog-content").scrollTo("max",120,{offset:0}),e.simplemde.codemirror.focus()}).bind("keydown","alt+up",function(t){t.preventDefault(),$(".em-blog-content").scrollTo(e.getScrollTargetComment(!0),120,{offset:0})}).bind("keydown","alt+down",function(t){t.preventDefault(),$(".em-blog-content").scrollTo(e.getScrollTargetComment(),120,{offset:0})})},e.prototype.getScrollTargetComment=function(e){if(e)if(this.focusedComment&&1===this.focusedComment.size()){var t=this.focusedComment.find("> a.em-user-avatar");if(utils.isElementInViewport(t)){var n=this.focusedComment.prev(".comment");1===n.size()&&(this.focusedComment=n)}}else this.focusedComment=$(this.blogCommentsRef).children(".comment:first");else if(this.focusedComment&&1===this.focusedComment.size()){var i=this.focusedComment.next(".comment");1===i.size()&&(this.focusedComment=i)}else this.focusedComment=$(this.blogCommentsRef).children(".comment:last");return this.focusedComment},e.prototype._init=function(){var e=this;this.simplemde=new m.default({element:this.commentRef,spellChecker:!1,status:!1,toolbar:[{name:"bold",action:m.default.toggleBold,className:"fa fa-bold",title:"粗体"},{name:"italic",action:m.default.toggleItalic,className:"fa fa-italic",title:"斜体"},{name:"strikethrough",action:m.default.toggleStrikethrough,className:"fa fa-strikethrough",title:"删除线"},{name:"heading",action:m.default.toggleHeadingSmaller,className:"fa fa-header",title:"标题"},{name:"heading-smaller",action:m.default.toggleHeadingSmaller,className:"fa fa-header fa-header-x fa-header-smaller",title:"变小标题"},{name:"heading-bigger",action:m.default.toggleHeadingBigger,className:"fa fa-header fa-header-x fa-header-bigger",title:"变大标题"},"|",{name:"code",action:m.default.toggleCodeBlock,className:"fa fa-code",title:"代码"},{name:"quote",action:m.default.toggleBlockquote,className:"fa fa-quote-left",title:"引用"},{name:"unordered-list",action:m.default.toggleUnorderedList,className:"fa fa-list-ul",title:"无序列表"},{name:"ordered-list",action:m.default.toggleOrderedList,className:"fa fa-list-ol",title:"有序列表"},{name:"tasks",action:function(t){e.insertContent("- [ ] 未完成任务\n- [x] 已完成任务")},className:"fa fa-check-square-o ",title:"任务列表"},{name:"details",action:function(t){e.insertContent("
    \n标题\n

    详情内容

    \n
    ")},className:"fa fa-play ",title:"折叠详情"},"|",{name:"link",action:m.default.drawLink,className:"fa fa-link",title:"创建链接"},{name:"image",action:m.default.drawImage,className:"fa fa-picture-o",title:"插入图片"},{name:"table",action:m.default.drawTable,className:"fa fa-table",title:"插入表格"},{name:"horizontal-rule",action:m.default.drawHorizontalRule,className:"fa fa-minus",title:"插入水平分割线"},"|",{name:"upload",action:function(e){},className:"fa fa-upload",title:"上传文件"},"|",{name:"preview",action:m.default.togglePreview,className:"fa fa-eye no-disable",title:"切换预览"},{name:"guide",action:"https://simplemde.com/markdown-guide",className:"fa fa-question-circle", -title:"Markdown指南"}],insertTexts:{table:["","\n\n| 列1 | 列2 | 列3 |\n| ------ | ------ | ------ |\n| 文本 | 文本 | 文本 |\n\n"]},previewRender:function(e,t){return emojify&&(e=emojify.replace(e)),marked(utils.preParse(e))}}),this.simplemde.codemirror.on("keyup",function(t,n){n.ctrlKey&&13==n.keyCode?e.addHandler():27==n.keyCode&&e.simplemde.value("")}),this.$chatMsgInputRef=$(this.markdownRef).find(".CodeMirror textarea"),0===this.$chatMsgInputRef.size()&&(this.$chatMsgInputRef=$(this.markdownRef).find('.CodeMirror [contenteditable="true"]')),this.initPaste(),this.initTextcomplete(),this.initUploadDropzone($(".CodeMirror-wrap",this.markdownRef),function(){return e.$chatMsgInputRef},!1),this.initUploadDropzone($(".editor-toolbar .fa.fa-upload",this.markdownRef),function(){return e.$chatMsgInputRef},!0)},e.prototype.initTextcomplete=function(){var e=this;$(this.$chatMsgInputRef).textcomplete([{match:/(^|\s)@(\w*)$/,search:function(e,t){t($.map(nsCtx.users,function(t){return t.enabled&&t.username.indexOf(e)>=0?t.username:null}))},template:function(e,t){var n=_.find(nsCtx.users,{username:e});return n.name+" - "+n.mails+" ("+n.username+")"},replace:function(e){return"$1{~"+e+"}"}},{match:/(^|\s):([\+\-\w]*)$/,search:function(e,t){t($.map(p.default,function(t){return _.some(t.split("_"),function(t){return 0===t.indexOf(e)})?t:null}))},template:function(e,t){if("search"==e)return"表情查找 - :search";var n=":"+e+":";return emojify.replace(n)+" - "+n},replace:function(t){return e.tipsActionHandler(t)?"$1:"+t+": ":""}}],{appendTo:".tms-blog-comment-status-bar"}),this.simplemde.codemirror.on("keydown",function(t,n){_.includes([13,38,40],n.keyCode)&&e.isTipsShow()&&n.preventDefault()})},e.prototype.isTipsShow=function(){return 1===$(".tms-blog-comment-status-bar").find(".textcomplete-dropdown:visible").size()},e.prototype.tipsActionHandler=function(e){return"search"!=e||(_.delay(function(){utils.openNewWin(nsCons.STR_EMOJI_SEARCH_URL)},200),!1)},e.prototype.unbind=function(){this._reset()},e.prototype._reset=function(){this.blog=null,this.simplemde.value(""),this.simplemde.toTextArea(),this.simplemde=null},e.prototype.insertContent=function(e,t){try{var n=t?t.codemirror:this.simplemde.codemirror,i=n.getCursor();i&&(n.replaceRange(e,i,i),n.focus())}catch(e){console.log(e)}},e.prototype.replyHandler=function(e){this.insertContent("[[回复评论#"+e.id+"]("+this.baseUrl+"?cid="+e.id+"){~"+e.creator.username+"}]\n\n"),this._scrollTo("b")},e.prototype.removeHandler=function(e){var t=this;$.post("/admin/blog/comment/remove",{cid:e.id},function(n,i,r){n.success?(t.comments=_.reject(t.comments,{id:e.id}),toastr.success("博文评论移除成功!"),ea.publish(nsCons.EVENT_BLOG_COMMENT_CHANGED,{action:"removed",comments:t.comments})):toastr.error(n.data,"博文评论移除失败!")})},e.prototype.addHandler=function(){var e=this,t=this.simplemde.value();if(!$.trim(t))return this.simplemde.value(""),void toastr.error("评论内容不能为空!");if(!this.sending){this.sending=!0;var n=utils.md2html(t),i=[nsCtx.memberAll].concat(window.tmsUsers?tmsUsers:[]);$.post("/admin/blog/comment/create",{basePath:utils.getBasePath(),id:this.blog.id,users:utils.parseUsernames(t,i).join(","),content:t,contentHtml:n},function(t,n,i){t.success?(e.comments=[].concat(e.comments,[t.data]),e.simplemde.value(""),toastr.success("博文评论提交成功!"),e.scrollToAfterImgLoaded("b"),ea.publish(nsCons.EVENT_BLOG_COMMENT_ADDED,{}),ea.publish(nsCons.EVENT_BLOG_COMMENT_CHANGED,{action:"created",comments:e.comments})):toastr.error(t.data,"博文评论提交失败!")}).always(function(){e.sending=!1})}},e.prototype.initPaste=function(){var e=this,t=void 0;t=this.$chatMsgInputRef.is("textarea")?$(this.$chatMsgInputRef).pastableTextarea():$(this.$chatMsgInputRef).pastableContenteditable(),t&&t.on("pasteImage",function(t,n){$.post("/admin/file/base64",{dataURL:n.dataURL,type:n.blob.type,toType:"Blog"},function(t,n,i){t.success&&e.insertContent("![{name}]({baseURL}{path}{uuidName})".replace(/\{name\}/g,t.data.name).replace(/\{baseURL\}/g,utils.getBaseUrl()+"/").replace(/\{path\}/g,t.data.path).replace(/\{uuidName\}/g,t.data.uuidName))})}).on("pasteImageError",function(e,t){toastr.error(t.message,"剪贴板粘贴图片错误!")})},e.prototype.initUploadDropzone=function(e,t,n){var i=this;$(e).dropzone({url:"/admin/file/upload",paramName:"file",clickable:!!n,dictDefaultMessage:"",maxFilesize:10,addRemoveLinks:!0,previewsContainer:".em-blog-comment .dropzone-previews",previewTemplate:$(".em-blog-comment .preview-template")[0].innerHTML,dictCancelUpload:"取消上传",dictCancelUploadConfirmation:"确定要取消上传吗?",dictFileTooBig:"文件过大({{filesize}}M),最大限制:{{maxFilesize}}M",init:function(){this.on("sending",function(e,n,i){t()?i.append("toType","Blog"):this.removeAllFiles(!0)}),this.on("success",function(e,t){t.success?($.each(t.data,function(e,t){"Image"==t.type?i.insertContent("![{name}]({baseURL}{path}{uuidName}) ".replace(/\{name\}/g,t.name).replace(/\{baseURL\}/g,utils.getBaseUrl()+"/").replace(/\{path\}/g,t.path).replace(/\{uuidName\}/g,t.uuidName)):i.insertContent("[{name}]({baseURL}{path}{uuidName}) ".replace(/\{name\}/g,t.name).replace(/\{baseURL\}/g,utils.getBaseUrl()+"/").replace(/\{path\}/g,"admin/file/download/").replace(/\{uuidName\}/g,t.id))}),toastr.success("上传成功!")):toastr.error(t.data,"上传失败!")}),this.on("error",function(e,t,n){toastr.error(t,"上传失败!")}),this.on("complete",function(e){this.removeFile(e)})}})},e.prototype.scrollToAfterImgLoaded=function(e){var t=this;_.defer(function(){new ImagesLoaded($(".em-blog-content")[0]).always(function(){t._scrollTo(e)}),t._scrollTo(e)})},e.prototype._scrollTo=function(e){"b"==e?$(".em-blog-content").scrollTo("max"):"t"==e?$(".em-blog-content").scrollTo(0):_.some(this.comments,{id:+e})?($(".em-blog-content").scrollTo('.comment[data-id="'+e+'"]',{offset:this.offset}),$(".em-blog-content").find(".comment[data-id]").removeClass("active"),$(".em-blog-content").find(".comment[data-id="+e+"]").addClass("active")):($(".em-blog-content").scrollTo("max"),toastr.warning("博文评论["+e+"]不存在,可能已经被删除!"))},e.prototype.editHandler=function(e,t){$.get("/admin/blog/comment/get",{cid:e.id},function(n){n.success?(e.version!=n.data.version&&_.extend(e,n.data),e.isEditing=!0,e.contentOld=e.content,_.defer(function(){$(t).focus().select(),autosize.update(t)})):toastr.error(n.data)})},e.prototype.refreshHandler=function(e){$.get("/admin/blog/comment/get",{cid:e.id},function(t){e.version!=t.data.version?(_.extend(e,t.data),toastr.success("刷新同步成功!")):toastr.info("博文评论内容暂无变更!")})},e.prototype.eidtKeydownHandler=function(e,t,n){return!this.sending&&(e.ctrlKey&&13===e.keyCode?(this.editSave(t,n),!1):e.ctrlKey&&85===e.keyCode?($(n).next(".tms-blog-comment-edit-actions").find(".upload").click(),!1):(27===e.keyCode&&this.editCancelHandler(e,t,n),!0))},e.prototype.editOkHandler=function(e,t,n){this.editSave(t,n),t.isEditing=!1},e.prototype.editCancelHandler=function(e,t,n){t.content=t.contentOld,$(n).val(t.content),t.isEditing=!1},e.prototype.editSave=function(e,t){var n=this;this.sending=!0,e.content=$(t).val();var i=utils.md2html(e.content),r=(utils.md2html(e.contentOld),[nsCtx.memberAll].concat(window.tmsUsers?tmsUsers:[]));$.post("/admin/blog/comment/update",{basePath:utils.getBasePath(),id:this.blog.id,cid:e.id,version:e.version,users:utils.parseUsernames(e.content,r).join(","),content:e.content,contentHtml:i,diff:utils.diffS(e.contentOld,e.content)},function(t,n,i){t.success?(toastr.success("博文评论更新成功!"),e.isEditing=!1,e.version=t.data.version):toastr.error(t.data,"博文评论更新失败!")}).always(function(){n.sending=!1})},e.prototype.isZanDone=function(e){var t=e.voteZan;return!!t&&t.split(",").includes(this.loginUser.username)},e.prototype.rateHandler=function(e){$.post("/admin/blog/comment/vote",{cid:e.id,url:utils.getBasePath(),contentHtml:utils.md2html(e.content),type:this.isZanDone(e)?"Cai":"Zan"},function(t,n,i){t.success?_.extend(e,t.data):toastr.error(t.data,"博文投票失败!")})},e.prototype.gotoTopHandler=function(){$(".em-blog-content").scrollTo(0,120)},e}(),u=l(d.prototype,"blog",[t.bindable],{enumerable:!0,initializer:null}),c=d))||c}),define("resources/elements/em-blog-content",["exports","aurelia-framework","clipboard-js","clipboard"],function(e,t,n,i){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.EmBlogContent=void 0;var o,s=r(n),l=r(i);e.EmBlogContent=(0,t.containerless)(o=function(){function e(){var t=this;a(this,e),this.loginUser=nsCtx.loginUser,this.isSuper=nsCtx.isSuper,this.isAdmin=nsCtx.isAdmin,this.subscribe=ea.subscribe(nsCons.EVENT_BLOG_SWITCH,function(e){t.getBlog(),ea.publish(nsCons.EVENT_BLOG_RIGHT_SIDEBAR_TOGGLE,{isHide:!0})}),this.subscribe2=ea.subscribe(nsCons.EVENT_BLOG_CHANGED,function(e){"updated"==e.action&&(_.extend(t.blog,e.blog),_.defer(function(){return t.catalogHandler(!0)}))}),this.subscribe3=ea.subscribe(nsCons.EVENT_BLOG_COMMENT_ADDED,function(e){t.blogFollower||t.getFollower()}),this.subscribe4=ea.subscribe(nsCons.EVENT_BLOG_COMMENT_CHANGED,function(e){t.comments=e.comments}),this.throttleCreateHandler=_.throttle(function(){t.createHandler()},1e3,{trailing:!1}),this.throttleEditHandler=_.throttle(function(){t.editHandler()},1e3,{trailing:!1}),this.throttleCopyHandler=_.throttle(function(){t.copyHandler()},1e3,{trailing:!1})}return e.prototype.unbind=function(){this.subscribe.dispose(),this.subscribe2.dispose(),this.subscribe3.dispose(),this.subscribe4.dispose()},e.prototype.attached=function(){var e=this;this.getBlog(),new l.default(".em-blog-content .tms-clipboard").on("success",function(e){toastr.success("复制到剪贴板成功!")}).on("error",function(e){toastr.error("复制到剪贴板失败!")}),$(".em-blog-content").on("click","code[data-code]",function(e){e.ctrlKey&&(e.stopImmediatePropagation(),e.preventDefault(),s.default.copy($(e.currentTarget).attr("data-code")).then(function(){toastr.success("复制到剪贴板成功!")},function(e){toastr.error("复制到剪贴板失败!")}))}),$(".em-blog-content").on("click",".pre-code-wrapper",function(e){e.ctrlKey&&(e.stopImmediatePropagation(),e.preventDefault(),s.default.copy($(e.currentTarget).find("i[data-clipboard-text]").attr("data-clipboard-text")).then(function(){toastr.success("复制到剪贴板成功!")},function(e){toastr.error("复制到剪贴板失败!")}))}),$(".em-blog-right-sidebar").on("click",".panel-blog-dir .wiki-dir-item",function(e){e.preventDefault(),$(window).width()<=768&&ea.publish(nsCons.EVENT_BLOG_RIGHT_SIDEBAR_TOGGLE,{isHide:!0}),$(".em-blog-content").scrollTo("#"+$(e.currentTarget).attr("data-id"),200,{offset:0})}),$(this.mkbodyRef).on("dblclick",function(t){t.ctrlKey&&(e.blog.openEdit||e.isSuper||e.blog.creator.username==e.loginUser.username)&&e.editHandler()}),$(".em-blog-content").scroll(_.throttle(function(t){try{var n=$(".em-blog-content")[0].scrollHeight,i=$(".em-blog-content")[0].scrollTop,r=1*i/(n-$(".em-blog-content").outerHeight());e.progressWidth=$(".em-blog-content").outerWidth()*r,e.fixDirItem()}catch(t){e.progressWidth=0}},10)),$(this.feedRef).on("mouseenter",'.event a[href*="#/blog/"]:not(.pp-not)',function(e){e.preventDefault();var t=$(e.currentTarget),n=utils.urlQuery("cid",t.attr("href"));n&&ea.publish(nsCons.EVENT_BLOG_COMMENT_POPUP_SHOW,{id:n,target:e.currentTarget})}),this.initHotkeys()},e.prototype.fixDirItem=function e(){var t=null,n=null;if(_.each(this.dirItemIds,function(e){if(n){if(utils.isElementInViewport($("#"+e))&&!utils.isElementInViewport($("#"+n)))return t=e,!1}else if(utils.isElementInViewport($("#"+e)))return t=e,!1}),t){var e=$(".em-blog-right-sidebar .panel-blog-dir").find('.wiki-dir-item[data-id="'+t+'"]');e&&($(".em-blog-right-sidebar .panel-blog-dir").find(".wiki-dir-item[data-id]").removeClass("active"),e.addClass("active"),$(".em-blog-right-sidebar .scrollbar-macosx.scroll-content.scroll-scrolly_visible").scrollTo(e,10,{offset:-120}))}},e.prototype.initHotkeys=function(){var e=this;try{$(document).bind("keyup","e",function(t){t.preventDefault(),(e.blog.openEdit||e.isSuper||e.blog.creator.username==e.loginUser.username)&&e.throttleEditHandler()}).bind("keyup","c",function(t){t.preventDefault(),e.throttleCreateHandler()}).bind("keydown","d",function(t){t.preventDefault(),e.dir&&e.catalogHandler()}).bind("keydown","s",function(t){t.preventDefault(),e.blogShareVm.show()}).bind("keydown","f",function(t){t.preventDefault(),e.followerHandler()}).bind("keydown","t",function(e){e.preventDefault(),$(".em-blog-content").scrollTo(0,200,{offset:0})}).bind("keydown","b",function(e){e.preventDefault(),$(".em-blog-content").scrollTo("max",200,{offset:0})}).bind("keydown","alt+r",function(t){t.preventDefault(),e.refreshHandler()}).bind("keydown","alt+h",function(t){t.preventDefault(),e.historyHandler()}).bind("keydown","alt+l",function(t){t.preventDefault(),e.authHandler()}).bind("keydown","alt+s",function(t){t.preventDefault(),e.stowHandler()}).bind("keydown","alt+c",function(t){t.preventDefault(),e.throttleCopyHandler()}).bind("keydown","alt+m",function(t){t.preventDefault(),e.updateSpaceHandler()}).bind("keydown","alt+o",function(t){t.preventDefault(),e.openEditHandler()}).bind("keydown","alt+ctrl+d",function(t){t.preventDefault(),e.deleteHandler()})}catch(e){console.log(e)}},e.prototype._dir=function(){var e=this;return this.dir=utils.dir($(this.mkbodyRef),"tms-blog-dir-item-"),this.dirItemIds=[],this.dir&&$(this.dir).find("a.item.wiki-dir-item").each(function(t,n){e.dirItemIds.push($(n).attr("data-id"))}),this.dir},e.prototype.getMyLog=function(){var e=this;$.get("/admin/blog/log/my",function(t){t.success?e.logs=_.reverse(t.data):toastr.error(t.data)})},e.prototype.getBlog=function(){var e=this;return this.progressWidth=0,!nsCtx.blogId||isNaN(new Number(nsCtx.blogId))?(this.blog=null,void this.getMyLog()):(this.getStow(),this.getFollower(),$.get("/admin/blog/get",{id:nsCtx.blogId},function(t){t.success?(e.blog=t.data,ea.publish(nsCons.EVENT_BLOG_VIEW_CHANGED,e.blog),_.defer(function(){return e.catalogHandler(!0)})):toastr.error(t.data,"获取博文失败!")}))},e.prototype.getStow=function(){var e=this;$.get("/admin/blog/stow/get",{id:nsCtx.blogId},function(t){t.success?e.blogStow=t.data:toastr.error(t.data)})},e.prototype.getFollower=function(){var e=this;$.get("/admin/blog/follower/get",{id:nsCtx.blogId},function(t){t.success?e.blogFollower=t.data:toastr.error(t.data)})},e.prototype.editHandler=function(){nsCtx.isModaalOpening||ea.publish(nsCons.EVENT_BLOG_ACTION,{action:"edit",id:this.blog.id})},e.prototype.deleteHandler=function(){var e=this;(this.isSuper||this.blog.creator.username==this.loginUser.username)&&this.emConfirmModal.show({title:"删除确认",content:"确认要删除该博文吗?",onapprove:function(){$.post("/admin/blog/delete",{id:e.blog.id},function(t,n,i){t.success?(toastr.success("删除博文成功!"),ea.publish(nsCons.EVENT_BLOG_CHANGED,{action:"deleted",blog:e.blog}),ea.publish(nsCons.EVENT_APP_ROUTER_NAVIGATE,{to:"#/blog"})):toastr.error(t.data,"删除博文失败!")})}})},e.prototype.createHandler=function(){nsCtx.isModaalOpening||$('a[href="#modaal-blog-write"]').click()},e.prototype.updateSpaceHandler=function(){(this.isSuper||this.blog.creator.username==this.loginUser.username)&&this.blogSpaceUpdateVm.show(this.blog)},e.prototype.updatePrivatedHandler=function(){var e=this;$.post("/admin/blog/privated/update",{id:this.blog.id,privated:!this.blog.privated},function(t,n,i){t.success?(_.extend(e.blog,t.data),ea.publish(nsCons.EVENT_BLOG_CHANGED,{action:"updated",blog:e.blog}),toastr.success("更新博文可见性成功!")):toastr.error(t.data,"更新博文可见性失败!")})},e.prototype.isZanDone=function(){var e=this.blog.voteZan;return!!e&&e.split(",").includes(this.loginUser.username)},e.prototype.rateHandler=function(){var e=this;$.post("/admin/blog/vote",{id:this.blog.id,url:utils.getBasePath(),contentHtml:utils.md2html(this.blog.content),type:this.isZanDone()?"Cai":"Zan"},function(t,n,i){t.success?_.extend(e.blog,t.data):toastr.error(t.data,"博文投票失败!")})},e.prototype.openEditHandler=function(){var e=this;(this.isSuper||this.blog.creator.username==this.loginUser.username)&&$.post("/admin/blog/openEdit",{id:this.blog.id,open:!this.blog.openEdit},function(t,n,i){t.success?(e.blog.openEdit=!e.blog.openEdit,ea.publish(nsCons.EVENT_BLOG_CHANGED,{action:"updated",blog:e.blog}),toastr.success(e.blog.openEdit?"开放协作编辑成功!":"关闭协作编辑成功!")):toastr.error(t.data,"协作编辑操作失败!")})},e.prototype.refreshHandler=function(){var e=this.getBlog();e&&e.done(function(){toastr.success("刷新操作成功!")})},e.prototype.historyHandler=function(){this.blogHistoryVm.show(this.blog)},e.prototype.catalogHandler=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];ea.publish(nsCons.EVENT_BLOG_RIGHT_SIDEBAR_TOGGLE,{justRefresh:e,action:"dir",dir:this._dir()})},e.prototype.authHandler=function(){(this.isSuper||this.blog.creator.username==this.loginUser.username)&&this.blogSpaceAuthVm.show("blog",this.blog)},e.prototype.copyHandler=function(){nsCtx.isModaalOpening||ea.publish(nsCons.EVENT_BLOG_ACTION,{action:"copy",id:this.blog.id})},e.prototype.stowHandler=function(){var e=this;this.blogStow?$.post("/admin/blog/stow/remove",{sid:this.blogStow.id},function(t,n,i){t.success?(ea.publish(nsCons.EVENT_BLOG_STOW_CHANGED,{action:"remove",data:e.blogStow}),e.blogStow=null,toastr.success("删除博文收藏成功!")):toastr.error(t.data)}):$.post("/admin/blog/stow/add",{id:this.blog.id},function(t,n,i){t.success?(e.blogStow=t.data,ea.publish(nsCons.EVENT_BLOG_STOW_CHANGED,{action:"add",data:e.blogStow}),toastr.success("博文收藏成功!")):toastr.error(t.data)})},e.prototype.followerHandler=function(){var e=this;this.blogFollower?$.post("/admin/blog/follower/remove",{fid:this.blogFollower.id},function(t,n,i){t.success?(e.blogFollower=null,toastr.success("取消博文关注成功!")):toastr.error(t.data)}):$.post("/admin/blog/follower/add",{id:this.blog.id},function(t,n,i){t.success?(e.blogFollower=t.data,toastr.success("博文关注成功!")):toastr.error(t.data)})},e.prototype.dimmerHandler=function(){ea.publish(nsCons.EVENT_BLOG_LEFT_SIDEBAR_TOGGLE,{isHide:!0}),ea.publish(nsCons.EVENT_BLOG_RIGHT_SIDEBAR_TOGGLE,{isHide:!0})},e.prototype.commentsHandler=function(){$(".em-blog-content").scrollTo(".em-blog-comment ",120,{offset:-16})},e.prototype.openFeedEventItemHandler=function(e){e.isOpen=!e.isOpen},e.prototype.feedEventItemMouseleaveHandler=function(e){e.isOpen=!1},e.prototype.refreshFeedHandler=function(){this.getMyLog()},e}())||o}),define("resources/elements/em-blog-history-diff",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.EmBlogHistoryDiff=void 0;var i;e.EmBlogHistoryDiff=(0,t.containerless)(i=function(){function e(){n(this,e)}return e.prototype.showHandler=function(){},e.prototype.approveHandler=function(){},e.prototype.show=function(e,t,n,i){this.f=e,this.s=t,this.fIndex=n,this.sIndex=i,this.diffHtml=utils.diffS(t.content,e.content),this.emModal.show({hideOnApprove:!0,autoDimmer:!1})},e}())||i}),define("resources/elements/em-blog-history-view",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.EmBlogHistoryView=void 0;var i;e.EmBlogHistoryView=(0,t.containerless)(i=function(){function e(){n(this,e),this.isSuper=nsCtx.isSuper,this.loginUser=nsCtx.loginUser}return e.prototype.showHandler=function(){},e.prototype.approveHandler=function(){},e.prototype.show=function(e,t,n){this.blogHistory=e,this.blog=e.blog,this.ver=t,this.isCurrentVer=n,this.emModal.show({hideOnApprove:!0,autoDimmer:!1})},e.prototype.restoreHandler=function(){var e=this;this.ajax1=$.post("/admin/blog/history/restore",{hid:this.blogHistory.id},function(t,n,i){t.success?(ea.publish(nsCons.EVENT_BLOG_CHANGED,{action:"updated",blog:t.data}),ea.publish(nsCons.EVENT_BLOG_HISTORY_CHANGED,{}),toastr.success("博文历史记录还原成功!"),e.emModal.hide()):toastr.error(t.data,"博文历史记录还原失败!")})},e}())||i}),define("resources/elements/em-blog-history",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.EmBlogHistory=void 0;var i;e.EmBlogHistory=(0,t.containerless)(i=function(){function e(){var t=this;n(this,e),this.isSuper=nsCtx.isSuper,this.loginUser=nsCtx.loginUser,this.subscribe=ea.subscribe(nsCons.EVENT_BLOG_HISTORY_CHANGED,function(e){t.refreshHistory()})}return e.prototype.unbind=function(){this.subscribe.dispose()},e.prototype.viewHistoryHandler=function(e,t,n){this.blogHistoryViewVm.show(e,t,n)},e.prototype.refreshHistory=function(){var e=this;$.get("/admin/blog/history/list",{id:this.blog.id},function(t){t.success?(e.oldHistories=t.data,e.histories=_.reverse(_.clone(t.data))):toastr.error(t.data,"获取博文历史失败!")})},e.prototype.showHandler=function(){this.refreshHistory()},e.prototype.approveHandler=function(){},e.prototype.show=function(e){this.blog=e,this.emModal.show({hideOnApprove:!0,autoDimmer:!1})},e.prototype.restoreHandler=function(e){var t=this;this.ajax1=$.post("/admin/blog/history/restore",{hid:e.id},function(e,n,i){e.success?(ea.publish(nsCons.EVENT_BLOG_CHANGED,{action:"updated",blog:e.data}),t.refreshHistory(),toastr.success("博文历史记录还原成功!")):toastr.error(e.data,"博文历史记录还原失败!")})},e.prototype.removeHandler=function(e){var t=this;this.ajax2=$.post("/admin/blog/history/remove",{hid:e.id},function(e,n,i){e.success?(t.refreshHistory(),toastr.success("博文历史记录删除成功!")):toastr.error(e.data,"博文历史记录删除失败!")})},e.prototype.diffHandler=function(){var e=[].concat(this.oldHistories,[this.blog]),t=_.filter(e,"checked");if(t&&t.length>1){var n=t[t.length-1],i=t[t.length-2],r=_.indexOf(e,n),a=_.indexOf(e,i);this.blogHistoryDiffVm.show(n,i,r,a)}else toastr.error("请先选择要比较版本")},e}())||i}),define("resources/elements/em-blog-left-sidebar",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.EmBlogLeftSidebar=void 0;var i;e.EmBlogLeftSidebar=(0,t.containerless)(i=function(){function e(){var t=this;n(this,e),this.isHide=!0,this.blogs=[],this.spaces=[],this.noSpaceBlogs=[],this.loginUser=nsCtx.loginUser,this.isSuper=nsCtx.isSuper,this.filter="",this.spaceStow={name:"我的收藏",open:!1},this.subscribe=ea.subscribe(nsCons.EVENT_BLOG_CHANGED,function(e){"created"==e.action?(t.blogs=[e.blog].concat(t.blogs),t.calcTree(),ea.publish(nsCons.EVENT_APP_ROUTER_NAVIGATE,{to:"#/blog/"+e.blog.id})):"updated"==e.action?(_.extend(_.find(t.blogs,{id:e.blog.id}),e.blog),t.calcTree()):"deleted"==e.action&&(t.blogStows=_.reject(t.blogStows,function(t){return t.blog.id==e.blog.id}),t.blogs=_.reject(t.blogs,{id:e.blog.id}),t.calcTree())}),this.subscribe4=ea.subscribe(nsCons.EVENT_SPACE_CHANGED,function(e){"created"==e.action?(t.spaces=[e.space].concat(t.spaces),t.calcTree()):"updated"==e.action&&(_.extend(_.find(t.spaces,{id:e.space.id}),e.space),t.calcTree())}),this.subscribe2=ea.subscribe(nsCons.EVENT_BLOG_SWITCH,function(e){t.blog=_.find(t.blogs,{id:+nsCtx.blogId})}),this.subscribe3=ea.subscribe(nsCons.EVENT_BLOG_TOGGLE_SIDEBAR,function(e){t.isHide=e}),this.subscribe5=ea.subscribe(nsCons.EVENT_BLOG_STOW_CHANGED,function(e){t._refreshBlogStows()}),this._doFilerDebounce=_.debounce(function(){return t._doFiler()},120,{leading:!0})}return e.prototype.unbind=function(){this.subscribe.dispose(),this.subscribe2.dispose(),this.subscribe3.dispose(),this.subscribe4.dispose(),this.subscribe5.dispose()},e.prototype.attached=function(){this.refresh(),this._refreshSysLinks(),this._refreshBlogStows()},e.prototype._refreshSysLinks=function(){var e=this;$.get("/admin/link/listByApp",function(t){t.success?e.sysLinks=t.data:e.sysLinks=[]})},e.prototype._refreshBlogStows=function(){var e=this;$.get("/admin/blog/stow/listMy",function(t){t.success?e.blogStows=t.data:toastr.error(t.data)})},e.prototype.refresh=function(){var e=this;$.when(this.getSpaces(),this.getBlogTree()).done(function(){e.calcTree()})},e.prototype.calcTree=function(){var e=this;this.noSpaceBlogs=[],$.each(this.spaces,function(t,n){n.blogs=[],$.each(e.blogs,function(e,t){t.space&&t.space.id===n.id&&(n.blogs.push(t),nsCtx.blogId==t.id&&(n.open=!0))})}),this.noSpaceBlogs=_.filter(this.blogs,function(e){return!e.space})},e.prototype.spaceToggleHandler=function(e){e.open=!e.open},e.prototype.getBlogTree=function(){var e=this;return $.get("/admin/blog/listMy",function(t){t.success&&(e.blogs=t.data,e.blog=_.find(e.blogs,{id:+nsCtx.blogId}))})},e.prototype.getSpaces=function(){var e=this;return $.get("/admin/space/listMy",{},function(t){t.success&&(e.spaces=t.data)})},e.prototype.editSpaceHandler=function(e){this.spaceEditVm.show(e)},e.prototype.delSpaceHandler=function(e){var t=this;this.confirmMd.show({onapprove:function(){$.post("/admin/space/delete",{id:e.id},function(n){n.success?(toastr.success("删除空间成功!"),t.spaces=_.reject(t.spaces,{id:e.id})):toastr.error(n.data,"删除空间失败!")})}})},e.prototype.authSpaceHandler=function(e){this.blogSpaceAuthVm.show("space",e)},e.prototype.clearFilterHandler=function(){this.filter="",this._doFilerDebounce()},e.prototype.filterKeyupHandler=function(e){this._doFilerDebounce()},e.prototype._doFiler=function(){var e=this;_.each(this.blogs,function(t){_.includes(_.toLower(t.title),_.toLower(e.filter))?t._hidden=!1:t._hidden=!0}),_.each(this.spaces,function(e){_.some(e.blogs,function(e){return!e._hidden})?(e._hidden=!1,e.open=!0):e._hidden=!0}),_.each(this.blogStows,function(t){_.includes(_.toLower(t.blog.title),_.toLower(e.filter))?t._hidden=!1:t._hidden=!0}),_.some(this.blogStows,function(e){return!e._hidden})?this.spaceStow.open=!0:this.spaceStow.open=!1,this.filter||(_.each(this.spaces,function(e){_.find(e.blogs,{id:+nsCtx.blogId})?e.open=!0:e.open=!1}),this.spaceStow.open=!1)},e}())||i}),define("resources/elements/em-blog-right-sidebar",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.EmBlogRightSidebar=void 0;var i;e.EmBlogRightSidebar=(0,t.containerless)(i=function(){function e(){var t=this;n(this,e),this.subscribe=ea.subscribe(nsCons.EVENT_BLOG_RIGHT_SIDEBAR_TOGGLE,function(e){"dir"==e.action&&$(t.dirRef).empty().append(e.dir)})}return e.prototype.unbind=function(){this.subscribe.dispose()},e}())||i}),define("resources/elements/em-blog-save",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmBlogSave=void 0;var a,o,s;e.EmBlogSave=(0,t.containerless)((o=function(){function e(){var t=this;i(this,e),n(this,"trigger",s,this),this.loginUser=nsCtx.loginUser,this.isSuper=nsCtx.isSuper,this.subscribe=ea.subscribe(nsCons.EVENT_BLOG_SAVE,function(e){t.blogInfo=e,t.show()})}return e.prototype.triggerChanged=function(){var e=this;$(this.trigger).click(function(t){e.show()})},e.prototype.attached=function(){$(this.chk).checkbox()},e.prototype.unbind=function(){this.subscribe.dispose()},e.prototype.show=function(){this.emModal.show({hideOnApprove:!1,autoDimmer:!0})},e.prototype.showHandler=function(){var e=this;$(this.chk).checkbox("set unchecked"),$.get("/admin/space/listMy",function(t){t.success&&(e.spaces=t.data)})},e.prototype.approveHandler=function(e){var t=this,n=utils.md2html(this.blogInfo.content),i=[nsCtx.memberAll].concat(window.tmsUsers?tmsUsers:[]),r=$(this.spacesRef).dropdown("get value");localStorage&&localStorage.setItem(nsCons.KEY_BLOG_COMMON_SPACE,r),$.post("/admin/blog/create",{url:utils.getBasePath(),usernames:utils.parseUsernames(this.blogInfo.content,i).join(","),title:this.blogInfo.title,content:this.blogInfo.content,spaceId:r,privated:$(this.chk).checkbox("is checked"),contentHtml:n},function(n,i,r){n.success?(t.blog=n.data,toastr.success("博文保存成功!"),ea.publish(nsCons.EVENT_BLOG_CHANGED,{action:"created",blog:t.blog}),e.hide(),$('a[href="#modaal-blog-write"]').modaal("close")):toastr.error(n.data,"博文保存失败!")})},e.prototype.initSpacesHandler=function(e){var t=this;e&&_.defer(function(){if($(t.spacesRef).dropdown("clear"),localStorage){var e=localStorage.getItem(nsCons.KEY_BLOG_COMMON_SPACE);e&&$(t.spacesRef).dropdown("set selected",e)}})},e}(),s=r(o.prototype,"trigger",[t.bindable],{enumerable:!0,initializer:null}),a=o))||a}),define("resources/elements/em-blog-share",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmBlogShare=void 0;var a,o,s;e.EmBlogShare=(0,t.containerless)((o=function(){function e(){i(this,e),this.shares=[],this.desc="",n(this,"blog",s,this),this.basePath=utils.getBasePath()}return e.prototype.attached=function(){var e=this;$(this.searchRef).search({minCharacters:2,cache:!1,selectFirstResult:!0,showNoResults:!1,onSelect:function(t,n){t.item._id=_.uniqueId("share-item-"),t.item._type=t.item.username?"user":"channel",e.shares.push(t.item),_.defer(function(){$(e.inputSearchRef).val("")})},apiSettings:{onResponse:function(t){var n={results:[]};return $.each(t.data.users,function(t,i){_.find(_.filter(e.shares,function(e){return"user"==e._type}),{username:i.username})||n.results.push({item:i,title:' '+i.name+" ("+i.username+")"})}),$.each(t.data.channels,function(t,i){_.find(_.filter(e.shares,function(e){return"channel"==e._type}),{name:i.name})||n.results.push({item:i,title:' '+i.title+" ("+i.name+")"})}),n},url:"/admin/blog/share/to/search?search={query}"}}),$(this.shareRef).popup({on:"click",inline:!0,silent:!0,position:"bottom right",jitter:300,delay:{show:300,hide:300},onVisible:function(){$(e.inputSearchRef).focus()}})},e.prototype.shareSearchKeyupHandler=function(e){if(13===e.keyCode&&!$(this.searchRef).search("is visible")){var t=$(this.inputSearchRef).val();utils.isMail(t)&&(_.find(_.filter(this.shares,function(e){return"mail"==e._type}),{mail:t})||(this.shares.push({_id:_.uniqueId("share-item-"),_type:"mail",mail:t}),$(this.inputSearchRef).val("")))}},e.prototype.show=function(){$(this.shareRef).popup("show")},e.prototype.removeShareHandler=function(e){this.shares=_.reject(this.shares,{_id:e._id})},e.prototype.cancelHandler=function(){this._reset()},e.prototype._reset=function(){this.shares=[],this.desc="",$(this.inputSearchRef).val(""),$(this.shareRef).popup("hide")},e.prototype.shareHandler=function(){var e=this;return 0===this.shares.length?void toastr.error("请先指定博文分享用户或者频道或者邮箱!"):void(this.ajaxS=$.post("/admin/blog/share",{basePath:utils.getBasePath(),id:this.blog.id,desc:this.desc,title:this.blog.title, -html:utils.md2html(this.blog.content),users:_.chain(this.shares).filter(function(e){return"user"==e._type}).map("username").join().value(),channels:_.chain(this.shares).filter(function(e){return"channel"==e._type}).map("name").join().value(),mails:_.chain(this.shares).filter(function(e){return"mail"==e._type}).map("mail").join().value()},function(t,n,i){t.success?(e._reset(),toastr.success("博文分享成功!")):toastr.error(t.data,"博文分享失败!")}))},e}(),s=r(o.prototype,"blog",[t.bindable],{enumerable:!0,initializer:null}),a=o))||a}),define("resources/elements/em-blog-space-auth",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.EmBlogSpaceAuth=void 0;var i;e.EmBlogSpaceAuth=(0,t.containerless)(i=function(){function e(){n(this,e),this.shares=[]}return e.prototype._isBlog=function(){return"blog"==this.type},e.prototype.attached=function(){var e=this;$(this.chk).checkbox({onChange:function(){e._isBlog()?$.post("/admin/blog/privated/update",{id:e.authO.id,privated:$(e.chk).checkbox("is checked")},function(t,n,i){t.success?(_.extend(e.authO,t.data),ea.publish(nsCons.EVENT_BLOG_CHANGED,{action:"updated",blog:t.data}),toastr.success("更新博文可见性成功!")):toastr.error(t.data,"更新博文可见性失败!")}):$.post("/admin/space/update",{id:e.authO.id,privated:$(e.chk).checkbox("is checked")},function(t,n,i){t.success?(_.extend(e.authO,t.data),ea.publish(nsCons.EVENT_SPACE_CHANGED,{action:"updated",space:t.data}),toastr.success("更新空间可见性成功!")):toastr.error(t.data,"更新空间可见性失败!")})}}),$(this.searchRef).search({minCharacters:2,cache:!1,selectFirstResult:!0,onSelect:function(t,n){t.item._id=_.uniqueId("share-item-"),_.defer(function(){$(e.inputSearchRef).val("")});var i={id:e.authO.id};t.item.username?_.extend(i,{users:t.item.username}):_.extend(i,{channels:t.item.id}),e._isBlog()?$.post("/admin/blog/auth/add",i,function(n,i,r){n.success?(e.shares.push(t.item),e.authO.blogAuthorities=n.data.blogAuthorities):toastr.error(n.data)}):$.post("/admin/space/auth/add",i,function(n,i,r){n.success?(e.shares.push(t.item),e.authO.spaceAuthorities=n.data.spaceAuthorities):toastr.error(n.data)})},apiSettings:{onResponse:function(t){var n={results:[]};return $.each(t.data.users,function(t,i){_.find(e.shares,{username:i.username})||n.results.push({item:i,title:' '+i.name+" ("+i.username+")"})}),$.each(t.data.channels,function(t,i){_.find(_.filter(e.shares,function(e){return!e.username}),{name:i.name})||n.results.push({item:i,title:' '+i.title+" ("+i.name+")"})}),n},url:"/admin/blog/share/to/search?search={query}"}})},e.prototype.removeShareHandler=function(e){var t=this,n={id:this.authO.id};e.username?_.extend(n,{users:e.username}):_.extend(n,{channels:e.id}),this._isBlog()?$.post("/admin/blog/auth/remove",n,function(n,i,r){n.success?(t.shares=_.reject(t.shares,{_id:e._id}),t.authO.blogAuthorities=n.data.blogAuthorities):toastr.error(n.data)}):$.post("/admin/space/auth/remove",n,function(n,i,r){n.success?(t.shares=_.reject(t.shares,{_id:e._id}),t.authO.spaceAuthorities=n.data.spaceAuthorities):toastr.error(n.data)})},e.prototype._reset=function(){this.shares=[],$(this.inputSearchRef).val("")},e.prototype.show=function(e,t){this.type=e,this.authO=t,this.emModal.show({hideOnApprove:!0,autoDimmer:!1})},e.prototype.showHandler=function(){var e=this;this._reset(),$(this.chk).checkbox(this.authO.privated?"set checked":"set unchecked");var t=void 0;t=this._isBlog()?this.authO.blogAuthorities:this.authO.spaceAuthorities,_.forEach(t,function(t){var n=t.user?t.user:t.channel;n._id=_.uniqueId("share-item-"),e.shares.push(n)})},e.prototype.approveHandler=function(){},e}())||i}),define("resources/elements/em-blog-space-create",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.EmBlogSpaceCreate=void 0;var i;e.EmBlogSpaceCreate=(0,t.containerless)(i=function(){function e(){n(this,e)}return e.prototype.attached=function(){$(this.chk).checkbox()},e.prototype.createHandler=function(){var e=this;this.ajax=$.post("/admin/space/create",{name:this.name,desc:this.desc,privated:$(this.chk).checkbox("is checked")},function(t,n,i){t.success?(e.name="",e.desc="",$(e.chk).checkbox("set unchecked"),toastr.success("空间创建成功!"),$(e.ppRef).popup("hide"),ea.publish(nsCons.EVENT_SPACE_CHANGED,{action:"created",space:t.data})):toastr.error(t.data,"空间创建失败!")})},e}())||i}),define("resources/elements/em-blog-space-edit",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.EmBlogSpaceEdit=void 0;var i;e.EmBlogSpaceEdit=(0,t.containerless)(i=function(){function e(){n(this,e)}return e.prototype.attached=function(){$(this.chk).checkbox()},e.prototype.show=function(e){this.space=e,this.emModal.show({hideOnApprove:!1,autoDimmer:!0})},e.prototype.showHandler=function(){var e=this;$.get("/admin/space/get",{id:this.space.id},function(t){t.success&&(e.space=t.data,$(e.chk).checkbox(e.space.privated?"set checked":"set unchecked"))})},e.prototype.approveHandler=function(e){$.post("/admin/space/update",{id:this.space.id,name:this.space.name,desc:this.space.description,privated:$(this.chk).checkbox("is checked")},function(t,n,i){t.success?(toastr.success("空间更新成功!"),ea.publish(nsCons.EVENT_SPACE_CHANGED,{action:"updated",space:t.data}),e.hide()):toastr.error(t.data,"空间更新失败!")})},e}())||i}),define("resources/elements/em-blog-space-update",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.EmBlogSpaceUpdate=void 0;var i;e.EmBlogSpaceUpdate=(0,t.containerless)(i=function(){function e(){n(this,e),this.loginUser=nsCtx.loginUser,this.isSuper=nsCtx.isSuper}return e.prototype.attached=function(){},e.prototype.show=function(e){this.blog=e,this.emModal.show({hideOnApprove:!1,autoDimmer:!0})},e.prototype.showHandler=function(){var e=this;$.get("/admin/space/listMy",function(t){t.success&&(e.spaces=t.data)})},e.prototype.approveHandler=function(e){var t=$(this.spacesRef).dropdown("get value");$.post("/admin/blog/space/update",{id:this.blog.id,sid:t?t:null},function(t,n,i){t.success?(toastr.success("博文空间更新成功!"),t.data.space||(t.data.space=null),ea.publish(nsCons.EVENT_BLOG_CHANGED,{action:"updated",blog:t.data}),e.hide()):toastr.error(t.data,"博文空间更新失败!")})},e.prototype.initSpacesHandler=function(e){var t=this;e&&_.defer(function(){$(t.spacesRef).dropdown("clear").dropdown("set selected",t.blog.space?t.blog.space.id+"":"")})},e}())||i}),define("resources/elements/em-blog-top-menu",["exports","aurelia-framework","timeago"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.EmBlogTopMenu=void 0;var i,r=timeago();e.EmBlogTopMenu=(0,t.containerless)(i=function(){function e(){var t=this;n(this,e),this.isHide=!0,this.loginUser=nsCtx.loginUser,this.subscribe=ea.subscribe(nsCons.EVENT_BLOG_SWITCH,function(e){t.toggleHandler(!0)}),this.subscribe=ea.subscribe(nsCons.EVENT_BLOG_LEFT_SIDEBAR_TOGGLE,function(e){t.toggleHandler(e.isHide)})}return e.prototype.unbind=function(){this.subscribe.dispose()},e.prototype.attached=function(){var e=this;$(this.logoRef).on("mouseenter",function(t){$(e.logoRef).animateCss("flip")}),$(this.searchRef).search({minCharacters:2,apiSettings:{onResponse:function(e){var t={results:[]};return $.each(e.data,function(e,n){t.results.push({title:n.title,description:''+n.creator.name+" 创建于 "+r.format(n.createDate,"zh_CN"),url:"#/blog/"+n.id})}),t},url:"/admin/blog/search?search={query}"}}),this._refreshSysLinks(),"create"==nsCtx.blogId&&_.defer(function(){$('a[href="#modaal-blog-write"]').click()})},e.prototype._refreshSysLinks=function(){var e=this;$.get("/admin/link/listByApp",function(t){t.success?e.sysLinks=t.data:e.sysLinks=[]})},e.prototype.searchBlurHandler=function(){this.isSearchFocus=!1},e.prototype.searchFocusHandler=function(){this.isSearchFocus=!0},e.prototype.toggleHandler=function(e){this.isHide!==e&&(this.isHide=e?e:!this.isHide,ea.publish(nsCons.EVENT_BLOG_TOGGLE_SIDEBAR,this.isHide))},e.prototype.userEditHandler=function(){this.userEditMd.show()},e.prototype.logoutHandler=function(){$.post("/admin/logout").always(function(){utils.redirect2Login()})},e.prototype.searchKeyupHandler=function(e){27==e.keyCode&&$(this.searchRef).search("set value","")},e}())||i}),define("resources/elements/em-blog-write",["exports","aurelia-framework","simplemde","dropzone","common/common-emoji"],function(e,t,n,i,r){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmBlogWrite=void 0;var c,d,u,m,p,g=a(n),h=(a(i),a(r));e.EmBlogWrite=(0,t.containerless)((p=m=function(){function e(){var t=this;s(this,e),o(this,"members",u,this),this.subscribe=ea.subscribe(nsCons.EVENT_MODAAL_AFTER_OPEN,function(n){n.id==e.NAME&&(nsCtx.isModaalOpening=!0,t.init())}),this.subscribe2=ea.subscribe(nsCons.EVENT_MODAAL_BEFORE_CLOSE,function(n){n.id==e.NAME&&(t.destroy(),nsCtx.isModaalOpening=!1)}),this.subscribe3=ea.subscribe(nsCons.EVENT_BLOG_ACTION,function(e){t.action=e.action,$.get("/admin/blog/get",{id:e.id},function(e){e.success&&(t.blog=e.data,$('a[href="#modaal-blog-write"]').click())})}),this.subscribe4=ea.subscribe(nsCons.EVENT_BLOG_CHANGED,function(e){t.action=e.action,"created"===e.action&&(t.blog=e.blog,$("#blog-save-btn span").text("更新"),$("#blog-save-btn").attr("title","ctrl+click更新后关闭窗口"))}),this.blogTitleInputKeyupInit=_.once(function(){$("#blog-title-input").keyup(function(e){var n=$(e.currentTarget);e.shiftKey||13!=e.keyCode?e.shiftKey&&13==e.keyCode?t.simplemde.codemirror.focus():27==e.keyCode&&n.val(""):t.simplemde.value()?t.save(e,!0):t.simplemde.codemirror.focus()})})}return e.prototype.unbind=function(){this.subscribe.dispose(),this.subscribe2.dispose(),this.subscribe3.dispose(),this.subscribe4.dispose()},e.prototype._reset=function(){this.action=null,this.blog=null,$("#blog-save-btn span").text("保存"),$("#blog-save-btn").attr("title","ctrl+click快速保存"),$("#blog-title-input").val(""),this.simplemde.value(""),this.simplemde.toTextArea(),this.simplemde=null},e.prototype._editInit=function(){$("#blog-title-input").val(this.blog.title),this.simplemde.value(this.blog.content),$("#blog-save-btn span").text("更新"),$("#blog-save-btn").attr("title","ctrl+click更新后关闭窗口")},e.prototype._writeInit=function(){var e=this,t=utils.urlQuery("ccid"),n=utils.urlQuery("cdid"),i=null,r=null;t?(i="/admin/chat/channel/get",r=t):n&&(i="/admin/chat/direct/get",r=n),i&&$.get(i,{id:+r},function(t){if(t.success){e.simplemde.value(t.data.content);var n=$("#blog-title-input").val();if(!n){var i=/#{1,6}[\s]+(.+)\n?/g.exec(t.data.content);i&&i.length>1&&$("#blog-title-input").val(i[1])}}else toastr.error(t.data,"获取沟通消息失败!")})},e.prototype._copyInit=function(){$("#blog-title-input").val(this.blog.title+" (副本)"),this.simplemde.value(this.blog.content),this.blog=null},e.prototype.init=function(){var e=this;this.simplemde=new g.default({element:$("#txt-blog-write")[0],spellChecker:!1,toolbar:[{name:"bold",action:g.default.toggleBold,className:"fa fa-bold",title:"粗体"},{name:"italic",action:g.default.toggleItalic,className:"fa fa-italic",title:"斜体"},{name:"strikethrough",action:g.default.toggleStrikethrough,className:"fa fa-strikethrough",title:"删除线"},{name:"heading",action:g.default.toggleHeadingSmaller,className:"fa fa-header",title:"标题"},{name:"heading-smaller",action:g.default.toggleHeadingSmaller,className:"fa fa-header fa-header-x fa-header-smaller",title:"变小标题"},{name:"heading-bigger",action:g.default.toggleHeadingBigger,className:"fa fa-header fa-header-x fa-header-bigger",title:"变大标题"},"|",{name:"code",action:g.default.toggleCodeBlock,className:"fa fa-code",title:"代码"},{name:"quote",action:g.default.toggleBlockquote,className:"fa fa-quote-left",title:"引用"},{name:"unordered-list",action:g.default.toggleUnorderedList,className:"fa fa-list-ul",title:"无序列表"},{name:"ordered-list",action:g.default.toggleOrderedList,className:"fa fa-list-ol",title:"有序列表"},{name:"tasks",action:function(t){e.insertContent("- [ ] 未完成任务\n- [x] 已完成任务")},className:"fa fa-check-square-o ",title:"任务列表"},{name:"details",action:function(t){e.insertContent("
    \n标题\n

    详情内容

    \n
    ")},className:"fa fa-play ",title:"折叠详情"},"|",{name:"link",action:g.default.drawLink,className:"fa fa-link",title:"创建链接"},{name:"image",action:g.default.drawImage,className:"fa fa-picture-o",title:"插入图片"},{name:"table",action:g.default.drawTable,className:"fa fa-table",title:"插入表格"},{name:"horizontal-rule",action:g.default.drawHorizontalRule,className:"fa fa-minus",title:"插入水平分割线"},"|",{name:"upload",action:function(e){},className:"fa fa-upload",title:"上传文件"},"|",{name:"preview",action:g.default.togglePreview,className:"fa fa-eye no-disable",title:"切换预览"},{name:"side-by-side",action:g.default.toggleSideBySide,className:"fa fa-columns no-disable no-mobile",title:"实时预览"},{name:"fullscreen",action:g.default.toggleFullScreen,className:"fa fa-arrows-alt no-disable no-mobile",title:"全屏"},{name:"guide",action:"https://simplemde.com/markdown-guide",className:"fa fa-question-circle",title:"Markdown指南"}],insertTexts:{table:["","\n\n| 列1 | 列2 | 列3 |\n| ------ | ------ | ------ |\n| 文本 | 文本 | 文本 |\n\n"]},previewRender:function(e,t){return emojify&&(e=emojify.replace(e)),marked(utils.preParse(e))}}),this.simplemde.codemirror.on("keyup",function(t,n){if(n.ctrlKey&&13==n.keyCode)e.save(n,!0);else if(27==n.keyCode)e.simplemde.value("");else if(13==n.keyCode){var i=$("#blog-title-input").val();if(!i){var r=/#{1,6}[\s]+(.+)\n?/g.exec(e.simplemde.value());r&&r.length>1&&$("#blog-title-input").val(r[1])}}}),this.$chatMsgInputRef=$("#txt-blog-write-wrapper").find(".CodeMirror textarea"),0===this.$chatMsgInputRef.size()&&(this.$chatMsgInputRef=$("#txt-blog-write-wrapper").find('.CodeMirror [contenteditable="true"]')),"edit"==this.action?this._editInit():"copy"==this.action?this._copyInit():this._writeInit(),$("#blog-title-input").focus(),this.initPaste(),this.initTextcomplete(),this.initUploadDropzone($(".CodeMirror-wrap","#txt-blog-write-wrapper"),function(){return e.$chatMsgInputRef},!1),this.initUploadDropzone($(".editor-toolbar .fa.fa-upload","#txt-blog-write-wrapper"),function(){return e.$chatMsgInputRef},!0),this.blogTitleInputKeyupInit()},e.prototype.close=function(){$('a[href="#modaal-blog-write"]').modaal("close")},e.prototype.initTextcomplete=function(){var e=this;$(this.$chatMsgInputRef).textcomplete([{match:/(^|\s)@(\w*)$/,search:function(e,t){t($.map(nsCtx.users,function(t){return t.enabled&&t.username.indexOf(e)>=0?t.username:null}))},template:function(e,t){var n=_.find(nsCtx.users,{username:e});return n.name+" - "+n.mails+" ("+n.username+")"},replace:function(e){return"$1{~"+e+"}"}},{match:/(^|\s):([\+\-\w]*)$/,search:function(e,t){t($.map(h.default,function(t){return _.some(t.split("_"),function(t){return 0===t.indexOf(e)})?t:null}))},template:function(e,t){if("search"==e)return"表情查找 - :search";var n=":"+e+":";return emojify.replace(n)+" - "+n},replace:function(t){return e.tipsActionHandler(t)?"$1:"+t+": ":""}}],{appendTo:".tms-blog-write-status-bar",maxCount:5}),this.simplemde.codemirror.on("keydown",function(t,n){_.includes([13,38,40],n.keyCode)&&e.isTipsShow()&&n.preventDefault()})},e.prototype.isTipsShow=function(){return 1===$(".tms-blog-write-status-bar").find(".textcomplete-dropdown:visible").size()},e.prototype.tipsActionHandler=function(e){return"search"!=e||(_.delay(function(){utils.openNewWin(nsCons.STR_EMOJI_SEARCH_URL)},200),!1)},e.prototype.initPaste=function(){var e=this,t=void 0;t=this.$chatMsgInputRef.is("textarea")?$(this.$chatMsgInputRef).pastableTextarea():$(this.$chatMsgInputRef).pastableContenteditable(),t&&t.on("pasteImage",function(t,n){$.post("/admin/file/base64",{dataURL:n.dataURL,type:n.blob.type,toType:"Blog"},function(t,n,i){t.success&&e.insertContent("![{name}]({baseURL}{path}{uuidName})".replace(/\{name\}/g,t.data.name).replace(/\{baseURL\}/g,utils.getBaseUrl()+"/").replace(/\{path\}/g,t.data.path).replace(/\{uuidName\}/g,t.data.uuidName))})}).on("pasteImageError",function(e,t){toastr.error(t.message,"剪贴板粘贴图片错误!")})},e.prototype.initUploadDropzone=function(e,t,n){var i=this;$(e).dropzone({url:"/admin/file/upload",paramName:"file",clickable:!!n,dictDefaultMessage:"",maxFilesize:10,addRemoveLinks:!0,previewsContainer:".em-blog-write .dropzone-previews",previewTemplate:$(".em-blog-write .preview-template")[0].innerHTML,dictCancelUpload:"取消上传",dictCancelUploadConfirmation:"确定要取消上传吗?",dictFileTooBig:"文件过大({{filesize}}M),最大限制:{{maxFilesize}}M",init:function(){this.on("sending",function(e,n,i){t()?i.append("toType","Blog"):this.removeAllFiles(!0)}),this.on("success",function(e,t){t.success?($.each(t.data,function(e,t){"Image"==t.type?i.insertContent("![{name}]({baseURL}{path}{uuidName}) ".replace(/\{name\}/g,t.name).replace(/\{baseURL\}/g,utils.getBaseUrl()+"/").replace(/\{path\}/g,t.path).replace(/\{uuidName\}/g,t.uuidName)):i.insertContent("[{name}]({baseURL}{path}{uuidName}) ".replace(/\{name\}/g,t.name).replace(/\{baseURL\}/g,utils.getBaseUrl()+"/").replace(/\{path\}/g,"admin/file/download/").replace(/\{uuidName\}/g,t.id))}),toastr.success("上传成功!")):toastr.error(t.data,"上传失败!")}),this.on("error",function(e,t,n){toastr.error(t,"上传失败!")}),this.on("complete",function(e){this.removeFile(e)})}})},e.prototype.insertContent=function(e,t){try{var n=t?t.codemirror:this.simplemde.codemirror,i=n.getCursor();i&&(n.replaceRange(e,i,i),n.focus())}catch(e){console.log(e)}},e.prototype.destroy=function(){this._reset()},e.prototype.attached=function(){var e=this;$("#blog-save-btn").click(function(t){e.save(t)})},e.prototype.save=function(e,t){var n=this,i=$("#blog-title-input").val(),r=this.simplemde.value();if(!$.trim(i))return $("#blog-title-input").val(""),void toastr.error("标题不能为空!");if(!$.trim(r))return this.simplemde.value(""),void toastr.error("内容不能为空!");if(this.blog){if(this.sending)return;this.sending=!0,$("#blog-save-btn i").show();var a=(utils.md2html(r),[nsCtx.memberAll].concat(window.tmsUsers?tmsUsers:[]));$.post("/admin/blog/update",{url:utils.getBasePath(),id:this.blog.id,version:this.blog.version,usernames:utils.parseUsernames(r,a).join(","),title:i,content:r,diff:utils.diffS(this.blog.content,r)},function(i,r,a){i.success?(n.blog=i.data,toastr.success("博文更新成功!"),ea.publish(nsCons.EVENT_BLOG_CHANGED,{action:"updated",blog:n.blog}),t?e&&e.ctrlKey&&e.shiftKey&&n.close():e&&e.ctrlKey&&n.close()):toastr.error(i.data,"博文更新失败!")}).always(function(){n.sending=!1,$("#blog-save-btn i").hide()})}else e.ctrlKey?$.post("/admin/blog/create",{url:utils.getBasePath(),usernames:utils.parseUsernames(r,[nsCtx.memberAll].concat(window.tmsUsers?tmsUsers:[])).join(","),title:i,content:r,spaceId:"",privated:!1,contentHtml:utils.md2html(r)},function(e,t,i){e.success?(n.blog=e.data,toastr.success("博文保存成功!"),ea.publish(nsCons.EVENT_BLOG_CHANGED,{action:"created",blog:n.blog}),$('a[href="#modaal-blog-write"]').modaal("close")):toastr.error(e.data,"博文保存失败!")}):ea.publish(nsCons.EVENT_BLOG_SAVE,{title:i,content:r})},e}(),m.NAME="blog-create",d=p,u=l(d.prototype,"members",[t.bindable],{enumerable:!0,initializer:null}),c=d))||c}),define("resources/elements/em-chat-attach",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.EmChatAttach=void 0;var i;e.EmChatAttach=(0,t.containerless)(i=function(){function e(){n(this,e),this.type="Image",this.search=""}return e.prototype.attached=function(){$(this.tabRef).find(".item").tab({onVisible:function(e){}})},e.prototype.moreHandler=function(){this._listByPage(!0)},e.prototype._listByPage=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=nsCtx.isAt?"/admin/file/listByUser":"/admin/file/listByChannel";this.ajax=$.get(n,{name:nsCtx.chatTo,type:this.type,page:this.page?t?this.page.number+1:this.page.number:0,size:10,search:this.search},function(n){e.page=n.data,e.moreCnt=e.page.last?0:e.page.totalElements-(e.page.number+1)*e.page.size,t?e.attachs=_.concat(e.attachs,n.data.content):e.attachs=n.data.content})},e.prototype.fetch=function(){this.page=null,this.moreCnt=0,this.attachs=null,$(window).width()>991&&$(this.searchRef).focus(),this._listByPage()},e.prototype.tabClickHandler=function(e){this.type=e,this.fetch()},e.prototype.searchHandler=function(){this.fetch()},e.prototype.keyupHandler=function(e){return 13==e.keyCode?this.fetch():27==e.keyCode&&(this.search="",this.fetch()),!0},e}())||i}),define("resources/elements/em-chat-channel-create",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmChatChannelCreate=void 0;var a,o,s,l,c;e.EmChatChannelCreate=(0,t.containerless)((o=function(){function e(){i(this,e),n(this,"loginUser",s,this),n(this,"trigger",l,this),n(this,"name",c,this),this.activeTab="channel-create",this.nameRegex=/^[a-z][a-z0-9_\-]{0,49}$/}return e.prototype.nameChanged=function(e,t){this.oldName=t,e&&!this.nameRegex.test(e)&&(this.name=this._getOldName())},e.prototype._getOldName=function(){return this.nameRegex.test(this.oldName)||(this.oldName=""),this.oldName},e.prototype.triggerChanged=function(e,t){var n=this;$(this.trigger).click(function(){n.emModal.show({hideOnApprove:!1,autoDimmer:!0})})},e.prototype.showHandler=function(){this._reset()},e.prototype._reset=function(){this.name="",this.title="",this.desc="",$(this.chk).checkbox("set checked"),this.channelJoinVm.refresh()},e.prototype.attached=function(){var e=this;$(this.chk).checkbox(),$(this.tabRef).find(".item").tab({onVisible:function(t){e.activeTab=t}})},e.prototype.approveHandler=function(e){$.post("/admin/channel/create",{name:this.name,title:this.title,desc:this.desc,privated:$(this.chk).checkbox("is checked")},function(t){t.success?(e.hide(),toastr.success("创建频道成功!"),ea.publish(nsCons.EVENT_CHAT_CHANNEL_CREATED,{channel:t.data})):(e.hideDimmer(),toastr.error(t.data,"创建频道失败!"))})},e}(),s=r(o.prototype,"loginUser",[t.bindable],{enumerable:!0,initializer:null}),l=r(o.prototype,"trigger",[t.bindable],{enumerable:!0,initializer:null}),c=r(o.prototype,"name",[t.bindable],{enumerable:!0,initializer:null}),a=o))||a}),define("resources/elements/em-chat-channel-edit",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmChatChannelEdit=void 0;var a,o,s;e.EmChatChannelEdit=(0,t.containerless)((o=function(){function e(){i(this,e),n(this,"channel",s,this)}return e.prototype.channelChanged=function(){if(this.channel){var e=this.channel.privated?"set checked":"set unchecked";$(this.chk).checkbox(e)}},e.prototype.show=function(){this.emModal.show({hideOnApprove:!1,autoDimmer:!0})},e.prototype.showHandler=function(){},e.prototype.attached=function(){$(this.chk).checkbox()},e.prototype.approveHandler=function(e){$.post("/admin/channel/update",{id:this.channel.id,title:this.channel.title,desc:this.channel.description,privated:$(this.chk).checkbox("is checked")},function(t){e.hide(),t.success?toastr.success("更新频道成功!"):toastr.error(t.data,"编辑频道失败!")})},e}(),s=r(o.prototype,"channel",[t.bindable],{enumerable:!0,initializer:null}),a=o))||a}),define("resources/elements/em-chat-channel-join",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmChatChannelJoin=void 0;var a,o,s;e.EmChatChannelJoin=(0,t.containerless)((o=function(){function e(){i(this,e),n(this,"loginUser",s,this)}return e.prototype._getChannels=function(){var e=this;$.get("/admin/channel/list",function(t){t.success?(e.channels=t.data,_.each(e.channels,function(t){t.joined=_.some(t.members,function(t){return t.username==e.loginUser.username})})):toastr.error(t.data,"获取频道列表失败!")})},e.prototype.refresh=function(){this._getChannels()},e.prototype.joinHandler=function(e){this.confirmMd.show({content:'确定要加入频道'+e.title+"吗?",onapprove:function(){$.post("/admin/channel/join",{id:e.id},function(t){t.success?(toastr.success("加入频道成功!"),e.joined=!0,ea.publish(nsCons.EVENT_CHAT_CHANNEL_JOINED,{channel:t.data})):toastr.error(t.data,"加入频道失败!")})}})},e.prototype.leaveHandler=function(e){this.confirmMd.show({content:'确定要离开频道'+e.title+"吗?",onapprove:function(){$.post("/admin/channel/leave",{id:e.id},function(t){t.success?(toastr.success("离开频道成功!"),e.joined=!1,ea.publish(nsCons.EVENT_CHAT_CHANNEL_LEAVED,{channel:t.data})):toastr.error(t.data,"离开频道失败!")})}})},e}(),s=r(o.prototype,"loginUser",[t.bindable],{enumerable:!0,initializer:null}),a=o))||a}),define("resources/elements/em-chat-channel-link-mgr",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmChatChannelLinkMgr=void 0;var a,o,s,l;e.EmChatChannelLinkMgr=(0,t.containerless)((o=function(){function e(){i(this,e),n(this,"channel",s,this),n(this,"loginUser",l,this),this.links=[]}return e.prototype.channelChanged=function(e,t){var n=this;this.channel&&$.get("/admin/link/listBy",{channelId:this.channel.id},function(e){e.success?n.links=e.data:n.links=[]})},e.prototype.addHandler=function(){var e=this;$.post("/admin/link/create",{title:this.title,href:this.href,channelId:this.channel.id},function(t,n,i){t.success?(e.title="",e.href="",e.links.push(t.data),ea.publish(nsCons.EVENT_CHANNEL_LINKS_REFRESH,{})):toastr.error(t.data)})},e.prototype.delHandler=function(e){var t=this;$.post("/admin/link/delete",{id:e.id},function(n,i,r){n.success?(t.links=_.reject(t.links,{id:e.id}),ea.publish(nsCons.EVENT_CHANNEL_LINKS_REFRESH,{}),toastr.success("删除成功!")):toastr.error(n.data)})},e.prototype.editHandler=function(e){e.oldTitle=e.title,e.oldHref=e.href,e.isEditing=!0},e.prototype.updateHandler=function(e){$.post("/admin/link/update",{id:e.id,title:e.title,href:e.href},function(t,n,i){t.success?(e.isEditing=!1,ea.publish(nsCons.EVENT_CHANNEL_LINKS_REFRESH,{}),toastr.success("更新成功!")):toastr.error(t.data)})},e.prototype.showHandler=function(){this._reset()},e.prototype._reset=function(){},e.prototype.attached=function(){},e.prototype.show=function(){this.emModal.show({autoDimmer:!1})},e.prototype.approveHandler=function(e){},e}(),s=r(o.prototype,"channel",[t.bindable],{enumerable:!0,initializer:null}),l=r(o.prototype,"loginUser",[t.bindable],{enumerable:!0,initializer:null}),a=o))||a}),define("resources/elements/em-chat-channel-members-mgr",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmChatChannelMembersMgr=void 0;var a,o,s,l;e.EmChatChannelMembersMgr=(0,t.containerless)((o=function(){function e(){var t=this;i(this,e),n(this,"channel",s,this),n(this,"users",l,this),this.membersOpts={onAdd:function(e,n,i){t.emModal.showDimmer(),$.post("/admin/channel/addMember",{id:t.channel.id,members:e,baseUrl:utils.getBaseUrl(),path:wurl("path")},function(e,n,i){e.success?(toastr.success("添加成员成功!"),t.channel.members=e.data.members,ea.publish(nsCons.EVENT_CHAT_CHANNEL_MEMBER_ADD_OR_REMOVE,{type:"add",members:e.data.members})):toastr.error(e.data,"添加成员失败!")}).always(function(){t.emModal.hideDimmer()})},onLabelRemove:function(e){return t.channel.owner.username!=e&&(t.emModal.showDimmer(),void $.post("/admin/channel/removeMember",{id:t.channel.id,members:e,baseUrl:utils.getBaseUrl(), -path:wurl("path")},function(e,n,i){e.success?(toastr.success("移除成员成功!"),t.channel.members=e.data.members,ea.publish(nsCons.EVENT_CHAT_CHANNEL_MEMBER_ADD_OR_REMOVE,{type:"remove",members:e.data.members})):toastr.error(e.data,"移除成员失败!")}).always(function(){t.emModal.hideDimmer()}))}}}return e.prototype.channelChanged=function(){var e=this;this.channel&&!function(){var t=_.sortBy(_.map(e.channel.members,"username"));_.defer(function(){$(e.membersRef).dropdown().dropdown("clear").dropdown("set selected",t).dropdown(e.membersOpts)})}()},e.prototype.attached=function(){},e.prototype.initMembersUI=function(e){var t=this;e&&_.defer(function(){t.channelChanged()})},e.prototype.showHandler=function(){$(this.membersRef).dropdown().dropdown("clear"),this.channelChanged()},e.prototype.approveHandler=function(e){},e.prototype.show=function(){this.emModal.show({hideOnApprove:!0,autoDimmer:!1})},e}(),s=r(o.prototype,"channel",[t.bindable],{enumerable:!0,initializer:null}),l=r(o.prototype,"users",[t.bindable],{enumerable:!0,initializer:null}),a=o))||a}),define("resources/elements/em-chat-channel-members-show",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmChatChannelMembersShow=void 0;var a,o,s;e.EmChatChannelMembersShow=(0,t.containerless)((o=function(){function e(){i(this,e),n(this,"channel",s,this)}return e.prototype.showHandler=function(){},e.prototype.approveHandler=function(e){},e.prototype.show=function(){this.emModal.show({hideOnApprove:!0,autoDimmer:!1})},e}(),s=r(o.prototype,"channel",[t.bindable],{enumerable:!0,initializer:null}),a=o))||a}),define("resources/elements/em-chat-content-item",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmChatContentItem=void 0;var a,o,s,l,c,d,u,m,p;e.EmChatContentItem=(a=(0,t.bindable)({defaultBindingMode:t.bindingMode.twoWay}),(0,t.containerless)((s=function(){function e(){var t=this;i(this,e),n(this,"chats",l,this),n(this,"loginUser",c,this),n(this,"isAt",d,this),n(this,"channel",u,this),n(this,"markId",m,this),n(this,"chatTo",p,this),this.members=[],this.basePath=utils.getBasePath(),this.subscribe=ea.subscribe(nsCons.EVENT_CHAT_CHANNEL_MEMBER_ADD_OR_REMOVE,function(e){t.members=[nsCtx.memberAll].concat(e.members)})}return e.prototype.unbind=function(){this.subscribe.dispose()},e.prototype.attached=function(){var e=this;$(".tms-chat-direct").on("click",".markdown-body .at-user",function(e){e.preventDefault(),ea.publish(nsCons.EVENT_CHAT_MSG_INSERT,{content:"{~"+$(e.currentTarget).attr("data-value")+"} "})}),$(".tms-chat-direct").on("mouseenter",'.markdown-body a[href*="#/chat/"]:not(.pp-not)',function(e){e.preventDefault();var t=$(e.currentTarget);ea.publish(nsCons.EVENT_CHAT_MSG_POPUP_SHOW,{id:utils.urlQuery("id",t.attr("href")),target:e.currentTarget})}),$(".tms-chat-direct").on("mouseenter",".tms-content-body .em-chat-content-item",function(e){e.preventDefault();var t=$(e.currentTarget);ea.publish(nsCons.EVENT_CHAT_MSG_WIKI_DIR,{dir:utils.dir(t.find("> .content > .markdown-body"))})}),$(".tms-chat-direct").on("click",".panel-wiki-dir .wiki-dir-item",function(e){e.preventDefault(),ea.publish(nsCons.EVENT_CHAT_CONTENT_SCROLL_TO,{target:$("#"+$(e.currentTarget).attr("data-id"))})}),$(".tms-chat-direct").on("mouseenter","span[data-value].at-user:not(.pp-not),a[data-value].author:not(.pp-not)",function(t){t.preventDefault();var n=$(t.currentTarget);ea.publish(nsCons.EVENT_CHAT_MEMBER_POPUP_SHOW,{channel:e.channel,username:n.attr("data-value"),target:t.currentTarget})}),this.initHotkeys()},e.prototype.channelChanged=function(){this.channel?this.members=[nsCtx.memberAll].concat(this.channel.members):this.members=[]},e.prototype.deleteHandler=function(e){var t=this;this.emConfirmModal.show({onapprove:function(){var n=void 0;n=t.isAt?"/admin/chat/direct/delete":"/admin/chat/channel/delete",$.post(n,{id:e.id},function(n,i,r){n.success?(t.chats=_.reject(t.chats,{id:e.id}),toastr.success("删除消息成功!")):toastr.error(n.data,"删除消息失败!")})}})},e.prototype.initHotkeys=function(){var e=this;$(document).bind("keydown","e",function(t){t.preventDefault();var n=_.findLast(e.chats,function(t){return t.creator.username==e.loginUser.username});n&&e.editHandler(n,$('.em-chat-content-item[data-id="'+n.id+'"]').find("> .content > textarea"))})},e.prototype.editHandler=function(e,t){$.get("/admin/chat/"+(this.isAt?"direct":"channel")+"/get",{id:e.id},function(n){n.success?(e.version!=n.data.version&&_.extend(e,n.data),e.isEditing=!0,e.contentOld=e.content,_.defer(function(){$(t).focus().select(),autosize.update(t)})):toastr.error(n.data)})},e.prototype.editOkHandler=function(e,t,n){this.editSave(t,n),t.isEditing=!1},e.prototype.editCancelHandler=function(e,t,n){t.content=t.contentOld,$(n).val(t.content),t.isEditing=!1},e.prototype.editSave=function(e,t){var n=this;this.sending=!0,e.content=$(t).val();var i=(utils.md2html(e.content),utils.md2html(e.contentOld),void 0),r=void 0;this.isAt?(i="/admin/chat/direct/update",r={baseUrl:utils.getBaseUrl(),path:wurl("path"),id:e.id,content:e.content,diff:utils.diffS(e.contentOld,e.content)}):(i="/admin/chat/channel/update",r={url:utils.getUrl(),id:e.id,version:e.version,usernames:utils.parseUsernames(e.content,this.members).join(","),content:e.content,diff:utils.diffS(e.contentOld,e.content)}),$.post(i,r,function(t,n,i){t.success?(toastr.success("更新消息成功!"),e.isEditing=!1,e.version=t.data.version):toastr.error(t.data,"更新消息失败!")}).always(function(){n.sending=!1})},e.prototype.eidtKeydownHandler=function(e,t,n){return!this.sending&&(e.ctrlKey&&13===e.keyCode?(this.editSave(t,n),!1):e.ctrlKey&&85===e.keyCode?($(n).next(".tms-edit-actions").find(".upload").click(),!1):(27===e.keyCode&&this.editCancelHandler(e,t,n),!0))},e.prototype.notifyRendered=function(e,t){e&&_.defer(function(){ea.publish(nsCons.EVENT_CHAT_LAST_ITEM_RENDERED,{item:t})})},e.prototype.stowHandler=function(e){$.post("/admin/chat/channel/stow",{id:e.id},function(e,t,n){e.success?toastr.success("收藏消息成功!"):toastr.error(e.data,"收藏消息失败!")})},e.prototype.openEditHandler=function(e){$.post("/admin/chat/channel/openEdit",{id:e.id,open:!e.openEdit},function(t,n,i){t.success?(e.openEdit=!e.openEdit,toastr.success((e.openEdit?"开启":"关闭")+"协作编辑成功!")):toastr.success((e.openEdit?"关闭":"开启")+"协作编辑失败!")})},e.prototype.replyHandler=function(e){ea.publish(nsCons.EVENT_CHAT_MSG_INSERT,{content:"[[回复#"+e.id+"]("+utils.getUrl()+"?id="+e.id+"){~"+e.creator.username+"}]\n\n"}),$.post("/admin/chat/channel/markAsReadedByChat",{chatId:e.id})},e.prototype.creatorNameHandler=function(e){ea.publish(nsCons.EVENT_CHAT_MSG_INSERT,{content:"{~"+e.creator.username+"} "})},e.prototype.refreshHandler=function(e){$.get("/admin/chat/channel/get",{id:e.id},function(t){e.version!=t.data.version?(_.extend(e,t.data),toastr.success("刷新同步成功!")):toastr.info("消息内容暂无变更!")})},e.prototype.likeHandler=function(e,t){t&&e.isZanVoted||!t&&e.isCaiVoted||$.post("/admin/chat/channel/vote",{id:e.id,url:utils.getUrl(),contentHtml:utils.md2html(e.content),type:t?"Zan":"Cai"},function(n,i,r){n.success?(_.extend(e,n.data),t?e.isZanVoted=!0:e.isCaiVoted=!0):toastr.error(n.data)})},e}(),l=r(s.prototype,"chats",[a],{enumerable:!0,initializer:null}),c=r(s.prototype,"loginUser",[t.bindable],{enumerable:!0,initializer:null}),d=r(s.prototype,"isAt",[t.bindable],{enumerable:!0,initializer:null}),u=r(s.prototype,"channel",[t.bindable],{enumerable:!0,initializer:null}),m=r(s.prototype,"markId",[t.bindable],{enumerable:!0,initializer:null}),p=r(s.prototype,"chatTo",[t.bindable],{enumerable:!0,initializer:null}),o=s))||o)}),define("resources/elements/em-chat-input",["exports","aurelia-framework","common/common-tips","common/common-emoji","simplemde","textcomplete"],function(e,t,n,i,r){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmChatInput=void 0;var c,d,u,m,p,g=a(n),h=a(i),b=a(r);e.EmChatInput=(0,t.containerless)((d=function(){function e(){var t=this;s(this,e),o(this,"chatTo",u,this),o(this,"isAt",m,this),o(this,"channel",p,this),this.members=[],this.isMobile=utils.isMobile(),this.subscribe=ea.subscribe(nsCons.EVENT_SHOW_HOTKEYS_MODAL,function(e){t.emHotkeysModal.show()}),this.subscribe1=ea.subscribe(nsCons.EVENT_CHAT_CHANNEL_MEMBER_ADD_OR_REMOVE,function(e){t.members=[nsCtx.memberAll].concat(e.members)}),this.subscribe2=ea.subscribe(nsCons.EVENT_CHAT_MSG_INSERT,function(e){t.insertContent(e.content)})}return e.prototype.channelChanged=function(){this.channel?this.members=[nsCtx.memberAll].concat(this.channel.members):this.members=[]},e.prototype.unbind=function(){this.subscribe.dispose(),this.subscribe1.dispose(),this.subscribe2.dispose()},e.prototype.initHotkeys=function(){var e=this;$(document).bind("keydown","r",function(){event.preventDefault(),e.simplemde.codemirror.focus()})},e.prototype.attached=function(){this.initSimpleMDE(this.chatInputRef),this.initDropzone(),this.initPaste(),this.initHotkeys()},e.prototype.initPaste=function(){var e=this,t=void 0;t=this.$chatMsgInputRef.is("textarea")?$(this.$chatMsgInputRef).pastableTextarea():$(this.$chatMsgInputRef).pastableContenteditable(),t&&t.on("pasteImage",function(t,n){$.post("/admin/file/base64",{dataURL:n.dataURL,type:n.blob.type,toType:nsCtx.isAt?"User":"Channel",toId:nsCtx.chatTo},function(t,n,i){t.success&&e.insertContent("![{name}]({baseURL}{path}{uuidName})".replace(/\{name\}/g,t.data.name).replace(/\{baseURL\}/g,utils.getBaseUrl()+"/").replace(/\{path\}/g,t.data.path).replace(/\{uuidName\}/g,t.data.uuidName))})}).on("pasteImageError",function(e,t){toastr.error(t.message,"剪贴板粘贴图片错误!")})},e.prototype.initDropzone=function(){var e=this;this.initUploadDropzone($(".CodeMirror-wrap",this.inputRef),function(){return e.$chatMsgInputRef},!1),this.initUploadDropzone($(this.btnItemUploadRef).children().andSelf(),function(){return e.$chatMsgInputRef},!0),$(this.chatBtnRef).popup({inline:!0,hoverable:!0,position:"bottom left",delay:{show:300,hide:300}})},e.prototype.initUploadDropzone=function(e,t,n){var i=this;$(e).dropzone({url:"/admin/file/upload",paramName:"file",clickable:!!n,dictDefaultMessage:"",maxFilesize:10,addRemoveLinks:!0,previewsContainer:this.chatStatusBarRef,previewTemplate:this.previewTemplateRef.innerHTML,dictCancelUpload:"取消上传",dictCancelUploadConfirmation:"确定要取消上传吗?",dictFileTooBig:"文件过大({{filesize}}M),最大限制:{{maxFilesize}}M",init:function(){this.on("sending",function(e,n,i){t()?(i.append("toType",nsCtx.isAt?"User":"Channel"),i.append("toId",nsCtx.chatTo)):this.removeAllFiles(!0)}),this.on("success",function(e,t){t.success?($.each(t.data,function(e,t){"Image"==t.type?i.insertContent("![{name}]({baseURL}{path}{uuidName}) ".replace(/\{name\}/g,t.name).replace(/\{baseURL\}/g,utils.getBaseUrl()+"/").replace(/\{path\}/g,t.path).replace(/\{uuidName\}/g,t.uuidName)):i.insertContent("[{name}]({baseURL}{path}{uuidName}) ".replace(/\{name\}/g,t.name).replace(/\{baseURL\}/g,utils.getBaseUrl()+"/").replace(/\{path\}/g,"admin/file/download/").replace(/\{uuidName\}/g,t.id))}),toastr.success("上传成功!")):toastr.error(t.data,"上传失败!")}),this.on("error",function(e,t,n){toastr.error(t,"上传失败!")}),this.on("complete",function(e){this.removeFile(e)})}})},e.prototype.initSimpleMDE=function(e){var t=this;this.simplemde=new b.default({element:e,spellChecker:!1,status:!1,autofocus:!0,toolbar:!1,autoDownloadFontAwesome:!1,insertTexts:{table:["","\n\n| 列1 | 列2 | 列3 |\n| ------ | ------ | ------ |\n| 文本 | 文本 | 文本 |\n\n"]},previewRender:function(e,n){return t.simplemde.markdown(utils.preParse(e))}}),this.$chatMsgInputRef=$(this.inputRef).find(".textareaWrapper .CodeMirror textarea"),0===this.$chatMsgInputRef.size()&&(this.$chatMsgInputRef=$(this.inputRef).find('.textareaWrapper .CodeMirror [contenteditable="true"]')),this.initTextcomplete()},e.prototype.initTextcomplete=function(){var e=this;$(this.$chatMsgInputRef).textcomplete([{match:/(|\b)(\/.*)$/,search:function(e,t){var n=_.keys(g.default);t($.map(n,function(t){return 0===t.indexOf(e)?t:null}))},template:function(e,t){return g.default[e].label},replace:function(t){return e.tipsActionHandler(t)?(e.setCaretPosition(g.default[t].line,g.default[t].ch),"$1"+g.default[t].value):""}},{match:/(^|\s)@(\w*)$/,search:function(t,n){n($.map(e.members,function(e){return e.enabled&&e.username.indexOf(t)>=0?e.username:null}))},template:function(t,n){var i=_.find(e.members,{username:t});return i.name+" - "+i.mails+" ("+i.username+")"},replace:function(e){return"$1{~"+e+"}"}},{match:/(^|\s):([\+\-\w]*)$/,search:function(e,t){t($.map(h.default,function(t){return _.some(t.split("_"),function(t){return 0===t.indexOf(e)})?t:null}))},template:function(e,t){if("search"==e)return"表情查找 - :search";var n=":"+e+":";return emojify.replace(n)+" - "+n},replace:function(t){return e.tipsActionHandler(t)?"$1:"+t+": ":""}}],{appendTo:".tms-chat-status-bar",maxCount:nsCons.NUM_TEXT_COMPLETE_MAX_COUNT}),this.simplemde.codemirror.on("keydown",function(t,n){_.includes([13,38,40],n.keyCode)&&e.isTipsShow()?n.preventDefault():n.ctrlKey&&13===n.keyCode?e.sendChatMsg():27===n.keyCode?e.simplemde.value(""):n.ctrlKey&&85==n.keyCode?$(e.btnItemUploadRef).find(".content").click():n.ctrlKey&&191==n.keyCode&&e.emHotkeysModal.show()})},e.prototype.setCaretPosition=function(e,t){var n=this;(e||t)&&_.delay(function(){var i=n.simplemde.codemirror.getCursor();n.simplemde.codemirror.setCursor({line:i.line-(e?e:0),ch:i.line?t?t:0:i.ch-(t?t:0)})},100)},e.prototype.sendChatMsg=function(){var e=this,t=this.simplemde.value();if(!$.trim(t))return void this.simplemde.value("");if(!this.sending){this.sending=!0;var n=utils.md2html(t),i=void 0,r=void 0;this.isAt?(i="/admin/chat/direct/create",r={baseUrl:utils.getBaseUrl(),path:wurl("path"),chatTo:this.chatTo,content:t,contentHtml:n}):(i="/admin/chat/channel/create",r={url:utils.getUrl(),channelId:this.channel.id,usernames:utils.parseUsernames(t,this.members).join(","),content:t,contentHtml:n}),$.post(i,r,function(t,n,i){t.success?(e.simplemde.value(""),ea.publish(nsCons.EVENT_CHAT_MSG_SENDED,{data:t})):toastr.error(t.data,"发送消息失败!")}).always(function(){e.sending=!1})}},e.prototype.sendChatMsgHandler=function(){this.sendChatMsg()},e.prototype.isTipsShow=function(){return 1===$(this.chatStatusBarRef).find(".textcomplete-dropdown:visible").size()},e.prototype.insertContent=function(e,t){try{var n=t?t.codemirror:this.simplemde.codemirror,i=n.getCursor();i&&(n.replaceRange(e,i,i),n.focus())}catch(e){console.log(e)}},e.prototype.tipsActionHandler=function(e){if("/upload"==e)$(this.btnItemUploadRef).find(".content").click();else if("/shortcuts"==e)this.emHotkeysModal.show();else{if("search"!=e)return!0;_.delay(function(){utils.openNewWin(nsCons.STR_EMOJI_SEARCH_URL)},200)}return!1},e}(),u=l(d.prototype,"chatTo",[t.bindable],{enumerable:!0,initializer:null}),m=l(d.prototype,"isAt",[t.bindable],{enumerable:!0,initializer:null}),p=l(d.prototype,"channel",[t.bindable],{enumerable:!0,initializer:null}),c=d))||c}),define("resources/elements/em-chat-member-popup",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.EmChatMemberPopup=void 0;var i;e.EmChatMemberPopup=(0,t.containerless)(i=function(){function e(){var t=this;n(this,e),this.members=[],this.member={},this.subscribe=ea.subscribe(nsCons.EVENT_CHAT_MEMBER_POPUP_SHOW,function(e){if(t.channel=e.channel,t.username=e.username,t.target=e.target,"all"==t.username){if(!t.channel)return;t.members=t.channel.members}else{t.member=utils.getUser(t.username);var n=utils.getUser(t.member.creator);t.member.creatorName=n&&n.name?n.name:t.member.creator}_.defer(function(){$(t.target).popup({popup:t.popup,hoverable:!0,inline:!1,silent:!0,movePopup:!1,position:"bottom left",jitter:300,prefer:"opposite",delay:{show:300,hide:300}}).popup("show")})})}return e.prototype.unbind=function(){this.subscribe.dispose()},e}())||i}),define("resources/elements/em-chat-msg-popup",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.EmChatMsgPopup=void 0;var i;e.EmChatMsgPopup=(0,t.containerless)(i=function(){function e(){var t=this;n(this,e),this.subscribe=ea.subscribe(nsCons.EVENT_CHAT_MSG_POPUP_SHOW,function(e){t.id=e.id,t.target=e.target,$(t.target).popup({popup:t.popup,hoverable:!0,inline:!1,movePopup:!1,silent:!0,position:"bottom left",jitter:300,prefer:"opposite",delay:{show:300,hide:300},onShow:function(){$.get("/admin/chat/channel/get",{id:t.id},function(e){e.success?t.chatMsg=e.data:toastr.error(e.data,"加载失败!")})}}).popup("show")})}return e.prototype.unbind=function(){this.subscribe.dispose()},e}())||i}),define("resources/elements/em-chat-schedule-edit",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmChatScheduleEdit=void 0;var a,o,s;e.EmChatScheduleEdit=(0,t.containerless)((o=function(){function e(){var t=this;i(this,e),n(this,"loginUser",s,this),this.actorsOpts={onAdd:function(e,n,i){$.post("/admin/schedule/addActors",{id:t.event.id,basePath:utils.getBasePath(),actors:e},function(e,t,n){e.success?(toastr.success("添加参与者成功!"),ea.publish(nsCons.EVENT_SCHEDULE_REFRESH,{})):toastr.error(e.data)})},onLabelRemove:function(e){return t.loginUser.username!=e&&void $.post("/admin/schedule/removeActors",{id:t.event.id,basePath:utils.getBasePath(),actors:e},function(e,t,n){e.success?(toastr.success("移除参与者成功!"),ea.publish(nsCons.EVENT_SCHEDULE_REFRESH,{})):toastr.error(e.data)})}}}return e.prototype.attached=function(){$(this.startRef).calendar({today:!0,endCalendar:$(this.endRef)}),$(this.endRef).calendar({today:!0,startCalendar:$(this.startRef)})},e.prototype.initMembersUI=function(e){var t=this;e&&_.defer(function(){var e=[t.loginUser.username];t.event&&(e=_.map(t.event.actors,"username")),$(t.actorsRef).dropdown().dropdown("clear").dropdown("set selected",e).dropdown(t.actorsOpts)})},e.prototype.titleKeyupHandler=function(e){e.ctrlKey&&13===e.keyCode&&this.updateHandler()},e.prototype.clearStartDateHandler=function(){$(this.startRef).calendar("clear")},e.prototype.clearEndDateHandler=function(){$(this.endRef).calendar("clear")},e.prototype.show=function(e){this.event=_.clone(e),this.showHandler(),$(this.scheduleEditRef).popup({on:"click",inline:!0,silent:!0,position:"bottom center",jitter:300,prefer:"opposite",delay:{show:300,hide:300}}).popup("show")},e.prototype.showHandler=function(){var e=this;this.users=window.tmsUsers,$(this.actorsRef).dropdown().dropdown("clear"),_.defer(function(){e.event.start?$(e.startRef).calendar("set date",e.event.start.toDate()):$(e.startRef).calendar("clear"),e.event.end?$(e.endRef).calendar("set date",e.event.end.toDate()):$(e.endRef).calendar("clear");var t=_.map(e.event.actors,"username");$(e.actorsRef).dropdown("set selected",t).dropdown(e.actorsOpts),e.event.creator.username==e.loginUser.username&&$(e.titleRef).focus(),autosize.update(e.titleRef)})},e.prototype.updateHandler=function(){var e=this;if(!this.event.title)return void toastr.error("日程内容不能为空!");var t={id:this.event.id,basePath:utils.getBasePath(),title:this.event.title},n=$(this.startRef).calendar("get date"),i=$(this.endRef).calendar("get date");n?t.startDate=n:t.startDate=new Date,i&&(t.endDate=i),$.post("/admin/schedule/update2",t,function(t,n,i){t.success?(toastr.success("更新日程成功!"),$(e.scheduleEditRef).popup("hide"),ea.publish(nsCons.EVENT_SCHEDULE_REFRESH,{})):toastr.error(t.data)})},e.prototype.delHandler=function(){var e=this;this.emConfirmModal.show({onapprove:function(){$.post("/admin/schedule/delete",{id:e.event.id,basePath:utils.getBasePath()},function(e,t,n){e.success?(toastr.success("日程删除成功!"),ea.publish(nsCons.EVENT_SCHEDULE_REFRESH,{})):toastr.error(e.data)})}})},e}(),s=r(o.prototype,"loginUser",[t.bindable],{enumerable:!0,initializer:null}),a=o))||a}),define("resources/elements/em-chat-schedule-remind",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmChatScheduleRemind=void 0;var a,o,s;e.EmChatScheduleRemind=(0,t.containerless)((o=function(){function e(){i(this,e),n(this,"events",s,this),this.interval=5e3,this.headOffset=6e5,this.reminded=[],this._pollCheck()}return e.prototype.unbind=function(){this.timer&&clearInterval(this.timer)},e.prototype._pollCheck=function(){var e=this;this.timer=setInterval(function(){if(e.events){var t=(new Date).getTime();_.each(e.events,function(n){if(n.start&&!_.includes(e.reminded,n.id)){var i=n.start;i>t&&i '+i.name+" ("+i.username+")"})}),$.each(t.data.channels,function(t,i){_.find(_.filter(e.shares,function(e){return"channel"==e._type}),{name:i.name})||n.results.push({item:i,title:' '+i.title+" ("+i.name+")"})}),n},url:"/admin/blog/share/to/search?search={query}"}}),$(this.shareRef).popup({on:"click",inline:!0,silent:!0,position:"bottom right",jitter:300,delay:{show:300,hide:300},onVisible:function(){$(e.inputSearchRef).focus()}})},e.prototype.shareSearchKeyupHandler=function(e){if(13===e.keyCode&&!$(this.searchRef).search("is visible")){ -var t=$(this.inputSearchRef).val();utils.isMail(t)&&(_.find(_.filter(this.shares,function(e){return"mail"==e._type}),{mail:t})||(this.shares.push({_id:_.uniqueId("share-item-"),_type:"mail",mail:t}),$(this.inputSearchRef).val("")))}},e.prototype.show=function(){$(this.shareRef).popup("show")},e.prototype.removeShareHandler=function(e){this.shares=_.reject(this.shares,{_id:e._id})},e.prototype.cancelHandler=function(){this._reset()},e.prototype._reset=function(){this.shares=[],this.desc="",$(this.inputSearchRef).val(""),$(this.shareRef).popup("hide")},e.prototype.shareHandler=function(){var e=this;return 0===this.shares.length?void toastr.error("请先指定沟通消息分享用户或者频道或者邮箱!"):void(this.ajaxS=$.post("/admin/chat/"+(this.isAt?"direct":"channel")+"/share",{basePath:utils.getBasePath(),href:this.basePath+"#/chat/"+(this.isAt?"@"+this.loginUser.username:this.channel.name)+"?id="+this.chat.id,id:this.chat.id,desc:this.desc,html:utils.md2html(this.chat.content),users:_.chain(this.shares).filter(function(e){return"user"==e._type}).map("username").join().value(),channels:_.chain(this.shares).filter(function(e){return"channel"==e._type}).map("name").join().value(),mails:_.chain(this.shares).filter(function(e){return"mail"==e._type}).map("mail").join().value()},function(t,n,i){t.success?(e._reset(),toastr.success("沟通消息分享成功!")):toastr.error(t.data,"沟通消息分享失败!")}))},e}(),s=r(o.prototype,"chat",[t.bindable],{enumerable:!0,initializer:null}),l=r(o.prototype,"channel",[t.bindable],{enumerable:!0,initializer:null}),c=r(o.prototype,"loginUser",[t.bindable],{enumerable:!0,initializer:null}),d=r(o.prototype,"isAt",[t.bindable],{enumerable:!0,initializer:null}),a=o))||a}),define("resources/elements/em-chat-sidebar-left",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmChatSidebarLeft=void 0;var a,o,s,l,c,d,u;e.EmChatSidebarLeft=(0,t.containerless)((o=function(){function e(){var t=this;i(this,e),n(this,"users",s,this),n(this,"loginUser",l,this),n(this,"channels",c,this),n(this,"chatTo",d,this),n(this,"isAt",u,this),this.filter="",this.isSuper=nsCtx.isSuper,this.subscribe=ea.subscribe(nsCons.EVENT_CHANNEL_ACTIONS,function(e){t[e.action](e.item)}),this.subscribe1=ea.subscribe(nsCons.EVENT_SYSTEM_LINKS_REFRESH,function(e){t._refreshSysLinks()})}return e.prototype.usersChanged=function(){this._filter()},e.prototype.channelsChanged=function(){this._filter()},e.prototype.loginUserChanged=function(){this.loginUser&&(this.isSuper=utils.isSuperUser(this.loginUser))},e.prototype._refreshSysLinks=function(){var e=this;$.get("/admin/link/listByApp",function(t){t.success?e.sysLinks=t.data:e.sysLinks=[]})},e.prototype.unbind=function(){this.subscribe.dispose(),this.subscribe1.dispose()},e.prototype.bind=function(e,t){this._refreshSysLinks()},e.prototype.attached=function(){var e=this;$(this.logoRef).on("mouseenter",function(t){$(e.logoRef).animateCss("flip")})},e.prototype._filter=function(){var e=this;_.each(this.users,function(t){t.hidden=t.username.indexOf(e.filter)==-1}),_.each(this.channels,function(t){t.hidden=t.name.indexOf(e.filter)==-1})},e.prototype.chatToUserFilerKeyupHanlder=function(e){if(this._filter(),13===e.keyCode){var t=_.find(this.users,{hidden:!1});if(t)return void(window.location=wurl("path")+("#/chat/@"+t.username));var n=_.find(this.channels,{hidden:!1});if(n)return void(window.location=wurl("path")+("#/chat/"+n.name))}},e.prototype.clearFilterHandler=function(){var e=this;this.filter="",_.each(this.users,function(t){t.hidden=t.username.indexOf(e.filter)==-1}),_.each(this.channels,function(t){t.hidden=t.name.indexOf(e.filter)==-1})},e.prototype.editHandler=function(e){this.selectedChannel=e,this.channelEditMd.show()},e.prototype.delHandler=function(e){var t=this;this.confirmMd.show({onapprove:function(){$.post("/admin/channel/delete",{id:e.id},function(n){n.success?(toastr.success("删除频道成功!"),_.remove(t.channels,{id:e.id}),ea.publish(nsCons.EVENT_CHAT_CHANNEL_DELETED,{channel:e})):toastr.error(n.data,"删除频道失败!")})}})},e.prototype.membersMgrHandler=function(e){this.selectedChannel=e,this.channelMembersMgrMd.show()},e.prototype.membersShowHandler=function(e){this.selectedChannel=e,this.channelMembersShowMd.show()},e.prototype.leaveHandler=function(e){this.confirmMd.show({content:'确定要离开频道'+e.title+"吗?",onapprove:function(){$.post("/admin/channel/leave",{id:e.id},function(e){e.success?(toastr.success("离开频道成功!"),ea.publish(nsCons.EVENT_CHAT_CHANNEL_LEAVED,{channel:e.data})):toastr.error(e.data,"离开频道失败!")})}})},e.prototype.switchHandler=function(){ea.publish(nsCons.EVENT_SWITCH_CHAT_TO,{})},e.prototype.addChannelLinkHandler=function(e){this.sysLinkMgrVm.show()},e}(),s=r(o.prototype,"users",[t.bindable],{enumerable:!0,initializer:null}),l=r(o.prototype,"loginUser",[t.bindable],{enumerable:!0,initializer:null}),c=r(o.prototype,"channels",[t.bindable],{enumerable:!0,initializer:null}),d=r(o.prototype,"chatTo",[t.bindable],{enumerable:!0,initializer:null}),u=r(o.prototype,"isAt",[t.bindable],{enumerable:!0,initializer:null}),a=o))||a}),define("resources/elements/em-chat-sidebar-right",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmChatSidebarRight=void 0;var a,o,s,l,c;e.EmChatSidebarRight=(0,t.containerless)((o=function(){function e(){var t,r=this;i(this,e),this.last=!0,n(this,"loginUser",s,this),n(this,"isAt",l,this),n(this,"channel",c,this),this.forAction="",this.forShow="",this.basePath=utils.getBasePath(),this.headerMapping=(t={},t[nsCons.ACTION_TYPE_SEARCH]="无符合检索结果",t[nsCons.ACTION_TYPE_AT]="暂无@消息",t[nsCons.ACTION_TYPE_STOW]="暂无收藏消息",t),this.subscribe=ea.subscribe(nsCons.EVENT_CHAT_SEARCH_RESULT,function(e){r._mappingActionShow(e.action);var t=e.result;r.search=e.search,r.page=t,r.chats=t.content,r.last=t.last,r.moreCnt=t.totalElements-(t.number+1)*t.size}),this.subscribe2=ea.subscribe(nsCons.EVENT_CHAT_SHOW_AT,function(e){r._mappingActionShow(e.action);var t=e.result;r.page=t,r.chats=_.map(t.content,function(e){var t=e.chatChannel;return t.chatAt=e,t}),r.last=t.last,r.moreCnt=t.totalElements-(t.number+1)*t.size}),this.subscribe1=ea.subscribe(nsCons.EVENT_CHAT_SHOW_STOW,function(e){r._mappingActionShow(e.action),r.chats=e.result,r.last=!0}),this.subscribe3=ea.subscribe(nsCons.EVENT_CHAT_SHOW_DIR,function(e){r._mappingActionShow(e.action),$(r.dirRef).empty().append(e.result)}),this.subscribe4=ea.subscribe(nsCons.EVENT_CHAT_SHOW_ATTACH,function(e){r._mappingActionShow(e.action)}),this.subscribe5=ea.subscribe(nsCons.EVENT_CHAT_SHOW_SCHEDULE,function(e){r._mappingActionShow(e.action)})}return e.prototype.unbind=function(){this.subscribe.dispose(),this.subscribe1.dispose(),this.subscribe2.dispose(),this.subscribe3.dispose(),this.subscribe4.dispose(),this.subscribe5.dispose()},e.prototype._mappingActionShow=function(e){this.forAction=e,_.includes([nsCons.ACTION_TYPE_SEARCH,nsCons.ACTION_TYPE_STOW,nsCons.ACTION_TYPE_AT],this.forAction)?this.forShow="chat-msg":_.includes([nsCons.ACTION_TYPE_DIR],this.forAction)?this.forShow="wiki-dir":_.includes([nsCons.ACTION_TYPE_ATTACH],this.forAction)?(this.forShow="chat-attach",this.chatAttachVm.fetch()):_.includes([nsCons.ACTION_TYPE_SCHEDULE],this.forAction)&&(this.forShow="chat-schedule",this.chatScheduleVm.show())},e.prototype.attached=function(){this.initHotkeys()},e.prototype.initHotkeys=function(){var e=this;$(document).bind("keydown","o",function(t){t.preventDefault();var n=_.find(e.chats,{isHover:!0});n&&(n.isOpen=!n.isOpen)})},e.prototype.searchItemMouseleaveHandler=function(e){e.isOpen=!1,e.isHover=!1},e.prototype.searchItemMouseenterHandler=function(e){e.isHover=!0},e.prototype.gotoChatHandler=function(e){ea.publish(nsCons.EVENT_CHAT_SEARCH_GOTO_CHAT_ITEM,{chatItem:e})},e.prototype.openSearchItemHandler=function(e){e.isOpen=!e.isOpen},e.prototype.searchMoreHandler=function(){var e=this;this.forAction==nsCons.ACTION_TYPE_SEARCH?this.searchMoreP=$.get("/admin/chat/direct/search",{search:this.search,size:this.page.size,page:this.page.number+1},function(t){t.success&&(e.chats=_.concat(e.chats,t.data.content),e.page=t.data,e.last=t.data.last,e.moreCnt=t.data.totalElements-(t.data.number+1)*t.data.size)}):this.searchMoreP=$.get("/admin/chat/channel/getAts",{size:this.page.size,page:this.page.number+1},function(t){t.success&&(e.chats=_.concat(e.chats,_.map(t.data.content,function(e){var t=e.chatChannel;return t.chatAt=e,t})),e.page=t.data,e.last=t.data.last,e.moreCnt=t.data.totalElements-(t.data.number+1)*t.data.size)})},e.prototype.removeStowHandler=function(e){var t=this;$.post("/admin/chat/channel/removeStow",{id:e.chatStow.id},function(n,i,r){n.success?(t.chats=_.reject(t.chats,{id:e.id}),toastr.success("移除收藏消息成功!")):toastr.error(n.data,"移除收藏消息失败!")})},e.prototype.removeAtHandler=function(e){var t=this;$.post("/admin/chat/channel/markAsReaded",{chatAtId:e.chatAt.id},function(n,i,r){n.success?t.chats=_.reject(t.chats,{id:e.id}):toastr.error(n.data,"移除@消息失败!")})},e}(),s=r(o.prototype,"loginUser",[t.bindable],{enumerable:!0,initializer:null}),l=r(o.prototype,"isAt",[t.bindable],{enumerable:!0,initializer:null}),c=r(o.prototype,"channel",[t.bindable],{enumerable:!0,initializer:null}),a=o))||a}),define("resources/elements/em-chat-system-link-mgr",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.EmChatSystemLinkMgr=void 0;var i;e.EmChatSystemLinkMgr=(0,t.containerless)(i=function(){function e(){n(this,e),this.links=[]}return e.prototype.addHandler=function(){var e=this;$.post("/admin/link/create",{title:this.title,href:this.href,type:"App"},function(t,n,i){t.success?(e.title="",e.href="",e.links.push(t.data),ea.publish(nsCons.EVENT_SYSTEM_LINKS_REFRESH,{})):toastr.error(t.data)})},e.prototype.delHandler=function(e){var t=this;$.post("/admin/link/delete",{id:e.id},function(n,i,r){n.success?(t.links=_.reject(t.links,{id:e.id}),ea.publish(nsCons.EVENT_SYSTEM_LINKS_REFRESH,{}),toastr.success("删除成功!")):toastr.error(n.data)})},e.prototype.editHandler=function(e){e.oldTitle=e.title,e.oldHref=e.href,e.isEditing=!0},e.prototype.updateHandler=function(e){$.post("/admin/link/update",{id:e.id,title:e.title,href:e.href},function(t,n,i){t.success?(e.isEditing=!1,ea.publish(nsCons.EVENT_SYSTEM_LINKS_REFRESH,{}),toastr.success("更新成功!")):toastr.error(t.data)})},e.prototype.showHandler=function(){var e=this;$.get("/admin/link/listByApp",function(t){t.success?e.links=t.data:e.links=[]})},e.prototype.show=function(){this.emModal.show({autoDimmer:!1})},e.prototype.approveHandler=function(e){},e}())||i}),define("resources/elements/em-chat-top-menu",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmChatTopMenu=void 0;var a,o,s,l,c,d,u,m,p,g,h;e.EmChatTopMenu=(0,t.containerless)((o=function(){function e(){var t=this;i(this,e),n(this,"loginUser",s,this),n(this,"chatUser",l,this),n(this,"users",c,this),n(this,"channels",d,this),n(this,"channel",u,this),n(this,"loginUser",m,this),n(this,"chatId",p,this),n(this,"chatTo",g,this),n(this,"isAt",h,this),this.isRightSidebarShow=!1,this.activeType="",this.ACTION_TYPE_SEARCH=nsCons.ACTION_TYPE_SEARCH,this.ACTION_TYPE_STOW=nsCons.ACTION_TYPE_STOW,this.ACTION_TYPE_AT=nsCons.ACTION_TYPE_AT,this.ACTION_TYPE_DIR=nsCons.ACTION_TYPE_DIR,this.ACTION_TYPE_ATTACH=nsCons.ACTION_TYPE_ATTACH,this.ACTION_TYPE_SCHEDULE=nsCons.ACTION_TYPE_SCHEDULE,this.countAt=null,this.newAtCnt=0,this.channelLinks=[],this.subscribe=ea.subscribe(nsCons.EVENT_CHAT_MSG_WIKI_DIR,function(e){t.dir=e.dir,t.activeType==t.ACTION_TYPE_DIR&&t.isRightSidebarShow&&ea.publish(nsCons.EVENT_CHAT_SHOW_DIR,{action:t.activeType,result:t.dir})}),this.subscribe1=ea.subscribe(nsCons.EVENT_CHAT_POLL_UPDATE,function(e){null!==t.countAt&&t.newAtCnt<=0&&(t.newAtCnt=e.countAt-t.countAt),t.countAt=e.countAt,t.countMyRecentSchedule=e.countMyRecentSchedule}),this.subscribe2=ea.subscribe(nsCons.EVENT_SWITCH_CHAT_TO,function(e){$(t.chatToDropdownRef).dropdown("toggle")}),this.subscribe3=ea.subscribe(nsCons.EVENT_CHANNEL_LINKS_REFRESH,function(e){t._refreshChannelLinks()})}return e.prototype.loginUserChanged=function(){this.loginUser&&(this.isSuper=utils.isSuperUser(this.loginUser))},e.prototype.chatToChanged=function(){$(this.chatToDropdownRef).dropdown("set selected",this.chatId).dropdown("hide")},e.prototype.channelChanged=function(){this._refreshChannelLinks()},e.prototype._refreshChannelLinks=function(){var e=this;this.channel&&$.get("/admin/link/listBy",{channelId:this.channel.id},function(t){t.success?e.channelLinks=t.data:e.channelLinks=[]})},e.prototype.unbind=function(){this.subscribe.dispose(),this.subscribe1.dispose(),this.subscribe2.dispose(),this.subscribe3.dispose()},e.prototype.attached=function(){this.initHotkeys(),this.initSearch()},e.prototype.initSearch=function(){var e=this,t=[];if(localStorage){var n=localStorage.getItem("tms/chat-direct:search");t=n?$.parseJSON(n):[]}this.searchSource=t,$(this.searchRef).search({source:t,onSelect:function(t,n){e.searchHandler()},onResults:function(){$(e.searchRef).search("hide results")}})},e.prototype.searchHandler=function(){var e=this;$(this.searchRef).search("hide results");var t=$(this.searchInputRef).val();if(!t||t.length<2)return void toastr.error("检索条件至少需要两个字符!");this.search=t;var n=!1;$.each(this.searchSource,function(e,i){if(i.title==t)return n=!0,!1}),n||(this.searchSource.splice(0,0,{title:t}),$(this.searchRef).search({source:_.clone(this.searchSource)})),localStorage&&localStorage.setItem("tms/chat-direct:search",JSON.stringify(this.searchSource));var i=void 0,r=void 0;this.isAt?(i="/admin/chat/direct/search",r={search:this.search,size:20,page:0}):(i="/admin/chat/channel/search",r={search:this.search,channelId:this.channel.id,size:20,page:0}),this.searchingP=$.get(i,r,function(t){t.success&&(e.toggleRightSidebar(!0),ea.publish(nsCons.EVENT_CHAT_SEARCH_RESULT,{action:e.activeType,result:t.data,search:e.search}))})},e.prototype.initHotkeys=function(){var e=this;$(document).bind("keydown","s",function(t){t.preventDefault(),e.toggleRightSidebar()}).bind("keydown","ctrl+k",function(t){t.preventDefault(),$(e.chatToDropdownRef).dropdown("toggle")}),$(this.filterChatToUser).bind("keydown","ctrl+k",function(t){t.preventDefault(),$(e.chatToDropdownRef).dropdown("toggle")})},e.prototype.initChatToDropdownHandler=function(e){var t=this;e&&_.defer(function(){$(t.chatToDropdownRef).dropdown().dropdown("set selected",t.chatId).dropdown({onChange:function(e,t,n){window.location=wurl("path")+("#/chat/"+n.attr("data-id"))}})})},e.prototype.searchFocusHandler=function(){$(this.searchInputRef).css("width","auto"),$(this.searchRemoveRef).show(),this.isActiveSearch=!0},e.prototype.searchBlurHandler=function(){$(this.searchInputRef).val()||($(this.searchInputRef).css("width","95px"),$(this.searchRemoveRef).hide(),this.isActiveSearch=!1)},e.prototype.sibebarRightHandler=function(e){this.toggleRightSidebar()},e.prototype.toggleRightSidebar=function(e){_.isUndefined(e)?this.isRightSidebarShow=!this.isRightSidebarShow:this.isRightSidebarShow=e,ea.publish(nsCons.EVENT_CHAT_SIDEBAR_TOGGLE,{isShow:this.isRightSidebarShow})},e.prototype.searchKeyupHandler=function(e){return 13===e.keyCode?(this.activeType=nsCons.ACTION_TYPE_SEARCH,this.searchHandler()):27===e.keyCode&&this.clearSearchHandler(),!0},e.prototype.clearSearchHandler=function(){$(this.searchInputRef).val("").focus()},e.prototype.showStowHandler=function(e){var t=this;return this.isRightSidebarShow&&this.activeType==nsCons.ACTION_TYPE_STOW&&!e.ctrlKey?void this.toggleRightSidebar():(this.activeType=nsCons.ACTION_TYPE_STOW,void(this.ajaxStow=$.get("/admin/chat/channel/getStows",function(e){if(e.success){var n=_.map(e.data,function(e){var t=e.chatChannel;return t.chatStow=e,t});ea.publish(nsCons.EVENT_CHAT_SHOW_STOW,{action:t.activeType,result:_.reverse(n)}),t.toggleRightSidebar(!0)}else toastr.error(e.data,"获取收藏消息失败!")})))},e.prototype.showAtHandler=function(e){var t=this;return this.isRightSidebarShow&&this.activeType==nsCons.ACTION_TYPE_AT&&0==this.newAtCnt&&!e.ctrlKey?void this.toggleRightSidebar():(this.activeType=nsCons.ACTION_TYPE_AT,this.newAtCnt=0,void(this.ajaxAt=$.get("/admin/chat/channel/getAts",{page:0,size:20},function(e){e.success?(ea.publish(nsCons.EVENT_CHAT_SHOW_AT,{action:t.activeType,result:e.data}),t.toggleRightSidebar(!0)):toastr.error(e.data,"获取@消息失败!")})))},e.prototype.logoutHandler=function(){$.post("/admin/logout").always(function(){utils.redirect2Login()})},e.prototype.showWikiDirHandler=function(e){return this.isRightSidebarShow&&this.activeType==nsCons.ACTION_TYPE_DIR&&!e.ctrlKey?void this.toggleRightSidebar():(this.activeType=nsCons.ACTION_TYPE_DIR,ea.publish(nsCons.EVENT_CHAT_SHOW_DIR,{action:this.activeType,result:this.dir}),void this.toggleRightSidebar(!0))},e.prototype.showAttachHandler=function(e){return this.isRightSidebarShow&&this.activeType==nsCons.ACTION_TYPE_ATTACH&&!e.ctrlKey?void this.toggleRightSidebar():(this.activeType=nsCons.ACTION_TYPE_ATTACH,ea.publish(nsCons.EVENT_CHAT_SHOW_ATTACH,{action:this.activeType}),void this.toggleRightSidebar(!0))},e.prototype.showScheduleHandler=function(e){return this.isRightSidebarShow&&this.activeType==nsCons.ACTION_TYPE_SCHEDULE&&!e.ctrlKey?void this.toggleRightSidebar():(this.activeType=nsCons.ACTION_TYPE_SCHEDULE,ea.publish(nsCons.EVENT_CHAT_SHOW_SCHEDULE,{action:this.activeType}),void this.toggleRightSidebar(!0))},e.prototype.userEditHandler=function(){this.userEditMd.show()},e.prototype.membersShowHandler=function(e,t){t.stopImmediatePropagation(),ea.publish(nsCons.EVENT_CHANNEL_ACTIONS,{action:"membersShowHandler",item:e})},e.prototype.leaveHandler=function(e,t){t.stopImmediatePropagation(),ea.publish(nsCons.EVENT_CHANNEL_ACTIONS,{action:"leaveHandler",item:e})},e.prototype.membersMgrHandler=function(e,t){t.stopImmediatePropagation(),ea.publish(nsCons.EVENT_CHANNEL_ACTIONS,{action:"membersMgrHandler",item:e})},e.prototype.editHandler=function(e,t){t.stopImmediatePropagation(),ea.publish(nsCons.EVENT_CHANNEL_ACTIONS,{action:"editHandler",item:e})},e.prototype.delHandler=function(e,t){t.stopImmediatePropagation(),ea.publish(nsCons.EVENT_CHANNEL_ACTIONS,{action:"delHandler",item:e})},e.prototype.viewOrMgrUsersHandler=function(e){this.channel.owner.username==this.loginUser.username?this.membersMgrHandler(this.channel,e):this.membersShowHandler(this.channel,e)},e.prototype.channelInfoHandler=function(e){this.channel.owner.username==this.loginUser.username?this.editHandler(this.channel,e):e.stopImmediatePropagation()},e.prototype.userInfoHandler=function(e){e.stopImmediatePropagation()},e.prototype.stopImmediatePropagationHandler=function(e){e.stopImmediatePropagation()},e.prototype.mailToHandler=function(e){e.stopImmediatePropagation(),window.location="mailto:"+this.chatUser.mails},e.prototype.channelLinksHandler=function(e){e.stopImmediatePropagation(),$(this.channelLinksDdRef).dropdown("toggle")},e.prototype.addChannelLinkHandler=function(e){this.channelLinkMgrVm.show()},e.prototype.openChannelLinkHandler=function(e,t){e.stopImmediatePropagation(),utils.openNewWin(t.href)},e}(),s=r(o.prototype,"loginUser",[t.bindable],{enumerable:!0,initializer:null}),l=r(o.prototype,"chatUser",[t.bindable],{enumerable:!0,initializer:null}),c=r(o.prototype,"users",[t.bindable],{enumerable:!0,initializer:null}),d=r(o.prototype,"channels",[t.bindable],{enumerable:!0,initializer:null}),u=r(o.prototype,"channel",[t.bindable],{enumerable:!0,initializer:null}),m=r(o.prototype,"loginUser",[t.bindable],{enumerable:!0,initializer:null}),p=r(o.prototype,"chatId",[t.bindable],{enumerable:!0,initializer:null}),g=r(o.prototype,"chatTo",[t.bindable],{enumerable:!0,initializer:null}),h=r(o.prototype,"isAt",[t.bindable],{enumerable:!0,initializer:null}),a=o))||a}),define("resources/elements/em-checkbox",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmCheckbox=void 0;var a,o,s,l,c,d,u,m,p,g,h,b;e.EmCheckbox=(a=(0,t.bindable)({defaultBindingMode:t.bindingMode.twoWay}),(0,t.containerless)((s=function(){function e(){i(this,e),n(this,"label",l,this),n(this,"title",c,this),n(this,"classes",d,this),n(this,"onchange",u,this),n(this,"onchecked",m,this),n(this,"onunchecked",p,this),n(this,"emCheckboxAll",g,this),n(this,"checked",h,this),n(this,"signal",b,this)}return e.prototype.checkedChanged=function(e,t){e?$(this.checkbox).checkbox("set checked"):$(this.checkbox).checkbox("set unchecked"),this.signal&&bs.signal(this.signal)},e.prototype.attached=function(){var e=this;$(this.checkbox).checkbox({onChecked:function(){e.checked=!0,_.defer(function(){e.emCheckboxAll&&e.emCheckboxAll.refreshCheckedStatus(),e.onchecked&&e.onchecked(e),e.signal&&bs.signal(e.signal)})},onUnchecked:function(){e.checked=!1,_.defer(function(){e.emCheckboxAll&&e.emCheckboxAll.refreshCheckedStatus(),e.onunchecked&&e.onunchecked(e),e.signal&&bs.signal(e.signal)})},onChange:function(){_.defer(function(){e.onchange&&e.onchange(e)})}}),this.checkedChanged(this.checked)},e}(),l=r(s.prototype,"label",[t.bindable],{enumerable:!0,initializer:null}),c=r(s.prototype,"title",[t.bindable],{enumerable:!0,initializer:null}),d=r(s.prototype,"classes",[t.bindable],{enumerable:!0,initializer:function(){return"fitted"}}),u=r(s.prototype,"onchange",[t.bindable],{enumerable:!0,initializer:null}),m=r(s.prototype,"onchecked",[t.bindable],{enumerable:!0,initializer:null}),p=r(s.prototype,"onunchecked",[t.bindable],{enumerable:!0,initializer:null}),g=r(s.prototype,"emCheckboxAll",[t.bindable],{enumerable:!0,initializer:null}),h=r(s.prototype,"checked",[a],{enumerable:!0,initializer:null}),b=r(s.prototype,"signal",[t.bindable],{enumerable:!0,initializer:null}),o=s))||o)}),define("resources/elements/em-confirm-modal",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.EmConfirmModal=void 0;e.EmConfirmModal=function(){function e(){n(this,e),this.config={}}return e.prototype.detached=function(){$(this.md).remove()},e.prototype.attached=function(){var e=this;$(this.md).modal({closable:!1,allowMultiple:!0,onApprove:function(){e.onapprove&&e.onapprove()},onDeny:function(){e.ondeny&&e.ondeny()}})},e.prototype.reset=function(){this.config={title:"操作确认",content:"确定要执行该操作吗?",warning:!1}},e.prototype.show=function(e){this.reset(),e&&(this.config=_.extend(this.config,e)),e&&e.onapprove&&(this.onapprove=e.onapprove),e&&e.ondeny&&(this.ondeny=e.ondeny),$(this.md).modal("show")},e.prototype.hide=function(){$(this.md).modal("hide")},e}()}),define("resources/elements/em-dropdown",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmDropdown=void 0;var a,o,s,l,c,d,u,m,p;e.EmDropdown=(a=(0,t.bindable)({defaultBindingMode:t.bindingMode.twoWay}),o=function(){function e(){i(this,e),n(this,"name",s,this),n(this,"text",l,this),n(this,"labelProp",c,this),n(this,"valueProp",d,this),n(this,"selectedItem",u,this),n(this,"menuItems",m,this),n(this,"classes",p,this)}return e.prototype.selectedItemChanged=function(e,t){var n=this;e&&_.defer(function(){$(n.dropdown).dropdown("set selected",e)})},e.prototype.menuItemsChanged=function(e,t){_.isEmpty(e)&&($(this.dropdown).dropdown("clear"),this.selectedItem=null)},e.prototype.initDropdownHandler=function(e){var t=this;e&&_.defer(function(){$(t.dropdown).dropdown({onChange:function(e,n,i){t.selectedItem=e}}).dropdown("set selected",t.selectedItem)})},e}(),s=r(o.prototype,"name",[t.bindable],{enumerable:!0,initializer:function(){return _.uniqueId("em-dropdown-")}}),l=r(o.prototype,"text",[t.bindable],{enumerable:!0,initializer:function(){return""}}),c=r(o.prototype,"labelProp",[t.bindable],{enumerable:!0,initializer:function(){return"label"}}),d=r(o.prototype,"valueProp",[t.bindable],{enumerable:!0,initializer:function(){return"value"}}),u=r(o.prototype,"selectedItem",[a],{enumerable:!0,initializer:null}),m=r(o.prototype,"menuItems",[t.bindable],{enumerable:!0,initializer:function(){return[]}}),p=r(o.prototype,"classes",[t.bindable],{enumerable:!0,initializer:function(){return"selection"}}),o)}),define("resources/elements/em-hotkeys-modal",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.EmHotkeysModal=void 0;e.EmHotkeysModal=function(){function e(){n(this,e)}return e.prototype.attached=function(){$(this.md).modal()},e.prototype.show=function(){$(this.md).modal("show")},e}()}),define("resources/elements/em-modal",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmModal=void 0;var a,o,s,l,c,d,u,m,p,g,h;e.EmModal=(0,t.containerless)((o=function(){function e(){i(this,e),n(this,"confirmLabel",s,this),n(this,"cancelLabel",l,this),n(this,"onapprove",c,this),n(this,"ondeny",d,this),n(this,"onshow",u,this),n(this,"onvisible",m,this),n(this,"disabled",p,this),n(this,"classes",g,this),n(this,"showConfirm",h,this),this.options={hideOnApprove:!0,autoDimmer:!0}}return e.prototype.detached=function(){$(this.modal).remove()},e.prototype.attached=function(){var e=this;$(this.modal).modal({closable:!1,autofocus:!1,observeChanges:!0,allowMultiple:!0,onShow:function(){e.onshow&&e.onshow(e)},onVisible:function(){e.onvisible&&e.onvisible(e)},onApprove:function(){return e.options.autoDimmer&&e.showDimmer(),e.onapprove&&e.onapprove(e),e.options.hideOnApprove},onDeny:function(){e.ondeny&&e.ondeny(e)}})},e.prototype.showDimmer=function(){this.loading=!0,$(this.modal).find(".dimmer").dimmer("show")},e.prototype.hideDimmer=function(){this.loading=!1,$(this.modal).find(".dimmer").dimmer("hide")},e.prototype.show=function(e){_.extend(this.options,e),$(this.modal).modal("show")},e.prototype.hide=function(){this.hideDimmer(),$(this.modal).modal("hide")},e.prototype.refresh=function(){var e=this;_.defer(function(){$(e.modal).modal("refresh")})},e}(),s=r(o.prototype,"confirmLabel",[t.bindable],{enumerable:!0,initializer:function(){return"确认"}}),l=r(o.prototype,"cancelLabel",[t.bindable],{enumerable:!0,initializer:function(){return"取消"}}),c=r(o.prototype,"onapprove",[t.bindable],{enumerable:!0,initializer:null}),d=r(o.prototype,"ondeny",[t.bindable],{enumerable:!0,initializer:null}),u=r(o.prototype,"onshow",[t.bindable],{enumerable:!0,initializer:null}),m=r(o.prototype,"onvisible",[t.bindable],{enumerable:!0,initializer:null}),p=r(o.prototype,"disabled",[t.bindable],{enumerable:!0,initializer:function(){return!1}}),g=r(o.prototype,"classes",[t.bindable],{enumerable:!0,initializer:function(){return"small"}}),h=r(o.prototype,"showConfirm",[t.bindable],{enumerable:!0,initializer:function(){return!0}}),a=o))||a}),define("resources/elements/em-user-avatar",["exports","aurelia-framework","color-hash"],function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{ -value:!0}),e.EmUserAvatar=void 0;var s,l,c;i(n),e.EmUserAvatar=(0,t.containerless)((l=function(){function e(){a(this,e),r(this,"user",c,this)}return e.prototype.userChanged=function(){if(this.user){this._calcNameChar();var e=colorHash.rgb(this.user.username);this.bgColor="rgba("+e[0]+", "+e[1]+", "+e[2]+", 0.6)",this.color="rgba("+(255-e[0])+", "+(255-e[1])+", "+(255-e[2])+", 1)"}},e.prototype._calcNameChar=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.user.name?this.nameChar=e?_.last(this.user.name):_.first(this.user.name):this.nameChar=e?_.last(this.user.username):_.first(this.user.username)},e.prototype.attached=function(){var e=this;$(this.avatarRef).hover(function(){e._calcNameChar(!1)},function(){e._calcNameChar()})},e}(),c=o(l.prototype,"user",[t.bindable],{enumerable:!0,initializer:null}),s=l))||s}),define("resources/elements/em-user-edit",["exports","aurelia-framework"],function(e,t){"use strict";function n(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.EmUserEdit=void 0;var a,o,s;e.EmUserEdit=(0,t.containerless)((o=function(){function e(){i(this,e),n(this,"user",s,this)}return e.prototype.show=function(){this.emModal.show({hideOnApprove:!1,autoDimmer:!0})},e.prototype.showHandler=function(){},e.prototype.attached=function(){$(this.frm).form({on:"blur",inline:!0,fields:{name:"empty",mail:["empty","email"]}})},e.prototype._chkOk=function(){var e=this.user.password;return!(e&&e.length<8)||(toastr.error("密码长度不能少于8位字符!"),!1)},e.prototype.approveHandler=function(e){var t=this;this._chkOk()&&$(this.frm).form("is valid")?$.post("/admin/user/update2",{username:this.user.username,password:this.user.password,name:this.user.name,mail:this.user.mails},function(n){e.hide(),t.user.password="",n.success?toastr.success("更新个人信息成功!"):toastr.error(n.data,"更新个人信息失败!")}):e.hideDimmer()},e}(),s=r(o.prototype,"user",[t.bindable],{enumerable:!0,initializer:null}),a=o))||a}),define("resources/value-converters/vc-common",["exports","jquery-format","timeago"],function(e){"use strict";function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.DiffHtmlValueConverter=e.Nl2brValueConverter=e.EmojiValueConverter=e.UserNameValueConverter=e.SortChannelsValueConverter=e.SortUsernamesValueConverter=e.SortUsersValueConverter=e.SortValueConverter=e.ParseMdValueConverter=e.TimeagoValueConverter=e.NumberValueConverter=e.DateValueConverter=e.LowerValueConverter=e.UpperValueConverter=void 0;var n=timeago();e.UpperValueConverter=function(){function e(){t(this,e)}return e.prototype.toView=function(e){return e&&e.toUpperCase()},e}(),e.LowerValueConverter=function(){function e(){t(this,e)}return e.prototype.toView=function(e){return e&&e.toLowerCase()},e}(),e.DateValueConverter=function(){function e(){t(this,e)}return e.prototype.toView=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"yyyy-MM-dd hh:mm:ss";return _.isInteger(_.toNumber(e))?$.format.date(new Date(e),t):e?e:""},e}(),e.NumberValueConverter=function(){function e(){t(this,e)}return e.prototype.toView=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#,##0.00";return _.isNumber(_.toNumber(e))?$.format.number(e,t):e?e:""},e}(),e.TimeagoValueConverter=function(){function e(){t(this,e)}return e.prototype.toView=function(e){return e?n.format(e,"zh_CN"):""},e}(),e.ParseMdValueConverter=function(){function e(){t(this,e)}return e.prototype.toView=function(e){return e?marked(utils.preParse(e)):""},e}(),e.SortValueConverter=function(){function e(){t(this,e)}return e.prototype.toView=function(e,t){return _.isArray(e)?_.sortBy(e,t):e},e}(),e.SortUsersValueConverter=function(){function e(){t(this,e)}return e.prototype.toView=function(e,t){if(_.isArray(e)&&t){var n=_.find(e,{username:t});if(n)return[n].concat(_.reject(e,{username:t}))}return e},e}(),e.SortUsernamesValueConverter=function(){function e(){t(this,e)}return e.prototype.toView=function(e,t){return _.isArray(e)&&t&&_.includes(e,t)?[t].concat(_.without(e,t)):e},e}(),e.SortChannelsValueConverter=function(){function e(){t(this,e)}return e.prototype.toView=function(e){if(_.isArray(e)){var t=_.find(e,{name:"all"});if(t)return[t].concat(_.reject(e,{name:"all"}))}return e},e}(),e.UserNameValueConverter=function(){function e(){t(this,e)}return e.prototype.toView=function(e){var t=_.find(window.tmsUsers,{username:e});return t?t.name:e},e}(),e.EmojiValueConverter=function(){function e(){t(this,e)}return e.prototype.toView=function(e,t){return emojify&&_.defer(function(){emojify.run(t)}),e},e}(),e.Nl2brValueConverter=function(){function e(){t(this,e)}return e.prototype.toView=function(e){return e?_.replace(e,/\n/g,"
    "):e},e}(),e.DiffHtmlValueConverter=function(){function e(){t(this,e)}return e.prototype.toView=function(e,t,n){return e?utils.diffHtml(e):e},e}()}),define("aurelia-templating-resources/compose",["exports","aurelia-dependency-injection","aurelia-task-queue","aurelia-templating","aurelia-pal"],function(e,t,n,i,r){"use strict";function a(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function o(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}function s(e,t){return Object.assign(t,{bindingContext:e.bindingContext,overrideContext:e.overrideContext,owningView:e.owningView,container:e.container,viewSlot:e.viewSlot,viewResources:e.viewResources,currentController:e.currentController,host:e.element})}function l(e,t){e.currentInstruction=null,e.compositionEngine.compose(t).then(function(t){e.currentController=t,e.currentViewModel=t?t.viewModel:null})}Object.defineProperty(e,"__esModule",{value:!0}),e.Compose=void 0;var c,d,u,m,p,g,h;e.Compose=(c=(0,i.customElement)("compose"),d=(0,t.inject)(r.DOM.Element,t.Container,i.CompositionEngine,i.ViewSlot,i.ViewResources,n.TaskQueue),c(u=(0,i.noView)(u=d((m=function(){function e(e,t,n,i,r,o){a(this,"model",p,this),a(this,"view",g,this),a(this,"viewModel",h,this),this.element=e,this.container=t,this.compositionEngine=n,this.viewSlot=i,this.viewResources=r,this.taskQueue=o,this.currentController=null,this.currentViewModel=null}return e.prototype.created=function(e){this.owningView=e},e.prototype.bind=function(e,t){this.bindingContext=e,this.overrideContext=t,l(this,s(this,{view:this.view,viewModel:this.viewModel,model:this.model}))},e.prototype.unbind=function(e,t){this.bindingContext=null,this.overrideContext=null;var n=!0,i=!0;this.viewSlot.removeAll(n,i)},e.prototype.modelChanged=function(e,t){var n=this;return this.currentInstruction?void(this.currentInstruction.model=e):void this.taskQueue.queueMicroTask(function(){if(n.currentInstruction)return void(n.currentInstruction.model=e);var t=n.currentViewModel;t&&"function"==typeof t.activate&&t.activate(e)})},e.prototype.viewChanged=function(e,t){var n=this,i=s(this,{view:e,viewModel:this.currentViewModel||this.viewModel,model:this.model});return this.currentInstruction?void(this.currentInstruction=i):(this.currentInstruction=i,void this.taskQueue.queueMicroTask(function(){return l(n,n.currentInstruction)}))},e.prototype.viewModelChanged=function(e,t){var n=this,i=s(this,{viewModel:e,view:this.view,model:this.model});return this.currentInstruction?void(this.currentInstruction=i):(this.currentInstruction=i,void this.taskQueue.queueMicroTask(function(){return l(n,n.currentInstruction)}))},e}(),p=o(m.prototype,"model",[i.bindable],{enumerable:!0,initializer:null}),g=o(m.prototype,"view",[i.bindable],{enumerable:!0,initializer:null}),h=o(m.prototype,"viewModel",[i.bindable],{enumerable:!0,initializer:null}),u=m))||u)||u)||u)}),define("aurelia-templating-resources/if",["exports","aurelia-templating","aurelia-dependency-injection"],function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.If=void 0;var i,r,a;e.If=(i=(0,t.customAttribute)("if"),r=(0,n.inject)(t.BoundViewFactory,t.ViewSlot),i(a=(0,t.templateController)(a=r(a=function(){function e(e,t){this.viewFactory=e,this.viewSlot=t,this.showing=!1,this.view=null,this.bindingContext=null,this.overrideContext=null}return e.prototype.bind=function(e,t){this.bindingContext=e,this.overrideContext=t,this.valueChanged(this.value)},e.prototype.valueChanged=function(e){var t=this;if(this.__queuedChanges)return void this.__queuedChanges.push(e);var n=this._runValueChanged(e);n instanceof Promise&&!function(){var e=t.__queuedChanges=[],i=function n(){if(!e.length)return void(t.__queuedChanges=void 0);var i=t._runValueChanged(e.shift())||Promise.resolve();i.then(n)};n.then(i)}()},e.prototype._runValueChanged=function(e){var t=this;if(!e){var n=void 0;return null!==this.view&&this.showing&&(n=this.viewSlot.remove(this.view),n instanceof Promise?n.then(function(){return t.view.unbind()}):this.view.unbind()),this.showing=!1,n}if(null===this.view&&(this.view=this.viewFactory.create()),this.view.isBound||this.view.bind(this.bindingContext,this.overrideContext),!this.showing)return this.showing=!0,this.viewSlot.add(this.view)},e.prototype.unbind=function(){null!==this.view&&(this.view.unbind(),this.viewFactory.isCaching&&(this.showing&&(this.showing=!1,this.viewSlot.remove(this.view,!0,!0)),this.view.returnToCache(),this.view=null))},e}())||a)||a)||a)}),define("aurelia-templating-resources/with",["exports","aurelia-dependency-injection","aurelia-templating","aurelia-binding"],function(e,t,n,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.With=void 0;var r,a,o;e.With=(r=(0,n.customAttribute)("with"),a=(0,t.inject)(n.BoundViewFactory,n.ViewSlot),r(o=(0,n.templateController)(o=a(o=function(){function e(e,t){this.viewFactory=e,this.viewSlot=t,this.parentOverrideContext=null,this.view=null}return e.prototype.bind=function(e,t){this.parentOverrideContext=t,this.valueChanged(this.value)},e.prototype.valueChanged=function(e){var t=(0,i.createOverrideContext)(e,this.parentOverrideContext);this.view?this.view.bind(e,t):(this.view=this.viewFactory.create(),this.view.bind(e,t),this.viewSlot.add(this.view))},e.prototype.unbind=function(){this.parentOverrideContext=null,this.view&&this.view.unbind()},e}())||o)||o)||o)}),define("aurelia-templating-resources/repeat",["exports","aurelia-dependency-injection","aurelia-binding","aurelia-templating","./repeat-strategy-locator","./repeat-utilities","./analyze-view-factory","./abstract-repeater"],function(e,t,n,i,r,a,o,s){"use strict";function l(e,t,n,i){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(i):void 0})}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(e,t,n,i,r){var a={};return Object.keys(i).forEach(function(e){a[e]=i[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,i){return i(e,t,n)||n},a),r&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(r):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}Object.defineProperty(e,"__esModule",{value:!0}),e.Repeat=void 0;var m,p,g,h,b,f,_,v;e.Repeat=(m=(0,i.customAttribute)("repeat"),p=(0,t.inject)(i.BoundViewFactory,i.TargetInstruction,i.ViewSlot,i.ViewResources,n.ObserverLocator,r.RepeatStrategyLocator),m(g=(0,i.templateController)(g=p((h=function(e){function t(t,n,i,r,s,d){var u=c(this,e.call(this,{local:"item",viewsRequireLifecycle:(0,o.viewsRequireLifecycle)(t)}));return l(u,"items",b,u),l(u,"local",f,u),l(u,"key",_,u),l(u,"value",v,u),u.viewFactory=t,u.instruction=n,u.viewSlot=i,u.lookupFunctions=r.lookupFunctions,u.observerLocator=s,u.key="key",u.value="value",u.strategyLocator=d,u.ignoreMutation=!1,u.sourceExpression=(0,a.getItemsSourceExpression)(u.instruction,"repeat.for"),u.isOneTime=(0,a.isOneTime)(u.sourceExpression),u.viewsRequireLifecycle=(0,o.viewsRequireLifecycle)(t),u}return d(t,e),t.prototype.call=function(e,t){this[e](this.items,t)},t.prototype.bind=function(e,t){this.scope={bindingContext:e,overrideContext:t},this.matcherBinding=this._captureAndRemoveMatcherBinding(),this.itemsChanged()},t.prototype.unbind=function(){this.scope=null,this.items=null,this.matcherBinding=null,this.viewSlot.removeAll(!0),this._unsubscribeCollection()},t.prototype._unsubscribeCollection=function(){this.collectionObserver&&(this.collectionObserver.unsubscribe(this.callContext,this),this.collectionObserver=null,this.callContext=null)},t.prototype.itemsChanged=function(){if(this._unsubscribeCollection(),this.scope){var e=this.items;if(this.strategy=this.strategyLocator.getStrategy(e),!this.strategy)throw new Error("Value for '"+this.sourceExpression+"' is non-repeatable");this.isOneTime||this._observeInnerCollection()||this._observeCollection(),this.strategy.instanceChanged(this,e)}},t.prototype._getInnerCollection=function(){var e=(0,a.unwrapExpression)(this.sourceExpression);return e?e.evaluate(this.scope,null):null},t.prototype.handleCollectionMutated=function(e,t){this.collectionObserver&&this.strategy.instanceMutated(this,e,t)},t.prototype.handleInnerCollectionMutated=function(e,t){var n=this;if(this.collectionObserver&&!this.ignoreMutation){this.ignoreMutation=!0;var i=this.sourceExpression.evaluate(this.scope,this.lookupFunctions);this.observerLocator.taskQueue.queueMicroTask(function(){return n.ignoreMutation=!1}),i===this.items?this.itemsChanged():this.items=i}},t.prototype._observeInnerCollection=function(){var e=this._getInnerCollection(),t=this.strategyLocator.getStrategy(e);return!!t&&(this.collectionObserver=t.getCollectionObserver(this.observerLocator,e),!!this.collectionObserver&&(this.callContext="handleInnerCollectionMutated",this.collectionObserver.subscribe(this.callContext,this),!0))},t.prototype._observeCollection=function(){var e=this.items;this.collectionObserver=this.strategy.getCollectionObserver(this.observerLocator,e),this.collectionObserver&&(this.callContext="handleCollectionMutated",this.collectionObserver.subscribe(this.callContext,this))},t.prototype._captureAndRemoveMatcherBinding=function(){if(this.viewFactory.viewFactory)for(var e=this.viewFactory.viewFactory.instructions,t=Object.keys(e),n=0;n0?(b=e.removeViews(u,!0,!e.viewsRequireLifecycle),h=function(){for(var o=0;oi;)r--,e.removeView(r,!0,!e.viewsRequireLifecycle);for(var a=e.local,o=0;o0)return Promise.all(o).then(function(){var a=r._handleAddedSplices(e,n,i);(0,t.updateOverrideContexts)(e.views(),a)});var g=this._handleAddedSplices(e,n,i);(0,t.updateOverrideContexts)(e.views(),g)},e.prototype._handleAddedSplices=function(e,n,i){for(var r=void 0,a=void 0,o=n.length,s=0,l=i.length;sc.index)&&(a=r);d0&&(t-=1);t0?Promise.all(d).then(function(){(0,t.updateOverrideContexts)(e.views(),0)}):(0,t.updateOverrideContexts)(e.views(),0)},e.prototype._getViewIndexByKey=function(e,t){var n=void 0,i=void 0,r=void 0;for(n=0,i=e.viewCount();n0?Promise.all(d).then(function(){(0,t.updateOverrideContexts)(e.views(),0)}):(0,t.updateOverrideContexts)(e.views(),0)},e.prototype._getViewIndexByValue=function(e,t){var n=void 0,i=void 0,r=void 0;for(n=0,i=e.viewCount();n0)for(s>i&&(s=i),r=0,a=s;r)<[^<]*)*<\/script>/gi;e.HTMLSanitizer=function(){function e(){}return e.prototype.sanitize=function(e){return e.replace(t,"")},e}()}),define("aurelia-templating-resources/replaceable",["exports","aurelia-dependency-injection","aurelia-templating"],function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Replaceable=void 0;var i,r,a;e.Replaceable=(i=(0,n.customAttribute)("replaceable"),r=(0,t.inject)(n.BoundViewFactory,n.ViewSlot),i(a=(0,n.templateController)(a=r(a=function(){function e(e,t){this.viewFactory=e,this.viewSlot=t,this.view=null}return e.prototype.bind=function(e,t){null===this.view&&(this.view=this.viewFactory.create(),this.viewSlot.add(this.view)),this.view.bind(e,t)},e.prototype.unbind=function(){this.view.unbind()},e}())||a)||a)||a)}),define("aurelia-templating-resources/focus",["exports","aurelia-templating","aurelia-binding","aurelia-dependency-injection","aurelia-task-queue","aurelia-pal"],function(e,t,n,i,r,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Focus=void 0;var o,s,l;e.Focus=(o=(0,t.customAttribute)("focus",n.bindingMode.twoWay),s=(0,i.inject)(a.DOM.Element,r.TaskQueue),o(l=s(l=function(){function e(e,t){var n=this;this.element=e,this.taskQueue=t,this.isAttached=!1,this.needsApply=!1,this.focusListener=function(e){n.value=!0},this.blurListener=function(e){a.DOM.activeElement!==n.element&&(n.value=!1)}}return e.prototype.valueChanged=function(e){this.isAttached?this._apply():this.needsApply=!0},e.prototype._apply=function(){var e=this;this.value?this.taskQueue.queueMicroTask(function(){e.value&&e.element.focus()}):this.element.blur()},e.prototype.attached=function(){this.isAttached=!0,this.needsApply&&(this.needsApply=!1,this._apply()),this.element.addEventListener("focus",this.focusListener),this.element.addEventListener("blur",this.blurListener)},e.prototype.detached=function(){this.isAttached=!1,this.element.removeEventListener("focus",this.focusListener),this.element.removeEventListener("blur",this.blurListener)},e}())||l)||l)}),define("aurelia-templating-resources/css-resource",["exports","aurelia-templating","aurelia-loader","aurelia-dependency-injection","aurelia-path","aurelia-pal"],function(e,t,n,i,r,a){"use strict";function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e,t){if("string"!=typeof t)throw new Error("Failed loading required CSS file: "+e);return t.replace(d,function(t,n){var i=n.charAt(0);return"'"!==i&&'"'!==i||(n=n.substr(1,n.length-2)),"url('"+(0,r.relativeToFile)(n,e)+"')"})}function c(e){var n,i,r=(n=(0,t.resource)(new u(e)),n(i=function(e){function t(){return o(this,e.apply(this,arguments))}return s(t,e),t}(m))||i);return r}Object.defineProperty(e,"__esModule",{value:!0}),e._createCSSResource=c;var d=/url\((?!['"]data)([^)]+)\)/gi,u=function(){function e(e){this.address=e,this._scoped=null,this._global=!1,this._alreadyGloballyInjected=!1}return e.prototype.initialize=function(e,t){this._scoped=new t(this)},e.prototype.register=function(e,t){"scoped"===t?e.registerViewEngineHooks(this._scoped):this._global=!0},e.prototype.load=function(e){var t=this;return e.get(n.Loader).loadText(this.address).catch(function(e){return null}).then(function(e){e=l(t.address,e),t._scoped.css=e,t._global&&(t._alreadyGloballyInjected=!0,a.DOM.injectStyles(e))})},e}(),m=function(){function e(e){this.owner=e,this.css=null}return e.prototype.beforeCompile=function(e,t,n){if(n.targetShadowDOM)a.DOM.injectStyles(this.css,e,!0);else if(a.FEATURE.scopedCSS){var i=a.DOM.injectStyles(this.css,e,!0);i.setAttribute("scoped","scoped")}else this.owner._alreadyGloballyInjected||(a.DOM.injectStyles(this.css),this.owner._alreadyGloballyInjected=!0)},e}()}),define("aurelia-templating-resources/attr-binding-behavior",["exports","aurelia-binding"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AttrBindingBehavior=void 0;e.AttrBindingBehavior=function(){function e(){}return e.prototype.bind=function(e,n){e.targetObserver=new t.DataAttributeObserver(e.target,e.targetProperty)},e.prototype.unbind=function(e,t){},e}()}),define("aurelia-templating-resources/binding-mode-behaviors",["exports","aurelia-binding","aurelia-metadata"],function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TwoWayBindingBehavior=e.OneWayBindingBehavior=e.OneTimeBindingBehavior=void 0;var i,r,a,o,s,l,c={bind:function(e,t,n){e.originalMode=e.mode,e.mode=this.mode},unbind:function(e,t){e.mode=e.originalMode,e.originalMode=null}};e.OneTimeBindingBehavior=(i=(0,n.mixin)(c),i(r=function(){this.mode=t.bindingMode.oneTime})||r),e.OneWayBindingBehavior=(a=(0,n.mixin)(c),a(o=function(){this.mode=t.bindingMode.oneWay})||o),e.TwoWayBindingBehavior=(s=(0,n.mixin)(c),s(l=function(){this.mode=t.bindingMode.twoWay})||l)}),define("aurelia-templating-resources/throttle-binding-behavior",["exports","aurelia-binding"],function(e,t){"use strict";function n(e){var t=this,n=this.throttleState,i=+new Date-n.last;return i>=n.delay?(clearTimeout(n.timeoutId),n.timeoutId=null,n.last=+new Date,void this.throttledMethod(e)):(n.newValue=e,void(null===n.timeoutId&&(n.timeoutId=setTimeout(function(){n.timeoutId=null,n.last=+new Date,t.throttledMethod(n.newValue)},n.delay-i))))}Object.defineProperty(e,"__esModule",{value:!0}),e.ThrottleBindingBehavior=void 0;e.ThrottleBindingBehavior=function(){function e(){}return e.prototype.bind=function(e,i){var r=arguments.length<=2||void 0===arguments[2]?200:arguments[2],a="updateTarget";e.callSource?a="callSource":e.updateSource&&e.mode===t.bindingMode.twoWay&&(a="updateSource"),e.throttledMethod=e[a],e.throttledMethod.originalName=a,e[a]=n,e.throttleState={delay:r,last:0,timeoutId:null}},e.prototype.unbind=function(e,t){var n=e.throttledMethod.originalName;e[n]=e.throttledMethod,e.throttledMethod=null,clearTimeout(e.throttleState.timeoutId),e.throttleState=null},e}()}),define("aurelia-templating-resources/debounce-binding-behavior",["exports","aurelia-binding"],function(e,t){"use strict";function n(e){var t=this,n=this.debounceState;return n.immediate?(n.immediate=!1,void this.debouncedMethod(e)):(clearTimeout(n.timeoutId),void(n.timeoutId=setTimeout(function(){return t.debouncedMethod(e)},n.delay)))}Object.defineProperty(e,"__esModule",{value:!0}),e.DebounceBindingBehavior=void 0;e.DebounceBindingBehavior=function(){function e(){}return e.prototype.bind=function(e,i){var r=arguments.length<=2||void 0===arguments[2]?200:arguments[2],a="updateTarget";e.callSource?a="callSource":e.updateSource&&e.mode===t.bindingMode.twoWay&&(a="updateSource"),e.debouncedMethod=e[a],e.debouncedMethod.originalName=a,e[a]=n,e.debounceState={delay:r,timeoutId:null,immediate:"updateTarget"===a}},e.prototype.unbind=function(e,t){var n=e.debouncedMethod.originalName;e[n]=e.debouncedMethod,e.debouncedMethod=null,clearTimeout(e.debounceState.timeoutId),e.debounceState=null},e}()}),define("aurelia-templating-resources/signal-binding-behavior",["exports","./binding-signaler"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SignalBindingBehavior=void 0;e.SignalBindingBehavior=function(){function e(e){this.signals=e.signals}return e.inject=function(){return[t.BindingSignaler]},e.prototype.bind=function(e,t){if(!e.updateTarget)throw new Error("Only property bindings and string interpolation bindings can be signaled. Trigger, delegate and call bindings cannot be signaled.");if(3===arguments.length){var n=arguments[2],i=this.signals[n]||(this.signals[n]=[]);i.push(e),e.signalName=n}else{if(!(arguments.length>3))throw new Error("Signal name is required.");for(var r=Array.prototype.slice.call(arguments,2),a=r.length;a--;){var o=r[a],s=this.signals[o]||(this.signals[o]=[]);s.push(e)}e.signalName=r}},e.prototype.unbind=function(e,t){var n=e.signalName;if(e.signalName=null,Array.isArray(n))for(var i=n,r=i.length;r--;){var a=i[r],o=this.signals[a];o.splice(o.indexOf(e),1)}else{var s=this.signals[n];s.splice(s.indexOf(e),1)}},e}()}),define("aurelia-templating-resources/binding-signaler",["exports","aurelia-binding"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BindingSignaler=void 0;e.BindingSignaler=function(){function e(){this.signals={}}return e.prototype.signal=function(e){var n=this.signals[e];if(n)for(var i=n.length;i--;)n[i].call(t.sourceContext)},e}()}),define("aurelia-templating-resources/update-trigger-binding-behavior",["exports","aurelia-binding"],function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UpdateTriggerBindingBehavior=void 0;var n,i,r="The updateTrigger binding behavior requires at least one event name argument: eg ",a="The updateTrigger binding behavior can only be applied to two-way bindings on input/select elements.";e.UpdateTriggerBindingBehavior=(i=n=function(){function e(e){this.eventManager=e}return e.prototype.bind=function(e,n){for(var i=arguments.length,o=Array(i>2?i-2:0),s=2;s]/gm,function(e){return O[e]})}function n(e){return e.nodeName.toLowerCase()}function i(e,t){var n=e&&e.exec(t);return n&&0===n.index}function r(e){return S.test(e)}function a(e){var t,n,i,a,o=e.className+" ";if(o+=e.parentNode?e.parentNode.className:"",n=T.exec(o))return y(n[1])?n[1]:"no-highlight";for(o=o.split(/\s+/),t=0,i=o.length;t"}function s(e){d+=""}function l(e){("start"===e.event?o:s)(e.node)}for(var c=0,d="",u=[];e.length||i.length;){var m=a();if(d+=t(r.substr(c,m[0].offset-c)),c=m[0].offset,m===e){u.reverse().forEach(s);do l(m.splice(0,1)[0]),m=a();while(m===e&&m.length&&m[0].offset===c);u.reverse().forEach(o)}else"start"===m[0].event?u.push(m[0].node):u.pop(),l(m.splice(0,1)[0])}return d+t(r.substr(c))}function c(e){function t(e){return e&&e.source||e}function n(n,i){return new RegExp(t(n),"m"+(e.case_insensitive?"i":"")+(i?"g":""))}function i(r,a){if(!r.compiled){if(r.compiled=!0,r.keywords=r.keywords||r.beginKeywords,r.keywords){var s={},l=function(t,n){e.case_insensitive&&(n=n.toLowerCase()),n.split(" ").forEach(function(e){var n=e.split("|");s[n[0]]=[t,n[1]?Number(n[1]):1]})};"string"==typeof r.keywords?l("keyword",r.keywords):w(r.keywords).forEach(function(e){l(e,r.keywords[e])}),r.keywords=s}r.lexemesRe=n(r.lexemes||/\w+/,!0),a&&(r.beginKeywords&&(r.begin="\\b("+r.beginKeywords.split(" ").join("|")+")\\b"),r.begin||(r.begin=/\B|\b/),r.beginRe=n(r.begin),r.end||r.endsWithParent||(r.end=/\B|\b/),r.end&&(r.endRe=n(r.end)),r.terminator_end=t(r.end)||"",r.endsWithParent&&a.terminator_end&&(r.terminator_end+=(r.end?"|":"")+a.terminator_end)),r.illegal&&(r.illegalRe=n(r.illegal)),null==r.relevance&&(r.relevance=1),r.contains||(r.contains=[]);var c=[];r.contains.forEach(function(e){e.variants?e.variants.forEach(function(t){c.push(o(e,t))}):c.push("self"===e?r:e)}),r.contains=c,r.contains.forEach(function(e){i(e,r)}),r.starts&&i(r.starts,a);var d=r.contains.map(function(e){return e.beginKeywords?"\\.?("+e.begin+")\\.?":e.begin}).concat([r.terminator_end,r.illegal]).map(t).filter(Boolean);r.terminators=d.length?n(d.join("|"),!0):{exec:function(){return null}}}}i(e)}function d(e,n,r,a){function o(e,t){var n,r;for(n=0,r=t.contains.length;n',a+t+o}function g(){var e,n,i,r;if(!w.keywords)return t(T);for(r="",n=0,w.lexemesRe.lastIndex=0,i=w.lexemesRe.exec(T);i;)r+=t(T.substr(n,i.index-n)),e=m(w,i),e?(N+=e[1],r+=p(e[0],t(i[0]))):r+=t(i[0]),n=w.lexemesRe.lastIndex,i=w.lexemesRe.exec(T);return r+t(T.substr(n))}function h(){var e="string"==typeof w.subLanguage;if(e&&!x[w.subLanguage])return t(T);var n=e?d(w.subLanguage,T,!0,C[w.subLanguage]):u(T,w.subLanguage.length?w.subLanguage:void 0);return w.relevance>0&&(N+=n.relevance),e&&(C[w.subLanguage]=n.top),p(n.language,n.value,!1,!0)}function b(){S+=null!=w.subLanguage?h():g(),T=""}function f(e){S+=e.className?p(e.className,"",!0):"",w=Object.create(e,{parent:{value:w}})}function _(e,t){if(T+=e,null==t)return b(),0;var n=o(t,w);if(n)return n.skip?T+=t:(n.excludeBegin&&(T+=t),b(),n.returnBegin||n.excludeBegin||(T=t)),f(n,t),n.returnBegin?0:t.length;var i=s(w,t);if(i){var r=w;r.skip?T+=t:(r.returnEnd||r.excludeEnd||(T+=t),b(),r.excludeEnd&&(T=t));do w.className&&(S+=M),w.skip||(N+=w.relevance),w=w.parent;while(w!==i.parent);return i.starts&&f(i.starts,""),r.returnEnd?0:t.length}if(l(t,w))throw new Error('Illegal lexeme "'+t+'" for mode "'+(w.className||"")+'"');return T+=t,t.length||1}var v=y(e);if(!v)throw new Error('Unknown language: "'+e+'"');c(v);var E,w=a||v,C={},S="";for(E=w;E!==v;E=E.parent)E.className&&(S=p(E.className,"",!0)+S);var T="",N=0;try{for(var O,A,D=0;;){if(w.terminators.lastIndex=D,O=w.terminators.exec(n),!O)break;A=_(n.substr(D,O.index-D),O[0]),D=O.index+A}for(_(n.substr(D)),E=w;E.parent;E=E.parent)E.className&&(S+=M);return{relevance:N,value:S,language:e,top:w}}catch(e){if(e.message&&e.message.indexOf("Illegal")!==-1)return{relevance:0,value:t(n)};throw e}}function u(e,n){n=n||k.languages||w(x);var i={relevance:0,value:t(e)},r=i;return n.filter(y).forEach(function(t){var n=d(t,e,!1);n.language=t,n.relevance>r.relevance&&(r=n),n.relevance>i.relevance&&(r=i,i=n)}),r.language&&(i.second_best=r),i}function m(e){return k.tabReplace||k.useBR?e.replace(N,function(e,t){return k.useBR&&"\n"===e?"
    ":k.tabReplace?t.replace(/\t/g,k.tabReplace):void 0}):e}function p(e,t,n){var i=t?C[t]:n,r=[e.trim()];return e.match(/\bhljs\b/)||r.push("hljs"),e.indexOf(i)===-1&&r.push(i),r.join(" ").trim()}function g(e){var t,n,i,o,c,g=a(e);r(g)||(k.useBR?(t=document.createElementNS("http://www.w3.org/1999/xhtml","div"),t.innerHTML=e.innerHTML.replace(/\n/g,"").replace(//g,"\n")):t=e,c=t.textContent,i=g?d(g,c,!0):u(c),n=s(t),n.length&&(o=document.createElementNS("http://www.w3.org/1999/xhtml","div"),o.innerHTML=i.value,i.value=l(n,s(o),c)),i.value=m(i.value),e.innerHTML=i.value,e.className=p(e.className,g,i.language),e.result={language:i.language,re:i.relevance},i.second_best&&(e.second_best={language:i.second_best.language,re:i.second_best.relevance}))}function h(e){k=o(k,e)}function b(){if(!b.called){b.called=!0;var e=document.querySelectorAll("pre code");E.forEach.call(e,g)}}function f(){addEventListener("DOMContentLoaded",b,!1),addEventListener("load",b,!1)}function _(t,n){var i=x[t]=n(e);i.aliases&&i.aliases.forEach(function(e){C[e]=t})}function v(){return w(x)}function y(e){return e=(e||"").toLowerCase(),x[e]||x[C[e]]}var E=[],w=Object.keys,x={},C={},S=/^(no-?highlight|plain|text)$/i,T=/\blang(?:uage)?-([\w-]+)\b/i,N=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,M="",k={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},O={"&":"&","<":"<",">":">"};return e.highlight=d,e.highlightAuto=u,e.fixMarkup=m,e.highlightBlock=g,e.configure=h,e.initHighlighting=b,e.initHighlightingOnLoad=f,e.registerLanguage=_,e.listLanguages=v,e.getLanguage=y,e.inherit=o,e.IDENT_RE="[a-zA-Z]\\w*",e.UNDERSCORE_IDENT_RE="[a-zA-Z_]\\w*",e.NUMBER_RE="\\b\\d+(\\.\\d+)?",e.C_NUMBER_RE="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BINARY_NUMBER_RE="\\b(0b[01]+)",e.RE_STARTERS_RE="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BACKSLASH_ESCAPE={begin:"\\\\[\\s\\S]",relevance:0},e.APOS_STRING_MODE={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},e.QUOTE_STRING_MODE={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},e.PHRASAL_WORDS_MODE={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|like)\b/},e.COMMENT=function(t,n,i){var r=e.inherit({className:"comment",begin:t,end:n,contains:[]},i||{});return r.contains.push(e.PHRASAL_WORDS_MODE),r.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|XXX):",relevance:0}),r},e.C_LINE_COMMENT_MODE=e.COMMENT("//","$"),e.C_BLOCK_COMMENT_MODE=e.COMMENT("/\\*","\\*/"),e.HASH_COMMENT_MODE=e.COMMENT("#","$"),e.NUMBER_MODE={className:"number",begin:e.NUMBER_RE,relevance:0},e.C_NUMBER_MODE={className:"number",begin:e.C_NUMBER_RE,relevance:0},e.BINARY_NUMBER_MODE={className:"number",begin:e.BINARY_NUMBER_RE,relevance:0},e.CSS_NUMBER_MODE={className:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},e.REGEXP_MODE={className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}]},e.TITLE_MODE={className:"title",begin:e.IDENT_RE,relevance:0},e.UNDERSCORE_TITLE_MODE={className:"title",begin:e.UNDERSCORE_IDENT_RE,relevance:0},e.METHOD_GUARD={begin:"\\.\\s*"+e.UNDERSCORE_IDENT_RE,relevance:0},e}),define("highlight/lib/languages/1c",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="[a-zA-Zа-яА-Я][a-zA-Z0-9_а-яА-Я]*",n="возврат дата для если и или иначе иначеесли исключение конецесли конецпопытки конецпроцедуры конецфункции конеццикла константа не перейти перем перечисление по пока попытка прервать продолжить процедура строка тогда фс функция цикл число экспорт",i="ansitooem oemtoansi ввестивидсубконто ввестидату ввестизначение ввестиперечисление ввестипериод ввестиплансчетов ввестистроку ввестичисло вопрос восстановитьзначение врег выбранныйплансчетов вызватьисключение датагод датамесяц датачисло добавитьмесяц завершитьработусистемы заголовоксистемы записьжурналарегистрации запуститьприложение зафиксироватьтранзакцию значениевстроку значениевстрокувнутр значениевфайл значениеизстроки значениеизстрокивнутр значениеизфайла имякомпьютера имяпользователя каталогвременныхфайлов каталогиб каталогпользователя каталогпрограммы кодсимв командасистемы конгода конецпериодаби конецрассчитанногопериодаби конецстандартногоинтервала конквартала конмесяца коннедели лев лог лог10 макс максимальноеколичествосубконто мин монопольныйрежим названиеинтерфейса названиенабораправ назначитьвид назначитьсчет найти найтипомеченныенаудаление найтиссылки началопериодаби началостандартногоинтервала начатьтранзакцию начгода начквартала начмесяца начнедели номерднягода номерднянедели номернеделигода нрег обработкаожидания окр описаниеошибки основнойжурналрасчетов основнойплансчетов основнойязык открытьформу открытьформумодально отменитьтранзакцию очиститьокносообщений периодстр полноеимяпользователя получитьвремята получитьдатута получитьдокументта получитьзначенияотбора получитьпозициюта получитьпустоезначение получитьта прав праводоступа предупреждение префиксавтонумерации пустаястрока пустоезначение рабочаядаттьпустоезначение рабочаядата разделительстраниц разделительстрок разм разобратьпозициюдокумента рассчитатьрегистрына рассчитатьрегистрыпо сигнал симв символтабуляции создатьобъект сокрл сокрлп сокрп сообщить состояние сохранитьзначение сред статусвозврата стрдлина стрзаменить стрколичествострок стрполучитьстроку стрчисловхождений сформироватьпозициюдокумента счетпокоду текущаядата текущеевремя типзначения типзначениястр удалитьобъекты установитьтана установитьтапо фиксшаблон формат цел шаблон",r={begin:'""'},a={className:"string",begin:'"',end:'"|$',contains:[r]},o={className:"string",begin:"\\|",end:'"|$',contains:[r]};return{case_insensitive:!0,lexemes:t,keywords:{keyword:n,built_in:i},contains:[e.C_LINE_COMMENT_MODE,e.NUMBER_MODE,a,o,{className:"function",begin:"(процедура|функция)",end:"$",lexemes:t,keywords:"процедура функция",contains:[{begin:"экспорт",endsWithParent:!0,lexemes:t,keywords:"экспорт",contains:[e.C_LINE_COMMENT_MODE]},{className:"params",begin:"\\(",end:"\\)",lexemes:t,keywords:"знач",contains:[a,o]},e.C_LINE_COMMENT_MODE,e.inherit(e.TITLE_MODE,{begin:t})]},{className:"meta",begin:"#",end:"$"},{className:"number",begin:"'\\d{2}\\.\\d{2}\\.(\\d{2}|\\d{4})'"}]}}}),define("highlight/lib/languages/abnf",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={ruleDeclaration:"^[a-zA-Z][a-zA-Z0-9-]*",unexpectedChars:"[!@#$^&',?+~`|:]"},n=["ALPHA","BIT","CHAR","CR","CRLF","CTL","DIGIT","DQUOTE","HEXDIG","HTAB","LF","LWSP","OCTET","SP","VCHAR","WSP"],i=e.COMMENT(";","$"),r={className:"symbol",begin:/%b[0-1]+(-[0-1]+|(\.[0-1]+)+){0,1}/},a={className:"symbol",begin:/%d[0-9]+(-[0-9]+|(\.[0-9]+)+){0,1}/},o={className:"symbol",begin:/%x[0-9A-F]+(-[0-9A-F]+|(\.[0-9A-F]+)+){0,1}/},s={className:"symbol",begin:/%[si]/},l={begin:t.ruleDeclaration+"\\s*=",returnBegin:!0,end:/=/,relevance:0,contains:[{className:"attribute",begin:t.ruleDeclaration}]};return{illegal:t.unexpectedChars,keywords:n.join(" "),contains:[l,i,r,a,o,s,e.QUOTE_STRING_MODE,e.NUMBER_MODE]}}}),define("highlight/lib/languages/accesslog",["require","exports","module"],function(e,t,n){n.exports=function(e){return{contains:[{className:"number",begin:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{className:"number",begin:"\\b\\d+\\b",relevance:0},{className:"string",begin:'"(GET|POST|HEAD|PUT|DELETE|CONNECT|OPTIONS|PATCH|TRACE)',end:'"',keywords:"GET POST HEAD PUT DELETE CONNECT OPTIONS PATCH TRACE",illegal:"\\n",relevance:10},{className:"string",begin:/\[/,end:/\]/,illegal:"\\n"},{className:"string",begin:'"',end:'"',illegal:"\\n"}]}}}),define("highlight/lib/languages/actionscript",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="[a-zA-Z_$][a-zA-Z0-9_$]*",n="([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)",i={className:"rest_arg",begin:"[.]{3}",end:t,relevance:10};return{aliases:["as"],keywords:{keyword:"as break case catch class const continue default delete do dynamic each else extends final finally for function get if implements import in include instanceof interface internal is namespace native new override package private protected public return set static super switch this throw try typeof use var void while with",literal:"true false null undefined"},contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,{className:"class",beginKeywords:"package",end:"{",contains:[e.TITLE_MODE]},{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.TITLE_MODE]},{className:"meta",beginKeywords:"import include",end:";",keywords:{"meta-keyword":"import include"}},{className:"function",beginKeywords:"function",end:"[{;]",excludeEnd:!0,illegal:"\\S",contains:[e.TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,i]},{begin:":\\s*"+n}]},e.METHOD_GUARD],illegal:/#/}}}),define("highlight/lib/languages/ada",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="\\d(_|\\d)*",n="[eE][-+]?"+t,i=t+"(\\."+t+")?("+n+")?",r="\\w+",a=t+"#"+r+"(\\."+r+")?#("+n+")?",o="\\b("+a+"|"+i+")",s="[A-Za-z](_?[A-Za-z0-9.])*",l="[]{}%#'\"",c=e.COMMENT("--","$"),d={begin:"\\s+:\\s+",end:"\\s*(:=|;|\\)|=>|$)",illegal:l,contains:[{beginKeywords:"loop for declare others",endsParent:!0},{className:"keyword",beginKeywords:"not null constant access function procedure in out aliased exception"},{className:"type",begin:s,endsParent:!0,relevance:0}]};return{case_insensitive:!0,keywords:{keyword:"abort else new return abs elsif not reverse abstract end accept entry select access exception of separate aliased exit or some all others subtype and for out synchronized array function overriding at tagged generic package task begin goto pragma terminate body private then if procedure type case in protected constant interface is raise use declare range delay limited record when delta loop rem while digits renames with do mod requeue xor",literal:"True False"},contains:[c,{className:"string",begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{className:"string",begin:/'.'/},{className:"number",begin:o,relevance:0},{className:"symbol",begin:"'"+s},{className:"title",begin:"(\\bwith\\s+)?(\\bprivate\\s+)?\\bpackage\\s+(\\bbody\\s+)?",end:"(is|$)",keywords:"package body",excludeBegin:!0,excludeEnd:!0,illegal:l},{begin:"(\\b(with|overriding)\\s+)?\\b(function|procedure)\\s+",end:"(\\bis|\\bwith|\\brenames|\\)\\s*;)",keywords:"overriding function procedure with is renames return",returnBegin:!0,contains:[c,{className:"title",begin:"(\\bwith\\s+)?\\b(function|procedure)\\s+",end:"(\\(|\\s+|$)",excludeBegin:!0,excludeEnd:!0,illegal:l},d,{className:"type",begin:"\\breturn\\s+",end:"(\\s+|;|$)",keywords:"return",excludeBegin:!0,excludeEnd:!0,endsParent:!0,illegal:l}]},{className:"type",begin:"\\b(sub)?type\\s+",end:"\\s+",keywords:"type",excludeBegin:!0,illegal:l},d]}}}),define("highlight/lib/languages/apache",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"number",begin:"[\\$%]\\d+"};return{aliases:["apacheconf"],case_insensitive:!0,contains:[e.HASH_COMMENT_MODE,{className:"section",begin:""},{className:"attribute",begin:/\w+/,relevance:0,keywords:{nomarkup:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{end:/$/,relevance:0,keywords:{literal:"on off all"},contains:[{className:"meta",begin:"\\s\\[",end:"\\]$"},{className:"variable",begin:"[\\$%]\\{",end:"\\}",contains:["self",t]},t,e.QUOTE_STRING_MODE]}}],illegal:/\S/}}}),define("highlight/lib/languages/applescript",["require","exports","module"],function(e,t,n){n.exports=function(e){var t=e.inherit(e.QUOTE_STRING_MODE,{illegal:""}),n={className:"params",begin:"\\(",end:"\\)",contains:["self",e.C_NUMBER_MODE,t]},i=e.COMMENT("--","$"),r=e.COMMENT("\\(\\*","\\*\\)",{contains:["self",i]}),a=[i,r,e.HASH_COMMENT_MODE];return{aliases:["osascript"],keywords:{keyword:"about above after against and around as at back before beginning behind below beneath beside between but by considering contain contains continue copy div does eighth else end equal equals error every exit fifth first for fourth from front get given global if ignoring in into is it its last local me middle mod my ninth not of on onto or over prop property put ref reference repeat returning script second set seventh since sixth some tell tenth that the|0 then third through thru timeout times to transaction try until where while whose with without",literal:"AppleScript false linefeed return pi quote result space tab true",built_in:"alias application boolean class constant date file integer list number real record string text activate beep count delay launch log offset read round run say summarize write character characters contents day frontmost id item length month name paragraph paragraphs rest reverse running time version weekday word words year"},contains:[t,e.C_NUMBER_MODE,{className:"built_in",begin:"\\b(clipboard info|the clipboard|info for|list (disks|folder)|mount volume|path to|(close|open for) access|(get|set) eof|current date|do shell script|get volume settings|random number|set volume|system attribute|system info|time to GMT|(load|run|store) script|scripting components|ASCII (character|number)|localized string|choose (application|color|file|file name|folder|from list|remote application|URL)|display (alert|dialog))\\b|^\\s*return\\b"},{className:"literal",begin:"\\b(text item delimiters|current application|missing value)\\b"},{className:"keyword",begin:"\\b(apart from|aside from|instead of|out of|greater than|isn't|(doesn't|does not) (equal|come before|come after|contain)|(greater|less) than( or equal)?|(starts?|ends|begins?) with|contained by|comes (before|after)|a (ref|reference)|POSIX file|POSIX path|(date|time) string|quoted form)\\b"},{beginKeywords:"on",illegal:"[${=;\\n]",contains:[e.UNDERSCORE_TITLE_MODE,n]}].concat(a),illegal:"//|->|=>|\\[\\["}}}),define("highlight/lib/languages/cpp",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"keyword",begin:"\\b[a-z\\d_]*_t\\b"},n={className:"string",variants:[{begin:'(u8?|U)?L?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:'(u8?|U)?R"',end:'"',contains:[e.BACKSLASH_ESCAPE]},{begin:"'\\\\?.",end:"'",illegal:"."}]},i={className:"number", -variants:[{begin:"\\b(0b[01']+)"},{begin:"\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},r={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{"meta-keyword":"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(n,{className:"meta-string"}),{className:"meta-string",begin:"<",end:">",illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},a=e.IDENT_RE+"\\s*\\(",o={keyword:"int float while private char catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using class asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignof constexpr decltype noexcept static_assert thread_local restrict _Bool complex _Complex _Imaginary atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return",built_in:"std string cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr",literal:"true false nullptr NULL"},s=[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,i,n];return{aliases:["c","cc","h","c++","h++","hpp"],keywords:o,illegal:"",keywords:o,contains:["self",t]},{begin:e.IDENT_RE+"::",keywords:o},{variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:o,contains:s.concat([{begin:/\(/,end:/\)/,keywords:o,contains:s.concat(["self"]),relevance:0}]),relevance:0},{className:"function",begin:"("+e.IDENT_RE+"[\\*&\\s]+)+"+a,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:o,illegal:/[^\w\s\*&]/,contains:[{begin:a,returnBegin:!0,contains:[e.TITLE_MODE],relevance:0},{className:"params",begin:/\(/,end:/\)/,keywords:o,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,i,t]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,r]}]),exports:{preprocessor:r,strings:n,keywords:o}}}}),define("highlight/lib/languages/arduino",["require","exports","module"],function(e,t,n){n.exports=function(e){var t=e.getLanguage("cpp").exports;return{keywords:{keyword:"boolean byte word string String array "+t.keywords.keyword,built_in:"setup loop while catch for if do goto try switch case else default break continue return KeyboardController MouseController SoftwareSerial EthernetServer EthernetClient LiquidCrystal RobotControl GSMVoiceCall EthernetUDP EsploraTFT HttpClient RobotMotor WiFiClient GSMScanner FileSystem Scheduler GSMServer YunClient YunServer IPAddress GSMClient GSMModem Keyboard Ethernet Console GSMBand Esplora Stepper Process WiFiUDP GSM_SMS Mailbox USBHost Firmata PImage Client Server GSMPIN FileIO Bridge Serial EEPROM Stream Mouse Audio Servo File Task GPRS WiFi Wire TFT GSM SPI SD runShellCommandAsynchronously analogWriteResolution retrieveCallingNumber printFirmwareVersion analogReadResolution sendDigitalPortPair noListenOnLocalhost readJoystickButton setFirmwareVersion readJoystickSwitch scrollDisplayRight getVoiceCallStatus scrollDisplayLeft writeMicroseconds delayMicroseconds beginTransmission getSignalStrength runAsynchronously getAsynchronously listenOnLocalhost getCurrentCarrier readAccelerometer messageAvailable sendDigitalPorts lineFollowConfig countryNameWrite runShellCommand readStringUntil rewindDirectory readTemperature setClockDivider readLightSensor endTransmission analogReference detachInterrupt countryNameRead attachInterrupt encryptionType readBytesUntil robotNameWrite readMicrophone robotNameRead cityNameWrite userNameWrite readJoystickY readJoystickX mouseReleased openNextFile scanNetworks noInterrupts digitalWrite beginSpeaker mousePressed isActionDone mouseDragged displayLogos noAutoscroll addParameter remoteNumber getModifiers keyboardRead userNameRead waitContinue processInput parseCommand printVersion readNetworks writeMessage blinkVersion cityNameRead readMessage setDataMode parsePacket isListening setBitOrder beginPacket isDirectory motorsWrite drawCompass digitalRead clearScreen serialEvent rightToLeft setTextSize leftToRight requestFrom keyReleased compassRead analogWrite interrupts WiFiServer disconnect playMelody parseFloat autoscroll getPINUsed setPINUsed setTimeout sendAnalog readSlider analogRead beginWrite createChar motorsStop keyPressed tempoWrite readButton subnetMask debugPrint macAddress writeGreen randomSeed attachGPRS readString sendString remotePort releaseAll mouseMoved background getXChange getYChange answerCall getResult voiceCall endPacket constrain getSocket writeJSON getButton available connected findUntil readBytes exitValue readGreen writeBlue startLoop IPAddress isPressed sendSysex pauseMode gatewayIP setCursor getOemKey tuneWrite noDisplay loadImage switchPIN onRequest onReceive changePIN playFile noBuffer parseInt overflow checkPIN knobRead beginTFT bitClear updateIR bitWrite position writeRGB highByte writeRed setSpeed readBlue noStroke remoteIP transfer shutdown hangCall beginSMS endWrite attached maintain noCursor checkReg checkPUK shiftOut isValid shiftIn pulseIn connect println localIP pinMode getIMEI display noBlink process getBand running beginSD drawBMP lowByte setBand release bitRead prepare pointTo readRed setMode noFill remove listen stroke detach attach noTone exists buffer height bitSet circle config cursor random IRread setDNS endSMS getKey micros millis begin print write ready flush width isPIN blink clear press mkdir rmdir close point yield image BSSID click delay read text move peek beep rect line open seek fill size turn stop home find step tone sqrt RSSI SSID end bit tan cos sin pow map abs max min get run put",literal:"DIGITAL_MESSAGE FIRMATA_STRING ANALOG_MESSAGE REPORT_DIGITAL REPORT_ANALOG INPUT_PULLUP SET_PIN_MODE INTERNAL2V56 SYSTEM_RESET LED_BUILTIN INTERNAL1V1 SYSEX_START INTERNAL EXTERNAL DEFAULT OUTPUT INPUT HIGH LOW"},contains:[t.preprocessor,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE]}}}),define("highlight/lib/languages/armasm",["require","exports","module"],function(e,t,n){n.exports=function(e){return{case_insensitive:!0,aliases:["arm"],lexemes:"\\.?"+e.IDENT_RE,keywords:{meta:".2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .arm .thumb .code16 .code32 .force_thumb .thumb_func .ltorg ALIAS ALIGN ARM AREA ASSERT ATTR CN CODE CODE16 CODE32 COMMON CP DATA DCB DCD DCDU DCDO DCFD DCFDU DCI DCQ DCQU DCW DCWU DN ELIF ELSE END ENDFUNC ENDIF ENDP ENTRY EQU EXPORT EXPORTAS EXTERN FIELD FILL FUNCTION GBLA GBLL GBLS GET GLOBAL IF IMPORT INCBIN INCLUDE INFO KEEP LCLA LCLL LCLS LTORG MACRO MAP MEND MEXIT NOFP OPT PRESERVE8 PROC QN READONLY RELOC REQUIRE REQUIRE8 RLIST FN ROUT SETA SETL SETS SN SPACE SUBT THUMB THUMBX TTL WHILE WEND ",built_in:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 pc lr sp ip sl sb fp a1 a2 a3 a4 v1 v2 v3 v4 v5 v6 v7 v8 f0 f1 f2 f3 f4 f5 f6 f7 p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 q0 q1 q2 q3 q4 q5 q6 q7 q8 q9 q10 q11 q12 q13 q14 q15 cpsr_c cpsr_x cpsr_s cpsr_f cpsr_cx cpsr_cxs cpsr_xs cpsr_xsf cpsr_sf cpsr_cxsf spsr_c spsr_x spsr_s spsr_f spsr_cx spsr_cxs spsr_xs spsr_xsf spsr_sf spsr_cxsf s0 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18 s19 s20 s21 s22 s23 s24 s25 s26 s27 s28 s29 s30 s31 d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 d16 d17 d18 d19 d20 d21 d22 d23 d24 d25 d26 d27 d28 d29 d30 d31 {PC} {VAR} {TRUE} {FALSE} {OPT} {CONFIG} {ENDIAN} {CODESIZE} {CPU} {FPU} {ARCHITECTURE} {PCSTOREOFFSET} {ARMASM_VERSION} {INTER} {ROPI} {RWPI} {SWST} {NOSWST} . @"},contains:[{className:"keyword",begin:"\\b(adc|(qd?|sh?|u[qh]?)?add(8|16)?|usada?8|(q|sh?|u[qh]?)?(as|sa)x|and|adrl?|sbc|rs[bc]|asr|b[lx]?|blx|bxj|cbn?z|tb[bh]|bic|bfc|bfi|[su]bfx|bkpt|cdp2?|clz|clrex|cmp|cmn|cpsi[ed]|cps|setend|dbg|dmb|dsb|eor|isb|it[te]{0,3}|lsl|lsr|ror|rrx|ldm(([id][ab])|f[ds])?|ldr((s|ex)?[bhd])?|movt?|mvn|mra|mar|mul|[us]mull|smul[bwt][bt]|smu[as]d|smmul|smmla|mla|umlaal|smlal?([wbt][bt]|d)|mls|smlsl?[ds]|smc|svc|sev|mia([bt]{2}|ph)?|mrr?c2?|mcrr2?|mrs|msr|orr|orn|pkh(tb|bt)|rbit|rev(16|sh)?|sel|[su]sat(16)?|nop|pop|push|rfe([id][ab])?|stm([id][ab])?|str(ex)?[bhd]?|(qd?)?sub|(sh?|q|u[qh]?)?sub(8|16)|[su]xt(a?h|a?b(16)?)|srs([id][ab])?|swpb?|swi|smi|tst|teq|wfe|wfi|yield)(eq|ne|cs|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al|hs|lo)?[sptrx]?",end:"\\s"},e.COMMENT("[;@]","$",{relevance:0}),e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",relevance:0},{className:"title",begin:"\\|",end:"\\|",illegal:"\\n",relevance:0},{className:"number",variants:[{begin:"[#$=]?0x[0-9a-f]+"},{begin:"[#$=]?0b[01]+"},{begin:"[#$=]\\d+"},{begin:"\\b\\d+"}],relevance:0},{className:"symbol",variants:[{begin:"^[a-z_\\.\\$][a-z0-9_\\.\\$]+"},{begin:"^\\s*[a-z_\\.\\$][a-z0-9_\\.\\$]+:"},{begin:"[=#]\\w+"}],relevance:0}]}}}),define("highlight/lib/languages/xml",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="[A-Za-z0-9\\._:-]+",n={endsWithParent:!0,illegal:/`]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist"],case_insensitive:!0,contains:[{className:"meta",begin:"",relevance:10,contains:[{begin:"\\[",end:"\\]"}]},e.COMMENT("",{relevance:10}),{begin:"<\\!\\[CDATA\\[",end:"\\]\\]>",relevance:10},{begin:/<\?(php)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0}]},{className:"tag",begin:"|$)",end:">",keywords:{name:"style"},contains:[n],starts:{end:"",returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:"|$)",end:">",keywords:{name:"script"},contains:[n],starts:{end:"",returnEnd:!0,subLanguage:["actionscript","javascript","handlebars","xml"]}},{className:"meta",variants:[{begin:/<\?xml/,end:/\?>/,relevance:10},{begin:/<\?\w+/,end:/\?>/}]},{className:"tag",begin:"",contains:[{className:"name",begin:/[^\/><\s]+/,relevance:0},n]}]}}}),define("highlight/lib/languages/asciidoc",["require","exports","module"],function(e,t,n){n.exports=function(e){return{aliases:["adoc"],contains:[e.COMMENT("^/{4,}\\n","\\n/{4,}$",{relevance:10}),e.COMMENT("^//","$",{relevance:0}),{className:"title",begin:"^\\.\\w.*$"},{begin:"^[=\\*]{4,}\\n",end:"\\n^[=\\*]{4,}$",relevance:10},{className:"section",relevance:10,variants:[{begin:"^(={1,5}) .+?( \\1)?$"},{begin:"^[^\\[\\]\\n]+?\\n[=\\-~\\^\\+]{2,}$"}]},{className:"meta",begin:"^:.+?:",end:"\\s",excludeEnd:!0,relevance:10},{className:"meta",begin:"^\\[.+?\\]$",relevance:0},{className:"quote",begin:"^_{4,}\\n",end:"\\n_{4,}$",relevance:10},{className:"code",begin:"^[\\-\\.]{4,}\\n",end:"\\n[\\-\\.]{4,}$",relevance:10},{begin:"^\\+{4,}\\n",end:"\\n\\+{4,}$",contains:[{begin:"<",end:">",subLanguage:"xml",relevance:0}],relevance:10},{className:"bullet",begin:"^(\\*+|\\-+|\\.+|[^\\n]+?::)\\s+"},{className:"symbol",begin:"^(NOTE|TIP|IMPORTANT|WARNING|CAUTION):\\s+",relevance:10},{className:"strong",begin:"\\B\\*(?![\\*\\s])",end:"(\\n{2}|\\*)",contains:[{begin:"\\\\*\\w",relevance:0}]},{className:"emphasis",begin:"\\B'(?!['\\s])",end:"(\\n{2}|')",contains:[{begin:"\\\\'\\w",relevance:0}],relevance:0},{className:"emphasis",begin:"_(?![_\\s])",end:"(\\n{2}|_)",relevance:0},{className:"string",variants:[{begin:"``.+?''"},{begin:"`.+?'"}]},{className:"code",begin:"(`.+?`|\\+.+?\\+)",relevance:0},{className:"code",begin:"^[ \\t]",end:"$",relevance:0},{begin:"^'{3,}[ \\t]*$",relevance:10},{begin:"(link:)?(http|https|ftp|file|irc|image:?):\\S+\\[.*?\\]",returnBegin:!0,contains:[{begin:"(link|image:?):",relevance:0},{className:"link",begin:"\\w",end:"[^\\[]+",relevance:0},{className:"string",begin:"\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0,relevance:0}],relevance:10}]}}}),define("highlight/lib/languages/aspectj",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="false synchronized int abstract float private char boolean static null if const for true while long throw strictfp finally protected import native final return void enum else extends implements break transient new catch instanceof byte super volatile case assert short package default double public try this switch continue throws privileged aspectOf adviceexecution proceed cflowbelow cflow initialization preinitialization staticinitialization withincode target within execution getWithinTypeName handler thisJoinPoint thisJoinPointStaticPart thisEnclosingJoinPointStaticPart declare parents warning error soft precedence thisAspectInstance",n="get set args call";return{keywords:t,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"class",beginKeywords:"aspect",end:/[{;=]/,excludeEnd:!0,illegal:/[:;"\[\]]/,contains:[{beginKeywords:"extends implements pertypewithin perthis pertarget percflowbelow percflow issingleton"},e.UNDERSCORE_TITLE_MODE,{begin:/\([^\)]*/,end:/[)]+/,keywords:t+" "+n,excludeEnd:!1}]},{className:"class",beginKeywords:"class interface",end:/[{;=]/,excludeEnd:!0,relevance:0,keywords:"class interface",illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"pointcut after before around throwing returning",end:/[)]/,excludeEnd:!1,illegal:/["\[\]]/,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,contains:[e.UNDERSCORE_TITLE_MODE]}]},{begin:/[:]/,returnBegin:!0,end:/[{;]/,relevance:0,excludeEnd:!1,keywords:t,illegal:/["\[\]]/,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",keywords:t+" "+n},e.QUOTE_STRING_MODE]},{beginKeywords:"new throw",relevance:0},{className:"function",begin:/\w+ +\w+(\.)?\w+\s*\([^\)]*\)\s*((throws)[\w\s,]+)?[\{;]/,returnBegin:!0,end:/[{;=]/,keywords:t,excludeEnd:!0,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/,relevance:0,keywords:t,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},e.C_NUMBER_MODE,{className:"meta",begin:"@[A-Za-z]+"}]}}}),define("highlight/lib/languages/autohotkey",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={begin:/`[\s\S]/};return{case_insensitive:!0,keywords:{keyword:"Break Continue Else Gosub If Loop Return While",literal:"A|0 true false NOT AND OR",built_in:"ComSpec Clipboard ClipboardAll ErrorLevel"},contains:[{className:"built_in",begin:"A_[a-zA-Z0-9]+"},t,e.inherit(e.QUOTE_STRING_MODE,{contains:[t]}),e.COMMENT(";","$",{relevance:0}),{className:"number",begin:e.NUMBER_RE,relevance:0},{className:"variable",begin:"%",end:"%",illegal:"\\n",contains:[t]},{className:"symbol",contains:[t],variants:[{begin:'^[^\\n";]+::(?!=)'},{begin:'^[^\\n";]+:(?!=)',relevance:0}]},{begin:",\\s*,"}]}}}),define("highlight/lib/languages/autoit",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="ByRef Case Const ContinueCase ContinueLoop Default Dim Do Else ElseIf EndFunc EndIf EndSelect EndSwitch EndWith Enum Exit ExitLoop For Func Global If In Local Next ReDim Return Select Static Step Switch Then To Until Volatile WEnd While With",n="True False And Null Not Or",i="Abs ACos AdlibRegister AdlibUnRegister Asc AscW ASin Assign ATan AutoItSetOption AutoItWinGetTitle AutoItWinSetTitle Beep Binary BinaryLen BinaryMid BinaryToString BitAND BitNOT BitOR BitRotate BitShift BitXOR BlockInput Break Call CDTray Ceiling Chr ChrW ClipGet ClipPut ConsoleRead ConsoleWrite ConsoleWriteError ControlClick ControlCommand ControlDisable ControlEnable ControlFocus ControlGetFocus ControlGetHandle ControlGetPos ControlGetText ControlHide ControlListView ControlMove ControlSend ControlSetText ControlShow ControlTreeView Cos Dec DirCopy DirCreate DirGetSize DirMove DirRemove DllCall DllCallAddress DllCallbackFree DllCallbackGetPtr DllCallbackRegister DllClose DllOpen DllStructCreate DllStructGetData DllStructGetPtr DllStructGetSize DllStructSetData DriveGetDrive DriveGetFileSystem DriveGetLabel DriveGetSerial DriveGetType DriveMapAdd DriveMapDel DriveMapGet DriveSetLabel DriveSpaceFree DriveSpaceTotal DriveStatus EnvGet EnvSet EnvUpdate Eval Execute Exp FileChangeDir FileClose FileCopy FileCreateNTFSLink FileCreateShortcut FileDelete FileExists FileFindFirstFile FileFindNextFile FileFlush FileGetAttrib FileGetEncoding FileGetLongName FileGetPos FileGetShortcut FileGetShortName FileGetSize FileGetTime FileGetVersion FileInstall FileMove FileOpen FileOpenDialog FileRead FileReadLine FileReadToArray FileRecycle FileRecycleEmpty FileSaveDialog FileSelectFolder FileSetAttrib FileSetEnd FileSetPos FileSetTime FileWrite FileWriteLine Floor FtpSetProxy FuncName GUICreate GUICtrlCreateAvi GUICtrlCreateButton GUICtrlCreateCheckbox GUICtrlCreateCombo GUICtrlCreateContextMenu GUICtrlCreateDate GUICtrlCreateDummy GUICtrlCreateEdit GUICtrlCreateGraphic GUICtrlCreateGroup GUICtrlCreateIcon GUICtrlCreateInput GUICtrlCreateLabel GUICtrlCreateList GUICtrlCreateListView GUICtrlCreateListViewItem GUICtrlCreateMenu GUICtrlCreateMenuItem GUICtrlCreateMonthCal GUICtrlCreateObj GUICtrlCreatePic GUICtrlCreateProgress GUICtrlCreateRadio GUICtrlCreateSlider GUICtrlCreateTab GUICtrlCreateTabItem GUICtrlCreateTreeView GUICtrlCreateTreeViewItem GUICtrlCreateUpdown GUICtrlDelete GUICtrlGetHandle GUICtrlGetState GUICtrlRead GUICtrlRecvMsg GUICtrlRegisterListViewSort GUICtrlSendMsg GUICtrlSendToDummy GUICtrlSetBkColor GUICtrlSetColor GUICtrlSetCursor GUICtrlSetData GUICtrlSetDefBkColor GUICtrlSetDefColor GUICtrlSetFont GUICtrlSetGraphic GUICtrlSetImage GUICtrlSetLimit GUICtrlSetOnEvent GUICtrlSetPos GUICtrlSetResizing GUICtrlSetState GUICtrlSetStyle GUICtrlSetTip GUIDelete GUIGetCursorInfo GUIGetMsg GUIGetStyle GUIRegisterMsg GUISetAccelerators GUISetBkColor GUISetCoord GUISetCursor GUISetFont GUISetHelp GUISetIcon GUISetOnEvent GUISetState GUISetStyle GUIStartGroup GUISwitch Hex HotKeySet HttpSetProxy HttpSetUserAgent HWnd InetClose InetGet InetGetInfo InetGetSize InetRead IniDelete IniRead IniReadSection IniReadSectionNames IniRenameSection IniWrite IniWriteSection InputBox Int IsAdmin IsArray IsBinary IsBool IsDeclared IsDllStruct IsFloat IsFunc IsHWnd IsInt IsKeyword IsNumber IsObj IsPtr IsString Log MemGetStats Mod MouseClick MouseClickDrag MouseDown MouseGetCursor MouseGetPos MouseMove MouseUp MouseWheel MsgBox Number ObjCreate ObjCreateInterface ObjEvent ObjGet ObjName OnAutoItExitRegister OnAutoItExitUnRegister Ping PixelChecksum PixelGetColor PixelSearch ProcessClose ProcessExists ProcessGetStats ProcessList ProcessSetPriority ProcessWait ProcessWaitClose ProgressOff ProgressOn ProgressSet Ptr Random RegDelete RegEnumKey RegEnumVal RegRead RegWrite Round Run RunAs RunAsWait RunWait Send SendKeepActive SetError SetExtended ShellExecute ShellExecuteWait Shutdown Sin Sleep SoundPlay SoundSetWaveVolume SplashImageOn SplashOff SplashTextOn Sqrt SRandom StatusbarGetText StderrRead StdinWrite StdioClose StdoutRead String StringAddCR StringCompare StringFormat StringFromASCIIArray StringInStr StringIsAlNum StringIsAlpha StringIsASCII StringIsDigit StringIsFloat StringIsInt StringIsLower StringIsSpace StringIsUpper StringIsXDigit StringLeft StringLen StringLower StringMid StringRegExp StringRegExpReplace StringReplace StringReverse StringRight StringSplit StringStripCR StringStripWS StringToASCIIArray StringToBinary StringTrimLeft StringTrimRight StringUpper Tan TCPAccept TCPCloseSocket TCPConnect TCPListen TCPNameToIP TCPRecv TCPSend TCPShutdown, UDPShutdown TCPStartup, UDPStartup TimerDiff TimerInit ToolTip TrayCreateItem TrayCreateMenu TrayGetMsg TrayItemDelete TrayItemGetHandle TrayItemGetState TrayItemGetText TrayItemSetOnEvent TrayItemSetState TrayItemSetText TraySetClick TraySetIcon TraySetOnEvent TraySetPauseIcon TraySetState TraySetToolTip TrayTip UBound UDPBind UDPCloseSocket UDPOpen UDPRecv UDPSend VarGetType WinActivate WinActive WinClose WinExists WinFlash WinGetCaretPos WinGetClassList WinGetClientSize WinGetHandle WinGetPos WinGetProcess WinGetState WinGetText WinGetTitle WinKill WinList WinMenuSelectItem WinMinimizeAll WinMinimizeAllUndo WinMove WinSetOnTop WinSetState WinSetTitle WinSetTrans WinWait",r={variants:[e.COMMENT(";","$",{relevance:0}),e.COMMENT("#cs","#ce"),e.COMMENT("#comments-start","#comments-end")]},a={begin:"\\$[A-z0-9_]+"},o={className:"string",variants:[{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]},s={variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]},l={className:"meta",begin:"#",end:"$",keywords:{"meta-keyword":"comments include include-once NoTrayIcon OnAutoItStartRegister pragma compile RequireAdmin"},contains:[{begin:/\\\n/,relevance:0},{beginKeywords:"include",keywords:{"meta-keyword":"include"},end:"$",contains:[o,{className:"meta-string",variants:[{begin:"<",end:">"},{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]}]},o,r]},c={className:"symbol",begin:"@[A-z0-9_]+"},d={className:"function",beginKeywords:"Func",end:"$",illegal:"\\$|\\[|%",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:[a,o,s]}]};return{case_insensitive:!0,illegal:/\/\*/,keywords:{keyword:t,built_in:i,literal:n},contains:[r,a,o,s,l,c,d]}}}),define("highlight/lib/languages/avrasm",["require","exports","module"],function(e,t,n){n.exports=function(e){return{case_insensitive:!0,lexemes:"\\.?"+e.IDENT_RE,keywords:{keyword:"adc add adiw and andi asr bclr bld brbc brbs brcc brcs break breq brge brhc brhs brid brie brlo brlt brmi brne brpl brsh brtc brts brvc brvs bset bst call cbi cbr clc clh cli cln clr cls clt clv clz com cp cpc cpi cpse dec eicall eijmp elpm eor fmul fmuls fmulsu icall ijmp in inc jmp ld ldd ldi lds lpm lsl lsr mov movw mul muls mulsu neg nop or ori out pop push rcall ret reti rjmp rol ror sbc sbr sbrc sbrs sec seh sbi sbci sbic sbis sbiw sei sen ser ses set sev sez sleep spm st std sts sub subi swap tst wdr",built_in:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 r17 r18 r19 r20 r21 r22 r23 r24 r25 r26 r27 r28 r29 r30 r31 x|0 xh xl y|0 yh yl z|0 zh zl ucsr1c udr1 ucsr1a ucsr1b ubrr1l ubrr1h ucsr0c ubrr0h tccr3c tccr3a tccr3b tcnt3h tcnt3l ocr3ah ocr3al ocr3bh ocr3bl ocr3ch ocr3cl icr3h icr3l etimsk etifr tccr1c ocr1ch ocr1cl twcr twdr twar twsr twbr osccal xmcra xmcrb eicra spmcsr spmcr portg ddrg ping portf ddrf sreg sph spl xdiv rampz eicrb eimsk gimsk gicr eifr gifr timsk tifr mcucr mcucsr tccr0 tcnt0 ocr0 assr tccr1a tccr1b tcnt1h tcnt1l ocr1ah ocr1al ocr1bh ocr1bl icr1h icr1l tccr2 tcnt2 ocr2 ocdr wdtcr sfior eearh eearl eedr eecr porta ddra pina portb ddrb pinb portc ddrc pinc portd ddrd pind spdr spsr spcr udr0 ucsr0a ucsr0b ubrr0l acsr admux adcsr adch adcl porte ddre pine pinf",meta:".byte .cseg .db .def .device .dseg .dw .endmacro .equ .eseg .exit .include .list .listmac .macro .nolist .org .set"},contains:[e.C_BLOCK_COMMENT_MODE,e.COMMENT(";","$",{relevance:0}),e.C_NUMBER_MODE,e.BINARY_NUMBER_MODE,{className:"number",begin:"\\b(\\$[a-zA-Z0-9]+|0o[0-7]+)"},e.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",illegal:"[^\\\\][^']"},{className:"symbol",begin:"^[A-Za-z0-9_.$]+:"},{className:"meta",begin:"#",end:"$"},{className:"subst",begin:"@[0-9]+"}]}}}),define("highlight/lib/languages/awk",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"variable",variants:[{begin:/\$[\w\d#@][\w\d_]*/},{begin:/\$\{(.*?)}/}]},n="BEGIN END if else while do for in break continue delete next nextfile function func exit|10",i={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/(u|b)?r?'''/,end:/'''/,relevance:10},{begin:/(u|b)?r?"""/,end:/"""/,relevance:10},{begin:/(u|r|ur)'/,end:/'/,relevance:10},{begin:/(u|r|ur)"/,end:/"/,relevance:10},{begin:/(b|br)'/,end:/'/},{begin:/(b|br)"/,end:/"/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]};return{keywords:{keyword:n},contains:[t,i,e.REGEXP_MODE,e.HASH_COMMENT_MODE,e.NUMBER_MODE]}}}),define("highlight/lib/languages/axapta",["require","exports","module"],function(e,t,n){n.exports=function(e){return{keywords:"false int abstract private char boolean static null if for true while long throw finally protected final return void enum else break new catch byte super case short default double public try this switch continue reverse firstfast firstonly forupdate nofetch sum avg minof maxof count order group by asc desc index hint like dispaly edit client server ttsbegin ttscommit str real date container anytype common div mod",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{className:"meta",begin:"#",end:"$"},{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,illegal:":",contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]}]}}}),define("highlight/lib/languages/bash",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"variable",variants:[{begin:/\$[\w\d#@][\w\d_]*/},{begin:/\$\{(.*?)}/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t,{className:"variable",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]}]},i={className:"string",begin:/'/,end:/'/};return{aliases:["sh","zsh"],lexemes:/-?[a-z\._]+/,keywords:{keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",_:"-ne -eq -lt -gt -f -d -e -s -l -a"},contains:[{className:"meta",begin:/^#![^\n]+sh\s*$/,relevance:10},{className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},e.HASH_COMMENT_MODE,n,i,t]}}}),define("highlight/lib/languages/basic",["require","exports","module"],function(e,t,n){n.exports=function(e){return{case_insensitive:!0,illegal:"^.",lexemes:"[a-zA-Z][a-zA-Z0-9_$%!#]*",keywords:{keyword:"ABS ASC AND ATN AUTO|0 BEEP BLOAD|10 BSAVE|10 CALL CALLS CDBL CHAIN CHDIR CHR$|10 CINT CIRCLE CLEAR CLOSE CLS COLOR COM COMMON CONT COS CSNG CSRLIN CVD CVI CVS DATA DATE$ DEFDBL DEFINT DEFSNG DEFSTR DEF|0 SEG USR DELETE DIM DRAW EDIT END ENVIRON ENVIRON$ EOF EQV ERASE ERDEV ERDEV$ ERL ERR ERROR EXP FIELD FILES FIX FOR|0 FRE GET GOSUB|10 GOTO HEX$ IF|0 THEN ELSE|0 INKEY$ INP INPUT INPUT# INPUT$ INSTR IMP INT IOCTL IOCTL$ KEY ON OFF LIST KILL LEFT$ LEN LET LINE LLIST LOAD LOC LOCATE LOF LOG LPRINT USING LSET MERGE MID$ MKDIR MKD$ MKI$ MKS$ MOD NAME NEW NEXT NOISE NOT OCT$ ON OR PEN PLAY STRIG OPEN OPTION BASE OUT PAINT PALETTE PCOPY PEEK PMAP POINT POKE POS PRINT PRINT] PSET PRESET PUT RANDOMIZE READ REM RENUM RESET|0 RESTORE RESUME RETURN|0 RIGHT$ RMDIR RND RSET RUN SAVE SCREEN SGN SHELL SIN SOUND SPACE$ SPC SQR STEP STICK STOP STR$ STRING$ SWAP SYSTEM TAB TAN TIME$ TIMER TROFF TRON TO USR VAL VARPTR VARPTR$ VIEW WAIT WHILE WEND WIDTH WINDOW WRITE XOR"},contains:[e.QUOTE_STRING_MODE,e.COMMENT("REM","$",{relevance:10}),e.COMMENT("'","$",{relevance:0}),{className:"symbol",begin:"^[0-9]+ ",relevance:10},{className:"number",begin:"\\b([0-9]+[0-9edED.]*[#!]?)",relevance:0},{className:"number",begin:"(&[hH][0-9a-fA-F]{1,4})"},{className:"number",begin:"(&[oO][0-7]{1,6})"}]}}}),define("highlight/lib/languages/bnf",["require","exports","module"],function(e,t,n){n.exports=function(e){return{contains:[{className:"attribute",begin://},{begin:/::=/,starts:{end:/$/,contains:[{begin://},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]}}]}}}),define("highlight/lib/languages/brainfuck",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"literal",begin:"[\\+\\-]",relevance:0};return{aliases:["bf"],contains:[e.COMMENT("[^\\[\\]\\.,\\+\\-<> \r\n]","[\\[\\]\\.,\\+\\-<> \r\n]",{returnEnd:!0,relevance:0}),{className:"title",begin:"[\\[\\]]",relevance:0},{className:"string",begin:"[\\.,]",relevance:0},{begin:/\+\+|\-\-/,returnBegin:!0,contains:[t]},t]}}}),define("highlight/lib/languages/cal",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="div mod in and or not xor asserterror begin case do downto else end exit for if of repeat then to until while with var",n="false true",i=[e.C_LINE_COMMENT_MODE,e.COMMENT(/\{/,/\}/,{relevance:0}),e.COMMENT(/\(\*/,/\*\)/,{relevance:10})],r={className:"string",begin:/'/,end:/'/,contains:[{begin:/''/}]},a={className:"string",begin:/(#\d+)+/},o={className:"number",begin:"\\b\\d+(\\.\\d+)?(DT|D|T)",relevance:0},s={className:"string",begin:'"',end:'"'},l={className:"function",beginKeywords:"procedure",end:/[:;]/,keywords:"procedure|10",contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,keywords:t,contains:[r,a]}].concat(i)},c={className:"class",begin:"OBJECT (Table|Form|Report|Dataport|Codeunit|XMLport|MenuSuite|Page|Query) (\\d+) ([^\\r\\n]+)",returnBegin:!0,contains:[e.TITLE_MODE,l]};return{case_insensitive:!0,keywords:{keyword:t,literal:n},illegal:/\/\*/,contains:[r,a,o,s,e.NUMBER_MODE,c,l]}}}),define("highlight/lib/languages/capnproto",["require","exports","module"],function(e,t,n){n.exports=function(e){return{aliases:["capnp"],keywords:{keyword:"struct enum interface union group import using const annotation extends in of on as with from fixed",built_in:"Void Bool Int8 Int16 Int32 Int64 UInt8 UInt16 UInt32 UInt64 Float32 Float64 Text Data AnyPointer AnyStruct Capability List",literal:"true false"},contains:[e.QUOTE_STRING_MODE,e.NUMBER_MODE,e.HASH_COMMENT_MODE,{className:"meta",begin:/@0x[\w\d]{16};/,illegal:/\n/},{className:"symbol",begin:/@\d+\b/},{className:"class",beginKeywords:"struct enum", -end:/\{/,illegal:/\n/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]},{className:"class",beginKeywords:"interface",end:/\{/,illegal:/\n/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]}]}}}),define("highlight/lib/languages/ceylon",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="assembly module package import alias class interface object given value assign void function new of extends satisfies abstracts in out return break continue throw assert dynamic if else switch case for while try catch finally then let this outer super is exists nonempty",n="shared abstract formal default actual variable late native deprecatedfinal sealed annotation suppressWarnings small",i="doc by license see throws tagged",r={className:"subst",excludeBegin:!0,excludeEnd:!0,begin:/``/,end:/``/,keywords:t,relevance:10},a=[{className:"string",begin:'"""',end:'"""',relevance:10},{className:"string",begin:'"',end:'"',contains:[r]},{className:"string",begin:"'",end:"'"},{className:"number",begin:"#[0-9a-fA-F_]+|\\$[01_]+|[0-9_]+(?:\\.[0-9_](?:[eE][+-]?\\d+)?)?[kMGTPmunpf]?",relevance:0}];return r.contains=a,{keywords:{keyword:t+" "+n,meta:i},illegal:"\\$[^01]|#[^0-9a-fA-F]",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),{className:"meta",begin:'@[a-z]\\w*(?:\\:"[^"]*")?'}].concat(a)}}}),define("highlight/lib/languages/clean",["require","exports","module"],function(e,t,n){n.exports=function(e){return{aliases:["clean","icl","dcl"],keywords:{keyword:"if let in with where case of class instance otherwise implementation definition system module from import qualified as special code inline foreign export ccall stdcall generic derive infix infixl infixr",literal:"True False"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{begin:"->|<-[|:]?|::|#!?|>>=|\\{\\||\\|\\}|:==|=:|\\.\\.|<>|`"}]}}}),define("highlight/lib/languages/clojure",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={"builtin-name":"def defonce cond apply if-not if-let if not not= = < > <= >= == + / * - rem quot neg? pos? delay? symbol? keyword? true? false? integer? empty? coll? list? set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? class? distinct? isa? float? rational? reduced? ratio? odd? even? char? seq? vector? string? map? nil? contains? zero? instance? not-every? not-any? libspec? -> ->> .. . inc compare do dotimes mapcat take remove take-while drop letfn drop-last take-last drop-while while intern condp case reduced cycle split-at split-with repeat replicate iterate range merge zipmap declare line-seq sort comparator sort-by dorun doall nthnext nthrest partition eval doseq await await-for let agent atom send send-off release-pending-sends add-watch mapv filterv remove-watch agent-error restart-agent set-error-handler error-handler set-error-mode! error-mode shutdown-agents quote var fn loop recur throw try monitor-enter monitor-exit defmacro defn defn- macroexpand macroexpand-1 for dosync and or when when-not when-let comp juxt partial sequence memoize constantly complement identity assert peek pop doto proxy defstruct first rest cons defprotocol cast coll deftype defrecord last butlast sigs reify second ffirst fnext nfirst nnext defmulti defmethod meta with-meta ns in-ns create-ns import refer keys select-keys vals key val rseq name namespace promise into transient persistent! conj! assoc! dissoc! pop! disj! use class type num float double short byte boolean bigint biginteger bigdec print-method print-dup throw-if printf format load compile get-in update-in pr pr-on newline flush read slurp read-line subvec with-open memfn time re-find re-groups rand-int rand mod locking assert-valid-fdecl alias resolve ref deref refset swap! reset! set-validator! compare-and-set! alter-meta! reset-meta! commute get-validator alter ref-set ref-history-count ref-min-history ref-max-history ensure sync io! new next conj set! to-array future future-call into-array aset gen-class reduce map filter find empty hash-map hash-set sorted-map sorted-map-by sorted-set sorted-set-by vec vector seq flatten reverse assoc dissoc list disj get union difference intersection extend extend-type extend-protocol int nth delay count concat chunk chunk-buffer chunk-append chunk-first chunk-rest max min dec unchecked-inc-int unchecked-inc unchecked-dec-inc unchecked-dec unchecked-negate unchecked-add-int unchecked-add unchecked-subtract-int unchecked-subtract chunk-next chunk-cons chunked-seq? prn vary-meta lazy-seq spread list* str find-keyword keyword symbol gensym force rationalize"},n="a-zA-Z_\\-!.?+*=<>&#'",i="["+n+"]["+n+"0-9/;:]*",r="[-+]?\\d+(\\.\\d+)?",a={begin:i,relevance:0},o={className:"number",begin:r,relevance:0},s=e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),l=e.COMMENT(";","$",{relevance:0}),c={className:"literal",begin:/\b(true|false|nil)\b/},d={begin:"[\\[\\{]",end:"[\\]\\}]"},u={className:"comment",begin:"\\^"+i},m=e.COMMENT("\\^\\{","\\}"),p={className:"symbol",begin:"[:]{1,2}"+i},g={begin:"\\(",end:"\\)"},h={endsWithParent:!0,relevance:0},b={keywords:t,lexemes:i,className:"name",begin:i,starts:h},f=[g,s,u,m,l,p,d,o,c,a];return g.contains=[e.COMMENT("comment",""),b,h],h.contains=f,d.contains=f,{aliases:["clj"],illegal:/\S/,contains:[g,s,u,m,l,p,d,o,c]}}}),define("highlight/lib/languages/clojure-repl",["require","exports","module"],function(e,t,n){n.exports=function(e){return{contains:[{className:"meta",begin:/^([\w.-]+|\s*#_)=>/,starts:{end:/$/,subLanguage:"clojure"}}]}}}),define("highlight/lib/languages/cmake",["require","exports","module"],function(e,t,n){n.exports=function(e){return{aliases:["cmake.in"],case_insensitive:!0,keywords:{keyword:"add_custom_command add_custom_target add_definitions add_dependencies add_executable add_library add_subdirectory add_test aux_source_directory break build_command cmake_minimum_required cmake_policy configure_file create_test_sourcelist define_property else elseif enable_language enable_testing endforeach endfunction endif endmacro endwhile execute_process export find_file find_library find_package find_path find_program fltk_wrap_ui foreach function get_cmake_property get_directory_property get_filename_component get_property get_source_file_property get_target_property get_test_property if include include_directories include_external_msproject include_regular_expression install link_directories load_cache load_command macro mark_as_advanced message option output_required_files project qt_wrap_cpp qt_wrap_ui remove_definitions return separate_arguments set set_directory_properties set_property set_source_files_properties set_target_properties set_tests_properties site_name source_group string target_link_libraries try_compile try_run unset variable_watch while build_name exec_program export_library_dependencies install_files install_programs install_targets link_libraries make_directory remove subdir_depends subdirs use_mangled_mesa utility_source variable_requires write_file qt5_use_modules qt5_use_package qt5_wrap_cpp on off true false and or equal less greater strless strgreater strequal matches"},contains:[{className:"variable",begin:"\\${",end:"}"},e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE]}}}),define("highlight/lib/languages/coffeescript",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super then unless until loop of by when and or is isnt not",literal:"true false null undefined yes no on off",built_in:"npm require console print module global window document"},n="[A-Za-z$_][0-9A-Za-z$_]*",i={className:"subst",begin:/#\{/,end:/}/,keywords:t},r=[e.BINARY_NUMBER_MODE,e.inherit(e.C_NUMBER_MODE,{starts:{end:"(\\s*/)?",relevance:0}}),{className:"string",variants:[{begin:/'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[e.BACKSLASH_ESCAPE]},{begin:/"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,i]},{begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,i]}]},{className:"regexp",variants:[{begin:"///",end:"///",contains:[i,e.HASH_COMMENT_MODE]},{begin:"//[gim]*",relevance:0},{begin:/\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/}]},{begin:"@"+n},{begin:"`",end:"`",excludeBegin:!0,excludeEnd:!0,subLanguage:"javascript"}];i.contains=r;var a=e.inherit(e.TITLE_MODE,{begin:n}),o="(\\(.*\\))?\\s*\\B[-=]>",s={className:"params",begin:"\\([^\\(]",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:t,contains:["self"].concat(r)}]};return{aliases:["coffee","cson","iced"],keywords:t,illegal:/\/\*/,contains:r.concat([e.COMMENT("###","###"),e.HASH_COMMENT_MODE,{className:"function",begin:"^\\s*"+n+"\\s*=\\s*"+o,end:"[-=]>",returnBegin:!0,contains:[a,s]},{begin:/[:\(,=]\s*/,relevance:0,contains:[{className:"function",begin:o,end:"[-=]>",returnBegin:!0,contains:[s]}]},{className:"class",beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[a]},a]},{begin:n+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}}),define("highlight/lib/languages/coq",["require","exports","module"],function(e,t,n){n.exports=function(e){return{keywords:{keyword:"_ as at cofix else end exists exists2 fix for forall fun if IF in let match mod Prop return Set then Type using where with Abort About Add Admit Admitted All Arguments Assumptions Axiom Back BackTo Backtrack Bind Blacklist Canonical Cd Check Class Classes Close Coercion Coercions CoFixpoint CoInductive Collection Combined Compute Conjecture Conjectures Constant constr Constraint Constructors Context Corollary CreateHintDb Cut Declare Defined Definition Delimit Dependencies DependentDerive Drop eauto End Equality Eval Example Existential Existentials Existing Export exporting Extern Extract Extraction Fact Field Fields File Fixpoint Focus for From Function Functional Generalizable Global Goal Grab Grammar Graph Guarded Heap Hint HintDb Hints Hypotheses Hypothesis ident Identity If Immediate Implicit Import Include Inductive Infix Info Initial Inline Inspect Instance Instances Intro Intros Inversion Inversion_clear Language Left Lemma Let Libraries Library Load LoadPath Local Locate Ltac ML Mode Module Modules Monomorphic Morphism Next NoInline Notation Obligation Obligations Opaque Open Optimize Options Parameter Parameters Parametric Path Paths pattern Polymorphic Preterm Print Printing Program Projections Proof Proposition Pwd Qed Quit Rec Record Recursive Redirect Relation Remark Remove Require Reserved Reset Resolve Restart Rewrite Right Ring Rings Save Scheme Scope Scopes Script Search SearchAbout SearchHead SearchPattern SearchRewrite Section Separate Set Setoid Show Solve Sorted Step Strategies Strategy Structure SubClass Table Tables Tactic Term Test Theorem Time Timeout Transparent Type Typeclasses Types Undelimit Undo Unfocus Unfocused Unfold Universe Universes Unset Unshelve using Variable Variables Variant Verbose Visibility where with",built_in:"abstract absurd admit after apply as assert assumption at auto autorewrite autounfold before bottom btauto by case case_eq cbn cbv change classical_left classical_right clear clearbody cofix compare compute congruence constr_eq constructor contradict contradiction cut cutrewrite cycle decide decompose dependent destruct destruction dintuition discriminate discrR do double dtauto eapply eassumption eauto ecase econstructor edestruct ediscriminate eelim eexact eexists einduction einjection eleft elim elimtype enough equality erewrite eright esimplify_eq esplit evar exact exactly_once exfalso exists f_equal fail field field_simplify field_simplify_eq first firstorder fix fold fourier functional generalize generalizing gfail give_up has_evar hnf idtac in induction injection instantiate intro intro_pattern intros intuition inversion inversion_clear is_evar is_var lapply lazy left lia lra move native_compute nia nsatz omega once pattern pose progress proof psatz quote record red refine reflexivity remember rename repeat replace revert revgoals rewrite rewrite_strat right ring ring_simplify rtauto set setoid_reflexivity setoid_replace setoid_rewrite setoid_symmetry setoid_transitivity shelve shelve_unifiable simpl simple simplify_eq solve specialize split split_Rabs split_Rmult stepl stepr subst sum swap symmetry tactic tauto time timeout top transitivity trivial try tryif unfold unify until using vm_compute with"},contains:[e.QUOTE_STRING_MODE,e.COMMENT("\\(\\*","\\*\\)"),e.C_NUMBER_MODE,{className:"type",excludeBegin:!0,begin:"\\|\\s*",end:"\\w+"},{begin:/[-=]>/}]}}}),define("highlight/lib/languages/cos",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"string",variants:[{begin:'"',end:'"',contains:[{begin:'""',relevance:0}]}]},n={className:"number",begin:"\\b(\\d+(\\.\\d*)?|\\.\\d+)",relevance:0},i="property parameter class classmethod clientmethod extends as break catch close continue do d|0 else elseif for goto halt hang h|0 if job j|0 kill k|0 lock l|0 merge new open quit q|0 read r|0 return set s|0 tcommit throw trollback try tstart use view while write w|0 xecute x|0 zkill znspace zn ztrap zwrite zw zzdump zzwrite print zbreak zinsert zload zprint zremove zsave zzprint mv mvcall mvcrt mvdim mvprint zquit zsync ascii";return{case_insensitive:!0,aliases:["cos","cls"],keywords:i,contains:[n,t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"comment",begin:/;/,end:"$",relevance:0},{className:"built_in",begin:/(?:\$\$?|\.\.)\^?[a-zA-Z]+/},{className:"built_in",begin:/\$\$\$[a-zA-Z]+/},{className:"built_in",begin:/%[a-z]+(?:\.[a-z]+)*/},{className:"symbol",begin:/\^%?[a-zA-Z][\w]*/},{className:"keyword",begin:/##class|##super|#define|#dim/},{begin:/&sql\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,subLanguage:"sql"},{begin:/&(js|jscript|javascript)/,excludeBegin:!0,excludeEnd:!0,subLanguage:"javascript"},{begin:/&html<\s*\s*>/,subLanguage:"xml"}]}}}),define("highlight/lib/languages/crmsh",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="primitive rsc_template",n="group clone ms master location colocation order fencing_topology rsc_ticket acl_target acl_group user role tag xml",i="property rsc_defaults op_defaults",r="params meta operations op rule attributes utilization",a="read write deny defined not_defined in_range date spec in ref reference attribute type xpath version and or lt gt tag lte gte eq ne \\",o="number string",s="Master Started Slave Stopped start promote demote stop monitor true false";return{aliases:["crm","pcmk"],case_insensitive:!0,keywords:{keyword:r+" "+a+" "+o,literal:s},contains:[e.HASH_COMMENT_MODE,{beginKeywords:"node",starts:{end:"\\s*([\\w_-]+:)?",starts:{className:"title",end:"\\s*[\\$\\w_][\\w_-]*"}}},{beginKeywords:t,starts:{className:"title",end:"\\s*[\\$\\w_][\\w_-]*",starts:{end:"\\s*@?[\\w_][\\w_\\.:-]*"}}},{begin:"\\b("+n.split(" ").join("|")+")\\s+",keywords:n,starts:{className:"title",end:"[\\$\\w_][\\w_-]*"}},{beginKeywords:i,starts:{className:"title",end:"\\s*([\\w_-]+:)?"}},e.QUOTE_STRING_MODE,{className:"meta",begin:"(ocf|systemd|service|lsb):[\\w_:-]+",relevance:0},{className:"number",begin:"\\b\\d+(\\.\\d+)?(ms|s|h|m)?",relevance:0},{className:"literal",begin:"[-]?(infinity|inf)",relevance:0},{className:"attr",begin:/([A-Za-z\$_\#][\w_-]+)=/,relevance:0},{className:"tag",begin:"",relevance:0}]}}}),define("highlight/lib/languages/crystal",["require","exports","module"],function(e,t,n){n.exports=function(e){function t(e,t){var n=[{begin:e,end:t}];return n[0].contains=n,n}var n="(_[uif](8|16|32|64))?",i="[a-zA-Z_]\\w*[!?=]?",r="!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",a="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\][=?]?",o={keyword:"abstract alias as asm begin break case class def do else elsif end ensure enum extend for fun if ifdef include instance_sizeof is_a? lib macro module next of out pointerof private protected rescue responds_to? return require self sizeof struct super then type typeof union unless until when while with yield __DIR__ __FILE__ __LINE__",literal:"false nil true"},s={className:"subst",begin:"#{",end:"}",keywords:o},l={className:"template-variable",variants:[{begin:"\\{\\{",end:"\\}\\}"},{begin:"\\{%",end:"%\\}"}],keywords:o},c={className:"string",contains:[e.BACKSLASH_ESCAPE,s],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:"%w?\\(",end:"\\)",contains:t("\\(","\\)")},{begin:"%w?\\[",end:"\\]",contains:t("\\[","\\]")},{begin:"%w?{",end:"}",contains:t("{","}")},{begin:"%w?<",end:">",contains:t("<",">")},{begin:"%w?/",end:"/"},{begin:"%w?%",end:"%"},{begin:"%w?-",end:"-"},{begin:"%w?\\|",end:"\\|"}],relevance:0},d={begin:"("+r+")\\s*",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,s],variants:[{begin:"//[a-z]*",relevance:0},{begin:"/",end:"/[a-z]*"},{begin:"%r\\(",end:"\\)",contains:t("\\(","\\)")},{begin:"%r\\[",end:"\\]",contains:t("\\[","\\]")},{begin:"%r{",end:"}",contains:t("{","}")},{begin:"%r<",end:">",contains:t("<",">")},{begin:"%r/",end:"/"},{begin:"%r%",end:"%"},{begin:"%r-",end:"-"},{begin:"%r\\|",end:"\\|"}]}],relevance:0},u={className:"regexp",contains:[e.BACKSLASH_ESCAPE,s],variants:[{begin:"%r\\(",end:"\\)",contains:t("\\(","\\)")},{begin:"%r\\[",end:"\\]",contains:t("\\[","\\]")},{begin:"%r{",end:"}",contains:t("{","}")},{begin:"%r<",end:">",contains:t("<",">")},{begin:"%r/",end:"/"},{begin:"%r%",end:"%"},{begin:"%r-",end:"-"},{begin:"%r\\|",end:"\\|"}],relevance:0},m={className:"meta",begin:"@\\[",end:"\\]",contains:[e.inherit(e.QUOTE_STRING_MODE,{className:"meta-string"})]},p=[l,c,d,u,m,e.HASH_COMMENT_MODE,{className:"class",beginKeywords:"class module struct",end:"$|;",illegal:/=/,contains:[e.HASH_COMMENT_MODE,e.inherit(e.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{begin:"<"}]},{className:"class",beginKeywords:"lib enum union",end:"$|;",illegal:/=/,contains:[e.HASH_COMMENT_MODE,e.inherit(e.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"})],relevance:10},{className:"function",beginKeywords:"def",end:/\B\b/,contains:[e.inherit(e.TITLE_MODE,{begin:a,endsParent:!0})]},{className:"function",beginKeywords:"fun macro",end:/\B\b/,contains:[e.inherit(e.TITLE_MODE,{begin:a,endsParent:!0})],relevance:5},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(\\!|\\?)?:",relevance:0},{className:"symbol",begin:":",contains:[c,{begin:a}],relevance:0},{className:"number",variants:[{begin:"\\b0b([01_]*[01])"+n},{begin:"\\b0o([0-7_]*[0-7])"+n},{begin:"\\b0x([A-Fa-f0-9_]*[A-Fa-f0-9])"+n},{begin:"\\b(([0-9][0-9_]*[0-9]|[0-9])(\\.[0-9_]*[0-9])?([eE][+-]?[0-9_]*[0-9])?)"+n}],relevance:0}];return s.contains=p,l.contains=p.slice(1),{aliases:["cr"],lexemes:i,keywords:o,contains:p}}}),define("highlight/lib/languages/cs",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={keyword:"abstract as base bool break byte case catch char checked const continue decimal default delegate do double else enum event explicit extern finally fixed float for foreach goto if implicit in int interface internal is lock long object operator out override params private protected public readonly ref sbyte sealed short sizeof stackalloc static string struct switch this try typeof uint ulong unchecked unsafe ushort using virtual void volatile while nameof add alias ascending async await by descending dynamic equals from get global group into join let on orderby partial remove select set value var where yield",literal:"null false true"},n={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},i=e.inherit(n,{illegal:/\n/}),r={className:"subst",begin:"{",end:"}",keywords:t},a=e.inherit(r,{illegal:/\n/}),o={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:"{{"},{begin:"}}"},e.BACKSLASH_ESCAPE,a]},s={className:"string",begin:/\$@"/,end:'"',contains:[{begin:"{{"},{begin:"}}"},{begin:'""'},r]},l=e.inherit(s,{illegal:/\n/,contains:[{begin:"{{"},{begin:"}}"},{begin:'""'},a]});r.contains=[s,o,n,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE],a.contains=[l,o,i,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];var c={variants:[s,o,n,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},d=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?";return{aliases:["csharp"],keywords:t,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:""},{begin:""}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{"meta-keyword":"if else elif endif define undef warning error line region endregion pragma checksum"}},c,e.C_NUMBER_MODE,{beginKeywords:"class interface",end:/[{;=]/,illegal:/[^\s:]/,contains:[e.TITLE_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",end:/[{;=]/,illegal:/[^\s:]/,contains:[e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new return throw await",relevance:0},{className:"function",begin:"("+d+"\\s+)+"+e.IDENT_RE+"\\s*\\(",returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:t,contains:[{begin:e.IDENT_RE+"\\s*\\(",returnBegin:!0,contains:[e.TITLE_MODE],relevance:0},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,relevance:0,contains:[c,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}]}}}),define("highlight/lib/languages/csp",["require","exports","module"],function(e,t,n){n.exports=function(e){return{case_insensitive:!1,lexemes:"[a-zA-Z][a-zA-Z0-9_-]*",keywords:{keyword:"base-uri child-src connect-src default-src font-src form-action frame-ancestors frame-src img-src media-src object-src plugin-types report-uri sandbox script-src style-src"},contains:[{className:"string",begin:"'",end:"'"},{className:"attribute",begin:"^Content",end:":",excludeEnd:!0}]}}}),define("highlight/lib/languages/css",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="[a-zA-Z-][a-zA-Z0-9_-]*",n={begin:/[A-Z\_\.\-]+\s*:/,returnBegin:!0,end:";",endsWithParent:!0,contains:[{className:"attribute",begin:/\S/,end:":",excludeEnd:!0,starts:{endsWithParent:!0,excludeEnd:!0,contains:[{begin:/[\w-]+\(/,returnBegin:!0,contains:[{className:"built_in",begin:/[\w-]+/},{begin:/\(/,end:/\)/,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]}]},e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_BLOCK_COMMENT_MODE,{className:"number",begin:"#[0-9A-Fa-f]+"},{className:"meta",begin:"!important"}]}}]};return{case_insensitive:!0,illegal:/[=\/|'\$]/,contains:[e.C_BLOCK_COMMENT_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/},{className:"selector-class",begin:/\.[A-Za-z0-9_-]+/},{className:"selector-attr",begin:/\[/,end:/\]/,illegal:"$"},{className:"selector-pseudo",begin:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{begin:"@(font-face|page)",lexemes:"[a-z-]+",keywords:"font-face page"},{begin:"@",end:"[{;]",illegal:/:/,contains:[{className:"keyword",begin:/\w+/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:t,relevance:0},{begin:"{",end:"}",illegal:/\S/,contains:[e.C_BLOCK_COMMENT_MODE,n]}]}}}),define("highlight/lib/languages/d",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={keyword:"abstract alias align asm assert auto body break byte case cast catch class const continue debug default delete deprecated do else enum export extern final finally for foreach foreach_reverse|10 goto if immutable import in inout int interface invariant is lazy macro mixin module new nothrow out override package pragma private protected public pure ref return scope shared static struct super switch synchronized template this throw try typedef typeid typeof union unittest version void volatile while with __FILE__ __LINE__ __gshared|10 __thread __traits __DATE__ __EOF__ __TIME__ __TIMESTAMP__ __VENDOR__ __VERSION__",built_in:"bool cdouble cent cfloat char creal dchar delegate double dstring float function idouble ifloat ireal long real short string ubyte ucent uint ulong ushort wchar wstring",literal:"false null true"},n="(0|[1-9][\\d_]*)",i="(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)",r="0[bB][01_]+",a="([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*)",o="0[xX]"+a,s="([eE][+-]?"+i+")",l="("+i+"(\\.\\d*|"+s+")|\\d+\\."+i+i+"|\\."+n+s+"?)",c="(0[xX]("+a+"\\."+a+"|\\.?"+a+")[pP][+-]?"+i+")",d="("+n+"|"+r+"|"+o+")",u="("+c+"|"+l+")",m="\\\\(['\"\\?\\\\abfnrtv]|u[\\dA-Fa-f]{4}|[0-7]{1,3}|x[\\dA-Fa-f]{2}|U[\\dA-Fa-f]{8})|&[a-zA-Z\\d]{2,};",p={className:"number",begin:"\\b"+d+"(L|u|U|Lu|LU|uL|UL)?",relevance:0},g={className:"number",begin:"\\b("+u+"([fF]|L|i|[fF]i|Li)?|"+d+"(i|[fF]i|Li))",relevance:0},h={className:"string",begin:"'("+m+"|.)",end:"'",illegal:"."},b={begin:m,relevance:0},f={className:"string",begin:'"',contains:[b],end:'"[cwd]?'},_={className:"string",begin:'[rq]"',end:'"[cwd]?',relevance:5},v={className:"string",begin:"`",end:"`[cwd]?"},y={className:"string",begin:'x"[\\da-fA-F\\s\\n\\r]*"[cwd]?',relevance:10},E={className:"string",begin:'q"\\{',end:'\\}"'},w={className:"meta",begin:"^#!",end:"$",relevance:5},x={className:"meta",begin:"#(line)",end:"$",relevance:5},C={className:"keyword",begin:"@[a-zA-Z_][a-zA-Z_\\d]*"},S=e.COMMENT("\\/\\+","\\+\\/",{contains:["self"],relevance:10});return{lexemes:e.UNDERSCORE_IDENT_RE,keywords:t,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,S,y,f,_,v,E,g,p,h,w,x,C]}}}),define("highlight/lib/languages/markdown",["require","exports","module"],function(e,t,n){n.exports=function(e){return{aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$"},{begin:"^.+?\\n[=-]{2,}$"}]},{begin:"<",end:">",subLanguage:"xml",relevance:0},{className:"bullet",begin:"^([*+-]|(\\d+\\.))\\s+"},{className:"strong",begin:"[*_]{2}.+?[*_]{2}"},{className:"emphasis",variants:[{begin:"\\*.+?\\*"},{begin:"_.+?_",relevance:0}]},{className:"quote",begin:"^>\\s+",end:"$"},{className:"code",variants:[{begin:"^```w*s*$",end:"^```s*$"},{begin:"`.+?`"},{begin:"^( {4}|\t)",end:"$",relevance:0}]},{begin:"^[-\\*]{3,}",end:"$"},{begin:"\\[.+?\\][\\(\\[].*?[\\)\\]]",returnBegin:!0,contains:[{className:"string",begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0,relevance:0},{className:"link",begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}],relevance:10},{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]}]}}}),define("highlight/lib/languages/dart",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"subst",begin:"\\$\\{",end:"}",keywords:"true false null this is new super"},n={className:"string",variants:[{begin:"r'''",end:"'''"},{begin:'r"""',end:'"""'},{begin:"r'",end:"'",illegal:"\\n"},{begin:'r"',end:'"',illegal:"\\n"},{begin:"'''",end:"'''",contains:[e.BACKSLASH_ESCAPE,t]},{begin:'"""',end:'"""',contains:[e.BACKSLASH_ESCAPE,t]},{begin:"'",end:"'",illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,t]},{begin:'"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,t]}]};t.contains=[e.C_NUMBER_MODE,n];var i={keyword:"assert async await break case catch class const continue default do else enum extends false final finally for if in is new null rethrow return super switch sync this throw true try var void while with yield abstract as dynamic export external factory get implements import library operator part set static typedef",built_in:"print Comparable DateTime Duration Function Iterable Iterator List Map Match Null Object Pattern RegExp Set Stopwatch String StringBuffer StringSink Symbol Type Uri bool double int num document window querySelector querySelectorAll Element ElementList"};return{keywords:i,contains:[n,e.COMMENT("/\\*\\*","\\*/",{subLanguage:"markdown"}),e.COMMENT("///","$",{subLanguage:"markdown"}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},e.C_NUMBER_MODE,{className:"meta",begin:"@[A-Za-z]+"},{begin:"=>"}]}}}),define("highlight/lib/languages/delphi",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="exports register file shl array record property for mod while set ally label uses raise not stored class safecall var interface or private static exit index inherited to else stdcall override shr asm far resourcestring finalization packed virtual out and protected library do xorwrite goto near function end div overload object unit begin string on inline repeat until destructor write message program with read initialization except default nil if case cdecl in downto threadvar of try pascal const external constructor type public then implementation finally published procedure absolute reintroduce operator as is abstract alias assembler bitpacked break continue cppdecl cvar enumerator experimental platform deprecated unimplemented dynamic export far16 forward generic helper implements interrupt iochecks local name nodefault noreturn nostackframe oldfpccall otherwise saveregisters softfloat specialize strict unaligned varargs ",n=[e.C_LINE_COMMENT_MODE,e.COMMENT(/\{/,/\}/,{relevance:0}),e.COMMENT(/\(\*/,/\*\)/,{relevance:10})],i={className:"string",begin:/'/,end:/'/,contains:[{begin:/''/}]},r={className:"string",begin:/(#\d+)+/},a={begin:e.IDENT_RE+"\\s*=\\s*class\\s*\\(",returnBegin:!0,contains:[e.TITLE_MODE]},o={className:"function",beginKeywords:"function constructor destructor procedure",end:/[:;]/,keywords:"function constructor|10 destructor|10 procedure|10",contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,keywords:t,contains:[i,r]}].concat(n)};return{aliases:["dpr","dfm","pas","pascal","freepascal","lazarus","lpr","lfm"],case_insensitive:!0,keywords:t,illegal:/"|\$[G-Zg-z]|\/\*|<\/|\|/,contains:[i,r,e.NUMBER_MODE,a,o].concat(n)}}}),define("highlight/lib/languages/diff",["require","exports","module"],function(e,t,n){n.exports=function(e){return{aliases:["patch"],contains:[{className:"meta",relevance:10,variants:[{begin:/^@@ +\-\d+,\d+ +\+\d+,\d+ +@@$/},{begin:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{begin:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{className:"comment",variants:[{begin:/Index: /,end:/$/},{begin:/={3,}/,end:/$/},{begin:/^\-{3}/,end:/$/},{begin:/^\*{3} /,end:/$/},{begin:/^\+{3}/,end:/$/},{begin:/\*{5}/,end:/\*{5}$/}]},{className:"addition",begin:"^\\+",end:"$"},{className:"deletion",begin:"^\\-",end:"$"},{className:"addition",begin:"^\\!",end:"$"}]}}}),define("highlight/lib/languages/django",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={begin:/\|[A-Za-z]+:?/,keywords:{name:"truncatewords removetags linebreaksbr yesno get_digit timesince random striptags filesizeformat escape linebreaks length_is ljust rjust cut urlize fix_ampersands title floatformat capfirst pprint divisibleby add make_list unordered_list urlencode timeuntil urlizetrunc wordcount stringformat linenumbers slice date dictsort dictsortreversed default_if_none pluralize lower join center default truncatewords_html upper length phone2numeric wordwrap time addslashes slugify first escapejs force_escape iriencode last safe safeseq truncatechars localize unlocalize localtime utc timezone"},contains:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE]};return{aliases:["jinja"],case_insensitive:!0,subLanguage:"xml",contains:[e.COMMENT(/\{%\s*comment\s*%}/,/\{%\s*endcomment\s*%}/),e.COMMENT(/\{#/,/#}/),{ -className:"template-tag",begin:/\{%/,end:/%}/,contains:[{className:"name",begin:/\w+/,keywords:{name:"comment endcomment load templatetag ifchanged endifchanged if endif firstof for endfor ifnotequal endifnotequal widthratio extends include spaceless endspaceless regroup ifequal endifequal ssi now with cycle url filter endfilter debug block endblock else autoescape endautoescape csrf_token empty elif endwith static trans blocktrans endblocktrans get_static_prefix get_media_prefix plural get_current_language language get_available_languages get_current_language_bidi get_language_info get_language_info_list localize endlocalize localtime endlocaltime timezone endtimezone get_current_timezone verbatim"},starts:{endsWithParent:!0,keywords:"in by as",contains:[t],relevance:0}}]},{className:"template-variable",begin:/\{\{/,end:/}}/,contains:[t]}]}}}),define("highlight/lib/languages/dns",["require","exports","module"],function(e,t,n){n.exports=function(e){return{aliases:["bind","zone"],keywords:{keyword:"IN A AAAA AFSDB APL CAA CDNSKEY CDS CERT CNAME DHCID DLV DNAME DNSKEY DS HIP IPSECKEY KEY KX LOC MX NAPTR NS NSEC NSEC3 NSEC3PARAM PTR RRSIG RP SIG SOA SRV SSHFP TA TKEY TLSA TSIG TXT"},contains:[e.COMMENT(";","$",{relevance:0}),{className:"meta",begin:/^\$(TTL|GENERATE|INCLUDE|ORIGIN)\b/},{className:"number",begin:"((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))\\b"},{className:"number",begin:"((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]).){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\b"},e.inherit(e.NUMBER_MODE,{begin:/\b\d+[dhwm]?/})]}}}),define("highlight/lib/languages/dockerfile",["require","exports","module"],function(e,t,n){n.exports=function(e){return{aliases:["docker"],case_insensitive:!0,keywords:"from maintainer expose env user onbuild",contains:[e.HASH_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{beginKeywords:"run cmd entrypoint volume add copy workdir label healthcheck",starts:{end:/[^\\]\n/,subLanguage:"bash"}}],illegal:"",illegal:"\\n"}]},t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},r={className:"variable",begin:"\\&[a-z\\d_]*\\b"},a={className:"meta-keyword",begin:"/[a-z][a-z\\d-]*/"},o={className:"symbol",begin:"^\\s*[a-zA-Z_][a-zA-Z\\d_]*:"},s={className:"params",begin:"<",end:">",contains:[n,r]},l={className:"class",begin:/[a-zA-Z_][a-zA-Z\d_@]*\s{/,end:/[{;=]/,returnBegin:!0,excludeEnd:!0},c={className:"class",begin:"/\\s*{",end:"};",relevance:10,contains:[r,a,o,l,s,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,t]};return{keywords:"",contains:[c,r,a,o,l,s,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,t,i,{begin:e.IDENT_RE+"::",keywords:""}]}}}),define("highlight/lib/languages/dust",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="if eq ne lt lte gt gte select default math sep";return{aliases:["dst"],case_insensitive:!0,subLanguage:"xml",contains:[{className:"template-tag",begin:/\{[#\/]/,end:/\}/,illegal:/;/,contains:[{className:"name",begin:/[a-zA-Z\.-]+/,starts:{endsWithParent:!0,relevance:0,contains:[e.QUOTE_STRING_MODE]}}]},{className:"template-variable",begin:/\{/,end:/\}/,illegal:/;/,keywords:t}]}}}),define("highlight/lib/languages/ebnf",["require","exports","module"],function(e,t,n){n.exports=function(e){var t=e.COMMENT(/\(\*/,/\*\)/),n={className:"attribute",begin:/^[ ]*[a-zA-Z][a-zA-Z-]*([\s-]+[a-zA-Z][a-zA-Z]*)*/},i={className:"meta",begin:/\?.*\?/},r={begin:/=/,end:/;/,contains:[t,i,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]};return{illegal:/\S/,contains:[t,n,r]}}}),define("highlight/lib/languages/elixir",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="[a-zA-Z_][a-zA-Z0-9_]*(\\!|\\?)?",n="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",i="and false then defined module in return redo retry end for true self when next until do begin unless nil break not case cond alias while ensure or include use alias fn quote",r={className:"subst",begin:"#\\{",end:"}",lexemes:t,keywords:i},a={className:"string",contains:[e.BACKSLASH_ESCAPE,r],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/}]},o={className:"function",beginKeywords:"def defp defmacro",end:/\B\b/,contains:[e.inherit(e.TITLE_MODE,{begin:t,endsParent:!0})]},s=e.inherit(o,{className:"class",beginKeywords:"defimpl defmodule defprotocol defrecord",end:/\bdo\b|$|;/}),l=[a,e.HASH_COMMENT_MODE,s,o,{className:"symbol",begin:":(?!\\s)",contains:[a,{begin:n}],relevance:0},{className:"symbol",begin:t+":",relevance:0},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{className:"variable",begin:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{begin:"->"},{begin:"("+e.RE_STARTERS_RE+")\\s*",contains:[e.HASH_COMMENT_MODE,{className:"regexp",illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,r],variants:[{begin:"/",end:"/[a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}],relevance:0}];return r.contains=l,{lexemes:t,keywords:i,contains:l}}}),define("highlight/lib/languages/elm",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={variants:[e.COMMENT("--","$"),e.COMMENT("{-","-}",{contains:["self"]})]},n={className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},i={begin:"\\(",end:"\\)",illegal:'"',contains:[{className:"type",begin:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"},t]},r={begin:"{",end:"}",contains:i.contains};return{keywords:"let in if then else case of where module import exposing type alias as infix infixl infixr port effect command subscription",contains:[{beginKeywords:"port effect module",end:"exposing",keywords:"port effect module where command subscription exposing",contains:[i,t],illegal:"\\W\\.|;"},{begin:"import",end:"$",keywords:"import as exposing",contains:[i,t],illegal:"\\W\\.|;"},{begin:"type",end:"$",keywords:"type alias",contains:[n,i,r,t]},{beginKeywords:"infix infixl infixr",end:"$",contains:[e.C_NUMBER_MODE,t]},{begin:"port",end:"$",keywords:"port",contains:[t]},e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,n,e.inherit(e.TITLE_MODE,{begin:"^[_a-z][\\w']*"}),t,{begin:"->|<-"}]}}}),define("highlight/lib/languages/ruby",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",n={keyword:"and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",literal:"true false nil"},i={className:"doctag",begin:"@[A-Za-z]+"},r={begin:"#<",end:">"},a=[e.COMMENT("#","$",{contains:[i]}),e.COMMENT("^\\=begin","^\\=end",{contains:[i],relevance:10}),e.COMMENT("^__END__","\\n$")],o={className:"subst",begin:"#\\{",end:"}",keywords:n},s={className:"string",contains:[e.BACKSLASH_ESCAPE,o],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:"%[qQwWx]?\\(",end:"\\)"},{begin:"%[qQwWx]?\\[",end:"\\]"},{begin:"%[qQwWx]?{",end:"}"},{begin:"%[qQwWx]?<",end:">"},{begin:"%[qQwWx]?/",end:"/"},{begin:"%[qQwWx]?%",end:"%"},{begin:"%[qQwWx]?-",end:"-"},{begin:"%[qQwWx]?\\|",end:"\\|"},{begin:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/},{begin:/<<(-?)\w+$/,end:/^\s*\w+$/}]},l={className:"params",begin:"\\(",end:"\\)",endsParent:!0,keywords:n},c=[s,r,{className:"class",beginKeywords:"class module",end:"$|;",illegal:/=/,contains:[e.inherit(e.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{begin:"<\\s*",contains:[{begin:"("+e.IDENT_RE+"::)?"+e.IDENT_RE}]}].concat(a)},{className:"function",beginKeywords:"def",end:"$|;",contains:[e.inherit(e.TITLE_MODE,{begin:t}),l].concat(a)},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(\\!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[s,{begin:t}],relevance:0},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{className:"params",begin:/\|/,end:/\|/,keywords:n},{begin:"("+e.RE_STARTERS_RE+")\\s*",contains:[r,{className:"regexp",contains:[e.BACKSLASH_ESCAPE,o],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:"%r{",end:"}[a-z]*"},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(a),relevance:0}].concat(a);o.contains=c,l.contains=c;var d="[>?]>",u="[\\w#]+\\(\\w+\\):\\d+:\\d+>",m="(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>",p=[{begin:/^\s*=>/,starts:{end:"$",contains:c}},{className:"meta",begin:"^("+d+"|"+u+"|"+m+")",starts:{end:"$",contains:c}}];return{aliases:["rb","gemspec","podspec","thor","irb"],keywords:n,illegal:/\/\*/,contains:a.concat(p).concat(c)}}}),define("highlight/lib/languages/erb",["require","exports","module"],function(e,t,n){n.exports=function(e){return{subLanguage:"xml",contains:[e.COMMENT("<%#","%>"),{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0}]}}}),define("highlight/lib/languages/erlang-repl",["require","exports","module"],function(e,t,n){n.exports=function(e){return{keywords:{built_in:"spawn spawn_link self",keyword:"after and andalso|10 band begin bnot bor bsl bsr bxor case catch cond div end fun if let not of or orelse|10 query receive rem try when xor"},contains:[{className:"meta",begin:"^[0-9]+> ",relevance:10},e.COMMENT("%","$"),{className:"number",begin:"\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)",relevance:0},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{begin:"\\?(::)?([A-Z]\\w*(::)?)+"},{begin:"->"},{begin:"ok"},{begin:"!"},{begin:"(\\b[a-z'][a-zA-Z0-9_']*:[a-z'][a-zA-Z0-9_']*)|(\\b[a-z'][a-zA-Z0-9_']*)",relevance:0},{begin:"[A-Z][a-zA-Z0-9_']*",relevance:0}]}}}),define("highlight/lib/languages/erlang",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="[a-z'][a-zA-Z0-9_']*",n="("+t+":"+t+"|"+t+")",i={keyword:"after and andalso|10 band begin bnot bor bsl bzr bxor case catch cond div end fun if let not of orelse|10 query receive rem try when xor",literal:"false true"},r=e.COMMENT("%","$"),a={className:"number",begin:"\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)",relevance:0},o={begin:"fun\\s+"+t+"/\\d+"},s={begin:n+"\\(",end:"\\)",returnBegin:!0,relevance:0,contains:[{begin:n,relevance:0},{begin:"\\(",end:"\\)",endsWithParent:!0,returnEnd:!0,relevance:0}]},l={begin:"{",end:"}",relevance:0},c={begin:"\\b_([A-Z][A-Za-z0-9_]*)?",relevance:0},d={begin:"[A-Z][a-zA-Z0-9_]*",relevance:0},u={begin:"#"+e.UNDERSCORE_IDENT_RE,relevance:0,returnBegin:!0,contains:[{begin:"#"+e.UNDERSCORE_IDENT_RE,relevance:0},{begin:"{",end:"}",relevance:0}]},m={beginKeywords:"fun receive if try case",end:"end",keywords:i};m.contains=[r,o,e.inherit(e.APOS_STRING_MODE,{className:""}),m,s,e.QUOTE_STRING_MODE,a,l,c,d,u];var p=[r,o,m,s,e.QUOTE_STRING_MODE,a,l,c,d,u];s.contains[1].contains=p,l.contains=p,u.contains[1].contains=p;var g={className:"params",begin:"\\(",end:"\\)",contains:p};return{aliases:["erl"],keywords:i,illegal:"(",returnBegin:!0,illegal:"\\(|#|//|/\\*|\\\\|:|;",contains:[g,e.inherit(e.TITLE_MODE,{begin:t})],starts:{end:";|\\.",keywords:i,contains:p}},r,{begin:"^-",end:"\\.",relevance:0,excludeEnd:!0,returnBegin:!0,lexemes:"-"+e.IDENT_RE,keywords:"-module -record -undef -export -ifdef -ifndef -author -copyright -doc -vsn -import -include -include_lib -compile -define -else -endif -file -behaviour -behavior -spec",contains:[g]},a,e.QUOTE_STRING_MODE,u,c,d,l,{begin:/\.$/}]}}}),define("highlight/lib/languages/excel",["require","exports","module"],function(e,t,n){n.exports=function(e){return{aliases:["xlsx","xls"],case_insensitive:!0,lexemes:/[a-zA-Z][\w\.]*/,keywords:{built_in:"ABS ACCRINT ACCRINTM ACOS ACOSH ACOT ACOTH AGGREGATE ADDRESS AMORDEGRC AMORLINC AND ARABIC AREAS ASC ASIN ASINH ATAN ATAN2 ATANH AVEDEV AVERAGE AVERAGEA AVERAGEIF AVERAGEIFS BAHTTEXT BASE BESSELI BESSELJ BESSELK BESSELY BETADIST BETA.DIST BETAINV BETA.INV BIN2DEC BIN2HEX BIN2OCT BINOMDIST BINOM.DIST BINOM.DIST.RANGE BINOM.INV BITAND BITLSHIFT BITOR BITRSHIFT BITXOR CALL CEILING CEILING.MATH CEILING.PRECISE CELL CHAR CHIDIST CHIINV CHITEST CHISQ.DIST CHISQ.DIST.RT CHISQ.INV CHISQ.INV.RT CHISQ.TEST CHOOSE CLEAN CODE COLUMN COLUMNS COMBIN COMBINA COMPLEX CONCAT CONCATENATE CONFIDENCE CONFIDENCE.NORM CONFIDENCE.T CONVERT CORREL COS COSH COT COTH COUNT COUNTA COUNTBLANK COUNTIF COUNTIFS COUPDAYBS COUPDAYS COUPDAYSNC COUPNCD COUPNUM COUPPCD COVAR COVARIANCE.P COVARIANCE.S CRITBINOM CSC CSCH CUBEKPIMEMBER CUBEMEMBER CUBEMEMBERPROPERTY CUBERANKEDMEMBER CUBESET CUBESETCOUNT CUBEVALUE CUMIPMT CUMPRINC DATE DATEDIF DATEVALUE DAVERAGE DAY DAYS DAYS360 DB DBCS DCOUNT DCOUNTA DDB DEC2BIN DEC2HEX DEC2OCT DECIMAL DEGREES DELTA DEVSQ DGET DISC DMAX DMIN DOLLAR DOLLARDE DOLLARFR DPRODUCT DSTDEV DSTDEVP DSUM DURATION DVAR DVARP EDATE EFFECT ENCODEURL EOMONTH ERF ERF.PRECISE ERFC ERFC.PRECISE ERROR.TYPE EUROCONVERT EVEN EXACT EXP EXPON.DIST EXPONDIST FACT FACTDOUBLE FALSE|0 F.DIST FDIST F.DIST.RT FILTERXML FIND FINDB F.INV F.INV.RT FINV FISHER FISHERINV FIXED FLOOR FLOOR.MATH FLOOR.PRECISE FORECAST FORECAST.ETS FORECAST.ETS.CONFINT FORECAST.ETS.SEASONALITY FORECAST.ETS.STAT FORECAST.LINEAR FORMULATEXT FREQUENCY F.TEST FTEST FV FVSCHEDULE GAMMA GAMMA.DIST GAMMADIST GAMMA.INV GAMMAINV GAMMALN GAMMALN.PRECISE GAUSS GCD GEOMEAN GESTEP GETPIVOTDATA GROWTH HARMEAN HEX2BIN HEX2DEC HEX2OCT HLOOKUP HOUR HYPERLINK HYPGEOM.DIST HYPGEOMDIST IF|0 IFERROR IFNA IFS IMABS IMAGINARY IMARGUMENT IMCONJUGATE IMCOS IMCOSH IMCOT IMCSC IMCSCH IMDIV IMEXP IMLN IMLOG10 IMLOG2 IMPOWER IMPRODUCT IMREAL IMSEC IMSECH IMSIN IMSINH IMSQRT IMSUB IMSUM IMTAN INDEX INDIRECT INFO INT INTERCEPT INTRATE IPMT IRR ISBLANK ISERR ISERROR ISEVEN ISFORMULA ISLOGICAL ISNA ISNONTEXT ISNUMBER ISODD ISREF ISTEXT ISO.CEILING ISOWEEKNUM ISPMT JIS KURT LARGE LCM LEFT LEFTB LEN LENB LINEST LN LOG LOG10 LOGEST LOGINV LOGNORM.DIST LOGNORMDIST LOGNORM.INV LOOKUP LOWER MATCH MAX MAXA MAXIFS MDETERM MDURATION MEDIAN MID MIDBs MIN MINIFS MINA MINUTE MINVERSE MIRR MMULT MOD MODE MODE.MULT MODE.SNGL MONTH MROUND MULTINOMIAL MUNIT N NA NEGBINOM.DIST NEGBINOMDIST NETWORKDAYS NETWORKDAYS.INTL NOMINAL NORM.DIST NORMDIST NORMINV NORM.INV NORM.S.DIST NORMSDIST NORM.S.INV NORMSINV NOT NOW NPER NPV NUMBERVALUE OCT2BIN OCT2DEC OCT2HEX ODD ODDFPRICE ODDFYIELD ODDLPRICE ODDLYIELD OFFSET OR PDURATION PEARSON PERCENTILE.EXC PERCENTILE.INC PERCENTILE PERCENTRANK.EXC PERCENTRANK.INC PERCENTRANK PERMUT PERMUTATIONA PHI PHONETIC PI PMT POISSON.DIST POISSON POWER PPMT PRICE PRICEDISC PRICEMAT PROB PRODUCT PROPER PV QUARTILE QUARTILE.EXC QUARTILE.INC QUOTIENT RADIANS RAND RANDBETWEEN RANK.AVG RANK.EQ RANK RATE RECEIVED REGISTER.ID REPLACE REPLACEB REPT RIGHT RIGHTB ROMAN ROUND ROUNDDOWN ROUNDUP ROW ROWS RRI RSQ RTD SEARCH SEARCHB SEC SECH SECOND SERIESSUM SHEET SHEETS SIGN SIN SINH SKEW SKEW.P SLN SLOPE SMALL SQL.REQUEST SQRT SQRTPI STANDARDIZE STDEV STDEV.P STDEV.S STDEVA STDEVP STDEVPA STEYX SUBSTITUTE SUBTOTAL SUM SUMIF SUMIFS SUMPRODUCT SUMSQ SUMX2MY2 SUMX2PY2 SUMXMY2 SWITCH SYD T TAN TANH TBILLEQ TBILLPRICE TBILLYIELD T.DIST T.DIST.2T T.DIST.RT TDIST TEXT TEXTJOIN TIME TIMEVALUE T.INV T.INV.2T TINV TODAY TRANSPOSE TREND TRIM TRIMMEAN TRUE|0 TRUNC T.TEST TTEST TYPE UNICHAR UNICODE UPPER VALUE VAR VAR.P VAR.S VARA VARP VARPA VDB VLOOKUP WEBSERVICE WEEKDAY WEEKNUM WEIBULL WEIBULL.DIST WORKDAY WORKDAY.INTL XIRR XNPV XOR YEAR YEARFRAC YIELD YIELDDISC YIELDMAT Z.TEST ZTEST"},contains:[{begin:/^=/,end:/[^=]/,returnEnd:!0,illegal:/=/,relevance:10},{className:"symbol",begin:/\b[A-Z]{1,2}\d+\b/,end:/[^\d]/,excludeEnd:!0,relevance:0},{className:"symbol",begin:/[A-Z]{0,2}\d*:[A-Z]{0,2}\d*/,relevance:0},e.BACKSLASH_ESCAPE,e.QUOTE_STRING_MODE,{className:"number",begin:e.NUMBER_RE+"(%)?",relevance:0},e.COMMENT(/\bN\(/,/\)/,{excludeBegin:!0,excludeEnd:!0,illegal:/\n/})]}}}),define("highlight/lib/languages/fix",["require","exports","module"],function(e,t,n){n.exports=function(e){return{contains:[{begin:/[^\u2401\u0001]+/,end:/[\u2401\u0001]/,excludeEnd:!0,returnBegin:!0,returnEnd:!1,contains:[{begin:/([^\u2401\u0001=]+)/,end:/=([^\u2401\u0001=]+)/,returnEnd:!0,returnBegin:!1,className:"attr"},{begin:/=/,end:/([\u2401\u0001])/,excludeEnd:!0,excludeBegin:!0,className:"string"}]}],case_insensitive:!0}}}),define("highlight/lib/languages/flix",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"string",begin:/'(.|\\[xXuU][a-zA-Z0-9]+)'/},n={className:"string",variants:[{begin:'"',end:'"'}]},i={className:"title",begin:/[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/},r={className:"function",beginKeywords:"def",end:/[:={\[(\n;]/,excludeEnd:!0,contains:[i]};return{keywords:{literal:"true false",keyword:"case class def else enum if impl import in lat rel index let match namespace switch type yield with"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t,n,r,e.C_NUMBER_MODE]}}}),define("highlight/lib/languages/fortran",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"params",begin:"\\(",end:"\\)"},n={literal:".False. .True.",keyword:"kind do while private call intrinsic where elsewhere type endtype endmodule endselect endinterface end enddo endif if forall endforall only contains default return stop then public subroutine|10 function program .and. .or. .not. .le. .eq. .ge. .gt. .lt. goto save else use module select case access blank direct exist file fmt form formatted iostat name named nextrec number opened rec recl sequential status unformatted unit continue format pause cycle exit c_null_char c_alert c_backspace c_form_feed flush wait decimal round iomsg synchronous nopass non_overridable pass protected volatile abstract extends import non_intrinsic value deferred generic final enumerator class associate bind enum c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t c_int_least32_t c_int_least64_t c_int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr c_new_line c_carriage_return c_horizontal_tab c_vertical_tab iso_c_binding c_loc c_funloc c_associated c_f_pointer c_ptr c_funptr iso_fortran_env character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor numeric_storage_size output_unit c_f_procpointer ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode newunit contiguous recursive pad position action delim readwrite eor advance nml interface procedure namelist include sequence elemental pure integer real character complex logical dimension allocatable|10 parameter external implicit|10 none double precision assign intent optional pointer target in out common equivalence data",built_in:"alog alog10 amax0 amax1 amin0 amin1 amod cabs ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp dint dlog dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlgama iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod qnint qsign qsin qsinh qsqrt qtan qtanh abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log log10 max min nint sign sin sinh sqrt tan tanh print write dim lge lgt lle llt mod nullify allocate deallocate adjustl adjustr all allocated any associated bit_size btest ceiling count cshift date_and_time digits dot_product eoshift epsilon exponent floor fraction huge iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul maxexponent maxloc maxval merge minexponent minloc minval modulo mvbits nearest pack present product radix random_number random_seed range repeat reshape rrspacing scale scan selected_int_kind selected_real_kind set_exponent shape size spacing spread sum system_clock tiny transpose trim ubound unpack verify achar iachar transfer dble entry dprod cpu_time command_argument_count get_command get_command_argument get_environment_variable is_iostat_end ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode is_iostat_eor move_alloc new_line selected_char_kind same_type_as extends_type_ofacosh asinh atanh bessel_j0 bessel_j1 bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma hypot norm2 atomic_define atomic_ref execute_command_line leadz trailz storage_size merge_bits bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr num_images parity popcnt poppar shifta shiftl shiftr this_image"};return{case_insensitive:!0,aliases:["f90","f95"],keywords:n,illegal:/\/\*/,contains:[e.inherit(e.APOS_STRING_MODE,{className:"string",relevance:0}),e.inherit(e.QUOTE_STRING_MODE,{className:"string",relevance:0}),{className:"function",beginKeywords:"subroutine function program",illegal:"[${=\\n]",contains:[e.UNDERSCORE_TITLE_MODE,t]},e.COMMENT("!","$",{relevance:0}),{className:"number",begin:"(?=\\b|\\+|\\-|\\.)(?=\\.\\d|\\d)(?:\\d+)?(?:\\.?\\d*)(?:[de][+-]?\\d+)?\\b\\.?",relevance:0}]}}}),define("highlight/lib/languages/fsharp",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={begin:"<",end:">",contains:[e.inherit(e.TITLE_MODE,{begin:/'[a-zA-Z0-9_]+/})]};return{aliases:["fs"],keywords:"abstract and as assert base begin class default delegate do done downcast downto elif else end exception extern false finally for fun function global if in inherit inline interface internal lazy let match member module mutable namespace new null of open or override private public rec return sig static struct then to true try type upcast use val void when while with yield",illegal:/\/\*/,contains:[{className:"keyword",begin:/\b(yield|return|let|do)!/},{className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},{className:"string",begin:'"""',end:'"""'},e.COMMENT("\\(\\*","\\*\\)"),{className:"class",beginKeywords:"type",end:"\\(|=|$",excludeEnd:!0,contains:[e.UNDERSCORE_TITLE_MODE,t]},{className:"meta",begin:"\\[<",end:">\\]",relevance:10},{className:"symbol",begin:"\\B('[A-Za-z])\\b",contains:[e.BACKSLASH_ESCAPE]},e.C_LINE_COMMENT_MODE,e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),e.C_NUMBER_MODE]}}}),define("highlight/lib/languages/gams",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={keyword:"abort acronym acronyms alias all and assign binary card diag display else eq file files for free ge gt if integer le loop lt maximizing minimizing model models ne negative no not option options or ord positive prod put putpage puttl repeat sameas semicont semiint smax smin solve sos1 sos2 sum system table then until using while xor yes",literal:"eps inf na","built-in":"abs arccos arcsin arctan arctan2 Beta betaReg binomial ceil centropy cos cosh cvPower div div0 eDist entropy errorf execSeed exp fact floor frac gamma gammaReg log logBeta logGamma log10 log2 mapVal max min mod ncpCM ncpF ncpVUpow ncpVUsin normal pi poly power randBinomial randLinear randTriangle round rPower sigmoid sign signPower sin sinh slexp sllog10 slrec sqexp sqlog10 sqr sqrec sqrt tan tanh trunc uniform uniformInt vcPower bool_and bool_eqv bool_imp bool_not bool_or bool_xor ifThen rel_eq rel_ge rel_gt rel_le rel_lt rel_ne gday gdow ghour gleap gmillisec gminute gmonth gsecond gyear jdate jnow jstart jtime errorLevel execError gamsRelease gamsVersion handleCollect handleDelete handleStatus handleSubmit heapFree heapLimit heapSize jobHandle jobKill jobStatus jobTerminate licenseLevel licenseStatus maxExecError sleep timeClose timeComp timeElapsed timeExec timeStart"},n={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0},i={className:"symbol",variants:[{begin:/\=[lgenxc]=/},{begin:/\$/}]},r={className:"comment",variants:[{begin:"'",end:"'"},{begin:'"',end:'"'}],illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},a={begin:"/",end:"/",keywords:t,contains:[r,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_NUMBER_MODE]},o={begin:/[a-z][a-z0-9_]*(\([a-z0-9_, ]*\))?[ \t]+/,excludeBegin:!0,end:"$",endsWithParent:!0,contains:[r,a,{className:"comment",begin:/([ ]*[a-z0-9&#*=?@>\\<:\-,()$\[\]_.{}!+%^]+)+/,relevance:0}]};return{aliases:["gms"],case_insensitive:!0,keywords:t,contains:[e.COMMENT(/^\$ontext/,/^\$offtext/),{className:"meta",begin:"^\\$[a-z0-9]+",end:"$",returnBegin:!0,contains:[{className:"meta-keyword",begin:"^\\$[a-z0-9]+"}]},e.COMMENT("^\\*","$"),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{beginKeywords:"set sets parameter parameters variable variables scalar scalars equation equations",end:";",contains:[e.COMMENT("^\\*","$"),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,a,o]},{beginKeywords:"table",end:";",returnBegin:!0,contains:[{beginKeywords:"table",end:"$",contains:[o]},e.COMMENT("^\\*","$"),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_NUMBER_MODE]},{className:"function",begin:/^[a-z][a-z0-9_,\-+' ()$]+\.{2}/,returnBegin:!0,contains:[{className:"title",begin:/^[a-z][a-z0-9_]+/},n,i]},e.C_NUMBER_MODE,i]}}}),define("highlight/lib/languages/gauss",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={keyword:"and bool break call callexe checkinterrupt clear clearg closeall cls comlog compile continue create debug declare delete disable dlibrary dllcall do dos ed edit else elseif enable end endfor endif endp endo errorlog errorlogat expr external fn for format goto gosub graph if keyword let lib library line load loadarray loadexe loadf loadk loadm loadp loads loadx local locate loopnextindex lprint lpwidth lshow matrix msym ndpclex new not open or output outwidth plot plotsym pop prcsn print printdos proc push retp return rndcon rndmod rndmult rndseed run save saveall screen scroll setarray show sparse stop string struct system trace trap threadfor threadendfor threadbegin threadjoin threadstat threadend until use while winprint",built_in:"abs acf aconcat aeye amax amean AmericanBinomCall AmericanBinomCall_Greeks AmericanBinomCall_ImpVol AmericanBinomPut AmericanBinomPut_Greeks AmericanBinomPut_ImpVol AmericanBSCall AmericanBSCall_Greeks AmericanBSCall_ImpVol AmericanBSPut AmericanBSPut_Greeks AmericanBSPut_ImpVol amin amult annotationGetDefaults annotationSetBkd annotationSetFont annotationSetLineColor annotationSetLineStyle annotationSetLineThickness annualTradingDays arccos arcsin areshape arrayalloc arrayindex arrayinit arraytomat asciiload asclabel astd astds asum atan atan2 atranspose axmargin balance band bandchol bandcholsol bandltsol bandrv bandsolpd bar base10 begwind besselj bessely beta box boxcox cdfBeta cdfBetaInv cdfBinomial cdfBinomialInv cdfBvn cdfBvn2 cdfBvn2e cdfCauchy cdfCauchyInv cdfChic cdfChii cdfChinc cdfChincInv cdfExp cdfExpInv cdfFc cdfFnc cdfFncInv cdfGam cdfGenPareto cdfHyperGeo cdfLaplace cdfLaplaceInv cdfLogistic cdfLogisticInv cdfmControlCreate cdfMvn cdfMvn2e cdfMvnce cdfMvne cdfMvt2e cdfMvtce cdfMvte cdfN cdfN2 cdfNc cdfNegBinomial cdfNegBinomialInv cdfNi cdfPoisson cdfPoissonInv cdfRayleigh cdfRayleighInv cdfTc cdfTci cdfTnc cdfTvn cdfWeibull cdfWeibullInv cdir ceil ChangeDir chdir chiBarSquare chol choldn cholsol cholup chrs close code cols colsf combinate combinated complex con cond conj cons ConScore contour conv convertsatostr convertstrtosa corrm corrms corrvc corrx corrxs cos cosh counts countwts crossprd crout croutp csrcol csrlin csvReadM csvReadSA cumprodc cumsumc curve cvtos datacreate datacreatecomplex datalist dataload dataloop dataopen datasave date datestr datestring datestrymd dayinyr dayofweek dbAddDatabase dbClose dbCommit dbCreateQuery dbExecQuery dbGetConnectOptions dbGetDatabaseName dbGetDriverName dbGetDrivers dbGetHostName dbGetLastErrorNum dbGetLastErrorText dbGetNumericalPrecPolicy dbGetPassword dbGetPort dbGetTableHeaders dbGetTables dbGetUserName dbHasFeature dbIsDriverAvailable dbIsOpen dbIsOpenError dbOpen dbQueryBindValue dbQueryClear dbQueryCols dbQueryExecPrepared dbQueryFetchAllM dbQueryFetchAllSA dbQueryFetchOneM dbQueryFetchOneSA dbQueryFinish dbQueryGetBoundValue dbQueryGetBoundValues dbQueryGetField dbQueryGetLastErrorNum dbQueryGetLastErrorText dbQueryGetLastInsertID dbQueryGetLastQuery dbQueryGetPosition dbQueryIsActive dbQueryIsForwardOnly dbQueryIsNull dbQueryIsSelect dbQueryIsValid dbQueryPrepare dbQueryRows dbQuerySeek dbQuerySeekFirst dbQuerySeekLast dbQuerySeekNext dbQuerySeekPrevious dbQuerySetForwardOnly dbRemoveDatabase dbRollback dbSetConnectOptions dbSetDatabaseName dbSetHostName dbSetNumericalPrecPolicy dbSetPort dbSetUserName dbTransaction DeleteFile delif delrows denseToSp denseToSpRE denToZero design det detl dfft dffti diag diagrv digamma doswin DOSWinCloseall DOSWinOpen dotfeq dotfeqmt dotfge dotfgemt dotfgt dotfgtmt dotfle dotflemt dotflt dotfltmt dotfne dotfnemt draw drop dsCreate dstat dstatmt dstatmtControlCreate dtdate dtday dttime dttodtv dttostr dttoutc dtvnormal dtvtodt dtvtoutc dummy dummybr dummydn eig eigh eighv eigv elapsedTradingDays endwind envget eof eqSolve eqSolvemt eqSolvemtControlCreate eqSolvemtOutCreate eqSolveset erf erfc erfccplx erfcplx error etdays ethsec etstr EuropeanBinomCall EuropeanBinomCall_Greeks EuropeanBinomCall_ImpVol EuropeanBinomPut EuropeanBinomPut_Greeks EuropeanBinomPut_ImpVol EuropeanBSCall EuropeanBSCall_Greeks EuropeanBSCall_ImpVol EuropeanBSPut EuropeanBSPut_Greeks EuropeanBSPut_ImpVol exctsmpl exec execbg exp extern eye fcheckerr fclearerr feq feqmt fflush fft ffti fftm fftmi fftn fge fgemt fgets fgetsa fgetsat fgetst fgt fgtmt fileinfo filesa fle flemt floor flt fltmt fmod fne fnemt fonts fopen formatcv formatnv fputs fputst fseek fstrerror ftell ftocv ftos ftostrC gamma gammacplx gammaii gausset gdaAppend gdaCreate gdaDStat gdaDStatMat gdaGetIndex gdaGetName gdaGetNames gdaGetOrders gdaGetType gdaGetTypes gdaGetVarInfo gdaIsCplx gdaLoad gdaPack gdaRead gdaReadByIndex gdaReadSome gdaReadSparse gdaReadStruct gdaReportVarInfo gdaSave gdaUpdate gdaUpdateAndPack gdaVars gdaWrite gdaWrite32 gdaWriteSome getarray getdims getf getGAUSShome getmatrix getmatrix4D getname getnamef getNextTradingDay getNextWeekDay getnr getorders getpath getPreviousTradingDay getPreviousWeekDay getRow getscalar3D getscalar4D getTrRow getwind glm gradcplx gradMT gradMTm gradMTT gradMTTm gradp graphprt graphset hasimag header headermt hess hessMT hessMTg hessMTgw hessMTm hessMTmw hessMTT hessMTTg hessMTTgw hessMTTm hessMTw hessp hist histf histp hsec imag indcv indexcat indices indices2 indicesf indicesfn indnv indsav indx integrate1d integrateControlCreate intgrat2 intgrat3 inthp1 inthp2 inthp3 inthp4 inthpControlCreate intquad1 intquad2 intquad3 intrleav intrleavsa intrsect intsimp inv invpd invswp iscplx iscplxf isden isinfnanmiss ismiss key keyav keyw lag lag1 lagn lapEighb lapEighi lapEighvb lapEighvi lapgEig lapgEigh lapgEighv lapgEigv lapgSchur lapgSvdcst lapgSvds lapgSvdst lapSvdcusv lapSvds lapSvdusv ldlp ldlsol linSolve listwise ln lncdfbvn lncdfbvn2 lncdfmvn lncdfn lncdfn2 lncdfnc lnfact lngammacplx lnpdfmvn lnpdfmvt lnpdfn lnpdft loadd loadstruct loadwind loess loessmt loessmtControlCreate log loglog logx logy lower lowmat lowmat1 ltrisol lu lusol machEpsilon make makevars makewind margin matalloc matinit mattoarray maxbytes maxc maxindc maxv maxvec mbesselei mbesselei0 mbesselei1 mbesseli mbesseli0 mbesseli1 meanc median mergeby mergevar minc minindc minv miss missex missrv moment momentd movingave movingaveExpwgt movingaveWgt nextindex nextn nextnevn nextwind ntos null null1 numCombinations ols olsmt olsmtControlCreate olsqr olsqr2 olsqrmt ones optn optnevn orth outtyp pacf packedToSp packr parse pause pdfCauchy pdfChi pdfExp pdfGenPareto pdfHyperGeo pdfLaplace pdfLogistic pdfn pdfPoisson pdfRayleigh pdfWeibull pi pinv pinvmt plotAddArrow plotAddBar plotAddBox plotAddHist plotAddHistF plotAddHistP plotAddPolar plotAddScatter plotAddShape plotAddTextbox plotAddTS plotAddXY plotArea plotBar plotBox plotClearLayout plotContour plotCustomLayout plotGetDefaults plotHist plotHistF plotHistP plotLayout plotLogLog plotLogX plotLogY plotOpenWindow plotPolar plotSave plotScatter plotSetAxesPen plotSetBar plotSetBarFill plotSetBarStacked plotSetBkdColor plotSetFill plotSetGrid plotSetLegend plotSetLineColor plotSetLineStyle plotSetLineSymbol plotSetLineThickness plotSetNewWindow plotSetTitle plotSetWhichYAxis plotSetXAxisShow plotSetXLabel plotSetXRange plotSetXTicInterval plotSetXTicLabel plotSetYAxisShow plotSetYLabel plotSetYRange plotSetZAxisShow plotSetZLabel plotSurface plotTS plotXY polar polychar polyeval polygamma polyint polymake polymat polymroot polymult polyroot pqgwin previousindex princomp printfm printfmt prodc psi putarray putf putvals pvCreate pvGetIndex pvGetParNames pvGetParVector pvLength pvList pvPack pvPacki pvPackm pvPackmi pvPacks pvPacksi pvPacksm pvPacksmi pvPutParVector pvTest pvUnpack QNewton QNewtonmt QNewtonmtControlCreate QNewtonmtOutCreate QNewtonSet QProg QProgmt QProgmtInCreate qqr qqre qqrep qr qre qrep qrsol qrtsol qtyr qtyre qtyrep quantile quantiled qyr qyre qyrep qz rank rankindx readr real reclassify reclassifyCuts recode recserar recsercp recserrc rerun rescale reshape rets rev rfft rffti rfftip rfftn rfftnp rfftp rndBernoulli rndBeta rndBinomial rndCauchy rndChiSquare rndCon rndCreateState rndExp rndGamma rndGeo rndGumbel rndHyperGeo rndi rndKMbeta rndKMgam rndKMi rndKMn rndKMnb rndKMp rndKMu rndKMvm rndLaplace rndLCbeta rndLCgam rndLCi rndLCn rndLCnb rndLCp rndLCu rndLCvm rndLogNorm rndMTu rndMVn rndMVt rndn rndnb rndNegBinomial rndp rndPoisson rndRayleigh rndStateSkip rndu rndvm rndWeibull rndWishart rotater round rows rowsf rref sampleData satostrC saved saveStruct savewind scale scale3d scalerr scalinfnanmiss scalmiss schtoc schur searchsourcepath seekr select selif seqa seqm setdif setdifsa setvars setvwrmode setwind shell shiftr sin singleindex sinh sleep solpd sortc sortcc sortd sorthc sorthcc sortind sortindc sortmc sortr sortrc spBiconjGradSol spChol spConjGradSol spCreate spDenseSubmat spDiagRvMat spEigv spEye spLDL spline spLU spNumNZE spOnes spreadSheetReadM spreadSheetReadSA spreadSheetWrite spScale spSubmat spToDense spTrTDense spTScalar spZeros sqpSolve sqpSolveMT sqpSolveMTControlCreate sqpSolveMTlagrangeCreate sqpSolveMToutCreate sqpSolveSet sqrt statements stdc stdsc stocv stof strcombine strindx strlen strput strrindx strsect strsplit strsplitPad strtodt strtof strtofcplx strtriml strtrimr strtrunc strtruncl strtruncpad strtruncr submat subscat substute subvec sumc sumr surface svd svd1 svd2 svdcusv svds svdusv sysstate tab tan tanh tempname threadBegin threadEnd threadEndFor threadFor threadJoin threadStat time timedt timestr timeutc title tkf2eps tkf2ps tocart todaydt toeplitz token topolar trapchk trigamma trimr trunc type typecv typef union unionsa uniqindx uniqindxsa unique uniquesa upmat upmat1 upper utctodt utctodtv utrisol vals varCovMS varCovXS varget vargetl varmall varmares varput varputl vartypef vcm vcms vcx vcxs vec vech vecr vector vget view viewxyz vlist vnamecv volume vput vread vtypecv wait waitc walkindex where window writer xlabel xlsGetSheetCount xlsGetSheetSize xlsGetSheetTypes xlsMakeRange xlsReadM xlsReadSA xlsWrite xlsWriteM xlsWriteSA xpnd xtics xy xyz ylabel ytics zeros zeta zlabel ztics", -literal:"DB_AFTER_LAST_ROW DB_ALL_TABLES DB_BATCH_OPERATIONS DB_BEFORE_FIRST_ROW DB_BLOB DB_EVENT_NOTIFICATIONS DB_FINISH_QUERY DB_HIGH_PRECISION DB_LAST_INSERT_ID DB_LOW_PRECISION_DOUBLE DB_LOW_PRECISION_INT32 DB_LOW_PRECISION_INT64 DB_LOW_PRECISION_NUMBERS DB_MULTIPLE_RESULT_SETS DB_NAMED_PLACEHOLDERS DB_POSITIONAL_PLACEHOLDERS DB_PREPARED_QUERIES DB_QUERY_SIZE DB_SIMPLE_LOCKING DB_SYSTEM_TABLES DB_TABLES DB_TRANSACTIONS DB_UNICODE DB_VIEWS"},n={className:"meta",begin:"#",end:"$",keywords:{"meta-keyword":"define definecs|10 undef ifdef ifndef iflight ifdllcall ifmac ifos2win ifunix else endif lineson linesoff srcfile srcline"},contains:[{begin:/\\\n/,relevance:0},{beginKeywords:"include",end:"$",keywords:{"meta-keyword":"include"},contains:[{className:"meta-string",begin:'"',end:'"',illegal:"\\n"}]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},i=e.UNDERSCORE_IDENT_RE+"\\s*\\(?",r=[{className:"params",begin:/\(/,end:/\)/,keywords:t,relevance:0,contains:[e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}];return{aliases:["gss"],case_insensitive:!0,keywords:t,illegal:"(\\{[%#]|[%#]\\})",contains:[e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.COMMENT("@","@"),n,{className:"string",begin:'"',end:'"',contains:[e.BACKSLASH_ESCAPE]},{className:"function",beginKeywords:"proc keyword",end:";",excludeEnd:!0,keywords:t,contains:[{begin:i,returnBegin:!0,contains:[e.UNDERSCORE_TITLE_MODE],relevance:0},e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n].concat(r)},{className:"function",beginKeywords:"fn",end:";",excludeEnd:!0,keywords:t,contains:[{begin:i+e.IDENT_RE+"\\)?\\s*\\=\\s*",returnBegin:!0,contains:[e.UNDERSCORE_TITLE_MODE],relevance:0},e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE].concat(r)},{className:"function",begin:"\\bexternal (proc|keyword|fn)\\s+",end:";",excludeEnd:!0,keywords:t,contains:[{begin:i,returnBegin:!0,contains:[e.UNDERSCORE_TITLE_MODE],relevance:0},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"function",begin:"\\bexternal (matrix|string|array|sparse matrix|struct "+e.IDENT_RE+")\\s+",end:";",excludeEnd:!0,keywords:t,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}]}}}),define("highlight/lib/languages/gcode",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="[A-Z_][A-Z0-9_.]*",n="\\%",i="IF DO WHILE ENDWHILE CALL ENDIF SUB ENDSUB GOTO REPEAT ENDREPEAT EQ LT GT NE GE LE OR XOR",r={className:"meta",begin:"([O])([0-9]+)"},a=[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.COMMENT(/\(/,/\)/),e.inherit(e.C_NUMBER_MODE,{begin:"([-+]?([0-9]*\\.?[0-9]+\\.?))|"+e.C_NUMBER_RE}),e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"name",begin:"([G])([0-9]+\\.?[0-9]?)"},{className:"name",begin:"([M])([0-9]+\\.?[0-9]?)"},{className:"attr",begin:"(VC|VS|#)",end:"(\\d+)"},{className:"attr",begin:"(VZOFX|VZOFY|VZOFZ)"},{className:"built_in",begin:"(ATAN|ABS|ACOS|ASIN|SIN|COS|EXP|FIX|FUP|ROUND|LN|TAN)(\\[)",end:"([-+]?([0-9]*\\.?[0-9]+\\.?))(\\])"},{className:"symbol",variants:[{begin:"N",end:"\\d+",illegal:"\\W"}]}];return{aliases:["nc"],case_insensitive:!0,lexemes:t,keywords:i,contains:[{className:"meta",begin:n},r].concat(a)}}}),define("highlight/lib/languages/gherkin",["require","exports","module"],function(e,t,n){n.exports=function(e){return{aliases:["feature"],keywords:"Feature Background Ability Business Need Scenario Scenarios Scenario Outline Scenario Template Examples Given And Then But When",contains:[{className:"symbol",begin:"\\*",relevance:0},{className:"meta",begin:"@[^@\\s]+"},{begin:"\\|",end:"\\|\\w*$",contains:[{className:"string",begin:"[^|]+"}]},{className:"variable",begin:"<",end:">"},e.HASH_COMMENT_MODE,{className:"string",begin:'"""',end:'"""'},e.QUOTE_STRING_MODE]}}}),define("highlight/lib/languages/glsl",["require","exports","module"],function(e,t,n){n.exports=function(e){return{keywords:{keyword:"break continue discard do else for if return while switch case default attribute binding buffer ccw centroid centroid varying coherent column_major const cw depth_any depth_greater depth_less depth_unchanged early_fragment_tests equal_spacing flat fractional_even_spacing fractional_odd_spacing highp in index inout invariant invocations isolines layout line_strip lines lines_adjacency local_size_x local_size_y local_size_z location lowp max_vertices mediump noperspective offset origin_upper_left out packed patch pixel_center_integer point_mode points precise precision quads r11f_g11f_b10f r16 r16_snorm r16f r16i r16ui r32f r32i r32ui r8 r8_snorm r8i r8ui readonly restrict rg16 rg16_snorm rg16f rg16i rg16ui rg32f rg32i rg32ui rg8 rg8_snorm rg8i rg8ui rgb10_a2 rgb10_a2ui rgba16 rgba16_snorm rgba16f rgba16i rgba16ui rgba32f rgba32i rgba32ui rgba8 rgba8_snorm rgba8i rgba8ui row_major sample shared smooth std140 std430 stream triangle_strip triangles triangles_adjacency uniform varying vertices volatile writeonly",type:"atomic_uint bool bvec2 bvec3 bvec4 dmat2 dmat2x2 dmat2x3 dmat2x4 dmat3 dmat3x2 dmat3x3 dmat3x4 dmat4 dmat4x2 dmat4x3 dmat4x4 double dvec2 dvec3 dvec4 float iimage1D iimage1DArray iimage2D iimage2DArray iimage2DMS iimage2DMSArray iimage2DRect iimage3D iimageBufferiimageCube iimageCubeArray image1D image1DArray image2D image2DArray image2DMS image2DMSArray image2DRect image3D imageBuffer imageCube imageCubeArray int isampler1D isampler1DArray isampler2D isampler2DArray isampler2DMS isampler2DMSArray isampler2DRect isampler3D isamplerBuffer isamplerCube isamplerCubeArray ivec2 ivec3 ivec4 mat2 mat2x2 mat2x3 mat2x4 mat3 mat3x2 mat3x3 mat3x4 mat4 mat4x2 mat4x3 mat4x4 sampler1D sampler1DArray sampler1DArrayShadow sampler1DShadow sampler2D sampler2DArray sampler2DArrayShadow sampler2DMS sampler2DMSArray sampler2DRect sampler2DRectShadow sampler2DShadow sampler3D samplerBuffer samplerCube samplerCubeArray samplerCubeArrayShadow samplerCubeShadow image1D uimage1DArray uimage2D uimage2DArray uimage2DMS uimage2DMSArray uimage2DRect uimage3D uimageBuffer uimageCube uimageCubeArray uint usampler1D usampler1DArray usampler2D usampler2DArray usampler2DMS usampler2DMSArray usampler2DRect usampler3D samplerBuffer usamplerCube usamplerCubeArray uvec2 uvec3 uvec4 vec2 vec3 vec4 void",built_in:"gl_MaxAtomicCounterBindings gl_MaxAtomicCounterBufferSize gl_MaxClipDistances gl_MaxClipPlanes gl_MaxCombinedAtomicCounterBuffers gl_MaxCombinedAtomicCounters gl_MaxCombinedImageUniforms gl_MaxCombinedImageUnitsAndFragmentOutputs gl_MaxCombinedTextureImageUnits gl_MaxComputeAtomicCounterBuffers gl_MaxComputeAtomicCounters gl_MaxComputeImageUniforms gl_MaxComputeTextureImageUnits gl_MaxComputeUniformComponents gl_MaxComputeWorkGroupCount gl_MaxComputeWorkGroupSize gl_MaxDrawBuffers gl_MaxFragmentAtomicCounterBuffers gl_MaxFragmentAtomicCounters gl_MaxFragmentImageUniforms gl_MaxFragmentInputComponents gl_MaxFragmentInputVectors gl_MaxFragmentUniformComponents gl_MaxFragmentUniformVectors gl_MaxGeometryAtomicCounterBuffers gl_MaxGeometryAtomicCounters gl_MaxGeometryImageUniforms gl_MaxGeometryInputComponents gl_MaxGeometryOutputComponents gl_MaxGeometryOutputVertices gl_MaxGeometryTextureImageUnits gl_MaxGeometryTotalOutputComponents gl_MaxGeometryUniformComponents gl_MaxGeometryVaryingComponents gl_MaxImageSamples gl_MaxImageUnits gl_MaxLights gl_MaxPatchVertices gl_MaxProgramTexelOffset gl_MaxTessControlAtomicCounterBuffers gl_MaxTessControlAtomicCounters gl_MaxTessControlImageUniforms gl_MaxTessControlInputComponents gl_MaxTessControlOutputComponents gl_MaxTessControlTextureImageUnits gl_MaxTessControlTotalOutputComponents gl_MaxTessControlUniformComponents gl_MaxTessEvaluationAtomicCounterBuffers gl_MaxTessEvaluationAtomicCounters gl_MaxTessEvaluationImageUniforms gl_MaxTessEvaluationInputComponents gl_MaxTessEvaluationOutputComponents gl_MaxTessEvaluationTextureImageUnits gl_MaxTessEvaluationUniformComponents gl_MaxTessGenLevel gl_MaxTessPatchComponents gl_MaxTextureCoords gl_MaxTextureImageUnits gl_MaxTextureUnits gl_MaxVaryingComponents gl_MaxVaryingFloats gl_MaxVaryingVectors gl_MaxVertexAtomicCounterBuffers gl_MaxVertexAtomicCounters gl_MaxVertexAttribs gl_MaxVertexImageUniforms gl_MaxVertexOutputComponents gl_MaxVertexOutputVectors gl_MaxVertexTextureImageUnits gl_MaxVertexUniformComponents gl_MaxVertexUniformVectors gl_MaxViewports gl_MinProgramTexelOffset gl_BackColor gl_BackLightModelProduct gl_BackLightProduct gl_BackMaterial gl_BackSecondaryColor gl_ClipDistance gl_ClipPlane gl_ClipVertex gl_Color gl_DepthRange gl_EyePlaneQ gl_EyePlaneR gl_EyePlaneS gl_EyePlaneT gl_Fog gl_FogCoord gl_FogFragCoord gl_FragColor gl_FragCoord gl_FragData gl_FragDepth gl_FrontColor gl_FrontFacing gl_FrontLightModelProduct gl_FrontLightProduct gl_FrontMaterial gl_FrontSecondaryColor gl_GlobalInvocationID gl_InstanceID gl_InvocationID gl_Layer gl_LightModel gl_LightSource gl_LocalInvocationID gl_LocalInvocationIndex gl_ModelViewMatrix gl_ModelViewMatrixInverse gl_ModelViewMatrixInverseTranspose gl_ModelViewMatrixTranspose gl_ModelViewProjectionMatrix gl_ModelViewProjectionMatrixInverse gl_ModelViewProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixTranspose gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_Normal gl_NormalMatrix gl_NormalScale gl_NumSamples gl_NumWorkGroups gl_ObjectPlaneQ gl_ObjectPlaneR gl_ObjectPlaneS gl_ObjectPlaneT gl_PatchVerticesIn gl_Point gl_PointCoord gl_PointSize gl_Position gl_PrimitiveID gl_PrimitiveIDIn gl_ProjectionMatrix gl_ProjectionMatrixInverse gl_ProjectionMatrixInverseTranspose gl_ProjectionMatrixTranspose gl_SampleID gl_SampleMask gl_SampleMaskIn gl_SamplePosition gl_SecondaryColor gl_TessCoord gl_TessLevelInner gl_TessLevelOuter gl_TexCoord gl_TextureEnvColor gl_TextureMatrix gl_TextureMatrixInverse gl_TextureMatrixInverseTranspose gl_TextureMatrixTranspose gl_Vertex gl_VertexID gl_ViewportIndex gl_WorkGroupID gl_WorkGroupSize gl_in gl_out EmitStreamVertex EmitVertex EndPrimitive EndStreamPrimitive abs acos acosh all any asin asinh atan atanh atomicAdd atomicAnd atomicCompSwap atomicCounter atomicCounterDecrement atomicCounterIncrement atomicExchange atomicMax atomicMin atomicOr atomicXor barrier bitCount bitfieldExtract bitfieldInsert bitfieldReverse ceil clamp cos cosh cross dFdx dFdy degrees determinant distance dot equal exp exp2 faceforward findLSB findMSB floatBitsToInt floatBitsToUint floor fma fract frexp ftransform fwidth greaterThan greaterThanEqual groupMemoryBarrier imageAtomicAdd imageAtomicAnd imageAtomicCompSwap imageAtomicExchange imageAtomicMax imageAtomicMin imageAtomicOr imageAtomicXor imageLoad imageSize imageStore imulExtended intBitsToFloat interpolateAtCentroid interpolateAtOffset interpolateAtSample inverse inversesqrt isinf isnan ldexp length lessThan lessThanEqual log log2 matrixCompMult max memoryBarrier memoryBarrierAtomicCounter memoryBarrierBuffer memoryBarrierImage memoryBarrierShared min mix mod modf noise1 noise2 noise3 noise4 normalize not notEqual outerProduct packDouble2x32 packHalf2x16 packSnorm2x16 packSnorm4x8 packUnorm2x16 packUnorm4x8 pow radians reflect refract round roundEven shadow1D shadow1DLod shadow1DProj shadow1DProjLod shadow2D shadow2DLod shadow2DProj shadow2DProjLod sign sin sinh smoothstep sqrt step tan tanh texelFetch texelFetchOffset texture texture1D texture1DLod texture1DProj texture1DProjLod texture2D texture2DLod texture2DProj texture2DProjLod texture3D texture3DLod texture3DProj texture3DProjLod textureCube textureCubeLod textureGather textureGatherOffset textureGatherOffsets textureGrad textureGradOffset textureLod textureLodOffset textureOffset textureProj textureProjGrad textureProjGradOffset textureProjLod textureProjLodOffset textureProjOffset textureQueryLevels textureQueryLod textureSize transpose trunc uaddCarry uintBitsToFloat umulExtended unpackDouble2x32 unpackHalf2x16 unpackSnorm2x16 unpackSnorm4x8 unpackUnorm2x16 unpackUnorm4x8 usubBorrow",literal:"true false"},illegal:'"',contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,{className:"meta",begin:"#",end:"$"}]}}}),define("highlight/lib/languages/go",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={keyword:"break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune",literal:"true false iota nil",built_in:"append cap close complex copy imag len make new panic print println real recover delete"};return{aliases:["golang"],keywords:t,illegal:"",end:",\\s+",returnBegin:!0,endsWithParent:!0,contains:[{className:"attr",begin:":\\w+"},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{begin:"\\w+",relevance:0}]}]},{begin:"\\(\\s*",end:"\\s*\\)",excludeEnd:!0,contains:[{begin:"\\w+\\s*=",end:"\\s+",returnBegin:!0,endsWithParent:!0,contains:[{className:"attr",begin:"\\w+",relevance:0},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{begin:"\\w+",relevance:0}]}]}]},{begin:"^\\s*[=~]\\s*"},{begin:"#{",starts:{end:"}",subLanguage:"ruby"}}]}}}),define("highlight/lib/languages/handlebars",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={"builtin-name":"each in with if else unless bindattr action collection debugger log outlet template unbound view yield"};return{aliases:["hbs","html.hbs","html.handlebars"],case_insensitive:!0,subLanguage:"xml",contains:[e.COMMENT("{{!(--)?","(--)?}}"),{className:"template-tag",begin:/\{\{[#\/]/,end:/\}\}/,contains:[{className:"name",begin:/[a-zA-Z\.-]+/,keywords:t,starts:{endsWithParent:!0,relevance:0,contains:[e.QUOTE_STRING_MODE]}}]},{className:"template-variable",begin:/\{\{/,end:/\}\}/,keywords:t}]}}}),define("highlight/lib/languages/haskell",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={variants:[e.COMMENT("--","$"),e.COMMENT("{-","-}",{contains:["self"]})]},n={className:"meta",begin:"{-#",end:"#-}"},i={className:"meta",begin:"^#",end:"$"},r={className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},a={begin:"\\(",end:"\\)",illegal:'"',contains:[n,i,{className:"type",begin:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"},e.inherit(e.TITLE_MODE,{begin:"[_a-z][\\w']*"}),t]},o={begin:"{",end:"}",contains:a.contains};return{aliases:["hs"],keywords:"let in if then else case of where do module import hiding qualified type data newtype deriving class instance as default infix infixl infixr foreign export ccall stdcall cplusplus jvm dotnet safe unsafe family forall mdo proc rec",contains:[{beginKeywords:"module",end:"where",keywords:"module where",contains:[a,t],illegal:"\\W\\.|;"},{begin:"\\bimport\\b",end:"$",keywords:"import qualified as hiding",contains:[a,t],illegal:"\\W\\.|;"},{className:"class",begin:"^(\\s*)?(class|instance)\\b",end:"where",keywords:"class family instance where",contains:[r,a,t]},{className:"class",begin:"\\b(data|(new)?type)\\b",end:"$",keywords:"data family type newtype deriving",contains:[n,r,a,o,t]},{beginKeywords:"default",end:"$",contains:[r,a,t]},{beginKeywords:"infix infixl infixr",end:"$",contains:[e.C_NUMBER_MODE,t]},{begin:"\\bforeign\\b",end:"$",keywords:"foreign import export ccall stdcall cplusplus jvm dotnet safe unsafe",contains:[r,e.QUOTE_STRING_MODE,t]},{className:"meta",begin:"#!\\/usr\\/bin\\/env runhaskell",end:"$"},n,i,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,r,e.inherit(e.TITLE_MODE,{begin:"^[_a-z][\\w']*"}),t,{begin:"->|<-"}]}}}),define("highlight/lib/languages/haxe",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="Int Float String Bool Dynamic Void Array ";return{aliases:["hx"],keywords:{keyword:"break callback case cast catch continue default do dynamic else enum extern for function here if import in inline never new override package private get set public return static super switch this throw trace try typedef untyped using var while "+t,built_in:"trace this",literal:"true false null _"},contains:[{className:"string",begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE,{className:"subst",begin:"\\$\\{",end:"\\}"},{className:"subst",begin:"\\$",end:"\\W}"}]},e.QUOTE_STRING_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,{className:"meta",begin:"@:",end:"$"},{className:"meta",begin:"#",end:"$",keywords:{"meta-keyword":"if else elseif end error"}},{className:"type",begin:":[ \t]*",end:"[^A-Za-z0-9_ \t\\->]",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:":[ \t]*",end:"\\W",excludeBegin:!0,excludeEnd:!0},{className:"type",begin:"new *",end:"\\W",excludeBegin:!0,excludeEnd:!0},{className:"class",beginKeywords:"enum",end:"\\{",contains:[e.TITLE_MODE]},{className:"class",beginKeywords:"abstract",end:"[\\{$]",contains:[{className:"type",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"type",begin:"from +",end:"\\W",excludeBegin:!0,excludeEnd:!0},{className:"type",begin:"to +",end:"\\W",excludeBegin:!0,excludeEnd:!0},e.TITLE_MODE],keywords:{keyword:"abstract from to"}},{className:"class",begin:"\\b(class|interface) +",end:"[\\{$]",excludeEnd:!0,keywords:"class interface",contains:[{className:"keyword",begin:"\\b(extends|implements) +",keywords:"extends implements",contains:[{className:"type",begin:e.IDENT_RE,relevance:0}]},e.TITLE_MODE]},{className:"function",beginKeywords:"function",end:"\\(",excludeEnd:!0,illegal:"\\S",contains:[e.TITLE_MODE]}],illegal:/<\//}}}),define("highlight/lib/languages/hsp",["require","exports","module"],function(e,t,n){n.exports=function(e){return{case_insensitive:!0,lexemes:/[\w\._]+/,keywords:"goto gosub return break repeat loop continue wait await dim sdim foreach dimtype dup dupptr end stop newmod delmod mref run exgoto on mcall assert logmes newlab resume yield onexit onerror onkey onclick oncmd exist delete mkdir chdir dirlist bload bsave bcopy memfile if else poke wpoke lpoke getstr chdpm memexpand memcpy memset notesel noteadd notedel noteload notesave randomize noteunsel noteget split strrep setease button chgdisp exec dialog mmload mmplay mmstop mci pset pget syscolor mes print title pos circle cls font sysfont objsize picload color palcolor palette redraw width gsel gcopy gzoom gmode bmpsave hsvcolor getkey listbox chkbox combox input mesbox buffer screen bgscr mouse objsel groll line clrobj boxf objprm objmode stick grect grotate gsquare gradf objimage objskip objenable celload celdiv celput newcom querycom delcom cnvstow comres axobj winobj sendmsg comevent comevarg sarrayconv callfunc cnvwtos comevdisp libptr system hspstat hspver stat cnt err strsize looplev sublev iparam wparam lparam refstr refdval int rnd strlen length length2 length3 length4 vartype gettime peek wpeek lpeek varptr varuse noteinfo instr abs limit getease str strmid strf getpath strtrim sin cos tan atan sqrt double absf expf logf limitf powf geteasef mousex mousey mousew hwnd hinstance hdc ginfo objinfo dirinfo sysinfo thismod __hspver__ __hsp30__ __date__ __time__ __line__ __file__ _debug __hspdef__ and or xor not screen_normal screen_palette screen_hide screen_fixedsize screen_tool screen_frame gmode_gdi gmode_mem gmode_rgb0 gmode_alpha gmode_rgb0alpha gmode_add gmode_sub gmode_pixela ginfo_mx ginfo_my ginfo_act ginfo_sel ginfo_wx1 ginfo_wy1 ginfo_wx2 ginfo_wy2 ginfo_vx ginfo_vy ginfo_sizex ginfo_sizey ginfo_winx ginfo_winy ginfo_mesx ginfo_mesy ginfo_r ginfo_g ginfo_b ginfo_paluse ginfo_dispx ginfo_dispy ginfo_cx ginfo_cy ginfo_intid ginfo_newid ginfo_sx ginfo_sy objinfo_mode objinfo_bmscr objinfo_hwnd notemax notesize dir_cur dir_exe dir_win dir_sys dir_cmdline dir_desktop dir_mydoc dir_tv font_normal font_bold font_italic font_underline font_strikeout font_antialias objmode_normal objmode_guifont objmode_usefont gsquare_grad msgothic msmincho do until while wend for next _break _continue switch case default swbreak swend ddim ldim alloc m_pi rad2deg deg2rad ease_linear ease_quad_in ease_quad_out ease_quad_inout ease_cubic_in ease_cubic_out ease_cubic_inout ease_quartic_in ease_quartic_out ease_quartic_inout ease_bounce_in ease_bounce_out ease_bounce_inout ease_shake_in ease_shake_out ease_shake_inout ease_loop",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",begin:'{"',end:'"}',contains:[e.BACKSLASH_ESCAPE]},e.COMMENT(";","$",{relevance:0}),{className:"meta",begin:"#",end:"$",keywords:{"meta-keyword":"addion cfunc cmd cmpopt comfunc const defcfunc deffunc define else endif enum epack func global if ifdef ifndef include modcfunc modfunc modinit modterm module pack packopt regcmd runtime undef usecom uselib"},contains:[e.inherit(e.QUOTE_STRING_MODE,{className:"meta-string"}),e.NUMBER_MODE,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"symbol",begin:"^\\*(\\w+|@)"},e.NUMBER_MODE,e.C_NUMBER_MODE]}}}),define("highlight/lib/languages/htmlbars",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="action collection component concat debugger each each-in else get hash if input link-to loc log mut outlet partial query-params render textarea unbound unless with yield view",n={illegal:/\}\}/,begin:/[a-zA-Z0-9_]+=/,returnBegin:!0,relevance:0,contains:[{className:"attr",begin:/[a-zA-Z0-9_]+/}]},i=({illegal:/\}\}/,begin:/\)/,end:/\)/,contains:[{begin:/[a-zA-Z\.\-]+/,keywords:{built_in:t},starts:{endsWithParent:!0,relevance:0,contains:[e.QUOTE_STRING_MODE]}}]},{endsWithParent:!0,relevance:0,keywords:{keyword:"as",built_in:t},contains:[e.QUOTE_STRING_MODE,n,e.NUMBER_MODE]});return{case_insensitive:!0,subLanguage:"xml",contains:[e.COMMENT("{{!(--)?","(--)?}}"),{className:"template-tag",begin:/\{\{[#\/]/,end:/\}\}/,contains:[{className:"name",begin:/[a-zA-Z\.\-]+/,keywords:{"builtin-name":t},starts:i}]},{className:"template-variable",begin:/\{\{[a-zA-Z][a-zA-Z\-]+/,end:/\}\}/,keywords:{keyword:"as",built_in:t},contains:[e.QUOTE_STRING_MODE]}]}}}),define("highlight/lib/languages/http",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="HTTP/[0-9\\.]+";return{aliases:["https"],illegal:"\\S",contains:[{begin:"^"+t,end:"$",contains:[{className:"number",begin:"\\b\\d{3}\\b"}]},{begin:"^[A-Z]+ (.*?) "+t+"$",returnBegin:!0,end:"$",contains:[{className:"string",begin:" ",end:" ",excludeBegin:!0,excludeEnd:!0},{begin:t},{className:"keyword",begin:"[A-Z]+"}]},{className:"attribute",begin:"^\\w",end:": ",excludeEnd:!0,illegal:"\\n|\\s|=",starts:{end:"$",relevance:0}},{begin:"\\n\\n",starts:{subLanguage:[],endsWithParent:!0}}]}}}),define("highlight/lib/languages/inform7",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="\\[",n="\\]";return{aliases:["i7"],case_insensitive:!0,keywords:{keyword:"thing room person man woman animal container supporter backdrop door scenery open closed locked inside gender is are say understand kind of rule"},contains:[{className:"string",begin:'"',end:'"',relevance:0,contains:[{className:"subst",begin:t,end:n}]},{className:"section",begin:/^(Volume|Book|Part|Chapter|Section|Table)\b/,end:"$"},{begin:/^(Check|Carry out|Report|Instead of|To|Rule|When|Before|After)\b/,end:":",contains:[{begin:"\\(This",end:"\\)"}]},{className:"comment",begin:t,end:n,contains:["self"]}]}}}),define("highlight/lib/languages/ini",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]};return{aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[e.COMMENT(";","$"),e.HASH_COMMENT_MODE,{className:"section",begin:/^\s*\[+/,end:/\]+/},{begin:/^[a-z0-9\[\]_-]+\s*=\s*/,end:"$",returnBegin:!0,contains:[{className:"attr",begin:/[a-z0-9\[\]_-]+/},{begin:/=/,endsWithParent:!0,relevance:0,contains:[{className:"literal",begin:/\bon|off|true|false|yes|no\b/},{className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)}/}]},t,{className:"number",begin:/([\+\-]+)?[\d]+_[\d_]+/},e.NUMBER_MODE]}]}]}}}),define("highlight/lib/languages/irpf90",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"params",begin:"\\(",end:"\\)"},n={literal:".False. .True.",keyword:"kind do while private call intrinsic where elsewhere type endtype endmodule endselect endinterface end enddo endif if forall endforall only contains default return stop then public subroutine|10 function program .and. .or. .not. .le. .eq. .ge. .gt. .lt. goto save else use module select case access blank direct exist file fmt form formatted iostat name named nextrec number opened rec recl sequential status unformatted unit continue format pause cycle exit c_null_char c_alert c_backspace c_form_feed flush wait decimal round iomsg synchronous nopass non_overridable pass protected volatile abstract extends import non_intrinsic value deferred generic final enumerator class associate bind enum c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t c_int_least32_t c_int_least64_t c_int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr c_new_line c_carriage_return c_horizontal_tab c_vertical_tab iso_c_binding c_loc c_funloc c_associated c_f_pointer c_ptr c_funptr iso_fortran_env character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor numeric_storage_size output_unit c_f_procpointer ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode newunit contiguous recursive pad position action delim readwrite eor advance nml interface procedure namelist include sequence elemental pure integer real character complex logical dimension allocatable|10 parameter external implicit|10 none double precision assign intent optional pointer target in out common equivalence data begin_provider &begin_provider end_provider begin_shell end_shell begin_template end_template subst assert touch soft_touch provide no_dep free irp_if irp_else irp_endif irp_write irp_read",built_in:"alog alog10 amax0 amax1 amin0 amin1 amod cabs ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp dint dlog dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlgama iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod qnint qsign qsin qsinh qsqrt qtan qtanh abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log log10 max min nint sign sin sinh sqrt tan tanh print write dim lge lgt lle llt mod nullify allocate deallocate adjustl adjustr all allocated any associated bit_size btest ceiling count cshift date_and_time digits dot_product eoshift epsilon exponent floor fraction huge iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul maxexponent maxloc maxval merge minexponent minloc minval modulo mvbits nearest pack present product radix random_number random_seed range repeat reshape rrspacing scale scan selected_int_kind selected_real_kind set_exponent shape size spacing spread sum system_clock tiny transpose trim ubound unpack verify achar iachar transfer dble entry dprod cpu_time command_argument_count get_command get_command_argument get_environment_variable is_iostat_end ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode is_iostat_eor move_alloc new_line selected_char_kind same_type_as extends_type_ofacosh asinh atanh bessel_j0 bessel_j1 bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma hypot norm2 atomic_define atomic_ref execute_command_line leadz trailz storage_size merge_bits bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr num_images parity popcnt poppar shifta shiftl shiftr this_image IRP_ALIGN irp_here" -};return{case_insensitive:!0,keywords:n,illegal:/\/\*/,contains:[e.inherit(e.APOS_STRING_MODE,{className:"string",relevance:0}),e.inherit(e.QUOTE_STRING_MODE,{className:"string",relevance:0}),{className:"function",beginKeywords:"subroutine function program",illegal:"[${=\\n]",contains:[e.UNDERSCORE_TITLE_MODE,t]},e.COMMENT("!","$",{relevance:0}),e.COMMENT("begin_doc","end_doc",{relevance:10}),{className:"number",begin:"(?=\\b|\\+|\\-|\\.)(?=\\.\\d|\\d)(?:\\d+)?(?:\\.?\\d*)(?:[de][+-]?\\d+)?\\b\\.?",relevance:0}]}}}),define("highlight/lib/languages/java",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",n=t+"(<"+t+"(\\s*,\\s*"+t+")*>)?",i="false synchronized int abstract float private char boolean static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private module requires exports do",r="\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?",a={className:"number",begin:r,relevance:0};return{aliases:["jsp"],keywords:i,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"class",beginKeywords:"class interface",end:/[{;=]/,excludeEnd:!0,keywords:"class interface",illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"new throw return else",relevance:0},{className:"function",begin:"("+n+"\\s+)+"+e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:i,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/,keywords:i,relevance:0,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},a,{className:"meta",begin:"@[A-Za-z]+"}]}}}),define("highlight/lib/languages/javascript",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="[A-Za-z$_][0-9A-Za-z$_]*",n={keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await static import from as",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},i={className:"number",variants:[{begin:"\\b(0[bB][01]+)"},{begin:"\\b(0[oO][0-7]+)"},{begin:e.C_NUMBER_RE}],relevance:0},r={className:"subst",begin:"\\$\\{",end:"\\}",keywords:n,contains:[]},a={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,r]};r.contains=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,i,e.REGEXP_MODE];var o=r.contains.concat([e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]);return{aliases:["js","jsx"],keywords:n,contains:[{className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},{className:"meta",begin:/^#!/,end:/$/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,a,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,i,{begin:/[{,]\s*/,relevance:0,contains:[{begin:t+"\\s*:",returnBegin:!0,relevance:0,contains:[{className:"attr",begin:t,relevance:0}]}]},{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.REGEXP_MODE,{className:"function",begin:"(\\(.*?\\)|"+t+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:t},{begin:/\(\s*\)/},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:n,contains:o}]}]},{begin://,subLanguage:"xml",contains:[{begin:/<\w+\s*\/>/,skip:!0},{begin:/<\w+/,end:/(\/\w+|\w+\/)>/,skip:!0,contains:[{begin:/<\w+\s*\/>/,skip:!0},"self"]}]}],relevance:0},{className:"function",beginKeywords:"function",end:/\{/,excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:t}),{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:o}],illegal:/\[|%/},{begin:/\$[(.]/},e.METHOD_GUARD,{className:"class",beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"constructor",end:/\{/,excludeEnd:!0}],illegal:/#(?!!)/}}});define("highlight/lib/languages/json",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={literal:"true false null"},n=[e.QUOTE_STRING_MODE,e.C_NUMBER_MODE],i={end:",",endsWithParent:!0,excludeEnd:!0,contains:n,keywords:t},r={begin:"{",end:"}",contains:[{className:"attr",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE],illegal:"\\n"},e.inherit(i,{begin:/:/})],illegal:"\\S"},a={begin:"\\[",end:"\\]",contains:[e.inherit(i)],illegal:"\\S"};return n.splice(n.length,0,r,a),{contains:n,keywords:t,illegal:"\\S"}}});define("highlight/lib/languages/julia",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={keyword:"in abstract baremodule begin bitstype break catch ccall const continue do else elseif end export finally for function global if immutable import importall let local macro module quote return try type typealias using while",literal:"true false ARGS CPU_CORES C_NULL DL_LOAD_PATH DevNull ENDIAN_BOM ENV I|0 Inf Inf16 Inf32 InsertionSort JULIA_HOME LOAD_PATH MS_ASYNC MS_INVALIDATE MS_SYNC MergeSort NaN NaN16 NaN32 OS_NAME QuickSort RTLD_DEEPBIND RTLD_FIRST RTLD_GLOBAL RTLD_LAZY RTLD_LOCAL RTLD_NODELETE RTLD_NOLOAD RTLD_NOW RoundDown RoundFromZero RoundNearest RoundToZero RoundUp STDERR STDIN STDOUT VERSION WORD_SIZE catalan cglobal e|0 eu|0 eulergamma golden im nothing pi γ π φ Inf64 NaN64 RoundNearestTiesAway RoundNearestTiesUp ",built_in:"ANY ASCIIString AbstractArray AbstractRNG AbstractSparseArray Any ArgumentError Array Associative Base64Pipe Bidiagonal BigFloat BigInt BitArray BitMatrix BitVector Bool BoundsError Box CFILE Cchar Cdouble Cfloat Char CharString Cint Clong Clonglong ClusterManager Cmd Coff_t Colon Complex Complex128 Complex32 Complex64 Condition Cptrdiff_t Cshort Csize_t Cssize_t Cuchar Cuint Culong Culonglong Cushort Cwchar_t DArray DataType DenseArray Diagonal Dict DimensionMismatch DirectIndexString Display DivideError DomainError EOFError EachLine Enumerate ErrorException Exception Expr Factorization FileMonitor FileOffset Filter Float16 Float32 Float64 FloatRange FloatingPoint Function GetfieldNode GotoNode Hermitian IO IOBuffer IOStream IPv4 IPv6 InexactError Int Int128 Int16 Int32 Int64 Int8 IntSet Integer InterruptException IntrinsicFunction KeyError LabelNode LambdaStaticData LineNumberNode LoadError LocalProcess MIME MathConst MemoryError MersenneTwister Method MethodError MethodTable Module NTuple NewvarNode Nothing Number ObjectIdDict OrdinalRange OverflowError ParseError PollingFileWatcher ProcessExitedException ProcessGroup Ptr QuoteNode Range Range1 Ranges Rational RawFD Real Regex RegexMatch RemoteRef RepString RevString RopeString RoundingMode Set SharedArray Signed SparseMatrixCSC StackOverflowError Stat StatStruct StepRange String SubArray SubString SymTridiagonal Symbol SymbolNode Symmetric SystemError Task TextDisplay Timer TmStruct TopNode Triangular Tridiagonal Type TypeConstructor TypeError TypeName TypeVar UTF16String UTF32String UTF8String UdpSocket Uint Uint128 Uint16 Uint32 Uint64 Uint8 UndefRefError UndefVarError UniformScaling UnionType UnitRange Unsigned Vararg VersionNumber WString WeakKeyDict WeakRef Woodbury Zip AbstractChannel AbstractFloat AbstractString AssertionError Base64DecodePipe Base64EncodePipe BufferStream CapturedException CartesianIndex CartesianRange Channel Cintmax_t CompositeException Cstring Cuintmax_t Cwstring Date DateTime Dims Enum GenSym GlobalRef HTML InitError InvalidStateException Irrational LinSpace LowerTriangular NullException Nullable OutOfMemoryError Pair PartialQuickSort Pipe RandomDevice ReadOnlyMemoryError ReentrantLock Ref RemoteException SegmentationFault SerializationState SimpleVector TCPSocket Text Tuple UDPSocket UInt UInt128 UInt16 UInt32 UInt64 UInt8 UnicodeError Union UpperTriangular Val Void WorkerConfig AbstractMatrix AbstractSparseMatrix AbstractSparseVector AbstractVecOrMat AbstractVector DenseMatrix DenseVecOrMat DenseVector Matrix SharedMatrix SharedVector StridedArray StridedMatrix StridedVecOrMat StridedVector VecOrMat Vector "},n="[A-Za-z_\\u00A1-\\uFFFF][A-Za-z_0-9\\u00A1-\\uFFFF]*",i={lexemes:n,keywords:t,illegal:/<\//},r={className:"type",begin:/::/},a={className:"type",begin:/<:/},o={className:"number",begin:/(\b0x[\d_]*(\.[\d_]*)?|0x\.\d[\d_]*)p[-+]?\d+|\b0[box][a-fA-F0-9][a-fA-F0-9_]*|(\b\d[\d_]*(\.[\d_]*)?|\.\d[\d_]*)([eEfF][-+]?\d+)?/,relevance:0},s={className:"string",begin:/'(.|\\[xXuU][a-zA-Z0-9]+)'/},l={className:"subst",begin:/\$\(/,end:/\)/,keywords:t},c={className:"variable",begin:"\\$"+n},d={className:"string",contains:[e.BACKSLASH_ESCAPE,l,c],variants:[{begin:/\w*"""/,end:/"""\w*/,relevance:10},{begin:/\w*"/,end:/"\w*/}]},u={className:"string",contains:[e.BACKSLASH_ESCAPE,l,c],begin:"`",end:"`"},m={className:"meta",begin:"@"+n},p={className:"comment",variants:[{begin:"#=",end:"=#",relevance:10},{begin:"#",end:"$"}]};return i.contains=[o,s,r,a,d,u,m,p,e.HASH_COMMENT_MODE],l.contains=i.contains,i}}),define("highlight/lib/languages/kotlin",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline interface annotation data sealed internal infix operator out by constructor super trait volatile transient native default",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},i={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},r={className:"subst",variants:[{begin:"\\$"+e.UNDERSCORE_IDENT_RE},{begin:"\\${",end:"}",contains:[e.APOS_STRING_MODE,e.C_NUMBER_MODE]}]},a={className:"string",variants:[{begin:'"""',end:'"""',contains:[r]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,r]}]},o={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},s={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(a,{className:"meta-string"})]}]};return{keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,i,o,s,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,illegal:/fun\s+(<.*>)?[^\s\(]+(\s+[^\s\(]+)\s*=/,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin://,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],relevance:0},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,o,s,a,e.C_NUMBER_MODE]},e.C_BLOCK_COMMENT_MODE]},{className:"class",beginKeywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin://,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,]|$/,excludeBegin:!0,returnEnd:!0},o,s]},a,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:"\n"},e.C_NUMBER_MODE]}}}),define("highlight/lib/languages/lasso",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="[a-zA-Z_][\\w.]*",n="<\\?(lasso(script)?|=)",i="\\]|\\?>",r={literal:"true false none minimal full all void and or not bw nbw ew new cn ncn lt lte gt gte eq neq rx nrx ft",built_in:"array date decimal duration integer map pair string tag xml null boolean bytes keyword list locale queue set stack staticarray local var variable global data self inherited currentcapture givenblock",keyword:"cache database_names database_schemanames database_tablenames define_tag define_type email_batch encode_set html_comment handle handle_error header if inline iterate ljax_target link link_currentaction link_currentgroup link_currentrecord link_detail link_firstgroup link_firstrecord link_lastgroup link_lastrecord link_nextgroup link_nextrecord link_prevgroup link_prevrecord log loop namespace_using output_none portal private protect records referer referrer repeating resultset rows search_args search_arguments select sort_args sort_arguments thread_atomic value_list while abort case else fail_if fail_ifnot fail if_empty if_false if_null if_true loop_abort loop_continue loop_count params params_up return return_value run_children soap_definetag soap_lastrequest soap_lastresponse tag_name ascending average by define descending do equals frozen group handle_failure import in into join let match max min on order parent protected provide public require returnhome skip split_thread sum take thread to trait type where with yield yieldhome"},a=e.COMMENT("",{relevance:0}),o={className:"meta",begin:"\\[noprocess\\]",starts:{end:"\\[/noprocess\\]",returnEnd:!0,contains:[a]}},s={className:"meta",begin:"\\[/noprocess|"+n},l={className:"symbol",begin:"'"+t+"'"},c=[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.inherit(e.C_NUMBER_MODE,{begin:e.C_NUMBER_RE+"|(-?infinity|NaN)\\b"}),e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"`",end:"`"},{variants:[{begin:"[#$]"+t},{begin:"#",end:"\\d+",illegal:"\\W"}]},{className:"type",begin:"::\\s*",end:t,illegal:"\\W"},{className:"params",variants:[{begin:"-(?!infinity)"+t,relevance:0},{begin:"(\\.\\.\\.)"}]},{begin:/(->|\.)\s*/,relevance:0,contains:[l]},{className:"class",beginKeywords:"define",returnEnd:!0,end:"\\(|=>",contains:[e.inherit(e.TITLE_MODE,{begin:t+"(=(?!>))?|[-+*/%](?!>)"})]}];return{aliases:["ls","lassoscript"],case_insensitive:!0,lexemes:t+"|&[lg]t;",keywords:r,contains:[{className:"meta",begin:i,relevance:0,starts:{end:"\\[|"+n,returnEnd:!0,relevance:0,contains:[a]}},o,s,{className:"meta",begin:"\\[no_square_brackets",starts:{end:"\\[/no_square_brackets\\]",lexemes:t+"|&[lg]t;",keywords:r,contains:[{className:"meta",begin:i,relevance:0,starts:{end:"\\[noprocess\\]|"+n,returnEnd:!0,contains:[a]}},o,s].concat(c)}},{className:"meta",begin:"\\[",relevance:0},{className:"meta",begin:"^#!",end:"lasso9$",relevance:10}].concat(c)}}}),define("highlight/lib/languages/ldif",["require","exports","module"],function(e,t,n){n.exports=function(e){return{contains:[{className:"attribute",begin:"^dn",end:": ",excludeEnd:!0,starts:{end:"$",relevance:0},relevance:10},{className:"attribute",begin:"^\\w",end:": ",excludeEnd:!0,starts:{end:"$",relevance:0}},{className:"literal",begin:"^-",end:"$"},e.HASH_COMMENT_MODE]}}}),define("highlight/lib/languages/less",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="[\\w-]+",n="("+t+"|@{"+t+"})",i=[],r=[],a=function(e){return{className:"string",begin:"~?"+e+".*?"+e}},o=function(e,t,n){return{className:e,begin:t,relevance:n}},s={begin:"\\(",end:"\\)",contains:r,relevance:0};r.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a("'"),a('"'),e.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},o("number","#[0-9A-Fa-f]+\\b"),s,o("variable","@@?"+t,10),o("variable","@{"+t+"}"),o("built_in","~?`[^`]*?`"),{className:"attribute",begin:t+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},{className:"meta",begin:"!important"});var l=r.concat({begin:"{",end:"}",contains:i}),c={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(r)},d={begin:n+"\\s*:",returnBegin:!0,end:"[;}]",relevance:0,contains:[{className:"attribute",begin:n,end:":",excludeEnd:!0,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:r}}]},u={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",returnEnd:!0,contains:r,relevance:0}},m={className:"variable",variants:[{begin:"@"+t+"\\s*:",relevance:15},{begin:"@"+t}],starts:{end:"[;}]",returnEnd:!0,contains:l}},p={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:n,end:"{"}],returnBegin:!0,returnEnd:!0,illegal:"[<='$\"]",relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,c,o("keyword","all\\b"),o("variable","@{"+t+"}"),o("selector-tag",n+"%?",0),o("selector-id","#"+n),o("selector-class","\\."+n,0),o("selector-tag","&",0),{className:"selector-attr",begin:"\\[",end:"\\]"},{className:"selector-pseudo",begin:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{begin:"\\(",end:"\\)",contains:l},{begin:"!important"}]};return i.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,u,m,d,p),{case_insensitive:!0,illegal:"[=>'/<($\"]",contains:i}}}),define("highlight/lib/languages/lisp",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="[a-zA-Z_\\-\\+\\*\\/\\<\\=\\>\\&\\#][a-zA-Z0-9_\\-\\+\\*\\/\\<\\=\\>\\&\\#!]*",n="\\|[^]*?\\|",i="(\\-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s|D|E|F|L|S)(\\+|\\-)?\\d+)?",r={className:"meta",begin:"^#!",end:"$"},a={className:"literal",begin:"\\b(t{1}|nil)\\b"},o={className:"number",variants:[{begin:i,relevance:0},{begin:"#(b|B)[0-1]+(/[0-1]+)?"},{begin:"#(o|O)[0-7]+(/[0-7]+)?"},{begin:"#(x|X)[0-9a-fA-F]+(/[0-9a-fA-F]+)?"},{begin:"#(c|C)\\("+i+" +"+i,end:"\\)"}]},s=e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),l=e.COMMENT(";","$",{relevance:0}),c={begin:"\\*",end:"\\*"},d={className:"symbol",begin:"[:&]"+t},u={begin:t,relevance:0},m={begin:n},p={begin:"\\(",end:"\\)",contains:["self",a,s,o,u]},g={contains:[o,s,c,d,p,u],variants:[{begin:"['`]\\(",end:"\\)"},{begin:"\\(quote ",end:"\\)",keywords:{name:"quote"}},{begin:"'"+n}]},h={variants:[{begin:"'"+t},{begin:"#'"+t+"(::"+t+")*"}]},b={begin:"\\(\\s*",end:"\\)"},f={endsWithParent:!0,relevance:0};return b.contains=[{className:"name",variants:[{begin:t},{begin:n}]},f],f.contains=[g,h,b,a,o,s,l,c,d,m,u],{illegal:/\S/,contains:[o,r,a,s,l,g,h,b,u]}}}),define("highlight/lib/languages/livecodeserver",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={begin:"\\b[gtps][A-Z]+[A-Za-z0-9_\\-]*\\b|\\$_[A-Z]+",relevance:0},n=[e.C_BLOCK_COMMENT_MODE,e.HASH_COMMENT_MODE,e.COMMENT("--","$"),e.COMMENT("[^:]//","$")],i=e.inherit(e.TITLE_MODE,{variants:[{begin:"\\b_*rig[A-Z]+[A-Za-z0-9_\\-]*"},{begin:"\\b_[a-z0-9\\-]+"}]}),r=e.inherit(e.TITLE_MODE,{begin:"\\b([A-Za-z0-9_\\-]+)\\b"});return{case_insensitive:!1,keywords:{keyword:"$_COOKIE $_FILES $_GET $_GET_BINARY $_GET_RAW $_POST $_POST_BINARY $_POST_RAW $_SESSION $_SERVER codepoint codepoints segment segments codeunit codeunits sentence sentences trueWord trueWords paragraph after byte bytes english the until http forever descending using line real8 with seventh for stdout finally element word words fourth before black ninth sixth characters chars stderr uInt1 uInt1s uInt2 uInt2s stdin string lines relative rel any fifth items from middle mid at else of catch then third it file milliseconds seconds second secs sec int1 int1s int4 int4s internet int2 int2s normal text item last long detailed effective uInt4 uInt4s repeat end repeat URL in try into switch to words https token binfile each tenth as ticks tick system real4 by dateItems without char character ascending eighth whole dateTime numeric short first ftp integer abbreviated abbr abbrev private case while if div mod wrap and or bitAnd bitNot bitOr bitXor among not in a an within contains ends with begins the keys of keys",literal:"SIX TEN FORMFEED NINE ZERO NONE SPACE FOUR FALSE COLON CRLF PI COMMA ENDOFFILE EOF EIGHT FIVE QUOTE EMPTY ONE TRUE RETURN CR LINEFEED RIGHT BACKSLASH NULL SEVEN TAB THREE TWO six ten formfeed nine zero none space four false colon crlf pi comma endoffile eof eight five quote empty one true return cr linefeed right backslash null seven tab three two RIVERSION RISTATE FILE_READ_MODE FILE_WRITE_MODE FILE_WRITE_MODE DIR_WRITE_MODE FILE_READ_UMASK FILE_WRITE_UMASK DIR_READ_UMASK DIR_WRITE_UMASK",built_in:"put abs acos aliasReference annuity arrayDecode arrayEncode asin atan atan2 average avg avgDev base64Decode base64Encode baseConvert binaryDecode binaryEncode byteOffset byteToNum cachedURL cachedURLs charToNum cipherNames codepointOffset codepointProperty codepointToNum codeunitOffset commandNames compound compress constantNames cos date dateFormat decompress directories diskSpace DNSServers exp exp1 exp2 exp10 extents files flushEvents folders format functionNames geometricMean global globals hasMemory harmonicMean hostAddress hostAddressToName hostName hostNameToAddress isNumber ISOToMac itemOffset keys len length libURLErrorData libUrlFormData libURLftpCommand libURLLastHTTPHeaders libURLLastRHHeaders libUrlMultipartFormAddPart libUrlMultipartFormData libURLVersion lineOffset ln ln1 localNames log log2 log10 longFilePath lower macToISO matchChunk matchText matrixMultiply max md5Digest median merge millisec millisecs millisecond milliseconds min monthNames nativeCharToNum normalizeText num number numToByte numToChar numToCodepoint numToNativeChar offset open openfiles openProcesses openProcessIDs openSockets paragraphOffset paramCount param params peerAddress pendingMessages platform popStdDev populationStandardDeviation populationVariance popVariance processID random randomBytes replaceText result revCreateXMLTree revCreateXMLTreeFromFile revCurrentRecord revCurrentRecordIsFirst revCurrentRecordIsLast revDatabaseColumnCount revDatabaseColumnIsNull revDatabaseColumnLengths revDatabaseColumnNames revDatabaseColumnNamed revDatabaseColumnNumbered revDatabaseColumnTypes revDatabaseConnectResult revDatabaseCursors revDatabaseID revDatabaseTableNames revDatabaseType revDataFromQuery revdb_closeCursor revdb_columnbynumber revdb_columncount revdb_columnisnull revdb_columnlengths revdb_columnnames revdb_columntypes revdb_commit revdb_connect revdb_connections revdb_connectionerr revdb_currentrecord revdb_cursorconnection revdb_cursorerr revdb_cursors revdb_dbtype revdb_disconnect revdb_execute revdb_iseof revdb_isbof revdb_movefirst revdb_movelast revdb_movenext revdb_moveprev revdb_query revdb_querylist revdb_recordcount revdb_rollback revdb_tablenames revGetDatabaseDriverPath revNumberOfRecords revOpenDatabase revOpenDatabases revQueryDatabase revQueryDatabaseBlob revQueryResult revQueryIsAtStart revQueryIsAtEnd revUnixFromMacPath revXMLAttribute revXMLAttributes revXMLAttributeValues revXMLChildContents revXMLChildNames revXMLCreateTreeFromFileWithNamespaces revXMLCreateTreeWithNamespaces revXMLDataFromXPathQuery revXMLEvaluateXPath revXMLFirstChild revXMLMatchingNode revXMLNextSibling revXMLNodeContents revXMLNumberOfChildren revXMLParent revXMLPreviousSibling revXMLRootNode revXMLRPC_CreateRequest revXMLRPC_Documents revXMLRPC_Error revXMLRPC_GetHost revXMLRPC_GetMethod revXMLRPC_GetParam revXMLText revXMLRPC_Execute revXMLRPC_GetParamCount revXMLRPC_GetParamNode revXMLRPC_GetParamType revXMLRPC_GetPath revXMLRPC_GetPort revXMLRPC_GetProtocol revXMLRPC_GetRequest revXMLRPC_GetResponse revXMLRPC_GetSocket revXMLTree revXMLTrees revXMLValidateDTD revZipDescribeItem revZipEnumerateItems revZipOpenArchives round sampVariance sec secs seconds sentenceOffset sha1Digest shell shortFilePath sin specialFolderPath sqrt standardDeviation statRound stdDev sum sysError systemVersion tan tempName textDecode textEncode tick ticks time to tokenOffset toLower toUpper transpose truewordOffset trunc uniDecode uniEncode upper URLDecode URLEncode URLStatus uuid value variableNames variance version waitDepth weekdayNames wordOffset xsltApplyStylesheet xsltApplyStylesheetFromFile xsltLoadStylesheet xsltLoadStylesheetFromFile add breakpoint cancel clear local variable file word line folder directory URL close socket process combine constant convert create new alias folder directory decrypt delete variable word line folder directory URL dispatch divide do encrypt filter get include intersect kill libURLDownloadToFile libURLFollowHttpRedirects libURLftpUpload libURLftpUploadFile libURLresetAll libUrlSetAuthCallback libURLSetCustomHTTPHeaders libUrlSetExpect100 libURLSetFTPListCommand libURLSetFTPMode libURLSetFTPStopTime libURLSetStatusCallback load multiply socket prepare process post seek rel relative read from process rename replace require resetAll resolve revAddXMLNode revAppendXML revCloseCursor revCloseDatabase revCommitDatabase revCopyFile revCopyFolder revCopyXMLNode revDeleteFolder revDeleteXMLNode revDeleteAllXMLTrees revDeleteXMLTree revExecuteSQL revGoURL revInsertXMLNode revMoveFolder revMoveToFirstRecord revMoveToLastRecord revMoveToNextRecord revMoveToPreviousRecord revMoveToRecord revMoveXMLNode revPutIntoXMLNode revRollBackDatabase revSetDatabaseDriverPath revSetXMLAttribute revXMLRPC_AddParam revXMLRPC_DeleteAllDocuments revXMLAddDTD revXMLRPC_Free revXMLRPC_FreeAll revXMLRPC_DeleteDocument revXMLRPC_DeleteParam revXMLRPC_SetHost revXMLRPC_SetMethod revXMLRPC_SetPort revXMLRPC_SetProtocol revXMLRPC_SetSocket revZipAddItemWithData revZipAddItemWithFile revZipAddUncompressedItemWithData revZipAddUncompressedItemWithFile revZipCancel revZipCloseArchive revZipDeleteItem revZipExtractItemToFile revZipExtractItemToVariable revZipSetProgressCallback revZipRenameItem revZipReplaceItemWithData revZipReplaceItemWithFile revZipOpenArchive send set sort split start stop subtract union unload wait write"},contains:[t,{className:"keyword",begin:"\\bend\\sif\\b"},{className:"function",beginKeywords:"function",end:"$",contains:[t,r,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE,i]},{className:"function",begin:"\\bend\\s+",end:"$",keywords:"end",contains:[r,i],relevance:0},{beginKeywords:"command on",end:"$",contains:[t,r,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE,i]},{className:"meta",variants:[{begin:"<\\?(rev|lc|livecode)",relevance:10},{begin:"<\\?"},{begin:"\\?>"}]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE,i].concat(n),illegal:";$|^\\[|^=|&|{"}}}),define("highlight/lib/languages/livescript",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger case default function var with then unless until loop of by when and or is isnt not it that otherwise from to til fallthrough super case default function var void const let enum export import native __hasProp __extends __slice __bind __indexOf",literal:"true false null undefined yes no on off it that void",built_in:"npm require console print module global window document"},n="[A-Za-z$_](?:-[0-9A-Za-z$_]|[0-9A-Za-z$_])*",i=e.inherit(e.TITLE_MODE,{begin:n}),r={className:"subst",begin:/#\{/,end:/}/,keywords:t},a={className:"subst",begin:/#[A-Za-z$_]/,end:/(?:\-[0-9A-Za-z$_]|[0-9A-Za-z$_])*/,keywords:t},o=[e.BINARY_NUMBER_MODE,{className:"number",begin:"(\\b0[xX][a-fA-F0-9_]+)|(\\b\\d(\\d|_\\d)*(\\.(\\d(\\d|_\\d)*)?)?(_*[eE]([-+]\\d(_\\d|\\d)*)?)?[_a-z]*)",relevance:0,starts:{end:"(\\s*/)?",relevance:0}},{className:"string",variants:[{begin:/'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[e.BACKSLASH_ESCAPE]},{begin:/"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,r,a]},{begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,r,a]},{begin:/\\/,end:/(\s|$)/,excludeEnd:!0}]},{className:"regexp",variants:[{begin:"//",end:"//[gim]*",contains:[r,e.HASH_COMMENT_MODE]},{begin:/\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/}]},{begin:"@"+n},{begin:"``",end:"``",excludeBegin:!0,excludeEnd:!0,subLanguage:"javascript"}];r.contains=o;var s={className:"params",begin:"\\(",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:t,contains:["self"].concat(o)}]};return{aliases:["ls"],keywords:t,illegal:/\/\*/,contains:o.concat([e.COMMENT("\\/\\*","\\*\\/"),e.HASH_COMMENT_MODE,{className:"function",contains:[i,s],returnBegin:!0,variants:[{begin:"("+n+"\\s*(?:=|:=)\\s*)?(\\(.*\\))?\\s*\\B\\->\\*?",end:"\\->\\*?"},{begin:"("+n+"\\s*(?:=|:=)\\s*)?!?(\\(.*\\))?\\s*\\B[-~]{1,2}>\\*?",end:"[-~]{1,2}>\\*?"},{begin:"("+n+"\\s*(?:=|:=)\\s*)?(\\(.*\\))?\\s*\\B!?[-~]{1,2}>\\*?",end:"!?[-~]{1,2}>\\*?"}]},{className:"class",beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[i]},i]},{begin:n+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}}),define("highlight/lib/languages/lsl",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"subst",begin:/\\[tn"\\]/},n={className:"string",begin:'"',end:'"',contains:[t]},i={className:"number",begin:e.C_NUMBER_RE},r={className:"literal",variants:[{begin:"\\b(?:PI|TWO_PI|PI_BY_TWO|DEG_TO_RAD|RAD_TO_DEG|SQRT2)\\b"},{begin:"\\b(?:XP_ERROR_(?:EXPERIENCES_DISABLED|EXPERIENCE_(?:DISABLED|SUSPENDED)|INVALID_(?:EXPERIENCE|PARAMETERS)|KEY_NOT_FOUND|MATURITY_EXCEEDED|NONE|NOT_(?:FOUND|PERMITTED(?:_LAND)?)|NO_EXPERIENCE|QUOTA_EXCEEDED|RETRY_UPDATE|STORAGE_EXCEPTION|STORE_DISABLED|THROTTLED|UNKNOWN_ERROR)|JSON_APPEND|STATUS_(?:PHYSICS|ROTATE_[XYZ]|PHANTOM|SANDBOX|BLOCK_GRAB(?:_OBJECT)?|(?:DIE|RETURN)_AT_EDGE|CAST_SHADOWS|OK|MALFORMED_PARAMS|TYPE_MISMATCH|BOUNDS_ERROR|NOT_(?:FOUND|SUPPORTED)|INTERNAL_ERROR|WHITELIST_FAILED)|AGENT(?:_(?:BY_(?:LEGACY_|USER)NAME|FLYING|ATTACHMENTS|SCRIPTED|MOUSELOOK|SITTING|ON_OBJECT|AWAY|WALKING|IN_AIR|TYPING|CROUCHING|BUSY|ALWAYS_RUN|AUTOPILOT|LIST_(?:PARCEL(?:_OWNER)?|REGION)))?|CAMERA_(?:PITCH|DISTANCE|BEHINDNESS_(?:ANGLE|LAG)|(?:FOCUS|POSITION)(?:_(?:THRESHOLD|LOCKED|LAG))?|FOCUS_OFFSET|ACTIVE)|ANIM_ON|LOOP|REVERSE|PING_PONG|SMOOTH|ROTATE|SCALE|ALL_SIDES|LINK_(?:ROOT|SET|ALL_(?:OTHERS|CHILDREN)|THIS)|ACTIVE|PASS(?:IVE|_(?:ALWAYS|IF_NOT_HANDLED|NEVER))|SCRIPTED|CONTROL_(?:FWD|BACK|(?:ROT_)?(?:LEFT|RIGHT)|UP|DOWN|(?:ML_)?LBUTTON)|PERMISSION_(?:RETURN_OBJECTS|DEBIT|OVERRIDE_ANIMATIONS|SILENT_ESTATE_MANAGEMENT|TAKE_CONTROLS|TRIGGER_ANIMATION|ATTACH|CHANGE_LINKS|(?:CONTROL|TRACK)_CAMERA|TELEPORT)|INVENTORY_(?:TEXTURE|SOUND|OBJECT|SCRIPT|LANDMARK|CLOTHING|NOTECARD|BODYPART|ANIMATION|GESTURE|ALL|NONE)|CHANGED_(?:INVENTORY|COLOR|SHAPE|SCALE|TEXTURE|LINK|ALLOWED_DROP|OWNER|REGION(?:_START)?|TELEPORT|MEDIA)|OBJECT_(?:CLICK_ACTION|HOVER_HEIGHT|LAST_OWNER_ID|(?:PHYSICS|SERVER|STREAMING)_COST|UNKNOWN_DETAIL|CHARACTER_TIME|PHANTOM|PHYSICS|TEMP_ON_REZ|NAME|DESC|POS|PRIM_(?:COUNT|EQUIVALENCE)|RETURN_(?:PARCEL(?:_OWNER)?|REGION)|REZZER_KEY|ROO?T|VELOCITY|OMEGA|OWNER|GROUP|CREATOR|ATTACHED_POINT|RENDER_WEIGHT|(?:BODY_SHAPE|PATHFINDING)_TYPE|(?:RUNNING|TOTAL)_SCRIPT_COUNT|TOTAL_INVENTORY_COUNT|SCRIPT_(?:MEMORY|TIME))|TYPE_(?:INTEGER|FLOAT|STRING|KEY|VECTOR|ROTATION|INVALID)|(?:DEBUG|PUBLIC)_CHANNEL|ATTACH_(?:AVATAR_CENTER|CHEST|HEAD|BACK|PELVIS|MOUTH|CHIN|NECK|NOSE|BELLY|[LR](?:SHOULDER|HAND|FOOT|EAR|EYE|[UL](?:ARM|LEG)|HIP)|(?:LEFT|RIGHT)_PEC|HUD_(?:CENTER_[12]|TOP_(?:RIGHT|CENTER|LEFT)|BOTTOM(?:_(?:RIGHT|LEFT))?)|[LR]HAND_RING1|TAIL_(?:BASE|TIP)|[LR]WING|FACE_(?:JAW|[LR]EAR|[LR]EYE|TOUNGE)|GROIN|HIND_[LR]FOOT)|LAND_(?:LEVEL|RAISE|LOWER|SMOOTH|NOISE|REVERT)|DATA_(?:ONLINE|NAME|BORN|SIM_(?:POS|STATUS|RATING)|PAYINFO)|PAYMENT_INFO_(?:ON_FILE|USED)|REMOTE_DATA_(?:CHANNEL|REQUEST|REPLY)|PSYS_(?:PART_(?:BF_(?:ZERO|ONE(?:_MINUS_(?:DEST_COLOR|SOURCE_(ALPHA|COLOR)))?|DEST_COLOR|SOURCE_(ALPHA|COLOR))|BLEND_FUNC_(DEST|SOURCE)|FLAGS|(?:START|END)_(?:COLOR|ALPHA|SCALE|GLOW)|MAX_AGE|(?:RIBBON|WIND|INTERP_(?:COLOR|SCALE)|BOUNCE|FOLLOW_(?:SRC|VELOCITY)|TARGET_(?:POS|LINEAR)|EMISSIVE)_MASK)|SRC_(?:MAX_AGE|PATTERN|ANGLE_(?:BEGIN|END)|BURST_(?:RATE|PART_COUNT|RADIUS|SPEED_(?:MIN|MAX))|ACCEL|TEXTURE|TARGET_KEY|OMEGA|PATTERN_(?:DROP|EXPLODE|ANGLE(?:_CONE(?:_EMPTY)?)?)))|VEHICLE_(?:REFERENCE_FRAME|TYPE_(?:NONE|SLED|CAR|BOAT|AIRPLANE|BALLOON)|(?:LINEAR|ANGULAR)_(?:FRICTION_TIMESCALE|MOTOR_DIRECTION)|LINEAR_MOTOR_OFFSET|HOVER_(?:HEIGHT|EFFICIENCY|TIMESCALE)|BUOYANCY|(?:LINEAR|ANGULAR)_(?:DEFLECTION_(?:EFFICIENCY|TIMESCALE)|MOTOR_(?:DECAY_)?TIMESCALE)|VERTICAL_ATTRACTION_(?:EFFICIENCY|TIMESCALE)|BANKING_(?:EFFICIENCY|MIX|TIMESCALE)|FLAG_(?:NO_DEFLECTION_UP|LIMIT_(?:ROLL_ONLY|MOTOR_UP)|HOVER_(?:(?:WATER|TERRAIN|UP)_ONLY|GLOBAL_HEIGHT)|MOUSELOOK_(?:STEER|BANK)|CAMERA_DECOUPLED))|PRIM_(?:ALPHA_MODE(?:_(?:BLEND|EMISSIVE|MASK|NONE))?|NORMAL|SPECULAR|TYPE(?:_(?:BOX|CYLINDER|PRISM|SPHERE|TORUS|TUBE|RING|SCULPT))?|HOLE_(?:DEFAULT|CIRCLE|SQUARE|TRIANGLE)|MATERIAL(?:_(?:STONE|METAL|GLASS|WOOD|FLESH|PLASTIC|RUBBER))?|SHINY_(?:NONE|LOW|MEDIUM|HIGH)|BUMP_(?:NONE|BRIGHT|DARK|WOOD|BARK|BRICKS|CHECKER|CONCRETE|TILE|STONE|DISKS|GRAVEL|BLOBS|SIDING|LARGETILE|STUCCO|SUCTION|WEAVE)|TEXGEN_(?:DEFAULT|PLANAR)|SCULPT_(?:TYPE_(?:SPHERE|TORUS|PLANE|CYLINDER|MASK)|FLAG_(?:MIRROR|INVERT))|PHYSICS(?:_(?:SHAPE_(?:CONVEX|NONE|PRIM|TYPE)))?|(?:POS|ROT)_LOCAL|SLICE|TEXT|FLEXIBLE|POINT_LIGHT|TEMP_ON_REZ|PHANTOM|POSITION|SIZE|ROTATION|TEXTURE|NAME|OMEGA|DESC|LINK_TARGET|COLOR|BUMP_SHINY|FULLBRIGHT|TEXGEN|GLOW|MEDIA_(?:ALT_IMAGE_ENABLE|CONTROLS|(?:CURRENT|HOME)_URL|AUTO_(?:LOOP|PLAY|SCALE|ZOOM)|FIRST_CLICK_INTERACT|(?:WIDTH|HEIGHT)_PIXELS|WHITELIST(?:_ENABLE)?|PERMS_(?:INTERACT|CONTROL)|PARAM_MAX|CONTROLS_(?:STANDARD|MINI)|PERM_(?:NONE|OWNER|GROUP|ANYONE)|MAX_(?:URL_LENGTH|WHITELIST_(?:SIZE|COUNT)|(?:WIDTH|HEIGHT)_PIXELS)))|MASK_(?:BASE|OWNER|GROUP|EVERYONE|NEXT)|PERM_(?:TRANSFER|MODIFY|COPY|MOVE|ALL)|PARCEL_(?:MEDIA_COMMAND_(?:STOP|PAUSE|PLAY|LOOP|TEXTURE|URL|TIME|AGENT|UNLOAD|AUTO_ALIGN|TYPE|SIZE|DESC|LOOP_SET)|FLAG_(?:ALLOW_(?:FLY|(?:GROUP_)?SCRIPTS|LANDMARK|TERRAFORM|DAMAGE|CREATE_(?:GROUP_)?OBJECTS)|USE_(?:ACCESS_(?:GROUP|LIST)|BAN_LIST|LAND_PASS_LIST)|LOCAL_SOUND_ONLY|RESTRICT_PUSHOBJECT|ALLOW_(?:GROUP|ALL)_OBJECT_ENTRY)|COUNT_(?:TOTAL|OWNER|GROUP|OTHER|SELECTED|TEMP)|DETAILS_(?:NAME|DESC|OWNER|GROUP|AREA|ID|SEE_AVATARS))|LIST_STAT_(?:MAX|MIN|MEAN|MEDIAN|STD_DEV|SUM(?:_SQUARES)?|NUM_COUNT|GEOMETRIC_MEAN|RANGE)|PAY_(?:HIDE|DEFAULT)|REGION_FLAG_(?:ALLOW_DAMAGE|FIXED_SUN|BLOCK_TERRAFORM|SANDBOX|DISABLE_(?:COLLISIONS|PHYSICS)|BLOCK_FLY|ALLOW_DIRECT_TELEPORT|RESTRICT_PUSHOBJECT)|HTTP_(?:METHOD|MIMETYPE|BODY_(?:MAXLENGTH|TRUNCATED)|CUSTOM_HEADER|PRAGMA_NO_CACHE|VERBOSE_THROTTLE|VERIFY_CERT)|STRING_(?:TRIM(?:_(?:HEAD|TAIL))?)|CLICK_ACTION_(?:NONE|TOUCH|SIT|BUY|PAY|OPEN(?:_MEDIA)?|PLAY|ZOOM)|TOUCH_INVALID_FACE|PROFILE_(?:NONE|SCRIPT_MEMORY)|RC_(?:DATA_FLAGS|DETECT_PHANTOM|GET_(?:LINK_NUM|NORMAL|ROOT_KEY)|MAX_HITS|REJECT_(?:TYPES|AGENTS|(?:NON)?PHYSICAL|LAND))|RCERR_(?:CAST_TIME_EXCEEDED|SIM_PERF_LOW|UNKNOWN)|ESTATE_ACCESS_(?:ALLOWED_(?:AGENT|GROUP)_(?:ADD|REMOVE)|BANNED_AGENT_(?:ADD|REMOVE))|DENSITY|FRICTION|RESTITUTION|GRAVITY_MULTIPLIER|KFM_(?:COMMAND|CMD_(?:PLAY|STOP|PAUSE)|MODE|FORWARD|LOOP|PING_PONG|REVERSE|DATA|ROTATION|TRANSLATION)|ERR_(?:GENERIC|PARCEL_PERMISSIONS|MALFORMED_PARAMS|RUNTIME_PERMISSIONS|THROTTLED)|CHARACTER_(?:CMD_(?:(?:SMOOTH_)?STOP|JUMP)|DESIRED_(?:TURN_)?SPEED|RADIUS|STAY_WITHIN_PARCEL|LENGTH|ORIENTATION|ACCOUNT_FOR_SKIPPED_FRAMES|AVOIDANCE_MODE|TYPE(?:_(?:[ABCD]|NONE))?|MAX_(?:DECEL|TURN_RADIUS|(?:ACCEL|SPEED)))|PURSUIT_(?:OFFSET|FUZZ_FACTOR|GOAL_TOLERANCE|INTERCEPT)|REQUIRE_LINE_OF_SIGHT|FORCE_DIRECT_PATH|VERTICAL|HORIZONTAL|AVOID_(?:CHARACTERS|DYNAMIC_OBSTACLES|NONE)|PU_(?:EVADE_(?:HIDDEN|SPOTTED)|FAILURE_(?:DYNAMIC_PATHFINDING_DISABLED|INVALID_(?:GOAL|START)|NO_(?:NAVMESH|VALID_DESTINATION)|OTHER|TARGET_GONE|(?:PARCEL_)?UNREACHABLE)|(?:GOAL|SLOWDOWN_DISTANCE)_REACHED)|TRAVERSAL_TYPE(?:_(?:FAST|NONE|SLOW))?|CONTENT_TYPE_(?:ATOM|FORM|HTML|JSON|LLSD|RSS|TEXT|XHTML|XML)|GCNP_(?:RADIUS|STATIC)|(?:PATROL|WANDER)_PAUSE_AT_WAYPOINTS|OPT_(?:AVATAR|CHARACTER|EXCLUSION_VOLUME|LEGACY_LINKSET|MATERIAL_VOLUME|OTHER|STATIC_OBSTACLE|WALKABLE)|SIM_STAT_PCT_CHARS_STEPPED)\\b" -},{begin:"\\b(?:FALSE|TRUE)\\b"},{begin:"\\b(?:ZERO_ROTATION)\\b"},{begin:"\\b(?:EOF|JSON_(?:ARRAY|DELETE|FALSE|INVALID|NULL|NUMBER|OBJECT|STRING|TRUE)|NULL_KEY|TEXTURE_(?:BLANK|DEFAULT|MEDIA|PLYWOOD|TRANSPARENT)|URL_REQUEST_(?:GRANTED|DENIED))\\b"},{begin:"\\b(?:ZERO_VECTOR|TOUCH_INVALID_(?:TEXCOORD|VECTOR))\\b"}]},a={className:"built_in",begin:"\\b(?:ll(?:AgentInExperience|(?:Create|DataSize|Delete|KeyCount|Keys|Read|Update)KeyValue|GetExperience(?:Details|ErrorMessage)|ReturnObjectsBy(?:ID|Owner)|Json(?:2List|[GS]etValue|ValueType)|Sin|Cos|Tan|Atan2|Sqrt|Pow|Abs|Fabs|Frand|Floor|Ceil|Round|Vec(?:Mag|Norm|Dist)|Rot(?:Between|2(?:Euler|Fwd|Left|Up))|(?:Euler|Axes)2Rot|Whisper|(?:Region|Owner)?Say|Shout|Listen(?:Control|Remove)?|Sensor(?:Repeat|Remove)?|Detected(?:Name|Key|Owner|Type|Pos|Vel|Grab|Rot|Group|LinkNumber)|Die|Ground|Wind|(?:[GS]et)(?:AnimationOverride|MemoryLimit|PrimMediaParams|ParcelMusicURL|Object(?:Desc|Name)|PhysicsMaterial|Status|Scale|Color|Alpha|Texture|Pos|Rot|Force|Torque)|ResetAnimationOverride|(?:Scale|Offset|Rotate)Texture|(?:Rot)?Target(?:Remove)?|(?:Stop)?MoveToTarget|Apply(?:Rotational)?Impulse|Set(?:KeyframedMotion|ContentType|RegionPos|(?:Angular)?Velocity|Buoyancy|HoverHeight|ForceAndTorque|TimerEvent|ScriptState|Damage|TextureAnim|Sound(?:Queueing|Radius)|Vehicle(?:Type|(?:Float|Vector|Rotation)Param)|(?:Touch|Sit)?Text|Camera(?:Eye|At)Offset|PrimitiveParams|ClickAction|Link(?:Alpha|Color|PrimitiveParams(?:Fast)?|Texture(?:Anim)?|Camera|Media)|RemoteScriptAccessPin|PayPrice|LocalRot)|ScaleByFactor|Get(?:(?:Max|Min)ScaleFactor|ClosestNavPoint|StaticPath|SimStats|Env|PrimitiveParams|Link(?:PrimitiveParams|Number(?:OfSides)?|Key|Name|Media)|HTTPHeader|FreeURLs|Object(?:Details|PermMask|PrimCount)|Parcel(?:MaxPrims|Details|Prim(?:Count|Owners))|Attached(?:List)?|(?:SPMax|Free|Used)Memory|Region(?:Name|TimeDilation|FPS|Corner|AgentCount)|Root(?:Position|Rotation)|UnixTime|(?:Parcel|Region)Flags|(?:Wall|GMT)clock|SimulatorHostname|BoundingBox|GeometricCenter|Creator|NumberOf(?:Prims|NotecardLines|Sides)|Animation(?:List)?|(?:Camera|Local)(?:Pos|Rot)|Vel|Accel|Omega|Time(?:stamp|OfDay)|(?:Object|CenterOf)?Mass|MassMKS|Energy|Owner|(?:Owner)?Key|SunDirection|Texture(?:Offset|Scale|Rot)|Inventory(?:Number|Name|Key|Type|Creator|PermMask)|Permissions(?:Key)?|StartParameter|List(?:Length|EntryType)|Date|Agent(?:Size|Info|Language|List)|LandOwnerAt|NotecardLine|Script(?:Name|State))|(?:Get|Reset|GetAndReset)Time|PlaySound(?:Slave)?|LoopSound(?:Master|Slave)?|(?:Trigger|Stop|Preload)Sound|(?:(?:Get|Delete)Sub|Insert)String|To(?:Upper|Lower)|Give(?:InventoryList|Money)|RezObject|(?:Stop)?LookAt|Sleep|CollisionFilter|(?:Take|Release)Controls|DetachFromAvatar|AttachToAvatar(?:Temp)?|InstantMessage|(?:GetNext)?Email|StopHover|MinEventDelay|RotLookAt|String(?:Length|Trim)|(?:Start|Stop)Animation|TargetOmega|Request(?:Experience)?Permissions|(?:Create|Break)Link|BreakAllLinks|(?:Give|Remove)Inventory|Water|PassTouches|Request(?:Agent|Inventory)Data|TeleportAgent(?:Home|GlobalCoords)?|ModifyLand|CollisionSound|ResetScript|MessageLinked|PushObject|PassCollisions|AxisAngle2Rot|Rot2(?:Axis|Angle)|A(?:cos|sin)|AngleBetween|AllowInventoryDrop|SubStringIndex|List2(?:CSV|Integer|Json|Float|String|Key|Vector|Rot|List(?:Strided)?)|DeleteSubList|List(?:Statistics|Sort|Randomize|(?:Insert|Find|Replace)List)|EdgeOfWorld|AdjustSoundVolume|Key2Name|TriggerSoundLimited|EjectFromLand|(?:CSV|ParseString)2List|OverMyLand|SameGroup|UnSit|Ground(?:Slope|Normal|Contour)|GroundRepel|(?:Set|Remove)VehicleFlags|(?:AvatarOn)?(?:Link)?SitTarget|Script(?:Danger|Profiler)|Dialog|VolumeDetect|ResetOtherScript|RemoteLoadScriptPin|(?:Open|Close)RemoteDataChannel|SendRemoteData|RemoteDataReply|(?:Integer|String)ToBase64|XorBase64|Log(?:10)?|Base64To(?:String|Integer)|ParseStringKeepNulls|RezAtRoot|RequestSimulatorData|ForceMouselook|(?:Load|Release|(?:E|Une)scape)URL|ParcelMedia(?:CommandList|Query)|ModPow|MapDestination|(?:RemoveFrom|AddTo|Reset)Land(?:Pass|Ban)List|(?:Set|Clear)CameraParams|HTTP(?:Request|Response)|TextBox|DetectedTouch(?:UV|Face|Pos|(?:N|Bin)ormal|ST)|(?:MD5|SHA1|DumpList2)String|Request(?:Secure)?URL|Clear(?:Prim|Link)Media|(?:Link)?ParticleSystem|(?:Get|Request)(?:Username|DisplayName)|RegionSayTo|CastRay|GenerateKey|TransferLindenDollars|ManageEstateAccess|(?:Create|Delete)Character|ExecCharacterCmd|Evade|FleeFrom|NavigateTo|PatrolPoints|Pursue|UpdateCharacter|WanderWithin))\\b"};return{illegal:":",contains:[n,{className:"comment",variants:[e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/")]},i,{className:"section",variants:[{begin:"\\b(?:state|default)\\b"},{begin:"\\b(?:state_(?:entry|exit)|touch(?:_(?:start|end))?|(?:land_)?collision(?:_(?:start|end))?|timer|listen|(?:no_)?sensor|control|(?:not_)?at_(?:rot_)?target|money|email|experience_permissions(?:_denied)?|run_time_permissions|changed|attach|dataserver|moving_(?:start|end)|link_message|(?:on|object)_rez|remote_data|http_re(?:sponse|quest)|path_update|transaction_result)\\b"}]},a,r,{className:"type",begin:"\\b(?:integer|float|string|key|vector|quaternion|rotation|list)\\b"}]}}}),define("highlight/lib/languages/lua",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="\\[=*\\[",n="\\]=*\\]",i={begin:t,end:n,contains:["self"]},r=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[i],relevance:10})];return{lexemes:e.UNDERSCORE_IDENT_RE,keywords:{keyword:"and break do else elseif end false for if in local nil not or repeat return then true until while",built_in:"_G _VERSION assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall coroutine debug io math os package string table"},contains:r.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:r}].concat(r)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[i],relevance:5}])}}}),define("highlight/lib/languages/makefile",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"variable",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]};return{aliases:["mk","mak"],contains:[e.HASH_COMMENT_MODE,{begin:/^\w+\s*\W*=/,returnBegin:!0,relevance:0,starts:{end:/\s*\W*=/,excludeEnd:!0,starts:{end:/$/,relevance:0,contains:[t]}}},{className:"section",begin:/^[\w]+:\s*$/},{className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{"meta-keyword":".PHONY"},lexemes:/[\.\w]+/},{begin:/^\t+/,end:/$/,relevance:0,contains:[e.QUOTE_STRING_MODE,t]}]}}}),define("highlight/lib/languages/mathematica",["require","exports","module"],function(e,t,n){n.exports=function(e){return{aliases:["mma"],lexemes:"(\\$|\\b)"+e.IDENT_RE+"\\b",keywords:"AbelianGroup Abort AbortKernels AbortProtect Above Abs Absolute AbsoluteCorrelation AbsoluteCorrelationFunction AbsoluteCurrentValue AbsoluteDashing AbsoluteFileName AbsoluteOptions AbsolutePointSize AbsoluteThickness AbsoluteTime AbsoluteTiming AccountingForm Accumulate Accuracy AccuracyGoal ActionDelay ActionMenu ActionMenuBox ActionMenuBoxOptions Active ActiveItem ActiveStyle AcyclicGraphQ AddOnHelpPath AddTo AdjacencyGraph AdjacencyList AdjacencyMatrix AdjustmentBox AdjustmentBoxOptions AdjustTimeSeriesForecast AffineTransform After AiryAi AiryAiPrime AiryAiZero AiryBi AiryBiPrime AiryBiZero AlgebraicIntegerQ AlgebraicNumber AlgebraicNumberDenominator AlgebraicNumberNorm AlgebraicNumberPolynomial AlgebraicNumberTrace AlgebraicRules AlgebraicRulesData Algebraics AlgebraicUnitQ Alignment AlignmentMarker AlignmentPoint All AllowedDimensions AllowGroupClose AllowInlineCells AllowKernelInitialization AllowReverseGroupClose AllowScriptLevelChange AlphaChannel AlternatingGroup AlternativeHypothesis Alternatives AmbientLight Analytic AnchoredSearch And AndersonDarlingTest AngerJ AngleBracket AngularGauge Animate AnimationCycleOffset AnimationCycleRepetitions AnimationDirection AnimationDisplayTime AnimationRate AnimationRepetitions AnimationRunning Animator AnimatorBox AnimatorBoxOptions AnimatorElements Annotation Annuity AnnuityDue Antialiasing Antisymmetric Apart ApartSquareFree Appearance AppearanceElements AppellF1 Append AppendTo Apply ArcCos ArcCosh ArcCot ArcCoth ArcCsc ArcCsch ArcSec ArcSech ArcSin ArcSinDistribution ArcSinh ArcTan ArcTanh Arg ArgMax ArgMin ArgumentCountQ ARIMAProcess ArithmeticGeometricMean ARMAProcess ARProcess Array ArrayComponents ArrayDepth ArrayFlatten ArrayPad ArrayPlot ArrayQ ArrayReshape ArrayRules Arrays Arrow Arrow3DBox ArrowBox Arrowheads AspectRatio AspectRatioFixed Assert Assuming Assumptions AstronomicalData Asynchronous AsynchronousTaskObject AsynchronousTasks AtomQ Attributes AugmentedSymmetricPolynomial AutoAction AutoDelete AutoEvaluateEvents AutoGeneratedPackage AutoIndent AutoIndentSpacings AutoItalicWords AutoloadPath AutoMatch Automatic AutomaticImageSize AutoMultiplicationSymbol AutoNumberFormatting AutoOpenNotebooks AutoOpenPalettes AutorunSequencing AutoScaling AutoScroll AutoSpacing AutoStyleOptions AutoStyleWords Axes AxesEdge AxesLabel AxesOrigin AxesStyle Axis BabyMonsterGroupB Back Background BackgroundTasksSettings Backslash Backsubstitution Backward Band BandpassFilter BandstopFilter BarabasiAlbertGraphDistribution BarChart BarChart3D BarLegend BarlowProschanImportance BarnesG BarOrigin BarSpacing BartlettHannWindow BartlettWindow BaseForm Baseline BaselinePosition BaseStyle BatesDistribution BattleLemarieWavelet Because BeckmannDistribution Beep Before Begin BeginDialogPacket BeginFrontEndInteractionPacket BeginPackage BellB BellY Below BenfordDistribution BeniniDistribution BenktanderGibratDistribution BenktanderWeibullDistribution BernoulliB BernoulliDistribution BernoulliGraphDistribution BernoulliProcess BernsteinBasis BesselFilterModel BesselI BesselJ BesselJZero BesselK BesselY BesselYZero Beta BetaBinomialDistribution BetaDistribution BetaNegativeBinomialDistribution BetaPrimeDistribution BetaRegularized BetweennessCentrality BezierCurve BezierCurve3DBox BezierCurve3DBoxOptions BezierCurveBox BezierCurveBoxOptions BezierFunction BilateralFilter Binarize BinaryFormat BinaryImageQ BinaryRead BinaryReadList BinaryWrite BinCounts BinLists Binomial BinomialDistribution BinomialProcess BinormalDistribution BiorthogonalSplineWavelet BipartiteGraphQ BirnbaumImportance BirnbaumSaundersDistribution BitAnd BitClear BitGet BitLength BitNot BitOr BitSet BitShiftLeft BitShiftRight BitXor Black BlackmanHarrisWindow BlackmanNuttallWindow BlackmanWindow Blank BlankForm BlankNullSequence BlankSequence Blend Block BlockRandom BlomqvistBeta BlomqvistBetaTest Blue Blur BodePlot BohmanWindow Bold Bookmarks Boole BooleanConsecutiveFunction BooleanConvert BooleanCountingFunction BooleanFunction BooleanGraph BooleanMaxterms BooleanMinimize BooleanMinterms Booleans BooleanTable BooleanVariables BorderDimensions BorelTannerDistribution Bottom BottomHatTransform BoundaryStyle Bounds Box BoxBaselineShift BoxData BoxDimensions Boxed Boxes BoxForm BoxFormFormatTypes BoxFrame BoxID BoxMargins BoxMatrix BoxRatios BoxRotation BoxRotationPoint BoxStyle BoxWhiskerChart Bra BracketingBar BraKet BrayCurtisDistance BreadthFirstScan Break Brown BrownForsytheTest BrownianBridgeProcess BrowserCategory BSplineBasis BSplineCurve BSplineCurve3DBox BSplineCurveBox BSplineCurveBoxOptions BSplineFunction BSplineSurface BSplineSurface3DBox BubbleChart BubbleChart3D BubbleScale BubbleSizes BulletGauge BusinessDayQ ButterflyGraph ButterworthFilterModel Button ButtonBar ButtonBox ButtonBoxOptions ButtonCell ButtonContents ButtonData ButtonEvaluator ButtonExpandable ButtonFrame ButtonFunction ButtonMargins ButtonMinHeight ButtonNote ButtonNotebook ButtonSource ButtonStyle ButtonStyleMenuListing Byte ByteCount ByteOrdering C CachedValue CacheGraphics CalendarData CalendarType CallPacket CanberraDistance Cancel CancelButton CandlestickChart Cap CapForm CapitalDifferentialD CardinalBSplineBasis CarmichaelLambda Cases Cashflow Casoratian Catalan CatalanNumber Catch CauchyDistribution CauchyWindow CayleyGraph CDF CDFDeploy CDFInformation CDFWavelet Ceiling Cell CellAutoOverwrite CellBaseline CellBoundingBox CellBracketOptions CellChangeTimes CellContents CellContext CellDingbat CellDynamicExpression CellEditDuplicate CellElementsBoundingBox CellElementSpacings CellEpilog CellEvaluationDuplicate CellEvaluationFunction CellEventActions CellFrame CellFrameColor CellFrameLabelMargins CellFrameLabels CellFrameMargins CellGroup CellGroupData CellGrouping CellGroupingRules CellHorizontalScrolling CellID CellLabel CellLabelAutoDelete CellLabelMargins CellLabelPositioning CellMargins CellObject CellOpen CellPrint CellProlog Cells CellSize CellStyle CellTags CellularAutomaton CensoredDistribution Censoring Center CenterDot CentralMoment CentralMomentGeneratingFunction CForm ChampernowneNumber ChanVeseBinarize Character CharacterEncoding CharacterEncodingsPath CharacteristicFunction CharacteristicPolynomial CharacterRange Characters ChartBaseStyle ChartElementData ChartElementDataFunction ChartElementFunction ChartElements ChartLabels ChartLayout ChartLegends ChartStyle Chebyshev1FilterModel Chebyshev2FilterModel ChebyshevDistance ChebyshevT ChebyshevU Check CheckAbort CheckAll Checkbox CheckboxBar CheckboxBox CheckboxBoxOptions ChemicalData ChessboardDistance ChiDistribution ChineseRemainder ChiSquareDistribution ChoiceButtons ChoiceDialog CholeskyDecomposition Chop Circle CircleBox CircleDot CircleMinus CirclePlus CircleTimes CirculantGraph CityData Clear ClearAll ClearAttributes ClearSystemCache ClebschGordan ClickPane Clip ClipboardNotebook ClipFill ClippingStyle ClipPlanes ClipRange Clock ClockGauge ClockwiseContourIntegral Close Closed CloseKernels ClosenessCentrality Closing ClosingAutoSave ClosingEvent ClusteringComponents CMYKColor Coarse Coefficient CoefficientArrays CoefficientDomain CoefficientList CoefficientRules CoifletWavelet Collect Colon ColonForm ColorCombine ColorConvert ColorData ColorDataFunction ColorFunction ColorFunctionScaling Colorize ColorNegate ColorOutput ColorProfileData ColorQuantize ColorReplace ColorRules ColorSelectorSettings ColorSeparate ColorSetter ColorSetterBox ColorSetterBoxOptions ColorSlider ColorSpace Column ColumnAlignments ColumnBackgrounds ColumnForm ColumnLines ColumnsEqual ColumnSpacings ColumnWidths CommonDefaultFormatTypes Commonest CommonestFilter CommonUnits CommunityBoundaryStyle CommunityGraphPlot CommunityLabels CommunityRegionStyle CompatibleUnitQ CompilationOptions CompilationTarget Compile Compiled CompiledFunction Complement CompleteGraph CompleteGraphQ CompleteKaryTree CompletionsListPacket Complex Complexes ComplexExpand ComplexInfinity ComplexityFunction ComponentMeasurements ComponentwiseContextMenu Compose ComposeList ComposeSeries Composition CompoundExpression CompoundPoissonDistribution CompoundPoissonProcess CompoundRenewalProcess Compress CompressedData Condition ConditionalExpression Conditioned Cone ConeBox ConfidenceLevel ConfidenceRange ConfidenceTransform ConfigurationPath Congruent Conjugate ConjugateTranspose Conjunction Connect ConnectedComponents ConnectedGraphQ ConnesWindow ConoverTest ConsoleMessage ConsoleMessagePacket ConsolePrint Constant ConstantArray Constants ConstrainedMax ConstrainedMin ContentPadding ContentsBoundingBox ContentSelectable ContentSize Context ContextMenu Contexts ContextToFilename ContextToFileName Continuation Continue ContinuedFraction ContinuedFractionK ContinuousAction ContinuousMarkovProcess ContinuousTimeModelQ ContinuousWaveletData ContinuousWaveletTransform ContourDetect ContourGraphics ContourIntegral ContourLabels ContourLines ContourPlot ContourPlot3D Contours ContourShading ContourSmoothing ContourStyle ContraharmonicMean Control ControlActive ControlAlignment ControllabilityGramian ControllabilityMatrix ControllableDecomposition ControllableModelQ ControllerDuration ControllerInformation ControllerInformationData ControllerLinking ControllerManipulate ControllerMethod ControllerPath ControllerState ControlPlacement ControlsRendering ControlType Convergents ConversionOptions ConversionRules ConvertToBitmapPacket ConvertToPostScript ConvertToPostScriptPacket Convolve ConwayGroupCo1 ConwayGroupCo2 ConwayGroupCo3 CoordinateChartData CoordinatesToolOptions CoordinateTransform CoordinateTransformData CoprimeQ Coproduct CopulaDistribution Copyable CopyDirectory CopyFile CopyTag CopyToClipboard CornerFilter CornerNeighbors Correlation CorrelationDistance CorrelationFunction CorrelationTest Cos Cosh CoshIntegral CosineDistance CosineWindow CosIntegral Cot Coth Count CounterAssignments CounterBox CounterBoxOptions CounterClockwiseContourIntegral CounterEvaluator CounterFunction CounterIncrements CounterStyle CounterStyleMenuListing CountRoots CountryData Covariance CovarianceEstimatorFunction CovarianceFunction CoxianDistribution CoxIngersollRossProcess CoxModel CoxModelFit CramerVonMisesTest CreateArchive CreateDialog CreateDirectory CreateDocument CreateIntermediateDirectories CreatePalette CreatePalettePacket CreateScheduledTask CreateTemporary CreateWindow CriticalityFailureImportance CriticalitySuccessImportance CriticalSection Cross CrossingDetect CrossMatrix Csc Csch CubeRoot Cubics Cuboid CuboidBox Cumulant CumulantGeneratingFunction Cup CupCap Curl CurlyDoubleQuote CurlyQuote CurrentImage CurrentlySpeakingPacket CurrentValue CurvatureFlowFilter CurveClosed Cyan CycleGraph CycleIndexPolynomial Cycles CyclicGroup Cyclotomic Cylinder CylinderBox CylindricalDecomposition D DagumDistribution DamerauLevenshteinDistance DampingFactor Darker Dashed Dashing DataCompression DataDistribution DataRange DataReversed Date DateDelimiters DateDifference DateFunction DateList DateListLogPlot DateListPlot DatePattern DatePlus DateRange DateString DateTicksFormat DaubechiesWavelet DavisDistribution DawsonF DayCount DayCountConvention DayMatchQ DayName DayPlus DayRange DayRound DeBruijnGraph Debug DebugTag Decimal DeclareKnownSymbols DeclarePackage Decompose Decrement DedekindEta Default DefaultAxesStyle DefaultBaseStyle DefaultBoxStyle DefaultButton DefaultColor DefaultControlPlacement DefaultDuplicateCellStyle DefaultDuration DefaultElement DefaultFaceGridsStyle DefaultFieldHintStyle DefaultFont DefaultFontProperties DefaultFormatType DefaultFormatTypeForStyle DefaultFrameStyle DefaultFrameTicksStyle DefaultGridLinesStyle DefaultInlineFormatType DefaultInputFormatType DefaultLabelStyle DefaultMenuStyle DefaultNaturalLanguage DefaultNewCellStyle DefaultNewInlineCellStyle DefaultNotebook DefaultOptions DefaultOutputFormatType DefaultStyle DefaultStyleDefinitions DefaultTextFormatType DefaultTextInlineFormatType DefaultTicksStyle DefaultTooltipStyle DefaultValues Defer DefineExternal DefineInputStreamMethod DefineOutputStreamMethod Definition Degree DegreeCentrality DegreeGraphDistribution DegreeLexicographic DegreeReverseLexicographic Deinitialization Del Deletable Delete DeleteBorderComponents DeleteCases DeleteContents DeleteDirectory DeleteDuplicates DeleteFile DeleteSmallComponents DeleteWithContents DeletionWarning Delimiter DelimiterFlashTime DelimiterMatching Delimiters Denominator DensityGraphics DensityHistogram DensityPlot DependentVariables Deploy Deployed Depth DepthFirstScan Derivative DerivativeFilter DescriptorStateSpace DesignMatrix Det DGaussianWavelet DiacriticalPositioning Diagonal DiagonalMatrix Dialog DialogIndent DialogInput DialogLevel DialogNotebook DialogProlog DialogReturn DialogSymbols Diamond DiamondMatrix DiceDissimilarity DictionaryLookup DifferenceDelta DifferenceOrder DifferenceRoot DifferenceRootReduce Differences DifferentialD DifferentialRoot DifferentialRootReduce DifferentiatorFilter DigitBlock DigitBlockMinimum DigitCharacter DigitCount DigitQ DihedralGroup Dilation Dimensions DiracComb DiracDelta DirectedEdge DirectedEdges DirectedGraph DirectedGraphQ DirectedInfinity Direction Directive Directory DirectoryName DirectoryQ DirectoryStack DirichletCharacter DirichletConvolve DirichletDistribution DirichletL DirichletTransform DirichletWindow DisableConsolePrintPacket DiscreteChirpZTransform DiscreteConvolve DiscreteDelta DiscreteHadamardTransform DiscreteIndicator DiscreteLQEstimatorGains DiscreteLQRegulatorGains DiscreteLyapunovSolve DiscreteMarkovProcess DiscretePlot DiscretePlot3D DiscreteRatio DiscreteRiccatiSolve DiscreteShift DiscreteTimeModelQ DiscreteUniformDistribution DiscreteVariables DiscreteWaveletData DiscreteWaveletPacketTransform DiscreteWaveletTransform Discriminant Disjunction Disk DiskBox DiskMatrix Dispatch DispersionEstimatorFunction Display DisplayAllSteps DisplayEndPacket DisplayFlushImagePacket DisplayForm DisplayFunction DisplayPacket DisplayRules DisplaySetSizePacket DisplayString DisplayTemporary DisplayWith DisplayWithRef DisplayWithVariable DistanceFunction DistanceTransform Distribute Distributed DistributedContexts DistributeDefinitions DistributionChart DistributionDomain DistributionFitTest DistributionParameterAssumptions DistributionParameterQ Dithering Div Divergence Divide DivideBy Dividers Divisible Divisors DivisorSigma DivisorSum DMSList DMSString Do DockedCells DocumentNotebook DominantColors DOSTextFormat Dot DotDashed DotEqual Dotted DoubleBracketingBar DoubleContourIntegral DoubleDownArrow DoubleLeftArrow DoubleLeftRightArrow DoubleLeftTee DoubleLongLeftArrow DoubleLongLeftRightArrow DoubleLongRightArrow DoubleRightArrow DoubleRightTee DoubleUpArrow DoubleUpDownArrow DoubleVerticalBar DoublyInfinite Down DownArrow DownArrowBar DownArrowUpArrow DownLeftRightVector DownLeftTeeVector DownLeftVector DownLeftVectorBar DownRightTeeVector DownRightVector DownRightVectorBar Downsample DownTee DownTeeArrow DownValues DragAndDrop DrawEdges DrawFrontFaces DrawHighlighted Drop DSolve Dt DualLinearProgramming DualSystemsModel DumpGet DumpSave DuplicateFreeQ Dynamic DynamicBox DynamicBoxOptions DynamicEvaluationTimeout DynamicLocation DynamicModule DynamicModuleBox DynamicModuleBoxOptions DynamicModuleParent DynamicModuleValues DynamicName DynamicNamespace DynamicReference DynamicSetting DynamicUpdating DynamicWrapper DynamicWrapperBox DynamicWrapperBoxOptions E EccentricityCentrality EdgeAdd EdgeBetweennessCentrality EdgeCapacity EdgeCapForm EdgeColor EdgeConnectivity EdgeCost EdgeCount EdgeCoverQ EdgeDashing EdgeDelete EdgeDetect EdgeForm EdgeIndex EdgeJoinForm EdgeLabeling EdgeLabels EdgeLabelStyle EdgeList EdgeOpacity EdgeQ EdgeRenderingFunction EdgeRules EdgeShapeFunction EdgeStyle EdgeThickness EdgeWeight Editable EditButtonSettings EditCellTagsSettings EditDistance EffectiveInterest Eigensystem Eigenvalues EigenvectorCentrality Eigenvectors Element ElementData Eliminate EliminationOrder EllipticE EllipticExp EllipticExpPrime EllipticF EllipticFilterModel EllipticK EllipticLog EllipticNomeQ EllipticPi EllipticReducedHalfPeriods EllipticTheta EllipticThetaPrime EmitSound EmphasizeSyntaxErrors EmpiricalDistribution Empty EmptyGraphQ EnableConsolePrintPacket Enabled Encode End EndAdd EndDialogPacket EndFrontEndInteractionPacket EndOfFile EndOfLine EndOfString EndPackage EngineeringForm Enter EnterExpressionPacket EnterTextPacket Entropy EntropyFilter Environment Epilog Equal EqualColumns EqualRows EqualTilde EquatedTo Equilibrium EquirippleFilterKernel Equivalent Erf Erfc Erfi ErlangB ErlangC ErlangDistribution Erosion ErrorBox ErrorBoxOptions ErrorNorm ErrorPacket ErrorsDialogSettings EstimatedDistribution EstimatedProcess EstimatorGains EstimatorRegulator EuclideanDistance EulerE EulerGamma EulerianGraphQ EulerPhi Evaluatable Evaluate Evaluated EvaluatePacket EvaluationCell EvaluationCompletionAction EvaluationElements EvaluationMode EvaluationMonitor EvaluationNotebook EvaluationObject EvaluationOrder Evaluator EvaluatorNames EvenQ EventData EventEvaluator EventHandler EventHandlerTag EventLabels ExactBlackmanWindow ExactNumberQ ExactRootIsolation ExampleData Except ExcludedForms ExcludePods Exclusions ExclusionsStyle Exists Exit ExitDialog Exp Expand ExpandAll ExpandDenominator ExpandFileName ExpandNumerator Expectation ExpectationE ExpectedValue ExpGammaDistribution ExpIntegralE ExpIntegralEi Exponent ExponentFunction ExponentialDistribution ExponentialFamily ExponentialGeneratingFunction ExponentialMovingAverage ExponentialPowerDistribution ExponentPosition ExponentStep Export ExportAutoReplacements ExportPacket ExportString Expression ExpressionCell ExpressionPacket ExpToTrig ExtendedGCD Extension ExtentElementFunction ExtentMarkers ExtentSize ExternalCall ExternalDataCharacterEncoding Extract ExtractArchive ExtremeValueDistribution FaceForm FaceGrids FaceGridsStyle Factor FactorComplete Factorial Factorial2 FactorialMoment FactorialMomentGeneratingFunction FactorialPower FactorInteger FactorList FactorSquareFree FactorSquareFreeList FactorTerms FactorTermsList Fail FailureDistribution False FARIMAProcess FEDisableConsolePrintPacket FeedbackSector FeedbackSectorStyle FeedbackType FEEnableConsolePrintPacket Fibonacci FieldHint FieldHintStyle FieldMasked FieldSize File FileBaseName FileByteCount FileDate FileExistsQ FileExtension FileFormat FileHash FileInformation FileName FileNameDepth FileNameDialogSettings FileNameDrop FileNameJoin FileNames FileNameSetter FileNameSplit FileNameTake FilePrint FileType FilledCurve FilledCurveBox Filling FillingStyle FillingTransform FilterRules FinancialBond FinancialData FinancialDerivative FinancialIndicator Find FindArgMax FindArgMin FindClique FindClusters FindCurvePath FindDistributionParameters FindDivisions FindEdgeCover FindEdgeCut FindEulerianCycle FindFaces FindFile FindFit FindGeneratingFunction FindGeoLocation FindGeometricTransform FindGraphCommunities FindGraphIsomorphism FindGraphPartition FindHamiltonianCycle FindIndependentEdgeSet FindIndependentVertexSet FindInstance FindIntegerNullVector FindKClan FindKClique FindKClub FindKPlex FindLibrary FindLinearRecurrence FindList FindMaximum FindMaximumFlow FindMaxValue FindMinimum FindMinimumCostFlow FindMinimumCut FindMinValue FindPermutation FindPostmanTour FindProcessParameters FindRoot FindSequenceFunction FindSettings FindShortestPath FindShortestTour FindThreshold FindVertexCover FindVertexCut Fine FinishDynamic FiniteAbelianGroupCount FiniteGroupCount FiniteGroupData First FirstPassageTimeDistribution FischerGroupFi22 FischerGroupFi23 FischerGroupFi24Prime FisherHypergeometricDistribution FisherRatioTest FisherZDistribution Fit FitAll FittedModel FixedPoint FixedPointList FlashSelection Flat Flatten FlattenAt FlatTopWindow FlipView Floor FlushPrintOutputPacket Fold FoldList Font FontColor FontFamily FontForm FontName FontOpacity FontPostScriptName FontProperties FontReencoding FontSize FontSlant FontSubstitutions FontTracking FontVariations FontWeight For ForAll Format FormatRules FormatType FormatTypeAutoConvert FormatValues FormBox FormBoxOptions FortranForm Forward ForwardBackward Fourier FourierCoefficient FourierCosCoefficient FourierCosSeries FourierCosTransform FourierDCT FourierDCTFilter FourierDCTMatrix FourierDST FourierDSTMatrix FourierMatrix FourierParameters FourierSequenceTransform FourierSeries FourierSinCoefficient FourierSinSeries FourierSinTransform FourierTransform FourierTrigSeries FractionalBrownianMotionProcess FractionalPart FractionBox FractionBoxOptions FractionLine Frame FrameBox FrameBoxOptions Framed FrameInset FrameLabel Frameless FrameMargins FrameStyle FrameTicks FrameTicksStyle FRatioDistribution FrechetDistribution FreeQ FrequencySamplingFilterKernel FresnelC FresnelS Friday FrobeniusNumber FrobeniusSolve FromCharacterCode FromCoefficientRules FromContinuedFraction FromDate FromDigits FromDMS Front FrontEndDynamicExpression FrontEndEventActions FrontEndExecute FrontEndObject FrontEndResource FrontEndResourceString FrontEndStackSize FrontEndToken FrontEndTokenExecute FrontEndValueCache FrontEndVersion FrontFaceColor FrontFaceOpacity Full FullAxes FullDefinition FullForm FullGraphics FullOptions FullSimplify Function FunctionExpand FunctionInterpolation FunctionSpace FussellVeselyImportance GaborFilter GaborMatrix GaborWavelet GainMargins GainPhaseMargins Gamma GammaDistribution GammaRegularized GapPenalty Gather GatherBy GaugeFaceElementFunction GaugeFaceStyle GaugeFrameElementFunction GaugeFrameSize GaugeFrameStyle GaugeLabels GaugeMarkers GaugeStyle GaussianFilter GaussianIntegers GaussianMatrix GaussianWindow GCD GegenbauerC General GeneralizedLinearModelFit GenerateConditions GeneratedCell GeneratedParameters GeneratingFunction Generic GenericCylindricalDecomposition GenomeData GenomeLookup GeodesicClosing GeodesicDilation GeodesicErosion GeodesicOpening GeoDestination GeodesyData GeoDirection GeoDistance GeoGridPosition GeometricBrownianMotionProcess GeometricDistribution GeometricMean GeometricMeanFilter GeometricTransformation GeometricTransformation3DBox GeometricTransformation3DBoxOptions GeometricTransformationBox GeometricTransformationBoxOptions GeoPosition GeoPositionENU GeoPositionXYZ GeoProjectionData GestureHandler GestureHandlerTag Get GetBoundingBoxSizePacket GetContext GetEnvironment GetFileName GetFrontEndOptionsDataPacket GetLinebreakInformationPacket GetMenusPacket GetPageBreakInformationPacket Glaisher GlobalClusteringCoefficient GlobalPreferences GlobalSession Glow GoldenRatio GompertzMakehamDistribution GoodmanKruskalGamma GoodmanKruskalGammaTest Goto Grad Gradient GradientFilter GradientOrientationFilter Graph GraphAssortativity GraphCenter GraphComplement GraphData GraphDensity GraphDiameter GraphDifference GraphDisjointUnion GraphDistance GraphDistanceMatrix GraphElementData GraphEmbedding GraphHighlight GraphHighlightStyle GraphHub Graphics Graphics3D Graphics3DBox Graphics3DBoxOptions GraphicsArray GraphicsBaseline GraphicsBox GraphicsBoxOptions GraphicsColor GraphicsColumn GraphicsComplex GraphicsComplex3DBox GraphicsComplex3DBoxOptions GraphicsComplexBox GraphicsComplexBoxOptions GraphicsContents GraphicsData GraphicsGrid GraphicsGridBox GraphicsGroup GraphicsGroup3DBox GraphicsGroup3DBoxOptions GraphicsGroupBox GraphicsGroupBoxOptions GraphicsGrouping GraphicsHighlightColor GraphicsRow GraphicsSpacing GraphicsStyle GraphIntersection GraphLayout GraphLinkEfficiency GraphPeriphery GraphPlot GraphPlot3D GraphPower GraphPropertyDistribution GraphQ GraphRadius GraphReciprocity GraphRoot GraphStyle GraphUnion Gray GrayLevel GreatCircleDistance Greater GreaterEqual GreaterEqualLess GreaterFullEqual GreaterGreater GreaterLess GreaterSlantEqual GreaterTilde Green Grid GridBaseline GridBox GridBoxAlignment GridBoxBackground GridBoxDividers GridBoxFrame GridBoxItemSize GridBoxItemStyle GridBoxOptions GridBoxSpacings GridCreationSettings GridDefaultElement GridElementStyleOptions GridFrame GridFrameMargins GridGraph GridLines GridLinesStyle GroebnerBasis GroupActionBase GroupCentralizer GroupElementFromWord GroupElementPosition GroupElementQ GroupElements GroupElementToWord GroupGenerators GroupMultiplicationTable GroupOrbits GroupOrder GroupPageBreakWithin GroupSetwiseStabilizer GroupStabilizer GroupStabilizerChain Gudermannian GumbelDistribution HaarWavelet HadamardMatrix HalfNormalDistribution HamiltonianGraphQ HammingDistance HammingWindow HankelH1 HankelH2 HankelMatrix HannPoissonWindow HannWindow HaradaNortonGroupHN HararyGraph HarmonicMean HarmonicMeanFilter HarmonicNumber Hash HashTable Haversine HazardFunction Head HeadCompose Heads HeavisideLambda HeavisidePi HeavisideTheta HeldGroupHe HeldPart HelpBrowserLookup HelpBrowserNotebook HelpBrowserSettings HermiteDecomposition HermiteH HermitianMatrixQ HessenbergDecomposition Hessian HexadecimalCharacter Hexahedron HexahedronBox HexahedronBoxOptions HiddenSurface HighlightGraph HighlightImage HighpassFilter HigmanSimsGroupHS HilbertFilter HilbertMatrix Histogram Histogram3D HistogramDistribution HistogramList HistogramTransform HistogramTransformInterpolation HitMissTransform HITSCentrality HodgeDual HoeffdingD HoeffdingDTest Hold HoldAll HoldAllComplete HoldComplete HoldFirst HoldForm HoldPattern HoldRest HolidayCalendar HomeDirectory HomePage Horizontal HorizontalForm HorizontalGauge HorizontalScrollPosition HornerForm HotellingTSquareDistribution HoytDistribution HTMLSave Hue HumpDownHump HumpEqual HurwitzLerchPhi HurwitzZeta HyperbolicDistribution HypercubeGraph HyperexponentialDistribution Hyperfactorial Hypergeometric0F1 Hypergeometric0F1Regularized Hypergeometric1F1 Hypergeometric1F1Regularized Hypergeometric2F1 Hypergeometric2F1Regularized HypergeometricDistribution HypergeometricPFQ HypergeometricPFQRegularized HypergeometricU Hyperlink HyperlinkCreationSettings Hyphenation HyphenationOptions HypoexponentialDistribution HypothesisTestData I Identity IdentityMatrix If IgnoreCase Im Image Image3D Image3DSlices ImageAccumulate ImageAdd ImageAdjust ImageAlign ImageApply ImageAspectRatio ImageAssemble ImageCache ImageCacheValid ImageCapture ImageChannels ImageClip ImageColorSpace ImageCompose ImageConvolve ImageCooccurrence ImageCorners ImageCorrelate ImageCorrespondingPoints ImageCrop ImageData ImageDataPacket ImageDeconvolve ImageDemosaic ImageDifference ImageDimensions ImageDistance ImageEffect ImageFeatureTrack ImageFileApply ImageFileFilter ImageFileScan ImageFilter ImageForestingComponents ImageForwardTransformation ImageHistogram ImageKeypoints ImageLevels ImageLines ImageMargins ImageMarkers ImageMeasurements ImageMultiply ImageOffset ImagePad ImagePadding ImagePartition ImagePeriodogram ImagePerspectiveTransformation ImageQ ImageRangeCache ImageReflect ImageRegion ImageResize ImageResolution ImageRotate ImageRotated ImageScaled ImageScan ImageSize ImageSizeAction ImageSizeCache ImageSizeMultipliers ImageSizeRaw ImageSubtract ImageTake ImageTransformation ImageTrim ImageType ImageValue ImageValuePositions Implies Import ImportAutoReplacements ImportString ImprovementImportance In IncidenceGraph IncidenceList IncidenceMatrix IncludeConstantBasis IncludeFileExtension IncludePods IncludeSingularTerm Increment Indent IndentingNewlineSpacings IndentMaxFraction IndependenceTest IndependentEdgeSetQ IndependentUnit IndependentVertexSetQ Indeterminate IndexCreationOptions Indexed IndexGraph IndexTag Inequality InexactNumberQ InexactNumbers Infinity Infix Information Inherited InheritScope Initialization InitializationCell InitializationCellEvaluation InitializationCellWarning InlineCounterAssignments InlineCounterIncrements InlineRules Inner Inpaint Input InputAliases InputAssumptions InputAutoReplacements InputField InputFieldBox InputFieldBoxOptions InputForm InputGrouping InputNamePacket InputNotebook InputPacket InputSettings InputStream InputString InputStringPacket InputToBoxFormPacket Insert InsertionPointObject InsertResults Inset Inset3DBox Inset3DBoxOptions InsetBox InsetBoxOptions Install InstallService InString Integer IntegerDigits IntegerExponent IntegerLength IntegerPart IntegerPartitions IntegerQ Integers IntegerString Integral Integrate Interactive InteractiveTradingChart Interlaced Interleaving InternallyBalancedDecomposition InterpolatingFunction InterpolatingPolynomial Interpolation InterpolationOrder InterpolationPoints InterpolationPrecision Interpretation InterpretationBox InterpretationBoxOptions InterpretationFunction InterpretTemplate InterquartileRange Interrupt InterruptSettings Intersection Interval IntervalIntersection IntervalMemberQ IntervalUnion Inverse InverseBetaRegularized InverseCDF InverseChiSquareDistribution InverseContinuousWaveletTransform InverseDistanceTransform InverseEllipticNomeQ InverseErf InverseErfc InverseFourier InverseFourierCosTransform InverseFourierSequenceTransform InverseFourierSinTransform InverseFourierTransform InverseFunction InverseFunctions InverseGammaDistribution InverseGammaRegularized InverseGaussianDistribution InverseGudermannian InverseHaversine InverseJacobiCD InverseJacobiCN InverseJacobiCS InverseJacobiDC InverseJacobiDN InverseJacobiDS InverseJacobiNC InverseJacobiND InverseJacobiNS InverseJacobiSC InverseJacobiSD InverseJacobiSN InverseLaplaceTransform InversePermutation InverseRadon InverseSeries InverseSurvivalFunction InverseWaveletTransform InverseWeierstrassP InverseZTransform Invisible InvisibleApplication InvisibleTimes IrreduciblePolynomialQ IsolatingInterval IsomorphicGraphQ IsotopeData Italic Item ItemBox ItemBoxOptions ItemSize ItemStyle ItoProcess JaccardDissimilarity JacobiAmplitude Jacobian JacobiCD JacobiCN JacobiCS JacobiDC JacobiDN JacobiDS JacobiNC JacobiND JacobiNS JacobiP JacobiSC JacobiSD JacobiSN JacobiSymbol JacobiZeta JankoGroupJ1 JankoGroupJ2 JankoGroupJ3 JankoGroupJ4 JarqueBeraALMTest JohnsonDistribution Join Joined JoinedCurve JoinedCurveBox JoinForm JordanDecomposition JordanModelDecomposition K KagiChart KaiserBesselWindow KaiserWindow KalmanEstimator KalmanFilter KarhunenLoeveDecomposition KaryTree KatzCentrality KCoreComponents KDistribution KelvinBei KelvinBer KelvinKei KelvinKer KendallTau KendallTauTest KernelExecute KernelMixtureDistribution KernelObject Kernels Ket Khinchin KirchhoffGraph KirchhoffMatrix KleinInvariantJ KnightTourGraph KnotData KnownUnitQ KolmogorovSmirnovTest KroneckerDelta KroneckerModelDecomposition KroneckerProduct KroneckerSymbol KuiperTest KumaraswamyDistribution Kurtosis KuwaharaFilter Label Labeled LabeledSlider LabelingFunction LabelStyle LaguerreL LambdaComponents LambertW LanczosWindow LandauDistribution Language LanguageCategory LaplaceDistribution LaplaceTransform Laplacian LaplacianFilter LaplacianGaussianFilter Large Larger Last Latitude LatitudeLongitude LatticeData LatticeReduce Launch LaunchKernels LayeredGraphPlot LayerSizeFunction LayoutInformation LCM LeafCount LeapYearQ LeastSquares LeastSquaresFilterKernel Left LeftArrow LeftArrowBar LeftArrowRightArrow LeftDownTeeVector LeftDownVector LeftDownVectorBar LeftRightArrow LeftRightVector LeftTee LeftTeeArrow LeftTeeVector LeftTriangle LeftTriangleBar LeftTriangleEqual LeftUpDownVector LeftUpTeeVector LeftUpVector LeftUpVectorBar LeftVector LeftVectorBar LegendAppearance Legended LegendFunction LegendLabel LegendLayout LegendMargins LegendMarkers LegendMarkerSize LegendreP LegendreQ LegendreType Length LengthWhile LerchPhi Less LessEqual LessEqualGreater LessFullEqual LessGreater LessLess LessSlantEqual LessTilde LetterCharacter LetterQ Level LeveneTest LeviCivitaTensor LevyDistribution Lexicographic LibraryFunction LibraryFunctionError LibraryFunctionInformation LibraryFunctionLoad LibraryFunctionUnload LibraryLoad LibraryUnload LicenseID LiftingFilterData LiftingWaveletTransform LightBlue LightBrown LightCyan Lighter LightGray LightGreen Lighting LightingAngle LightMagenta LightOrange LightPink LightPurple LightRed LightSources LightYellow Likelihood Limit LimitsPositioning LimitsPositioningTokens LindleyDistribution Line Line3DBox LinearFilter LinearFractionalTransform LinearModelFit LinearOffsetFunction LinearProgramming LinearRecurrence LinearSolve LinearSolveFunction LineBox LineBreak LinebreakAdjustments LineBreakChart LineBreakWithin LineColor LineForm LineGraph LineIndent LineIndentMaxFraction LineIntegralConvolutionPlot LineIntegralConvolutionScale LineLegend LineOpacity LineSpacing LineWrapParts LinkActivate LinkClose LinkConnect LinkConnectedQ LinkCreate LinkError LinkFlush LinkFunction LinkHost LinkInterrupt LinkLaunch LinkMode LinkObject LinkOpen LinkOptions LinkPatterns LinkProtocol LinkRead LinkReadHeld LinkReadyQ Links LinkWrite LinkWriteHeld LiouvilleLambda List Listable ListAnimate ListContourPlot ListContourPlot3D ListConvolve ListCorrelate ListCurvePathPlot ListDeconvolve ListDensityPlot Listen ListFourierSequenceTransform ListInterpolation ListLineIntegralConvolutionPlot ListLinePlot ListLogLinearPlot ListLogLogPlot ListLogPlot ListPicker ListPickerBox ListPickerBoxBackground ListPickerBoxOptions ListPlay ListPlot ListPlot3D ListPointPlot3D ListPolarPlot ListQ ListStreamDensityPlot ListStreamPlot ListSurfacePlot3D ListVectorDensityPlot ListVectorPlot ListVectorPlot3D ListZTransform Literal LiteralSearch LocalClusteringCoefficient LocalizeVariables LocationEquivalenceTest LocationTest Locator LocatorAutoCreate LocatorBox LocatorBoxOptions LocatorCentering LocatorPane LocatorPaneBox LocatorPaneBoxOptions LocatorRegion Locked Log Log10 Log2 LogBarnesG LogGamma LogGammaDistribution LogicalExpand LogIntegral LogisticDistribution LogitModelFit LogLikelihood LogLinearPlot LogLogisticDistribution LogLogPlot LogMultinormalDistribution LogNormalDistribution LogPlot LogRankTest LogSeriesDistribution LongEqual Longest LongestAscendingSequence LongestCommonSequence LongestCommonSequencePositions LongestCommonSubsequence LongestCommonSubsequencePositions LongestMatch LongForm Longitude LongLeftArrow LongLeftRightArrow LongRightArrow Loopback LoopFreeGraphQ LowerCaseQ LowerLeftArrow LowerRightArrow LowerTriangularize LowpassFilter LQEstimatorGains LQGRegulator LQOutputRegulatorGains LQRegulatorGains LUBackSubstitution LucasL LuccioSamiComponents LUDecomposition LyapunovSolve LyonsGroupLy MachineID MachineName MachineNumberQ MachinePrecision MacintoshSystemPageSetup Magenta Magnification Magnify MainSolve MaintainDynamicCaches Majority MakeBoxes MakeExpression MakeRules MangoldtLambda ManhattanDistance Manipulate Manipulator MannWhitneyTest MantissaExponent Manual Map MapAll MapAt MapIndexed MAProcess MapThread MarcumQ MardiaCombinedTest MardiaKurtosisTest MardiaSkewnessTest MarginalDistribution MarkovProcessProperties Masking MatchingDissimilarity MatchLocalNameQ MatchLocalNames MatchQ Material MathematicaNotation MathieuC MathieuCharacteristicA MathieuCharacteristicB MathieuCharacteristicExponent MathieuCPrime MathieuGroupM11 MathieuGroupM12 MathieuGroupM22 MathieuGroupM23 MathieuGroupM24 MathieuS MathieuSPrime MathMLForm MathMLText Matrices MatrixExp MatrixForm MatrixFunction MatrixLog MatrixPlot MatrixPower MatrixQ MatrixRank Max MaxBend MaxDetect MaxExtraBandwidths MaxExtraConditions MaxFeatures MaxFilter Maximize MaxIterations MaxMemoryUsed MaxMixtureKernels MaxPlotPoints MaxPoints MaxRecursion MaxStableDistribution MaxStepFraction MaxSteps MaxStepSize MaxValue MaxwellDistribution McLaughlinGroupMcL Mean MeanClusteringCoefficient MeanDegreeConnectivity MeanDeviation MeanFilter MeanGraphDistance MeanNeighborDegree MeanShift MeanShiftFilter Median MedianDeviation MedianFilter Medium MeijerG MeixnerDistribution MemberQ MemoryConstrained MemoryInUse Menu MenuAppearance MenuCommandKey MenuEvaluator MenuItem MenuPacket MenuSortingValue MenuStyle MenuView MergeDifferences Mesh MeshFunctions MeshRange MeshShading MeshStyle Message MessageDialog MessageList MessageName MessageOptions MessagePacket Messages MessagesNotebook MetaCharacters MetaInformation Method MethodOptions MexicanHatWavelet MeyerWavelet Min MinDetect MinFilter MinimalPolynomial MinimalStateSpaceModel Minimize Minors MinRecursion MinSize MinStableDistribution Minus MinusPlus MinValue Missing MissingDataMethod MittagLefflerE MixedRadix MixedRadixQuantity MixtureDistribution Mod Modal Mode Modular ModularLambda Module Modulus MoebiusMu Moment Momentary MomentConvert MomentEvaluate MomentGeneratingFunction Monday Monitor MonomialList MonomialOrder MonsterGroupM MorletWavelet MorphologicalBinarize MorphologicalBranchPoints MorphologicalComponents MorphologicalEulerNumber MorphologicalGraph MorphologicalPerimeter MorphologicalTransform Most MouseAnnotation MouseAppearance MouseAppearanceTag MouseButtons Mouseover MousePointerNote MousePosition MovingAverage MovingMedian MoyalDistribution MultiedgeStyle MultilaunchWarning MultiLetterItalics MultiLetterStyle MultilineFunction Multinomial MultinomialDistribution MultinormalDistribution MultiplicativeOrder Multiplicity Multiselection MultivariateHypergeometricDistribution MultivariatePoissonDistribution MultivariateTDistribution N NakagamiDistribution NameQ Names NamespaceBox Nand NArgMax NArgMin NBernoulliB NCache NDSolve NDSolveValue Nearest NearestFunction NeedCurrentFrontEndPackagePacket NeedCurrentFrontEndSymbolsPacket NeedlemanWunschSimilarity Needs Negative NegativeBinomialDistribution NegativeMultinomialDistribution NeighborhoodGraph Nest NestedGreaterGreater NestedLessLess NestedScriptRules NestList NestWhile NestWhileList NevilleThetaC NevilleThetaD NevilleThetaN NevilleThetaS NewPrimitiveStyle NExpectation Next NextPrime NHoldAll NHoldFirst NHoldRest NicholsGridLines NicholsPlot NIntegrate NMaximize NMaxValue NMinimize NMinValue NominalVariables NonAssociative NoncentralBetaDistribution NoncentralChiSquareDistribution NoncentralFRatioDistribution NoncentralStudentTDistribution NonCommutativeMultiply NonConstants None NonlinearModelFit NonlocalMeansFilter NonNegative NonPositive Nor NorlundB Norm Normal NormalDistribution NormalGrouping Normalize NormalizedSquaredEuclideanDistance NormalsFunction NormFunction Not NotCongruent NotCupCap NotDoubleVerticalBar Notebook NotebookApply NotebookAutoSave NotebookClose NotebookConvertSettings NotebookCreate NotebookCreateReturnObject NotebookDefault NotebookDelete NotebookDirectory NotebookDynamicExpression NotebookEvaluate NotebookEventActions NotebookFileName NotebookFind NotebookFindReturnObject NotebookGet NotebookGetLayoutInformationPacket NotebookGetMisspellingsPacket NotebookInformation NotebookInterfaceObject NotebookLocate NotebookObject NotebookOpen NotebookOpenReturnObject NotebookPath NotebookPrint NotebookPut NotebookPutReturnObject NotebookRead NotebookResetGeneratedCells Notebooks NotebookSave NotebookSaveAs NotebookSelection NotebookSetupLayoutInformationPacket NotebooksMenu NotebookWrite NotElement NotEqualTilde NotExists NotGreater NotGreaterEqual NotGreaterFullEqual NotGreaterGreater NotGreaterLess NotGreaterSlantEqual NotGreaterTilde NotHumpDownHump NotHumpEqual NotLeftTriangle NotLeftTriangleBar NotLeftTriangleEqual NotLess NotLessEqual NotLessFullEqual NotLessGreater NotLessLess NotLessSlantEqual NotLessTilde NotNestedGreaterGreater NotNestedLessLess NotPrecedes NotPrecedesEqual NotPrecedesSlantEqual NotPrecedesTilde NotReverseElement NotRightTriangle NotRightTriangleBar NotRightTriangleEqual NotSquareSubset NotSquareSubsetEqual NotSquareSuperset NotSquareSupersetEqual NotSubset NotSubsetEqual NotSucceeds NotSucceedsEqual NotSucceedsSlantEqual NotSucceedsTilde NotSuperset NotSupersetEqual NotTilde NotTildeEqual NotTildeFullEqual NotTildeTilde NotVerticalBar NProbability NProduct NProductFactors NRoots NSolve NSum NSumTerms Null NullRecords NullSpace NullWords Number NumberFieldClassNumber NumberFieldDiscriminant NumberFieldFundamentalUnits NumberFieldIntegralBasis NumberFieldNormRepresentatives NumberFieldRegulator NumberFieldRootsOfUnity NumberFieldSignature NumberForm NumberFormat NumberMarks NumberMultiplier NumberPadding NumberPoint NumberQ NumberSeparator NumberSigns NumberString Numerator NumericFunction NumericQ NuttallWindow NValues NyquistGridLines NyquistPlot O ObservabilityGramian ObservabilityMatrix ObservableDecomposition ObservableModelQ OddQ Off Offset OLEData On ONanGroupON OneIdentity Opacity Open OpenAppend Opener OpenerBox OpenerBoxOptions OpenerView OpenFunctionInspectorPacket Opening OpenRead OpenSpecialOptions OpenTemporary OpenWrite Operate OperatingSystem OptimumFlowData Optional OptionInspectorSettings OptionQ Options OptionsPacket OptionsPattern OptionValue OptionValueBox OptionValueBoxOptions Or Orange Order OrderDistribution OrderedQ Ordering Orderless OrnsteinUhlenbeckProcess Orthogonalize Out Outer OutputAutoOverwrite OutputControllabilityMatrix OutputControllableModelQ OutputForm OutputFormData OutputGrouping OutputMathEditExpression OutputNamePacket OutputResponse OutputSizeLimit OutputStream Over OverBar OverDot Overflow OverHat Overlaps Overlay OverlayBox OverlayBoxOptions Overscript OverscriptBox OverscriptBoxOptions OverTilde OverVector OwenT OwnValues PackingMethod PaddedForm Padding PadeApproximant PadLeft PadRight PageBreakAbove PageBreakBelow PageBreakWithin PageFooterLines PageFooters PageHeaderLines PageHeaders PageHeight PageRankCentrality PageWidth PairedBarChart PairedHistogram PairedSmoothHistogram PairedTTest PairedZTest PaletteNotebook PalettePath Pane PaneBox PaneBoxOptions Panel PanelBox PanelBoxOptions Paneled PaneSelector PaneSelectorBox PaneSelectorBoxOptions PaperWidth ParabolicCylinderD ParagraphIndent ParagraphSpacing ParallelArray ParallelCombine ParallelDo ParallelEvaluate Parallelization Parallelize ParallelMap ParallelNeeds ParallelProduct ParallelSubmit ParallelSum ParallelTable ParallelTry Parameter ParameterEstimator ParameterMixtureDistribution ParameterVariables ParametricFunction ParametricNDSolve ParametricNDSolveValue ParametricPlot ParametricPlot3D ParentConnect ParentDirectory ParentForm Parenthesize ParentList ParetoDistribution Part PartialCorrelationFunction PartialD ParticleData Partition PartitionsP PartitionsQ ParzenWindow PascalDistribution PassEventsDown PassEventsUp Paste PasteBoxFormInlineCells PasteButton Path PathGraph PathGraphQ Pattern PatternSequence PatternTest PauliMatrix PaulWavelet Pause PausedTime PDF PearsonChiSquareTest PearsonCorrelationTest PearsonDistribution PerformanceGoal PeriodicInterpolation Periodogram PeriodogramArray PermutationCycles PermutationCyclesQ PermutationGroup PermutationLength PermutationList PermutationListQ PermutationMax PermutationMin PermutationOrder PermutationPower PermutationProduct PermutationReplace Permutations PermutationSupport Permute PeronaMalikFilter Perpendicular PERTDistribution PetersenGraph PhaseMargins Pi Pick PIDData PIDDerivativeFilter PIDFeedforward PIDTune Piecewise PiecewiseExpand PieChart PieChart3D PillaiTrace PillaiTraceTest Pink Pivoting PixelConstrained PixelValue PixelValuePositions Placed Placeholder PlaceholderReplace Plain PlanarGraphQ Play PlayRange Plot Plot3D Plot3Matrix PlotDivision PlotJoined PlotLabel PlotLayout PlotLegends PlotMarkers PlotPoints PlotRange PlotRangeClipping PlotRangePadding PlotRegion PlotStyle Plus PlusMinus Pochhammer PodStates PodWidth Point Point3DBox PointBox PointFigureChart PointForm PointLegend PointSize PoissonConsulDistribution PoissonDistribution PoissonProcess PoissonWindow PolarAxes PolarAxesOrigin PolarGridLines PolarPlot PolarTicks PoleZeroMarkers PolyaAeppliDistribution PolyGamma Polygon Polygon3DBox Polygon3DBoxOptions PolygonBox PolygonBoxOptions PolygonHoleScale PolygonIntersections PolygonScale PolyhedronData PolyLog PolynomialExtendedGCD PolynomialForm PolynomialGCD PolynomialLCM PolynomialMod PolynomialQ PolynomialQuotient PolynomialQuotientRemainder PolynomialReduce PolynomialRemainder Polynomials PopupMenu PopupMenuBox PopupMenuBoxOptions PopupView PopupWindow Position Positive PositiveDefiniteMatrixQ PossibleZeroQ Postfix PostScript Power PowerDistribution PowerExpand PowerMod PowerModList PowerSpectralDensity PowersRepresentations PowerSymmetricPolynomial Precedence PrecedenceForm Precedes PrecedesEqual PrecedesSlantEqual PrecedesTilde Precision PrecisionGoal PreDecrement PredictionRoot PreemptProtect PreferencesPath Prefix PreIncrement Prepend PrependTo PreserveImageOptions Previous PriceGraphDistribution PrimaryPlaceholder Prime PrimeNu PrimeOmega PrimePi PrimePowerQ PrimeQ Primes PrimeZetaP PrimitiveRoot PrincipalComponents PrincipalValue Print PrintAction PrintForm PrintingCopies PrintingOptions PrintingPageRange PrintingStartingPageNumber PrintingStyleEnvironment PrintPrecision PrintTemporary Prism PrismBox PrismBoxOptions PrivateCellOptions PrivateEvaluationOptions PrivateFontOptions PrivateFrontEndOptions PrivateNotebookOptions PrivatePaths Probability ProbabilityDistribution ProbabilityPlot ProbabilityPr ProbabilityScalePlot ProbitModelFit ProcessEstimator ProcessParameterAssumptions ProcessParameterQ ProcessStateDomain ProcessTimeDomain Product ProductDistribution ProductLog ProgressIndicator ProgressIndicatorBox ProgressIndicatorBoxOptions Projection Prolog PromptForm Properties Property PropertyList PropertyValue Proportion Proportional Protect Protected ProteinData Pruning PseudoInverse Purple Put PutAppend Pyramid PyramidBox PyramidBoxOptions QBinomial QFactorial QGamma QHypergeometricPFQ QPochhammer QPolyGamma QRDecomposition QuadraticIrrationalQ Quantile QuantilePlot Quantity QuantityForm QuantityMagnitude QuantityQ QuantityUnit Quartics QuartileDeviation Quartiles QuartileSkewness QueueingNetworkProcess QueueingProcess QueueProperties Quiet Quit Quotient QuotientRemainder RadialityCentrality RadicalBox RadicalBoxOptions RadioButton RadioButtonBar RadioButtonBox RadioButtonBoxOptions Radon RamanujanTau RamanujanTauL RamanujanTauTheta RamanujanTauZ Random RandomChoice RandomComplex RandomFunction RandomGraph RandomImage RandomInteger RandomPermutation RandomPrime RandomReal RandomSample RandomSeed RandomVariate RandomWalkProcess Range RangeFilter RangeSpecification RankedMax RankedMin Raster Raster3D Raster3DBox Raster3DBoxOptions RasterArray RasterBox RasterBoxOptions Rasterize RasterSize Rational RationalFunctions Rationalize Rationals Ratios Raw RawArray RawBoxes RawData RawMedium RayleighDistribution Re Read ReadList ReadProtected Real RealBlockDiagonalForm RealDigits RealExponent Reals Reap Record RecordLists RecordSeparators Rectangle RectangleBox RectangleBoxOptions RectangleChart RectangleChart3D RecurrenceFilter RecurrenceTable RecurringDigitsForm Red Reduce RefBox ReferenceLineStyle ReferenceMarkers ReferenceMarkerStyle Refine ReflectionMatrix ReflectionTransform Refresh RefreshRate RegionBinarize RegionFunction RegionPlot RegionPlot3D RegularExpression Regularization Reinstall Release ReleaseHold ReliabilityDistribution ReliefImage ReliefPlot Remove RemoveAlphaChannel RemoveAsynchronousTask Removed RemoveInputStreamMethod RemoveOutputStreamMethod RemoveProperty RemoveScheduledTask RenameDirectory RenameFile RenderAll RenderingOptions RenewalProcess RenkoChart Repeated RepeatedNull RepeatedString Replace ReplaceAll ReplaceHeldPart ReplaceImageValue ReplaceList ReplacePart ReplacePixelValue ReplaceRepeated Resampling Rescale RescalingTransform ResetDirectory ResetMenusPacket ResetScheduledTask Residue Resolve Rest Resultant ResumePacket Return ReturnExpressionPacket ReturnInputFormPacket ReturnPacket ReturnTextPacket Reverse ReverseBiorthogonalSplineWavelet ReverseElement ReverseEquilibrium ReverseGraph ReverseUpEquilibrium RevolutionAxis RevolutionPlot3D RGBColor RiccatiSolve RiceDistribution RidgeFilter RiemannR RiemannSiegelTheta RiemannSiegelZ Riffle Right RightArrow RightArrowBar RightArrowLeftArrow RightCosetRepresentative RightDownTeeVector RightDownVector RightDownVectorBar RightTee RightTeeArrow RightTeeVector RightTriangle RightTriangleBar RightTriangleEqual RightUpDownVector RightUpTeeVector RightUpVector RightUpVectorBar RightVector RightVectorBar RiskAchievementImportance RiskReductionImportance RogersTanimotoDissimilarity Root RootApproximant RootIntervals RootLocusPlot RootMeanSquare RootOfUnityQ RootReduce Roots RootSum Rotate RotateLabel RotateLeft RotateRight RotationAction RotationBox RotationBoxOptions RotationMatrix RotationTransform Round RoundImplies RoundingRadius Row RowAlignments RowBackgrounds RowBox RowHeights RowLines RowMinHeight RowReduce RowsEqual RowSpacings RSolve RudvalisGroupRu Rule RuleCondition RuleDelayed RuleForm RulerUnits Run RunScheduledTask RunThrough RuntimeAttributes RuntimeOptions RussellRaoDissimilarity SameQ SameTest SampleDepth SampledSoundFunction SampledSoundList SampleRate SamplingPeriod SARIMAProcess SARMAProcess SatisfiabilityCount SatisfiabilityInstances SatisfiableQ Saturday Save Saveable SaveAutoDelete SaveDefinitions SawtoothWave Scale Scaled ScaleDivisions ScaledMousePosition ScaleOrigin ScalePadding ScaleRanges ScaleRangeStyle ScalingFunctions ScalingMatrix ScalingTransform Scan ScheduledTaskActiveQ ScheduledTaskData ScheduledTaskObject ScheduledTasks SchurDecomposition ScientificForm ScreenRectangle ScreenStyleEnvironment ScriptBaselineShifts ScriptLevel ScriptMinSize ScriptRules ScriptSizeMultipliers Scrollbars ScrollingOptions ScrollPosition Sec Sech SechDistribution SectionGrouping SectorChart SectorChart3D SectorOrigin SectorSpacing SeedRandom Select Selectable SelectComponents SelectedCells SelectedNotebook Selection SelectionAnimate SelectionCell SelectionCellCreateCell SelectionCellDefaultStyle SelectionCellParentStyle SelectionCreateCell SelectionDebuggerTag SelectionDuplicateCell SelectionEvaluate SelectionEvaluateCreateCell SelectionMove SelectionPlaceholder SelectionSetStyle SelectWithContents SelfLoops SelfLoopStyle SemialgebraicComponentInstances SendMail Sequence SequenceAlignment SequenceForm SequenceHold SequenceLimit Series SeriesCoefficient SeriesData SessionTime Set SetAccuracy SetAlphaChannel SetAttributes Setbacks SetBoxFormNamesPacket SetDelayed SetDirectory SetEnvironment SetEvaluationNotebook SetFileDate SetFileLoadingContext SetNotebookStatusLine SetOptions SetOptionsPacket SetPrecision SetProperty SetSelectedNotebook SetSharedFunction SetSharedVariable SetSpeechParametersPacket SetStreamPosition SetSystemOptions Setter SetterBar SetterBox SetterBoxOptions Setting SetValue Shading Shallow ShannonWavelet ShapiroWilkTest Share Sharpen ShearingMatrix ShearingTransform ShenCastanMatrix Short ShortDownArrow Shortest ShortestMatch ShortestPathFunction ShortLeftArrow ShortRightArrow ShortUpArrow Show ShowAutoStyles ShowCellBracket ShowCellLabel ShowCellTags ShowClosedCellArea ShowContents ShowControls ShowCursorTracker ShowGroupOpenCloseIcon ShowGroupOpener ShowInvisibleCharacters ShowPageBreaks ShowPredictiveInterface ShowSelection ShowShortBoxForm ShowSpecialCharacters ShowStringCharacters ShowSyntaxStyles ShrinkingDelay ShrinkWrapBoundingBox SiegelTheta SiegelTukeyTest Sign Signature SignedRankTest SignificanceLevel SignPadding SignTest SimilarityRules SimpleGraph SimpleGraphQ Simplify Sin Sinc SinghMaddalaDistribution SingleEvaluation SingleLetterItalics SingleLetterStyle SingularValueDecomposition SingularValueList SingularValuePlot SingularValues Sinh SinhIntegral SinIntegral SixJSymbol Skeleton SkeletonTransform SkellamDistribution Skewness SkewNormalDistribution Skip SliceDistribution Slider Slider2D Slider2DBox Slider2DBoxOptions SliderBox SliderBoxOptions SlideView Slot SlotSequence Small SmallCircle Smaller SmithDelayCompensator SmithWatermanSimilarity SmoothDensityHistogram SmoothHistogram SmoothHistogram3D SmoothKernelDistribution SocialMediaData Socket SokalSneathDissimilarity Solve SolveAlways SolveDelayed Sort SortBy Sound SoundAndGraphics SoundNote SoundVolume Sow Space SpaceForm Spacer Spacings Span SpanAdjustments SpanCharacterRounding SpanFromAbove SpanFromBoth SpanFromLeft SpanLineThickness SpanMaxSize SpanMinSize SpanningCharacters SpanSymmetric SparseArray SpatialGraphDistribution Speak SpeakTextPacket SpearmanRankTest SpearmanRho Spectrogram SpectrogramArray Specularity SpellingCorrection SpellingDictionaries SpellingDictionariesPath SpellingOptions SpellingSuggestionsPacket Sphere SphereBox SphericalBesselJ SphericalBesselY SphericalHankelH1 SphericalHankelH2 SphericalHarmonicY SphericalPlot3D SphericalRegion SpheroidalEigenvalue SpheroidalJoiningFactor SpheroidalPS SpheroidalPSPrime SpheroidalQS SpheroidalQSPrime SpheroidalRadialFactor SpheroidalS1 SpheroidalS1Prime SpheroidalS2 SpheroidalS2Prime Splice SplicedDistribution SplineClosed SplineDegree SplineKnots SplineWeights Split SplitBy SpokenString Sqrt SqrtBox SqrtBoxOptions Square SquaredEuclideanDistance SquareFreeQ SquareIntersection SquaresR SquareSubset SquareSubsetEqual SquareSuperset SquareSupersetEqual SquareUnion SquareWave StabilityMargins StabilityMarginsStyle StableDistribution Stack StackBegin StackComplete StackInhibit StandardDeviation StandardDeviationFilter StandardForm Standardize StandbyDistribution Star StarGraph StartAsynchronousTask StartingStepSize StartOfLine StartOfString StartScheduledTask StartupSound StateDimensions StateFeedbackGains StateOutputEstimator StateResponse StateSpaceModel StateSpaceRealization StateSpaceTransform StationaryDistribution StationaryWaveletPacketTransform StationaryWaveletTransform StatusArea StatusCentrality StepMonitor StieltjesGamma StirlingS1 StirlingS2 StopAsynchronousTask StopScheduledTask StrataVariables StratonovichProcess StreamColorFunction StreamColorFunctionScaling StreamDensityPlot StreamPlot StreamPoints StreamPosition Streams StreamScale StreamStyle String StringBreak StringByteCount StringCases StringCount StringDrop StringExpression StringForm StringFormat StringFreeQ StringInsert StringJoin StringLength StringMatchQ StringPosition StringQ StringReplace StringReplaceList StringReplacePart StringReverse StringRotateLeft StringRotateRight StringSkeleton StringSplit StringTake StringToStream StringTrim StripBoxes StripOnInput StripWrapperBoxes StrokeForm StructuralImportance StructuredArray StructuredSelection StruveH StruveL Stub StudentTDistribution Style StyleBox StyleBoxAutoDelete StyleBoxOptions StyleData StyleDefinitions StyleForm StyleKeyMapping StyleMenuListing StyleNameDialogSettings StyleNames StylePrint StyleSheetPath Subfactorial Subgraph SubMinus SubPlus SubresultantPolynomialRemainders SubresultantPolynomials Subresultants Subscript SubscriptBox SubscriptBoxOptions Subscripted Subset SubsetEqual Subsets SubStar Subsuperscript SubsuperscriptBox SubsuperscriptBoxOptions Subtract SubtractFrom SubValues Succeeds SucceedsEqual SucceedsSlantEqual SucceedsTilde SuchThat Sum SumConvergence Sunday SuperDagger SuperMinus SuperPlus Superscript SuperscriptBox SuperscriptBoxOptions Superset SupersetEqual SuperStar Surd SurdForm SurfaceColor SurfaceGraphics SurvivalDistribution SurvivalFunction SurvivalModel SurvivalModelFit SuspendPacket SuzukiDistribution SuzukiGroupSuz SwatchLegend Switch Symbol SymbolName SymletWavelet Symmetric SymmetricGroup SymmetricMatrixQ SymmetricPolynomial SymmetricReduction Symmetrize SymmetrizedArray SymmetrizedArrayRules SymmetrizedDependentComponents SymmetrizedIndependentComponents SymmetrizedReplacePart SynchronousInitialization SynchronousUpdating Syntax SyntaxForm SyntaxInformation SyntaxLength SyntaxPacket SyntaxQ SystemDialogInput SystemException SystemHelpPath SystemInformation SystemInformationData SystemOpen SystemOptions SystemsModelDelay SystemsModelDelayApproximate SystemsModelDelete SystemsModelDimensions SystemsModelExtract SystemsModelFeedbackConnect SystemsModelLabels SystemsModelOrder SystemsModelParallelConnect SystemsModelSeriesConnect SystemsModelStateFeedbackConnect SystemStub Tab TabFilling Table TableAlignments TableDepth TableDirections TableForm TableHeadings TableSpacing TableView TableViewBox TabSpacings TabView TabViewBox TabViewBoxOptions TagBox TagBoxNote TagBoxOptions TaggingRules TagSet TagSetDelayed TagStyle TagUnset Take TakeWhile Tally Tan Tanh TargetFunctions TargetUnits TautologyQ TelegraphProcess TemplateBox TemplateBoxOptions TemplateSlotSequence TemporalData Temporary TemporaryVariable TensorContract TensorDimensions TensorExpand TensorProduct TensorQ TensorRank TensorReduce TensorSymmetry TensorTranspose TensorWedge Tetrahedron TetrahedronBox TetrahedronBoxOptions TeXForm TeXSave Text Text3DBox Text3DBoxOptions TextAlignment TextBand TextBoundingBox TextBox TextCell TextClipboardType TextData TextForm TextJustification TextLine TextPacket TextParagraph TextRecognize TextRendering TextStyle Texture TextureCoordinateFunction TextureCoordinateScaling Therefore ThermometerGauge Thick Thickness Thin Thinning ThisLink ThompsonGroupTh Thread ThreeJSymbol Threshold Through Throw Thumbnail Thursday Ticks TicksStyle Tilde TildeEqual TildeFullEqual TildeTilde TimeConstrained TimeConstraint Times TimesBy TimeSeriesForecast TimeSeriesInvertibility TimeUsed TimeValue TimeZone Timing Tiny TitleGrouping TitsGroupT ToBoxes ToCharacterCode ToColor ToContinuousTimeModel ToDate ToDiscreteTimeModel ToeplitzMatrix ToExpression ToFileName Together Toggle ToggleFalse Toggler TogglerBar TogglerBox TogglerBoxOptions ToHeldExpression ToInvertibleTimeSeries TokenWords Tolerance ToLowerCase ToNumberField TooBig Tooltip TooltipBox TooltipBoxOptions TooltipDelay TooltipStyle Top TopHatTransform TopologicalSort ToRadicals ToRules ToString Total TotalHeight TotalVariationFilter TotalWidth TouchscreenAutoZoom TouchscreenControlPlacement ToUpperCase Tr Trace TraceAbove TraceAction TraceBackward TraceDepth TraceDialog TraceForward TraceInternal TraceLevel TraceOff TraceOn TraceOriginal TracePrint TraceScan TrackedSymbols TradingChart TraditionalForm TraditionalFunctionNotation TraditionalNotation TraditionalOrder TransferFunctionCancel TransferFunctionExpand TransferFunctionFactor TransferFunctionModel TransferFunctionPoles TransferFunctionTransform TransferFunctionZeros TransformationFunction TransformationFunctions TransformationMatrix TransformedDistribution TransformedField Translate TranslationTransform TransparentColor Transpose TreeForm TreeGraph TreeGraphQ TreePlot TrendStyle TriangleWave TriangularDistribution Trig TrigExpand TrigFactor TrigFactorList Trigger TrigReduce TrigToExp TrimmedMean True TrueQ TruncatedDistribution TsallisQExponentialDistribution TsallisQGaussianDistribution TTest Tube TubeBezierCurveBox TubeBezierCurveBoxOptions TubeBox TubeBSplineCurveBox TubeBSplineCurveBoxOptions Tuesday TukeyLambdaDistribution TukeyWindow Tuples TuranGraph TuringMachine Transparent UnateQ Uncompress Undefined UnderBar Underflow Underlined Underoverscript UnderoverscriptBox UnderoverscriptBoxOptions Underscript UnderscriptBox UnderscriptBoxOptions UndirectedEdge UndirectedGraph UndirectedGraphQ UndocumentedTestFEParserPacket UndocumentedTestGetSelectionPacket Unequal Unevaluated UniformDistribution UniformGraphDistribution UniformSumDistribution Uninstall Union UnionPlus Unique UnitBox UnitConvert UnitDimensions Unitize UnitRootTest UnitSimplify UnitStep UnitTriangle UnitVector Unprotect UnsameQ UnsavedVariables Unset UnsetShared UntrackedVariables Up UpArrow UpArrowBar UpArrowDownArrow Update UpdateDynamicObjects UpdateDynamicObjectsSynchronous UpdateInterval UpDownArrow UpEquilibrium UpperCaseQ UpperLeftArrow UpperRightArrow UpperTriangularize Upsample UpSet UpSetDelayed UpTee UpTeeArrow UpValues URL URLFetch URLFetchAsynchronous URLSave URLSaveAsynchronous UseGraphicsRange Using UsingFrontEnd V2Get ValidationLength Value ValueBox ValueBoxOptions ValueForm ValueQ ValuesData Variables Variance VarianceEquivalenceTest VarianceEstimatorFunction VarianceGammaDistribution VarianceTest VectorAngle VectorColorFunction VectorColorFunctionScaling VectorDensityPlot VectorGlyphData VectorPlot VectorPlot3D VectorPoints VectorQ Vectors VectorScale VectorStyle Vee Verbatim Verbose VerboseConvertToPostScriptPacket VerifyConvergence VerifySolutions VerifyTestAssumptions Version VersionNumber VertexAdd VertexCapacity VertexColors VertexComponent VertexConnectivity VertexCoordinateRules VertexCoordinates VertexCorrelationSimilarity VertexCosineSimilarity VertexCount VertexCoverQ VertexDataCoordinates VertexDegree VertexDelete VertexDiceSimilarity VertexEccentricity VertexInComponent VertexInDegree VertexIndex VertexJaccardSimilarity VertexLabeling VertexLabels VertexLabelStyle VertexList VertexNormals VertexOutComponent VertexOutDegree VertexQ VertexRenderingFunction VertexReplace VertexShape VertexShapeFunction VertexSize VertexStyle VertexTextureCoordinates VertexWeight Vertical VerticalBar VerticalForm VerticalGauge VerticalSeparator VerticalSlider VerticalTilde ViewAngle ViewCenter ViewMatrix ViewPoint ViewPointSelectorSettings ViewPort ViewRange ViewVector ViewVertical VirtualGroupData Visible VisibleCell VoigtDistribution VonMisesDistribution WaitAll WaitAsynchronousTask WaitNext WaitUntil WakebyDistribution WalleniusHypergeometricDistribution WaringYuleDistribution WatershedComponents WatsonUSquareTest WattsStrogatzGraphDistribution WaveletBestBasis WaveletFilterCoefficients WaveletImagePlot WaveletListPlot WaveletMapIndexed WaveletMatrixPlot WaveletPhi WaveletPsi WaveletScale WaveletScalogram WaveletThreshold WeaklyConnectedComponents WeaklyConnectedGraphQ WeakStationarity WeatherData WeberE Wedge Wednesday WeibullDistribution WeierstrassHalfPeriods WeierstrassInvariants WeierstrassP WeierstrassPPrime WeierstrassSigma WeierstrassZeta WeightedAdjacencyGraph WeightedAdjacencyMatrix WeightedData WeightedGraphQ Weights WelchWindow WheelGraph WhenEvent Which While White Whitespace WhitespaceCharacter WhittakerM WhittakerW WienerFilter WienerProcess WignerD WignerSemicircleDistribution WilksW WilksWTest WindowClickSelect WindowElements WindowFloating WindowFrame WindowFrameElements WindowMargins WindowMovable WindowOpacity WindowSelected WindowSize WindowStatusArea WindowTitle WindowToolbars WindowWidth With WolframAlpha WolframAlphaDate WolframAlphaQuantity WolframAlphaResult Word WordBoundary WordCharacter WordData WordSearch WordSeparators WorkingPrecision Write WriteString Wronskian XMLElement XMLObject Xnor Xor Yellow YuleDissimilarity ZernikeR ZeroSymmetric ZeroTest ZeroWidthTimes Zeta ZetaZero ZipfDistribution ZTest ZTransform $Aborted $ActivationGroupID $ActivationKey $ActivationUserRegistered $AddOnsDirectory $AssertFunction $Assumptions $AsynchronousTask $BaseDirectory $BatchInput $BatchOutput $BoxForms $ByteOrdering $Canceled $CharacterEncoding $CharacterEncodings $CommandLine $CompilationTarget $ConditionHold $ConfiguredKernels $Context $ContextPath $ControlActiveSetting $CreationDate $CurrentLink $DateStringFormat $DefaultFont $DefaultFrontEnd $DefaultImagingDevice $DefaultPath $Display $DisplayFunction $DistributedContexts $DynamicEvaluation $Echo $Epilog $ExportFormats $Failed $FinancialDataSource $FormatType $FrontEnd $FrontEndSession $GeoLocation $HistoryLength $HomeDirectory $HTTPCookies $IgnoreEOF $ImagingDevices $ImportFormats $InitialDirectory $Input $InputFileName $InputStreamMethods $Inspector $InstallationDate $InstallationDirectory $InterfaceEnvironment $IterationLimit $KernelCount $KernelID $Language $LaunchDirectory $LibraryPath $LicenseExpirationDate $LicenseID $LicenseProcesses $LicenseServer $LicenseSubprocesses $LicenseType $Line $Linked $LinkSupported $LoadedFiles $MachineAddresses $MachineDomain $MachineDomains $MachineEpsilon $MachineID $MachineName $MachinePrecision $MachineType $MaxExtraPrecision $MaxLicenseProcesses $MaxLicenseSubprocesses $MaxMachineNumber $MaxNumber $MaxPiecewiseCases $MaxPrecision $MaxRootDegree $MessageGroups $MessageList $MessagePrePrint $Messages $MinMachineNumber $MinNumber $MinorReleaseNumber $MinPrecision $ModuleNumber $NetworkLicense $NewMessage $NewSymbol $Notebooks $NumberMarks $Off $OperatingSystem $Output $OutputForms $OutputSizeLimit $OutputStreamMethods $Packages $ParentLink $ParentProcessID $PasswordFile $PatchLevelID $Path $PathnameSeparator $PerformanceGoal $PipeSupported $Post $Pre $PreferencesDirectory $PrePrint $PreRead $PrintForms $PrintLiteral $ProcessID $ProcessorCount $ProcessorType $ProductInformation $ProgramName $RandomState $RecursionLimit $ReleaseNumber $RootDirectory $ScheduledTask $ScriptCommandLine $SessionID $SetParentLink $SharedFunctions $SharedVariables $SoundDisplay $SoundDisplayFunction $SuppressInputFormHeads $SynchronousEvaluation $SyntaxHandler $System $SystemCharacterEncoding $SystemID $SystemWordLength $TemporaryDirectory $TemporaryPrefix $TextStyle $TimedOut $TimeUnit $TimeZone $TopDirectory $TraceOff $TraceOn $TracePattern $TracePostAction $TracePreAction $Urgent $UserAddOnsDirectory $UserBaseDirectory $UserDocumentsDirectory $UserName $Version $VersionNumber", -contains:[{className:"comment",begin:/\(\*/,end:/\*\)/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{begin:/\{/,end:/\}/,illegal:/:/}]}}}),define("highlight/lib/languages/matlab",["require","exports","module"],function(e,t,n){n.exports=function(e){var t=[e.C_NUMBER_MODE,{className:"string",begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE,{begin:"''"}]}],n={relevance:0,contains:[{begin:/'['\.]*/}]};return{keywords:{keyword:"break case catch classdef continue else elseif end enumerated events for function global if methods otherwise parfor persistent properties return spmd switch try while",built_in:"sin sind sinh asin asind asinh cos cosd cosh acos acosd acosh tan tand tanh atan atand atan2 atanh sec secd sech asec asecd asech csc cscd csch acsc acscd acsch cot cotd coth acot acotd acoth hypot exp expm1 log log1p log10 log2 pow2 realpow reallog realsqrt sqrt nthroot nextpow2 abs angle complex conj imag real unwrap isreal cplxpair fix floor ceil round mod rem sign airy besselj bessely besselh besseli besselk beta betainc betaln ellipj ellipke erf erfc erfcx erfinv expint gamma gammainc gammaln psi legendre cross dot factor isprime primes gcd lcm rat rats perms nchoosek factorial cart2sph cart2pol pol2cart sph2cart hsv2rgb rgb2hsv zeros ones eye repmat rand randn linspace logspace freqspace meshgrid accumarray size length ndims numel disp isempty isequal isequalwithequalnans cat reshape diag blkdiag tril triu fliplr flipud flipdim rot90 find sub2ind ind2sub bsxfun ndgrid permute ipermute shiftdim circshift squeeze isscalar isvector ans eps realmax realmin pi i inf nan isnan isinf isfinite j why compan gallery hadamard hankel hilb invhilb magic pascal rosser toeplitz vander wilkinson"},illegal:'(//|"|#|/\\*|\\s+/\\w+)',contains:[{className:"function",beginKeywords:"function",end:"$",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",variants:[{begin:"\\(",end:"\\)"},{begin:"\\[",end:"\\]"}]}]},{begin:/[a-zA-Z_][a-zA-Z_0-9]*'['\.]*/,returnBegin:!0,relevance:0,contains:[{begin:/[a-zA-Z_][a-zA-Z_0-9]*/,relevance:0},n.contains[0]]},{begin:"\\[",end:"\\]",contains:t,relevance:0,starts:n},{begin:"\\{",end:/}/,contains:t,relevance:0,starts:n},{begin:/\)/,relevance:0,starts:n},e.COMMENT("^\\s*\\%\\{\\s*$","^\\s*\\%\\}\\s*$"),e.COMMENT("\\%","$")].concat(t)}}}),define("highlight/lib/languages/maxima",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="if then else elseif for thru do while unless step in and or not",n="true false unknown inf minf ind und %e %i %pi %phi %gamma",i=" abasep abs absint absolute_real_time acos acosh acot acoth acsc acsch activate addcol add_edge add_edges addmatrices addrow add_vertex add_vertices adjacency_matrix adjoin adjoint af agd airy airy_ai airy_bi airy_dai airy_dbi algsys alg_type alias allroots alphacharp alphanumericp amortization %and annuity_fv annuity_pv antid antidiff AntiDifference append appendfile apply apply1 apply2 applyb1 apropos args arit_amortization arithmetic arithsum array arrayapply arrayinfo arraymake arraysetapply ascii asec asech asin asinh askinteger asksign assoc assoc_legendre_p assoc_legendre_q assume assume_external_byte_order asympa at atan atan2 atanh atensimp atom atvalue augcoefmatrix augmented_lagrangian_method av average_degree backtrace bars barsplot barsplot_description base64 base64_decode bashindices batch batchload bc2 bdvac belln benefit_cost bern bernpoly bernstein_approx bernstein_expand bernstein_poly bessel bessel_i bessel_j bessel_k bessel_simplify bessel_y beta beta_incomplete beta_incomplete_generalized beta_incomplete_regularized bezout bfallroots bffac bf_find_root bf_fmin_cobyla bfhzeta bfloat bfloatp bfpsi bfpsi0 bfzeta biconnected_components bimetric binomial bipartition block blockmatrixp bode_gain bode_phase bothcoef box boxplot boxplot_description break bug_report build_info|10 buildq build_sample burn cabs canform canten cardinality carg cartan cartesian_product catch cauchy_matrix cbffac cdf_bernoulli cdf_beta cdf_binomial cdf_cauchy cdf_chi2 cdf_continuous_uniform cdf_discrete_uniform cdf_exp cdf_f cdf_gamma cdf_general_finite_discrete cdf_geometric cdf_gumbel cdf_hypergeometric cdf_laplace cdf_logistic cdf_lognormal cdf_negative_binomial cdf_noncentral_chi2 cdf_noncentral_student_t cdf_normal cdf_pareto cdf_poisson cdf_rank_sum cdf_rayleigh cdf_signed_rank cdf_student_t cdf_weibull cdisplay ceiling central_moment cequal cequalignore cf cfdisrep cfexpand cgeodesic cgreaterp cgreaterpignore changename changevar chaosgame charat charfun charfun2 charlist charp charpoly chdir chebyshev_t chebyshev_u checkdiv check_overlaps chinese cholesky christof chromatic_index chromatic_number cint circulant_graph clear_edge_weight clear_rules clear_vertex_label clebsch_gordan clebsch_graph clessp clesspignore close closefile cmetric coeff coefmatrix cograd col collapse collectterms columnop columnspace columnswap columnvector combination combine comp2pui compare compfile compile compile_file complement_graph complete_bipartite_graph complete_graph complex_number_p components compose_functions concan concat conjugate conmetderiv connected_components connect_vertices cons constant constantp constituent constvalue cont2part content continuous_freq contortion contour_plot contract contract_edge contragrad contrib_ode convert coord copy copy_file copy_graph copylist copymatrix cor cos cosh cot coth cov cov1 covdiff covect covers crc24sum create_graph create_list csc csch csetup cspline ctaylor ct_coordsys ctransform ctranspose cube_graph cuboctahedron_graph cunlisp cv cycle_digraph cycle_graph cylindrical days360 dblint deactivate declare declare_constvalue declare_dimensions declare_fundamental_dimensions declare_fundamental_units declare_qty declare_translated declare_unit_conversion declare_units declare_weights decsym defcon define define_alt_display define_variable defint defmatch defrule defstruct deftaylor degree_sequence del delete deleten delta demo demoivre denom depends derivdegree derivlist describe desolve determinant dfloat dgauss_a dgauss_b dgeev dgemm dgeqrf dgesv dgesvd diag diagmatrix diag_matrix diagmatrixp diameter diff digitcharp dimacs_export dimacs_import dimension dimensionless dimensions dimensions_as_list direct directory discrete_freq disjoin disjointp disolate disp dispcon dispform dispfun dispJordan display disprule dispterms distrib divide divisors divsum dkummer_m dkummer_u dlange dodecahedron_graph dotproduct dotsimp dpart draw draw2d draw3d drawdf draw_file draw_graph dscalar echelon edge_coloring edge_connectivity edges eigens_by_jacobi eigenvalues eigenvectors eighth einstein eivals eivects elapsed_real_time elapsed_run_time ele2comp ele2polynome ele2pui elem elementp elevation_grid elim elim_allbut eliminate eliminate_using ellipse elliptic_e elliptic_ec elliptic_eu elliptic_f elliptic_kc elliptic_pi ematrix empty_graph emptyp endcons entermatrix entertensor entier equal equalp equiv_classes erf erfc erf_generalized erfi errcatch error errormsg errors euler ev eval_string evenp every evolution evolution2d evundiff example exp expand expandwrt expandwrt_factored expint expintegral_chi expintegral_ci expintegral_e expintegral_e1 expintegral_ei expintegral_e_simplify expintegral_li expintegral_shi expintegral_si explicit explose exponentialize express expt exsec extdiff extract_linear_equations extremal_subset ezgcd %f f90 facsum factcomb factor factorfacsum factorial factorout factorsum facts fast_central_elements fast_linsolve fasttimes featurep fernfale fft fib fibtophi fifth filename_merge file_search file_type fillarray findde find_root find_root_abs find_root_error find_root_rel first fix flatten flength float floatnump floor flower_snark flush flush1deriv flushd flushnd flush_output fmin_cobyla forget fortran fourcos fourexpand fourier fourier_elim fourint fourintcos fourintsin foursimp foursin fourth fposition frame_bracket freeof freshline fresnel_c fresnel_s from_adjacency_matrix frucht_graph full_listify fullmap fullmapl fullratsimp fullratsubst fullsetify funcsolve fundamental_dimensions fundamental_units fundef funmake funp fv g0 g1 gamma gamma_greek gamma_incomplete gamma_incomplete_generalized gamma_incomplete_regularized gauss gauss_a gauss_b gaussprob gcd gcdex gcdivide gcfac gcfactor gd generalized_lambert_w genfact gen_laguerre genmatrix gensym geo_amortization geo_annuity_fv geo_annuity_pv geomap geometric geometric_mean geosum get getcurrentdirectory get_edge_weight getenv get_lu_factors get_output_stream_string get_pixel get_plot_option get_tex_environment get_tex_environment_default get_vertex_label gfactor gfactorsum ggf girth global_variances gn gnuplot_close gnuplot_replot gnuplot_reset gnuplot_restart gnuplot_start go Gosper GosperSum gr2d gr3d gradef gramschmidt graph6_decode graph6_encode graph6_export graph6_import graph_center graph_charpoly graph_eigenvalues graph_flow graph_order graph_periphery graph_product graph_size graph_union great_rhombicosidodecahedron_graph great_rhombicuboctahedron_graph grid_graph grind grobner_basis grotzch_graph hamilton_cycle hamilton_path hankel hankel_1 hankel_2 harmonic harmonic_mean hav heawood_graph hermite hessian hgfred hilbertmap hilbert_matrix hipow histogram histogram_description hodge horner hypergeometric i0 i1 %ibes ic1 ic2 ic_convert ichr1 ichr2 icosahedron_graph icosidodecahedron_graph icurvature ident identfor identity idiff idim idummy ieqn %if ifactors iframes ifs igcdex igeodesic_coords ilt image imagpart imetric implicit implicit_derivative implicit_plot indexed_tensor indices induced_subgraph inferencep inference_result infix info_display init_atensor init_ctensor in_neighbors innerproduct inpart inprod inrt integerp integer_partitions integrate intersect intersection intervalp intopois intosum invariant1 invariant2 inverse_fft inverse_jacobi_cd inverse_jacobi_cn inverse_jacobi_cs inverse_jacobi_dc inverse_jacobi_dn inverse_jacobi_ds inverse_jacobi_nc inverse_jacobi_nd inverse_jacobi_ns inverse_jacobi_sc inverse_jacobi_sd inverse_jacobi_sn invert invert_by_adjoint invert_by_lu inv_mod irr is is_biconnected is_bipartite is_connected is_digraph is_edge_in_graph is_graph is_graph_or_digraph ishow is_isomorphic isolate isomorphism is_planar isqrt isreal_p is_sconnected is_tree is_vertex_in_graph items_inference %j j0 j1 jacobi jacobian jacobi_cd jacobi_cn jacobi_cs jacobi_dc jacobi_dn jacobi_ds jacobi_nc jacobi_nd jacobi_ns jacobi_p jacobi_sc jacobi_sd jacobi_sn JF jn join jordan julia julia_set julia_sin %k kdels kdelta kill killcontext kostka kron_delta kronecker_product kummer_m kummer_u kurtosis kurtosis_bernoulli kurtosis_beta kurtosis_binomial kurtosis_chi2 kurtosis_continuous_uniform kurtosis_discrete_uniform kurtosis_exp kurtosis_f kurtosis_gamma kurtosis_general_finite_discrete kurtosis_geometric kurtosis_gumbel kurtosis_hypergeometric kurtosis_laplace kurtosis_logistic kurtosis_lognormal kurtosis_negative_binomial kurtosis_noncentral_chi2 kurtosis_noncentral_student_t kurtosis_normal kurtosis_pareto kurtosis_poisson kurtosis_rayleigh kurtosis_student_t kurtosis_weibull label labels lagrange laguerre lambda lambert_w laplace laplacian_matrix last lbfgs lc2kdt lcharp lc_l lcm lc_u ldefint ldisp ldisplay legendre_p legendre_q leinstein length let letrules letsimp levi_civita lfreeof lgtreillis lhs li liediff limit Lindstedt linear linearinterpol linear_program linear_regression line_graph linsolve listarray list_correlations listify list_matrix_entries list_nc_monomials listoftens listofvars listp lmax lmin load loadfile local locate_matrix_entry log logcontract log_gamma lopow lorentz_gauge lowercasep lpart lratsubst lreduce lriemann lsquares_estimates lsquares_estimates_approximate lsquares_estimates_exact lsquares_mse lsquares_residual_mse lsquares_residuals lsum ltreillis lu_backsub lucas lu_factor %m macroexpand macroexpand1 make_array makebox makefact makegamma make_graph make_level_picture makelist makeOrders make_poly_continent make_poly_country make_polygon make_random_state make_rgb_picture makeset make_string_input_stream make_string_output_stream make_transform mandelbrot mandelbrot_set map mapatom maplist matchdeclare matchfix mat_cond mat_fullunblocker mat_function mathml_display mat_norm matrix matrixmap matrixp matrix_size mattrace mat_trace mat_unblocker max max_clique max_degree max_flow maximize_lp max_independent_set max_matching maybe md5sum mean mean_bernoulli mean_beta mean_binomial mean_chi2 mean_continuous_uniform mean_deviation mean_discrete_uniform mean_exp mean_f mean_gamma mean_general_finite_discrete mean_geometric mean_gumbel mean_hypergeometric mean_laplace mean_logistic mean_lognormal mean_negative_binomial mean_noncentral_chi2 mean_noncentral_student_t mean_normal mean_pareto mean_poisson mean_rayleigh mean_student_t mean_weibull median median_deviation member mesh metricexpandall mgf1_sha1 min min_degree min_edge_cut minfactorial minimalPoly minimize_lp minimum_spanning_tree minor minpack_lsquares minpack_solve min_vertex_cover min_vertex_cut mkdir mnewton mod mode_declare mode_identity ModeMatrix moebius mon2schur mono monomial_dimensions multibernstein_poly multi_display_for_texinfo multi_elem multinomial multinomial_coeff multi_orbit multiplot_mode multi_pui multsym multthru mycielski_graph nary natural_unit nc_degree ncexpt ncharpoly negative_picture neighbors new newcontext newdet new_graph newline newton new_variable next_prime nicedummies niceindices ninth nofix nonarray noncentral_moment nonmetricity nonnegintegerp nonscalarp nonzeroandfreeof notequal nounify nptetrad npv nroots nterms ntermst nthroot nullity nullspace num numbered_boundaries numberp number_to_octets num_distinct_partitions numerval numfactor num_partitions nusum nzeta nzetai nzetar octets_to_number octets_to_oid odd_girth oddp ode2 ode_check odelin oid_to_octets op opena opena_binary openr openr_binary openw openw_binary operatorp opsubst optimize %or orbit orbits ordergreat ordergreatp orderless orderlessp orthogonal_complement orthopoly_recur orthopoly_weight outermap out_neighbors outofpois pade parabolic_cylinder_d parametric parametric_surface parg parGosper parse_string parse_timedate part part2cont partfrac partition partition_set partpol path_digraph path_graph pathname_directory pathname_name pathname_type pdf_bernoulli pdf_beta pdf_binomial pdf_cauchy pdf_chi2 pdf_continuous_uniform pdf_discrete_uniform pdf_exp pdf_f pdf_gamma pdf_general_finite_discrete pdf_geometric pdf_gumbel pdf_hypergeometric pdf_laplace pdf_logistic pdf_lognormal pdf_negative_binomial pdf_noncentral_chi2 pdf_noncentral_student_t pdf_normal pdf_pareto pdf_poisson pdf_rank_sum pdf_rayleigh pdf_signed_rank pdf_student_t pdf_weibull pearson_skewness permanent permut permutation permutations petersen_graph petrov pickapart picture_equalp picturep piechart piechart_description planar_embedding playback plog plot2d plot3d plotdf ploteq plsquares pochhammer points poisdiff poisexpt poisint poismap poisplus poissimp poissubst poistimes poistrim polar polarform polartorect polar_to_xy poly_add poly_buchberger poly_buchberger_criterion poly_colon_ideal poly_content polydecomp poly_depends_p poly_elimination_ideal poly_exact_divide poly_expand poly_expt poly_gcd polygon poly_grobner poly_grobner_equal poly_grobner_member poly_grobner_subsetp poly_ideal_intersection poly_ideal_polysaturation poly_ideal_polysaturation1 poly_ideal_saturation poly_ideal_saturation1 poly_lcm poly_minimization polymod poly_multiply polynome2ele polynomialp poly_normal_form poly_normalize poly_normalize_list poly_polysaturation_extension poly_primitive_part poly_pseudo_divide poly_reduced_grobner poly_reduction poly_saturation_extension poly_s_polynomial poly_subtract polytocompanion pop postfix potential power_mod powerseries powerset prefix prev_prime primep primes principal_components print printf printfile print_graph printpois printprops prodrac product properties propvars psi psubst ptriangularize pui pui2comp pui2ele pui2polynome pui_direct puireduc push put pv qput qrange qty quad_control quad_qag quad_qagi quad_qagp quad_qags quad_qawc quad_qawf quad_qawo quad_qaws quadrilateral quantile quantile_bernoulli quantile_beta quantile_binomial quantile_cauchy quantile_chi2 quantile_continuous_uniform quantile_discrete_uniform quantile_exp quantile_f quantile_gamma quantile_general_finite_discrete quantile_geometric quantile_gumbel quantile_hypergeometric quantile_laplace quantile_logistic quantile_lognormal quantile_negative_binomial quantile_noncentral_chi2 quantile_noncentral_student_t quantile_normal quantile_pareto quantile_poisson quantile_rayleigh quantile_student_t quantile_weibull quartile_skewness quit qunit quotient racah_v racah_w radcan radius random random_bernoulli random_beta random_binomial random_bipartite_graph random_cauchy random_chi2 random_continuous_uniform random_digraph random_discrete_uniform random_exp random_f random_gamma random_general_finite_discrete random_geometric random_graph random_graph1 random_gumbel random_hypergeometric random_laplace random_logistic random_lognormal random_negative_binomial random_network random_noncentral_chi2 random_noncentral_student_t random_normal random_pareto random_permutation random_poisson random_rayleigh random_regular_graph random_student_t random_tournament random_tree random_weibull range rank rat ratcoef ratdenom ratdiff ratdisrep ratexpand ratinterpol rational rationalize ratnumer ratnump ratp ratsimp ratsubst ratvars ratweight read read_array read_binary_array read_binary_list read_binary_matrix readbyte readchar read_hashed_array readline read_list read_matrix read_nested_list readonly read_xpm real_imagpart_to_conjugate realpart realroots rearray rectangle rectform rectform_log_if_constant recttopolar rediff reduce_consts reduce_order region region_boundaries region_boundaries_plus rem remainder remarray rembox remcomps remcon remcoord remfun remfunction remlet remove remove_constvalue remove_dimensions remove_edge remove_fundamental_dimensions remove_fundamental_units remove_plot_option remove_vertex rempart remrule remsym remvalue rename rename_file reset reset_displays residue resolvante resolvante_alternee1 resolvante_bipartite resolvante_diedrale resolvante_klein resolvante_klein3 resolvante_produit_sym resolvante_unitaire resolvante_vierer rest resultant return reveal reverse revert revert2 rgb2level rhs ricci riemann rinvariant risch rk rmdir rncombine romberg room rootscontract round row rowop rowswap rreduce run_testsuite %s save saving scalarp scaled_bessel_i scaled_bessel_i0 scaled_bessel_i1 scalefactors scanmap scatterplot scatterplot_description scene schur2comp sconcat scopy scsimp scurvature sdowncase sec sech second sequal sequalignore set_alt_display setdifference set_draw_defaults set_edge_weight setelmx setequalp setify setp set_partitions set_plot_option set_prompt set_random_state set_tex_environment set_tex_environment_default setunits setup_autoload set_up_dot_simplifications set_vertex_label seventh sexplode sf sha1sum sha256sum shortest_path shortest_weighted_path show showcomps showratvars sierpinskiale sierpinskimap sign signum similaritytransform simp_inequality simplify_sum simplode simpmetderiv simtran sin sinh sinsert sinvertcase sixth skewness skewness_bernoulli skewness_beta skewness_binomial skewness_chi2 skewness_continuous_uniform skewness_discrete_uniform skewness_exp skewness_f skewness_gamma skewness_general_finite_discrete skewness_geometric skewness_gumbel skewness_hypergeometric skewness_laplace skewness_logistic skewness_lognormal skewness_negative_binomial skewness_noncentral_chi2 skewness_noncentral_student_t skewness_normal skewness_pareto skewness_poisson skewness_rayleigh skewness_student_t skewness_weibull slength smake small_rhombicosidodecahedron_graph small_rhombicuboctahedron_graph smax smin smismatch snowmap snub_cube_graph snub_dodecahedron_graph solve solve_rec solve_rec_rat some somrac sort sparse6_decode sparse6_encode sparse6_export sparse6_import specint spherical spherical_bessel_j spherical_bessel_y spherical_hankel1 spherical_hankel2 spherical_harmonic spherical_to_xyz splice split sposition sprint sqfr sqrt sqrtdenest sremove sremovefirst sreverse ssearch ssort sstatus ssubst ssubstfirst staircase standardize standardize_inverse_trig starplot starplot_description status std std1 std_bernoulli std_beta std_binomial std_chi2 std_continuous_uniform std_discrete_uniform std_exp std_f std_gamma std_general_finite_discrete std_geometric std_gumbel std_hypergeometric std_laplace std_logistic std_lognormal std_negative_binomial std_noncentral_chi2 std_noncentral_student_t std_normal std_pareto std_poisson std_rayleigh std_student_t std_weibull stemplot stirling stirling1 stirling2 strim striml strimr string stringout stringp strong_components struve_h struve_l sublis sublist sublist_indices submatrix subsample subset subsetp subst substinpart subst_parallel substpart substring subvar subvarp sum sumcontract summand_to_rec supcase supcontext symbolp symmdifference symmetricp system take_channel take_inference tan tanh taylor taylorinfo taylorp taylor_simplifier taytorat tcl_output tcontract tellrat tellsimp tellsimpafter tentex tenth test_mean test_means_difference test_normality test_proportion test_proportions_difference test_rank_sum test_sign test_signed_rank test_variance test_variance_ratio tex tex1 tex_display texput %th third throw time timedate timer timer_info tldefint tlimit todd_coxeter toeplitz tokens to_lisp topological_sort to_poly to_poly_solve totaldisrep totalfourier totient tpartpol trace tracematrix trace_options transform_sample translate translate_file transpose treefale tree_reduce treillis treinat triangle triangularize trigexpand trigrat trigreduce trigsimp trunc truncate truncated_cube_graph truncated_dodecahedron_graph truncated_icosahedron_graph truncated_tetrahedron_graph tr_warnings_get tube tutte_graph ueivects uforget ultraspherical underlying_graph undiff union unique uniteigenvectors unitp units unit_step unitvector unorder unsum untellrat untimer untrace uppercasep uricci uriemann uvect vandermonde_matrix var var1 var_bernoulli var_beta var_binomial var_chi2 var_continuous_uniform var_discrete_uniform var_exp var_f var_gamma var_general_finite_discrete var_geometric var_gumbel var_hypergeometric var_laplace var_logistic var_lognormal var_negative_binomial var_noncentral_chi2 var_noncentral_student_t var_normal var_pareto var_poisson var_rayleigh var_student_t var_weibull vector vectorpotential vectorsimp verbify vers vertex_coloring vertex_connectivity vertex_degree vertex_distance vertex_eccentricity vertex_in_degree vertex_out_degree vertices vertices_to_cycle vertices_to_path %w weyl wheel_graph wiener_index wigner_3j wigner_6j wigner_9j with_stdout write_binary_data writebyte write_data writefile wronskian xreduce xthru %y Zeilberger zeroequiv zerofor zeromatrix zeromatrixp zeta zgeev zheev zlange zn_add_table zn_carmichael_lambda zn_characteristic_factors zn_determinant zn_factor_generators zn_invert_by_lu zn_log zn_mult_table absboxchar activecontexts adapt_depth additive adim aform algebraic algepsilon algexact aliases allbut all_dotsimp_denoms allocation allsym alphabetic animation antisymmetric arrays askexp assume_pos assume_pos_pred assumescalar asymbol atomgrad atrig1 axes axis_3d axis_bottom axis_left axis_right axis_top azimuth background background_color backsubst berlefact bernstein_explicit besselexpand beta_args_sum_to_integer beta_expand bftorat bftrunc bindtest border boundaries_array box boxchar breakup %c capping cauchysum cbrange cbtics center cflength cframe_flag cnonmet_flag color color_bar color_bar_tics colorbox columns commutative complex cone context contexts contour contour_levels cosnpiflag ctaypov ctaypt ctayswitch ctayvar ct_coords ctorsion_flag ctrgsimp cube current_let_rule_package cylinder data_file_name debugmode decreasing default_let_rule_package delay dependencies derivabbrev derivsubst detout diagmetric diff dim dimensions dispflag display2d|10 display_format_internal distribute_over doallmxops domain domxexpt domxmxops domxnctimes dontfactor doscmxops doscmxplus dot0nscsimp dot0simp dot1simp dotassoc dotconstrules dotdistrib dotexptsimp dotident dotscrules draw_graph_program draw_realpart edge_color edge_coloring edge_partition edge_type edge_width %edispflag elevation %emode endphi endtheta engineering_format_floats enhanced3d %enumer epsilon_lp erfflag erf_representation errormsg error_size error_syms error_type %e_to_numlog eval even evenfun evflag evfun ev_point expandwrt_denom expintexpand expintrep expon expop exptdispflag exptisolate exptsubst facexpand facsum_combine factlim factorflag factorial_expand factors_only fb feature features file_name file_output_append file_search_demo file_search_lisp file_search_maxima|10 file_search_tests file_search_usage file_type_lisp file_type_maxima|10 fill_color fill_density filled_func fixed_vertices flipflag float2bf font font_size fortindent fortspaces fpprec fpprintprec functions gamma_expand gammalim gdet genindex gensumnum GGFCFMAX GGFINFINITY globalsolve gnuplot_command gnuplot_curve_styles gnuplot_curve_titles gnuplot_default_term_command gnuplot_dumb_term_command gnuplot_file_args gnuplot_file_name gnuplot_out_file gnuplot_pdf_term_command gnuplot_pm3d gnuplot_png_term_command gnuplot_postamble gnuplot_preamble gnuplot_ps_term_command gnuplot_svg_term_command gnuplot_term gnuplot_view_args Gosper_in_Zeilberger gradefs grid grid2d grind halfangles head_angle head_both head_length head_type height hypergeometric_representation %iargs ibase icc1 icc2 icounter idummyx ieqnprint ifb ifc1 ifc2 ifg ifgi ifr iframe_bracket_form ifri igeowedge_flag ikt1 ikt2 imaginary inchar increasing infeval infinity inflag infolists inm inmc1 inmc2 intanalysis integer integervalued integrate_use_rootsof integration_constant integration_constant_counter interpolate_color intfaclim ip_grid ip_grid_in irrational isolate_wrt_times iterations itr julia_parameter %k1 %k2 keepfloat key key_pos kinvariant kt label label_alignment label_orientation labels lassociative lbfgs_ncorrections lbfgs_nfeval_max leftjust legend letrat let_rule_packages lfg lg lhospitallim limsubst linear linear_solver linechar linel|10 linenum line_type linewidth line_width linsolve_params linsolvewarn lispdisp listarith listconstvars listdummyvars lmxchar load_pathname loadprint logabs logarc logcb logconcoeffp logexpand lognegint logsimp logx logx_secondary logy logy_secondary logz lriem m1pbranch macroexpansion macros mainvar manual_demo maperror mapprint matrix_element_add matrix_element_mult matrix_element_transpose maxapplydepth maxapplyheight maxima_tempdir|10 maxima_userdir|10 maxnegex MAX_ORD maxposex maxpsifracdenom maxpsifracnum maxpsinegint maxpsiposint maxtayorder mesh_lines_color method mod_big_prime mode_check_errorp mode_checkp mode_check_warnp mod_test mod_threshold modular_linear_solver modulus multiplicative multiplicities myoptions nary negdistrib negsumdispflag newline newtonepsilon newtonmaxiter nextlayerfactor niceindicespref nm nmc noeval nolabels nonegative_lp noninteger nonscalar noun noundisp nouns np npi nticks ntrig numer numer_pbranch obase odd oddfun opacity opproperties opsubst optimprefix optionset orientation origin orthopoly_returns_intervals outative outchar packagefile palette partswitch pdf_file pfeformat phiresolution %piargs piece pivot_count_sx pivot_max_sx plot_format plot_options plot_realpart png_file pochhammer_max_index points pointsize point_size points_joined point_type poislim poisson poly_coefficient_ring poly_elimination_order polyfactor poly_grobner_algorithm poly_grobner_debug poly_monomial_order poly_primary_elimination_order poly_return_term_list poly_secondary_elimination_order poly_top_reduction_only posfun position powerdisp pred prederror primep_number_of_tests product_use_gamma program programmode promote_float_to_bigfloat prompt proportional_axes props psexpand ps_file radexpand radius radsubstflag rassociative ratalgdenom ratchristof ratdenomdivide rateinstein ratepsilon ratfac rational ratmx ratprint ratriemann ratsimpexpons ratvarswitch ratweights ratweyl ratwtlvl real realonly redraw refcheck resolution restart resultant ric riem rmxchar %rnum_list rombergabs rombergit rombergmin rombergtol rootsconmode rootsepsilon run_viewer same_xy same_xyz savedef savefactors scalar scalarmatrixp scale scale_lp setcheck setcheckbreak setval show_edge_color show_edges show_edge_type show_edge_width show_id show_label showtime show_vertex_color show_vertex_size show_vertex_type show_vertices show_weight simp simplified_output simplify_products simpproduct simpsum sinnpiflag solvedecomposes solveexplicit solvefactors solvenullwarn solveradcan solvetrigwarn space sparse sphere spring_embedding_depth sqrtdispflag stardisp startphi starttheta stats_numer stringdisp structures style sublis_apply_lambda subnumsimp sumexpand sumsplitfact surface surface_hide svg_file symmetric tab taylordepth taylor_logexpand taylor_order_coefficients taylor_truncate_polynomials tensorkill terminal testsuite_files thetaresolution timer_devalue title tlimswitch tr track transcompile transform transform_xy translate_fast_arrays transparent transrun tr_array_as_ref tr_bound_function_applyp tr_file_tty_messagesp tr_float_can_branch_complex tr_function_call_default trigexpandplus trigexpandtimes triginverses trigsign trivial_solutions tr_numer tr_optimize_max_loop tr_semicompile tr_state_vars tr_warn_bad_function_calls tr_warn_fexpr tr_warn_meval tr_warn_mode tr_warn_undeclared tr_warn_undefined_variable tstep ttyoff tube_extremes ufg ug %unitexpand unit_vectors uric uriem use_fast_arrays user_preamble usersetunits values vect_cross verbose vertex_color vertex_coloring vertex_partition vertex_size vertex_type view warnings weyl width windowname windowtitle wired_surface wireframe xaxis xaxis_color xaxis_secondary xaxis_type xaxis_width xlabel xlabel_secondary xlength xrange xrange_secondary xtics xtics_axis xtics_rotate xtics_rotate_secondary xtics_secondary xtics_secondary_axis xu_grid x_voxel xy_file xyplane xy_scale yaxis yaxis_color yaxis_secondary yaxis_type yaxis_width ylabel ylabel_secondary ylength yrange yrange_secondary ytics ytics_axis ytics_rotate ytics_rotate_secondary ytics_secondary ytics_secondary_axis yv_grid y_voxel yx_ratio zaxis zaxis_color zaxis_type zaxis_width zeroa zerob zerobern zeta%pi zlabel zlabel_rotate zlength zmin zn_primroot_limit zn_primroot_pretest",r="_ __ %|0 %%|0";return{lexemes:"[A-Za-z_%][0-9A-Za-z_%]*",keywords:{keyword:t,literal:n,built_in:i,symbol:r},contains:[{className:"comment",begin:"/\\*",end:"\\*/",contains:["self"]},e.QUOTE_STRING_MODE,{className:"number",relevance:0,variants:[{begin:"\\b(\\d+|\\d+\\.|\\.\\d+|\\d+\\.\\d+)[Ee][-+]?\\d+\\b"},{begin:"\\b(\\d+|\\d+\\.|\\.\\d+|\\d+\\.\\d+)[Bb][-+]?\\d+\\b",relevance:10},{begin:"\\b(\\.\\d+|\\d+\\.\\d+)\\b"},{begin:"\\b(\\d+|0[0-9A-Za-z]+)\\.?\\b"}]}],illegal:/@/}}}),define("highlight/lib/languages/mel",["require","exports","module"],function(e,t,n){n.exports=function(e){return{keywords:"int float string vector matrix if else switch case default while do for in break continue global proc return about abs addAttr addAttributeEditorNodeHelp addDynamic addNewShelfTab addPP addPanelCategory addPrefixToName advanceToNextDrivenKey affectedNet affects aimConstraint air alias aliasAttr align alignCtx alignCurve alignSurface allViewFit ambientLight angle angleBetween animCone animCurveEditor animDisplay animView annotate appendStringArray applicationName applyAttrPreset applyTake arcLenDimContext arcLengthDimension arclen arrayMapper art3dPaintCtx artAttrCtx artAttrPaintVertexCtx artAttrSkinPaintCtx artAttrTool artBuildPaintMenu artFluidAttrCtx artPuttyCtx artSelectCtx artSetPaintCtx artUserPaintCtx assignCommand assignInputDevice assignViewportFactories attachCurve attachDeviceAttr attachSurface attrColorSliderGrp attrCompatibility attrControlGrp attrEnumOptionMenu attrEnumOptionMenuGrp attrFieldGrp attrFieldSliderGrp attrNavigationControlGrp attrPresetEditWin attributeExists attributeInfo attributeMenu attributeQuery autoKeyframe autoPlace bakeClip bakeFluidShading bakePartialHistory bakeResults bakeSimulation basename basenameEx batchRender bessel bevel bevelPlus binMembership bindSkin blend2 blendShape blendShapeEditor blendShapePanel blendTwoAttr blindDataType boneLattice boundary boxDollyCtx boxZoomCtx bufferCurve buildBookmarkMenu buildKeyframeMenu button buttonManip CBG cacheFile cacheFileCombine cacheFileMerge cacheFileTrack camera cameraView canCreateManip canvas capitalizeString catch catchQuiet ceil changeSubdivComponentDisplayLevel changeSubdivRegion channelBox character characterMap characterOutlineEditor characterize chdir checkBox checkBoxGrp checkDefaultRenderGlobals choice circle circularFillet clamp clear clearCache clip clipEditor clipEditorCurrentTimeCtx clipSchedule clipSchedulerOutliner clipTrimBefore closeCurve closeSurface cluster cmdFileOutput cmdScrollFieldExecuter cmdScrollFieldReporter cmdShell coarsenSubdivSelectionList collision color colorAtPoint colorEditor colorIndex colorIndexSliderGrp colorSliderButtonGrp colorSliderGrp columnLayout commandEcho commandLine commandPort compactHairSystem componentEditor compositingInterop computePolysetVolume condition cone confirmDialog connectAttr connectControl connectDynamic connectJoint connectionInfo constrain constrainValue constructionHistory container containsMultibyte contextInfo control convertFromOldLayers convertIffToPsd convertLightmap convertSolidTx convertTessellation convertUnit copyArray copyFlexor copyKey copySkinWeights cos cpButton cpCache cpClothSet cpCollision cpConstraint cpConvClothToMesh cpForces cpGetSolverAttr cpPanel cpProperty cpRigidCollisionFilter cpSeam cpSetEdit cpSetSolverAttr cpSolver cpSolverTypes cpTool cpUpdateClothUVs createDisplayLayer createDrawCtx createEditor createLayeredPsdFile createMotionField createNewShelf createNode createRenderLayer createSubdivRegion cross crossProduct ctxAbort ctxCompletion ctxEditMode ctxTraverse currentCtx currentTime currentTimeCtx currentUnit curve curveAddPtCtx curveCVCtx curveEPCtx curveEditorCtx curveIntersect curveMoveEPCtx curveOnSurface curveSketchCtx cutKey cycleCheck cylinder dagPose date defaultLightListCheckBox defaultNavigation defineDataServer defineVirtualDevice deformer deg_to_rad delete deleteAttr deleteShadingGroupsAndMaterials deleteShelfTab deleteUI deleteUnusedBrushes delrandstr detachCurve detachDeviceAttr detachSurface deviceEditor devicePanel dgInfo dgdirty dgeval dgtimer dimWhen directKeyCtx directionalLight dirmap dirname disable disconnectAttr disconnectJoint diskCache displacementToPoly displayAffected displayColor displayCull displayLevelOfDetail displayPref displayRGBColor displaySmoothness displayStats displayString displaySurface distanceDimContext distanceDimension doBlur dolly dollyCtx dopeSheetEditor dot dotProduct doubleProfileBirailSurface drag dragAttrContext draggerContext dropoffLocator duplicate duplicateCurve duplicateSurface dynCache dynControl dynExport dynExpression dynGlobals dynPaintEditor dynParticleCtx dynPref dynRelEdPanel dynRelEditor dynamicLoad editAttrLimits editDisplayLayerGlobals editDisplayLayerMembers editRenderLayerAdjustment editRenderLayerGlobals editRenderLayerMembers editor editorTemplate effector emit emitter enableDevice encodeString endString endsWith env equivalent equivalentTol erf error eval evalDeferred evalEcho event exactWorldBoundingBox exclusiveLightCheckBox exec executeForEachObject exists exp expression expressionEditorListen extendCurve extendSurface extrude fcheck fclose feof fflush fgetline fgetword file fileBrowserDialog fileDialog fileExtension fileInfo filetest filletCurve filter filterCurve filterExpand filterStudioImport findAllIntersections findAnimCurves findKeyframe findMenuItem findRelatedSkinCluster finder firstParentOf fitBspline flexor floatEq floatField floatFieldGrp floatScrollBar floatSlider floatSlider2 floatSliderButtonGrp floatSliderGrp floor flow fluidCacheInfo fluidEmitter fluidVoxelInfo flushUndo fmod fontDialog fopen formLayout format fprint frameLayout fread freeFormFillet frewind fromNativePath fwrite gamma gauss geometryConstraint getApplicationVersionAsFloat getAttr getClassification getDefaultBrush getFileList getFluidAttr getInputDeviceRange getMayaPanelTypes getModifiers getPanel getParticleAttr getPluginResource getenv getpid glRender glRenderEditor globalStitch gmatch goal gotoBindPose grabColor gradientControl gradientControlNoAttr graphDollyCtx graphSelectContext graphTrackCtx gravity grid gridLayout group groupObjectsByName HfAddAttractorToAS HfAssignAS HfBuildEqualMap HfBuildFurFiles HfBuildFurImages HfCancelAFR HfConnectASToHF HfCreateAttractor HfDeleteAS HfEditAS HfPerformCreateAS HfRemoveAttractorFromAS HfSelectAttached HfSelectAttractors HfUnAssignAS hardenPointCurve hardware hardwareRenderPanel headsUpDisplay headsUpMessage help helpLine hermite hide hilite hitTest hotBox hotkey hotkeyCheck hsv_to_rgb hudButton hudSlider hudSliderButton hwReflectionMap hwRender hwRenderLoad hyperGraph hyperPanel hyperShade hypot iconTextButton iconTextCheckBox iconTextRadioButton iconTextRadioCollection iconTextScrollList iconTextStaticLabel ikHandle ikHandleCtx ikHandleDisplayScale ikSolver ikSplineHandleCtx ikSystem ikSystemInfo ikfkDisplayMethod illustratorCurves image imfPlugins inheritTransform insertJoint insertJointCtx insertKeyCtx insertKnotCurve insertKnotSurface instance instanceable instancer intField intFieldGrp intScrollBar intSlider intSliderGrp interToUI internalVar intersect iprEngine isAnimCurve isConnected isDirty isParentOf isSameObject isTrue isValidObjectName isValidString isValidUiName isolateSelect itemFilter itemFilterAttr itemFilterRender itemFilterType joint jointCluster jointCtx jointDisplayScale jointLattice keyTangent keyframe keyframeOutliner keyframeRegionCurrentTimeCtx keyframeRegionDirectKeyCtx keyframeRegionDollyCtx keyframeRegionInsertKeyCtx keyframeRegionMoveKeyCtx keyframeRegionScaleKeyCtx keyframeRegionSelectKeyCtx keyframeRegionSetKeyCtx keyframeRegionTrackCtx keyframeStats lassoContext lattice latticeDeformKeyCtx launch launchImageEditor layerButton layeredShaderPort layeredTexturePort layout layoutDialog lightList lightListEditor lightListPanel lightlink lineIntersection linearPrecision linstep listAnimatable listAttr listCameras listConnections listDeviceAttachments listHistory listInputDeviceAxes listInputDeviceButtons listInputDevices listMenuAnnotation listNodeTypes listPanelCategories listRelatives listSets listTransforms listUnselected listerEditor loadFluid loadNewShelf loadPlugin loadPluginLanguageResources loadPrefObjects localizedPanelLabel lockNode loft log longNameOf lookThru ls lsThroughFilter lsType lsUI Mayatomr mag makeIdentity makeLive makePaintable makeRoll makeSingleSurface makeTubeOn makebot manipMoveContext manipMoveLimitsCtx manipOptions manipRotateContext manipRotateLimitsCtx manipScaleContext manipScaleLimitsCtx marker match max memory menu menuBarLayout menuEditor menuItem menuItemToShelf menuSet menuSetPref messageLine min minimizeApp mirrorJoint modelCurrentTimeCtx modelEditor modelPanel mouse movIn movOut move moveIKtoFK moveKeyCtx moveVertexAlongDirection multiProfileBirailSurface mute nParticle nameCommand nameField namespace namespaceInfo newPanelItems newton nodeCast nodeIconButton nodeOutliner nodePreset nodeType noise nonLinear normalConstraint normalize nurbsBoolean nurbsCopyUVSet nurbsCube nurbsEditUV nurbsPlane nurbsSelect nurbsSquare nurbsToPoly nurbsToPolygonsPref nurbsToSubdiv nurbsToSubdivPref nurbsUVSet nurbsViewDirectionVector objExists objectCenter objectLayer objectType objectTypeUI obsoleteProc oceanNurbsPreviewPlane offsetCurve offsetCurveOnSurface offsetSurface openGLExtension openMayaPref optionMenu optionMenuGrp optionVar orbit orbitCtx orientConstraint outlinerEditor outlinerPanel overrideModifier paintEffectsDisplay pairBlend palettePort paneLayout panel panelConfiguration panelHistory paramDimContext paramDimension paramLocator parent parentConstraint particle particleExists particleInstancer particleRenderInfo partition pasteKey pathAnimation pause pclose percent performanceOptions pfxstrokes pickWalk picture pixelMove planarSrf plane play playbackOptions playblast plugAttr plugNode pluginInfo pluginResourceUtil pointConstraint pointCurveConstraint pointLight pointMatrixMult pointOnCurve pointOnSurface pointPosition poleVectorConstraint polyAppend polyAppendFacetCtx polyAppendVertex polyAutoProjection polyAverageNormal polyAverageVertex polyBevel polyBlendColor polyBlindData polyBoolOp polyBridgeEdge polyCacheMonitor polyCheck polyChipOff polyClipboard polyCloseBorder polyCollapseEdge polyCollapseFacet polyColorBlindData polyColorDel polyColorPerVertex polyColorSet polyCompare polyCone polyCopyUV polyCrease polyCreaseCtx polyCreateFacet polyCreateFacetCtx polyCube polyCut polyCutCtx polyCylinder polyCylindricalProjection polyDelEdge polyDelFacet polyDelVertex polyDuplicateAndConnect polyDuplicateEdge polyEditUV polyEditUVShell polyEvaluate polyExtrudeEdge polyExtrudeFacet polyExtrudeVertex polyFlipEdge polyFlipUV polyForceUV polyGeoSampler polyHelix polyInfo polyInstallAction polyLayoutUV polyListComponentConversion polyMapCut polyMapDel polyMapSew polyMapSewMove polyMergeEdge polyMergeEdgeCtx polyMergeFacet polyMergeFacetCtx polyMergeUV polyMergeVertex polyMirrorFace polyMoveEdge polyMoveFacet polyMoveFacetUV polyMoveUV polyMoveVertex polyNormal polyNormalPerVertex polyNormalizeUV polyOptUvs polyOptions polyOutput polyPipe polyPlanarProjection polyPlane polyPlatonicSolid polyPoke polyPrimitive polyPrism polyProjection polyPyramid polyQuad polyQueryBlindData polyReduce polySelect polySelectConstraint polySelectConstraintMonitor polySelectCtx polySelectEditCtx polySeparate polySetToFaceNormal polySewEdge polyShortestPathCtx polySmooth polySoftEdge polySphere polySphericalProjection polySplit polySplitCtx polySplitEdge polySplitRing polySplitVertex polyStraightenUVBorder polySubdivideEdge polySubdivideFacet polyToSubdiv polyTorus polyTransfer polyTriangulate polyUVSet polyUnite polyWedgeFace popen popupMenu pose pow preloadRefEd print progressBar progressWindow projFileViewer projectCurve projectTangent projectionContext projectionManip promptDialog propModCtx propMove psdChannelOutliner psdEditTextureFile psdExport psdTextureFile putenv pwd python querySubdiv quit rad_to_deg radial radioButton radioButtonGrp radioCollection radioMenuItemCollection rampColorPort rand randomizeFollicles randstate rangeControl readTake rebuildCurve rebuildSurface recordAttr recordDevice redo reference referenceEdit referenceQuery refineSubdivSelectionList refresh refreshAE registerPluginResource rehash reloadImage removeJoint removeMultiInstance removePanelCategory rename renameAttr renameSelectionList renameUI render renderGlobalsNode renderInfo renderLayerButton renderLayerParent renderLayerPostProcess renderLayerUnparent renderManip renderPartition renderQualityNode renderSettings renderThumbnailUpdate renderWindowEditor renderWindowSelectContext renderer reorder reorderDeformers requires reroot resampleFluid resetAE resetPfxToPolyCamera resetTool resolutionNode retarget reverseCurve reverseSurface revolve rgb_to_hsv rigidBody rigidSolver roll rollCtx rootOf rot rotate rotationInterpolation roundConstantRadius rowColumnLayout rowLayout runTimeCommand runup sampleImage saveAllShelves saveAttrPreset saveFluid saveImage saveInitialState saveMenu savePrefObjects savePrefs saveShelf saveToolSettings scale scaleBrushBrightness scaleComponents scaleConstraint scaleKey scaleKeyCtx sceneEditor sceneUIReplacement scmh scriptCtx scriptEditorInfo scriptJob scriptNode scriptTable scriptToShelf scriptedPanel scriptedPanelType scrollField scrollLayout sculpt searchPathArray seed selLoadSettings select selectContext selectCurveCV selectKey selectKeyCtx selectKeyframeRegionCtx selectMode selectPref selectPriority selectType selectedNodes selectionConnection separator setAttr setAttrEnumResource setAttrMapping setAttrNiceNameResource setConstraintRestPosition setDefaultShadingGroup setDrivenKeyframe setDynamic setEditCtx setEditor setFluidAttr setFocus setInfinity setInputDeviceMapping setKeyCtx setKeyPath setKeyframe setKeyframeBlendshapeTargetWts setMenuMode setNodeNiceNameResource setNodeTypeFlag setParent setParticleAttr setPfxToPolyCamera setPluginResource setProject setStampDensity setStartupMessage setState setToolTo setUITemplate setXformManip sets shadingConnection shadingGeometryRelCtx shadingLightRelCtx shadingNetworkCompare shadingNode shapeCompare shelfButton shelfLayout shelfTabLayout shellField shortNameOf showHelp showHidden showManipCtx showSelectionInTitle showShadingGroupAttrEditor showWindow sign simplify sin singleProfileBirailSurface size sizeBytes skinCluster skinPercent smoothCurve smoothTangentSurface smoothstep snap2to2 snapKey snapMode snapTogetherCtx snapshot soft softMod softModCtx sort sound soundControl source spaceLocator sphere sphrand spotLight spotLightPreviewPort spreadSheetEditor spring sqrt squareSurface srtContext stackTrace startString startsWith stitchAndExplodeShell stitchSurface stitchSurfacePoints strcmp stringArrayCatenate stringArrayContains stringArrayCount stringArrayInsertAtIndex stringArrayIntersector stringArrayRemove stringArrayRemoveAtIndex stringArrayRemoveDuplicates stringArrayRemoveExact stringArrayToString stringToStringArray strip stripPrefixFromName stroke subdAutoProjection subdCleanTopology subdCollapse subdDuplicateAndConnect subdEditUV subdListComponentConversion subdMapCut subdMapSewMove subdMatchTopology subdMirror subdToBlind subdToPoly subdTransferUVsToCache subdiv subdivCrease subdivDisplaySmoothness substitute substituteAllString substituteGeometry substring surface surfaceSampler surfaceShaderList swatchDisplayPort switchTable symbolButton symbolCheckBox sysFile system tabLayout tan tangentConstraint texLatticeDeformContext texManipContext texMoveContext texMoveUVShellContext texRotateContext texScaleContext texSelectContext texSelectShortestPathCtx texSmudgeUVContext texWinToolCtx text textCurves textField textFieldButtonGrp textFieldGrp textManip textScrollList textToShelf textureDisplacePlane textureHairColor texturePlacementContext textureWindow threadCount threePointArcCtx timeControl timePort timerX toNativePath toggle toggleAxis toggleWindowVisibility tokenize tokenizeList tolerance tolower toolButton toolCollection toolDropped toolHasOptions toolPropertyWindow torus toupper trace track trackCtx transferAttributes transformCompare transformLimits translator trim trunc truncateFluidCache truncateHairCache tumble tumbleCtx turbulence twoPointArcCtx uiRes uiTemplate unassignInputDevice undo undoInfo ungroup uniform unit unloadPlugin untangleUV untitledFileName untrim upAxis updateAE userCtx uvLink uvSnapshot validateShelfName vectorize view2dToolCtx viewCamera viewClipPlane viewFit viewHeadOn viewLookAt viewManip viewPlace viewSet visor volumeAxis vortex waitCursor warning webBrowser webBrowserPrefs whatIs window windowPref wire wireContext workspace wrinkle wrinkleContext writeTake xbmLangPathList xform", -illegal:""},{begin:"<=",relevance:0},{begin:"=>",relevance:0},{begin:"/\\\\"},{begin:"\\\\/"}]},l={className:"built_in",variants:[{begin:":-\\|-->"},{begin:"=",relevance:0}]};return{aliases:["m","moo"],keywords:t,contains:[s,l,n,e.C_BLOCK_COMMENT_MODE,i,e.NUMBER_MODE,r,a,{begin:/:-/}]}}}),define("highlight/lib/languages/mipsasm",["require","exports","module"],function(e,t,n){n.exports=function(e){return{case_insensitive:!0,aliases:["mips"],lexemes:"\\.?"+e.IDENT_RE,keywords:{meta:".2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .ltorg ",built_in:"$0 $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 $16 $17 $18 $19 $20 $21 $22 $23 $24 $25 $26 $27 $28 $29 $30 $31 zero at v0 v1 a0 a1 a2 a3 a4 a5 a6 a7 t0 t1 t2 t3 t4 t5 t6 t7 t8 t9 s0 s1 s2 s3 s4 s5 s6 s7 s8 k0 k1 gp sp fp ra $f0 $f1 $f2 $f2 $f4 $f5 $f6 $f7 $f8 $f9 $f10 $f11 $f12 $f13 $f14 $f15 $f16 $f17 $f18 $f19 $f20 $f21 $f22 $f23 $f24 $f25 $f26 $f27 $f28 $f29 $f30 $f31 Context Random EntryLo0 EntryLo1 Context PageMask Wired EntryHi HWREna BadVAddr Count Compare SR IntCtl SRSCtl SRSMap Cause EPC PRId EBase Config Config1 Config2 Config3 LLAddr Debug DEPC DESAVE CacheErr ECC ErrorEPC TagLo DataLo TagHi DataHi WatchLo WatchHi PerfCtl PerfCnt "},contains:[{className:"keyword",begin:"\\b(addi?u?|andi?|b(al)?|beql?|bgez(al)?l?|bgtzl?|blezl?|bltz(al)?l?|bnel?|cl[oz]|divu?|ext|ins|j(al)?|jalr(.hb)?|jr(.hb)?|lbu?|lhu?|ll|lui|lw[lr]?|maddu?|mfhi|mflo|movn|movz|move|msubu?|mthi|mtlo|mul|multu?|nop|nor|ori?|rotrv?|sb|sc|se[bh]|sh|sllv?|slti?u?|srav?|srlv?|subu?|sw[lr]?|xori?|wsbh|abs.[sd]|add.[sd]|alnv.ps|bc1[ft]l?|c.(s?f|un|u?eq|[ou]lt|[ou]le|ngle?|seq|l[et]|ng[et]).[sd]|(ceil|floor|round|trunc).[lw].[sd]|cfc1|cvt.d.[lsw]|cvt.l.[dsw]|cvt.ps.s|cvt.s.[dlw]|cvt.s.p[lu]|cvt.w.[dls]|div.[ds]|ldx?c1|luxc1|lwx?c1|madd.[sd]|mfc1|mov[fntz]?.[ds]|msub.[sd]|mth?c1|mul.[ds]|neg.[ds]|nmadd.[ds]|nmsub.[ds]|p[lu][lu].ps|recip.fmt|r?sqrt.[ds]|sdx?c1|sub.[ds]|suxc1|swx?c1|break|cache|d?eret|[de]i|ehb|mfc0|mtc0|pause|prefx?|rdhwr|rdpgpr|sdbbp|ssnop|synci?|syscall|teqi?|tgei?u?|tlb(p|r|w[ir])|tlti?u?|tnei?|wait|wrpgpr)",end:"\\s"},e.COMMENT("[;#]","$"),e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",relevance:0},{className:"title",begin:"\\|",end:"\\|",illegal:"\\n",relevance:0},{className:"number",variants:[{begin:"0x[0-9a-f]+"},{begin:"\\b-?\\d+"}],relevance:0},{className:"symbol",variants:[{begin:"^\\s*[a-z_\\.\\$][a-z0-9_\\.\\$]+:"},{begin:"^\\s*[0-9]+:"},{begin:"[0-9]+[bf]"}],relevance:0}],illegal:"/"}}}),define("highlight/lib/languages/mizar",["require","exports","module"],function(e,t,n){n.exports=function(e){return{keywords:"environ vocabularies notations constructors definitions registrations theorems schemes requirements begin end definition registration cluster existence pred func defpred deffunc theorem proof let take assume then thus hence ex for st holds consider reconsider such that and in provided of as from be being by means equals implies iff redefine define now not or attr is mode suppose per cases set thesis contradiction scheme reserve struct correctness compatibility coherence symmetry assymetry reflexivity irreflexivity connectedness uniqueness commutativity idempotence involutiveness projectivity",contains:[e.COMMENT("::","$")]}}}),define("highlight/lib/languages/perl",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when",n={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:t},i={begin:"->{",end:"}"},r={variants:[{begin:/\$\d/},{begin:/[\$%@](\^\w\b|#\w+(::\w+)*|{\w+}|\w+(::\w*)*)/},{begin:/[\$%@][^\s\w{]/,relevance:0}]},a=[e.BACKSLASH_ESCAPE,n,r],o=[r,e.HASH_COMMENT_MODE,e.COMMENT("^\\=\\w","\\=cut",{endsWithParent:!0}),i,{className:"string",contains:a,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*\\<",end:"\\>",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:"{\\w+}",contains:[],relevance:0},{begin:"-?\\w+\\s*\\=\\>",contains:[],relevance:0}]},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",begin:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",relevance:10},{className:"regexp",begin:"(m|qr)?/",end:"/[a-z]*",contains:[e.BACKSLASH_ESCAPE],relevance:0}]},{className:"function",beginKeywords:"sub",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return n.contains=o,i.contains=o,{aliases:["pl","pm"],lexemes:/[\w\.]+/,keywords:t,contains:o}}}),define("highlight/lib/languages/mojolicious",["require","exports","module"],function(e,t,n){n.exports=function(e){return{subLanguage:"xml",contains:[{className:"meta",begin:"^__(END|DATA)__$"},{begin:"^\\s*%{1,2}={0,2}",end:"$",subLanguage:"perl"},{begin:"<%{1,2}={0,2}",end:"={0,1}%>",subLanguage:"perl",excludeBegin:!0,excludeEnd:!0}]}}}),define("highlight/lib/languages/monkey",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"number",relevance:0,variants:[{begin:"[$][a-fA-F0-9]+"},e.NUMBER_MODE]};return{case_insensitive:!0,keywords:{keyword:"public private property continue exit extern new try catch eachin not abstract final select case default const local global field end if then else elseif endif while wend repeat until forever for to step next return module inline throw import",built_in:"DebugLog DebugStop Error Print ACos ACosr ASin ASinr ATan ATan2 ATan2r ATanr Abs Abs Ceil Clamp Clamp Cos Cosr Exp Floor Log Max Max Min Min Pow Sgn Sgn Sin Sinr Sqrt Tan Tanr Seed PI HALFPI TWOPI",literal:"true false null and or shl shr mod"},illegal:/\/\*/,contains:[e.COMMENT("#rem","#end"),e.COMMENT("'","$",{relevance:0}),{className:"function",beginKeywords:"function method",end:"[(=:]|$",illegal:/\n/,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"class",beginKeywords:"class interface",end:"$",contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{className:"built_in",begin:"\\b(self|super)\\b"},{className:"meta",begin:"\\s*#",end:"$",keywords:{"meta-keyword":"if else elseif endif end then"}},{className:"meta",begin:"^\\s*strict\\b"},{beginKeywords:"alias",end:"=",contains:[e.UNDERSCORE_TITLE_MODE]},e.QUOTE_STRING_MODE,t]}}}),define("highlight/lib/languages/moonscript",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={keyword:"if then not for in while do return else elseif break continue switch and or unless when class extends super local import export from using",literal:"true false nil",built_in:"_G _VERSION assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall coroutine debug io math os package string table"},n="[A-Za-z$_][0-9A-Za-z$_]*",i={className:"subst",begin:/#\{/,end:/}/,keywords:t},r=[e.inherit(e.C_NUMBER_MODE,{starts:{end:"(\\s*/)?",relevance:0}}),{className:"string",variants:[{begin:/'/,end:/'/,contains:[e.BACKSLASH_ESCAPE]},{begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,i]}]},{className:"built_in",begin:"@__"+e.IDENT_RE},{begin:"@"+e.IDENT_RE},{begin:e.IDENT_RE+"\\\\"+e.IDENT_RE}];i.contains=r;var a=e.inherit(e.TITLE_MODE,{begin:n}),o="(\\(.*\\))?\\s*\\B[-=]>",s={className:"params",begin:"\\([^\\(]",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:t,contains:["self"].concat(r)}]};return{aliases:["moon"],keywords:t,illegal:/\/\*/,contains:r.concat([e.COMMENT("--","$"),{className:"function",begin:"^\\s*"+n+"\\s*=\\s*"+o,end:"[-=]>",returnBegin:!0,contains:[a,s]},{begin:/[\(,:=]\s*/,relevance:0,contains:[{className:"function",begin:o,end:"[-=]>",returnBegin:!0,contains:[s]}]},{className:"class",beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[a]},a]},{className:"name",begin:n+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}}),define("highlight/lib/languages/nginx",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"variable",variants:[{begin:/\$\d+/},{begin:/\$\{/,end:/}/},{begin:"[\\$\\@]"+e.UNDERSCORE_IDENT_RE}]},n={endsWithParent:!0,lexemes:"[a-z/_]+",keywords:{literal:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},relevance:0,illegal:"=>",contains:[e.HASH_COMMENT_MODE,{className:"string",contains:[e.BACKSLASH_ESCAPE,t],variants:[{begin:/"/,end:/"/},{begin:/'/,end:/'/}]},{begin:"([a-z]+):/",end:"\\s",endsWithParent:!0,excludeEnd:!0,contains:[t]},{className:"regexp",contains:[e.BACKSLASH_ESCAPE,t],variants:[{begin:"\\s\\^",end:"\\s|{|;",returnEnd:!0},{begin:"~\\*?\\s+",end:"\\s|{|;",returnEnd:!0},{begin:"\\*(\\.[a-z\\-]+)+"},{begin:"([a-z\\-]+\\.)+\\*"}]},{className:"number",begin:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{className:"number",begin:"\\b\\d+[kKmMgGdshdwy]*\\b",relevance:0},t]};return{aliases:["nginxconf"],contains:[e.HASH_COMMENT_MODE,{begin:e.UNDERSCORE_IDENT_RE+"\\s+{",returnBegin:!0,end:"{",contains:[{className:"section",begin:e.UNDERSCORE_IDENT_RE}],relevance:0},{begin:e.UNDERSCORE_IDENT_RE+"\\s",end:";|{",returnBegin:!0,contains:[{className:"attribute",begin:e.UNDERSCORE_IDENT_RE,starts:n}],relevance:0}],illegal:"[^\\s\\}]"}}}),define("highlight/lib/languages/nimrod",["require","exports","module"],function(e,t,n){n.exports=function(e){return{aliases:["nim"],keywords:{keyword:"addr and as asm bind block break case cast const continue converter discard distinct div do elif else end enum except export finally for from generic if import in include interface is isnot iterator let macro method mixin mod nil not notin object of or out proc ptr raise ref return shl shr static template try tuple type using var when while with without xor yield",literal:"shared guarded stdin stdout stderr result true false",built_in:"int int8 int16 int32 int64 uint uint8 uint16 uint32 uint64 float float32 float64 bool char string cstring pointer expr stmt void auto any range array openarray varargs seq set clong culong cchar cschar cshort cint csize clonglong cfloat cdouble clongdouble cuchar cushort cuint culonglong cstringarray semistatic"},contains:[{className:"meta",begin:/{\./,end:/\.}/,relevance:10},{className:"string",begin:/[a-zA-Z]\w*"/,end:/"/,contains:[{begin:/""/}]},{className:"string",begin:/([a-zA-Z]\w*)?"""/,end:/"""/},e.QUOTE_STRING_MODE,{className:"type",begin:/\b[A-Z]\w+\b/,relevance:0},{className:"number",relevance:0,variants:[{begin:/\b(0[xX][0-9a-fA-F][_0-9a-fA-F]*)('?[iIuU](8|16|32|64))?/},{begin:/\b(0o[0-7][_0-7]*)('?[iIuUfF](8|16|32|64))?/},{begin:/\b(0(b|B)[01][_01]*)('?[iIuUfF](8|16|32|64))?/},{begin:/\b(\d[_\d]*)('?[iIuUfF](8|16|32|64))?/}]},e.HASH_COMMENT_MODE]}}}),define("highlight/lib/languages/nix",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={keyword:"rec with let in inherit assert if else then",literal:"true false or and null",built_in:"import abort baseNameOf dirOf isNull builtins map removeAttrs throw toString derivation"},n={className:"subst",begin:/\$\{/,end:/}/,keywords:t},i={begin:/[a-zA-Z0-9-_]+(\s*=)/,returnBegin:!0,relevance:0,contains:[{className:"attr",begin:/\S+/}]},r={className:"string",contains:[n],variants:[{begin:"''",end:"''"},{begin:'"',end:'"'}]},a=[e.NUMBER_MODE,e.HASH_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,r,i];return n.contains=a,{aliases:["nixos"],keywords:t,contains:a}}}),define("highlight/lib/languages/nsis",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"variable",begin:/\$(ADMINTOOLS|APPDATA|CDBURN_AREA|CMDLINE|COMMONFILES32|COMMONFILES64|COMMONFILES|COOKIES|DESKTOP|DOCUMENTS|EXEDIR|EXEFILE|EXEPATH|FAVORITES|FONTS|HISTORY|HWNDPARENT|INSTDIR|INTERNET_CACHE|LANGUAGE|LOCALAPPDATA|MUSIC|NETHOOD|OUTDIR|PICTURES|PLUGINSDIR|PRINTHOOD|PROFILE|PROGRAMFILES32|PROGRAMFILES64|PROGRAMFILES|QUICKLAUNCH|RECENT|RESOURCES_LOCALIZED|RESOURCES|SENDTO|SMPROGRAMS|SMSTARTUP|STARTMENU|SYSDIR|TEMP|TEMPLATES|VIDEOS|WINDIR)/},n={className:"variable",begin:/\$+{[\w\.:-]+}/},i={className:"variable",begin:/\$+\w+/,illegal:/\(\){}/},r={className:"variable",begin:/\$+\([\w\^\.:-]+\)/},a={className:"params",begin:"(ARCHIVE|FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_NORMAL|FILE_ATTRIBUTE_OFFLINE|FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_SYSTEM|FILE_ATTRIBUTE_TEMPORARY|HKCR|HKCU|HKDD|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_DYN_DATA|HKEY_LOCAL_MACHINE|HKEY_PERFORMANCE_DATA|HKEY_USERS|HKLM|HKPD|HKU|IDABORT|IDCANCEL|IDIGNORE|IDNO|IDOK|IDRETRY|IDYES|MB_ABORTRETRYIGNORE|MB_DEFBUTTON1|MB_DEFBUTTON2|MB_DEFBUTTON3|MB_DEFBUTTON4|MB_ICONEXCLAMATION|MB_ICONINFORMATION|MB_ICONQUESTION|MB_ICONSTOP|MB_OK|MB_OKCANCEL|MB_RETRYCANCEL|MB_RIGHT|MB_RTLREADING|MB_SETFOREGROUND|MB_TOPMOST|MB_USERICON|MB_YESNO|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SYSTEM|TEMPORARY)"},o={className:"keyword",begin:/\!(addincludedir|addplugindir|appendfile|cd|define|delfile|echo|else|endif|error|execute|finalize|getdllversionsystem|ifdef|ifmacrodef|ifmacrondef|ifndef|if|include|insertmacro|macroend|macro|makensis|packhdr|searchparse|searchreplace|tempfile|undef|verbose|warning)/},s={className:"subst",begin:/\$(\\[nrt]|\$)/},l={className:"class",begin:/\w+\:\:\w+/},c={className:"string",variants:[{begin:'"',end:'"'},{begin:"'",end:"'"},{begin:"`",end:"`"}],illegal:/\n/,contains:[s,t,n,i,r]};return{case_insensitive:!1,keywords:{keyword:"Abort AddBrandingImage AddSize AllowRootDirInstall AllowSkipFiles AutoCloseWindow BGFont BGGradient BrandingText BringToFront Call CallInstDLL Caption ChangeUI CheckBitmap ClearErrors CompletedText ComponentText CopyFiles CRCCheck CreateDirectory CreateFont CreateShortCut Delete DeleteINISec DeleteINIStr DeleteRegKey DeleteRegValue DetailPrint DetailsButtonText DirText DirVar DirVerify EnableWindow EnumRegKey EnumRegValue Exch Exec ExecShell ExecWait ExpandEnvStrings File FileBufSize FileClose FileErrorText FileOpen FileRead FileReadByte FileReadUTF16LE FileReadWord FileSeek FileWrite FileWriteByte FileWriteUTF16LE FileWriteWord FindClose FindFirst FindNext FindWindow FlushINI FunctionEnd GetCurInstType GetCurrentAddress GetDlgItem GetDLLVersion GetDLLVersionLocal GetErrorLevel GetFileTime GetFileTimeLocal GetFullPathName GetFunctionAddress GetInstDirError GetLabelAddress GetTempFileName Goto HideWindow Icon IfAbort IfErrors IfFileExists IfRebootFlag IfSilent InitPluginsDir InstallButtonText InstallColors InstallDir InstallDirRegKey InstProgressFlags InstType InstTypeGetText InstTypeSetText IntCmp IntCmpU IntFmt IntOp IsWindow LangString LicenseBkColor LicenseData LicenseForceSelection LicenseLangString LicenseText LoadLanguageFile LockWindow LogSet LogText ManifestDPIAware ManifestSupportedOS MessageBox MiscButtonText Name Nop OutFile Page PageCallbacks PageExEnd Pop Push Quit ReadEnvStr ReadINIStr ReadRegDWORD ReadRegStr Reboot RegDLL Rename RequestExecutionLevel ReserveFile Return RMDir SearchPath SectionEnd SectionGetFlags SectionGetInstTypes SectionGetSize SectionGetText SectionGroupEnd SectionIn SectionSetFlags SectionSetInstTypes SectionSetSize SectionSetText SendMessage SetAutoClose SetBrandingImage SetCompress SetCompressor SetCompressorDictSize SetCtlColors SetCurInstType SetDatablockOptimize SetDateSave SetDetailsPrint SetDetailsView SetErrorLevel SetErrors SetFileAttributes SetFont SetOutPath SetOverwrite SetRebootFlag SetRegView SetShellVarContext SetSilent ShowInstDetails ShowUninstDetails ShowWindow SilentInstall SilentUnInstall Sleep SpaceTexts StrCmp StrCmpS StrCpy StrLen SubCaption Unicode UninstallButtonText UninstallCaption UninstallIcon UninstallSubCaption UninstallText UninstPage UnRegDLL Var VIAddVersionKey VIFileVersion VIProductVersion WindowIcon WriteINIStr WriteRegBin WriteRegDWORD WriteRegExpandStr WriteRegStr WriteUninstaller XPStyle",literal:"admin all auto both bottom bzip2 colored components current custom directory false force hide highest ifdiff ifnewer instfiles lastused leave left license listonly lzma nevershow none normal notset off on open print right show silent silentlog smooth textonly top true try un.components un.custom un.directory un.instfiles un.license uninstConfirm user Win10 Win7 Win8 WinVista zlib"},contains:[e.HASH_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.COMMENT(";","$",{relevance:0}),{className:"function",beginKeywords:"Function PageEx Section SectionGroup",end:"$"},c,o,n,i,r,a,l,e.NUMBER_MODE]}}}),define("highlight/lib/languages/objectivec",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n={keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required @encode @package @import @defs @compatibility_alias __bridge __bridge_transfer __bridge_retained __bridge_retain __covariant __contravariant __kindof _Nonnull _Nullable _Null_unspecified __FUNCTION__ __PRETTY_FUNCTION__ __attribute__ getter setter retain unsafe_unretained nonnull nullable null_unspecified null_resettable class instancetype NS_DESIGNATED_INITIALIZER NS_UNAVAILABLE NS_REQUIRES_SUPER NS_RETURNS_INNER_POINTER NS_INLINE NS_AVAILABLE NS_DEPRECATED NS_ENUM NS_OPTIONS NS_SWIFT_UNAVAILABLE NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_REFINED_FOR_SWIFT NS_SWIFT_NAME NS_SWIFT_NOTHROW NS_DURING NS_HANDLER NS_ENDHANDLER NS_VALUERETURN NS_VOIDRETURN",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"},i=/[a-zA-Z@][a-zA-Z0-9_]*/,r="@interface @class @protocol @implementation";return{aliases:["mm","objc","obj-c"],keywords:n,lexemes:i,illegal:""}]}]},{className:"class",begin:"("+r.split(" ").join("|")+")\\b",end:"({|$)",excludeEnd:!0,keywords:r,lexemes:i,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}}),define("highlight/lib/languages/ocaml",["require","exports","module"],function(e,t,n){n.exports=function(e){return{aliases:["ml"],keywords:{keyword:"and as assert asr begin class constraint do done downto else end exception external for fun function functor if in include inherit! inherit initializer land lazy let lor lsl lsr lxor match method!|10 method mod module mutable new object of open! open or private rec sig struct then to try type val! val virtual when while with parser value",built_in:"array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 string unit in_channel out_channel ref",literal:"true false"},illegal:/\/\/|>>/,lexemes:"[a-z_]\\w*!?",contains:[{className:"literal",begin:"\\[(\\|\\|)?\\]|\\(\\)",relevance:0},e.COMMENT("\\(\\*","\\*\\)",{contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{className:"type",begin:"`[A-Z][\\w']*"},{className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},{begin:"[a-z_]\\w*'[\\w']*",relevance:0},e.inherit(e.APOS_STRING_MODE,{className:"string",relevance:0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"number",begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",relevance:0},{begin:/[-=]>/}]}}}),define("highlight/lib/languages/openscad",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"keyword",begin:"\\$(f[asn]|t|vp[rtd]|children)"},n={className:"literal",begin:"false|true|PI|undef"},i={className:"number",begin:"\\b\\d+(\\.\\d+)?(e-?\\d+)?",relevance:0},r=e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),a={className:"meta",keywords:{"meta-keyword":"include use"},begin:"include|use <",end:">"},o={className:"params",begin:"\\(",end:"\\)",contains:["self",i,r,t,n]},s={begin:"[*!#%]",relevance:0},l={className:"function",beginKeywords:"module function",end:"\\=|\\{",contains:[o,e.UNDERSCORE_TITLE_MODE]};return{aliases:["scad"],keywords:{keyword:"function module include use for intersection_for if else \\%",literal:"false true PI undef",built_in:"circle square polygon text sphere cube cylinder polyhedron translate rotate scale resize mirror multmatrix color offset hull minkowski union difference intersection abs sign sin cos tan acos asin atan atan2 floor round ceil ln log pow sqrt exp rands min max concat lookup str chr search version version_num norm cross parent_module echo import import_dxf dxf_linear_extrude linear_extrude rotate_extrude surface projection render children dxf_cross dxf_dim let assign"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,i,a,r,t,s,l]}}}),define("highlight/lib/languages/oxygene",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="abstract add and array as asc aspect assembly async begin break block by case class concat const copy constructor continue create default delegate desc distinct div do downto dynamic each else empty end ensure enum equals event except exit extension external false final finalize finalizer finally flags for forward from function future global group has if implementation implements implies in index inherited inline interface into invariants is iterator join locked locking loop matching method mod module namespace nested new nil not notify nullable of old on operator or order out override parallel params partial pinned private procedure property protected public queryable raise read readonly record reintroduce remove repeat require result reverse sealed select self sequence set shl shr skip static step soft take then to true try tuple type union unit unsafe until uses using var virtual raises volatile where while with write xor yield await mapped deprecated stdcall cdecl pascal register safecall overload library platform reference packed strict published autoreleasepool selector strong weak unretained",n=e.COMMENT("{","}",{relevance:0}),i=e.COMMENT("\\(\\*","\\*\\)",{relevance:10}),r={className:"string",begin:"'",end:"'",contains:[{begin:"''"}]},a={className:"string",begin:"(#\\d+)+"},o={className:"function",beginKeywords:"function constructor destructor procedure method",end:"[:;]",keywords:"function constructor|10 destructor|10 procedure|10 method|10",contains:[e.TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",keywords:t,contains:[r,a]},n,i]};return{case_insensitive:!0,lexemes:/\.?\w+/,keywords:t,illegal:'("|\\$[G-Zg-z]|\\/\\*||->)',contains:[n,i,e.C_LINE_COMMENT_MODE,r,a,e.NUMBER_MODE,o,{className:"class",begin:"=\\bclass\\b",end:"end;",keywords:t,contains:[r,a,n,i,e.C_LINE_COMMENT_MODE,o]}]}}}),define("highlight/lib/languages/parser3",["require","exports","module"],function(e,t,n){n.exports=function(e){var t=e.COMMENT("{","}",{contains:["self"]});return{subLanguage:"xml",relevance:0,contains:[e.COMMENT("^#","$"),e.COMMENT("\\^rem{","}",{relevance:10,contains:[t]}),{className:"meta",begin:"^@(?:BASE|USE|CLASS|OPTIONS)$",relevance:10},{className:"title",begin:"@[\\w\\-]+\\[[\\w^;\\-]*\\](?:\\[[\\w^;\\-]*\\])?(?:.*)$"},{className:"variable",begin:"\\$\\{?[\\w\\-\\.\\:]+\\}?"},{className:"keyword",begin:"\\^[\\w\\-\\.\\:]+"},{className:"number",begin:"\\^#[0-9a-fA-F]+"},e.C_NUMBER_MODE]}}}),define("highlight/lib/languages/pf",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"variable",begin:/\$[\w\d#@][\w\d_]*/},n={className:"variable",begin:/<(?!\/)/,end:/>/};return{aliases:["pf.conf"],lexemes:/[a-z0-9_<>-]+/,keywords:{built_in:"block match pass load anchor|5 antispoof|10 set table",keyword:"in out log quick on rdomain inet inet6 proto from port os to routeallow-opts divert-packet divert-reply divert-to flags group icmp-typeicmp6-type label once probability recieved-on rtable prio queuetos tag tagged user keep fragment for os dropaf-to|10 binat-to|10 nat-to|10 rdr-to|10 bitmask least-stats random round-robinsource-hash static-portdup-to reply-to route-toparent bandwidth default min max qlimitblock-policy debug fingerprints hostid limit loginterface optimizationreassemble ruleset-optimization basic none profile skip state-defaultsstate-policy timeoutconst counters persistno modulate synproxy state|5 floating if-bound no-sync pflow|10 sloppysource-track global rule max-src-nodes max-src-states max-src-connmax-src-conn-rate overload flushscrub|5 max-mss min-ttl no-df|10 random-id",literal:"all any no-route self urpf-failed egress|5 unknown"},contains:[e.HASH_COMMENT_MODE,e.NUMBER_MODE,e.QUOTE_STRING_MODE,t,n]}}}),define("highlight/lib/languages/php",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={begin:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"},n={className:"meta",begin:/<\?(php)?|\?>/},i={className:"string",contains:[e.BACKSLASH_ESCAPE,n],variants:[{begin:'b"',end:'"'},{begin:"b'",end:"'"},e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null})]},r={variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]};return{aliases:["php3","php4","php5","php6"],case_insensitive:!0,keywords:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",contains:[e.HASH_COMMENT_MODE,e.COMMENT("//","$",{contains:[n]}),e.COMMENT("/\\*","\\*/",{contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.COMMENT("__halt_compiler.+?;",!1,{endsWithParent:!0,keywords:"__halt_compiler",lexemes:e.UNDERSCORE_IDENT_RE}),{className:"string",begin:/<<<['"]?\w+['"]?$/,end:/^\w+;?$/,contains:[e.BACKSLASH_ESCAPE,{className:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]}]},n,{className:"keyword",begin:/\$this\b/},t,{begin:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{className:"function",beginKeywords:"function",end:/[;{]/,excludeEnd:!0,illegal:"\\$|\\[|%",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:["self",t,e.C_BLOCK_COMMENT_MODE,i,r]}]},{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,illegal:/[:\(\$"]/,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",end:";",illegal:/[\.']/,contains:[e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"use",end:";",contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"=>"},i,r]}}}),define("highlight/lib/languages/pony",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={keyword:"actor addressof and as be break class compile_error compile_intrinsicconsume continue delegate digestof do else elseif embed end errorfor fun if ifdef in interface is isnt lambda let match new not objector primitive recover repeat return struct then trait try type until use var where while with xor", -meta:"iso val tag trn box ref",literal:"this false true"},n={className:"string",begin:'"""',end:'"""',relevance:10},i={className:"string",begin:'"',end:'"',contains:[e.BACKSLASH_ESCAPE]},r={className:"string",begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE],relevance:0},a={className:"type",begin:"\\b_?[A-Z][\\w]*",relevance:0},o={begin:e.IDENT_RE+"'",relevance:0},s={className:"class",beginKeywords:"class actor",end:"$",contains:[e.TITLE_MODE,e.C_LINE_COMMENT_MODE]},l={className:"function",beginKeywords:"new fun",end:"=>",contains:[e.TITLE_MODE,{begin:/\(/,end:/\)/,contains:[a,o,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE]},{begin:/:/,endsWithParent:!0,contains:[a]},e.C_LINE_COMMENT_MODE]};return{keywords:t,contains:[s,l,a,n,i,r,o,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}}}),define("highlight/lib/languages/powershell",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={begin:"`[\\s\\S]",relevance:0},n={className:"variable",variants:[{begin:/\$[\w\d][\w\d_:]*/}]},i={className:"literal",begin:/\$(null|true|false)\b/},r={className:"string",variants:[{begin:/"/,end:/"/},{begin:/@"/,end:/^"@/}],contains:[t,n,{className:"variable",begin:/\$[A-z]/,end:/[^A-z]/}]},a={className:"string",variants:[{begin:/'/,end:/'/},{begin:/@'/,end:/^'@/}]},o={className:"doctag",variants:[{begin:/\.(synopsis|description|example|inputs|outputs|notes|link|component|role|functionality)/},{begin:/\.(parameter|forwardhelptargetname|forwardhelpcategory|remotehelprunspace|externalhelp)\s+\S+/}]},s=e.inherit(e.COMMENT(null,null),{variants:[{begin:/#/,end:/$/},{begin:/<#/,end:/#>/}],contains:[o]});return{aliases:["ps"],lexemes:/-?[A-z\.\-]+/,case_insensitive:!0,keywords:{keyword:"if else foreach return function do while until elseif begin for trap data dynamicparam end break throw param continue finally in switch exit filter try process catch",built_in:"Add-Computer Add-Content Add-History Add-JobTrigger Add-Member Add-PSSnapin Add-Type Checkpoint-Computer Clear-Content Clear-EventLog Clear-History Clear-Host Clear-Item Clear-ItemProperty Clear-Variable Compare-Object Complete-Transaction Connect-PSSession Connect-WSMan Convert-Path ConvertFrom-Csv ConvertFrom-Json ConvertFrom-SecureString ConvertFrom-StringData ConvertTo-Csv ConvertTo-Html ConvertTo-Json ConvertTo-SecureString ConvertTo-Xml Copy-Item Copy-ItemProperty Debug-Process Disable-ComputerRestore Disable-JobTrigger Disable-PSBreakpoint Disable-PSRemoting Disable-PSSessionConfiguration Disable-WSManCredSSP Disconnect-PSSession Disconnect-WSMan Disable-ScheduledJob Enable-ComputerRestore Enable-JobTrigger Enable-PSBreakpoint Enable-PSRemoting Enable-PSSessionConfiguration Enable-ScheduledJob Enable-WSManCredSSP Enter-PSSession Exit-PSSession Export-Alias Export-Clixml Export-Console Export-Counter Export-Csv Export-FormatData Export-ModuleMember Export-PSSession ForEach-Object Format-Custom Format-List Format-Table Format-Wide Get-Acl Get-Alias Get-AuthenticodeSignature Get-ChildItem Get-Command Get-ComputerRestorePoint Get-Content Get-ControlPanelItem Get-Counter Get-Credential Get-Culture Get-Date Get-Event Get-EventLog Get-EventSubscriber Get-ExecutionPolicy Get-FormatData Get-Host Get-HotFix Get-Help Get-History Get-IseSnippet Get-Item Get-ItemProperty Get-Job Get-JobTrigger Get-Location Get-Member Get-Module Get-PfxCertificate Get-Process Get-PSBreakpoint Get-PSCallStack Get-PSDrive Get-PSProvider Get-PSSession Get-PSSessionConfiguration Get-PSSnapin Get-Random Get-ScheduledJob Get-ScheduledJobOption Get-Service Get-TraceSource Get-Transaction Get-TypeData Get-UICulture Get-Unique Get-Variable Get-Verb Get-WinEvent Get-WmiObject Get-WSManCredSSP Get-WSManInstance Group-Object Import-Alias Import-Clixml Import-Counter Import-Csv Import-IseSnippet Import-LocalizedData Import-PSSession Import-Module Invoke-AsWorkflow Invoke-Command Invoke-Expression Invoke-History Invoke-Item Invoke-RestMethod Invoke-WebRequest Invoke-WmiMethod Invoke-WSManAction Join-Path Limit-EventLog Measure-Command Measure-Object Move-Item Move-ItemProperty New-Alias New-Event New-EventLog New-IseSnippet New-Item New-ItemProperty New-JobTrigger New-Object New-Module New-ModuleManifest New-PSDrive New-PSSession New-PSSessionConfigurationFile New-PSSessionOption New-PSTransportOption New-PSWorkflowExecutionOption New-PSWorkflowSession New-ScheduledJobOption New-Service New-TimeSpan New-Variable New-WebServiceProxy New-WinEvent New-WSManInstance New-WSManSessionOption Out-Default Out-File Out-GridView Out-Host Out-Null Out-Printer Out-String Pop-Location Push-Location Read-Host Receive-Job Register-EngineEvent Register-ObjectEvent Register-PSSessionConfiguration Register-ScheduledJob Register-WmiEvent Remove-Computer Remove-Event Remove-EventLog Remove-Item Remove-ItemProperty Remove-Job Remove-JobTrigger Remove-Module Remove-PSBreakpoint Remove-PSDrive Remove-PSSession Remove-PSSnapin Remove-TypeData Remove-Variable Remove-WmiObject Remove-WSManInstance Rename-Computer Rename-Item Rename-ItemProperty Reset-ComputerMachinePassword Resolve-Path Restart-Computer Restart-Service Restore-Computer Resume-Job Resume-Service Save-Help Select-Object Select-String Select-Xml Send-MailMessage Set-Acl Set-Alias Set-AuthenticodeSignature Set-Content Set-Date Set-ExecutionPolicy Set-Item Set-ItemProperty Set-JobTrigger Set-Location Set-PSBreakpoint Set-PSDebug Set-PSSessionConfiguration Set-ScheduledJob Set-ScheduledJobOption Set-Service Set-StrictMode Set-TraceSource Set-Variable Set-WmiInstance Set-WSManInstance Set-WSManQuickConfig Show-Command Show-ControlPanelItem Show-EventLog Sort-Object Split-Path Start-Job Start-Process Start-Service Start-Sleep Start-Transaction Start-Transcript Stop-Computer Stop-Job Stop-Process Stop-Service Stop-Transcript Suspend-Job Suspend-Service Tee-Object Test-ComputerSecureChannel Test-Connection Test-ModuleManifest Test-Path Test-PSSessionConfigurationFile Trace-Command Unblock-File Undo-Transaction Unregister-Event Unregister-PSSessionConfiguration Unregister-ScheduledJob Update-FormatData Update-Help Update-List Update-TypeData Use-Transaction Wait-Event Wait-Job Wait-Process Where-Object Write-Debug Write-Error Write-EventLog Write-Host Write-Output Write-Progress Write-Verbose Write-Warning Add-MDTPersistentDrive Disable-MDTMonitorService Enable-MDTMonitorService Get-MDTDeploymentShareStatistics Get-MDTMonitorData Get-MDTOperatingSystemCatalog Get-MDTPersistentDrive Import-MDTApplication Import-MDTDriver Import-MDTOperatingSystem Import-MDTPackage Import-MDTTaskSequence New-MDTDatabase Remove-MDTMonitorData Remove-MDTPersistentDrive Restore-MDTPersistentDrive Set-MDTMonitorData Test-MDTDeploymentShare Test-MDTMonitorData Update-MDTDatabaseSchema Update-MDTDeploymentShare Update-MDTLinkedDS Update-MDTMedia Update-MDTMedia Add-VamtProductKey Export-VamtData Find-VamtManagedMachine Get-VamtConfirmationId Get-VamtProduct Get-VamtProductKey Import-VamtData Initialize-VamtData Install-VamtConfirmationId Install-VamtProductActivation Install-VamtProductKey Update-VamtProduct",nomarkup:"-ne -eq -lt -gt -ge -le -not -like -notlike -match -notmatch -contains -notcontains -in -notin -replace"},contains:[t,e.NUMBER_MODE,r,a,i,n,s]}}}),define("highlight/lib/languages/processing",["require","exports","module"],function(e,t,n){n.exports=function(e){return{keywords:{keyword:"BufferedReader PVector PFont PImage PGraphics HashMap boolean byte char color double float int long String Array FloatDict FloatList IntDict IntList JSONArray JSONObject Object StringDict StringList Table TableRow XML false synchronized int abstract float private char boolean static null if const for true while long throw strictfp finally protected import native final return void enum else break transient new catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private",literal:"P2D P3D HALF_PI PI QUARTER_PI TAU TWO_PI",title:"setup draw",built_in:"displayHeight displayWidth mouseY mouseX mousePressed pmouseX pmouseY key keyCode pixels focused frameCount frameRate height width size createGraphics beginDraw createShape loadShape PShape arc ellipse line point quad rect triangle bezier bezierDetail bezierPoint bezierTangent curve curveDetail curvePoint curveTangent curveTightness shape shapeMode beginContour beginShape bezierVertex curveVertex endContour endShape quadraticVertex vertex ellipseMode noSmooth rectMode smooth strokeCap strokeJoin strokeWeight mouseClicked mouseDragged mouseMoved mousePressed mouseReleased mouseWheel keyPressed keyPressedkeyReleased keyTyped print println save saveFrame day hour millis minute month second year background clear colorMode fill noFill noStroke stroke alpha blue brightness color green hue lerpColor red saturation modelX modelY modelZ screenX screenY screenZ ambient emissive shininess specular add createImage beginCamera camera endCamera frustum ortho perspective printCamera printProjection cursor frameRate noCursor exit loop noLoop popStyle pushStyle redraw binary boolean byte char float hex int str unbinary unhex join match matchAll nf nfc nfp nfs split splitTokens trim append arrayCopy concat expand reverse shorten sort splice subset box sphere sphereDetail createInput createReader loadBytes loadJSONArray loadJSONObject loadStrings loadTable loadXML open parseXML saveTable selectFolder selectInput beginRaw beginRecord createOutput createWriter endRaw endRecord PrintWritersaveBytes saveJSONArray saveJSONObject saveStream saveStrings saveXML selectOutput popMatrix printMatrix pushMatrix resetMatrix rotate rotateX rotateY rotateZ scale shearX shearY translate ambientLight directionalLight lightFalloff lights lightSpecular noLights normal pointLight spotLight image imageMode loadImage noTint requestImage tint texture textureMode textureWrap blend copy filter get loadPixels set updatePixels blendMode loadShader PShaderresetShader shader createFont loadFont text textFont textAlign textLeading textMode textSize textWidth textAscent textDescent abs ceil constrain dist exp floor lerp log mag map max min norm pow round sq sqrt acos asin atan atan2 cos degrees radians sin tan noise noiseDetail noiseSeed random randomGaussian randomSeed"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE]}}}),define("highlight/lib/languages/profile",["require","exports","module"],function(e,t,n){n.exports=function(e){return{contains:[e.C_NUMBER_MODE,{begin:"[a-zA-Z_][\\da-zA-Z_]+\\.[\\da-zA-Z_]{1,3}",end:":",excludeEnd:!0},{begin:"(ncalls|tottime|cumtime)",end:"$",keywords:"ncalls tottime|10 cumtime|10 filename",relevance:10},{begin:"function calls",end:"$",contains:[e.C_NUMBER_MODE],relevance:10},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"\\(",end:"\\)$",excludeBegin:!0,excludeEnd:!0,relevance:0}]}}}),define("highlight/lib/languages/prolog",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={begin:/[a-z][A-Za-z0-9_]*/,relevance:0},n={className:"symbol",variants:[{begin:/[A-Z][a-zA-Z0-9_]*/},{begin:/_[A-Za-z0-9_]*/}],relevance:0},i={begin:/\(/,end:/\)/,relevance:0},r={begin:/\[/,end:/\]/},a={className:"comment",begin:/%/,end:/$/,contains:[e.PHRASAL_WORDS_MODE]},o={className:"string",begin:/`/,end:/`/,contains:[e.BACKSLASH_ESCAPE]},s={className:"string",begin:/0\'(\\\'|.)/},l={className:"string",begin:/0\'\\s/},c={begin:/:-/},d=[t,n,i,c,r,a,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,o,s,l,e.C_NUMBER_MODE];return i.contains=d,r.contains=d,{contains:d.concat([{begin:/\.$/}])}}}),define("highlight/lib/languages/protobuf",["require","exports","module"],function(e,t,n){n.exports=function(e){return{keywords:{keyword:"package import option optional required repeated group",built_in:"double float int32 int64 uint32 uint64 sint32 sint64 fixed32 fixed64 sfixed32 sfixed64 bool string bytes",literal:"true false"},contains:[e.QUOTE_STRING_MODE,e.NUMBER_MODE,e.C_LINE_COMMENT_MODE,{className:"class",beginKeywords:"message enum service",end:/\{/,illegal:/\n/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]},{className:"function",beginKeywords:"rpc",end:/;/,excludeEnd:!0,keywords:"rpc returns"},{begin:/^\s*[A-Z_]+/,end:/\s*=/,excludeEnd:!0}]}}}),define("highlight/lib/languages/puppet",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={keyword:"and case default else elsif false if in import enherits node or true undef unless main settings $string ",literal:"alias audit before loglevel noop require subscribe tag owner ensure group mode name|0 changes context force incl lens load_path onlyif provider returns root show_diff type_check en_address ip_address realname command environment hour monute month monthday special target weekday creates cwd ogoutput refresh refreshonly tries try_sleep umask backup checksum content ctime force ignore links mtime purge recurse recurselimit replace selinux_ignore_defaults selrange selrole seltype seluser source souirce_permissions sourceselect validate_cmd validate_replacement allowdupe attribute_membership auth_membership forcelocal gid ia_load_module members system host_aliases ip allowed_trunk_vlans description device_url duplex encapsulation etherchannel native_vlan speed principals allow_root auth_class auth_type authenticate_user k_of_n mechanisms rule session_owner shared options device fstype enable hasrestart directory present absent link atboot blockdevice device dump pass remounts poller_tag use message withpath adminfile allow_virtual allowcdrom category configfiles flavor install_options instance package_settings platform responsefile status uninstall_options vendor unless_system_user unless_uid binary control flags hasstatus manifest pattern restart running start stop allowdupe auths expiry gid groups home iterations key_membership keys managehome membership password password_max_age password_min_age profile_membership profiles project purge_ssh_keys role_membership roles salt shell uid baseurl cost descr enabled enablegroups exclude failovermethod gpgcheck gpgkey http_caching include includepkgs keepalive metadata_expire metalink mirrorlist priority protect proxy proxy_password proxy_username repo_gpgcheck s3_enabled skip_if_unavailable sslcacert sslclientcert sslclientkey sslverify mounted",built_in:"architecture augeasversion blockdevices boardmanufacturer boardproductname boardserialnumber cfkey dhcp_servers domain ec2_ ec2_userdata facterversion filesystems ldom fqdn gid hardwareisa hardwaremodel hostname id|0 interfaces ipaddress ipaddress_ ipaddress6 ipaddress6_ iphostnumber is_virtual kernel kernelmajversion kernelrelease kernelversion kernelrelease kernelversion lsbdistcodename lsbdistdescription lsbdistid lsbdistrelease lsbmajdistrelease lsbminordistrelease lsbrelease macaddress macaddress_ macosx_buildversion macosx_productname macosx_productversion macosx_productverson_major macosx_productversion_minor manufacturer memoryfree memorysize netmask metmask_ network_ operatingsystem operatingsystemmajrelease operatingsystemrelease osfamily partitions path physicalprocessorcount processor processorcount productname ps puppetversion rubysitedir rubyversion selinux selinux_config_mode selinux_config_policy selinux_current_mode selinux_current_mode selinux_enforced selinux_policyversion serialnumber sp_ sshdsakey sshecdsakey sshrsakey swapencrypted swapfree swapsize timezone type uniqueid uptime uptime_days uptime_hours uptime_seconds uuid virtual vlans xendomains zfs_version zonenae zones zpool_version"},n=e.COMMENT("#","$"),i="([A-Za-z_]|::)(\\w|::)*",r=e.inherit(e.TITLE_MODE,{begin:i}),a={className:"variable",begin:"\\$"+i},o={className:"string",contains:[e.BACKSLASH_ESCAPE,a],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/}]};return{aliases:["pp"],contains:[n,a,o,{beginKeywords:"class",end:"\\{|;",illegal:/=/,contains:[r,n]},{beginKeywords:"define",end:/\{/,contains:[{className:"section",begin:e.IDENT_RE,endsParent:!0}]},{begin:e.IDENT_RE+"\\s+\\{",returnBegin:!0,end:/\S/,contains:[{className:"keyword",begin:e.IDENT_RE},{begin:/\{/,end:/\}/,keywords:t,relevance:0,contains:[o,n,{begin:"[a-zA-Z_]+\\s*=>",returnBegin:!0,end:"=>",contains:[{className:"attr",begin:e.IDENT_RE}]},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},a]}],relevance:0}]}}}),define("highlight/lib/languages/purebasic",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"string",begin:'(~)?"',end:'"',illegal:"\\n"},n={className:"symbol",begin:"#[a-zA-Z_]\\w*\\$?"};return{aliases:["pb","pbi"],keywords:"And As Break CallDebugger Case CompilerCase CompilerDefault CompilerElse CompilerEndIf CompilerEndSelect CompilerError CompilerIf CompilerSelect Continue Data DataSection EndDataSection Debug DebugLevel Default Define Dim DisableASM DisableDebugger DisableExplicit Else ElseIf EnableASM EnableDebugger EnableExplicit End EndEnumeration EndIf EndImport EndInterface EndMacro EndProcedure EndSelect EndStructure EndStructureUnion EndWith Enumeration Extends FakeReturn For Next ForEach ForEver Global Gosub Goto If Import ImportC IncludeBinary IncludeFile IncludePath Interface Macro NewList Not Or ProcedureReturn Protected Prototype PrototypeC Read ReDim Repeat Until Restore Return Select Shared Static Step Structure StructureUnion Swap To Wend While With XIncludeFile XOr Procedure ProcedureC ProcedureCDLL ProcedureDLL Declare DeclareC DeclareCDLL DeclareDLL",contains:[e.COMMENT(";","$",{relevance:0}),{className:"function",begin:"\\b(Procedure|Declare)(C|CDLL|DLL)?\\b",end:"\\(",excludeEnd:!0,returnBegin:!0,contains:[{className:"keyword",begin:"(Procedure|Declare)(C|CDLL|DLL)?",excludeEnd:!0},{className:"type",begin:"\\.\\w*"},e.UNDERSCORE_TITLE_MODE]},t,n]}}}),define("highlight/lib/languages/python",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"meta",begin:/^(>>>|\.\.\.) /},n={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/(u|b)?r?'''/,end:/'''/,contains:[t],relevance:10},{begin:/(u|b)?r?"""/,end:/"""/,contains:[t],relevance:10},{begin:/(u|r|ur)'/,end:/'/,relevance:10},{begin:/(u|r|ur)"/,end:/"/,relevance:10},{begin:/(b|br)'/,end:/'/},{begin:/(b|br)"/,end:/"/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},i={className:"number",relevance:0,variants:[{begin:e.BINARY_NUMBER_RE+"[lLjJ]?"},{begin:"\\b(0o[0-7]+)[lLjJ]?"},{begin:e.C_NUMBER_RE+"[lLjJ]?"}]},r={className:"params",begin:/\(/,end:/\)/,contains:["self",t,i,n]};return{aliases:["py","gyp"],keywords:{keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda async await nonlocal|10 None True False",built_in:"Ellipsis NotImplemented"},illegal:/(<\/|->|\?)|=>/,contains:[t,i,n,e.HASH_COMMENT_MODE,{variants:[{className:"function",beginKeywords:"def"},{className:"class",beginKeywords:"class"}],end:/:/,illegal:/[${=;\n,]/,contains:[e.UNDERSCORE_TITLE_MODE,r,{begin:/->/,endsWithParent:!0,keywords:"None"}]},{className:"meta",begin:/^[\t ]*@/,end:/$/},{begin:/\b(print|exec)\(/}]}}}),define("highlight/lib/languages/q",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={keyword:"do while select delete by update from",literal:"0b 1b",built_in:"neg not null string reciprocal floor ceiling signum mod xbar xlog and or each scan over prior mmu lsq inv md5 ltime gtime count first var dev med cov cor all any rand sums prds mins maxs fills deltas ratios avgs differ prev next rank reverse iasc idesc asc desc msum mcount mavg mdev xrank mmin mmax xprev rotate distinct group where flip type key til get value attr cut set upsert raze union inter except cross sv vs sublist enlist read0 read1 hopen hclose hdel hsym hcount peach system ltrim rtrim trim lower upper ssr view tables views cols xcols keys xkey xcol xasc xdesc fkeys meta lj aj aj0 ij pj asof uj ww wj wj1 fby xgroup ungroup ej save load rsave rload show csv parse eval min max avg wavg wsum sin cos tan sum",type:"`float `double int `timestamp `timespan `datetime `time `boolean `symbol `char `byte `short `long `real `month `date `minute `second `guid"};return{aliases:["k","kdb"],keywords:t,lexemes:/(`?)[A-Za-z0-9_]+\b/,contains:[e.C_LINE_COMMENT_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE]}}}),define("highlight/lib/languages/qml",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={keyword:"in of on if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await import",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Behavior bool color coordinate date double enumeration font geocircle georectangle geoshape int list matrix4x4 parent point quaternion real rect size string url var variant vector2d vector3d vector4dPromise"},n="[a-zA-Z_][a-zA-Z0-9\\._]*",i={className:"keyword",begin:"\\bproperty\\b",starts:{className:"string",end:"(:|=|;|,|//|/\\*|$)",returnEnd:!0}},r={className:"keyword",begin:"\\bsignal\\b",starts:{className:"string",end:"(\\(|:|=|;|,|//|/\\*|$)",returnEnd:!0}},a={className:"attribute",begin:"\\bid\\s*:",starts:{className:"string",end:n,returnEnd:!1}},o={begin:n+"\\s*:",returnBegin:!0,contains:[{className:"attribute",begin:n,end:"\\s*:",excludeEnd:!0,relevance:0}],relevance:0},s={begin:n+"\\s*{",end:"{",returnBegin:!0,relevance:0,contains:[e.inherit(e.TITLE_MODE,{begin:n})]};return{aliases:["qt"],case_insensitive:!1,keywords:t,contains:[{className:"meta",begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,{className:"subst",begin:"\\$\\{",end:"\\}"}]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"number",variants:[{begin:"\\b(0[bB][01]+)"},{begin:"\\b(0[oO][0-7]+)"},{begin:e.C_NUMBER_RE}],relevance:0},{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.REGEXP_MODE,{begin:/\s*[);\]]/,relevance:0,subLanguage:"xml"}],relevance:0},r,i,{className:"function",beginKeywords:"function",end:/\{/,excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/}),{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}],illegal:/\[|%/},{begin:"\\."+e.IDENT_RE,relevance:0},a,o,s],illegal:/#/}}}),define("highlight/lib/languages/r",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="([a-zA-Z]|\\.[a-zA-Z.])[a-zA-Z0-9._]*";return{contains:[e.HASH_COMMENT_MODE,{begin:t,lexemes:t,keywords:{keyword:"function if in break next repeat else for return switch while try tryCatch stop warning require library attach detach source setMethod setGeneric setGroupGeneric setClass ...",literal:"NULL NA TRUE FALSE T F Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10"},relevance:0},{className:"number",begin:"0[xX][0-9a-fA-F]+[Li]?\\b",relevance:0},{className:"number",begin:"\\d+(?:[eE][+\\-]?\\d*)?L\\b",relevance:0},{className:"number",begin:"\\d+\\.(?!\\d)(?:i\\b)?",relevance:0},{className:"number",begin:"\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b",relevance:0},{className:"number",begin:"\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b",relevance:0},{begin:"`",end:"`",relevance:0},{className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:'"',end:'"'},{begin:"'",end:"'"}]}]}}}),define("highlight/lib/languages/rib",["require","exports","module"],function(e,t,n){n.exports=function(e){return{keywords:"ArchiveRecord AreaLightSource Atmosphere Attribute AttributeBegin AttributeEnd Basis Begin Blobby Bound Clipping ClippingPlane Color ColorSamples ConcatTransform Cone CoordinateSystem CoordSysTransform CropWindow Curves Cylinder DepthOfField Detail DetailRange Disk Displacement Display End ErrorHandler Exposure Exterior Format FrameAspectRatio FrameBegin FrameEnd GeneralPolygon GeometricApproximation Geometry Hider Hyperboloid Identity Illuminate Imager Interior LightSource MakeCubeFaceEnvironment MakeLatLongEnvironment MakeShadow MakeTexture Matte MotionBegin MotionEnd NuPatch ObjectBegin ObjectEnd ObjectInstance Opacity Option Orientation Paraboloid Patch PatchMesh Perspective PixelFilter PixelSamples PixelVariance Points PointsGeneralPolygons PointsPolygons Polygon Procedural Projection Quantize ReadArchive RelativeDetail ReverseOrientation Rotate Scale ScreenWindow ShadingInterpolation ShadingRate Shutter Sides Skew SolidBegin SolidEnd Sphere SubdivisionMesh Surface TextureCoordinates Torus Transform TransformBegin TransformEnd TransformPoints Translate TrimCurve WorldBegin WorldEnd",illegal:""}]}}}),define("highlight/lib/languages/scala",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"meta",begin:"@[A-Za-z]+"},n={className:"subst",variants:[{begin:"\\$[A-Za-z0-9_]+"},{begin:"\\${",end:"}"}]},i={className:"string",variants:[{begin:'"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:'"""',end:'"""',relevance:10},{begin:'[a-z]+"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,n]},{className:"string",begin:'[a-z]+"""',end:'"""',contains:[n],relevance:10}]},r={className:"symbol",begin:"'\\w[\\w\\d_]*(?!')"},a={className:"type",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},o={className:"title",begin:/[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/,relevance:0},s={className:"class",beginKeywords:"class object trait type",end:/[:={\[\n;]/,excludeEnd:!0,contains:[{beginKeywords:"extends with",relevance:10},{begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0,relevance:0,contains:[a]},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,relevance:0,contains:[a]},o]},l={className:"function",beginKeywords:"def",end:/[:={\[(\n;]/,excludeEnd:!0,contains:[o]};return{keywords:{literal:"true false null",keyword:"type yield lazy override def with val var sealed abstract private trait object if forSome for while throw finally protected extends import final return else break new catch super class case package default try this match continue throws implicit"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,i,r,a,l,s,e.C_NUMBER_MODE,t]}}}),define("highlight/lib/languages/scheme",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="[^\\(\\)\\[\\]\\{\\}\",'`;#|\\\\\\s]+",n="(\\-|\\+)?\\d+([./]\\d+)?",i=n+"[+\\-]"+n+"i",r={"builtin-name":"case-lambda call/cc class define-class exit-handler field import inherit init-field interface let*-values let-values let/ec mixin opt-lambda override protect provide public rename require require-for-syntax syntax syntax-case syntax-error unit/sig unless when with-syntax and begin call-with-current-continuation call-with-input-file call-with-output-file case cond define define-syntax delay do dynamic-wind else for-each if lambda let let* let-syntax letrec letrec-syntax map or syntax-rules ' * + , ,@ - ... / ; < <= = => > >= ` abs acos angle append apply asin assoc assq assv atan boolean? caar cadr call-with-input-file call-with-output-file call-with-values car cdddar cddddr cdr ceiling char->integer char-alphabetic? char-ci<=? char-ci=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase char-upper-case? char-whitespace? char<=? char=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt floor force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm length list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vector max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt string string->list string->number string->symbol string-append string-ci<=? string-ci=? string-ci>? string-copy string-fill! string-length string-ref string-set! string<=? string=? string>? string? substring symbol->string symbol? tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! with-input-from-file with-output-to-file write write-char zero?"},a={className:"meta",begin:"^#!",end:"$"},o={className:"literal",begin:"(#t|#f|#\\\\"+t+"|#\\\\.)"},s={className:"number",variants:[{begin:n,relevance:0},{begin:i,relevance:0},{begin:"#b[0-1]+(/[0-1]+)?"},{begin:"#o[0-7]+(/[0-7]+)?"},{begin:"#x[0-9a-f]+(/[0-9a-f]+)?"}]},l=e.QUOTE_STRING_MODE,c=[e.COMMENT(";","$",{relevance:0}),e.COMMENT("#\\|","\\|#")],d={begin:t,relevance:0},u={className:"symbol",begin:"'"+t},m={endsWithParent:!0,relevance:0},p={begin:/'/,contains:[{begin:"\\(",end:"\\)",contains:["self",o,l,s,d,u]}]},g={className:"name",begin:t,lexemes:t,keywords:r},h={begin:/lambda/,endsWithParent:!0,returnBegin:!0,contains:[g,{begin:/\(/,end:/\)/,endsParent:!0,contains:[d]}]},b={variants:[{begin:"\\(",end:"\\)"},{begin:"\\[",end:"\\]"}],contains:[h,g,m]};return m.contains=[o,s,l,d,u,p,b].concat(c),{illegal:/\S/,contains:[a,s,l,u,p,b].concat(c)}}}),define("highlight/lib/languages/scilab",["require","exports","module"],function(e,t,n){n.exports=function(e){var t=[e.C_NUMBER_MODE,{className:"string",begin:"'|\"",end:"'|\"",contains:[e.BACKSLASH_ESCAPE,{begin:"''"}]}];return{aliases:["sci"],lexemes:/%?\w+/,keywords:{keyword:"abort break case clear catch continue do elseif else endfunction end for function global if pause return resume select try then while",literal:"%f %F %t %T %pi %eps %inf %nan %e %i %z %s",built_in:"abs and acos asin atan ceil cd chdir clearglobal cosh cos cumprod deff disp error exec execstr exists exp eye gettext floor fprintf fread fsolve imag isdef isempty isinfisnan isvector lasterror length load linspace list listfiles log10 log2 log max min msprintf mclose mopen ones or pathconvert poly printf prod pwd rand real round sinh sin size gsort sprintf sqrt strcat strcmps tring sum system tanh tan type typename warning zeros matrix"},illegal:'("|#|/\\*|\\s+/\\w+)',contains:[{className:"function",beginKeywords:"function",end:"$",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)"}]},{begin:"[a-zA-Z_][a-zA-Z_0-9]*('+[\\.']*|[\\.']+)",end:"",relevance:0},{begin:"\\[",end:"\\]'*[\\.']*",relevance:0,contains:t},e.COMMENT("//","$")].concat(t)}}}),define("highlight/lib/languages/scss",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="[a-zA-Z-][a-zA-Z0-9_-]*",n={className:"variable",begin:"(\\$"+t+")\\b"},i={className:"number",begin:"#[0-9A-Fa-f]+"};({className:"attribute",begin:"[A-Z\\_\\.\\-]+",end:":",excludeEnd:!0,illegal:"[^\\s]",starts:{endsWithParent:!0,excludeEnd:!0,contains:[i,e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"!important"}]}});return{case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"selector-id",begin:"\\#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},{className:"selector-attr",begin:"\\[",end:"\\]",illegal:"$"},{className:"selector-tag",begin:"\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|mark|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\\b",relevance:0},{begin:":(visited|valid|root|right|required|read-write|read-only|out-range|optional|only-of-type|only-child|nth-of-type|nth-last-of-type|nth-last-child|nth-child|not|link|left|last-of-type|last-child|lang|invalid|indeterminate|in-range|hover|focus|first-of-type|first-line|first-letter|first-child|first|enabled|empty|disabled|default|checked|before|after|active)"},{begin:"::(after|before|choices|first-letter|first-line|repeat-index|repeat-item|selection|value)"},n,{className:"attribute",begin:"\\b(z-index|word-wrap|word-spacing|word-break|width|widows|white-space|visibility|vertical-align|unicode-bidi|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform-style|transform-origin|transform|top|text-underline-position|text-transform|text-shadow|text-rendering|text-overflow|text-indent|text-decoration-style|text-decoration-line|text-decoration-color|text-decoration|text-align-last|text-align|tab-size|table-layout|right|resize|quotes|position|pointer-events|perspective-origin|perspective|page-break-inside|page-break-before|page-break-after|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-y|overflow-x|overflow-wrap|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|order|opacity|object-position|object-fit|normal|none|nav-up|nav-right|nav-left|nav-index|nav-down|min-width|min-height|max-width|max-height|mask|marks|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|letter-spacing|left|justify-content|initial|inherit|ime-mode|image-orientation|image-resolution|image-rendering|icon|hyphens|height|font-weight|font-variant-ligatures|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-language-override|font-kerning|font-feature-settings|font-family|font|float|flex-wrap|flex-shrink|flex-grow|flex-flow|flex-direction|flex-basis|flex|filter|empty-cells|display|direction|cursor|counter-reset|counter-increment|content|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|columns|color|clip-path|clip|clear|caption-side|break-inside|break-before|break-after|box-sizing|box-shadow|box-decoration-break|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-left-width|border-left-style|border-left-color|border-left|border-image-width|border-image-source|border-image-slice|border-image-repeat|border-image-outset|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-attachment|background-blend-mode|background|backface-visibility|auto|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation|align-self|align-items|align-content)\\b",illegal:"[^\\s]"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:":",end:";",contains:[n,i,e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"meta",begin:"!important"}]},{begin:"@",end:"[{;]",keywords:"mixin include extend for if else each while charset import debug media page content font-face namespace warn",contains:[n,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,i,e.CSS_NUMBER_MODE,{begin:"\\s[A-Za-z0-9_.-]+",relevance:0}]}]}}}),define("highlight/lib/languages/smali",["require","exports","module"],function(e,t,n){n.exports=function(e){var t=["add","and","cmp","cmpg","cmpl","const","div","double","float","goto","if","int","long","move","mul","neg","new","nop","not","or","rem","return","shl","shr","sput","sub","throw","ushr","xor"],n=["aget","aput","array","check","execute","fill","filled","goto/16","goto/32","iget","instance","invoke","iput","monitor","packed","sget","sparse"],i=["transient","constructor","abstract","final","synthetic","public","private","protected","static","bridge","system"];return{aliases:["smali"],contains:[{className:"string",begin:'"',end:'"',relevance:0},e.COMMENT("#","$",{relevance:0}),{className:"keyword",variants:[{begin:"\\s*\\.end\\s[a-zA-Z0-9]*"},{begin:"^[ ]*\\.[a-zA-Z]*",relevance:0},{begin:"\\s:[a-zA-Z_0-9]*",relevance:0},{begin:"\\s("+i.join("|")+")"}]},{className:"built_in",variants:[{begin:"\\s("+t.join("|")+")\\s"},{begin:"\\s("+t.join("|")+")((\\-|/)[a-zA-Z0-9]+)+\\s",relevance:10},{begin:"\\s("+n.join("|")+")((\\-|/)[a-zA-Z0-9]+)*\\s",relevance:10}]},{className:"class",begin:"L[^(;:\n]*;",relevance:0},{begin:"[vp][0-9]+"}]}}}),define("highlight/lib/languages/smalltalk",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="[a-z][a-zA-Z0-9_]*",n={className:"string",begin:"\\$.{1}"},i={className:"symbol",begin:"#"+e.UNDERSCORE_IDENT_RE};return{aliases:["st"],keywords:"self super nil true false thisContext",contains:[e.COMMENT('"','"'),e.APOS_STRING_MODE,{className:"type",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},{begin:t+":",relevance:0},e.C_NUMBER_MODE,i,n,{begin:"\\|[ ]*"+t+"([ ]+"+t+")*[ ]*\\|",returnBegin:!0,end:/\|/,illegal:/\S/,contains:[{begin:"(\\|[ ]*)?"+t}]},{begin:"\\#\\(",end:"\\)",contains:[e.APOS_STRING_MODE,n,e.C_NUMBER_MODE,i]}]}}}),define("highlight/lib/languages/sml",["require","exports","module"],function(e,t,n){n.exports=function(e){return{aliases:["ml"],keywords:{keyword:"abstype and andalso as case datatype do else end eqtype exception fn fun functor handle if in include infix infixr let local nonfix of op open orelse raise rec sharing sig signature struct structure then type val with withtype where while",built_in:"array bool char exn int list option order real ref string substring vector unit word",literal:"true false NONE SOME LESS EQUAL GREATER nil"},illegal:/\/\/|>>/,lexemes:"[a-z_]\\w*!?",contains:[{className:"literal",begin:/\[(\|\|)?\]|\(\)/,relevance:0},e.COMMENT("\\(\\*","\\*\\)",{contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{className:"type",begin:"`[A-Z][\\w']*"},{className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},{begin:"[a-z_]\\w*'[\\w']*"},e.inherit(e.APOS_STRING_MODE,{className:"string",relevance:0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"number",begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",relevance:0},{begin:/[-=]>/}]}}}),define("highlight/lib/languages/sqf",["require","exports","module"],function(e,t,n){n.exports=function(e){var t=e.getLanguage("cpp").exports,n={className:"string",variants:[{begin:'"',end:'"',contains:[{begin:'""',relevance:0}]},{begin:"'",end:"'",contains:[{begin:"''",relevance:0}]}]};return{aliases:["sqf"],case_insensitive:!0,keywords:{keyword:"case catch default do else exit exitWith for forEach from if switch then throw to try while with",built_in:"or plus abs accTime acos action actionKeys actionKeysImages actionKeysNames actionKeysNamesArray actionName activateAddons activatedAddons activateKey addAction addBackpack addBackpackCargo addBackpackCargoGlobal addBackpackGlobal addCamShake addCuratorAddons addCuratorCameraArea addCuratorEditableObjects addCuratorEditingArea addCuratorPoints addEditorObject addEventHandler addGoggles addGroupIcon addHandgunItem addHeadgear addItem addItemCargo addItemCargoGlobal addItemPool addItemToBackpack addItemToUniform addItemToVest addLiveStats addMagazine addMagazine array addMagazineAmmoCargo addMagazineCargo addMagazineCargoGlobal addMagazineGlobal addMagazinePool addMagazines addMagazineTurret addMenu addMenuItem addMissionEventHandler addMPEventHandler addMusicEventHandler addPrimaryWeaponItem addPublicVariableEventHandler addRating addResources addScore addScoreSide addSecondaryWeaponItem addSwitchableUnit addTeamMember addToRemainsCollector addUniform addVehicle addVest addWaypoint addWeapon addWeaponCargo addWeaponCargoGlobal addWeaponGlobal addWeaponPool addWeaponTurret agent agents AGLToASL aimedAtTarget aimPos airDensityRTD airportSide AISFinishHeal alive allControls allCurators allDead allDeadMen allDisplays allGroups allMapMarkers allMines allMissionObjects allow3DMode allowCrewInImmobile allowCuratorLogicIgnoreAreas allowDamage allowDammage allowFileOperations allowFleeing allowGetIn allPlayers allSites allTurrets allUnits allUnitsUAV allVariables ammo and animate animateDoor animationPhase animationState append armoryPoints arrayIntersect asin ASLToAGL ASLToATL assert assignAsCargo assignAsCargoIndex assignAsCommander assignAsDriver assignAsGunner assignAsTurret assignCurator assignedCargo assignedCommander assignedDriver assignedGunner assignedItems assignedTarget assignedTeam assignedVehicle assignedVehicleRole assignItem assignTeam assignToAirport atan atan2 atg ATLToASL attachedObject attachedObjects attachedTo attachObject attachTo attackEnabled backpack backpackCargo backpackContainer backpackItems backpackMagazines backpackSpaceFor behaviour benchmark binocular blufor boundingBox boundingBoxReal boundingCenter breakOut breakTo briefingName buildingExit buildingPos buttonAction buttonSetAction cadetMode call callExtension camCommand camCommit camCommitPrepared camCommitted camConstuctionSetParams camCreate camDestroy cameraEffect cameraEffectEnableHUD cameraInterest cameraOn cameraView campaignConfigFile camPreload camPreloaded camPrepareBank camPrepareDir camPrepareDive camPrepareFocus camPrepareFov camPrepareFovRange camPreparePos camPrepareRelPos camPrepareTarget camSetBank camSetDir camSetDive camSetFocus camSetFov camSetFovRange camSetPos camSetRelPos camSetTarget camTarget camUseNVG canAdd canAddItemToBackpack canAddItemToUniform canAddItemToVest cancelSimpleTaskDestination canFire canMove canSlingLoad canStand canUnloadInCombat captive captiveNum cbChecked cbSetChecked ceil cheatsEnabled checkAIFeature civilian className clearAllItemsFromBackpack clearBackpackCargo clearBackpackCargoGlobal clearGroupIcons clearItemCargo clearItemCargoGlobal clearItemPool clearMagazineCargo clearMagazineCargoGlobal clearMagazinePool clearOverlay clearRadio clearWeaponCargo clearWeaponCargoGlobal clearWeaponPool closeDialog closeDisplay closeOverlay collapseObjectTree combatMode commandArtilleryFire commandChat commander commandFire commandFollow commandFSM commandGetOut commandingMenu commandMove commandRadio commandStop commandTarget commandWatch comment commitOverlay compile compileFinal completedFSM composeText configClasses configFile configHierarchy configName configProperties configSourceMod configSourceModList connectTerminalToUAV controlNull controlsGroupCtrl copyFromClipboard copyToClipboard copyWaypoints cos count countEnemy countFriendly countSide countType countUnknown createAgent createCenter createDialog createDiaryLink createDiaryRecord createDiarySubject createDisplay createGearDialog createGroup createGuardedPoint createLocation createMarker createMarkerLocal createMenu createMine createMissionDisplay createSimpleTask createSite createSoundSource createTask createTeam createTrigger createUnit createUnit array createVehicle createVehicle array createVehicleCrew createVehicleLocal crew ctrlActivate ctrlAddEventHandler ctrlAutoScrollDelay ctrlAutoScrollRewind ctrlAutoScrollSpeed ctrlChecked ctrlClassName ctrlCommit ctrlCommitted ctrlCreate ctrlDelete ctrlEnable ctrlEnabled ctrlFade ctrlHTMLLoaded ctrlIDC ctrlIDD ctrlMapAnimAdd ctrlMapAnimClear ctrlMapAnimCommit ctrlMapAnimDone ctrlMapCursor ctrlMapMouseOver ctrlMapScale ctrlMapScreenToWorld ctrlMapWorldToScreen ctrlModel ctrlModelDirAndUp ctrlModelScale ctrlParent ctrlPosition ctrlRemoveAllEventHandlers ctrlRemoveEventHandler ctrlScale ctrlSetActiveColor ctrlSetAutoScrollDelay ctrlSetAutoScrollRewind ctrlSetAutoScrollSpeed ctrlSetBackgroundColor ctrlSetChecked ctrlSetEventHandler ctrlSetFade ctrlSetFocus ctrlSetFont ctrlSetFontH1 ctrlSetFontH1B ctrlSetFontH2 ctrlSetFontH2B ctrlSetFontH3 ctrlSetFontH3B ctrlSetFontH4 ctrlSetFontH4B ctrlSetFontH5 ctrlSetFontH5B ctrlSetFontH6 ctrlSetFontH6B ctrlSetFontHeight ctrlSetFontHeightH1 ctrlSetFontHeightH2 ctrlSetFontHeightH3 ctrlSetFontHeightH4 ctrlSetFontHeightH5 ctrlSetFontHeightH6 ctrlSetFontP ctrlSetFontPB ctrlSetForegroundColor ctrlSetModel ctrlSetModelDirAndUp ctrlSetModelScale ctrlSetPosition ctrlSetScale ctrlSetStructuredText ctrlSetText ctrlSetTextColor ctrlSetTooltip ctrlSetTooltipColorBox ctrlSetTooltipColorShade ctrlSetTooltipColorText ctrlShow ctrlShown ctrlText ctrlTextHeight ctrlType ctrlVisible curatorAddons curatorCamera curatorCameraArea curatorCameraAreaCeiling curatorCoef curatorEditableObjects curatorEditingArea curatorEditingAreaType curatorMouseOver curatorPoints curatorRegisteredObjects curatorSelected curatorWaypointCost currentChannel currentCommand currentMagazine currentMagazineDetail currentMagazineDetailTurret currentMagazineTurret currentMuzzle currentNamespace currentTask currentTasks currentThrowable currentVisionMode currentWaypoint currentWeapon currentWeaponMode currentWeaponTurret currentZeroing cursorTarget customChat customRadio cutFadeOut cutObj cutRsc cutText damage date dateToNumber daytime deActivateKey debriefingText debugFSM debugLog deg deleteAt deleteCenter deleteCollection deleteEditorObject deleteGroup deleteIdentity deleteLocation deleteMarker deleteMarkerLocal deleteRange deleteResources deleteSite deleteStatus deleteTeam deleteVehicle deleteVehicleCrew deleteWaypoint detach detectedMines diag activeMissionFSMs diag activeSQFScripts diag activeSQSScripts diag captureFrame diag captureSlowFrame diag fps diag fpsMin diag frameNo diag log diag logSlowFrame diag tickTime dialog diarySubjectExists didJIP didJIPOwner difficulty difficultyEnabled difficultyEnabledRTD direction directSay disableAI disableCollisionWith disableConversation disableDebriefingStats disableSerialization disableTIEquipment disableUAVConnectability disableUserInput displayAddEventHandler displayCtrl displayNull displayRemoveAllEventHandlers displayRemoveEventHandler displaySetEventHandler dissolveTeam distance distance2D distanceSqr distributionRegion doArtilleryFire doFire doFollow doFSM doGetOut doMove doorPhase doStop doTarget doWatch drawArrow drawEllipse drawIcon drawIcon3D drawLine drawLine3D drawLink drawLocation drawRectangle driver drop east echo editObject editorSetEventHandler effectiveCommander emptyPositions enableAI enableAIFeature enableAttack enableCamShake enableCaustics enableCollisionWith enableCopilot enableDebriefingStats enableDiagLegend enableEndDialog enableEngineArtillery enableEnvironment enableFatigue enableGunLights enableIRLasers enableMimics enablePersonTurret enableRadio enableReload enableRopeAttach enableSatNormalOnDetail enableSaving enableSentences enableSimulation enableSimulationGlobal enableTeamSwitch enableUAVConnectability enableUAVWaypoints endLoadingScreen endMission engineOn enginesIsOnRTD enginesRpmRTD enginesTorqueRTD entities estimatedEndServerTime estimatedTimeLeft evalObjectArgument everyBackpack everyContainer exec execEditorScript execFSM execVM exp expectedDestination eyeDirection eyePos face faction fadeMusic fadeRadio fadeSound fadeSpeech failMission fillWeaponsFromPool find findCover findDisplay findEditorObject findEmptyPosition findEmptyPositionReady findNearestEnemy finishMissionInit finite fire fireAtTarget firstBackpack flag flagOwner fleeing floor flyInHeight fog fogForecast fogParams forceAddUniform forceEnd forceMap forceRespawn forceSpeed forceWalk forceWeaponFire forceWeatherChange forEachMember forEachMemberAgent forEachMemberTeam format formation formationDirection formationLeader formationMembers formationPosition formationTask formatText formLeader freeLook fromEditor fuel fullCrew gearSlotAmmoCount gearSlotData getAllHitPointsDamage getAmmoCargo getArray getArtilleryAmmo getArtilleryComputerSettings getArtilleryETA getAssignedCuratorLogic getAssignedCuratorUnit getBackpackCargo getBleedingRemaining getBurningValue getCargoIndex getCenterOfMass getClientState getConnectedUAV getDammage getDescription getDir getDirVisual getDLCs getEditorCamera getEditorMode getEditorObjectScope getElevationOffset getFatigue getFriend getFSMVariable getFuelCargo getGroupIcon getGroupIconParams getGroupIcons getHideFrom getHit getHitIndex getHitPointDamage getItemCargo getMagazineCargo getMarkerColor getMarkerPos getMarkerSize getMarkerType getMass getModelInfo getNumber getObjectArgument getObjectChildren getObjectDLC getObjectMaterials getObjectProxy getObjectTextures getObjectType getObjectViewDistance getOxygenRemaining getPersonUsedDLCs getPlayerChannel getPlayerUID getPos getPosASL getPosASLVisual getPosASLW getPosATL getPosATLVisual getPosVisual getPosWorld getRepairCargo getResolution getShadowDistance getSlingLoad getSpeed getSuppression getTerrainHeightASL getText getVariable getWeaponCargo getWPPos glanceAt globalChat globalRadio goggles goto group groupChat groupFromNetId groupIconSelectable groupIconsVisible groupId groupOwner groupRadio groupSelectedUnits groupSelectUnit grpNull gunner gusts halt handgunItems handgunMagazine handgunWeapon handsHit hasInterface hasWeapon hcAllGroups hcGroupParams hcLeader hcRemoveAllGroups hcRemoveGroup hcSelected hcSelectGroup hcSetGroup hcShowBar hcShownBar headgear hideBody hideObject hideObjectGlobal hint hintC hintCadet hintSilent hmd hostMission htmlLoad HUDMovementLevels humidity image importAllGroups importance in incapacitatedState independent inflame inflamed inGameUISetEventHandler inheritsFrom initAmbientLife inputAction inRangeOfArtillery insertEditorObject intersect isAbleToBreathe isAgent isArray isAutoHoverOn isAutonomous isAutotest isBleeding isBurning isClass isCollisionLightOn isCopilotEnabled isDedicated isDLCAvailable isEngineOn isEqualTo isFlashlightOn isFlatEmpty isForcedWalk isFormationLeader isHidden isInRemainsCollector isInstructorFigureEnabled isIRLaserOn isKeyActive isKindOf isLightOn isLocalized isManualFire isMarkedForCollection isMultiplayer isNil isNull isNumber isObjectHidden isObjectRTD isOnRoad isPipEnabled isPlayer isRealTime isServer isShowing3DIcons isSteamMission isStreamFriendlyUIEnabled isText isTouchingGround isTurnedOut isTutHintsEnabled isUAVConnectable isUAVConnected isUniformAllowed isWalking isWeaponDeployed isWeaponRested itemCargo items itemsWithMagazines join joinAs joinAsSilent joinSilent joinString kbAddDatabase kbAddDatabaseTargets kbAddTopic kbHasTopic kbReact kbRemoveTopic kbTell kbWasSaid keyImage keyName knowsAbout land landAt landResult language laserTarget lbAdd lbClear lbColor lbCurSel lbData lbDelete lbIsSelected lbPicture lbSelection lbSetColor lbSetCurSel lbSetData lbSetPicture lbSetPictureColor lbSetPictureColorDisabled lbSetPictureColorSelected lbSetSelectColor lbSetSelectColorRight lbSetSelected lbSetTooltip lbSetValue lbSize lbSort lbSortByValue lbText lbValue leader leaderboardDeInit leaderboardGetRows leaderboardInit leaveVehicle libraryCredits libraryDisclaimers lifeState lightAttachObject lightDetachObject lightIsOn lightnings limitSpeed linearConversion lineBreak lineIntersects lineIntersectsObjs lineIntersectsSurfaces lineIntersectsWith linkItem list listObjects ln lnbAddArray lnbAddColumn lnbAddRow lnbClear lnbColor lnbCurSelRow lnbData lnbDeleteColumn lnbDeleteRow lnbGetColumnsPosition lnbPicture lnbSetColor lnbSetColumnsPos lnbSetCurSelRow lnbSetData lnbSetPicture lnbSetText lnbSetValue lnbSize lnbText lnbValue load loadAbs loadBackpack loadFile loadGame loadIdentity loadMagazine loadOverlay loadStatus loadUniform loadVest local localize locationNull locationPosition lock lockCameraTo lockCargo lockDriver locked lockedCargo lockedDriver lockedTurret lockTurret lockWP log logEntities lookAt lookAtPos magazineCargo magazines magazinesAllTurrets magazinesAmmo magazinesAmmoCargo magazinesAmmoFull magazinesDetail magazinesDetailBackpack magazinesDetailUniform magazinesDetailVest magazinesTurret magazineTurretAmmo mapAnimAdd mapAnimClear mapAnimCommit mapAnimDone mapCenterOnCamera mapGridPosition markAsFinishedOnSteam markerAlpha markerBrush markerColor markerDir markerPos markerShape markerSize markerText markerType max members min mineActive mineDetectedBy missionConfigFile missionName missionNamespace missionStart mod modelToWorld modelToWorldVisual moonIntensity morale move moveInAny moveInCargo moveInCommander moveInDriver moveInGunner moveInTurret moveObjectToEnd moveOut moveTime moveTo moveToCompleted moveToFailed musicVolume name name location nameSound nearEntities nearestBuilding nearestLocation nearestLocations nearestLocationWithDubbing nearestObject nearestObjects nearObjects nearObjectsReady nearRoads nearSupplies nearTargets needReload netId netObjNull newOverlay nextMenuItemIndex nextWeatherChange nMenuItems not numberToDate objectCurators objectFromNetId objectParent objNull objStatus onBriefingGroup onBriefingNotes onBriefingPlan onBriefingTeamSwitch onCommandModeChanged onDoubleClick onEachFrame onGroupIconClick onGroupIconOverEnter onGroupIconOverLeave onHCGroupSelectionChanged onMapSingleClick onPlayerConnected onPlayerDisconnected onPreloadFinished onPreloadStarted onShowNewObject onTeamSwitch openCuratorInterface openMap openYoutubeVideo opfor or orderGetIn overcast overcastForecast owner param params parseNumber parseText parsingNamespace particlesQuality pi pickWeaponPool pitch playableSlotsNumber playableUnits playAction playActionNow player playerRespawnTime playerSide playersNumber playGesture playMission playMove playMoveNow playMusic playScriptedMission playSound playSound3D position positionCameraToWorld posScreenToWorld posWorldToScreen ppEffectAdjust ppEffectCommit ppEffectCommitted ppEffectCreate ppEffectDestroy ppEffectEnable ppEffectForceInNVG precision preloadCamera preloadObject preloadSound preloadTitleObj preloadTitleRsc preprocessFile preprocessFileLineNumbers primaryWeapon primaryWeaponItems primaryWeaponMagazine priority private processDiaryLink productVersion profileName profileNamespace profileNameSteam progressLoadingScreen progressPosition progressSetPosition publicVariable publicVariableClient publicVariableServer pushBack putWeaponPool queryItemsPool queryMagazinePool queryWeaponPool rad radioChannelAdd radioChannelCreate radioChannelRemove radioChannelSetCallSign radioChannelSetLabel radioVolume rain rainbow random rank rankId rating rectangular registeredTasks registerTask reload reloadEnabled remoteControl remoteExec remoteExecCall removeAction removeAllActions removeAllAssignedItems removeAllContainers removeAllCuratorAddons removeAllCuratorCameraAreas removeAllCuratorEditingAreas removeAllEventHandlers removeAllHandgunItems removeAllItems removeAllItemsWithMagazines removeAllMissionEventHandlers removeAllMPEventHandlers removeAllMusicEventHandlers removeAllPrimaryWeaponItems removeAllWeapons removeBackpack removeBackpackGlobal removeCuratorAddons removeCuratorCameraArea removeCuratorEditableObjects removeCuratorEditingArea removeDrawIcon removeDrawLinks removeEventHandler removeFromRemainsCollector removeGoggles removeGroupIcon removeHandgunItem removeHeadgear removeItem removeItemFromBackpack removeItemFromUniform removeItemFromVest removeItems removeMagazine removeMagazineGlobal removeMagazines removeMagazinesTurret removeMagazineTurret removeMenuItem removeMissionEventHandler removeMPEventHandler removeMusicEventHandler removePrimaryWeaponItem removeSecondaryWeaponItem removeSimpleTask removeSwitchableUnit removeTeamMember removeUniform removeVest removeWeapon removeWeaponGlobal removeWeaponTurret requiredVersion resetCamShake resetSubgroupDirection resistance resize resources respawnVehicle restartEditorCamera reveal revealMine reverse reversedMouseY roadsConnectedTo roleDescription ropeAttachedObjects ropeAttachedTo ropeAttachEnabled ropeAttachTo ropeCreate ropeCut ropeEndPosition ropeLength ropes ropeUnwind ropeUnwound rotorsForcesRTD rotorsRpmRTD round runInitScript safeZoneH safeZoneW safeZoneWAbs safeZoneX safeZoneXAbs safeZoneY saveGame saveIdentity saveJoysticks saveOverlay saveProfileNamespace saveStatus saveVar savingEnabled say say2D say3D scopeName score scoreSide screenToWorld scriptDone scriptName scriptNull scudState secondaryWeapon secondaryWeaponItems secondaryWeaponMagazine select selectBestPlaces selectDiarySubject selectedEditorObjects selectEditorObject selectionPosition selectLeader selectNoPlayer selectPlayer selectWeapon selectWeaponTurret sendAUMessage sendSimpleCommand sendTask sendTaskResult sendUDPMessage serverCommand serverCommandAvailable serverCommandExecutable serverName serverTime set setAccTime setAirportSide setAmmo setAmmoCargo setAperture setApertureNew setArmoryPoints setAttributes setAutonomous setBehaviour setBleedingRemaining setCameraInterest setCamShakeDefParams setCamShakeParams setCamUseTi setCaptive setCenterOfMass setCollisionLight setCombatMode setCompassOscillation setCuratorCameraAreaCeiling setCuratorCoef setCuratorEditingAreaType setCuratorWaypointCost setCurrentChannel setCurrentTask setCurrentWaypoint setDamage setDammage setDate setDebriefingText setDefaultCamera setDestination setDetailMapBlendPars setDir setDirection setDrawIcon setDropInterval setEditorMode setEditorObjectScope setEffectCondition setFace setFaceAnimation setFatigue setFlagOwner setFlagSide setFlagTexture setFog setFog array setFormation setFormationTask setFormDir setFriend setFromEditor setFSMVariable setFuel setFuelCargo setGroupIcon setGroupIconParams setGroupIconsSelectable setGroupIconsVisible setGroupId setGroupIdGlobal setGroupOwner setGusts setHideBehind setHit setHitIndex setHitPointDamage setHorizonParallaxCoef setHUDMovementLevels setIdentity setImportance setLeader setLightAmbient setLightAttenuation setLightBrightness setLightColor setLightDayLight setLightFlareMaxDistance setLightFlareSize setLightIntensity setLightnings setLightUseFlare setLocalWindParams setMagazineTurretAmmo setMarkerAlpha setMarkerAlphaLocal setMarkerBrush setMarkerBrushLocal setMarkerColor setMarkerColorLocal setMarkerDir setMarkerDirLocal setMarkerPos setMarkerPosLocal setMarkerShape setMarkerShapeLocal setMarkerSize setMarkerSizeLocal setMarkerText setMarkerTextLocal setMarkerType setMarkerTypeLocal setMass setMimic setMousePosition setMusicEffect setMusicEventHandler setName setNameSound setObjectArguments setObjectMaterial setObjectProxy setObjectTexture setObjectTextureGlobal setObjectViewDistance setOvercast setOwner setOxygenRemaining setParticleCircle setParticleClass setParticleFire setParticleParams setParticleRandom setPilotLight setPiPEffect setPitch setPlayable setPlayerRespawnTime setPos setPosASL setPosASL2 setPosASLW setPosATL setPosition setPosWorld setRadioMsg setRain setRainbow setRandomLip setRank setRectangular setRepairCargo setShadowDistance setSide setSimpleTaskDescription setSimpleTaskDestination setSimpleTaskTarget setSimulWeatherLayers setSize setSkill setSkill array setSlingLoad setSoundEffect setSpeaker setSpeech setSpeedMode setStatValue setSuppression setSystemOfUnits setTargetAge setTaskResult setTaskState setTerrainGrid setText setTimeMultiplier setTitleEffect setTriggerActivation setTriggerArea setTriggerStatements setTriggerText setTriggerTimeout setTriggerType setType setUnconscious setUnitAbility setUnitPos setUnitPosWeak setUnitRank setUnitRecoilCoefficient setUnloadInCombat setUserActionText setVariable setVectorDir setVectorDirAndUp setVectorUp setVehicleAmmo setVehicleAmmoDef setVehicleArmor setVehicleId setVehicleLock setVehiclePosition setVehicleTiPars setVehicleVarName setVelocity setVelocityTransformation setViewDistance setVisibleIfTreeCollapsed setWaves setWaypointBehaviour setWaypointCombatMode setWaypointCompletionRadius setWaypointDescription setWaypointFormation setWaypointHousePosition setWaypointLoiterRadius setWaypointLoiterType setWaypointName setWaypointPosition setWaypointScript setWaypointSpeed setWaypointStatements setWaypointTimeout setWaypointType setWaypointVisible setWeaponReloadingTime setWind setWindDir setWindForce setWindStr setWPPos show3DIcons showChat showCinemaBorder showCommandingMenu showCompass showCuratorCompass showGPS showHUD showLegend showMap shownArtilleryComputer shownChat shownCompass shownCuratorCompass showNewEditorObject shownGPS shownHUD shownMap shownPad shownRadio shownUAVFeed shownWarrant shownWatch showPad showRadio showSubtitles showUAVFeed showWarrant showWatch showWaypoint side sideChat sideEnemy sideFriendly sideLogic sideRadio sideUnknown simpleTasks simulationEnabled simulCloudDensity simulCloudOcclusion simulInClouds simulWeatherSync sin size sizeOf skill skillFinal skipTime sleep sliderPosition sliderRange sliderSetPosition sliderSetRange sliderSetSpeed sliderSpeed slingLoadAssistantShown soldierMagazines someAmmo sort soundVolume spawn speaker speed speedMode splitString sqrt squadParams stance startLoadingScreen step stop stopped str sunOrMoon supportInfo suppressFor surfaceIsWater surfaceNormal surfaceType swimInDepth switchableUnits switchAction switchCamera switchGesture switchLight switchMove synchronizedObjects synchronizedTriggers synchronizedWaypoints synchronizeObjectsAdd synchronizeObjectsRemove synchronizeTrigger synchronizeWaypoint synchronizeWaypoint trigger systemChat systemOfUnits tan targetKnowledge targetsAggregate targetsQuery taskChildren taskCompleted taskDescription taskDestination taskHint taskNull taskParent taskResult taskState teamMember teamMemberNull teamName teams teamSwitch teamSwitchEnabled teamType terminate terrainIntersect terrainIntersectASL text text location textLog textLogFormat tg time timeMultiplier titleCut titleFadeOut titleObj titleRsc titleText toArray toLower toString toUpper triggerActivated triggerActivation triggerArea triggerAttachedVehicle triggerAttachObject triggerAttachVehicle triggerStatements triggerText triggerTimeout triggerTimeoutCurrent triggerType turretLocal turretOwner turretUnit tvAdd tvClear tvCollapse tvCount tvCurSel tvData tvDelete tvExpand tvPicture tvSetCurSel tvSetData tvSetPicture tvSetPictureColor tvSetTooltip tvSetValue tvSort tvSortByValue tvText tvValue type typeName typeOf UAVControl uiNamespace uiSleep unassignCurator unassignItem unassignTeam unassignVehicle underwater uniform uniformContainer uniformItems uniformMagazines unitAddons unitBackpack unitPos unitReady unitRecoilCoefficient units unitsBelowHeight unlinkItem unlockAchievement unregisterTask updateDrawIcon updateMenuItem updateObjectTree useAudioTimeForMoves vectorAdd vectorCos vectorCrossProduct vectorDiff vectorDir vectorDirVisual vectorDistance vectorDistanceSqr vectorDotProduct vectorFromTo vectorMagnitude vectorMagnitudeSqr vectorMultiply vectorNormalized vectorUp vectorUpVisual vehicle vehicleChat vehicleRadio vehicles vehicleVarName velocity velocityModelSpace verifySignature vest vestContainer vestItems vestMagazines viewDistance visibleCompass visibleGPS visibleMap visiblePosition visiblePositionASL visibleWatch waitUntil waves waypointAttachedObject waypointAttachedVehicle waypointAttachObject waypointAttachVehicle waypointBehaviour waypointCombatMode waypointCompletionRadius waypointDescription waypointFormation waypointHousePosition waypointLoiterRadius waypointLoiterType waypointName waypointPosition waypoints waypointScript waypointsEnabledUAV waypointShow waypointSpeed waypointStatements waypointTimeout waypointTimeoutCurrent waypointType waypointVisible weaponAccessories weaponCargo weaponDirection weaponLowered weapons weaponsItems weaponsItemsCargo weaponState weaponsTurret weightRTD west WFSideText wind windDir windStr wingsForcesRTD worldName worldSize worldToModel worldToModelVisual worldToScreen _forEachIndex _this _x", -literal:"true false nil"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.NUMBER_MODE,n,t.preprocessor],illegal:/#/}}}),define("highlight/lib/languages/sql",["require","exports","module"],function(e,t,n){n.exports=function(e){var t=e.COMMENT("--","$");return{case_insensitive:!0,illegal:/[<>{}*#]/,contains:[{beginKeywords:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke comment",end:/;/,endsWithParent:!0,lexemes:/[\w\.]+/,keywords:{keyword:"abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias allocate allow alter always analyze ancillary and any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound buffer_cache buffer_pool build bulk by byte byteordermark bytes cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain export export_set extended extent external external_1 external_2 externally extract failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour http id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists keep keep_duplicates key keys kill language large last last_day last_insert_id last_value lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop low low_priority lower lpad lrtrim ltrim main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second section securefile security seed segment select self sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime table tables tablespace tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek",literal:"true false null",built_in:"array bigint binary bit blob boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text varchar varying void"},contains:[{className:"string",begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE,{begin:"''"}]},{className:"string",begin:'"',end:'"',contains:[e.BACKSLASH_ESCAPE,{begin:'""'}]},{className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,t]},e.C_BLOCK_COMMENT_MODE,t]}}}),define("highlight/lib/languages/stan",["require","exports","module"],function(e,t,n){n.exports=function(e){return{contains:[e.HASH_COMMENT_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:e.UNDERSCORE_IDENT_RE,lexemes:e.UNDERSCORE_IDENT_RE,keywords:{name:"for in while repeat until if then else",symbol:"bernoulli bernoulli_logit binomial binomial_logit beta_binomial hypergeometric categorical categorical_logit ordered_logistic neg_binomial neg_binomial_2 neg_binomial_2_log poisson poisson_log multinomial normal exp_mod_normal skew_normal student_t cauchy double_exponential logistic gumbel lognormal chi_square inv_chi_square scaled_inv_chi_square exponential inv_gamma weibull frechet rayleigh wiener pareto pareto_type_2 von_mises uniform multi_normal multi_normal_prec multi_normal_cholesky multi_gp multi_gp_cholesky multi_student_t gaussian_dlm_obs dirichlet lkj_corr lkj_corr_cholesky wishart inv_wishart","selector-tag":"int real vector simplex unit_vector ordered positive_ordered row_vector matrix cholesky_factor_corr cholesky_factor_cov corr_matrix cov_matrix",title:"functions model data parameters quantities transformed generated",literal:"true false"},relevance:0},{className:"number",begin:"0[xX][0-9a-fA-F]+[Li]?\\b",relevance:0},{className:"number",begin:"0[xX][0-9a-fA-F]+[Li]?\\b",relevance:0},{className:"number",begin:"\\d+(?:[eE][+\\-]?\\d*)?L\\b",relevance:0},{className:"number",begin:"\\d+\\.(?!\\d)(?:i\\b)?",relevance:0},{className:"number",begin:"\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b",relevance:0},{className:"number",begin:"\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b",relevance:0}]}}}),define("highlight/lib/languages/stata",["require","exports","module"],function(e,t,n){n.exports=function(e){return{aliases:["do","ado"],case_insensitive:!0,keywords:"if else in foreach for forv forva forval forvalu forvalue forvalues by bys bysort xi quietly qui capture about ac ac_7 acprplot acprplot_7 adjust ado adopath adoupdate alpha ameans an ano anov anova anova_estat anova_terms anovadef aorder ap app appe appen append arch arch_dr arch_estat arch_p archlm areg areg_p args arima arima_dr arima_estat arima_p as asmprobit asmprobit_estat asmprobit_lf asmprobit_mfx__dlg asmprobit_p ass asse asser assert avplot avplot_7 avplots avplots_7 bcskew0 bgodfrey binreg bip0_lf biplot bipp_lf bipr_lf bipr_p biprobit bitest bitesti bitowt blogit bmemsize boot bootsamp bootstrap bootstrap_8 boxco_l boxco_p boxcox boxcox_6 boxcox_p bprobit br break brier bro brow brows browse brr brrstat bs bs_7 bsampl_w bsample bsample_7 bsqreg bstat bstat_7 bstat_8 bstrap bstrap_7 ca ca_estat ca_p cabiplot camat canon canon_8 canon_8_p canon_estat canon_p cap caprojection capt captu captur capture cat cc cchart cchart_7 cci cd censobs_table centile cf char chdir checkdlgfiles checkestimationsample checkhlpfiles checksum chelp ci cii cl class classutil clear cli clis clist clo clog clog_lf clog_p clogi clogi_sw clogit clogit_lf clogit_p clogitp clogl_sw cloglog clonevar clslistarray cluster cluster_measures cluster_stop cluster_tree cluster_tree_8 clustermat cmdlog cnr cnre cnreg cnreg_p cnreg_sw cnsreg codebook collaps4 collapse colormult_nb colormult_nw compare compress conf confi confir confirm conren cons const constr constra constrai constrain constraint continue contract copy copyright copysource cor corc corr corr2data corr_anti corr_kmo corr_smc corre correl correla correlat correlate corrgram cou coun count cox cox_p cox_sw coxbase coxhaz coxvar cprplot cprplot_7 crc cret cretu cretur creturn cross cs cscript cscript_log csi ct ct_is ctset ctst_5 ctst_st cttost cumsp cumsp_7 cumul cusum cusum_7 cutil d|0 datasig datasign datasigna datasignat datasignatu datasignatur datasignature datetof db dbeta de dec deco decod decode deff des desc descr descri describ describe destring dfbeta dfgls dfuller di di_g dir dirstats dis discard disp disp_res disp_s displ displa display distinct do doe doed doedi doedit dotplot dotplot_7 dprobit drawnorm drop ds ds_util dstdize duplicates durbina dwstat dydx e|0 ed edi edit egen eivreg emdef en enc enco encod encode eq erase ereg ereg_lf ereg_p ereg_sw ereghet ereghet_glf ereghet_glf_sh ereghet_gp ereghet_ilf ereghet_ilf_sh ereghet_ip eret eretu eretur ereturn err erro error est est_cfexist est_cfname est_clickable est_expand est_hold est_table est_unhold est_unholdok estat estat_default estat_summ estat_vce_only esti estimates etodow etof etomdy ex exi exit expand expandcl fac fact facto factor factor_estat factor_p factor_pca_rotated factor_rotate factormat fcast fcast_compute fcast_graph fdades fdadesc fdadescr fdadescri fdadescrib fdadescribe fdasav fdasave fdause fh_st file open file read file close file filefilter fillin find_hlp_file findfile findit findit_7 fit fl fli flis flist for5_0 form forma format fpredict frac_154 frac_adj frac_chk frac_cox frac_ddp frac_dis frac_dv frac_in frac_mun frac_pp frac_pq frac_pv frac_wgt frac_xo fracgen fracplot fracplot_7 fracpoly fracpred fron_ex fron_hn fron_p fron_tn fron_tn2 frontier ftodate ftoe ftomdy ftowdate g|0 gamhet_glf gamhet_gp gamhet_ilf gamhet_ip gamma gamma_d2 gamma_p gamma_sw gammahet gdi_hexagon gdi_spokes ge gen gene gener genera generat generate genrank genstd genvmean gettoken gl gladder gladder_7 glim_l01 glim_l02 glim_l03 glim_l04 glim_l05 glim_l06 glim_l07 glim_l08 glim_l09 glim_l10 glim_l11 glim_l12 glim_lf glim_mu glim_nw1 glim_nw2 glim_nw3 glim_p glim_v1 glim_v2 glim_v3 glim_v4 glim_v5 glim_v6 glim_v7 glm glm_6 glm_p glm_sw glmpred glo glob globa global glogit glogit_8 glogit_p gmeans gnbre_lf gnbreg gnbreg_5 gnbreg_p gomp_lf gompe_sw gomper_p gompertz gompertzhet gomphet_glf gomphet_glf_sh gomphet_gp gomphet_ilf gomphet_ilf_sh gomphet_ip gphdot gphpen gphprint gprefs gprobi_p gprobit gprobit_8 gr gr7 gr_copy gr_current gr_db gr_describe gr_dir gr_draw gr_draw_replay gr_drop gr_edit gr_editviewopts gr_example gr_example2 gr_export gr_print gr_qscheme gr_query gr_read gr_rename gr_replay gr_save gr_set gr_setscheme gr_table gr_undo gr_use graph graph7 grebar greigen greigen_7 greigen_8 grmeanby grmeanby_7 gs_fileinfo gs_filetype gs_graphinfo gs_stat gsort gwood h|0 hadimvo hareg hausman haver he heck_d2 heckma_p heckman heckp_lf heckpr_p heckprob hel help hereg hetpr_lf hetpr_p hetprob hettest hexdump hilite hist hist_7 histogram hlogit hlu hmeans hotel hotelling hprobit hreg hsearch icd9 icd9_ff icd9p iis impute imtest inbase include inf infi infil infile infix inp inpu input ins insheet insp inspe inspec inspect integ inten intreg intreg_7 intreg_p intrg2_ll intrg_ll intrg_ll2 ipolate iqreg ir irf irf_create irfm iri is_svy is_svysum isid istdize ivprob_1_lf ivprob_lf ivprobit ivprobit_p ivreg ivreg_footnote ivtob_1_lf ivtob_lf ivtobit ivtobit_p jackknife jacknife jknife jknife_6 jknife_8 jkstat joinby kalarma1 kap kap_3 kapmeier kappa kapwgt kdensity kdensity_7 keep ksm ksmirnov ktau kwallis l|0 la lab labe label labelbook ladder levels levelsof leverage lfit lfit_p li lincom line linktest lis list lloghet_glf lloghet_glf_sh lloghet_gp lloghet_ilf lloghet_ilf_sh lloghet_ip llogi_sw llogis_p llogist llogistic llogistichet lnorm_lf lnorm_sw lnorma_p lnormal lnormalhet lnormhet_glf lnormhet_glf_sh lnormhet_gp lnormhet_ilf lnormhet_ilf_sh lnormhet_ip lnskew0 loadingplot loc loca local log logi logis_lf logistic logistic_p logit logit_estat logit_p loglogs logrank loneway lookfor lookup lowess lowess_7 lpredict lrecomp lroc lroc_7 lrtest ls lsens lsens_7 lsens_x lstat ltable ltable_7 ltriang lv lvr2plot lvr2plot_7 m|0 ma mac macr macro makecns man manova manova_estat manova_p manovatest mantel mark markin markout marksample mat mat_capp mat_order mat_put_rr mat_rapp mata mata_clear mata_describe mata_drop mata_matdescribe mata_matsave mata_matuse mata_memory mata_mlib mata_mosave mata_rename mata_which matalabel matcproc matlist matname matr matri matrix matrix_input__dlg matstrik mcc mcci md0_ md1_ md1debug_ md2_ md2debug_ mds mds_estat mds_p mdsconfig mdslong mdsmat mdsshepard mdytoe mdytof me_derd mean means median memory memsize meqparse mer merg merge mfp mfx mhelp mhodds minbound mixed_ll mixed_ll_reparm mkassert mkdir mkmat mkspline ml ml_5 ml_adjs ml_bhhhs ml_c_d ml_check ml_clear ml_cnt ml_debug ml_defd ml_e0 ml_e0_bfgs ml_e0_cycle ml_e0_dfp ml_e0i ml_e1 ml_e1_bfgs ml_e1_bhhh ml_e1_cycle ml_e1_dfp ml_e2 ml_e2_cycle ml_ebfg0 ml_ebfr0 ml_ebfr1 ml_ebh0q ml_ebhh0 ml_ebhr0 ml_ebr0i ml_ecr0i ml_edfp0 ml_edfr0 ml_edfr1 ml_edr0i ml_eds ml_eer0i ml_egr0i ml_elf ml_elf_bfgs ml_elf_bhhh ml_elf_cycle ml_elf_dfp ml_elfi ml_elfs ml_enr0i ml_enrr0 ml_erdu0 ml_erdu0_bfgs ml_erdu0_bhhh ml_erdu0_bhhhq ml_erdu0_cycle ml_erdu0_dfp ml_erdu0_nrbfgs ml_exde ml_footnote ml_geqnr ml_grad0 ml_graph ml_hbhhh ml_hd0 ml_hold ml_init ml_inv ml_log ml_max ml_mlout ml_mlout_8 ml_model ml_nb0 ml_opt ml_p ml_plot ml_query ml_rdgrd ml_repor ml_s_e ml_score ml_searc ml_technique ml_unhold mleval mlf_ mlmatbysum mlmatsum mlog mlogi mlogit mlogit_footnote mlogit_p mlopts mlsum mlvecsum mnl0_ mor more mov move mprobit mprobit_lf mprobit_p mrdu0_ mrdu1_ mvdecode mvencode mvreg mvreg_estat n|0 nbreg nbreg_al nbreg_lf nbreg_p nbreg_sw nestreg net newey newey_7 newey_p news nl nl_7 nl_9 nl_9_p nl_p nl_p_7 nlcom nlcom_p nlexp2 nlexp2_7 nlexp2a nlexp2a_7 nlexp3 nlexp3_7 nlgom3 nlgom3_7 nlgom4 nlgom4_7 nlinit nllog3 nllog3_7 nllog4 nllog4_7 nlog_rd nlogit nlogit_p nlogitgen nlogittree nlpred no nobreak noi nois noisi noisil noisily note notes notes_dlg nptrend numlabel numlist odbc old_ver olo olog ologi ologi_sw ologit ologit_p ologitp on one onew onewa oneway op_colnm op_comp op_diff op_inv op_str opr opro oprob oprob_sw oprobi oprobi_p oprobit oprobitp opts_exclusive order orthog orthpoly ou out outf outfi outfil outfile outs outsh outshe outshee outsheet ovtest pac pac_7 palette parse parse_dissim pause pca pca_8 pca_display pca_estat pca_p pca_rotate pcamat pchart pchart_7 pchi pchi_7 pcorr pctile pentium pergram pergram_7 permute permute_8 personal peto_st pkcollapse pkcross pkequiv pkexamine pkexamine_7 pkshape pksumm pksumm_7 pl plo plot plugin pnorm pnorm_7 poisgof poiss_lf poiss_sw poisso_p poisson poisson_estat post postclose postfile postutil pperron pr prais prais_e prais_e2 prais_p predict predictnl preserve print pro prob probi probit probit_estat probit_p proc_time procoverlay procrustes procrustes_estat procrustes_p profiler prog progr progra program prop proportion prtest prtesti pwcorr pwd q\\s qby qbys qchi qchi_7 qladder qladder_7 qnorm qnorm_7 qqplot qqplot_7 qreg qreg_c qreg_p qreg_sw qu quadchk quantile quantile_7 que quer query range ranksum ratio rchart rchart_7 rcof recast reclink recode reg reg3 reg3_p regdw regr regre regre_p2 regres regres_p regress regress_estat regriv_p remap ren rena renam rename renpfix repeat replace report reshape restore ret retu retur return rm rmdir robvar roccomp roccomp_7 roccomp_8 rocf_lf rocfit rocfit_8 rocgold rocplot rocplot_7 roctab roctab_7 rolling rologit rologit_p rot rota rotat rotate rotatemat rreg rreg_p ru run runtest rvfplot rvfplot_7 rvpplot rvpplot_7 sa safesum sample sampsi sav save savedresults saveold sc sca scal scala scalar scatter scm_mine sco scob_lf scob_p scobi_sw scobit scor score scoreplot scoreplot_help scree screeplot screeplot_help sdtest sdtesti se search separate seperate serrbar serrbar_7 serset set set_defaults sfrancia sh she shel shell shewhart shewhart_7 signestimationsample signrank signtest simul simul_7 simulate simulate_8 sktest sleep slogit slogit_d2 slogit_p smooth snapspan so sor sort spearman spikeplot spikeplot_7 spikeplt spline_x split sqreg sqreg_p sret sretu sretur sreturn ssc st st_ct st_hc st_hcd st_hcd_sh st_is st_issys st_note st_promo st_set st_show st_smpl st_subid stack statsby statsby_8 stbase stci stci_7 stcox stcox_estat stcox_fr stcox_fr_ll stcox_p stcox_sw stcoxkm stcoxkm_7 stcstat stcurv stcurve stcurve_7 stdes stem stepwise stereg stfill stgen stir stjoin stmc stmh stphplot stphplot_7 stphtest stphtest_7 stptime strate strate_7 streg streg_sw streset sts sts_7 stset stsplit stsum sttocc sttoct stvary stweib su suest suest_8 sum summ summa summar summari summariz summarize sunflower sureg survcurv survsum svar svar_p svmat svy svy_disp svy_dreg svy_est svy_est_7 svy_estat svy_get svy_gnbreg_p svy_head svy_header svy_heckman_p svy_heckprob_p svy_intreg_p svy_ivreg_p svy_logistic_p svy_logit_p svy_mlogit_p svy_nbreg_p svy_ologit_p svy_oprobit_p svy_poisson_p svy_probit_p svy_regress_p svy_sub svy_sub_7 svy_x svy_x_7 svy_x_p svydes svydes_8 svygen svygnbreg svyheckman svyheckprob svyintreg svyintreg_7 svyintrg svyivreg svylc svylog_p svylogit svymarkout svymarkout_8 svymean svymlog svymlogit svynbreg svyolog svyologit svyoprob svyoprobit svyopts svypois svypois_7 svypoisson svyprobit svyprobt svyprop svyprop_7 svyratio svyreg svyreg_p svyregress svyset svyset_7 svyset_8 svytab svytab_7 svytest svytotal sw sw_8 swcnreg swcox swereg swilk swlogis swlogit swologit swoprbt swpois swprobit swqreg swtobit swweib symmetry symmi symplot symplot_7 syntax sysdescribe sysdir sysuse szroeter ta tab tab1 tab2 tab_or tabd tabdi tabdis tabdisp tabi table tabodds tabodds_7 tabstat tabu tabul tabula tabulat tabulate te tempfile tempname tempvar tes test testnl testparm teststd tetrachoric time_it timer tis tob tobi tobit tobit_p tobit_sw token tokeni tokeniz tokenize tostring total translate translator transmap treat_ll treatr_p treatreg trim trnb_cons trnb_mean trpoiss_d2 trunc_ll truncr_p truncreg tsappend tset tsfill tsline tsline_ex tsreport tsrevar tsrline tsset tssmooth tsunab ttest ttesti tut_chk tut_wait tutorial tw tware_st two twoway twoway__fpfit_serset twoway__function_gen twoway__histogram_gen twoway__ipoint_serset twoway__ipoints_serset twoway__kdensity_gen twoway__lfit_serset twoway__normgen_gen twoway__pci_serset twoway__qfit_serset twoway__scatteri_serset twoway__sunflower_gen twoway_ksm_serset ty typ type typeof u|0 unab unabbrev unabcmd update us use uselabel var var_mkcompanion var_p varbasic varfcast vargranger varirf varirf_add varirf_cgraph varirf_create varirf_ctable varirf_describe varirf_dir varirf_drop varirf_erase varirf_graph varirf_ograph varirf_rename varirf_set varirf_table varlist varlmar varnorm varsoc varstable varstable_w varstable_w2 varwle vce vec vec_fevd vec_mkphi vec_p vec_p_w vecirf_create veclmar veclmar_w vecnorm vecnorm_w vecrank vecstable verinst vers versi versio version view viewsource vif vwls wdatetof webdescribe webseek webuse weib1_lf weib2_lf weib_lf weib_lf0 weibhet_glf weibhet_glf_sh weibhet_glfa weibhet_glfa_sh weibhet_gp weibhet_ilf weibhet_ilf_sh weibhet_ilfa weibhet_ilfa_sh weibhet_ip weibu_sw weibul_p weibull weibull_c weibull_s weibullhet wh whelp whi which whil while wilc_st wilcoxon win wind windo window winexec wntestb wntestb_7 wntestq xchart xchart_7 xcorr xcorr_7 xi xi_6 xmlsav xmlsave xmluse xpose xsh xshe xshel xshell xt_iis xt_tis xtab_p xtabond xtbin_p xtclog xtcloglog xtcloglog_8 xtcloglog_d2 xtcloglog_pa_p xtcloglog_re_p xtcnt_p xtcorr xtdata xtdes xtfront_p xtfrontier xtgee xtgee_elink xtgee_estat xtgee_makeivar xtgee_p xtgee_plink xtgls xtgls_p xthaus xthausman xtht_p xthtaylor xtile xtint_p xtintreg xtintreg_8 xtintreg_d2 xtintreg_p xtivp_1 xtivp_2 xtivreg xtline xtline_ex xtlogit xtlogit_8 xtlogit_d2 xtlogit_fe_p xtlogit_pa_p xtlogit_re_p xtmixed xtmixed_estat xtmixed_p xtnb_fe xtnb_lf xtnbreg xtnbreg_pa_p xtnbreg_refe_p xtpcse xtpcse_p xtpois xtpoisson xtpoisson_d2 xtpoisson_pa_p xtpoisson_refe_p xtpred xtprobit xtprobit_8 xtprobit_d2 xtprobit_re_p xtps_fe xtps_lf xtps_ren xtps_ren_8 xtrar_p xtrc xtrc_p xtrchh xtrefe_p xtreg xtreg_be xtreg_fe xtreg_ml xtreg_pa_p xtreg_re xtregar xtrere_p xtset xtsf_ll xtsf_llti xtsum xttab xttest0 xttobit xttobit_8 xttobit_p xttrans yx yxview__barlike_draw yxview_area_draw yxview_bar_draw yxview_dot_draw yxview_dropline_draw yxview_function_draw yxview_iarrow_draw yxview_ilabels_draw yxview_normal_draw yxview_pcarrow_draw yxview_pcbarrow_draw yxview_pccapsym_draw yxview_pcscatter_draw yxview_pcspike_draw yxview_rarea_draw yxview_rbar_draw yxview_rbarm_draw yxview_rcap_draw yxview_rcapsym_draw yxview_rconnected_draw yxview_rline_draw yxview_rscatter_draw yxview_rspike_draw yxview_spike_draw yxview_sunflower_draw zap_s zinb zinb_llf zinb_plf zip zip_llf zip_p zip_plf zt_ct_5 zt_hc_5 zt_hcd_5 zt_is_5 zt_iss_5 zt_sho_5 zt_smp_5 ztbase_5 ztcox_5 ztdes_5 ztereg_5 ztfill_5 ztgen_5 ztir_5 ztjoin_5 ztnb ztnb_p ztp ztp_p zts_5 ztset_5 ztspli_5 ztsum_5 zttoct_5 ztvary_5 ztweib_5",contains:[{className:"symbol",begin:/`[a-zA-Z0-9_]+'/},{className:"variable",begin:/\$\{?[a-zA-Z0-9_]+\}?/},{className:"string",variants:[{begin:'`"[^\r\n]*?"\''},{begin:'"[^\r\n"]*"'}]},{className:"built_in",variants:[{begin:"\\b(abs|acos|asin|atan|atan2|atanh|ceil|cloglog|comb|cos|digamma|exp|floor|invcloglog|invlogit|ln|lnfact|lnfactorial|lngamma|log|log10|max|min|mod|reldif|round|sign|sin|sqrt|sum|tan|tanh|trigamma|trunc|betaden|Binomial|binorm|binormal|chi2|chi2tail|dgammapda|dgammapdada|dgammapdadx|dgammapdx|dgammapdxdx|F|Fden|Ftail|gammaden|gammap|ibeta|invbinomial|invchi2|invchi2tail|invF|invFtail|invgammap|invibeta|invnchi2|invnFtail|invnibeta|invnorm|invnormal|invttail|nbetaden|nchi2|nFden|nFtail|nibeta|norm|normal|normalden|normd|npnchi2|tden|ttail|uniform|abbrev|char|index|indexnot|length|lower|ltrim|match|plural|proper|real|regexm|regexr|regexs|reverse|rtrim|string|strlen|strlower|strltrim|strmatch|strofreal|strpos|strproper|strreverse|strrtrim|strtrim|strupper|subinstr|subinword|substr|trim|upper|word|wordcount|_caller|autocode|byteorder|chop|clip|cond|e|epsdouble|epsfloat|group|inlist|inrange|irecode|matrix|maxbyte|maxdouble|maxfloat|maxint|maxlong|mi|minbyte|mindouble|minfloat|minint|minlong|missing|r|recode|replay|return|s|scalar|d|date|day|dow|doy|halfyear|mdy|month|quarter|week|year|d|daily|dofd|dofh|dofm|dofq|dofw|dofy|h|halfyearly|hofd|m|mofd|monthly|q|qofd|quarterly|tin|twithin|w|weekly|wofd|y|yearly|yh|ym|yofd|yq|yw|cholesky|colnumb|colsof|corr|det|diag|diag0cnt|el|get|hadamard|I|inv|invsym|issym|issymmetric|J|matmissing|matuniform|mreldif|nullmat|rownumb|rowsof|sweep|syminv|trace|vec|vecdiag)(?=\\(|$)"}]},e.COMMENT("^[ \t]*\\*.*$",!1),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}}}),define("highlight/lib/languages/step21",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="[A-Z_][A-Z0-9_.]*",n={keyword:"HEADER ENDSEC DATA"},i={className:"meta",begin:"ISO-10303-21;",relevance:10},r={className:"meta",begin:"END-ISO-10303-21;",relevance:10};return{aliases:["p21","step","stp"],case_insensitive:!0,lexemes:t,keywords:n,contains:[i,r,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.COMMENT("/\\*\\*!","\\*/"),e.C_NUMBER_MODE,e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"'",end:"'"},{className:"symbol",variants:[{begin:"#",end:"\\d+",illegal:"\\W"}]}]}}}),define("highlight/lib/languages/stylus",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"variable",begin:"\\$"+e.IDENT_RE},n={className:"number",begin:"#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})"},i=["charset","css","debug","extend","font-face","for","import","include","media","mixin","page","warn","while"],r=["after","before","first-letter","first-line","active","first-child","focus","hover","lang","link","visited"],a=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],o="[\\.\\s\\n\\[\\:,]",s=["align-content","align-items","align-self","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","auto","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","clip-path","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","font","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-variant-ligatures","font-weight","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inherit","initial","justify-content","left","letter-spacing","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","mask","max-height","max-width","min-height","min-width","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","perspective","perspective-origin","pointer-events","position","quotes","resize","right","tab-size","table-layout","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-indent","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","white-space","widows","width","word-break","word-spacing","word-wrap","z-index"],l=["\\?","(\\bReturn\\b)","(\\bEnd\\b)","(\\bend\\b)","(\\bdef\\b)",";","#\\s","\\*\\s","===\\s","\\|","%"]; -return{aliases:["styl"],case_insensitive:!1,keywords:"if else for in",illegal:"("+l.join("|")+")",contains:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,{begin:"\\.[a-zA-Z][a-zA-Z0-9_-]*"+o,returnBegin:!0,contains:[{className:"selector-class",begin:"\\.[a-zA-Z][a-zA-Z0-9_-]*"}]},{begin:"\\#[a-zA-Z][a-zA-Z0-9_-]*"+o,returnBegin:!0,contains:[{className:"selector-id",begin:"\\#[a-zA-Z][a-zA-Z0-9_-]*"}]},{begin:"\\b("+a.join("|")+")"+o,returnBegin:!0,contains:[{className:"selector-tag",begin:"\\b[a-zA-Z][a-zA-Z0-9_-]*"}]},{begin:"&?:?:\\b("+r.join("|")+")"+o},{begin:"@("+i.join("|")+")\\b"},t,e.CSS_NUMBER_MODE,e.NUMBER_MODE,{className:"function",begin:"^[a-zA-Z][a-zA-Z0-9_-]*\\(.*\\)",illegal:"[\\n]",returnBegin:!0,contains:[{className:"title",begin:"\\b[a-zA-Z][a-zA-Z0-9_-]*"},{className:"params",begin:/\(/,end:/\)/,contains:[n,t,e.APOS_STRING_MODE,e.CSS_NUMBER_MODE,e.NUMBER_MODE,e.QUOTE_STRING_MODE]}]},{className:"attribute",begin:"\\b("+s.reverse().join("|")+")\\b",starts:{end:/;|$/,contains:[n,t,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.CSS_NUMBER_MODE,e.NUMBER_MODE,e.C_BLOCK_COMMENT_MODE],illegal:/\./,relevance:0}}]}}}),define("highlight/lib/languages/subunit",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"string",begin:"\\[\n(multipart)?",end:"\\]\n"},n={className:"string",begin:"\\d{4}-\\d{2}-\\d{2}(\\s+)\\d{2}:\\d{2}:\\d{2}.\\d+Z"},i={className:"string",begin:"(\\+|-)\\d+"},r={className:"keyword",relevance:10,variants:[{begin:"^(test|testing|success|successful|failure|error|skip|xfail|uxsuccess)(:?)\\s+(test)?"},{begin:"^progress(:?)(\\s+)?(pop|push)?"},{begin:"^tags:"},{begin:"^time:"}]};return{case_insensitive:!0,contains:[t,n,i,r]}}}),define("highlight/lib/languages/swift",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={keyword:"__COLUMN__ __FILE__ __FUNCTION__ __LINE__ as as! as? associativity break case catch class continue convenience default defer deinit didSet do dynamic dynamicType else enum extension fallthrough false final for func get guard if import in indirect infix init inout internal is lazy left let mutating nil none nonmutating operator optional override postfix precedence prefix private protocol Protocol public repeat required rethrows return right self Self set static struct subscript super switch throw throws true try try! try? Type typealias unowned var weak where while willSet",literal:"true false nil",built_in:"abs advance alignof alignofValue anyGenerator assert assertionFailure bridgeFromObjectiveC bridgeFromObjectiveCUnconditional bridgeToObjectiveC bridgeToObjectiveCUnconditional c contains count countElements countLeadingZeros debugPrint debugPrintln distance dropFirst dropLast dump encodeBitsAsWords enumerate equal fatalError filter find getBridgedObjectiveCType getVaList indices insertionSort isBridgedToObjectiveC isBridgedVerbatimToObjectiveC isUniquelyReferenced isUniquelyReferencedNonObjC join lazy lexicographicalCompare map max maxElement min minElement numericCast overlaps partition posix precondition preconditionFailure print println quickSort readLine reduce reflect reinterpretCast reverse roundUpToAlignment sizeof sizeofValue sort split startsWith stride strideof strideofValue swap toString transcode underestimateCount unsafeAddressOf unsafeBitCast unsafeDowncast unsafeUnwrap unsafeReflect withExtendedLifetime withObjectAtPlusZero withUnsafePointer withUnsafePointerToObject withUnsafeMutablePointer withUnsafeMutablePointers withUnsafePointer withUnsafePointers withVaList zip"},n={className:"type",begin:"\\b[A-Z][\\wÀ-ʸ']*",relevance:0},i=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r={className:"subst",begin:/\\\(/,end:"\\)",keywords:t,contains:[]},a={className:"number",begin:"\\b([\\d_]+(\\.[\\deE_]+)?|0x[a-fA-F0-9_]+(\\.[a-fA-F0-9p_]+)?|0b[01_]+|0o[0-7_]+)\\b",relevance:0},o=e.inherit(e.QUOTE_STRING_MODE,{contains:[r,e.BACKSLASH_ESCAPE]});return r.contains=[a],{keywords:t,contains:[o,e.C_LINE_COMMENT_MODE,i,n,a,{className:"function",beginKeywords:"func",end:"{",excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/}),{begin://},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,contains:["self",a,o,e.C_BLOCK_COMMENT_MODE,{begin:":"}],illegal:/["']/}],illegal:/\[|%/},{className:"class",beginKeywords:"struct protocol class extension enum",keywords:t,end:"\\{",excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/})]},{className:"meta",begin:"(@warn_unused_result|@exported|@lazy|@noescape|@NSCopying|@NSManaged|@objc|@convention|@required|@noreturn|@IBAction|@IBDesignable|@IBInspectable|@IBOutlet|@infix|@prefix|@postfix|@autoclosure|@testable|@available|@nonobjc|@NSApplicationMain|@UIApplicationMain)"},{beginKeywords:"import",end:/$/,contains:[e.C_LINE_COMMENT_MODE,i]}]}}}),define("highlight/lib/languages/taggerscript",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"comment",begin:/\$noop\(/,end:/\)/,contains:[{begin:/\(/,end:/\)/,contains:["self",{begin:/\\./}]}],relevance:10},n={className:"keyword",begin:/\$(?!noop)[a-zA-Z][_a-zA-Z0-9]*/,end:/\(/,excludeEnd:!0},i={className:"variable",begin:/%[_a-zA-Z0-9:]*/,end:"%"},r={className:"symbol",begin:/\\./};return{contains:[t,n,i,r]}}}),define("highlight/lib/languages/yaml",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={literal:"{ } true false yes no Yes No True False null"},n="^[ \\-]*",i="[a-zA-Z_][\\w\\-]*",r={className:"attr",variants:[{begin:n+i+":"},{begin:n+'"'+i+'":'},{begin:n+"'"+i+"':"}]},a={className:"template-variable",variants:[{begin:"{{",end:"}}"},{begin:"%{",end:"}"}]},o={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/}],contains:[e.BACKSLASH_ESCAPE,a]};return{case_insensitive:!0,aliases:["yml","YAML","yaml"],contains:[r,{className:"meta",begin:"^---s*$",relevance:10},{className:"string",begin:"[\\|>] *$",returnEnd:!0,contains:o.contains,end:r.variants[0].begin},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!!"+e.UNDERSCORE_IDENT_RE},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"^ *-",relevance:0},o,e.HASH_COMMENT_MODE,e.C_NUMBER_MODE],keywords:t}}}),define("highlight/lib/languages/tap",["require","exports","module"],function(e,t,n){n.exports=function(e){return{case_insensitive:!0,contains:[e.HASH_COMMENT_MODE,{className:"meta",variants:[{begin:"^TAP version (\\d+)$"},{begin:"^1\\.\\.(\\d+)$"}]},{begin:"(s+)?---$",end:"\\.\\.\\.$",subLanguage:"yaml",relevance:0},{className:"number",begin:" (\\d+) "},{className:"symbol",variants:[{begin:"^ok"},{begin:"^not ok"}]}]}}}),define("highlight/lib/languages/tcl",["require","exports","module"],function(e,t,n){n.exports=function(e){return{aliases:["tk"],keywords:"after append apply array auto_execok auto_import auto_load auto_mkindex auto_mkindex_old auto_qualify auto_reset bgerror binary break catch cd chan clock close concat continue dde dict encoding eof error eval exec exit expr fblocked fconfigure fcopy file fileevent filename flush for foreach format gets glob global history http if incr info interp join lappend|10 lassign|10 lindex|10 linsert|10 list llength|10 load lrange|10 lrepeat|10 lreplace|10 lreverse|10 lsearch|10 lset|10 lsort|10 mathfunc mathop memory msgcat namespace open package parray pid pkg::create pkg_mkIndex platform platform::shell proc puts pwd read refchan regexp registry regsub|10 rename return safe scan seek set socket source split string subst switch tcl_endOfWord tcl_findLibrary tcl_startOfNextWord tcl_startOfPreviousWord tcl_wordBreakAfter tcl_wordBreakBefore tcltest tclvars tell time tm trace unknown unload unset update uplevel upvar variable vwait while",contains:[e.COMMENT(";[ \\t]*#","$"),e.COMMENT("^[ \\t]*#","$"),{beginKeywords:"proc",end:"[\\{]",excludeEnd:!0,contains:[{className:"title",begin:"[ \\t\\n\\r]+(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"[ \\t\\n\\r]",endsWithParent:!0,excludeEnd:!0}]},{excludeEnd:!0,variants:[{begin:"\\$(\\{)?(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*\\(([a-zA-Z0-9_])*\\)",end:"[^a-zA-Z0-9_\\}\\$]"},{begin:"\\$(\\{)?(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"(\\))?[^a-zA-Z0-9_\\}\\$]"}]},{className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null})]},{className:"number",variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]}]}}}),define("highlight/lib/languages/tex",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"tag",begin:/\\/,relevance:0,contains:[{className:"name",variants:[{begin:/[a-zA-Zа-яА-я]+[*]?/},{begin:/[^a-zA-Zа-яА-я0-9]/}],starts:{endsWithParent:!0,relevance:0,contains:[{className:"string",variants:[{begin:/\[/,end:/\]/},{begin:/\{/,end:/\}/}]},{begin:/\s*=\s*/,endsWithParent:!0,relevance:0,contains:[{className:"number",begin:/-?\d*\.?\d+(pt|pc|mm|cm|in|dd|cc|ex|em)?/}]}]}}]};return{contains:[t,{className:"formula",contains:[t],relevance:0,variants:[{begin:/\$\$/,end:/\$\$/},{begin:/\$/,end:/\$/}]},e.COMMENT("%","$",{relevance:0})]}}}),define("highlight/lib/languages/thrift",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="bool byte i16 i32 i64 double string binary";return{keywords:{keyword:"namespace const typedef struct enum service exception void oneway set list map required optional",built_in:t,literal:"true false"},contains:[e.QUOTE_STRING_MODE,e.NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"class",beginKeywords:"struct enum service exception",end:/\{/,illegal:/\n/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]},{begin:"\\b(set|list|map)\\s*<",end:">",keywords:t,contains:["self"]}]}}}),define("highlight/lib/languages/tp",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"number",begin:"[1-9][0-9]*",relevance:0},n={className:"symbol",begin:":[^\\]]+"},i={className:"built_in",begin:"(AR|P|PAYLOAD|PR|R|SR|RSR|LBL|VR|UALM|MESSAGE|UTOOL|UFRAME|TIMER| TIMER_OVERFLOW|JOINT_MAX_SPEED|RESUME_PROG|DIAG_REC)\\[",end:"\\]",contains:["self",t,n]},r={className:"built_in",begin:"(AI|AO|DI|DO|F|RI|RO|UI|UO|GI|GO|SI|SO)\\[",end:"\\]",contains:["self",t,e.QUOTE_STRING_MODE,n]};return{keywords:{keyword:"ABORT ACC ADJUST AND AP_LD BREAK CALL CNT COL CONDITION CONFIG DA DB DIV DETECT ELSE END ENDFOR ERR_NUM ERROR_PROG FINE FOR GP GUARD INC IF JMP LINEAR_MAX_SPEED LOCK MOD MONITOR OFFSET Offset OR OVERRIDE PAUSE PREG PTH RT_LD RUN SELECT SKIP Skip TA TB TO TOOL_OFFSET Tool_Offset UF UT UFRAME_NUM UTOOL_NUM UNLOCK WAIT X Y Z W P R STRLEN SUBSTR FINDSTR VOFFSET PROG ATTR MN POS",literal:"ON OFF max_speed LPOS JPOS ENABLE DISABLE START STOP RESET"},contains:[i,r,{className:"keyword",begin:"/(PROG|ATTR|MN|POS|END)\\b"},{className:"keyword",begin:"(CALL|RUN|POINT_LOGIC|LBL)\\b"},{className:"keyword",begin:"\\b(ACC|CNT|Skip|Offset|PSPD|RT_LD|AP_LD|Tool_Offset)"},{className:"number",begin:"\\d+(sec|msec|mm/sec|cm/min|inch/min|deg/sec|mm|in|cm)?\\b",relevance:0},e.COMMENT("//","[;$]"),e.COMMENT("!","[;$]"),e.COMMENT("--eg:","$"),e.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"'"},e.C_NUMBER_MODE,{className:"variable",begin:"\\$[A-Za-z0-9_]+"}]}}}),define("highlight/lib/languages/twig",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"params",begin:"\\(",end:"\\)"},n="attribute block constant cycle date dump include max min parent random range source template_from_string",i={beginKeywords:n,keywords:{name:n},relevance:0,contains:[t]},r={begin:/\|[A-Za-z_]+:?/,keywords:"abs batch capitalize convert_encoding date date_modify default escape first format join json_encode keys last length lower merge nl2br number_format raw replace reverse round slice sort split striptags title trim upper url_encode",contains:[i]},a="autoescape block do embed extends filter flush for if import include macro sandbox set spaceless use verbatim";return a=a+" "+a.split(" ").map(function(e){return"end"+e}).join(" "),{aliases:["craftcms"],case_insensitive:!0,subLanguage:"xml",contains:[e.COMMENT(/\{#/,/#}/),{className:"template-tag",begin:/\{%/,end:/%}/,contains:[{className:"name",begin:/\w+/,keywords:a,starts:{endsWithParent:!0,contains:[r,i],relevance:0}}]},{className:"template-variable",begin:/\{\{/,end:/}}/,contains:["self",r,i]}]}}}),define("highlight/lib/languages/typescript",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const class public private protected get set super static implements enum export import declare type namespace abstract",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document any number boolean string void"};return{aliases:["ts"],keywords:t,contains:[{className:"meta",begin:/^\s*['"]use strict['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,{className:"subst",begin:"\\$\\{",end:"\\}"}]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"number",variants:[{begin:"\\b(0[bB][01]+)"},{begin:"\\b(0[oO][0-7]+)"},{begin:e.C_NUMBER_RE}],relevance:0},{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.REGEXP_MODE],relevance:0},{className:"function",begin:"function",end:/[\{;]/,excludeEnd:!0,keywords:t,contains:["self",e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/}),{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:/["'\(]/}],illegal:/%/,relevance:0},{beginKeywords:"constructor",end:/\{/,excludeEnd:!0},{begin:/module\./,keywords:{built_in:"module"},relevance:0},{beginKeywords:"module",end:/\{/,excludeEnd:!0},{beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:"interface extends"},{begin:/\$[(.]/},{begin:"\\."+e.IDENT_RE,relevance:0}]}}}),define("highlight/lib/languages/vala",["require","exports","module"],function(e,t,n){n.exports=function(e){return{keywords:{keyword:"char uchar unichar int uint long ulong short ushort int8 int16 int32 int64 uint8 uint16 uint32 uint64 float double bool struct enum string void weak unowned owned async signal static abstract interface override virtual delegate if while do for foreach else switch case break default return try catch public private protected internal using new this get set const stdout stdin stderr var",built_in:"DBus GLib CCode Gee Object Gtk Posix",literal:"false true null"},contains:[{className:"class",beginKeywords:"class interface namespace",end:"{",excludeEnd:!0,illegal:"[^,:\\n\\s\\.]",contains:[e.UNDERSCORE_TITLE_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",begin:'"""',end:'"""',relevance:5},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{className:"meta",begin:"^#",end:"$",relevance:2}]}}}),define("highlight/lib/languages/vbnet",["require","exports","module"],function(e,t,n){n.exports=function(e){return{aliases:["vb"],case_insensitive:!0,keywords:{keyword:"addhandler addressof alias and andalso aggregate ansi as assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into is isfalse isnot istrue join key let lib like loop me mid mod module mustinherit mustoverride mybase myclass namespace narrowing new next not notinheritable notoverridable of off on operator option optional or order orelse overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim rem removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly xor",built_in:"boolean byte cbool cbyte cchar cdate cdec cdbl char cint clng cobj csbyte cshort csng cstr ctype date decimal directcast double gettype getxmlnamespace iif integer long object sbyte short single string trycast typeof uinteger ulong ushort",literal:"true false nothing"},illegal:"//|{|}|endif|gosub|variant|wend",contains:[e.inherit(e.QUOTE_STRING_MODE,{contains:[{begin:'""'}]}),e.COMMENT("'","$",{returnBegin:!0,contains:[{className:"doctag",begin:"'''|",contains:[e.PHRASAL_WORDS_MODE]},{className:"doctag",begin:"",contains:[e.PHRASAL_WORDS_MODE]}]}),e.C_NUMBER_MODE,{className:"meta",begin:"#",end:"$",keywords:{"meta-keyword":"if else elseif end region externalsource"}}]}}}),define("highlight/lib/languages/vbscript",["require","exports","module"],function(e,t,n){n.exports=function(e){return{aliases:["vbs"],case_insensitive:!0,keywords:{keyword:"call class const dim do loop erase execute executeglobal exit for each next function if then else on error option explicit new private property let get public randomize redim rem select case set stop sub while wend with end to elseif is or xor and not class_initialize class_terminate default preserve in me byval byref step resume goto",built_in:"lcase month vartype instrrev ubound setlocale getobject rgb getref string weekdayname rnd dateadd monthname now day minute isarray cbool round formatcurrency conversions csng timevalue second year space abs clng timeserial fixs len asc isempty maths dateserial atn timer isobject filter weekday datevalue ccur isdate instr datediff formatdatetime replace isnull right sgn array snumeric log cdbl hex chr lbound msgbox ucase getlocale cos cdate cbyte rtrim join hour oct typename trim strcomp int createobject loadpicture tan formatnumber mid scriptenginebuildversion scriptengine split scriptengineminorversion cint sin datepart ltrim sqr scriptenginemajorversion time derived eval date formatpercent exp inputbox left ascw chrw regexp server response request cstr err",literal:"true false null nothing empty"},illegal:"//",contains:[e.inherit(e.QUOTE_STRING_MODE,{contains:[{begin:'""'}]}),e.COMMENT(/'/,/$/,{relevance:0}),e.C_NUMBER_MODE]}}}),define("highlight/lib/languages/vbscript-html",["require","exports","module"],function(e,t,n){n.exports=function(e){return{subLanguage:"xml",contains:[{begin:"<%",end:"%>",subLanguage:"vbscript"}]}}}),define("highlight/lib/languages/verilog",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={keyword:"accept_on alias always always_comb always_ff always_latch and assert assign assume automatic before begin bind bins binsof bit break buf|0 bufif0 bufif1 byte case casex casez cell chandle checker class clocking cmos config const constraint context continue cover covergroup coverpoint cross deassign default defparam design disable dist do edge else end endcase endchecker endclass endclocking endconfig endfunction endgenerate endgroup endinterface endmodule endpackage endprimitive endprogram endproperty endspecify endsequence endtable endtask enum event eventually expect export extends extern final first_match for force foreach forever fork forkjoin function generate|5 genvar global highz0 highz1 if iff ifnone ignore_bins illegal_bins implements implies import incdir include initial inout input inside instance int integer interconnect interface intersect join join_any join_none large let liblist library local localparam logic longint macromodule matches medium modport module nand negedge nettype new nexttime nmos nor noshowcancelled not notif0 notif1 or output package packed parameter pmos posedge primitive priority program property protected pull0 pull1 pulldown pullup pulsestyle_ondetect pulsestyle_onevent pure rand randc randcase randsequence rcmos real realtime ref reg reject_on release repeat restrict return rnmos rpmos rtran rtranif0 rtranif1 s_always s_eventually s_nexttime s_until s_until_with scalared sequence shortint shortreal showcancelled signed small soft solve specify specparam static string strong strong0 strong1 struct super supply0 supply1 sync_accept_on sync_reject_on table tagged task this throughout time timeprecision timeunit tran tranif0 tranif1 tri tri0 tri1 triand trior trireg type typedef union unique unique0 unsigned until until_with untyped use uwire var vectored virtual void wait wait_order wand weak weak0 weak1 while wildcard wire with within wor xnor xor",literal:"null",built_in:"$finish $stop $exit $fatal $error $warning $info $realtime $time $printtimescale $bitstoreal $bitstoshortreal $itor $signed $cast $bits $stime $timeformat $realtobits $shortrealtobits $rtoi $unsigned $asserton $assertkill $assertpasson $assertfailon $assertnonvacuouson $assertoff $assertcontrol $assertpassoff $assertfailoff $assertvacuousoff $isunbounded $sampled $fell $changed $past_gclk $fell_gclk $changed_gclk $rising_gclk $steady_gclk $coverage_control $coverage_get $coverage_save $set_coverage_db_name $rose $stable $past $rose_gclk $stable_gclk $future_gclk $falling_gclk $changing_gclk $display $coverage_get_max $coverage_merge $get_coverage $load_coverage_db $typename $unpacked_dimensions $left $low $increment $clog2 $ln $log10 $exp $sqrt $pow $floor $ceil $sin $cos $tan $countbits $onehot $isunknown $fatal $warning $dimensions $right $high $size $asin $acos $atan $atan2 $hypot $sinh $cosh $tanh $asinh $acosh $atanh $countones $onehot0 $error $info $random $dist_chi_square $dist_erlang $dist_exponential $dist_normal $dist_poisson $dist_t $dist_uniform $q_initialize $q_remove $q_exam $async$and$array $async$nand$array $async$or$array $async$nor$array $sync$and$array $sync$nand$array $sync$or$array $sync$nor$array $q_add $q_full $psprintf $async$and$plane $async$nand$plane $async$or$plane $async$nor$plane $sync$and$plane $sync$nand$plane $sync$or$plane $sync$nor$plane $system $display $displayb $displayh $displayo $strobe $strobeb $strobeh $strobeo $write $readmemb $readmemh $writememh $value$plusargs $dumpvars $dumpon $dumplimit $dumpports $dumpportson $dumpportslimit $writeb $writeh $writeo $monitor $monitorb $monitorh $monitoro $writememb $dumpfile $dumpoff $dumpall $dumpflush $dumpportsoff $dumpportsall $dumpportsflush $fclose $fdisplay $fdisplayb $fdisplayh $fdisplayo $fstrobe $fstrobeb $fstrobeh $fstrobeo $swrite $swriteb $swriteh $swriteo $fscanf $fread $fseek $fflush $feof $fopen $fwrite $fwriteb $fwriteh $fwriteo $fmonitor $fmonitorb $fmonitorh $fmonitoro $sformat $sformatf $fgetc $ungetc $fgets $sscanf $rewind $ftell $ferror"};return{aliases:["v","sv","svh"],case_insensitive:!1,keywords:t,lexemes:/[\w\$]+/,contains:[e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE,e.QUOTE_STRING_MODE,{className:"number",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"\\b((\\d+'(b|h|o|d|B|H|O|D))[0-9xzXZa-fA-F_]+)"},{begin:"\\B(('(b|h|o|d|B|H|O|D))[0-9xzXZa-fA-F_]+)"},{begin:"\\b([0-9_])+",relevance:0}]},{className:"variable",variants:[{begin:"#\\((?!parameter).+\\)"},{begin:"\\.\\w+",relevance:0}]},{className:"meta",begin:"`",end:"$",keywords:{"meta-keyword":"define __FILE__ __LINE__ begin_keywords celldefine default_nettype define else elsif end_keywords endcelldefine endif ifdef ifndef include line nounconnected_drive pragma resetall timescale unconnected_drive undef undefineall"},relevance:0}]}}}),define("highlight/lib/languages/vhdl",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="\\d(_|\\d)*",n="[eE][-+]?"+t,i=t+"(\\."+t+")?("+n+")?",r="\\w+",a=t+"#"+r+"(\\."+r+")?#("+n+")?",o="\\b("+a+"|"+i+")";return{case_insensitive:!0,keywords:{keyword:"abs access after alias all and architecture array assert assume assume_guarantee attribute begin block body buffer bus case component configuration constant context cover disconnect downto default else elsif end entity exit fairness file for force function generate generic group guarded if impure in inertial inout is label library linkage literal loop map mod nand new next nor not null of on open or others out package port postponed procedure process property protected pure range record register reject release rem report restrict restrict_guarantee return rol ror select sequence severity shared signal sla sll sra srl strong subtype then to transport type unaffected units until use variable vmode vprop vunit wait when while with xnor xor",built_in:"boolean bit character integer time delay_length natural positive string bit_vector file_open_kind file_open_status std_logic std_logic_vector unsigned signed boolean_vector integer_vector std_ulogic std_ulogic_vector unresolved_unsigned u_unsigned unresolved_signed u_signedreal_vector time_vector",literal:"false true note warning error failure line text side width"},illegal:"{",contains:[e.C_BLOCK_COMMENT_MODE,e.COMMENT("--","$"),e.QUOTE_STRING_MODE,{className:"number",begin:o,relevance:0},{className:"string",begin:"'(U|X|0|1|Z|W|L|H|-)'",contains:[e.BACKSLASH_ESCAPE]},{className:"symbol",begin:"'[A-Za-z](_?[A-Za-z0-9])*",contains:[e.BACKSLASH_ESCAPE]}]}}}),define("highlight/lib/languages/vim",["require","exports","module"],function(e,t,n){n.exports=function(e){return{lexemes:/[!#@\w]+/,keywords:{keyword:"N|0 P|0 X|0 a|0 ab abc abo al am an|0 ar arga argd arge argdo argg argl argu as au aug aun b|0 bN ba bad bd be bel bf bl bm bn bo bp br brea breaka breakd breakl bro bufdo buffers bun bw c|0 cN cNf ca cabc caddb cad caddf cal cat cb cc ccl cd ce cex cf cfir cgetb cgete cg changes chd che checkt cl cla clo cm cmapc cme cn cnew cnf cno cnorea cnoreme co col colo com comc comp con conf cope cp cpf cq cr cs cst cu cuna cunme cw delm deb debugg delc delf dif diffg diffo diffp diffpu diffs diffthis dig di dl dell dj dli do doautoa dp dr ds dsp e|0 ea ec echoe echoh echom echon el elsei em en endfo endf endt endw ene ex exe exi exu f|0 files filet fin fina fini fir fix fo foldc foldd folddoc foldo for fu go gr grepa gu gv ha helpf helpg helpt hi hid his ia iabc if ij il im imapc ime ino inorea inoreme int is isp iu iuna iunme j|0 ju k|0 keepa kee keepj lN lNf l|0 lad laddb laddf la lan lat lb lc lch lcl lcs le lefta let lex lf lfir lgetb lgete lg lgr lgrepa lh ll lla lli lmak lm lmapc lne lnew lnf ln loadk lo loc lockv lol lope lp lpf lr ls lt lu lua luad luaf lv lvimgrepa lw m|0 ma mak map mapc marks mat me menut mes mk mks mksp mkv mkvie mod mz mzf nbc nb nbs new nm nmapc nme nn nnoreme noa no noh norea noreme norm nu nun nunme ol o|0 om omapc ome on ono onoreme opt ou ounme ow p|0 profd prof pro promptr pc ped pe perld po popu pp pre prev ps pt ptN ptf ptj ptl ptn ptp ptr pts pu pw py3 python3 py3d py3f py pyd pyf quita qa rec red redi redr redraws reg res ret retu rew ri rightb rub rubyd rubyf rund ru rv sN san sa sal sav sb sbN sba sbf sbl sbm sbn sbp sbr scrip scripte scs se setf setg setl sf sfir sh sim sig sil sl sla sm smap smapc sme sn sni sno snor snoreme sor so spelld spe spelli spellr spellu spellw sp spr sre st sta startg startr star stopi stj sts sun sunm sunme sus sv sw sy synti sync tN tabN tabc tabdo tabe tabf tabfir tabl tabm tabnew tabn tabo tabp tabr tabs tab ta tags tc tcld tclf te tf th tj tl tm tn to tp tr try ts tu u|0 undoj undol una unh unl unlo unm unme uns up ve verb vert vim vimgrepa vi viu vie vm vmapc vme vne vn vnoreme vs vu vunme windo w|0 wN wa wh wi winc winp wn wp wq wqa ws wu wv x|0 xa xmapc xm xme xn xnoreme xu xunme y|0 z|0 ~ Next Print append abbreviate abclear aboveleft all amenu anoremenu args argadd argdelete argedit argglobal arglocal argument ascii autocmd augroup aunmenu buffer bNext ball badd bdelete behave belowright bfirst blast bmodified bnext botright bprevious brewind break breakadd breakdel breaklist browse bunload bwipeout change cNext cNfile cabbrev cabclear caddbuffer caddexpr caddfile call catch cbuffer cclose center cexpr cfile cfirst cgetbuffer cgetexpr cgetfile chdir checkpath checktime clist clast close cmap cmapclear cmenu cnext cnewer cnfile cnoremap cnoreabbrev cnoremenu copy colder colorscheme command comclear compiler continue confirm copen cprevious cpfile cquit crewind cscope cstag cunmap cunabbrev cunmenu cwindow delete delmarks debug debuggreedy delcommand delfunction diffupdate diffget diffoff diffpatch diffput diffsplit digraphs display deletel djump dlist doautocmd doautoall deletep drop dsearch dsplit edit earlier echo echoerr echohl echomsg else elseif emenu endif endfor endfunction endtry endwhile enew execute exit exusage file filetype find finally finish first fixdel fold foldclose folddoopen folddoclosed foldopen function global goto grep grepadd gui gvim hardcopy help helpfind helpgrep helptags highlight hide history insert iabbrev iabclear ijump ilist imap imapclear imenu inoremap inoreabbrev inoremenu intro isearch isplit iunmap iunabbrev iunmenu join jumps keepalt keepmarks keepjumps lNext lNfile list laddexpr laddbuffer laddfile last language later lbuffer lcd lchdir lclose lcscope left leftabove lexpr lfile lfirst lgetbuffer lgetexpr lgetfile lgrep lgrepadd lhelpgrep llast llist lmake lmap lmapclear lnext lnewer lnfile lnoremap loadkeymap loadview lockmarks lockvar lolder lopen lprevious lpfile lrewind ltag lunmap luado luafile lvimgrep lvimgrepadd lwindow move mark make mapclear match menu menutranslate messages mkexrc mksession mkspell mkvimrc mkview mode mzscheme mzfile nbclose nbkey nbsart next nmap nmapclear nmenu nnoremap nnoremenu noautocmd noremap nohlsearch noreabbrev noremenu normal number nunmap nunmenu oldfiles open omap omapclear omenu only onoremap onoremenu options ounmap ounmenu ownsyntax print profdel profile promptfind promptrepl pclose pedit perl perldo pop popup ppop preserve previous psearch ptag ptNext ptfirst ptjump ptlast ptnext ptprevious ptrewind ptselect put pwd py3do py3file python pydo pyfile quit quitall qall read recover redo redir redraw redrawstatus registers resize retab return rewind right rightbelow ruby rubydo rubyfile rundo runtime rviminfo substitute sNext sandbox sargument sall saveas sbuffer sbNext sball sbfirst sblast sbmodified sbnext sbprevious sbrewind scriptnames scriptencoding scscope set setfiletype setglobal setlocal sfind sfirst shell simalt sign silent sleep slast smagic smapclear smenu snext sniff snomagic snoremap snoremenu sort source spelldump spellgood spellinfo spellrepall spellundo spellwrong split sprevious srewind stop stag startgreplace startreplace startinsert stopinsert stjump stselect sunhide sunmap sunmenu suspend sview swapname syntax syntime syncbind tNext tabNext tabclose tabedit tabfind tabfirst tablast tabmove tabnext tabonly tabprevious tabrewind tag tcl tcldo tclfile tearoff tfirst throw tjump tlast tmenu tnext topleft tprevious trewind tselect tunmenu undo undojoin undolist unabbreviate unhide unlet unlockvar unmap unmenu unsilent update vglobal version verbose vertical vimgrep vimgrepadd visual viusage view vmap vmapclear vmenu vnew vnoremap vnoremenu vsplit vunmap vunmenu write wNext wall while winsize wincmd winpos wnext wprevious wqall wsverb wundo wviminfo xit xall xmapclear xmap xmenu xnoremap xnoremenu xunmap xunmenu yank",built_in:"synIDtrans atan2 range matcharg did_filetype asin feedkeys xor argv complete_check add getwinposx getqflist getwinposy screencol clearmatches empty extend getcmdpos mzeval garbagecollect setreg ceil sqrt diff_hlID inputsecret get getfperm getpid filewritable shiftwidth max sinh isdirectory synID system inputrestore winline atan visualmode inputlist tabpagewinnr round getregtype mapcheck hasmapto histdel argidx findfile sha256 exists toupper getcmdline taglist string getmatches bufnr strftime winwidth bufexists strtrans tabpagebuflist setcmdpos remote_read printf setloclist getpos getline bufwinnr float2nr len getcmdtype diff_filler luaeval resolve libcallnr foldclosedend reverse filter has_key bufname str2float strlen setline getcharmod setbufvar index searchpos shellescape undofile foldclosed setqflist buflisted strchars str2nr virtcol floor remove undotree remote_expr winheight gettabwinvar reltime cursor tabpagenr finddir localtime acos getloclist search tanh matchend rename gettabvar strdisplaywidth type abs py3eval setwinvar tolower wildmenumode log10 spellsuggest bufloaded synconcealed nextnonblank server2client complete settabwinvar executable input wincol setmatches getftype hlID inputsave searchpair or screenrow line settabvar histadd deepcopy strpart remote_peek and eval getftime submatch screenchar winsaveview matchadd mkdir screenattr getfontname libcall reltimestr getfsize winnr invert pow getbufline byte2line soundfold repeat fnameescape tagfiles sin strwidth spellbadword trunc maparg log lispindent hostname setpos globpath remote_foreground getchar synIDattr fnamemodify cscope_connection stridx winbufnr indent min complete_add nr2char searchpairpos inputdialog values matchlist items hlexists strridx browsedir expand fmod pathshorten line2byte argc count getwinvar glob foldtextresult getreg foreground cosh matchdelete has char2nr simplify histget searchdecl iconv winrestcmd pumvisible writefile foldlevel haslocaldir keys cos matchstr foldtext histnr tan tempname getcwd byteidx getbufvar islocked escape eventhandler remote_send serverlist winrestview synstack pyeval prevnonblank readfile cindent filereadable changenr exp" -},illegal:/;/,contains:[e.NUMBER_MODE,e.APOS_STRING_MODE,{className:"string",begin:/"(\\"|\n\\|[^"\n])*"/},e.COMMENT('"',"$"),{className:"variable",begin:/[bwtglsav]:[\w\d_]*/},{className:"function",beginKeywords:"function function!",end:"$",relevance:0,contains:[e.TITLE_MODE,{className:"params",begin:"\\(",end:"\\)"}]},{className:"symbol",begin:/<[\w-]+>/}]}}}),define("highlight/lib/languages/x86asm",["require","exports","module"],function(e,t,n){n.exports=function(e){return{case_insensitive:!0,lexemes:"[.%]?"+e.IDENT_RE,keywords:{keyword:"lock rep repe repz repne repnz xaquire xrelease bnd nobnd aaa aad aam aas adc add and arpl bb0_reset bb1_reset bound bsf bsr bswap bt btc btr bts call cbw cdq cdqe clc cld cli clts cmc cmp cmpsb cmpsd cmpsq cmpsw cmpxchg cmpxchg486 cmpxchg8b cmpxchg16b cpuid cpu_read cpu_write cqo cwd cwde daa das dec div dmint emms enter equ f2xm1 fabs fadd faddp fbld fbstp fchs fclex fcmovb fcmovbe fcmove fcmovnb fcmovnbe fcmovne fcmovnu fcmovu fcom fcomi fcomip fcomp fcompp fcos fdecstp fdisi fdiv fdivp fdivr fdivrp femms feni ffree ffreep fiadd ficom ficomp fidiv fidivr fild fimul fincstp finit fist fistp fisttp fisub fisubr fld fld1 fldcw fldenv fldl2e fldl2t fldlg2 fldln2 fldpi fldz fmul fmulp fnclex fndisi fneni fninit fnop fnsave fnstcw fnstenv fnstsw fpatan fprem fprem1 fptan frndint frstor fsave fscale fsetpm fsin fsincos fsqrt fst fstcw fstenv fstp fstsw fsub fsubp fsubr fsubrp ftst fucom fucomi fucomip fucomp fucompp fxam fxch fxtract fyl2x fyl2xp1 hlt ibts icebp idiv imul in inc incbin insb insd insw int int01 int1 int03 int3 into invd invpcid invlpg invlpga iret iretd iretq iretw jcxz jecxz jrcxz jmp jmpe lahf lar lds lea leave les lfence lfs lgdt lgs lidt lldt lmsw loadall loadall286 lodsb lodsd lodsq lodsw loop loope loopne loopnz loopz lsl lss ltr mfence monitor mov movd movq movsb movsd movsq movsw movsx movsxd movzx mul mwait neg nop not or out outsb outsd outsw packssdw packsswb packuswb paddb paddd paddsb paddsiw paddsw paddusb paddusw paddw pand pandn pause paveb pavgusb pcmpeqb pcmpeqd pcmpeqw pcmpgtb pcmpgtd pcmpgtw pdistib pf2id pfacc pfadd pfcmpeq pfcmpge pfcmpgt pfmax pfmin pfmul pfrcp pfrcpit1 pfrcpit2 pfrsqit1 pfrsqrt pfsub pfsubr pi2fd pmachriw pmaddwd pmagw pmulhriw pmulhrwa pmulhrwc pmulhw pmullw pmvgezb pmvlzb pmvnzb pmvzb pop popa popad popaw popf popfd popfq popfw por prefetch prefetchw pslld psllq psllw psrad psraw psrld psrlq psrlw psubb psubd psubsb psubsiw psubsw psubusb psubusw psubw punpckhbw punpckhdq punpckhwd punpcklbw punpckldq punpcklwd push pusha pushad pushaw pushf pushfd pushfq pushfw pxor rcl rcr rdshr rdmsr rdpmc rdtsc rdtscp ret retf retn rol ror rdm rsdc rsldt rsm rsts sahf sal salc sar sbb scasb scasd scasq scasw sfence sgdt shl shld shr shrd sidt sldt skinit smi smint smintold smsw stc std sti stosb stosd stosq stosw str sub svdc svldt svts swapgs syscall sysenter sysexit sysret test ud0 ud1 ud2b ud2 ud2a umov verr verw fwait wbinvd wrshr wrmsr xadd xbts xchg xlatb xlat xor cmove cmovz cmovne cmovnz cmova cmovnbe cmovae cmovnb cmovb cmovnae cmovbe cmovna cmovg cmovnle cmovge cmovnl cmovl cmovnge cmovle cmovng cmovc cmovnc cmovo cmovno cmovs cmovns cmovp cmovpe cmovnp cmovpo je jz jne jnz ja jnbe jae jnb jb jnae jbe jna jg jnle jge jnl jl jnge jle jng jc jnc jo jno js jns jpo jnp jpe jp sete setz setne setnz seta setnbe setae setnb setnc setb setnae setcset setbe setna setg setnle setge setnl setl setnge setle setng sets setns seto setno setpe setp setpo setnp addps addss andnps andps cmpeqps cmpeqss cmpleps cmpless cmpltps cmpltss cmpneqps cmpneqss cmpnleps cmpnless cmpnltps cmpnltss cmpordps cmpordss cmpunordps cmpunordss cmpps cmpss comiss cvtpi2ps cvtps2pi cvtsi2ss cvtss2si cvttps2pi cvttss2si divps divss ldmxcsr maxps maxss minps minss movaps movhps movlhps movlps movhlps movmskps movntps movss movups mulps mulss orps rcpps rcpss rsqrtps rsqrtss shufps sqrtps sqrtss stmxcsr subps subss ucomiss unpckhps unpcklps xorps fxrstor fxrstor64 fxsave fxsave64 xgetbv xsetbv xsave xsave64 xsaveopt xsaveopt64 xrstor xrstor64 prefetchnta prefetcht0 prefetcht1 prefetcht2 maskmovq movntq pavgb pavgw pextrw pinsrw pmaxsw pmaxub pminsw pminub pmovmskb pmulhuw psadbw pshufw pf2iw pfnacc pfpnacc pi2fw pswapd maskmovdqu clflush movntdq movnti movntpd movdqa movdqu movdq2q movq2dq paddq pmuludq pshufd pshufhw pshuflw pslldq psrldq psubq punpckhqdq punpcklqdq addpd addsd andnpd andpd cmpeqpd cmpeqsd cmplepd cmplesd cmpltpd cmpltsd cmpneqpd cmpneqsd cmpnlepd cmpnlesd cmpnltpd cmpnltsd cmpordpd cmpordsd cmpunordpd cmpunordsd cmppd comisd cvtdq2pd cvtdq2ps cvtpd2dq cvtpd2pi cvtpd2ps cvtpi2pd cvtps2dq cvtps2pd cvtsd2si cvtsd2ss cvtsi2sd cvtss2sd cvttpd2pi cvttpd2dq cvttps2dq cvttsd2si divpd divsd maxpd maxsd minpd minsd movapd movhpd movlpd movmskpd movupd mulpd mulsd orpd shufpd sqrtpd sqrtsd subpd subsd ucomisd unpckhpd unpcklpd xorpd addsubpd addsubps haddpd haddps hsubpd hsubps lddqu movddup movshdup movsldup clgi stgi vmcall vmclear vmfunc vmlaunch vmload vmmcall vmptrld vmptrst vmread vmresume vmrun vmsave vmwrite vmxoff vmxon invept invvpid pabsb pabsw pabsd palignr phaddw phaddd phaddsw phsubw phsubd phsubsw pmaddubsw pmulhrsw pshufb psignb psignw psignd extrq insertq movntsd movntss lzcnt blendpd blendps blendvpd blendvps dppd dpps extractps insertps movntdqa mpsadbw packusdw pblendvb pblendw pcmpeqq pextrb pextrd pextrq phminposuw pinsrb pinsrd pinsrq pmaxsb pmaxsd pmaxud pmaxuw pminsb pminsd pminud pminuw pmovsxbw pmovsxbd pmovsxbq pmovsxwd pmovsxwq pmovsxdq pmovzxbw pmovzxbd pmovzxbq pmovzxwd pmovzxwq pmovzxdq pmuldq pmulld ptest roundpd roundps roundsd roundss crc32 pcmpestri pcmpestrm pcmpistri pcmpistrm pcmpgtq popcnt getsec pfrcpv pfrsqrtv movbe aesenc aesenclast aesdec aesdeclast aesimc aeskeygenassist vaesenc vaesenclast vaesdec vaesdeclast vaesimc vaeskeygenassist vaddpd vaddps vaddsd vaddss vaddsubpd vaddsubps vandpd vandps vandnpd vandnps vblendpd vblendps vblendvpd vblendvps vbroadcastss vbroadcastsd vbroadcastf128 vcmpeq_ospd vcmpeqpd vcmplt_ospd vcmpltpd vcmple_ospd vcmplepd vcmpunord_qpd vcmpunordpd vcmpneq_uqpd vcmpneqpd vcmpnlt_uspd vcmpnltpd vcmpnle_uspd vcmpnlepd vcmpord_qpd vcmpordpd vcmpeq_uqpd vcmpnge_uspd vcmpngepd vcmpngt_uspd vcmpngtpd vcmpfalse_oqpd vcmpfalsepd vcmpneq_oqpd vcmpge_ospd vcmpgepd vcmpgt_ospd vcmpgtpd vcmptrue_uqpd vcmptruepd vcmplt_oqpd vcmple_oqpd vcmpunord_spd vcmpneq_uspd vcmpnlt_uqpd vcmpnle_uqpd vcmpord_spd vcmpeq_uspd vcmpnge_uqpd vcmpngt_uqpd vcmpfalse_ospd vcmpneq_ospd vcmpge_oqpd vcmpgt_oqpd vcmptrue_uspd vcmppd vcmpeq_osps vcmpeqps vcmplt_osps vcmpltps vcmple_osps vcmpleps vcmpunord_qps vcmpunordps vcmpneq_uqps vcmpneqps vcmpnlt_usps vcmpnltps vcmpnle_usps vcmpnleps vcmpord_qps vcmpordps vcmpeq_uqps vcmpnge_usps vcmpngeps vcmpngt_usps vcmpngtps vcmpfalse_oqps vcmpfalseps vcmpneq_oqps vcmpge_osps vcmpgeps vcmpgt_osps vcmpgtps vcmptrue_uqps vcmptrueps vcmplt_oqps vcmple_oqps vcmpunord_sps vcmpneq_usps vcmpnlt_uqps vcmpnle_uqps vcmpord_sps vcmpeq_usps vcmpnge_uqps vcmpngt_uqps vcmpfalse_osps vcmpneq_osps vcmpge_oqps vcmpgt_oqps vcmptrue_usps vcmpps vcmpeq_ossd vcmpeqsd vcmplt_ossd vcmpltsd vcmple_ossd vcmplesd vcmpunord_qsd vcmpunordsd vcmpneq_uqsd vcmpneqsd vcmpnlt_ussd vcmpnltsd vcmpnle_ussd vcmpnlesd vcmpord_qsd vcmpordsd vcmpeq_uqsd vcmpnge_ussd vcmpngesd vcmpngt_ussd vcmpngtsd vcmpfalse_oqsd vcmpfalsesd vcmpneq_oqsd vcmpge_ossd vcmpgesd vcmpgt_ossd vcmpgtsd vcmptrue_uqsd vcmptruesd vcmplt_oqsd vcmple_oqsd vcmpunord_ssd vcmpneq_ussd vcmpnlt_uqsd vcmpnle_uqsd vcmpord_ssd vcmpeq_ussd vcmpnge_uqsd vcmpngt_uqsd vcmpfalse_ossd vcmpneq_ossd vcmpge_oqsd vcmpgt_oqsd vcmptrue_ussd vcmpsd vcmpeq_osss vcmpeqss vcmplt_osss vcmpltss vcmple_osss vcmpless vcmpunord_qss vcmpunordss vcmpneq_uqss vcmpneqss vcmpnlt_usss vcmpnltss vcmpnle_usss vcmpnless vcmpord_qss vcmpordss vcmpeq_uqss vcmpnge_usss vcmpngess vcmpngt_usss vcmpngtss vcmpfalse_oqss vcmpfalsess vcmpneq_oqss vcmpge_osss vcmpgess vcmpgt_osss vcmpgtss vcmptrue_uqss vcmptruess vcmplt_oqss vcmple_oqss vcmpunord_sss vcmpneq_usss vcmpnlt_uqss vcmpnle_uqss vcmpord_sss vcmpeq_usss vcmpnge_uqss vcmpngt_uqss vcmpfalse_osss vcmpneq_osss vcmpge_oqss vcmpgt_oqss vcmptrue_usss vcmpss vcomisd vcomiss vcvtdq2pd vcvtdq2ps vcvtpd2dq vcvtpd2ps vcvtps2dq vcvtps2pd vcvtsd2si vcvtsd2ss vcvtsi2sd vcvtsi2ss vcvtss2sd vcvtss2si vcvttpd2dq vcvttps2dq vcvttsd2si vcvttss2si vdivpd vdivps vdivsd vdivss vdppd vdpps vextractf128 vextractps vhaddpd vhaddps vhsubpd vhsubps vinsertf128 vinsertps vlddqu vldqqu vldmxcsr vmaskmovdqu vmaskmovps vmaskmovpd vmaxpd vmaxps vmaxsd vmaxss vminpd vminps vminsd vminss vmovapd vmovaps vmovd vmovq vmovddup vmovdqa vmovqqa vmovdqu vmovqqu vmovhlps vmovhpd vmovhps vmovlhps vmovlpd vmovlps vmovmskpd vmovmskps vmovntdq vmovntqq vmovntdqa vmovntpd vmovntps vmovsd vmovshdup vmovsldup vmovss vmovupd vmovups vmpsadbw vmulpd vmulps vmulsd vmulss vorpd vorps vpabsb vpabsw vpabsd vpacksswb vpackssdw vpackuswb vpackusdw vpaddb vpaddw vpaddd vpaddq vpaddsb vpaddsw vpaddusb vpaddusw vpalignr vpand vpandn vpavgb vpavgw vpblendvb vpblendw vpcmpestri vpcmpestrm vpcmpistri vpcmpistrm vpcmpeqb vpcmpeqw vpcmpeqd vpcmpeqq vpcmpgtb vpcmpgtw vpcmpgtd vpcmpgtq vpermilpd vpermilps vperm2f128 vpextrb vpextrw vpextrd vpextrq vphaddw vphaddd vphaddsw vphminposuw vphsubw vphsubd vphsubsw vpinsrb vpinsrw vpinsrd vpinsrq vpmaddwd vpmaddubsw vpmaxsb vpmaxsw vpmaxsd vpmaxub vpmaxuw vpmaxud vpminsb vpminsw vpminsd vpminub vpminuw vpminud vpmovmskb vpmovsxbw vpmovsxbd vpmovsxbq vpmovsxwd vpmovsxwq vpmovsxdq vpmovzxbw vpmovzxbd vpmovzxbq vpmovzxwd vpmovzxwq vpmovzxdq vpmulhuw vpmulhrsw vpmulhw vpmullw vpmulld vpmuludq vpmuldq vpor vpsadbw vpshufb vpshufd vpshufhw vpshuflw vpsignb vpsignw vpsignd vpslldq vpsrldq vpsllw vpslld vpsllq vpsraw vpsrad vpsrlw vpsrld vpsrlq vptest vpsubb vpsubw vpsubd vpsubq vpsubsb vpsubsw vpsubusb vpsubusw vpunpckhbw vpunpckhwd vpunpckhdq vpunpckhqdq vpunpcklbw vpunpcklwd vpunpckldq vpunpcklqdq vpxor vrcpps vrcpss vrsqrtps vrsqrtss vroundpd vroundps vroundsd vroundss vshufpd vshufps vsqrtpd vsqrtps vsqrtsd vsqrtss vstmxcsr vsubpd vsubps vsubsd vsubss vtestps vtestpd vucomisd vucomiss vunpckhpd vunpckhps vunpcklpd vunpcklps vxorpd vxorps vzeroall vzeroupper pclmullqlqdq pclmulhqlqdq pclmullqhqdq pclmulhqhqdq pclmulqdq vpclmullqlqdq vpclmulhqlqdq vpclmullqhqdq vpclmulhqhqdq vpclmulqdq vfmadd132ps vfmadd132pd vfmadd312ps vfmadd312pd vfmadd213ps vfmadd213pd vfmadd123ps vfmadd123pd vfmadd231ps vfmadd231pd vfmadd321ps vfmadd321pd vfmaddsub132ps vfmaddsub132pd vfmaddsub312ps vfmaddsub312pd vfmaddsub213ps vfmaddsub213pd vfmaddsub123ps vfmaddsub123pd vfmaddsub231ps vfmaddsub231pd vfmaddsub321ps vfmaddsub321pd vfmsub132ps vfmsub132pd vfmsub312ps vfmsub312pd vfmsub213ps vfmsub213pd vfmsub123ps vfmsub123pd vfmsub231ps vfmsub231pd vfmsub321ps vfmsub321pd vfmsubadd132ps vfmsubadd132pd vfmsubadd312ps vfmsubadd312pd vfmsubadd213ps vfmsubadd213pd vfmsubadd123ps vfmsubadd123pd vfmsubadd231ps vfmsubadd231pd vfmsubadd321ps vfmsubadd321pd vfnmadd132ps vfnmadd132pd vfnmadd312ps vfnmadd312pd vfnmadd213ps vfnmadd213pd vfnmadd123ps vfnmadd123pd vfnmadd231ps vfnmadd231pd vfnmadd321ps vfnmadd321pd vfnmsub132ps vfnmsub132pd vfnmsub312ps vfnmsub312pd vfnmsub213ps vfnmsub213pd vfnmsub123ps vfnmsub123pd vfnmsub231ps vfnmsub231pd vfnmsub321ps vfnmsub321pd vfmadd132ss vfmadd132sd vfmadd312ss vfmadd312sd vfmadd213ss vfmadd213sd vfmadd123ss vfmadd123sd vfmadd231ss vfmadd231sd vfmadd321ss vfmadd321sd vfmsub132ss vfmsub132sd vfmsub312ss vfmsub312sd vfmsub213ss vfmsub213sd vfmsub123ss vfmsub123sd vfmsub231ss vfmsub231sd vfmsub321ss vfmsub321sd vfnmadd132ss vfnmadd132sd vfnmadd312ss vfnmadd312sd vfnmadd213ss vfnmadd213sd vfnmadd123ss vfnmadd123sd vfnmadd231ss vfnmadd231sd vfnmadd321ss vfnmadd321sd vfnmsub132ss vfnmsub132sd vfnmsub312ss vfnmsub312sd vfnmsub213ss vfnmsub213sd vfnmsub123ss vfnmsub123sd vfnmsub231ss vfnmsub231sd vfnmsub321ss vfnmsub321sd rdfsbase rdgsbase rdrand wrfsbase wrgsbase vcvtph2ps vcvtps2ph adcx adox rdseed clac stac xstore xcryptecb xcryptcbc xcryptctr xcryptcfb xcryptofb montmul xsha1 xsha256 llwpcb slwpcb lwpval lwpins vfmaddpd vfmaddps vfmaddsd vfmaddss vfmaddsubpd vfmaddsubps vfmsubaddpd vfmsubaddps vfmsubpd vfmsubps vfmsubsd vfmsubss vfnmaddpd vfnmaddps vfnmaddsd vfnmaddss vfnmsubpd vfnmsubps vfnmsubsd vfnmsubss vfrczpd vfrczps vfrczsd vfrczss vpcmov vpcomb vpcomd vpcomq vpcomub vpcomud vpcomuq vpcomuw vpcomw vphaddbd vphaddbq vphaddbw vphadddq vphaddubd vphaddubq vphaddubw vphaddudq vphadduwd vphadduwq vphaddwd vphaddwq vphsubbw vphsubdq vphsubwd vpmacsdd vpmacsdqh vpmacsdql vpmacssdd vpmacssdqh vpmacssdql vpmacsswd vpmacssww vpmacswd vpmacsww vpmadcsswd vpmadcswd vpperm vprotb vprotd vprotq vprotw vpshab vpshad vpshaq vpshaw vpshlb vpshld vpshlq vpshlw vbroadcasti128 vpblendd vpbroadcastb vpbroadcastw vpbroadcastd vpbroadcastq vpermd vpermpd vpermps vpermq vperm2i128 vextracti128 vinserti128 vpmaskmovd vpmaskmovq vpsllvd vpsllvq vpsravd vpsrlvd vpsrlvq vgatherdpd vgatherqpd vgatherdps vgatherqps vpgatherdd vpgatherqd vpgatherdq vpgatherqq xabort xbegin xend xtest andn bextr blci blcic blsi blsic blcfill blsfill blcmsk blsmsk blsr blcs bzhi mulx pdep pext rorx sarx shlx shrx tzcnt tzmsk t1mskc valignd valignq vblendmpd vblendmps vbroadcastf32x4 vbroadcastf64x4 vbroadcasti32x4 vbroadcasti64x4 vcompresspd vcompressps vcvtpd2udq vcvtps2udq vcvtsd2usi vcvtss2usi vcvttpd2udq vcvttps2udq vcvttsd2usi vcvttss2usi vcvtudq2pd vcvtudq2ps vcvtusi2sd vcvtusi2ss vexpandpd vexpandps vextractf32x4 vextractf64x4 vextracti32x4 vextracti64x4 vfixupimmpd vfixupimmps vfixupimmsd vfixupimmss vgetexppd vgetexpps vgetexpsd vgetexpss vgetmantpd vgetmantps vgetmantsd vgetmantss vinsertf32x4 vinsertf64x4 vinserti32x4 vinserti64x4 vmovdqa32 vmovdqa64 vmovdqu32 vmovdqu64 vpabsq vpandd vpandnd vpandnq vpandq vpblendmd vpblendmq vpcmpltd vpcmpled vpcmpneqd vpcmpnltd vpcmpnled vpcmpd vpcmpltq vpcmpleq vpcmpneqq vpcmpnltq vpcmpnleq vpcmpq vpcmpequd vpcmpltud vpcmpleud vpcmpnequd vpcmpnltud vpcmpnleud vpcmpud vpcmpequq vpcmpltuq vpcmpleuq vpcmpnequq vpcmpnltuq vpcmpnleuq vpcmpuq vpcompressd vpcompressq vpermi2d vpermi2pd vpermi2ps vpermi2q vpermt2d vpermt2pd vpermt2ps vpermt2q vpexpandd vpexpandq vpmaxsq vpmaxuq vpminsq vpminuq vpmovdb vpmovdw vpmovqb vpmovqd vpmovqw vpmovsdb vpmovsdw vpmovsqb vpmovsqd vpmovsqw vpmovusdb vpmovusdw vpmovusqb vpmovusqd vpmovusqw vpord vporq vprold vprolq vprolvd vprolvq vprord vprorq vprorvd vprorvq vpscatterdd vpscatterdq vpscatterqd vpscatterqq vpsraq vpsravq vpternlogd vpternlogq vptestmd vptestmq vptestnmd vptestnmq vpxord vpxorq vrcp14pd vrcp14ps vrcp14sd vrcp14ss vrndscalepd vrndscaleps vrndscalesd vrndscaless vrsqrt14pd vrsqrt14ps vrsqrt14sd vrsqrt14ss vscalefpd vscalefps vscalefsd vscalefss vscatterdpd vscatterdps vscatterqpd vscatterqps vshuff32x4 vshuff64x2 vshufi32x4 vshufi64x2 kandnw kandw kmovw knotw kortestw korw kshiftlw kshiftrw kunpckbw kxnorw kxorw vpbroadcastmb2q vpbroadcastmw2d vpconflictd vpconflictq vplzcntd vplzcntq vexp2pd vexp2ps vrcp28pd vrcp28ps vrcp28sd vrcp28ss vrsqrt28pd vrsqrt28ps vrsqrt28sd vrsqrt28ss vgatherpf0dpd vgatherpf0dps vgatherpf0qpd vgatherpf0qps vgatherpf1dpd vgatherpf1dps vgatherpf1qpd vgatherpf1qps vscatterpf0dpd vscatterpf0dps vscatterpf0qpd vscatterpf0qps vscatterpf1dpd vscatterpf1dps vscatterpf1qpd vscatterpf1qps prefetchwt1 bndmk bndcl bndcu bndcn bndmov bndldx bndstx sha1rnds4 sha1nexte sha1msg1 sha1msg2 sha256rnds2 sha256msg1 sha256msg2 hint_nop0 hint_nop1 hint_nop2 hint_nop3 hint_nop4 hint_nop5 hint_nop6 hint_nop7 hint_nop8 hint_nop9 hint_nop10 hint_nop11 hint_nop12 hint_nop13 hint_nop14 hint_nop15 hint_nop16 hint_nop17 hint_nop18 hint_nop19 hint_nop20 hint_nop21 hint_nop22 hint_nop23 hint_nop24 hint_nop25 hint_nop26 hint_nop27 hint_nop28 hint_nop29 hint_nop30 hint_nop31 hint_nop32 hint_nop33 hint_nop34 hint_nop35 hint_nop36 hint_nop37 hint_nop38 hint_nop39 hint_nop40 hint_nop41 hint_nop42 hint_nop43 hint_nop44 hint_nop45 hint_nop46 hint_nop47 hint_nop48 hint_nop49 hint_nop50 hint_nop51 hint_nop52 hint_nop53 hint_nop54 hint_nop55 hint_nop56 hint_nop57 hint_nop58 hint_nop59 hint_nop60 hint_nop61 hint_nop62 hint_nop63",built_in:"ip eip rip al ah bl bh cl ch dl dh sil dil bpl spl r8b r9b r10b r11b r12b r13b r14b r15b ax bx cx dx si di bp sp r8w r9w r10w r11w r12w r13w r14w r15w eax ebx ecx edx esi edi ebp esp eip r8d r9d r10d r11d r12d r13d r14d r15d rax rbx rcx rdx rsi rdi rbp rsp r8 r9 r10 r11 r12 r13 r14 r15 cs ds es fs gs ss st st0 st1 st2 st3 st4 st5 st6 st7 mm0 mm1 mm2 mm3 mm4 mm5 mm6 mm7 xmm0 xmm1 xmm2 xmm3 xmm4 xmm5 xmm6 xmm7 xmm8 xmm9 xmm10 xmm11 xmm12 xmm13 xmm14 xmm15 xmm16 xmm17 xmm18 xmm19 xmm20 xmm21 xmm22 xmm23 xmm24 xmm25 xmm26 xmm27 xmm28 xmm29 xmm30 xmm31 ymm0 ymm1 ymm2 ymm3 ymm4 ymm5 ymm6 ymm7 ymm8 ymm9 ymm10 ymm11 ymm12 ymm13 ymm14 ymm15 ymm16 ymm17 ymm18 ymm19 ymm20 ymm21 ymm22 ymm23 ymm24 ymm25 ymm26 ymm27 ymm28 ymm29 ymm30 ymm31 zmm0 zmm1 zmm2 zmm3 zmm4 zmm5 zmm6 zmm7 zmm8 zmm9 zmm10 zmm11 zmm12 zmm13 zmm14 zmm15 zmm16 zmm17 zmm18 zmm19 zmm20 zmm21 zmm22 zmm23 zmm24 zmm25 zmm26 zmm27 zmm28 zmm29 zmm30 zmm31 k0 k1 k2 k3 k4 k5 k6 k7 bnd0 bnd1 bnd2 bnd3 cr0 cr1 cr2 cr3 cr4 cr8 dr0 dr1 dr2 dr3 dr8 tr3 tr4 tr5 tr6 tr7 r0 r1 r2 r3 r4 r5 r6 r7 r0b r1b r2b r3b r4b r5b r6b r7b r0w r1w r2w r3w r4w r5w r6w r7w r0d r1d r2d r3d r4d r5d r6d r7d r0h r1h r2h r3h r0l r1l r2l r3l r4l r5l r6l r7l r8l r9l r10l r11l r12l r13l r14l r15l db dw dd dq dt ddq do dy dz resb resw resd resq rest resdq reso resy resz incbin equ times byte word dword qword nosplit rel abs seg wrt strict near far a32 ptr",meta:"%define %xdefine %+ %undef %defstr %deftok %assign %strcat %strlen %substr %rotate %elif %else %endif %if %ifmacro %ifctx %ifidn %ifidni %ifid %ifnum %ifstr %iftoken %ifempty %ifenv %error %warning %fatal %rep %endrep %include %push %pop %repl %pathsearch %depend %use %arg %stacksize %local %line %comment %endcomment .nolist __FILE__ __LINE__ __SECT__ __BITS__ __OUTPUT_FORMAT__ __DATE__ __TIME__ __DATE_NUM__ __TIME_NUM__ __UTC_DATE__ __UTC_TIME__ __UTC_DATE_NUM__ __UTC_TIME_NUM__ __PASS__ struc endstruc istruc at iend align alignb sectalign daz nodaz up down zero default option assume public bits use16 use32 use64 default section segment absolute extern global common cpu float __utf16__ __utf16le__ __utf16be__ __utf32__ __utf32le__ __utf32be__ __float8__ __float16__ __float32__ __float64__ __float80m__ __float80e__ __float128l__ __float128h__ __Infinity__ __QNaN__ __SNaN__ Inf NaN QNaN SNaN float8 float16 float32 float64 float80m float80e float128l float128h __FLOAT_DAZ__ __FLOAT_ROUND__ __FLOAT__"},contains:[e.COMMENT(";","$",{relevance:0}),{className:"number",variants:[{begin:"\\b(?:([0-9][0-9_]*)?\\.[0-9_]*(?:[eE][+-]?[0-9_]+)?|(0[Xx])?[0-9][0-9_]*\\.?[0-9_]*(?:[pP](?:[+-]?[0-9_]+)?)?)\\b",relevance:0},{begin:"\\$[0-9][0-9A-Fa-f]*",relevance:0},{begin:"\\b(?:[0-9A-Fa-f][0-9A-Fa-f_]*[Hh]|[0-9][0-9_]*[DdTt]?|[0-7][0-7_]*[QqOo]|[0-1][0-1_]*[BbYy])\\b"},{begin:"\\b(?:0[Xx][0-9A-Fa-f_]+|0[DdTt][0-9_]+|0[QqOo][0-7_]+|0[BbYy][0-1_]+)\\b"}]},e.QUOTE_STRING_MODE,{className:"string",variants:[{begin:"'",end:"[^\\\\]'"},{begin:"`",end:"[^\\\\]`"}],relevance:0},{className:"symbol",variants:[{begin:"^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)"},{begin:"^\\s*%%[A-Za-z0-9_$#@~.?]*:"}],relevance:0},{className:"subst",begin:"%[0-9]+",relevance:0},{className:"subst",begin:"%!S+",relevance:0},{className:"meta",begin:/^\s*\.[\w_-]+/}]}}}),define("highlight/lib/languages/xl",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="ObjectLoader Animate MovieCredits Slides Filters Shading Materials LensFlare Mapping VLCAudioVideo StereoDecoder PointCloud NetworkAccess RemoteControl RegExp ChromaKey Snowfall NodeJS Speech Charts",n={keyword:"if then else do while until for loop import with is as where when by data constant integer real text name boolean symbol infix prefix postfix block tree",literal:"true false nil",built_in:"in mod rem and or xor not abs sign floor ceil sqrt sin cos tan asin acos atan exp expm1 log log2 log10 log1p pi at text_length text_range text_find text_replace contains page slide basic_slide title_slide title subtitle fade_in fade_out fade_at clear_color color line_color line_width texture_wrap texture_transform texture scale_?x scale_?y scale_?z? translate_?x translate_?y translate_?z? rotate_?x rotate_?y rotate_?z? rectangle circle ellipse sphere path line_to move_to quad_to curve_to theme background contents locally time mouse_?x mouse_?y mouse_buttons "+t},i={className:"string",begin:'"',end:'"',illegal:"\\n"},r={className:"string",begin:"'",end:"'",illegal:"\\n"},a={className:"string",begin:"<<",end:">>"},o={className:"number",begin:"[0-9]+#[0-9A-Z_]+(\\.[0-9-A-Z_]+)?#?([Ee][+-]?[0-9]+)?"},s={beginKeywords:"import",end:"$",keywords:n,contains:[i]},l={className:"function",begin:/[a-z][^\n]*->/,returnBegin:!0,end:/->/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,keywords:n}})]};return{aliases:["tao"],lexemes:/[a-zA-Z][a-zA-Z0-9_?]*/,keywords:n,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,i,r,a,l,s,o,e.NUMBER_MODE]}}}),define("highlight/lib/languages/xquery",["require","exports","module"],function(e,t,n){n.exports=function(e){var t="for let if while then else return where group by xquery encoding versionmodule namespace boundary-space preserve strip default collation base-uri orderingcopy-namespaces order declare import schema namespace function option in allowing emptyat tumbling window sliding window start when only end when previous next stable ascendingdescending empty greatest least some every satisfies switch case typeswitch try catch andor to union intersect instance of treat as castable cast map array delete insert intoreplace value rename copy modify update",n="false true xs:string xs:integer element item xs:date xs:datetime xs:float xs:double xs:decimal QName xs:anyURI xs:long xs:int xs:short xs:byte attribute",i={begin:/\$[a-zA-Z0-9\-]+/},r={className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},a={className:"string",variants:[{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]},o={className:"meta",begin:"%\\w+"},s={className:"comment",begin:"\\(:",end:":\\)",relevance:10,contains:[{className:"doctag",begin:"@\\w+"}]},l={begin:"{",end:"}"},c=[i,a,r,s,o,l];return l.contains=c,{aliases:["xpath","xq"],case_insensitive:!1,lexemes:/[a-zA-Z\$][a-zA-Z0-9_:\-]*/,illegal:/(proc)|(abstract)|(extends)|(until)|(#)/,keywords:{keyword:t,literal:n},contains:c}}}),define("highlight/lib/languages/zephir",["require","exports","module"],function(e,t,n){n.exports=function(e){var t={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:'b"',end:'"'},{begin:"b'",end:"'"},e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null})]},n={variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]};return{aliases:["zep"],case_insensitive:!0,keywords:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var let while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally int uint long ulong char uchar double float bool boolean stringlikely unlikely",contains:[e.C_LINE_COMMENT_MODE,e.HASH_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.COMMENT("__halt_compiler.+?;",!1,{endsWithParent:!0,keywords:"__halt_compiler",lexemes:e.UNDERSCORE_IDENT_RE}),{className:"string",begin:"<<<['\"]?\\w+['\"]?$",end:"^\\w+;",contains:[e.BACKSLASH_ESCAPE]},{begin:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{className:"function",beginKeywords:"function",end:/[;{]/,excludeEnd:!0,illegal:"\\$|\\[|%",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:["self",e.C_BLOCK_COMMENT_MODE,t,n]}]},{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,illegal:/[:\(\$"]/,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",end:";",illegal:/[\.']/,contains:[e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"use",end:";",contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"=>"},t,n]}}}),define("text!app.html",["module"],function(e){e.exports='\r\n'}),define("text!blog/blog.html",["module"],function(e){e.exports="\r\n"}),define("text!app.css",["module"],function(e){e.exports="html,\nbody {\n height: 100%;\n overflow: hidden;\n}\n::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n}\n::-webkit-scrollbar-thumb {\n border-radius: 6px;\n background-color: #c6c6c6;\n}\n::-webkit-scrollbar-thumb:hover {\n background: #999;\n}\n@media only screen and (min-width: 768px) {\n .ui.modal.tms-md450 {\n width: 450px!important;\n margin-left: -225px !important;\n }\n .ui.modal.tms-md510 {\n width: 510px!important;\n margin-left: -255px !important;\n }\n .ui.modal.tms-md540 {\n width: 540px!important;\n margin-left: -275px !important;\n }\n}\n/* for swipebox */\n#swipebox-overlay {\n background: rgba(13, 13, 13, 0.5) !important;\n}\n.keyboard {\n background: #fff;\n font-weight: 700;\n padding: 2px .35rem;\n font-size: .8rem;\n margin: 0 2px;\n border-radius: .25rem;\n color: #3d3c40;\n border-bottom: 2px solid #9e9ea6;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);\n text-shadow: none;\n}\n#nprogress .spinner {\n display: none!important;\n}\n.tms-dropzone-preview-hidden .dz-preview {\n display: none!important;\n}\n"}),define("text!chat/chat-direct.html",["module"],function(e){e.exports='\r\n'}),define("text!common.css",["module"],function(e){e.exports="code.nx {\n background-color: #F8F8F8;\n border: 1px solid #EAEAEA;\n border-radius: 3px 3px 3px 3px;\n margin: 0 2px;\n padding: 0 5px;\n white-space: nowrap;\n}\n.markdown-body .pre-code-wrapper {\n position: relative;\n}\n.markdown-body .pre-code-wrapper > i.copy.icon {\n display: none;\n position: absolute;\n top: 0;\n right: 0;\n cursor: pointer;\n}\n.markdown-body .pre-code-wrapper:hover > i.copy.icon {\n display: block;\n}\n.tms-disabled {\n cursor: default;\n opacity: .45!important;\n background-image: none!important;\n box-shadow: none!important;\n pointer-events: none!important;\n}\n.tms-hidden {\n display: none!important;\n}\n.animated {\n -webkit-animation-duration: 1s;\n animation-duration: 1s;\n -webkit-animation-fill-mode: both;\n animation-fill-mode: both;\n}\n@keyframes flip {\n from {\n -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -360deg);\n transform: perspective(400px) rotate3d(0, 1, 0, -360deg);\n -webkit-animation-timing-function: ease-out;\n animation-timing-function: ease-out;\n }\n 40% {\n -webkit-transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -190deg);\n transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -190deg);\n -webkit-animation-timing-function: ease-out;\n animation-timing-function: ease-out;\n }\n 50% {\n -webkit-transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -170deg);\n transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -170deg);\n -webkit-animation-timing-function: ease-in;\n animation-timing-function: ease-in;\n }\n 80% {\n -webkit-transform: perspective(400px) scale3d(0.95, 0.95, 0.95);\n transform: perspective(400px) scale3d(0.95, 0.95, 0.95);\n -webkit-animation-timing-function: ease-in;\n animation-timing-function: ease-in;\n }\n to {\n -webkit-transform: perspective(400px);\n transform: perspective(400px);\n -webkit-animation-timing-function: ease-in;\n animation-timing-function: ease-in;\n }\n}\n.animated.flip {\n -webkit-backface-visibility: visible;\n backface-visibility: visible;\n -webkit-animation-name: flip;\n animation-name: flip;\n}\n.cbutton {\n position: relative;\n}\n.cbutton::after {\n position: absolute;\n top: 50%;\n left: 50%;\n margin: -7px 0 0 -7px;\n width: 14px;\n height: 14px;\n border-radius: 50%;\n content: '';\n opacity: 0;\n pointer-events: none;\n}\n/* Novak */\n.cbutton--effect-novak::after {\n background: rgba(111, 148, 182, 0.25);\n}\n.cbutton--effect-novak.cbutton--click::after {\n -webkit-animation: anim-effect-novak 0.5s forwards;\n animation: anim-effect-novak 0.5s forwards;\n}\n@-webkit-keyframes anim-effect-novak {\n 0% {\n opacity: 1;\n -webkit-transform: scale3d(0.1, 0.1, 1);\n transform: scale3d(0.1, 0.1, 1);\n }\n 100% {\n opacity: 0;\n -webkit-transform: scale3d(8, 8, 1);\n transform: scale3d(30, 30, 1);\n }\n}\n@keyframes anim-effect-novak {\n 0% {\n opacity: 1;\n -webkit-transform: scale3d(0.1, 0.1, 1);\n transform: scale3d(0.1, 0.1, 1);\n }\n 100% {\n opacity: 0;\n -webkit-transform: scale3d(8, 8, 1);\n transform: scale3d(30, 30, 1);\n }\n}\n.emoji {\n width: 1.5em;\n height: 1.5em;\n display: inline-block;\n margin-bottom: -0.25em;\n background-size: contain;\n}\n"; -}),define("text!test/test-lifecycle.html",["module"],function(e){e.exports='\r\n'}),define("text!override.css",["module"],function(e){e.exports=".ui.dimmer {\n background-color: rgba(0, 0, 0, 0.5) !important;\n}\n.ui.dimmer.page.modals {\n z-index: 10000;\n}\n.ui.modal > .actions > .ui.left.floated.button {\n margin-left: 3.5px;\n}\n.ui.list .list .item {\n display: list-item !important;\n table-layout: fixed;\n height: auto!important;\n visibility: visible!important;\n}\n.ui.list .list .item:after {\n content: '';\n display: block;\n height: 0;\n clear: both;\n visibility: hidden;\n}\n#swipebox-bottom-bar,\n#swipebox-top-bar {\n background: rgba(0, 0, 0, 0.3) !important;\n}\n"}),define("text!blog/blog.css",["module"],function(e){e.exports=""}),define("text!user/user-login.html",["module"],function(e){e.exports='\r\n'}),define("text!user/user-pwd-reset.html",["module"],function(e){e.exports='\r\n'}),define("text!chat/chat-direct.css",["module"],function(e){e.exports=".tms-chat-direct {\n height: 100%;\n}\n.tms-chat-direct .ui.comments {\n min-height: calc(100% - 170px);\n}\n.tms-chat-direct .ui.comments > .comment > .content {\n display: block!important;\n}\n.tms-chat-direct .tms-edit-textarea {\n width: 100%;\n}\n.tms-chat-direct .ui.selection.list > .item {\n cursor: default;\n}\n.tms-chat-direct .ui.search .prompt {\n border-radius: .28571429rem;\n}\n.tms-chat-direct .tms-content {\n position: relative;\n margin-left: 220px;\n top: 60px;\n height: calc(100% - 60px);\n}\n.tms-chat-direct .tms-content.tms-sidebar-show .tms-right-sidebar {\n width: 388px;\n border-left: 1px #e9e9e9 solid;\n -webkit-transition: width 0.15s ease-out 0s;\n transition: width 0.15s ease-out 0s;\n margin: 4px;\n margin-right: 0;\n}\n@media only screen and (max-width: 767px) {\n .tms-chat-direct .tms-content {\n margin-left: 0;\n }\n}\n.tms-chat-direct .tms-content .tms-content-body {\n width: 100%;\n height: 100%;\n max-width: 100%;\n padding-bottom: 73px;\n}\n.tms-chat-direct .tms-content .tms-content-body .tms-comments-container {\n width: 100%;\n height: 100%;\n overflow: auto;\n}\n.tms-chat-direct .tms-content .tms-content-body .ui.comments {\n overflow: hidden;\n max-width: none;\n margin-bottom: 12px;\n margin-top: 10px;\n}\n.tms-chat-direct .tms-content .tms-content-body .ui.comments > .ui.basic.button {\n display: block;\n margin-right: 0;\n}\n.tms-chat-direct .tms-content .tms-content-body .ui.comments .tms-pre-more {\n margin-bottom: 10px;\n}\n.tms-chat-direct .tms-content .tms-content-body .ui.comments .tms-next-more {\n margin-top: 10px;\n position: relative;\n}\n.tms-chat-direct .tms-content .tms-content-body .ui.comments .tms-next-more .ui.icon.button {\n position: absolute;\n top: 2px;\n right: -1px;\n}\n.tms-chat-direct .tms-content .tms-content-body .tms-go {\n position: fixed;\n left: 240px;\n}\n.tms-chat-direct .tms-content .tms-content-body .tms-go .ui.button {\n margin: 0;\n background-color: rgba(224, 225, 226, 0.5);\n}\n.tms-chat-direct .tms-content .tms-content-body .tms-go .ui.button:hover {\n background-color: #CACBCD;\n}\n@media only screen and (max-width: 767px) {\n .tms-chat-direct .tms-content .tms-content-body .tms-go {\n left: 20px;\n }\n}\n.tms-chat-direct .tms-content .tms-content-body .tms-go-head {\n top: 80px;\n}\n.tms-chat-direct .tms-content .tms-content-body .tms-go-foot {\n bottom: 90px;\n}\n.tms-chat-direct .tms-right-sidebar {\n position: absolute;\n top: 0;\n right: 0;\n width: 0;\n bottom: 0;\n overflow: hidden;\n padding-top: 10px;\n padding-bottom: 10px;\n}\n.tms-chat-direct .tms-right-sidebar .comments .ui.button.tms-search-more {\n display: block;\n margin: 0;\n}\n.tms-chat-direct .tms-right-sidebar .comments .comment .markdown-body {\n max-height: 65px;\n overflow-y: hidden;\n}\n.tms-chat-direct .tms-right-sidebar .comments .comment .markdown-body.tms-open {\n max-height: none;\n overflow-y: auto;\n padding-bottom: 20px;\n}\n.tms-chat-direct .tms-right-sidebar .comments .comment .tms-btn-open-search-item {\n display: none;\n height: 25px;\n background-color: rgba(0, 0, 0, 0.1);\n position: absolute;\n bottom: 0;\n right: 0;\n left: 0;\n text-align: center;\n padding-top: 2px;\n}\n.tms-chat-direct .tms-right-sidebar .comments .comment:hover .tms-btn-open-search-item {\n display: block;\n}\n@media only screen and (max-width: 767px) {\n .tms-chat-direct .tms-left-sidebar {\n display: none;\n }\n .tms-chat-direct .tms-right-sidebar {\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n top: 59px;\n background-color: white;\n margin-left: 0!important;\n }\n .tms-chat-direct .tms-right-sidebar .panel-chat-msg .ui.basic.segment.minimal.selection.list.segment.comments {\n padding-left: 0;\n padding-right: 0;\n }\n .tms-chat-direct .tms-sidebar-show .tms-right-sidebar {\n width: 100%!important;\n }\n}\n.tms-chat-direct .tms-edit-actions .left.button {\n border-top-left-radius: 0;\n}\n.tms-chat-direct .tms-edit-actions .right.button {\n border-top-right-radius: 0;\n}\n.tms-chat-progress {\n position: absolute;\n display: inline-block;\n top: 60px;\n left: 0;\n width: 0;\n height: 2px;\n margin-left: 220px;\n background-color: #c6c6c6;\n box-shadow: 0px 0px 8px 0px #c6c6c6;\n}\n@media only screen and (max-width: 767px) {\n .tms-chat-progress {\n margin-left: 0;\n }\n}\n"}),define("text!user/user-register.html",["module"],function(e){e.exports='\r\n'}),define("text!chat/md-github.css",["module"],function(e){e.exports='.markdown-body {\n font-size: 14px;\n line-height: 1.6;\n}\n.markdown-body > br,\n.markdown-body ul br .markdown-body ol br {\n display: none;\n}\n.markdown-body > *:first-child {\n margin-top: 0 !important;\n}\n.markdown-body > *:last-child {\n margin-bottom: 0 !important;\n}\n.markdown-body a {\n word-break: break-all;\n}\n.markdown-body a.absent {\n color: #CC0000;\n}\n.markdown-body a.anchor {\n bottom: 0;\n cursor: pointer;\n display: block;\n left: 0;\n margin-left: -30px;\n padding-left: 30px;\n position: absolute;\n top: 0;\n}\n.markdown-body h1,\n.markdown-body h2,\n.markdown-body h3,\n.markdown-body h4,\n.markdown-body h5,\n.markdown-body h6 {\n cursor: text;\n font-weight: bold;\n margin: 20px 0 10px;\n padding: 0;\n position: relative;\n word-break: break-all;\n}\n.markdown-body h1 .mini-icon-link,\n.markdown-body h2 .mini-icon-link,\n.markdown-body h3 .mini-icon-link,\n.markdown-body h4 .mini-icon-link,\n.markdown-body h5 .mini-icon-link,\n.markdown-body h6 .mini-icon-link {\n color: #000000;\n display: none;\n}\n.markdown-body h1:hover a.anchor,\n.markdown-body h2:hover a.anchor,\n.markdown-body h3:hover a.anchor,\n.markdown-body h4:hover a.anchor,\n.markdown-body h5:hover a.anchor,\n.markdown-body h6:hover a.anchor {\n line-height: 1;\n margin-left: -22px;\n padding-left: 0;\n text-decoration: none;\n top: 15%;\n}\n.markdown-body h1:hover a.anchor .mini-icon-link,\n.markdown-body h2:hover a.anchor .mini-icon-link,\n.markdown-body h3:hover a.anchor .mini-icon-link,\n.markdown-body h4:hover a.anchor .mini-icon-link,\n.markdown-body h5:hover a.anchor .mini-icon-link,\n.markdown-body h6:hover a.anchor .mini-icon-link {\n display: inline-block;\n}\n.markdown-body h1 tt,\n.markdown-body h1 code,\n.markdown-body h2 tt,\n.markdown-body h2 code,\n.markdown-body h3 tt,\n.markdown-body h3 code,\n.markdown-body h4 tt,\n.markdown-body h4 code,\n.markdown-body h5 tt,\n.markdown-body h5 code,\n.markdown-body h6 tt,\n.markdown-body h6 code {\n font-size: inherit;\n}\n.markdown-body h1 {\n color: #000000;\n font-size: 28px;\n}\n.markdown-body h2 {\n border-bottom: 1px solid #CCCCCC;\n color: #000000;\n font-size: 24px;\n}\n.markdown-body h3 {\n font-size: 18px;\n}\n.markdown-body h4 {\n font-size: 16px;\n}\n.markdown-body h5 {\n font-size: 14px;\n}\n.markdown-body h6 {\n color: #777777;\n font-size: 14px;\n}\n.markdown-body p,\n.markdown-body blockquote,\n.markdown-body ul,\n.markdown-body ol,\n.markdown-body dl,\n.markdown-body table,\n.markdown-body pre {\n margin: 15px 0;\n}\n.markdown-body hr {\n overflow: hidden;\n background: 0 0;\n}\n.markdown-body hr:before {\n display: table;\n content: "";\n}\n.markdown-body hr:after {\n display: table;\n clear: both;\n content: "";\n}\n.markdown-body hr {\n height: 4px;\n padding: 0;\n margin: 16px 0;\n background-color: #e7e7e7;\n border: 0;\n}\n.markdown-body hr {\n -moz-box-sizing: content-box;\n box-sizing: content-box;\n}\n.markdown-body > h2:first-child,\n.markdown-body > h1:first-child,\n.markdown-body > h1:first-child + h2,\n.markdown-body > h3:first-child,\n.markdown-body > h4:first-child,\n.markdown-body > h5:first-child,\n.markdown-body > h6:first-child {\n margin-top: 0;\n padding-top: 0;\n}\n.markdown-body a:first-child h1,\n.markdown-body a:first-child h2,\n.markdown-body a:first-child h3,\n.markdown-body a:first-child h4,\n.markdown-body a:first-child h5,\n.markdown-body a:first-child h6 {\n margin-top: 0;\n padding-top: 0;\n}\n.markdown-body h1 + p,\n.markdown-body h2 + p,\n.markdown-body h3 + p,\n.markdown-body h4 + p,\n.markdown-body h5 + p,\n.markdown-body h6 + p {\n margin-top: 0;\n}\n.markdown-body li p.first {\n display: inline-block;\n}\n.markdown-body ul,\n.markdown-body ol {\n padding-left: 30px;\n}\n.markdown-body ul.no-list,\n.markdown-body ol.no-list {\n list-style-type: none;\n padding: 0;\n}\n.markdown-body ul li > *:first-child,\n.markdown-body ol li > *:first-child {\n margin-top: 0;\n}\n.markdown-body ul ul,\n.markdown-body ul ol,\n.markdown-body ol ol,\n.markdown-body ol ul {\n margin-bottom: 0;\n}\n.markdown-body dl {\n padding: 0;\n}\n.markdown-body dl dt {\n font-size: 14px;\n font-style: italic;\n font-weight: bold;\n margin: 15px 0 5px;\n padding: 0;\n}\n.markdown-body dl dt:first-child {\n padding: 0;\n}\n.markdown-body dl dt > *:first-child {\n margin-top: 0;\n}\n.markdown-body dl dt > *:last-child {\n margin-bottom: 0;\n}\n.markdown-body dl dd {\n margin: 0 0 15px;\n padding: 0 15px;\n}\n.markdown-body dl dd > *:first-child {\n margin-top: 0;\n}\n.markdown-body dl dd > *:last-child {\n margin-bottom: 0;\n}\n.markdown-body blockquote {\n border-left: 4px solid #DDDDDD;\n color: #777777;\n padding: 0 15px;\n}\n.markdown-body blockquote > *:first-child {\n margin-top: 0;\n}\n.markdown-body blockquote > *:last-child {\n margin-bottom: 0;\n}\n.markdown-body table th {\n font-weight: bold;\n}\n.markdown-body table th,\n.markdown-body table td {\n border: 1px solid #CCCCCC;\n padding: 6px 13px;\n}\n.markdown-body table tr {\n background-color: #FFFFFF;\n border-top: 1px solid #CCCCCC;\n}\n.markdown-body table tr:nth-child(2n) {\n background-color: #F8F8F8;\n}\n.markdown-body img {\n max-width: 100%;\n}\n.markdown-body span.frame {\n display: block;\n overflow: hidden;\n}\n.markdown-body span.frame > span {\n border: 1px solid #DDDDDD;\n display: block;\n float: left;\n margin: 13px 0 0;\n overflow: hidden;\n padding: 7px;\n width: auto;\n}\n.markdown-body span.frame span img {\n display: block;\n float: left;\n}\n.markdown-body span.frame span span {\n clear: both;\n color: #333333;\n display: block;\n padding: 5px 0 0;\n}\n.markdown-body span.align-center {\n clear: both;\n display: block;\n overflow: hidden;\n}\n.markdown-body span.align-center > span {\n display: block;\n margin: 13px auto 0;\n overflow: hidden;\n text-align: center;\n}\n.markdown-body span.align-center span img {\n margin: 0 auto;\n text-align: center;\n}\n.markdown-body span.align-right {\n clear: both;\n display: block;\n overflow: hidden;\n}\n.markdown-body span.align-right > span {\n display: block;\n margin: 13px 0 0;\n overflow: hidden;\n text-align: right;\n}\n.markdown-body span.align-right span img {\n margin: 0;\n text-align: right;\n}\n.markdown-body span.float-left {\n display: block;\n float: left;\n margin-right: 13px;\n overflow: hidden;\n}\n.markdown-body span.float-left span {\n margin: 13px 0 0;\n}\n.markdown-body span.float-right {\n display: block;\n float: right;\n margin-left: 13px;\n overflow: hidden;\n}\n.markdown-body span.float-right > span {\n display: block;\n margin: 13px auto 0;\n overflow: hidden;\n text-align: right;\n}\n.markdown-body code,\n.markdown-body tt {\n background-color: #F8F8F8;\n border: 1px solid #EAEAEA;\n border-radius: 3px 3px 3px 3px;\n margin: 0 2px;\n padding: 0 5px;\n /* white-space: nowrap; */\n white-space: normal;\n word-break: break-all;\n}\n.markdown-body pre > code {\n background: none repeat scroll 0 0 transparent;\n border: medium none;\n margin: 0;\n padding: 0;\n white-space: pre;\n}\n.markdown-body .highlight pre,\n.markdown-body pre {\n background-color: #F8F8F8;\n border: 1px solid #CCCCCC;\n border-radius: 3px 3px 3px 3px;\n font-size: 13px;\n line-height: 19px;\n overflow: auto;\n padding: 6px 10px;\n}\n.markdown-body pre code,\n.markdown-body pre tt {\n background-color: transparent;\n border: medium none;\n}\n'}),define("text!resources/elements/em-blog-comment-popup.html",["module"],function(e){e.exports='\n'}),define("text!common/common-scrollbar.css",["module"],function(e){e.exports='/*************** SCROLLBAR BASE CSS ***************/\n.scroll-wrapper {\n overflow: hidden !important;\n padding: 0 !important;\n position: relative;\n width: 100%;\n height: 100%;\n}\n.scroll-wrapper > .scroll-content {\n border: none !important;\n box-sizing: content-box !important;\n height: auto;\n left: 0;\n margin: 0;\n max-height: none;\n max-width: none !important;\n overflow: scroll !important;\n padding: 0;\n position: relative !important;\n top: 0;\n width: auto !important;\n}\n.scroll-wrapper > .scroll-content::-webkit-scrollbar {\n height: 0;\n width: 0;\n}\n.scroll-element {\n display: none;\n}\n.scroll-element,\n.scroll-element div {\n box-sizing: content-box;\n}\n.scroll-element.scroll-x.scroll-scrollx_visible,\n.scroll-element.scroll-y.scroll-scrolly_visible {\n display: block;\n}\n.scroll-element .scroll-bar,\n.scroll-element .scroll-arrow {\n cursor: default;\n}\n.scroll-textarea {\n border: 1px solid #cccccc;\n border-top-color: #999999;\n}\n.scroll-textarea > .scroll-content {\n overflow: hidden !important;\n}\n.scroll-textarea > .scroll-content > textarea {\n border: none !important;\n box-sizing: border-box;\n height: 100% !important;\n margin: 0;\n max-height: none !important;\n max-width: none !important;\n overflow: scroll !important;\n outline: none;\n padding: 2px;\n position: relative !important;\n top: 0;\n width: 100% !important;\n}\n.scroll-textarea > .scroll-content > textarea::-webkit-scrollbar {\n height: 0;\n width: 0;\n}\n/*************** SIMPLE OUTER SCROLLBAR ***************/\n.scrollbar-outer > .scroll-element,\n.scrollbar-outer > .scroll-element div {\n border: none;\n margin: 0;\n padding: 0;\n position: absolute;\n z-index: 10;\n}\n.scrollbar-outer > .scroll-element {\n background-color: #ffffff;\n}\n.scrollbar-outer > .scroll-element div {\n display: block;\n height: 100%;\n left: 0;\n top: 0;\n width: 100%;\n}\n.scrollbar-outer > .scroll-element.scroll-x {\n bottom: 0;\n height: 12px;\n left: 0;\n width: 100%;\n}\n.scrollbar-outer > .scroll-element.scroll-y {\n height: 100%;\n right: 0;\n top: 0;\n width: 12px;\n}\n.scrollbar-outer > .scroll-element.scroll-x .scroll-element_outer {\n height: 8px;\n top: 2px;\n}\n.scrollbar-outer > .scroll-element.scroll-y .scroll-element_outer {\n left: 2px;\n width: 8px;\n}\n.scrollbar-outer > .scroll-element .scroll-element_outer {\n overflow: hidden;\n}\n.scrollbar-outer > .scroll-element .scroll-element_track {\n background-color: #eeeeee;\n}\n.scrollbar-outer > .scroll-element .scroll-element_outer,\n.scrollbar-outer > .scroll-element .scroll-element_track,\n.scrollbar-outer > .scroll-element .scroll-bar {\n -webkit-border-radius: 8px;\n -moz-border-radius: 8px;\n border-radius: 8px;\n}\n.scrollbar-outer > .scroll-element .scroll-bar {\n background-color: #d9d9d9;\n}\n.scrollbar-outer > .scroll-element .scroll-bar:hover {\n background-color: #c2c2c2;\n}\n.scrollbar-outer > .scroll-element.scroll-draggable .scroll-bar {\n background-color: #919191;\n}\n/* scrollbar height/width & offset from container borders */\n.scrollbar-outer > .scroll-content.scroll-scrolly_visible {\n left: -12px;\n margin-left: 12px;\n}\n.scrollbar-outer > .scroll-content.scroll-scrollx_visible {\n top: -12px;\n margin-top: 12px;\n}\n.scrollbar-outer > .scroll-element.scroll-x .scroll-bar {\n min-width: 10px;\n}\n.scrollbar-outer > .scroll-element.scroll-y .scroll-bar {\n min-height: 10px;\n}\n/* update scrollbar offset if both scrolls are visible */\n.scrollbar-outer > .scroll-element.scroll-x.scroll-scrolly_visible .scroll-element_track {\n left: -14px;\n}\n.scrollbar-outer > .scroll-element.scroll-y.scroll-scrollx_visible .scroll-element_track {\n top: -14px;\n}\n.scrollbar-outer > .scroll-element.scroll-x.scroll-scrolly_visible .scroll-element_size {\n left: -14px;\n}\n.scrollbar-outer > .scroll-element.scroll-y.scroll-scrollx_visible .scroll-element_size {\n top: -14px;\n}\n/*************** SCROLLBAR MAC OS X ***************/\n.scrollbar-macosx > .scroll-element,\n.scrollbar-macosx > .scroll-element div {\n background: none;\n border: none;\n margin: 0;\n padding: 0;\n position: absolute;\n z-index: 10;\n}\n.scrollbar-macosx > .scroll-element div {\n display: block;\n height: 100%;\n left: 0;\n top: 0;\n width: 100%;\n}\n.scrollbar-macosx > .scroll-element .scroll-element_track {\n display: none;\n}\n.scrollbar-macosx > .scroll-element .scroll-bar {\n background-color: #6C6E71;\n display: block;\n -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";\n filter: alpha(opacity=0);\n opacity: 0;\n -webkit-border-radius: 7px;\n -moz-border-radius: 7px;\n border-radius: 7px;\n -webkit-transition: opacity 0.2s linear;\n -moz-transition: opacity 0.2s linear;\n -o-transition: opacity 0.2s linear;\n -ms-transition: opacity 0.2s linear;\n transition: opacity 0.2s linear;\n}\n.scrollbar-macosx:hover > .scroll-element .scroll-bar,\n.scrollbar-macosx > .scroll-element.scroll-draggable .scroll-bar {\n -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=70)";\n filter: alpha(opacity=70);\n opacity: 0.7;\n}\n.scrollbar-macosx > .scroll-element.scroll-x {\n bottom: 0px;\n height: 0px;\n left: 0;\n min-width: 100%;\n overflow: visible;\n width: 100%;\n}\n.scrollbar-macosx > .scroll-element.scroll-y {\n height: 100%;\n min-height: 100%;\n right: 0px;\n top: 0;\n width: 0px;\n}\n/* scrollbar height/width & offset from container borders */\n.scrollbar-macosx > .scroll-element.scroll-x .scroll-bar {\n height: 7px;\n min-width: 10px;\n top: -9px;\n}\n.scrollbar-macosx > .scroll-element.scroll-y .scroll-bar {\n left: -9px;\n min-height: 10px;\n width: 7px;\n}\n.scrollbar-macosx > .scroll-element.scroll-x .scroll-element_outer {\n left: 2px;\n}\n.scrollbar-macosx > .scroll-element.scroll-x .scroll-element_size {\n left: -4px;\n}\n.scrollbar-macosx > .scroll-element.scroll-y .scroll-element_outer {\n top: 2px;\n}\n.scrollbar-macosx > .scroll-element.scroll-y .scroll-element_size {\n top: -4px;\n}\n/* update scrollbar offset if both scrolls are visible */\n.scrollbar-macosx > .scroll-element.scroll-x.scroll-scrolly_visible .scroll-element_size {\n left: -11px;\n}\n.scrollbar-macosx > .scroll-element.scroll-y.scroll-scrollx_visible .scroll-element_size {\n top: -11px;\n}\n'}),define("text!resources/elements/em-blog-comment-share.html",["module"],function(e){e.exports='\n'}),define("text!user/user-login.css",["module"],function(e){e.exports=".tms-user-login {\n width: 100%;\n min-height: 100%;\n background-color: #5a3636;\n overflow: hidden;\n}\n.tms-user-login .container {\n width: 300px;\n top: 50px;\n margin-left: auto;\n margin-right: auto;\n position: relative;\n}\n.tms-user-login h2 {\n color: rgba(197, 164, 164, 0.8) !important;\n}\n.tms-user-login .ui.form {\n background-color: #353131;\n}\n.tms-user-login .ui.error.message {\n background-color: #5a3636;\n}\n.tms-user-login .ui.error.message .header {\n color: #e0b4b4;\n}\n.tms-user-login .ui.checkbox label {\n color: #ad8b8b;\n}\n.tms-user-login .ui.checkbox input:focus ~ label {\n color: #ad8b8b;\n}\n.tms-user-login .ui.checkbox label:hover {\n color: #ad8b8b;\n}\n.tms-user-login .ui.button {\n background-color: #5a3636;\n color: #ad8b75;\n}\n"}),define("text!user/user-pwd-reset.css",["module"],function(e){e.exports=".tms-user-pwd-reset {\n height: 100%;\n}\n.tms-user-pwd-reset .tms-flex {\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n"}),define("text!user/user-register.css",["module"],function(e){e.exports=".tms-user-register {\n height: 100%;\n}\n.tms-user-register .tms-flex {\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n"}),define("text!resources/elements/em-blog-comment-popup.css",["module"],function(e){e.exports=""}),define("text!resources/elements/em-blog-comment.html",["module"],function(e){e.exports='\r\n'; -}),define("text!resources/elements/em-blog-comment-share.css",["module"],function(e){e.exports=".em-blog-comment-share.ui.popup {\n max-width: 100%;\n width: 255px;\n}\n.em-blog-comment-share.ui.popup .ui.input {\n width: 225px;\n}\n.em-blog-comment-share.ui.popup textarea {\n /* width: 195px!important; */\n}\n.em-blog-comment-share.ui.popup .ui.search > .results .result {\n cursor: pointer!important;\n display: block!important;\n color: rgba(0, 0, 0, 0.87) !important;\n border-bottom: 1px solid rgba(34, 36, 38, 0.1) !important;\n margin: 0!important;\n}\n.em-blog-comment-share.ui.popup .ui.list > .item {\n color: rgba(0, 0, 0, 0.87);\n}\n.em-blog-comment-share:after {\n content: '';\n clear: both;\n}\n.em-blog-comment-share .footer {\n margin-top: 16px;\n}\n.em-blog-comment-share .footer .btn-cancel {\n float: right;\n margin: 6px 0 0 8px!important;\n}\n"}),define("text!resources/elements/em-blog-content.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-blog-comment.css",["module"],function(e){e.exports='.em-blog-comment {\n margin-top: 32px;\n margin-bottom: 32px;\n}\n.em-blog-comment .ui.comments {\n max-width: 100%;\n}\n.em-blog-comment .ui.comments > .ui.dividing.header {\n margin-bottom: 0;\n}\n.em-blog-comment .ui.comments .comment {\n margin-top: 0;\n}\n.em-blog-comment .ui.comments .comment:hover {\n background: rgba(0, 0, 0, 0.03);\n color: rgba(0, 0, 0, 0.8);\n}\n.em-blog-comment .ui.comments .comment:hover .content .tools {\n display: block;\n}\n.em-blog-comment .ui.comments .comment:hover:before {\n width: 4px;\n}\n.em-blog-comment .ui.comments .comment > .ui.divider {\n margin-bottom: 0;\n}\n.em-blog-comment .ui.comments .comment .content .tms-blog-comment-edit-textarea {\n width: 100%;\n}\n.em-blog-comment .ui.comments .comment .content .textcomplete-container {\n position: relative;\n}\n.em-blog-comment .ui.comments .comment .content .textcomplete-container .append-to {\n position: absolute;\n left: 0;\n bottom: 0;\n width: 100%;\n}\n.em-blog-comment .ui.comments .comment .content > .tools {\n position: absolute;\n right: 0;\n bottom: 0;\n display: none;\n}\n.em-blog-comment .ui.comments .comment .content > .tools > .ui.button {\n margin: 0;\n background-color: rgba(224, 225, 226, 0.5);\n}\n.em-blog-comment .ui.comments .comment .content > .tools > .ui.button:hover {\n background-color: #e0e1e2;\n}\n.em-blog-comment .ui.comments .comment.active {\n background-color: #f5f5f5;\n}\n.em-blog-comment .ui.comments .comment.active:before {\n width: 4px;\n}\n.em-blog-comment .ui.comments .comment:before {\n content: "";\n position: absolute;\n z-index: -1;\n top: -2px;\n left: -4px;\n bottom: 1px;\n background: #2098D1;\n width: 0;\n -webkit-transition-property: width;\n transition-property: width;\n -webkit-transition-duration: 0.3s;\n transition-duration: 0.3s;\n -webkit-transition-timing-function: ease-out;\n transition-timing-function: ease-out;\n}\n.em-blog-comment .ui.comments .comment:nth-child(2):before {\n top: -1px;\n}\n.em-blog-comment .CodeMirror {\n min-height: 60px;\n}\n.em-blog-comment .CodeMirror-scroll {\n min-height: 60px;\n}\n.em-blog-comment .dropzone {\n position: relative;\n}\n.em-blog-comment .dropzone .tms-blog-comment-status-bar-wrapper {\n position: relative;\n width: 100%;\n height: 0;\n}\n.em-blog-comment .dropzone .tms-blog-comment-status-bar-wrapper .tms-blog-comment-status-bar {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n}\n.em-blog-comment .dropzone .tms-blog-comment-status-bar-wrapper .dropzone-previews {\n position: absolute;\n left: 0;\n bottom: -7px;\n width: 100%;\n}\n.em-blog-comment .dropzone .tms-blog-comment-status-bar-wrapper .dropzone-previews .dz-preview {\n width: 100%;\n margin: 0;\n}\n.em-blog-comment .dropzone .tms-blog-comment-status-bar-wrapper .dropzone-previews .dz-preview .dz-progress {\n height: 2px;\n background-color: #aaa;\n border: none;\n}\n.em-blog-comment .dropzone .tms-blog-comment-status-bar-wrapper .dropzone-previews .dz-preview .dz-remove {\n display: none;\n}\n'}),define("text!resources/elements/em-blog-history-diff.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-blog-history-view.html",["module"],function(e){e.exports='\n'}),define("text!resources/elements/em-blog-content.css",["module"],function(e){e.exports=".em-blog-content {\n transition: width 0.15s ease-out 0s;\n position: fixed;\n top: 55px;\n left: 300px;\n width: calc(100% - 300px) !important;\n height: calc(100% - 55px) !important;\n padding: 16px;\n overflow: auto;\n}\n.right-sidebar-show .em-blog-content {\n width: calc(100% - 600px) !important;\n}\n@media only screen and (max-width: 767px) {\n .right-sidebar-show .em-blog-content {\n width: 100%!important;\n }\n}\n@media only screen and (max-width: 767px) {\n .em-blog-content {\n left: 0;\n width: 100%!important;\n }\n}\n.em-blog-content > .header {\n margin-bottom: 24px;\n}\n.em-blog-content > .header .ui.header .sub.header {\n color: #707070;\n font-size: 12px;\n margin-top: 8px;\n}\n.em-blog-content > .header .ui.header .sub.header a.author {\n cursor: pointer;\n}\n.em-blog-content > .header .ui.header .sub.header .readCnt {\n cursor: pointer;\n margin-left: 16px;\n}\n.em-blog-content > .header .ui.header .sub.header .readCnt a {\n cursor: pointer;\n}\n.em-blog-content > .header .ui.header .sub.header .commentCnt {\n cursor: pointer;\n margin-left: 16px;\n}\n.em-blog-content > .header .ui.header .sub.header .commentCnt a {\n cursor: pointer;\n}\n.em-blog-content .topbar {\n position: relative;\n height: 30px;\n margin-bottom: 8px;\n}\n.em-blog-content .topbar > .ui.breadcrumb {\n line-height: 30px;\n}\n.em-blog-content .topbar:after {\n content: '';\n clear: both;\n}\n.em-blog-content .topbar .actions {\n float: right;\n}\n.em-blog-content .topbar .actions > .ui.basic.button {\n padding: 8px;\n box-shadow: none;\n}\n.em-blog-content .topbar .actions > .ui.basic.button:hover {\n box-shadow: 0 0 0 1px rgba(34, 36, 38, 0.35) inset, 0 0 0 0 rgba(34, 36, 38, 0.15) inset;\n}\n.em-blog-content .topbar .actions > .ui.basic.button > i.icon {\n margin-right: 2px;\n}\n.em-blog-content .topbar .actions > .ui.basic.button > i.icon.hide {\n position: relative;\n top: -1px;\n}\n.em-blog-content .topbar .actions > .ui.basic.button > i.icon.unhide {\n position: relative;\n top: -1px;\n}\n.em-blog-content > .ui.message .content > span {\n display: inline-block;\n margin-top: 10px;\n}\n.em-blog-content > .ui.message .content .ui.button {\n position: relative;\n top: -5px;\n left: 10px;\n}\n.em-blog-content .footer {\n margin-top: 16px;\n}\n.em-blog-content .footer > span {\n font-size: 12px;\n}\n.em-blog-content .footer .rate {\n margin-right: 16px;\n cursor: pointer;\n color: #4183c4;\n}\n.em-blog-content > .ui.feed {\n margin-bottom: 25px!important;\n}\n.em-blog-content > .ui.feed > .event {\n position: relative;\n}\n.em-blog-content > .ui.feed > .event.opened > .content .extra.text:hover {\n max-height: none;\n overflow-y: auto;\n padding-bottom: 25px;\n}\n.em-blog-content > .ui.feed > .event > .label + .content {\n max-width: calc(100% - 50px);\n}\n.em-blog-content > .ui.feed > .event > .content .extra.text {\n position: relative;\n max-width: none;\n min-height: 25px;\n max-height: 60px;\n overflow-y: hidden;\n}\n.em-blog-content > .ui.feed > .event > .content .extra.text:hover > .btn-open {\n display: block;\n}\n.em-blog-content > .ui.feed > .event > .content .extra.text > .btn-open {\n display: none;\n height: 25px;\n background-color: rgba(0, 0, 0, 0.1);\n position: absolute;\n bottom: 0;\n right: 0;\n left: 0;\n text-align: center;\n padding-top: 2px;\n}\n.em-blog-content > .ui.feed > .event > .content .extra.text pre {\n white-space: pre-wrap;\n white-space: -moz-pre-wrap;\n white-space: -pre-wrap;\n white-space: -o-pre-wrap;\n word-wrap: break-word;\n word-break: break-all;\n}\n.em-blog-content > .ui.feed > .event.active {\n background: rgba(0, 0, 0, 0.03);\n}\n.em-blog-content > .ui.feed > .event.active:before {\n width: 4px;\n}\n.em-blog-content > .ui.feed > .event:hover {\n background: rgba(0, 0, 0, 0.03);\n}\n.em-blog-content > .ui.feed > .event:hover:before {\n width: 4px;\n}\n.em-blog-content > .ui.feed > .event:before {\n content: \"\";\n position: absolute;\n top: 0;\n left: -4px;\n bottom: 0;\n background: #2098D1;\n width: 0;\n -webkit-transition-property: width;\n transition-property: width;\n -webkit-transition-duration: 0.3s;\n transition-duration: 0.3s;\n -webkit-transition-timing-function: ease-out;\n transition-timing-function: ease-out;\n}\n.tms-blog-progress {\n position: absolute;\n display: inline-block;\n top: 55px;\n left: 0;\n width: 0;\n height: 2px;\n margin-left: 300px;\n background-color: #2185d0;\n box-shadow: 0px 0px 8px 0px #205081;\n}\n@media only screen and (max-width: 767px) {\n .tms-blog-progress {\n margin-left: 0;\n }\n}\n.em-blog-content-wrapper {\n position: fixed;\n top: 55px;\n width: calc(100vw) !important;\n height: calc(100% - 55px) !important;\n}\n@media only screen and (max-width: 767px) {\n .tms-blog.left-sidebar-show .em-blog-content-wrapper > .ui.dimmer {\n display: block;\n opacity: 1;\n }\n .tms-blog.right-sidebar-show .em-blog-content-wrapper > .ui.dimmer {\n display: block;\n opacity: 1;\n }\n .tms-blog .em-blog-content-wrapper > .ui.dimmer {\n display: none;\n }\n}\n"}),define("text!resources/elements/em-blog-history.html",["module"],function(e){e.exports='\n'; -}),define("text!resources/elements/em-blog-history-diff.css",["module"],function(e){e.exports=".em-blog-history-diff > .content {\n max-height: 300px;\n overflow-y: auto;\n}\n"}),define("text!resources/elements/em-blog-history-view.css",["module"],function(e){e.exports=".em-blog-history-view > .topbar {\n margin-bottom: 16px;\n}\n.em-blog-history-view > .content {\n max-height: 300px;\n overflow-y: auto;\n}\n"}),define("text!resources/elements/em-blog-history.css",["module"],function(e){e.exports=".em-blog-history > .topbar {\n margin-bottom: 16px;\n}\n.em-blog-history > .content {\n max-height: 300px;\n overflow-y: auto;\n}\n.em-blog-history .ui.table td a {\n cursor: pointer;\n}\n"}),define("text!resources/elements/em-blog-left-sidebar.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-blog-right-sidebar.html",["module"],function(e){e.exports='\n'}),define("text!resources/elements/em-blog-left-sidebar.css",["module"],function(e){e.exports=".em-blog-left-sidebar.ui.left.sidebar {\n transition: left 0.15s ease-out 0s;\n width: 300px;\n top: 55px;\n left: 0;\n height: calc(100% - 55px) !important;\n background-color: #f5f5f5;\n box-shadow: none!important;\n}\n@media only screen and (max-width: 767px) {\n .em-blog-left-sidebar.ui.left.sidebar {\n z-index: 104;\n }\n .em-blog-left-sidebar.ui.left.sidebar.mobile-hide {\n left: -300px;\n }\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body {\n height: calc(100% - 40px) !important;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.space.list {\n padding: 16px;\n padding-left: 15px;\n margin-bottom: 0px;\n padding-bottom: 8px;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.space.list > .item {\n position: relative;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.space.list > .item:hover {\n box-shadow: 0px 0px 2px -1px #5791cb;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.space.list > .item:hover > .actions {\n display: inline-block;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.space.list > .item > .icon {\n padding-right: 0;\n position: relative;\n top: -1px;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.space.list > .item > .content {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 245px;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.space.list > .item > .actions {\n display: none;\n position: absolute;\n right: 0;\n top: -2px;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.space.list .ui.bulleted.list {\n padding-left: 16px;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.space.list .ui.bulleted.list > div.item {\n max-width: 220px;\n padding-top: 5px;\n padding-bottom: 5px;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.space.list .ui.bulleted.list > div.item > a {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n min-width: 220px;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.space.list .ui.bulleted.list > div.item:before {\n color: #999;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.space.list .ui.bulleted.list > div.item.active {\n font-weight: bold;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.space.list .ui.bulleted.list > div.item.active > a {\n color: black;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.space.list .ui.bulleted.list > div.item:hover {\n background-color: rgba(232, 224, 224, 0.5);\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.space.list .ui.bulleted.list > div.item.aurelia-hide {\n display: none!important;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.bulleted.list.no-space {\n padding: 20px;\n margin-top: 0px;\n padding-top: 0px;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.bulleted.list.no-space > div.item {\n padding-top: 5px;\n padding-bottom: 5px;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.bulleted.list.no-space > div.item > a {\n display: block;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n min-width: 242px;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.bulleted.list.no-space > div.item:before {\n color: #999;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.bulleted.list.no-space > div.item.active {\n font-weight: bold;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.bulleted.list.no-space > div.item.active > a {\n color: black;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-body .ui.bulleted.list.no-space > div.item:hover {\n background-color: rgba(232, 224, 224, 0.5);\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-footer {\n position: absolute;\n width: 100%;\n height: 40px;\n left: 0;\n bottom: 0;\n background-color: #efe4e4;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-footer .ui.menu {\n border: none;\n border-radius: 0;\n background-color: #e8e0e0;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-footer .ui.menu > .item.tms-search {\n position: relative;\n height: 40px;\n max-width: 207px;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-footer .ui.menu > .item.tms-search:before {\n width: 0;\n}\n.em-blog-left-sidebar.ui.left.sidebar .tms-footer .ui.menu > .item.tms-search > .remove.icon {\n position: absolute;\n right: 5px;\n top: 13px;\n}\n"}),define("text!resources/elements/em-blog-right-sidebar.css",["module"],function(e){e.exports=".em-blog-right-sidebar {\n width: 300px;\n background-color: #f5f5f5;\n position: fixed;\n top: 55px;\n right: -300px;\n height: calc(100% - 55px);\n transition: right 0.15s ease-out 0s;\n}\n.right-sidebar-show .em-blog-right-sidebar {\n right: 0;\n}\n.em-blog-right-sidebar .panel-blog-dir {\n padding: 16px;\n}\n.em-blog-right-sidebar .panel-blog-dir .wiki-dir-item.active {\n background-color: #e8e0e0;\n}\n"}),define("text!resources/elements/em-blog-save.css",["module"],function(e){e.exports=""}),define("text!resources/elements/em-blog-save.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-blog-share.css",["module"],function(e){e.exports=".em-blog-share.ui.popup {\n max-width: 100%;\n width: 255px;\n}\n.em-blog-share.ui.popup .ui.input {\n width: 225px;\n}\n.em-blog-share:after {\n content: '';\n clear: both;\n}\n.em-blog-share .footer {\n margin-top: 16px;\n}\n.em-blog-share .footer .btn-cancel {\n float: right;\n margin-top: 6px;\n margin-left: 8px;\n}\n"}),define("text!resources/elements/em-blog-space-auth.css",["module"],function(e){e.exports=".em-blog-space-auth > .ui.form {\n margin-bottom: 16px;\n}\n.em-blog-space-auth .tms-header {\n margin-bottom: 8px;\n}\n.em-blog-space-auth .ui.search .prompt {\n border-radius: .28571429rem;\n}\n"}),define("text!resources/elements/em-blog-space-create.css",["module"],function(e){e.exports=".em-blog-space-create.ui.popup .ui.form {\n width: 260px;\n}\n"}),define("text!resources/elements/em-blog-space-edit.css",["module"],function(e){e.exports=""}),define("text!resources/elements/em-blog-space-update.css",["module"],function(e){e.exports=""}),define("text!resources/elements/em-blog-share.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-blog-top-menu.css",["module"],function(e){e.exports=".em-blog-top-menu.ui.inverted.blue.menu {\n background-color: #205081;\n height: 55px;\n z-index: 103;\n}\n.em-blog-top-menu.ui.inverted.blue.menu .item.tms-toggle {\n display: none;\n}\n.em-blog-top-menu.ui.inverted.blue.menu .item.tms-toggle i.icon {\n margin-right: 0;\n}\n.em-blog-top-menu.ui.inverted.blue.menu .item.tms-links i.icon {\n margin-right: 0;\n}\n.em-blog-top-menu.ui.inverted.blue.menu .right.menu .item .ui.icon.input input {\n background-color: #103a65;\n color: white;\n}\n.em-blog-top-menu.ui.inverted.blue.menu .right.menu .item .ui.icon.input input:focus {\n border-color: rgba(34, 36, 38, 0.15);\n box-shadow: none;\n}\n.em-blog-top-menu.ui.inverted.blue.menu .right.menu .item .ui.icon.input i.icon.search:before {\n color: #a3aab0;\n}\n@media only screen and (max-width: 767px) {\n .em-blog-top-menu.ui.inverted.blue.menu .item.tms-links {\n display: none;\n }\n .em-blog-top-menu.ui.inverted.blue.menu .item.tms-logo {\n display: none;\n }\n .em-blog-top-menu.ui.inverted.blue.menu .item.header {\n display: none;\n }\n .em-blog-top-menu.ui.inverted.blue.menu .item.tms-toggle {\n display: flex;\n }\n .em-blog-top-menu.ui.inverted.blue.menu .right.menu .item .ui.search .ui.input {\n width: 100px;\n }\n .em-blog-top-menu.ui.inverted.blue.menu.search-focus .tms-logo {\n display: none;\n }\n .em-blog-top-menu.ui.inverted.blue.menu.search-focus .tms-create {\n display: none;\n }\n .em-blog-top-menu.ui.inverted.blue.menu.search-focus .right.menu .item .ui.search .ui.input {\n width: initial;\n transition: width 0.15s ease-out 0s;\n }\n .em-blog-top-menu.ui.inverted.blue.menu.search-focus .right.menu .tms-login-user {\n display: none;\n }\n}\n"}),define("text!resources/elements/em-blog-space-auth.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-blog-space-create.html",["module"],function(e){e.exports='\n'}),define("text!resources/elements/em-blog-write.css",["module"],function(e){e.exports="@media only screen and (max-width: 827px) {\n .modaal-wrapper .modaal-close {\n top: initial!important;\n bottom: 10px;\n z-index: 2;\n }\n}\n.em-blog-write {\n margin-top: -30px;\n margin-bottom: 20px;\n}\n.em-blog-write > .wrapper {\n max-width: 768px;\n margin: auto;\n}\n.em-blog-write > .wrapper > .title {\n position: fixed;\n z-index: 2;\n margin-bottom: 8px;\n width: calc(100% - 60px);\n background-color: white;\n padding-top: 18px;\n box-shadow: 0px 1px 0px 0px #dddddd;\n}\n@media only screen and (min-width: 828px) {\n .em-blog-write > .wrapper > .title {\n width: 768px;\n }\n}\n.em-blog-write > .wrapper > .title > .ui.input {\n padding-right: 80px;\n}\n.em-blog-write > .wrapper > .title > .ui.button {\n position: absolute;\n right: 0;\n top: 15px;\n}\n.em-blog-write > .wrapper > .content {\n padding-top: 60px;\n}\n.em-blog-write > .wrapper > .content .editor-toolbar.fullscreen {\n z-index: 800;\n}\n.em-blog-write .dropzone {\n position: relative;\n}\n.em-blog-write .dropzone .dropzone-previews {\n position: absolute;\n top: 48px;\n width: 100%;\n}\n.em-blog-write .dropzone .dropzone-previews .dz-preview {\n width: 100%;\n margin: 0;\n}\n.em-blog-write .dropzone .dropzone-previews .dz-preview .dz-progress {\n height: 2px;\n background-color: #aaa;\n border: none;\n}\n.em-blog-write .dropzone .dropzone-previews .dz-preview .dz-remove {\n display: none;\n}\n.em-blog-write .tms-blog-write-status-bar-wrapper {\n position: fixed;\n z-index: 800;\n height: 0;\n top: 120px;\n width: calc(100% - 60px);\n}\n@media only screen and (min-width: 828px) {\n .em-blog-write .tms-blog-write-status-bar-wrapper {\n width: 768px;\n }\n}\n.em-blog-write .tms-blog-write-status-bar-wrapper .tms-blog-write-status-bar {\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n}\n"}),define("text!resources/elements/em-blog-space-edit.html",["module"],function(e){e.exports='\n'}),define("text!resources/elements/em-chat-attach.css",["module"],function(e){e.exports=".em-chat-attach.ui.basic.segment {\n margin-bottom: 0;\n padding-top: 0;\n}\n.em-chat-attach .ui.basic.button {\n display: block;\n margin-right: 0;\n}\n.em-chat-attach .ui.list .description {\n font-size: 12px;\n margin-top: 3px;\n}\n.em-chat-attach.ui.menu {\n margin-top: 0;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.em-chat-attach.ui.menu > .item {\n -webkit-box-flex: 1;\n -ms-flex: 1;\n flex: 1;\n display: block!important;\n text-align: center;\n}\n.em-chat-attach.tms-attach-search-input {\n padding: 0 10px;\n}\n"}),define("text!resources/elements/em-blog-space-update.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-chat-channel-create.css",["module"],function(e){e.exports=".tms-em-chat-channel-create .tms-join {\n max-height: 315px;\n overflow-y: auto;\n}\n.tms-em-chat-channel-create .ui.form > .field > label {\n width: 35px!important;\n}\n"}),define("text!resources/elements/em-chat-channel-link-mgr.css",["module"],function(e){e.exports="@media only screen and (min-width: 768px) {\n .tms-em-chat-channel-link-mgr .ui.form .one.wide.field {\n padding: 0;\n }\n}\n"}),define("text!resources/elements/em-blog-top-menu.html",["module"],function(e){e.exports='\r\n'; -}),define("text!resources/elements/em-chat-channel-members-mgr.css",["module"],function(e){e.exports=".tms-em-chat-channel-members-mgr .ui.dropdown span.owner + i.delete.icon {\n display: none;\n}\n.tms-em-chat-channel-members-mgr .ui.dropdown span.disabled-user {\n text-decoration: line-through;\n font-style: italic;\n}\n.tms-em-chat-channel-members-mgr .member-table {\n max-height: 315px;\n overflow-y: auto;\n}\n"}),define("text!resources/elements/em-chat-channel-members-show.css",["module"],function(e){e.exports=".em-chat-channel-members-show {\n max-height: 300px;\n overflow-y: auto;\n}\n"}),define("text!resources/elements/em-blog-write.html",["module"],function(e){e.exports='\n'}),define("text!resources/elements/em-chat-content-item.css",["module"],function(e){e.exports='.em-chat-content-item .textcomplete-container {\n position: relative;\n}\n.em-chat-content-item .textcomplete-container .append-to {\n position: absolute;\n left: 0;\n bottom: 0;\n width: 100%;\n}\n.ui.comments .em-chat-content-item.comment > .avatar ~ .content {\n margin-left: 3em;\n}\n.ui.comments .em-chat-content-item.comment .actions > a {\n margin-right: 5px;\n}\n.ui.comments .em-chat-content-item.comment .actions .dropdown > a .ellipsis.icon {\n margin-right: 0;\n}\n.ui.comments .em-chat-content-item.comment .actions .dropdown .item.tms-red {\n color: red;\n}\n.ui.comments .em-chat-content-item.comment:hover .tools {\n display: block;\n}\n.ui.comments .em-chat-content-item.comment:hover:before {\n width: 4px;\n}\n.ui.comments .em-chat-content-item.comment.active:before {\n width: 4px;\n}\n.ui.comments .em-chat-content-item.comment:before {\n content: "";\n position: absolute;\n z-index: -1;\n top: 0;\n left: 0;\n bottom: 0;\n background: #2098D1;\n width: 0;\n -webkit-transition-property: width;\n transition-property: width;\n -webkit-transition-duration: 0.3s;\n transition-duration: 0.3s;\n -webkit-transition-timing-function: ease-out;\n transition-timing-function: ease-out;\n}\n@media only screen and (max-width: 767px) {\n .em-chat-content-item > .content > .metadata > .rating {\n display: none!important;\n }\n}\n.em-chat-content-item > .content > .markdown-body span.at-user {\n cursor: pointer;\n}\n.em-chat-content-item > .content > .tools {\n position: absolute;\n right: 0;\n bottom: 0;\n display: none;\n}\n.em-chat-content-item > .content > .tools > .ui.button {\n margin: 0;\n background-color: rgba(224, 225, 226, 0.5);\n}\n.em-chat-content-item > .content > .tools > .ui.button:hover {\n background-color: #e0e1e2;\n}\n'}),define("text!resources/elements/em-chat-attach.html",["module"],function(e){e.exports='\n'}),define("text!resources/elements/em-chat-channel-create.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-chat-input.css",["module"],function(e){e.exports='.tms-em-chat-input.ui.segment {\n margin: 0;\n position: fixed;\n bottom: 0;\n left: 220px;\n right: 0;\n background-color: white;\n padding-bottom: 22px;\n}\n@media only screen and (max-width: 767px) {\n .tms-em-chat-input.ui.segment {\n left: 0;\n }\n}\n.tms-em-chat-input.ui.segment .tms-chat-status-bar .dz-preview {\n display: block!important;\n width: auto!important;\n background: #e0e1e2;\n margin: 0;\n padding: 7px;\n}\n.tms-em-chat-input.ui.segment .ui[class*="left action"].input > textarea {\n border-top-left-radius: 0!important;\n border-bottom-left-radius: 0!important;\n border-left-color: transparent!important;\n}\n.tms-em-chat-input.ui.segment .textareaWrapper {\n width: calc(100% - 35px);\n border: 1px solid rgba(34, 36, 38, 0.15);\n border-top-right-radius: .28571429rem;\n border-bottom-right-radius: .28571429rem;\n}\n.tms-em-chat-input.ui.segment .textareaWrapper .CodeMirror,\n.tms-em-chat-input.ui.segment .textareaWrapper .CodeMirror-scroll {\n min-height: 0;\n border: none;\n border-top-right-radius: .28571429rem;\n}\n.tms-em-chat-input.ui.segment .textareaWrapper .CodeMirror-scroll {\n max-height: 300px;\n}\n.tms-em-chat-input.ui.segment .ui.input {\n margin-right: 5px;\n}\n.tms-em-chat-input.ui.segment .ui.input i.send.icon {\n z-index: 1;\n right: 7px!important;\n}\n.tms-em-chat-input.ui.segment .ui.input textarea {\n resize: none;\n width: 100%;\n padding-right: 2.67142857em!important;\n margin: 0;\n max-width: 100%;\n outline: 0;\n -webkit-tap-highlight-color: rgba(255, 255, 255, 0);\n text-align: left;\n display: block;\n padding: .67861429em 1em;\n background: #FFF;\n border: none;\n color: rgba(0, 0, 0, 0.87);\n box-shadow: none;\n border-top-right-radius: .28571429rem;\n border-bottom-right-radius: .28571429rem;\n}\n.tms-em-chat-input .CodeMirror-lines {\n margin-right: 30px;\n}\n.tms-em-chat-input .ui.vertical.menu.popup {\n width: 145px;\n}\n.tms-em-chat-input .ui.vertical.menu.popup a.item > i.icon {\n float: left;\n margin: 0 .35714286em 0 0;\n}\n@media only screen and (min-width: 768px) {\n .tms-chat-direct .tms-content.tms-sidebar-show .tms-em-chat-input {\n right: 392px;\n }\n}\n.textcomplete-dropdown {\n position: static!important;\n border: 1px solid #ddd;\n background-color: white;\n list-style: none;\n padding: 0;\n margin: 0;\n border-radius: 5px;\n}\n.textcomplete-dropdown li {\n /* border-top: 1px solid #ddd; */\n padding: 2px 5px;\n}\n.textcomplete-dropdown li:first-child {\n border-top: none;\n border-top-left-radius: 5px;\n border-top-right-radius: 5px;\n}\n.textcomplete-dropdown li:last-child {\n border-bottom-left-radius: 5px;\n border-bottom-right-radius: 5px;\n}\n.textcomplete-dropdown li:hover,\n.textcomplete-dropdown .active {\n background-color: #439fe0;\n}\n.textcomplete-dropdown a:hover {\n cursor: pointer;\n}\n.textcomplete-dropdown li.textcomplete-item a {\n color: black;\n}\n.textcomplete-dropdown li.textcomplete-item:hover a,\n.textcomplete-dropdown li.textcomplete-item.active a {\n color: white;\n}\n'}),define("text!resources/elements/em-chat-member-popup.css",["module"],function(e){e.exports=".tms-chat-member-popup .ui.cards {\n margin-top: 0!important;\n}\n.tms-chat-member-popup .ui.cards .card {\n margin-top: 0!important;\n}\n.tms-chat-member-popup .ui.cards .card .ui.list > .item {\n border-radius: 0!important;\n}\n"}),define("text!resources/elements/em-chat-channel-edit.html",["module"],function(e){e.exports='\n'}),define("text!resources/elements/em-chat-schedule-edit.css",["module"],function(e){e.exports=".em-chat-schedule-edit .ui.form {\n width: 300px;\n}\n.em-chat-schedule-edit .ui.form .ui.calendar {\n width: 200px;\n}\n.em-chat-schedule-edit .ui.form .tms-date-field {\n position: relative;\n}\n.em-chat-schedule-edit .ui.form .tms-date-field .ui.button {\n position: absolute;\n top: 0;\n right: 0;\n}\n.em-chat-schedule-edit .ui.form .ui.dropdown {\n width: 265px!important;\n min-height: 30px;\n}\n.em-chat-schedule-edit .ui.form .ui.dropdown > a.ui.label > input.owner + i.delete.icon {\n display: none;\n}\n.tms-schedule-edit-target {\n display: inline-block;\n width: 1px;\n height: 1px;\n position: absolute;\n right: 188px;\n top: 30px;\n}\n"}),define("text!resources/elements/em-chat-schedule-remind.css",["module"],function(e){e.exports=".em-chat-schedule-remind .ui.table tr > td:first-child {\n font-weight: bold;\n}\n"}),define("text!resources/elements/em-chat-channel-join.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-chat-schedule.css",["module"],function(e){e.exports=".em-chat-schedule {\n position: relative;\n height: 100%;\n}\n.em-chat-schedule .tms-add {\n position: absolute;\n right: 170px;\n top: 0;\n}\n.em-chat-schedule .ui.form {\n width: 300px;\n}\n.em-chat-schedule .ui.form .ui.calendar {\n width: 200px;\n}\n.em-chat-schedule .ui.form .tms-date-field {\n position: relative;\n}\n.em-chat-schedule .ui.form .tms-date-field .ui.button {\n position: absolute;\n top: 0;\n right: 0;\n}\n.em-chat-schedule .ui.form .ui.dropdown {\n width: 265px!important;\n min-height: auto;\n}\n.em-chat-schedule .ui.form .ui.dropdown > a.ui.label > input.owner + i.delete.icon {\n display: none;\n}\n"}),define("text!resources/elements/em-chat-channel-link-mgr.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-chat-share.css",["module"],function(e){e.exports=".em-chat-share.ui.popup {\n max-width: 100%;\n width: 255px;\n}\n.em-chat-share.ui.popup .ui.input {\n width: 225px;\n}\n.em-chat-share.ui.popup textarea {\n width: 195px!important;\n}\n.em-chat-share.ui.popup .ui.search > .results .result {\n cursor: pointer!important;\n display: block!important;\n color: rgba(0, 0, 0, 0.87) !important;\n border-bottom: 1px solid rgba(34, 36, 38, 0.1) !important;\n margin: 0!important;\n}\n.em-chat-share.ui.popup .ui.list > .item {\n color: rgba(0, 0, 0, 0.87);\n}\n.em-chat-share:after {\n content: '';\n clear: both;\n}\n.em-chat-share .footer {\n margin-top: 16px;\n}\n.em-chat-share .footer .btn-cancel {\n float: right;\n margin: 6px 0 0 8px!important;\n}\n"}),define("text!resources/elements/em-chat-channel-members-mgr.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-chat-sidebar-left.css",["module"],function(e){e.exports=".tms-left-sidebar {\n overflow: hidden;\n}\n.tms-left-sidebar .tms-body {\n position: absolute;\n top: 98px;\n width: 220px;\n height: calc(100% - 150px);\n overflow: hidden;\n padding-right: 2px;\n}\n.tms-left-sidebar .tms-body i.circular.icon {\n box-shadow: 0 0 0 0.1em #4183c4 inset;\n}\n.tms-left-sidebar .tms-body .title {\n position: relative;\n margin-left: 10px;\n}\n.tms-left-sidebar .tms-body .title .ui.header {\n display: inline-block;\n margin-top: 2px;\n margin-bottom: 0;\n}\n.tms-left-sidebar .tms-body .title i.plus.icon {\n position: absolute;\n right: 10px;\n font-size: 12px;\n width: 12px!important;\n height: 12px!important;\n}\n.tms-left-sidebar .tms-body .ui.list {\n margin-top: 10px;\n padding-top: 5px;\n box-shadow: 0px -1px 1px -1px rgba(65, 131, 196, 0.5);\n}\n.tms-left-sidebar .tms-body .ui.list > .item {\n padding-left: 16px;\n border-radius: 0;\n}\n.tms-left-sidebar .tms-body .ui.list > .item > .icon + .content {\n padding: 0;\n}\n.tms-left-sidebar .tms-body .ui.list > .item.active {\n background: rgba(0, 0, 0, 0.2);\n}\n.tms-left-sidebar .tms-body .ui.list > .item:hover {\n background: rgba(0, 0, 0, 0.1) !important;\n}\n.tms-left-sidebar .tms-body .ui.list > .item.disabled-user {\n text-decoration: line-through;\n font-style: italic;\n}\n.tms-left-sidebar .tms-body .tms-name {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 160px;\n}\n.tms-left-sidebar .tms-body .tms-channels .ui.list a.item {\n position: relative;\n}\n.tms-left-sidebar .tms-body .tms-channels .ui.list a.item:hover .actions {\n display: inline-block;\n}\n.tms-left-sidebar .tms-body .tms-channels .actions {\n display: none;\n position: absolute;\n right: 10px;\n top: 5px;\n}\n.tms-left-sidebar .tms-body .scroll-element.scroll-y {\n background-color: #4d394b;\n}\n.tms-left-sidebar.ui.left.sidebar {\n background-color: #4d394b;\n width: 220px;\n}\n.tms-left-sidebar.ui.left.sidebar * {\n color: #4183c4!important;\n}\n.tms-left-sidebar.ui.left.sidebar .tms-header {\n padding: 9px 16px;\n box-shadow: 0 1px 1px -1px #4183c4;\n}\n.tms-left-sidebar.ui.left.sidebar .tms-header > input {\n background-color: transparent;\n border: 1px rgba(103, 104, 104, 0.5) solid;\n font-size: 12px;\n padding: 4px;\n width: 188px;\n outline: none;\n margin-top: 10px;\n border-radius: 2px;\n}\n.tms-left-sidebar.ui.left.sidebar .tms-header > input::-webkit-input-placeholder {\n color: rgba(103, 104, 104, 0.5) !important;\n}\n.tms-left-sidebar.ui.left.sidebar .tms-header > input::-moz-placeholder {\n color: rgba(103, 104, 104, 0.5) !important;\n}\n.tms-left-sidebar.ui.left.sidebar .tms-header > input:-ms-input-placeholder {\n color: rgba(103, 104, 104, 0.5) !important;\n}\n.tms-left-sidebar.ui.left.sidebar .tms-header > input:focus::-webkit-input-placeholder {\n color: #676868 !important;\n}\n.tms-left-sidebar.ui.left.sidebar .tms-header > input:focus::-moz-placeholder {\n color: #676868 !important;\n}\n.tms-left-sidebar.ui.left.sidebar .tms-header > input:focus:-ms-input-placeholder {\n color: #676868 !important;\n}\n.tms-left-sidebar.ui.left.sidebar .tms-header h1.ui.header {\n margin: 0;\n}\n.tms-left-sidebar.ui.left.sidebar .tms-header h1.ui.header img {\n width: 30px;\n height: 30px;\n margin: 0;\n}\n.tms-left-sidebar.ui.left.sidebar .tms-header i.close.icon {\n position: absolute;\n right: 16px;\n top: 57px;\n}\n.tms-left-sidebar .tms-footer {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.tms-left-sidebar .tms-footer .ui.menu {\n border-radius: 0;\n background-color: rgba(27, 28, 29, 0.2) !important;\n}\n.tms-left-sidebar .tms-footer .ui.menu .dropdown.item .menu {\n border-radius: 0;\n}\n.tms-left-sidebar .tms-footer .ui.menu .item {\n font-size: 12px!important;\n}\n.tms-left-sidebar .tms-footer .ui.menu .item:before {\n width: 0;\n}\n.tms-left-sidebar .tms-footer .ui.menu .ui.button.item {\n width: 140px;\n margin-right: 0;\n padding-left: 0;\n}\n.tms-left-sidebar .tms-footer .ui.menu .ui.button.item .visible.content {\n margin-right: 0;\n width: 100%;\n}\n.tms-left-sidebar .tms-footer .ui.menu .right.menu .ui.dropdown .menu .header {\n min-width: 150px;\n position: relative;\n}\n.tms-left-sidebar .tms-footer .ui.menu .right.menu .ui.dropdown .menu .header .plus.icon {\n position: absolute;\n right: 0;\n top: -7px;\n}\n"}),define("text!resources/elements/em-chat-sidebar-right.css",["module"],function(e){e.exports=".em-chat-sidebar-right .panel-wiki-dir {\n height: 100%;\n padding-left: 15px;\n overflow-y: auto;\n}\n.em-chat-sidebar-right .panel-chat-schedule {\n height: calc(100% - 10px);\n overflow: hidden;\n}\n"}),define("text!resources/elements/em-chat-system-link-mgr.css",["module"],function(e){e.exports="@media only screen and (min-width: 768px) {\n .tms-em-chat-system-link-mgr .ui.form .one.wide.field {\n padding: 0;\n }\n}\n"}),define("text!resources/elements/em-chat-channel-members-show.html",["module"],function(e){e.exports='\r\n'; -}),define("text!resources/elements/em-chat-top-menu.css",["module"],function(e){e.exports=".tms-em-chat-top-menu.ui.top.menu {\n padding-left: 220px;\n height: 60px;\n}\n@media only screen and (max-width: 767px) {\n .tms-em-chat-top-menu.ui.top.menu .tms-chat-at.tms-hide {\n display: none;\n }\n}\n.tms-em-chat-top-menu.ui.top.menu .item.tms-item:before {\n display: none;\n}\n@media only screen and (max-width: 767px) {\n .tms-em-chat-top-menu.ui.top.menu .right.menu .item.tms-login-user.tms-hide {\n display: none;\n }\n}\n.tms-em-chat-top-menu.ui.top.menu .right.menu .item.tms-item {\n padding-left: 0;\n padding-right: 5px;\n}\n@media only screen and (max-width: 767px) {\n .tms-em-chat-top-menu.ui.top.menu .right.menu .item.tms-item.tms-hide {\n display: none;\n }\n .tms-em-chat-top-menu.ui.top.menu .right.menu .item.tms-item.tms-mobile-hide {\n display: none;\n }\n}\n.tms-em-chat-top-menu.ui.top.menu .right.menu .item.tms-item button .ui.floating.label {\n top: 0;\n right: 0;\n left: auto;\n}\n.tms-em-chat-top-menu.ui.top.menu .right.menu .item.tms-item.ui.dropdown {\n display: none;\n padding-left: 5px;\n margin-right: 5px;\n}\n@media only screen and (max-width: 767px) {\n .tms-em-chat-top-menu.ui.top.menu .right.menu .item.tms-item.ui.dropdown {\n display: flex;\n }\n}\n.tms-em-chat-top-menu.ui.top.menu .right.menu .item.tms-item.ui.dropdown > i.icon {\n margin-left: 5px;\n}\n.tms-em-chat-top-menu.ui.top.menu .right.menu .item.tms-item.ui.dropdown .menu > .item .ui.button {\n margin: 0;\n}\n.tms-em-chat-top-menu.ui.top.menu .right.menu .item.tms-item.ui.dropdown .menu > .item .ui.button i.icon {\n margin: 0;\n}\n@media only screen and (max-width: 767px) {\n .tms-em-chat-top-menu.ui.top.menu .right.menu .item.tms-search {\n padding-left: 10px;\n padding-right: 10px;\n }\n}\n.tms-em-chat-top-menu.ui.top.menu .right.menu .ui.search input {\n width: 95px;\n transition: width 0.15s ease-out 0s;\n}\n.tms-em-chat-top-menu.ui.top.menu .right.menu .ui.search i.remove.icon {\n display: none;\n position: absolute;\n right: 0;\n left: auto;\n}\n@media only screen and (max-width: 767px) {\n .tms-em-chat-top-menu.ui.top.menu {\n padding-left: 0;\n }\n}\n.tms-em-chat-top-menu.ui.top.menu .ui.basic.button {\n box-shadow: none;\n}\n@media only screen and (min-width: 768px) {\n .tms-em-chat-top-menu > .tms-chat-at.ui.dropdown {\n min-width: 175px;\n padding-top: 0;\n padding-left: 13px;\n padding-bottom: 20px;\n }\n .tms-em-chat-top-menu > .tms-chat-at.ui.dropdown.item:before {\n width: 0;\n }\n}\n.tms-em-chat-top-menu > .tms-chat-at.ui.dropdown > .text > .actions {\n display: none;\n}\n.tms-em-chat-top-menu > .tms-chat-at.ui.dropdown > .tms-metadata {\n position: absolute;\n display: flex;\n top: 35px;\n font-size: 12px;\n left: 0;\n height: 15px;\n}\n.tms-em-chat-top-menu > .tms-chat-at.ui.dropdown > .tms-metadata .item:before {\n top: 5px;\n height: 50%;\n}\n.tms-em-chat-top-menu > .tms-chat-at.ui.dropdown > .tms-metadata .item.tms-channel-info:before {\n width: 0;\n}\n.tms-em-chat-top-menu > .tms-chat-at.ui.dropdown > .tms-metadata .item.tms-user-info:before {\n width: 0;\n}\n@media only screen and (max-width: 767px) {\n .tms-em-chat-top-menu > .tms-chat-at.ui.dropdown > .tms-metadata {\n display: none;\n }\n}\n.tms-em-chat-top-menu > .tms-chat-at.ui.dropdown > .tms-metadata .tms-channel-links .menu .header {\n min-width: 200px;\n}\n@media only screen and (max-width: 767px) {\n .tms-em-chat-top-menu > .tms-chat-at.ui.dropdown > .text {\n display: none;\n }\n .tms-em-chat-top-menu > .tms-chat-at.ui.dropdown > .dropdown.icon {\n margin-left: 6px;\n margin-right: 6px;\n }\n}\n.tms-em-chat-top-menu > .tms-chat-at.ui.dropdown .menu > .header i.plus.icon {\n position: absolute;\n right: 5px;\n top: 7px;\n}\n.tms-em-chat-top-menu > .tms-chat-at.ui.dropdown .menu > .item:hover .actions {\n display: inline-block;\n}\n.tms-em-chat-top-menu > .tms-chat-at.ui.dropdown .menu > .item .icon {\n margin-right: 4px!important;\n}\n.tms-em-chat-top-menu > .tms-chat-at.ui.dropdown .menu > .item > .actions {\n display: none;\n position: absolute;\n right: 5px;\n top: 10px;\n}\n.tms-em-chat-top-menu > .tms-chat-at.ui.dropdown .menu > .item > .actions .large.ellipsis.horizontal.icon {\n font-size: 1.3em!important;\n}\n.tms-em-chat-top-menu > .tms-chat-at.ui.dropdown .menu > .item.disabled-user {\n text-decoration: line-through;\n font-style: italic;\n}\n"}),define("text!resources/elements/em-checkbox.css",["module"],function(e){e.exports=""}),define("text!resources/elements/em-chat-content-item.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-hotkeys-modal.css",["module"],function(e){e.exports=".tms-em-hotkeys-modal ul {\n padding-left: 30px;\n}\n.tms-em-hotkeys-modal ul.no_bullets {\n margin: 0 0 2rem;\n}\n.tms-em-hotkeys-modal ul.no_bullets li {\n line-height: 2rem;\n list-style-type: none;\n padding: 0;\n font-size: 1rem;\n font-weight: 700;\n}\n.tms-em-hotkeys-modal > .content {\n background-color: rgba(11, 7, 11, 0.78) !important;\n}\n.tms-em-hotkeys-modal .keyboard i.icon {\n margin-right: 0px!important;\n}\n.tms-em-hotkeys-modal .subtle_silver {\n color: #9e9ea6!important;\n}\n.tms-em-hotkeys-modal .ui.grid .column {\n padding: 0!important;\n}\n"}),define("text!resources/elements/em-user-avatar.css",["module"],function(e){e.exports=".em-user-avatar.avatar.ui.mini.circular.image {\n width: 35px;\n height: 35px;\n font-size: 35px;\n background-color: rgba(150, 178, 183, 0.4);\n text-align: center;\n margin: 0;\n padding-right: 0;\n}\n.em-user-avatar .text-char {\n display: inline-block;\n height: 35px;\n line-height: 35px;\n vertical-align: top;\n}\n"}),define("text!resources/elements/em-user-edit.css",["module"],function(e){e.exports=".tms-em-user-edit .ui.form .field > label {\n width: 45px!important;\n}\n.tms-em-user-edit .ui.form .field .user-username {\n margin-left: 0;\n}\n.em-user-edit-modal {\n /* Tablet & PC */\n}\n@media only screen and (min-width: 768px) {\n .em-user-edit-modal {\n width: 500px!important;\n margin-left: -250px !important;\n }\n}\n"}),define("text!resources/elements/em-chat-input.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-chat-member-popup.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-chat-msg-popup.html",["module"],function(e){e.exports='\n'}),define("text!resources/elements/em-chat-schedule-edit.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-chat-schedule-remind.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-chat-schedule.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-chat-share.html",["module"],function(e){e.exports='\n'}),define("text!resources/elements/em-chat-sidebar-left.html",["module"],function(e){e.exports='\r\n'; -}),define("text!resources/elements/em-chat-sidebar-right.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-chat-system-link-mgr.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-chat-top-menu.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-checkbox.html",["module"],function(e){e.exports='\n'}),define("text!resources/elements/em-confirm-modal.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-dropdown.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-hotkeys-modal.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-modal.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-user-avatar.html",["module"],function(e){e.exports='\r\n'}),define("text!resources/elements/em-user-edit.html",["module"],function(e){e.exports='\n'}); \ No newline at end of file diff --git a/scripts/app-bundle.js b/scripts/app-bundle.js deleted file mode 100644 index 6d0cbc3b4efa102d729bb2166b79fe8b575fb6b8..0000000000000000000000000000000000000000 --- a/scripts/app-bundle.js +++ /dev/null @@ -1,33678 +0,0 @@ -define('app',['exports', 'tms-semantic-ui', 'semantic-ui-calendar', 'jquery-format'], function (exports) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.App = undefined; - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var App = exports.App = function () { - function App() { - var _this = this; - - _classCallCheck(this, App); - - this.init(); - this.initCalendar(); - - this.subscribe = ea.subscribe(nsCons.EVENT_APP_ROUTER_NAVIGATE, function (payload) { - _this.router && _this.router.navigate('' + payload.to); - }); - } - - App.prototype.unbind = function unbind() { - this.subscribe.dispose(); - }; - - App.prototype.init = function init() { - - $.fn.dropdown.settings.forceSelection = false; - - _.extend($.fn.form.settings.prompt, { - empty: '{name}不能为空', - checked: '{name}必须被勾选', - email: '{name}必须是正确的邮件格式', - url: '{name}必须是正确的URL格式', - regExp: '{name}验证格式不正确', - integer: '{name}必须为一个整数', - decimal: '{name}必须为一个小数', - number: '{name}必须设置为一个数字', - is: '{name}必须符合规则"{ruleValue}"', - isExactly: '{name}必须精确匹配"{ruleValue}"', - not: '{name}不能设置为"{ruleValue}"', - notExactly: '{name}不能准确设置为"{ruleValue}"', - contain: '{name}需要包含"{ruleValue}"', - containExactly: '{name}需要精确包含"{ruleValue}"', - doesntContain: '{name}不能包含"{ruleValue}"', - doesntContainExactly: '{name}不能精确包含"{ruleValue}"', - minLength: '{name}必须至少包含{ruleValue}个字符', - length: '{name}必须为{ruleValue}个字符', - exactLength: '{name}必须为{ruleValue}个字符', - maxLength: '{name}必须不能超过{ruleValue}个字符', - match: '{name}必须匹配{ruleValue}字段', - different: '{name}必须不同于{ruleValue}字段', - creditCard: '{name}必须是一个正确的信用卡数字格式', - minCount: '{name}必须至少包含{ruleValue}个选择项', - exactCount: '{name}必须准确包含{ruleValue}个选择项', - maxCount: '{name} 必须有{ruleValue}或者更少个选择项' - }); - }; - - App.prototype.initCalendar = function initCalendar() { - $.fn.calendar.settings.text = { - days: ['日', '一', '二', '三', '四', '五', '六'], - months: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'], - monthsShort: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'], - today: '今天', - now: '现在', - am: '上午', - pm: '下午' - }; - - $.fn.calendar.settings.formatter.date = function (date, settings) { - if (!date) return ''; - var day = date.getDate(); - var month = date.getMonth() + 1; - var year = date.getFullYear(); - - return $.format.date(date, 'yyyy-MM-dd'); - }; - - return this; - }; - - App.prototype.configureRouter = function configureRouter(config, router) { - - var chatTo = null; - if (localStorage) { - chatTo = localStorage.getItem(nsCons.KEY_REMEMBER_LAST_CHAT_TO); - } - - config.map([{ - route: ['pwd-reset'], - name: 'reset', - moduleId: 'user/user-pwd-reset', - nav: false, - title: '密码重置 | TMS' - }, { - route: ['register'], - name: 'register', - moduleId: 'user/user-register', - nav: false, - title: '用户注册 | TMS' - }, { - route: ['chat/:username'], - name: 'chat', - moduleId: 'chat/chat-direct', - nav: false, - title: '私聊 | TMS' - }, { - route: ['blog'], - name: 'chat', - moduleId: 'blog/blog', - nav: false, - title: '博文 | TMS' - }, { - route: ['blog/:id'], - name: 'chat', - moduleId: 'blog/blog', - nav: false, - title: '博文 | TMS' - }, { - route: ['login'], - name: 'login', - moduleId: 'user/user-login', - nav: false, - title: '登录 | TMS' - }, { - route: ['test'], - name: 'test', - moduleId: 'test/test-lifecycle', - nav: false, - title: '测试 | TMS' - }, { - route: '', - redirect: 'chat/' + (chatTo ? chatTo : '@admin') - }]); - - this.router = router; - }; - - App.prototype.activate = function activate(params, routeConfig, navigationInstruction) {}; - - return App; - }(); -}); -define('environment',["exports"], function (exports) { - "use strict"; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.default = { - debug: true, - testing: true - }; -}); -define('main',['exports', './environment'], function (exports, _environment) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.configure = configure; - - var _environment2 = _interopRequireDefault(_environment); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { - default: obj - }; - } - - Promise.config({ - warnings: { - wForgottenReturn: false - } - }); - - function configure(aurelia) { - aurelia.use.standardConfiguration().feature('init').feature('resources'); - - if (_environment2.default.debug) { - aurelia.use.developmentLogging(); - } - - if (_environment2.default.testing) { - aurelia.use.plugin('aurelia-testing'); - } - - aurelia.start().then(function () { - return aurelia.setRoot(); - }); - } -}); -define('blog/blog',['exports', 'aurelia-framework', 'chat/chat-service'], function (exports, _aureliaFramework, _chatService) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.Blog = undefined; - - var _chatService2 = _interopRequireDefault(_chatService); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { - default: obj - }; - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var Blog = exports.Blog = function () { - function Blog() { - var _this = this; - - _classCallCheck(this, Blog); - - this.rightSidebarShow = false; - this.isHide = true; - - this.subscribe = ea.subscribe(nsCons.EVENT_BLOG_VIEW_CHANGED, function (payload) { - _this.routeConfig && _this.routeConfig.navModel.setTitle(payload.title + ' | \u535A\u6587 | TMS'); - }); - this.subscribe1 = ea.subscribe(nsCons.EVENT_BLOG_RIGHT_SIDEBAR_TOGGLE, function (payload) { - if (payload.justRefresh) { - return; - } - if (payload && !_.isUndefined(payload.isHide)) { - _this.rightSidebarShow = !payload.isHide; - } else { - _this.rightSidebarShow = !_this.rightSidebarShow; - } - }); - this.subscribe2 = ea.subscribe(nsCons.EVENT_BLOG_TOGGLE_SIDEBAR, function (payload) { - _this.isHide = payload; - }); - } - - Blog.prototype.unbind = function unbind() { - this.subscribe.dispose(); - this.subscribe1.dispose(); - this.subscribe2.dispose(); - - clearInterval(this.timeagoTimer); - }; - - Blog.prototype.attached = function attached() { - var _this2 = this; - - var tg = timeago(); - this.timeagoTimer = setInterval(function () { - $(_this2.blogContainerRef).find('[data-timeago]').each(function (index, el) { - $(el).text(tg.format($(el).attr('data-timeago'), 'zh_CN')); - }); - }, 5000); - - $('.tms-blog').on('mouseenter', 'span[data-value].at-user:not(.pp-not),a[data-value].author:not(.pp-not)', function (event) { - event.preventDefault(); - var $a = $(event.currentTarget); - ea.publish(nsCons.EVENT_CHAT_MEMBER_POPUP_SHOW, { - username: $a.attr('data-value'), - target: event.currentTarget - }); - }); - - $('.tms-blog .em-blog-content').on('click', 'a.avatar[data-value], a.author[data-value], .at-user[data-value]', function (event) { - event.preventDefault(); - ea.publish(nsCons.EVENT_BLOG_COMMENT_MSG_INSERT, { - content: '{~' + $(event.currentTarget).attr('data-value') + '} ' - }); - }); - }; - - Blog.prototype.detached = function detached() {}; - - Blog.prototype.activate = function activate(params, routeConfig, navigationInstruction) { - - this.routeConfig = routeConfig; - nsCtx.blogId = params.id; - - ea.publish(nsCons.EVENT_BLOG_SWITCH, { id: params.id }); - - return Promise.all([_chatService2.default.loginUser().then(function (user) { - nsCtx.loginUser = user; - nsCtx.isSuper = utils.isSuperUser(user); - nsCtx.isAdmin = utils.isAdminUser(user); - }), _chatService2.default.listUsers().then(function (users) { - nsCtx.users = users; - window.tmsUsers = users; - })]); - }; - - return Blog; - }(); -}); -define('chat/chat-direct',['exports', 'aurelia-framework', 'common/common-poll', 'clipboard', 'clipboard-js', 'dropzone', './chat-service'], function (exports, _aureliaFramework, _commonPoll, _clipboard, _clipboardJs, _dropzone, _chatService) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.ChatDirect = undefined; - - var _commonPoll2 = _interopRequireDefault(_commonPoll); - - var _clipboard2 = _interopRequireDefault(_clipboard); - - var _clipboardJs2 = _interopRequireDefault(_clipboardJs); - - var _dropzone2 = _interopRequireDefault(_dropzone); - - var _chatService2 = _interopRequireDefault(_chatService); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { - default: obj - }; - } - - var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { - return typeof obj; - } : function (obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }; - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var ChatDirect = exports.ChatDirect = function () { - function ChatDirect() { - _classCallCheck(this, ChatDirect); - - this.offset = 0; - this.first = true; - this.last = true; - this.originalHref = wurl(); - this.users = []; - this.channels = []; - this.chatTo = null; - - - _dropzone2.default.autoDiscover = false; - this.poll = _commonPoll2.default; - - new _clipboard2.default('.tms-chat-direct .tms-clipboard').on('success', function (e) { - toastr.success('复制到剪贴板成功!'); - }).on('error', function (e) { - toastr.error('复制到剪贴板失败!'); - }); - - this.initSubscribeEvent(); - } - - ChatDirect.prototype.initSubscribeEvent = function initSubscribeEvent() { - var _this = this; - - this.subscribe = ea.subscribe(nsCons.EVENT_CHAT_MSG_SENDED, function (payload) { - - _commonPoll2.default.reset(); - - if (!_this.first) { - if (_this.isAt) { - _this.listChatDirect(false); - } else { - _this.listChatChannel(false); - } - } - }); - - this.subscribe2 = ea.subscribe(nsCons.EVENT_CHAT_SIDEBAR_TOGGLE, function (payload) { - - _this.isRightSidebarShow = payload.isShow; - if (_this.isRightSidebarShow) { - var wid = $(_this.contentRef).width() - 392; - $(_this.contentBodyRef).width(wid); - $(_this.contentBodyRef).children('.scroll-wrapper').width(wid); - } else { - $(_this.contentBodyRef).css('width', '100%'); - $(_this.contentBodyRef).children('.scroll-wrapper').css('width', '100%'); - } - }); - - this.subscribe3 = ea.subscribe(nsCons.EVENT_CHAT_CHANNEL_CREATED, function (payload) { - _this.channels.splice(0, 0, payload.channel); - }); - - this.subscribe4 = ea.subscribe(nsCons.EVENT_CHAT_SEARCH_GOTO_CHAT_ITEM, function (payload) { - - _this.gotoChatItem(payload.chatItem); - }); - - this.subscribe5 = ea.subscribe(nsCons.EVENT_CHAT_CHANNEL_DELETED, function (payload) { - - if (!_this.isAt && payload.channel.name == _this.chatTo) { - window.location = wurl('path') + ('#/chat/@' + _this.loginUser.username); - } - - _this.channels = [].concat(_this.channels); - }); - - this.subscribe6 = ea.subscribe(nsCons.EVENT_CHAT_CHANNEL_JOINED, function (payload) { - - _this.channels.splice(0, 0, payload.channel); - }); - - this.subscribe7 = ea.subscribe(nsCons.EVENT_CHAT_CHANNEL_LEAVED, function (payload) { - - if (!_this.isAt && payload.channel.name == _this.chatTo) { - window.location = wurl('path') + ('#/chat/@' + _this.loginUser.username); - } - - _this.channels = _.reject(_this.channels, { id: payload.channel.id }); - }); - - this.subscribe8 = ea.subscribe(nsCons.EVENT_CHAT_LAST_ITEM_RENDERED, function (payload) { - - if (payload.item.__scroll) { - _this.scrollToAfterImgLoaded(_this.markId ? _this.markId : 'b'); - delete payload.item.__scroll; - _this.markId = null; - } - }); - - this.subscribe9 = ea.subscribe(nsCons.EVENT_SCROLLBAR_SCROLL_TO_BOTTOM, function (payload) { - - if (_this.scrollbarRef == payload.element) { - _commonPoll2.default.reset(); - } - }); - - this.subscribe10 = ea.subscribe(nsCons.EVENT_CHAT_CONTENT_SCROLL_TO, function (payload) { - - _this.scrollTo(payload.target); - }); - }; - - ChatDirect.prototype.unbind = function unbind() { - - this.subscribe.dispose(); - this.subscribe2.dispose(); - this.subscribe3.dispose(); - this.subscribe4.dispose(); - this.subscribe5.dispose(); - this.subscribe6.dispose(); - this.subscribe7.dispose(); - this.subscribe8.dispose(); - this.subscribe9.dispose(); - this.subscribe10.dispose(); - - clearInterval(this.timeagoTimer); - _commonPoll2.default.stop(); - }; - - ChatDirect.prototype.activate = function activate(params, routeConfig, navigationInstruction) { - var _this2 = this; - - this._reset(); - - this.markId = params.id; - this.routeConfig = routeConfig; - - if (this.chatId) { - this.preChatId = this.chatId; - } - this.chatId = nsCtx.chatId = params.username; - - localStorage && localStorage.setItem(nsCons.KEY_REMEMBER_LAST_CHAT_TO, this.chatId); - - this.isAt = nsCtx.isAt = _.startsWith(params.username, '@'); - this.chatTo = nsCtx.chatTo = utils.getChatName(params.username); - - if (this.markId) { - history.replaceState(null, '', utils.removeUrlQuery('id')); - } - - return Promise.all([_chatService2.default.loginUser(false).then(function (user) { - _this2.loginUser = user; - nsCtx.loginUser = user; - nsCtx.isSuper = utils.isSuperUser(_this2.loginUser); - nsCtx.isAdmin = utils.isAdminUser(_this2.loginUser); - }), _chatService2.default.listUsers(false).then(function (users) { - _this2.users = users; - nsCtx.users = users; - window.tmsUsers = users; - if (_this2.isAt) { - _this2.channel = null; - _this2.user = _.find(_this2.users, { - username: _this2.chatTo - }); - - if (_this2.user) { - var name = _this2.user ? _this2.user.name : _this2.chatTo; - routeConfig.navModel.setTitle(name + ' | \u79C1\u804A | TMS'); - - _this2.listChatDirect(true); - } else { - toastr.error('\u804A\u5929\u7528\u6237[' + _this2.chatTo + ']\u4E0D\u5B58\u5728\u6216\u8005\u6CA1\u6709\u6743\u9650\u8BBF\u95EE!'); - if (_this2.preChatId) { - window.location = wurl('path') + ('#/chat/' + _this2.preChatId); - } else { - window.location = wurl('path') + ('#/chat/@' + _this2.loginUser.username); - } - } - } - }), _chatService2.default.listChannels(false).then(function (channels) { - _this2.channels = channels; - nsCtx.channels = channels; - if (!_this2.isAt) { - _this2.user = null; - _this2.channel = _.find(_this2.channels, { - name: _this2.chatTo - }); - - if (_this2.channel) { - routeConfig.navModel.setTitle(_this2.channel.title + ' | \u9891\u9053 | TMS'); - - _this2.listChatChannel(true); - } else { - toastr.error('\u804A\u5929\u9891\u9053[' + _this2.chatTo + ']\u4E0D\u5B58\u5728\u6216\u8005\u6CA1\u6709\u6743\u9650\u8BBF\u95EE!'); - if (_this2.preChatId) { - window.location = wurl('path') + ('#/chat/' + _this2.preChatId); - } else { - window.location = wurl('path') + ('#/chat/@' + _this2.loginUser.username); - } - } - } - })]); - }; - - ChatDirect.prototype._reset = function _reset() { - this.progressWidth = 0; - this.chats = null; - this.first = true; - this.last = true; - }; - - ChatDirect.prototype.lastMoreHandler = function lastMoreHandler() { - var _this3 = this; - - var start = _.first(this.chats).id; - - var url = void 0; - var data = void 0; - if (this.isAt) { - url = '/admin/chat/direct/more'; - data = { - last: true, - start: start, - size: 20, - chatTo: this.chatTo - }; - } else { - url = '/admin/chat/channel/more'; - data = { - last: true, - start: start, - size: 20, - channelId: this.channel.id - }; - } - this.lastMoreP = $.get(url, data, function (data) { - if (data.success) { - _this3.chats = _.unionBy(_.reverse(data.data), _this3.chats); - _this3.last = data.msgs[0] - data.data.length <= 0; - !_this3.last && (_this3.lastCnt = data.msgs[0] - data.data.length); - _this3.scrollToAfterImgLoaded(start); - } else { - toastr.error(data.data, '获取更多消息失败!'); - } - }); - }; - - ChatDirect.prototype.firstMoreHandler = function firstMoreHandler() { - var _this4 = this; - - var start = _.last(this.chats).id; - var url = void 0; - var data = void 0; - if (this.isAt) { - url = '/admin/chat/direct/more'; - data = { - last: false, - start: start, - size: 20, - chatTo: this.chatTo - }; - } else { - url = '/admin/chat/channel/more'; - data = { - last: false, - start: start, - size: 20, - channelId: this.channel.id - }; - } - this.nextMoreP = $.get(url, data, function (data) { - if (data.success) { - _this4.chats = _.unionBy(_this4.chats, data.data); - _this4.first = data.msgs[0] - data.data.length <= 0; - !_this4.first && (_this4.firstCnt = data.msgs[0] - data.data.length); - _this4.scrollToAfterImgLoaded(start); - } else { - toastr.error(data.data, '获取更多消息失败!'); - } - }); - }; - - ChatDirect.prototype.listChatChannel = function listChatChannel(isCareMarkId) { - var _this5 = this; - - var data = { - size: 20, - channelId: this.channel.id - }; - - if (this.markId && isCareMarkId) { - data.id = this.markId; - } - - $.get('/admin/chat/channel/listBy', data, function (data) { - _this5.processChats(data); - }); - }; - - ChatDirect.prototype.listChatDirect = function listChatDirect(isCareMarkId) { - var _this6 = this; - - var data = { - size: 20, - chatTo: this.chatTo - }; - - if (this.markId && isCareMarkId) { - data.id = this.markId; - } - $.get('/admin/chat/direct/list', data, function (data) { - _this6.processChats(data); - }); - }; - - ChatDirect.prototype.processChats = function processChats(data) { - if (data.success) { - this.chats = _.reverse(data.data.content); - var lastChat = _.last(this.chats); - lastChat && (lastChat.__scroll = true); - this.last = data.data.last; - this.first = data.data.first; - !this.last && (this.lastCnt = data.data.totalElements - data.data.numberOfElements); - !this.first && (this.firstCnt = data.data.size * data.data.number); - } - }; - - ChatDirect.prototype._scrollTo = function _scrollTo(to) { - if (to == 'b') { - $(this.commentsRef).parent('.scroll-content').scrollTo('max'); - } else if (to == 't') { - $(this.commentsRef).parent('.scroll-content').scrollTo(0); - } else { - if (_.some(this.chats, { id: +to })) { - $(this.commentsRef).parent('.scroll-content').scrollTo('.comment[data-id="' + to + '"]', { - offset: this.offset - }); - $(this.commentsRef).find('.comment[data-id]').removeClass('active'); - $(this.commentsRef).find('.comment[data-id=' + to + ']').addClass('active'); - } else { - $(this.commentsRef).parent('.scroll-content').scrollTo('max'); - toastr.warning('\u6D88\u606F[' + to + ']\u4E0D\u5B58\u5728,\u53EF\u80FD\u5DF2\u7ECF\u88AB\u5220\u9664!'); - } - } - }; - - ChatDirect.prototype.scrollToAfterImgLoaded = function scrollToAfterImgLoaded(to) { - var _this7 = this; - - _.defer(function () { - new ImagesLoaded(_this7.commentsRef).always(function () { - _this7._scrollTo(to); - }); - - _this7._scrollTo(to); - }); - }; - - ChatDirect.prototype.doPoll = function doPoll() { - var _this8 = this; - - _commonPoll2.default.start(function (resetCb, stopCb) { - _this8._pollChats(resetCb, stopCb); - _this8._poll(resetCb, stopCb); - }); - }; - - ChatDirect.prototype._poll = function _poll(resetCb, stopCb) { - var _this9 = this; - - var lastChat = _.last(this.chats); - - if (this.pollOnGoing || this.isAt || !this.channel || !lastChat) { - return; - } - - this.pollOnGoing = true; - - $.get('/admin/chat/channel/poll', { - channelId: this.channel.id, - lastChatChannelId: lastChat.id, - isAt: true - }, function (data) { - if (data.success) { - - if (_this9.countAt && data.data.countAt > _this9.countAt) { - var cnt = data.data.countAt - _this9.countAt; - push.create('TMS沟通@消息通知', { - body: '\u4F60\u6709' + cnt + '\u6761\u65B0\u7684@\u6D88\u606F!', - icon: { - x16: 'img/tms-x16.ico', - x32: 'img/tms-x32.png' - }, - timeout: 5000 - }); - } - _this9.countAt = data.data.countAt; - ea.publish(nsCons.EVENT_CHAT_POLL_UPDATE, { - countAt: data.data.countAt, - countMyRecentSchedule: data.data.countMyRecentSchedule - }); - } - }).always(function () { - _this9.pollOnGoing = false; - }); - }; - - ChatDirect.prototype._pollChats = function _pollChats(resetCb, stopCb) { - var _this10 = this; - - if (this.pollChatsOngoing || !this.chats || !this.first) { - return; - } - - var lastChat = _.last(this.chats); - - var url = void 0; - var data = void 0; - - if (this.isAt) { - url = '/admin/chat/direct/latest'; - data = { - id: lastChat ? lastChat.id : 0, - chatTo: this.chatTo - }; - } else { - url = '/admin/chat/channel/latest'; - data = { - id: lastChat ? lastChat.id : 0, - channelId: this.channel.id - }; - } - - this.pollChatsOngoing = true; - - $.get(url, data, function (data) { - if (data.success) { - - if (!_this10._checkPollResultOk(data)) { - return; - } - - _this10._checkNeedNotify(data); - - _this10.chats = _.unionBy(_this10.chats, data.data, 'id'); - _this10.scrollToAfterImgLoaded('b'); - } else { - toastr.error(data.data, '轮询获取消息失败!'); - } - }).fail(function (xhr, sts) { - stopCb(); - utils.errorAutoTry(function () { - resetCb(); - }); - }).always(function () { - _this10.pollChatsOngoing = false; - }); - }; - - ChatDirect.prototype._checkNeedNotify = function _checkNeedNotify(data) { - var _this11 = this; - - if (data.data.length == 0) { - return false; - } - - var hasOwn = _.some(data.data, function (item) { - return item.creator.username == _this11.loginUser.username; - }); - - if (!hasOwn) { - push.create('TMS沟通频道消息通知', { - body: '\u9891\u9053[' + this.channel.title + ']\u6709\u65B0\u6D88\u606F\u4E86!', - icon: { - x16: 'img/tms-x16.ico', - x32: 'img/tms-x32.png' - }, - timeout: 5000 - }); - } - }; - - ChatDirect.prototype._checkPollResultOk = function _checkPollResultOk(data) { - - if (data.data.length == 0) { - return false; - } - - var chat = _.first(data.data); - return this.isAt ? _.has(chat, 'chatTo') : _.has(chat, 'channel'); - }; - - ChatDirect.prototype.bind = function bind(ctx) { - - this.doPoll(); - }; - - ChatDirect.prototype.attached = function attached() { - var _this12 = this; - - var tg = timeago(); - this.timeagoTimer = setInterval(function () { - $(_this12.chatContainerRef).find('[data-timeago]').each(function (index, el) { - $(el).text(tg.format($(el).attr('data-timeago'), 'zh_CN')); - }); - }, 5000); - - this.initHotkeys(); - this.initFocusedComment(); - - $(this.scrollbarRef).on('mouseenter', '.em-chat-content-item', function (event) { - event.preventDefault(); - var $item = $(event.currentTarget); - _this12.$hoveredItem = $item; - _this12.isShowHead = !utils.isElementInViewport($item.children('.em-user-avatar')); - var $next = $item.next('.em-chat-content-item'); - if ($next.size() === 1) { - _this12.isShowFoot = !utils.isElementInViewport($next.children('.em-user-avatar')); - } else { - _this12.isShowFoot = false; - } - }).on('mouseleave', function (event) { - event.preventDefault(); - _this12.isShowHead = false; - _this12.isShowFoot = false; - }); - - $(this.commentsRef).on('click', '.cbutton', function (event) { - event.preventDefault(); - var $btn = $(this); - $btn.addClass('cbutton--click'); - setTimeout(function () { - $btn.removeClass('cbutton--click'); - }, 500); - }); - - $(this.chatContainerRef).on('click', 'code[data-code]', function (event) { - if (event.ctrlKey) { - event.stopImmediatePropagation(); - event.preventDefault(); - _clipboardJs2.default.copy($(event.currentTarget).attr('data-code')).then(function () { - toastr.success('复制到剪贴板成功!'); - }, function (err) { - toastr.error('复制到剪贴板失败!'); - }); - } - }); - - $(this.chatContainerRef).on('click', '.pre-code-wrapper', function (event) { - if (event.ctrlKey) { - event.stopImmediatePropagation(); - event.preventDefault(); - _clipboardJs2.default.copy($(event.currentTarget).find('i[data-clipboard-text]').attr('data-clipboard-text')).then(function () { - toastr.success('复制到剪贴板成功!'); - }, function (err) { - toastr.error('复制到剪贴板失败!'); - }); - } - }); - - $('.tms-comments-container[ref="scrollbarRef"]').scroll(_.throttle(function (event) { - try { - var sHeight = $(event.currentTarget)[0].scrollHeight; - var sTop = $(event.currentTarget)[0].scrollTop; - - var scale = sTop * 1.0 / (sHeight - $(event.currentTarget).outerHeight()); - _this12.progressWidth = $(event.currentTarget).outerWidth() * scale; - } catch (err) { - _this12.progressWidth = 0; - } - }, 10)); - }; - - ChatDirect.prototype.goHeadHandler = function goHeadHandler() { - var _this13 = this; - - this.scrollTo(this.$hoveredItem, 500, function () { - _this13.isShowHead = false; - }); - }; - - ChatDirect.prototype.goFootHandler = function goFootHandler() { - var _this14 = this; - - this.scrollTo(this.$hoveredItem.next(), 500, function () { - _this14.isShowFoot = false; - }); - }; - - ChatDirect.prototype.initFocusedComment = function initFocusedComment() { - var _this15 = this; - - $(this.commentsRef).on('click', '.comment.item', function (event) { - _this15.focusedComment = $(event.currentTarget); - }).on('dblclick', '.comment.item', function (event) { - if (event.ctrlKey) { - var _ret = function () { - var chatId = $(event.currentTarget).attr('data-id'); - var $t = $(event.currentTarget).find('.content > textarea'); - var item = _.find(_this15.chats, { id: Number.parseInt(chatId) }); - - if (!item.openEdit && item.creator.username != _this15.loginUser.username) { - return { - v: void 0 - }; - } - - $.get('/admin/chat/' + (_this15.isAt ? 'direct' : 'channel') + '/get', { - id: item.id - }, function (data) { - if (data.success) { - if (item.version != data.data.version) { - _.extend(item, data.data); - } - item.isEditing = true; - item.contentOld = item.content; - _.defer(function () { - $t.focus().select(); - autosize.update($t.get(0)); - }); - } else { - toastr.error(data.data); - } - }); - }(); - - if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v; - } - }); - }; - - ChatDirect.prototype.getScrollTargetComment = function getScrollTargetComment(isPrev) { - if (isPrev) { - if (this.focusedComment && this.focusedComment.size() === 1) { - var $avatar = this.focusedComment.find('> a.em-user-avatar'); - if (utils.isElementInViewport($avatar)) { - var prev = this.focusedComment.prev('.comment.item'); - prev.size() === 1 && (this.focusedComment = prev); - } - } else { - this.focusedComment = $(this.commentsRef).children('.comment.item:first'); - } - } else { - if (this.focusedComment && this.focusedComment.size() === 1) { - var next = this.focusedComment.next('.comment.item'); - next.size() === 1 && (this.focusedComment = next); - } else { - this.focusedComment = $(this.commentsRef).children('.comment.item:last'); - } - } - return this.focusedComment; - }; - - ChatDirect.prototype.scrollTo = function scrollTo(target) { - var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - var onAfter = arguments[2]; - - this.focusedComment = target; - $(this.commentsRef).parent('.scroll-content').scrollTo(target, duration, { - offset: this.offset, - onAfter: onAfter - }); - }; - - ChatDirect.prototype.initHotkeys = function initHotkeys() { - var _this16 = this; - - $(document).bind('keydown', 'ctrl+u', function (evt) { - evt.preventDefault(); - $(_this16.emChatInputRef.btnItemUploadRef).find('.content').click(); - }).bind('keydown', 'ctrl+/', function (evt) { - evt.preventDefault(); - _this16.emChatInputRef.emHotkeysModal.show(); - }).bind('keydown', 'alt+up', function (evt) { - evt.preventDefault(); - _this16.scrollTo(_this16.getScrollTargetComment(true)); - }).bind('keydown', 'alt+down', function (evt) { - evt.preventDefault(); - _this16.scrollTo(_this16.getScrollTargetComment()); - }).bind('keydown', 't', function (event) { - event.preventDefault(); - _this16.scrollTo($(_this16.commentsRef).children('.comment.item:first')); - }).bind('keydown', 'b', function (event) { - event.preventDefault(); - _this16.scrollTo($(_this16.commentsRef).children('.comment.item:last')); - }); - }; - - ChatDirect.prototype.gotoChatItem = function gotoChatItem(item) { - - var chat = _.find(this.chats, { id: item.id }); - if (chat) { - this.scrollToAfterImgLoaded(item.id); - } else { - - var chatTo = void 0; - var chatId = void 0; - - if (item.chatTo) { - chatTo = item.chatTo.username; - chatId = '@' + chatTo; - } else if (item.channel) { - chatTo = item.channel.name; - chatId = '' + chatTo; - } - - if (this.chatTo == chatTo) { - this.activate({ - id: item.id, - username: chatId - }, this.routeConfig); - } else { - window.location = wurl('path') + ('#/chat/' + chatId + '?id=' + item.id); - } - } - }; - - ChatDirect.prototype.refreshLatestHandler = function refreshLatestHandler(event) { - event.stopImmediatePropagation(); - this.markId = null; - if (this.isAt) { - this.listChatDirect(false); - } else { - this.listChatChannel(false); - } - }; - - return ChatDirect; - }(); -}); -define('chat/chat-service',['exports'], function (exports) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - function _asyncToGenerator(fn) { - return function () { - var gen = fn.apply(this, arguments); - return new Promise(function (resolve, reject) { - function step(key, arg) { - try { - var info = gen[key](arg); - var value = info.value; - } catch (error) { - reject(error); - return; - } - - if (info.done) { - resolve(value); - } else { - return Promise.resolve(value).then(function (value) { - step("next", value); - }, function (err) { - step("throw", err); - }); - } - } - - return step("next"); - }); - }; - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var ChatService = function () { - function ChatService() { - _classCallCheck(this, ChatService); - } - - ChatService.prototype.loginUser = function () { - var _ref = _asyncToGenerator(regeneratorRuntime.mark(function _callee(useCache) { - var _this = this; - - return regeneratorRuntime.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - if (!(!useCache || !this.user)) { - _context.next = 3; - break; - } - - _context.next = 3; - return $.get('/admin/user/loginUser', function (data) { - if (data.success) { - _this.user = data.data; - } - }); - - case 3: - return _context.abrupt('return', this.user); - - case 4: - case 'end': - return _context.stop(); - } - } - }, _callee, this); - })); - - function loginUser(_x) { - return _ref.apply(this, arguments); - } - - return loginUser; - }(); - - ChatService.prototype.listUsers = function () { - var _ref2 = _asyncToGenerator(regeneratorRuntime.mark(function _callee2(useCache) { - var _this2 = this; - - return regeneratorRuntime.wrap(function _callee2$(_context2) { - while (1) { - switch (_context2.prev = _context2.next) { - case 0: - if (!(!useCache || !this.users)) { - _context2.next = 3; - break; - } - - _context2.next = 3; - return $.get('/admin/user/all', {}, function (data) { - if (data.success) { - _this2.users = data.data; - } - }); - - case 3: - return _context2.abrupt('return', this.users); - - case 4: - case 'end': - return _context2.stop(); - } - } - }, _callee2, this); - })); - - function listUsers(_x2) { - return _ref2.apply(this, arguments); - } - - return listUsers; - }(); - - ChatService.prototype.listChannels = function () { - var _ref3 = _asyncToGenerator(regeneratorRuntime.mark(function _callee3(useCache) { - var _this3 = this; - - return regeneratorRuntime.wrap(function _callee3$(_context3) { - while (1) { - switch (_context3.prev = _context3.next) { - case 0: - if (!(!useCache || !this.channels)) { - _context3.next = 3; - break; - } - - _context3.next = 3; - return $.get('/admin/channel/listMy', function (data) { - if (data.success) { - _this3.channels = data.data; - } - }); - - case 3: - return _context3.abrupt('return', this.channels); - - case 4: - case 'end': - return _context3.stop(); - } - } - }, _callee3, this); - })); - - function listChannels(_x3) { - return _ref3.apply(this, arguments); - } - - return listChannels; - }(); - - return ChatService; - }(); - - exports.default = new ChatService(); -}); -define('common/common-constant',[], function () { - 'use strict'; - - window.nsCons = { - EVENT_APP_ROUTER_NAVIGATE: 'event_app_router_navigate', - EVENT_CHAT_MSG_SENDED: 'event_chat_msg_sended', - EVENT_CHAT_MSG_EDIT_UPLOAD: 'event_chat_msg_edit_upload', - EVENT_CHAT_SIDEBAR_TOGGLE: 'event_chat_sidebar_toggle', - EVENT_CHAT_RIGHT_SIDEBAR_TOGGLE: 'event_chat_right_sidebar_toggle', - EVENT_CHAT_SEARCH_GOTO_CHAT_ITEM: 'event_chat_search_goto_chat_item', - EVENT_CHAT_CHANNEL_CREATED: 'event_chat_channel_created', - EVENT_CHAT_CHANNEL_DELETED: 'event_chat_channel_deleted', - EVENT_CHAT_CHANNEL_JOINED: 'event_chat_channel_joined', - EVENT_CHAT_CHANNEL_LEAVED: 'event_chat_channel_leaved', - EVENT_SHOW_HOTKEYS_MODAL: 'event_show_hotkeys_modal', - EVENT_CHAT_CHANNEL_MEMBER_ADD_OR_REMOVE: 'event_chat_channel_member_add_or_remove', - EVENT_CHAT_LAST_ITEM_RENDERED: 'event_chat_last_item_rendered', - EVENT_SCROLLBAR_SCROLL_TO_BOTTOM: 'event_scrollbar_scroll_to_bottom', - EVENT_CHAT_MSG_INSERT: 'event_chat_msg_insert', - EVENT_CHAT_MSG_POPUP_SHOW: 'event_chat_msg_popup_show', - EVENT_CHAT_MEMBER_POPUP_SHOW: 'event_chat_member_popup_show', - EVENT_CHAT_MSG_WIKI_DIR: 'event_chat_msg_wiki_dir', - EVENT_CHAT_CONTENT_SCROLL_TO: 'event_chat_content_scroll_to', - EVENT_CHAT_POLL_UPDATE: 'event_chat_poll_update', - EVENT_SWITCH_CHAT_TO: 'event_switch_chat_to', - EVENT_CHANNEL_ACTIONS: 'event_channel_actions', - EVENT_CHANNEL_LINKS_REFRESH: 'event_channel_links_refresh', - EVENT_SYSTEM_LINKS_REFRESH: 'event_system_links_refresh', - EVENT_SCHEDULE_REFRESH: 'event_schedule_refresh', - EVENT_MODAAL_BEFORE_OPEN: 'event_modaal_before_open', - EVENT_MODAAL_AFTER_OPEN: 'event_modaal_after_open', - EVENT_MODAAL_BEFORE_CLOSE: 'event_modaal_before_close', - EVENT_MODAAL_AFTER_CLOSE: 'event_modaal_after_close', - EVENT_BLOG_SWITCH: 'event_blog_switch', - EVENT_BLOG_ACTION: 'event_blog_action', - EVENT_BLOG_CHANGED: 'event_blog_changed', - EVENT_SPACE_CHANGED: 'event_space_changed', - EVENT_BLOG_CREATED: 'event_blog_created', - EVENT_BLOG_UPDATED: 'event_blog_updated', - EVENT_BLOG_DELETED: 'event_blog_deleted', - EVENT_BLOG_TOGGLE_SIDEBAR: 'event_blog_toggle_sidebar', - EVENT_BLOG_VIEW_CHANGED: 'event_blog_view_changed', - EVENT_BLOG_STOW_CHANGED: 'event_blog_stow_changed', - EVENT_BLOG_SAVE: 'event_blog_save', - EVENT_BLOG_HISTORY_CHANGED: 'event_blog_history_changed', - EVENT_BLOG_COMMENT_POPUP_SHOW: 'event_blog_comment_popup_show', - EVENT_BLOG_RIGHT_SIDEBAR_TOGGLE: 'event_blog_right_sidebar_toggle', - EVENT_BLOG_LEFT_SIDEBAR_TOGGLE: 'event_blog_left_sidebar_toggle', - EVENT_BLOG_CONTENT_DIMMER_TOGGLE: 'event_blog_content_dimmer_toggle', - EVENT_BLOG_COMMENT_MSG_INSERT: 'event_blog_comment_msg_insert', - EVENT_BLOG_COMMENT_ADDED: 'event_blog_comment_added', - EVENT_BLOG_COMMENT_CHANGED: 'event_blog_comment_changed', - ACTION_TYPE_SEARCH: 'action_type_search', - ACTION_TYPE_STOW: 'action_type_stow', - ACTION_TYPE_PIN: 'action_type_pin', - ACTION_TYPE_AT: 'action_type_at', - ACTION_TYPE_DIR: 'action_type_dir', - ACTION_TYPE_ATTACH: 'action_type_attach', - ACTION_TYPE_SCHEDULE: 'action_type_schedule', - NUM_TEXT_COMPLETE_MAX_COUNT: 20, - STR_EMOJI_SEARCH_URL: 'http://emoji.muan.co/', - KEY_REMEMBER_LAST_CHAT_TO: 'tms/remember_last_chat_to', - KEY_LOGIN_USERNAME: 'tms/login_username', - KEY_BLOG_COMMON_SPACE: 'tms/blog/common_space' - }; -}); -define('common/common-ctx',[], function () { - 'use strict'; - - var _window$nsCtx; - - window.nsCtx = (_window$nsCtx = { - loginUser: {}, - isSuper: false, - isAdmin: false, - users: [], - channels: [], - memberAll: { - username: 'all', - enabled: true, - mails: '', - name: '全员' - }, - isAt: true, - chatTo: null, - chatId: null }, _window$nsCtx['isSuper'] = false, _window$nsCtx['isAdmin'] = false, _window$nsCtx.blogId = null, _window$nsCtx.isModaalOpening = false, _window$nsCtx); -}); -define('common/common-diff',[], function () { - "use strict"; - - var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { - return typeof obj; - } : function (obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }; - - (function webpackUniversalModuleDefinition(root, factory) { - root["JsDiff"] = factory(); - })(window, function () { - return function (modules) { - var installedModules = {}; - - function __webpack_require__(moduleId) { - if (installedModules[moduleId]) return installedModules[moduleId].exports; - - var module = installedModules[moduleId] = { exports: {}, - id: moduleId, - loaded: false - }; - - modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - - module.loaded = true; - - return module.exports; - } - - __webpack_require__.m = modules; - - __webpack_require__.c = installedModules; - - __webpack_require__.p = ""; - - return __webpack_require__(0); - }([function (module, exports, __webpack_require__) { - 'use strict'; - - exports.__esModule = true; - - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { 'default': obj }; - } - - var _diffBase = __webpack_require__(1); - - var _diffBase2 = _interopRequireDefault(_diffBase); - - var _diffCharacter = __webpack_require__(3); - - var _diffWord = __webpack_require__(4); - - var _diffLine = __webpack_require__(5); - - var _diffSentence = __webpack_require__(6); - - var _diffCss = __webpack_require__(7); - - var _diffJson = __webpack_require__(8); - - var _patchApply = __webpack_require__(9); - - var _patchCreate = __webpack_require__(10); - - var _convertDmp = __webpack_require__(12); - - var _convertXml = __webpack_require__(13); - - exports.Diff = _diffBase2['default']; - exports.diffChars = _diffCharacter.diffChars; - exports.diffWords = _diffWord.diffWords; - exports.diffWordsWithSpace = _diffWord.diffWordsWithSpace; - exports.diffLines = _diffLine.diffLines; - exports.diffTrimmedLines = _diffLine.diffTrimmedLines; - exports.diffSentences = _diffSentence.diffSentences; - exports.diffCss = _diffCss.diffCss; - exports.diffJson = _diffJson.diffJson; - exports.structuredPatch = _patchCreate.structuredPatch; - exports.createTwoFilesPatch = _patchCreate.createTwoFilesPatch; - exports.createPatch = _patchCreate.createPatch; - exports.applyPatch = _patchApply.applyPatch; - exports.convertChangesToDMP = _convertDmp.convertChangesToDMP; - exports.convertChangesToXML = _convertXml.convertChangesToXML; - exports.canonicalize = _diffJson.canonicalize; - }, function (module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - exports['default'] = Diff; - - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { 'default': obj }; - } - - var _utilMap = __webpack_require__(2); - - var _utilMap2 = _interopRequireDefault(_utilMap); - - function Diff(ignoreWhitespace) { - this.ignoreWhitespace = ignoreWhitespace; - } - - Diff.prototype = { - diff: function diff(oldString, newString, callback) { - var self = this; - - function done(value) { - if (callback) { - setTimeout(function () { - callback(undefined, value); - }, 0); - return true; - } else { - return value; - } - } - - oldString = this.castInput(oldString); - newString = this.castInput(newString); - - if (newString === oldString) { - return done([{ value: newString }]); - } - if (!newString) { - return done([{ value: oldString, removed: true }]); - } - if (!oldString) { - return done([{ value: newString, added: true }]); - } - - newString = this.removeEmpty(this.tokenize(newString)); - oldString = this.removeEmpty(this.tokenize(oldString)); - - var newLen = newString.length, - oldLen = oldString.length; - var editLength = 1; - var maxEditLength = newLen + oldLen; - var bestPath = [{ newPos: -1, components: [] }]; - - var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0); - if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) { - return done([{ value: newString.join('') }]); - } - - function execEditLength() { - for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) { - var basePath = undefined; - var addPath = bestPath[diagonalPath - 1], - removePath = bestPath[diagonalPath + 1], - _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath; - if (addPath) { - bestPath[diagonalPath - 1] = undefined; - } - - var canAdd = addPath && addPath.newPos + 1 < newLen, - canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen; - if (!canAdd && !canRemove) { - bestPath[diagonalPath] = undefined; - continue; - } - - if (!canAdd || canRemove && addPath.newPos < removePath.newPos) { - basePath = clonePath(removePath); - self.pushComponent(basePath.components, undefined, true); - } else { - basePath = addPath; - basePath.newPos++; - self.pushComponent(basePath.components, true, undefined); - } - - _oldPos = self.extractCommon(basePath, newString, oldString, diagonalPath); - - if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) { - return done(buildValues(basePath.components, newString, oldString, self.useLongestToken)); - } else { - bestPath[diagonalPath] = basePath; - } - } - - editLength++; - } - - if (callback) { - (function exec() { - setTimeout(function () { - if (editLength > maxEditLength) { - return callback(); - } - - if (!execEditLength()) { - exec(); - } - }, 0); - })(); - } else { - while (editLength <= maxEditLength) { - var ret = execEditLength(); - if (ret) { - return ret; - } - } - } - }, - - pushComponent: function pushComponent(components, added, removed) { - var last = components[components.length - 1]; - if (last && last.added === added && last.removed === removed) { - components[components.length - 1] = { count: last.count + 1, added: added, removed: removed }; - } else { - components.push({ count: 1, added: added, removed: removed }); - } - }, - extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) { - var newLen = newString.length, - oldLen = oldString.length, - newPos = basePath.newPos, - oldPos = newPos - diagonalPath, - commonCount = 0; - while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) { - newPos++; - oldPos++; - commonCount++; - } - - if (commonCount) { - basePath.components.push({ count: commonCount }); - } - - basePath.newPos = newPos; - return oldPos; - }, - - equals: function equals(left, right) { - var reWhitespace = /\S/; - return left === right || this.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right); - }, - removeEmpty: function removeEmpty(array) { - var ret = []; - for (var i = 0; i < array.length; i++) { - if (array[i]) { - ret.push(array[i]); - } - } - return ret; - }, - castInput: function castInput(value) { - return value; - }, - tokenize: function tokenize(value) { - return value.split(''); - } - }; - - function buildValues(components, newString, oldString, useLongestToken) { - var componentPos = 0, - componentLen = components.length, - newPos = 0, - oldPos = 0; - - for (; componentPos < componentLen; componentPos++) { - var component = components[componentPos]; - if (!component.removed) { - if (!component.added && useLongestToken) { - var value = newString.slice(newPos, newPos + component.count); - value = _utilMap2['default'](value, function (value, i) { - var oldValue = oldString[oldPos + i]; - return oldValue.length > value.length ? oldValue : value; - }); - - component.value = value.join(''); - } else { - component.value = newString.slice(newPos, newPos + component.count).join(''); - } - newPos += component.count; - - if (!component.added) { - oldPos += component.count; - } - } else { - component.value = oldString.slice(oldPos, oldPos + component.count).join(''); - oldPos += component.count; - - if (componentPos && components[componentPos - 1].added) { - var tmp = components[componentPos - 1]; - components[componentPos - 1] = components[componentPos]; - components[componentPos] = tmp; - } - } - } - - return components; - } - - function clonePath(path) { - return { newPos: path.newPos, components: path.components.slice(0) }; - } - module.exports = exports['default']; - }, function (module, exports) { - "use strict"; - - exports.__esModule = true; - exports["default"] = map; - - function map(arr, mapper, that) { - if (Array.prototype.map) { - return Array.prototype.map.call(arr, mapper, that); - } - - var other = new Array(arr.length); - - for (var i = 0, n = arr.length; i < n; i++) { - other[i] = mapper.call(that, arr[i], i, arr); - } - return other; - } - module.exports = exports["default"]; - }, function (module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - exports.diffChars = diffChars; - - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { 'default': obj }; - } - - var _base = __webpack_require__(1); - - var _base2 = _interopRequireDefault(_base); - - var characterDiff = new _base2['default'](); - exports.characterDiff = characterDiff; - - function diffChars(oldStr, newStr, callback) { - return characterDiff.diff(oldStr, newStr, callback); - } - }, function (module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - exports.diffWords = diffWords; - exports.diffWordsWithSpace = diffWordsWithSpace; - - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { 'default': obj }; - } - - var _base = __webpack_require__(1); - - var _base2 = _interopRequireDefault(_base); - - var extendedWordChars = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/; - - var wordDiff = new _base2['default'](true); - exports.wordDiff = wordDiff; - var wordWithSpaceDiff = new _base2['default'](); - exports.wordWithSpaceDiff = wordWithSpaceDiff; - wordDiff.tokenize = wordWithSpaceDiff.tokenize = function (value) { - var tokens = value.split(/(\s+|\b)/); - - for (var i = 0; i < tokens.length - 1; i++) { - if (!tokens[i + 1] && tokens[i + 2] && extendedWordChars.test(tokens[i]) && extendedWordChars.test(tokens[i + 2])) { - tokens[i] += tokens[i + 2]; - tokens.splice(i + 1, 2); - i--; - } - } - - return tokens; - }; - - function diffWords(oldStr, newStr, callback) { - return wordDiff.diff(oldStr, newStr, callback); - } - - function diffWordsWithSpace(oldStr, newStr, callback) { - return wordWithSpaceDiff.diff(oldStr, newStr, callback); - } - }, function (module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - exports.diffLines = diffLines; - exports.diffTrimmedLines = diffTrimmedLines; - - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { 'default': obj }; - } - - var _base = __webpack_require__(1); - - var _base2 = _interopRequireDefault(_base); - - var lineDiff = new _base2['default'](); - exports.lineDiff = lineDiff; - var trimmedLineDiff = new _base2['default'](); - exports.trimmedLineDiff = trimmedLineDiff; - trimmedLineDiff.ignoreTrim = true; - - lineDiff.tokenize = trimmedLineDiff.tokenize = function (value) { - var retLines = [], - lines = value.split(/^/m); - for (var i = 0; i < lines.length; i++) { - var line = lines[i], - lastLine = lines[i - 1], - lastLineLastChar = lastLine && lastLine[lastLine.length - 1]; - - if (line === '\n' && lastLineLastChar === '\r') { - retLines[retLines.length - 1] = retLines[retLines.length - 1].slice(0, -1) + '\r\n'; - } else { - if (this.ignoreTrim) { - line = line.trim(); - - if (i < lines.length - 1) { - line += '\n'; - } - } - retLines.push(line); - } - } - - return retLines; - }; - - function diffLines(oldStr, newStr, callback) { - return lineDiff.diff(oldStr, newStr, callback); - } - - function diffTrimmedLines(oldStr, newStr, callback) { - return trimmedLineDiff.diff(oldStr, newStr, callback); - } - }, function (module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - exports.diffSentences = diffSentences; - - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { 'default': obj }; - } - - var _base = __webpack_require__(1); - - var _base2 = _interopRequireDefault(_base); - - var sentenceDiff = new _base2['default'](); - exports.sentenceDiff = sentenceDiff; - sentenceDiff.tokenize = function (value) { - return value.split(/(\S.+?[.!?])(?=\s+|$)/); - }; - - function diffSentences(oldStr, newStr, callback) { - return sentenceDiff.diff(oldStr, newStr, callback); - } - }, function (module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - exports.diffCss = diffCss; - - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { 'default': obj }; - } - - var _base = __webpack_require__(1); - - var _base2 = _interopRequireDefault(_base); - - var cssDiff = new _base2['default'](); - exports.cssDiff = cssDiff; - cssDiff.tokenize = function (value) { - return value.split(/([{}:;,]|\s+)/); - }; - - function diffCss(oldStr, newStr, callback) { - return cssDiff.diff(oldStr, newStr, callback); - } - }, function (module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - exports.diffJson = diffJson; - exports.canonicalize = canonicalize; - - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { 'default': obj }; - } - - var _base = __webpack_require__(1); - - var _base2 = _interopRequireDefault(_base); - - var _line = __webpack_require__(5); - - var objectPrototypeToString = Object.prototype.toString; - - var jsonDiff = new _base2['default'](); - - exports.jsonDiff = jsonDiff; - jsonDiff.useLongestToken = true; - - jsonDiff.tokenize = _line.lineDiff.tokenize; - jsonDiff.castInput = function (value) { - return typeof value === 'string' ? value : JSON.stringify(canonicalize(value), undefined, ' '); - }; - jsonDiff.equals = function (left, right) { - return _base2['default'].prototype.equals(left.replace(/,([\r\n])/g, '$1'), right.replace(/,([\r\n])/g, '$1')); - }; - - function diffJson(oldObj, newObj, callback) { - return jsonDiff.diff(oldObj, newObj, callback); - } - - function canonicalize(obj, stack, replacementStack) { - stack = stack || []; - replacementStack = replacementStack || []; - - var i = undefined; - - for (i = 0; i < stack.length; i += 1) { - if (stack[i] === obj) { - return replacementStack[i]; - } - } - - var canonicalizedObj = undefined; - - if ('[object Array]' === objectPrototypeToString.call(obj)) { - stack.push(obj); - canonicalizedObj = new Array(obj.length); - replacementStack.push(canonicalizedObj); - for (i = 0; i < obj.length; i += 1) { - canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack); - } - stack.pop(); - replacementStack.pop(); - } else if ((typeof obj === "undefined" ? "undefined" : _typeof(obj)) === 'object' && obj !== null) { - stack.push(obj); - canonicalizedObj = {}; - replacementStack.push(canonicalizedObj); - var sortedKeys = [], - key = undefined; - for (key in obj) { - if (obj.hasOwnProperty(key)) { - sortedKeys.push(key); - } - } - sortedKeys.sort(); - for (i = 0; i < sortedKeys.length; i += 1) { - key = sortedKeys[i]; - canonicalizedObj[key] = canonicalize(obj[key], stack, replacementStack); - } - stack.pop(); - replacementStack.pop(); - } else { - canonicalizedObj = obj; - } - return canonicalizedObj; - } - }, function (module, exports) { - - 'use strict'; - - exports.__esModule = true; - exports.applyPatch = applyPatch; - - function applyPatch(oldStr, uniDiff) { - var diffstr = uniDiff.split('\n'), - hunks = [], - i = 0, - remEOFNL = false, - addEOFNL = false; - - while (i < diffstr.length && !/^@@/.test(diffstr[i])) { - i++; - } - - for (; i < diffstr.length; i++) { - if (diffstr[i][0] === '@') { - var chnukHeader = diffstr[i].split(/@@ -(\d+),(\d+) \+(\d+),(\d+) @@/); - hunks.unshift({ - start: chnukHeader[3], - oldlength: +chnukHeader[2], - removed: [], - newlength: chnukHeader[4], - added: [] - }); - } else if (diffstr[i][0] === '+') { - hunks[0].added.push(diffstr[i].substr(1)); - } else if (diffstr[i][0] === '-') { - hunks[0].removed.push(diffstr[i].substr(1)); - } else if (diffstr[i][0] === ' ') { - hunks[0].added.push(diffstr[i].substr(1)); - hunks[0].removed.push(diffstr[i].substr(1)); - } else if (diffstr[i][0] === '\\') { - if (diffstr[i - 1][0] === '+') { - remEOFNL = true; - } else if (diffstr[i - 1][0] === '-') { - addEOFNL = true; - } - } - } - - var lines = oldStr.split('\n'); - for (i = hunks.length - 1; i >= 0; i--) { - var hunk = hunks[i]; - - for (var j = 0; j < hunk.oldlength; j++) { - if (lines[hunk.start - 1 + j] !== hunk.removed[j]) { - return false; - } - } - Array.prototype.splice.apply(lines, [hunk.start - 1, hunk.oldlength].concat(hunk.added)); - } - - if (remEOFNL) { - while (!lines[lines.length - 1]) { - lines.pop(); - } - } else if (addEOFNL) { - lines.push(''); - } - return lines.join('\n'); - } - }, function (module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - exports.structuredPatch = structuredPatch; - exports.createTwoFilesPatch = createTwoFilesPatch; - exports.createPatch = createPatch; - - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { 'default': obj }; - } - - var _diffPatch = __webpack_require__(11); - - var _utilMap = __webpack_require__(2); - - var _utilMap2 = _interopRequireDefault(_utilMap); - - function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { - if (!options) { - options = { context: 4 }; - } - - var diff = _diffPatch.patchDiff.diff(oldStr, newStr); - diff.push({ value: '', lines: [] }); - - function contextLines(lines) { - return _utilMap2['default'](lines, function (entry) { - return ' ' + entry; - }); - } - - var hunks = []; - var oldRangeStart = 0, - newRangeStart = 0, - curRange = [], - oldLine = 1, - newLine = 1; - - var _loop = function _loop(i) { - var current = diff[i], - lines = current.lines || current.value.replace(/\n$/, '').split('\n'); - current.lines = lines; - - if (current.added || current.removed) { - if (!oldRangeStart) { - var prev = diff[i - 1]; - oldRangeStart = oldLine; - newRangeStart = newLine; - - if (prev) { - curRange = options.context > 0 ? contextLines(prev.lines.slice(-options.context)) : []; - oldRangeStart -= curRange.length; - newRangeStart -= curRange.length; - } - } - - curRange.push.apply(curRange, _utilMap2['default'](lines, function (entry) { - return (current.added ? '+' : '-') + entry; - })); - - if (current.added) { - newLine += lines.length; - } else { - oldLine += lines.length; - } - } else { - if (oldRangeStart) { - if (lines.length <= options.context * 2 && i < diff.length - 2) { - curRange.push.apply(curRange, contextLines(lines)); - } else { - var contextSize = Math.min(lines.length, options.context); - curRange.push.apply(curRange, contextLines(lines.slice(0, contextSize))); - - var hunk = { - oldStart: oldRangeStart, - oldLines: oldLine - oldRangeStart + contextSize, - newStart: newRangeStart, - newLines: newLine - newRangeStart + contextSize, - lines: curRange - }; - if (i >= diff.length - 2 && lines.length <= options.context) { - var oldEOFNewline = /\n$/.test(oldStr); - var newEOFNewline = /\n$/.test(newStr); - if (lines.length == 0 && !oldEOFNewline) { - curRange.splice(hunk.oldLines, 0, '\\ No newline at end of file'); - } else if (!oldEOFNewline || !newEOFNewline) { - curRange.push('\\ No newline at end of file'); - } - } - hunks.push(hunk); - - oldRangeStart = 0; - newRangeStart = 0; - curRange = []; - } - } - oldLine += lines.length; - newLine += lines.length; - } - }; - - for (var i = 0; i < diff.length; i++) { - _loop(i); - } - - return { - oldFileName: oldFileName, newFileName: newFileName, - oldHeader: oldHeader, newHeader: newHeader, - hunks: hunks - }; - } - - function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) { - var diff = structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options); - - var ret = []; - if (oldFileName == newFileName) { - ret.push('Index: ' + oldFileName); - } - ret.push('==================================================================='); - ret.push('--- ' + diff.oldFileName + (typeof diff.oldHeader === 'undefined' ? '' : '\t' + diff.oldHeader)); - ret.push('+++ ' + diff.newFileName + (typeof diff.newHeader === 'undefined' ? '' : '\t' + diff.newHeader)); - - for (var i = 0; i < diff.hunks.length; i++) { - var hunk = diff.hunks[i]; - ret.push('@@ -' + hunk.oldStart + ',' + hunk.oldLines + ' +' + hunk.newStart + ',' + hunk.newLines + ' @@'); - ret.push.apply(ret, hunk.lines); - } - - return ret.join('\n') + '\n'; - } - - function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) { - return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options); - } - }, function (module, exports, __webpack_require__) { - - 'use strict'; - - exports.__esModule = true; - - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { 'default': obj }; - } - - var _base = __webpack_require__(1); - - var _base2 = _interopRequireDefault(_base); - - var patchDiff = new _base2['default'](); - exports.patchDiff = patchDiff; - patchDiff.tokenize = function (value) { - var ret = [], - linesAndNewlines = value.split(/(\n|\r\n)/); - - if (!linesAndNewlines[linesAndNewlines.length - 1]) { - linesAndNewlines.pop(); - } - - for (var i = 0; i < linesAndNewlines.length; i++) { - var line = linesAndNewlines[i]; - - if (i % 2) { - ret[ret.length - 1] += line; - } else { - ret.push(line); - } - } - return ret; - }; - }, function (module, exports) { - "use strict"; - - exports.__esModule = true; - exports.convertChangesToDMP = convertChangesToDMP; - - function convertChangesToDMP(changes) { - var ret = [], - change = undefined, - operation = undefined; - for (var i = 0; i < changes.length; i++) { - change = changes[i]; - if (change.added) { - operation = 1; - } else if (change.removed) { - operation = -1; - } else { - operation = 0; - } - - ret.push([operation, change.value]); - } - return ret; - } - }, function (module, exports) { - - 'use strict'; - - exports.__esModule = true; - exports.convertChangesToXML = convertChangesToXML; - - function convertChangesToXML(changes) { - var ret = []; - for (var i = 0; i < changes.length; i++) { - var change = changes[i]; - if (change.added) { - ret.push(''); - } else if (change.removed) { - ret.push(''); - } - - ret.push(escapeHTML(change.value)); - - if (change.added) { - ret.push(''); - } else if (change.removed) { - ret.push(''); - } - } - return ret.join(''); - } - - function escapeHTML(s) { - var n = s; - n = n.replace(/&/g, '&'); - n = n.replace(//g, '>'); - n = n.replace(/"/g, '"'); - - return n; - } - }]); - }); - ; -}); -define('common/common-emoji',['exports'], function (exports) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - var emojis = 'search,+1,-1,100,1234,8ball,a,ab,abc,abcd,accept,aerial_tramway,airplane,alarm_clock,alien,ambulance,anchor,angel,anger,angry,anguished,ant,apple,aquarius,aries,arrow_backward,arrow_double_down,arrow_double_up,arrow_down,arrow_down_small,arrow_forward,arrow_heading_down,arrow_heading_up,arrow_left,arrow_lower_left,arrow_lower_right,arrow_right,arrow_right_hook,arrow_up,arrow_up_down,arrow_up_small,arrow_upper_left,arrow_upper_right,arrows_clockwise,arrows_counterclockwise,art,articulated_lorry,astonished,atm,b,baby,baby_bottle,baby_chick,baby_symbol,back,baggage_claim,balloon,ballot_box_with_check,bamboo,banana,bangbang,bank,bar_chart,barber,baseball,basketball,bath,bathtub,battery,bear,bee,beer,beers,beetle,beginner,bell,bento,bicyclist,bike,bikini,bird,birthday,black_circle,black_joker,black_medium_small_square,black_medium_square,black_nib,black_small_square,black_square,black_square_button,blossom,blowfish,blue_book,blue_car,blue_heart,blush,boar,boat,bomb,book,bookmark,bookmark_tabs,books,boom,boot,bouquet,bow,bowling,bowtie,boy,bread,bride_with_veil,bridge_at_night,briefcase,broken_heart,bug,bulb,bullettrain_front,bullettrain_side,bus,busstop,bust_in_silhouette,busts_in_silhouette,cactus,cake,calendar,calling,camel,camera,cancer,candy,capital_abcd,capricorn,car,card_index,carousel_horse,cat,cat2,cd,chart,chart_with_downwards_trend,chart_with_upwards_trend,checkered_flag,cherries,cherry_blossom,chestnut,chicken,children_crossing,chocolate_bar,christmas_tree,church,cinema,circus_tent,city_sunrise,city_sunset,cl,clap,clapper,clipboard,clock1,clock10,clock1030,clock11,clock1130,clock12,clock1230,clock130,clock2,clock230,clock3,clock330,clock4,clock430,clock5,clock530,clock6,clock630,clock7,clock730,clock8,clock830,clock9,clock930,closed_book,closed_lock_with_key,closed_umbrella,cloud,clubs,cn,cocktail,coffee,cold_sweat,collision,computer,confetti_ball,confounded,confused,congratulations,construction,construction_worker,convenience_store,cookie,cool,cop,copyright,corn,couple,couple_with_heart,couplekiss,cow,cow2,credit_card,crescent_moon,crocodile,crossed_flags,crown,cry,crying_cat_face,crystal_ball,cupid,curly_loop,currency_exchange,curry,custard,customs,cyclone,dancer,dancers,dango,dart,dash,date,de,deciduous_tree,department_store,diamond_shape_with_a_dot_inside,diamonds,disappointed,disappointed_relieved,dizzy,dizzy_face,do_not_litter,dog,dog2,dollar,dolls,dolphin,donut,door,doughnut,dragon,dragon_face,dress,dromedary_camel,droplet,dvd,e-mail,ear,ear_of_rice,earth_africa,earth_americas,earth_asia,egg,eggplant,eight,eight_pointed_black_star,eight_spoked_asterisk,electric_plug,elephant,email,end,envelope,es,euro,european_castle,european_post_office,evergreen_tree,exclamation,expressionless,eyeglasses,eyes,facepunch,factory,fallen_leaf,family,fast_forward,fax,fearful,feelsgood,feet,ferris_wheel,file_folder,finnadie,fire,fire_engine,fireworks,first_quarter_moon,first_quarter_moon_with_face,fish,fish_cake,fishing_pole_and_fish,fist,five,flags,flashlight,floppy_disk,flower_playing_cards,flushed,foggy,football,fork_and_knife,fountain,four,four_leaf_clover,fr,free,fried_shrimp,fries,frog,frowning,fu,fuelpump,full_moon,full_moon_with_face,game_die,gb,gem,gemini,ghost,gift,gift_heart,girl,globe_with_meridians,goat,goberserk,godmode,golf,grapes,green_apple,green_book,green_heart,grey_exclamation,grey_question,grimacing,grin,grinning,guardsman,guitar,gun,haircut,hamburger,hammer,hamster,hand,handbag,hankey,hash,hatched_chick,hatching_chick,headphones,hear_no_evil,heart,heart_decoration,heart_eyes,heart_eyes_cat,heartbeat,heartpulse,hearts,heavy_check_mark,heavy_division_sign,heavy_dollar_sign,heavy_exclamation_mark,heavy_minus_sign,heavy_multiplication_x,heavy_plus_sign,helicopter,herb,hibiscus,high_brightness,high_heel,hocho,honey_pot,honeybee,horse,horse_racing,hospital,hotel,hotsprings,hourglass,hourglass_flowing_sand,house,house_with_garden,hurtrealbad,hushed,ice_cream,icecream,id,ideograph_advantage,imp,inbox_tray,incoming_envelope,information_desk_person,information_source,innocent,interrobang,iphone,it,izakaya_lantern,jack_o_lantern,japan,japanese_castle,japanese_goblin,japanese_ogre,jeans,joy,joy_cat,jp,key,keycap_ten,kimono,kiss,kissing,kissing_cat,kissing_closed_eyes,kissing_face,kissing_heart,kissing_smiling_eyes,koala,koko,kr,large_blue_circle,large_blue_diamond,large_orange_diamond,last_quarter_moon,last_quarter_moon_with_face,laughing,leaves,ledger,left_luggage,left_right_arrow,leftwards_arrow_with_hook,lemon,leo,leopard,libra,light_rail,link,lips,lipstick,lock,lock_with_ink_pen,lollipop,loop,loudspeaker,love_hotel,love_letter,low_brightness,m,mag,mag_right,mahjong,mailbox,mailbox_closed,mailbox_with_mail,mailbox_with_no_mail,man,man_with_gua_pi_mao,man_with_turban,mans_shoe,maple_leaf,mask,massage,meat_on_bone,mega,melon,memo,mens,metal,metro,microphone,microscope,milky_way,minibus,minidisc,mobile_phone_off,money_with_wings,moneybag,monkey,monkey_face,monorail,mortar_board,mount_fuji,mountain_bicyclist,mountain_cableway,mountain_railway,mouse,mouse2,movie_camera,moyai,muscle,mushroom,musical_keyboard,musical_note,musical_score,mute,nail_care,name_badge,neckbeard,necktie,negative_squared_cross_mark,neutral_face,new,new_moon,new_moon_with_face,newspaper,ng,nine,no_bell,no_bicycles,no_entry,no_entry_sign,no_good,no_mobile_phones,no_mouth,no_pedestrians,no_smoking,non-potable_water,nose,notebook,notebook_with_decorative_cover,notes,nut_and_bolt,o,o2,ocean,octocat,octopus,oden,office,ok,ok_hand,ok_woman,older_man,older_woman,on,oncoming_automobile,oncoming_bus,oncoming_police_car,oncoming_taxi,one,open_file_folder,open_hands,open_mouth,ophiuchus,orange_book,outbox_tray,ox,package,page_facing_up,page_with_curl,pager,palm_tree,panda_face,paperclip,parking,part_alternation_mark,partly_sunny,passport_control,paw_prints,peach,pear,pencil,pencil2,penguin,pensive,performing_arts,persevere,person_frowning,person_with_blond_hair,person_with_pouting_face,phone,pig,pig2,pig_nose,pill,pineapple,pisces,pizza,plus1,point_down,point_left,point_right,point_up,point_up_2,police_car,poodle,poop,post_office,postal_horn,postbox,potable_water,pouch,poultry_leg,pound,pouting_cat,pray,princess,punch,purple_heart,purse,pushpin,put_litter_in_its_place,question,rabbit,rabbit2,racehorse,radio,radio_button,rage,rage1,rage2,rage3,rage4,railway_car,rainbow,raised_hand,raised_hands,raising_hand,ram,ramen,rat,recycle,red_car,red_circle,registered,relaxed,relieved,repeat,repeat_one,restroom,revolving_hearts,rewind,ribbon,rice,rice_ball,rice_cracker,rice_scene,ring,rocket,roller_coaster,rooster,rose,rotating_light,round_pushpin,rowboat,ru,rugby_football,runner,running,running_shirt_with_sash,sa,sagittarius,sailboat,sake,sandal,santa,satellite,satisfied,saxophone,school,school_satchel,scissors,scorpius,scream,scream_cat,scroll,seat,secret,see_no_evil,seedling,seven,shaved_ice,sheep,shell,ship,shipit,shirt,shit,shoe,shower,signal_strength,six,six_pointed_star,ski,skull,sleeping,sleepy,slot_machine,small_blue_diamond,small_orange_diamond,small_red_triangle,small_red_triangle_down,smile,smile_cat,smiley,smiley_cat,smiling_imp,smirk,smirk_cat,smoking,snail,snake,snowboarder,snowflake,snowman,sob,soccer,soon,sos,sound,space_invader,spades,spaghetti,sparkle,sparkler,sparkles,sparkling_heart,speak_no_evil,speaker,speech_balloon,speedboat,squirrel,star,star2,stars,station,statue_of_liberty,steam_locomotive,stew,straight_ruler,strawberry,stuck_out_tongue,stuck_out_tongue_closed_eyes,stuck_out_tongue_winking_eye,sun_with_face,sunflower,sunglasses,sunny,sunrise,sunrise_over_mountains,surfer,sushi,suspect,suspension_railway,sweat,sweat_drops,sweat_smile,sweet_potato,swimmer,symbols,syringe,tada,tanabata_tree,tangerine,taurus,taxi,tea,telephone,telephone_receiver,telescope,tennis,tent,thought_balloon,three,thumbsdown,thumbsup,ticket,tiger,tiger2,tired_face,tm,toilet,tokyo_tower,tomato,tongue,top,tophat,tractor,traffic_light,train,train2,tram,triangular_flag_on_post,triangular_ruler,trident,triumph,trolleybus,trollface,trophy,tropical_drink,tropical_fish,truck,trumpet,tshirt,tulip,turtle,tv,twisted_rightwards_arrows,two,two_hearts,two_men_holding_hands,two_women_holding_hands,u5272,u5408,u55b6,u6307,u6708,u6709,u6e80,u7121,u7533,u7981,u7a7a,uk,umbrella,unamused,underage,unlock,up,us,v,vertical_traffic_light,vhs,vibration_mode,video_camera,video_game,violin,virgo,volcano,vs,walking,waning_crescent_moon,waning_gibbous_moon,warning,watch,water_buffalo,watermelon,wave,wavy_dash,waxing_crescent_moon,waxing_gibbous_moon,wc,weary,wedding,whale,whale2,wheelchair,white_check_mark,white_circle,white_flower,white_large_square,white_medium_small_square,white_medium_square,white_small_square,white_square_button,wind_chime,wine_glass,wink,wolf,woman,womans_clothes,womans_hat,womens,worried,wrench,x,yellow_heart,yen,yum,zap,zero,zzz'; - - exports.default = emojis.split(','); -}); -define('common/common-imgs-loaded',[], function () { - 'use strict'; - - var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { - return typeof obj; - } : function (obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }; - - ;(function (w, undefined) { - 'use strict'; - - var ILID = ('il' + Math.random()).replace(/0\./g, ''); - var EVENTS = 'load error'; - var ALLOWED_NODE_TYPES = [1, 9, 11]; - - function type(value) { - if (value == null) { - return String(value); - } - if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' || typeof value === 'function') { - return value instanceof w.NodeList && 'nodelist' || value instanceof w.HTMLCollection && 'htmlcollection' || Object.prototype.toString.call(value).match(/\s([a-z]+)/i)[1].toLowerCase(); - } - return typeof value === 'undefined' ? 'undefined' : _typeof(value); - } - - function toArray(collection) { - switch (type(collection)) { - case 'array': - return collection; - case 'undefined': - return []; - case 'nodelist': - case 'htmlcollection': - case 'arguments': - var arr = []; - for (var i = 0, l = collection.length; i < l; i++) { - if (i in collection) { - arr.push(collection[i]); - } - } - return arr; - default: - return [collection]; - } - } - - function inArray(value, array) { - if (type(array) !== 'array') { - return -1; - } - if (array.indexOf) { - return array.indexOf(value); - } - for (var i = 0, l = array.length; i < l; i++) { - if (array[i] === value) { - return i; - } - } - return -1; - } - - function proxy(context, callback) { - return function () { - return callback.apply(context, arguments); - }; - } - - function bind(element, eventName, handler) { - listener(element, eventName, handler); - } - - function unbind(element, eventName, handler) { - listener(element, eventName, handler, 1); - } - - function listener(element, eventName, handler, remove) { - var events = eventName.split(' '); - for (var i = 0, l = events.length; i < l; i++) { - if (element.addEventListener) { - element[remove ? 'removeEventListener' : 'addEventListener'](events[i], handler, false); - } else if (element.attachEvent) { - element[remove ? 'detachEvent' : 'attachEvent']('on' + events[i], handler); - } - } - } - - function Callbacks() { - var self = this; - var callbacks = {}; - var i, l; - - self.on = function (name, fn) { - callbacks[name] = callbacks[name] || []; - if (type(fn) === 'function' && inArray(fn, callbacks[name]) === -1) { - callbacks[name].push(fn); - } - }; - - self.off = function (name, fn) { - callbacks[name] = callbacks[name] || []; - if (fn === undefined) { - callbacks[name].length = 0; - } else { - var index = inArray(fn, callbacks[name]); - if (index !== -1) { - callbacks[name].splice(index, 1); - } - } - }; - - self.trigger = function (name, context) { - if (callbacks[name]) { - for (i = 0, l = callbacks[name].length; i < l; i++) { - callbacks[name][i].apply(context, Array.prototype.slice.call(arguments, 2)); - } - } - }; - } - - function ImagesLoaded(collection, options) { - options = options || {}; - for (var key in ImagesLoaded.defaults) { - if (!options.hasOwnProperty(key)) { - options[key] = ImagesLoaded.defaults[key]; - } - } - - var self = this instanceof ImagesLoaded ? this : {}; - var callbacks = new Callbacks(); - var tIndex; - - self.images = []; - self.loaded = []; - self.pending = []; - self.proper = []; - self.broken = []; - - self.isPending = true; - self.isDone = false; - self.isFailed = false; - - collection = toArray(collection); - for (var c = 0, cl = collection.length; c < cl; c++) { - if (collection[c].nodeName === 'IMG') { - self.images.push(collection[c]); - } else if (inArray(collection[c].nodeType, ALLOWED_NODE_TYPES) !== -1) { - self.images = self.images.concat(toArray(collection[c].getElementsByTagName('img'))); - } - } - - self.done = function (callback) { - if (self.isPending) { - callbacks.on('done', callback); - } else if (self.isDone && type(callback) === 'function') { - callback.call(self); - } - return self; - }; - - self.fail = function (callback) { - if (self.isPending) { - callbacks.on('fail', callback); - } else if (self.isFailed && type(callback) === 'function') { - callback.call(self); - } - return self; - }; - - self.always = function (callback) { - if (self.isPending) { - callbacks.on('always', callback); - } else if (type(callback) === 'function') { - callback.call(self); - } - return self; - }; - - self.progress = function (callback) { - if (self.isPending) { - callbacks.on('progress', callback); - } - - for (var i = 0, l = self.loaded.length; i < l; i++) { - callback.call(self, self.loaded[i], self.loaded[i][ILID].isBroken); - } - return self; - }; - - function doneLoading() { - if (!self.isPending) { - return; - } - - clearTimeout(tIndex); - - self.isPending = false; - self.isDone = self.images.length === self.proper.length; - self.isFailed = !self.isDone; - - callbacks.trigger(self.isDone ? 'done' : 'fail', self); - callbacks.trigger('always', self); - } - - function terminate() { - while (self.pending.length) { - imgLoaded(self.pending[0], 1); - } - } - - function imgLoadedHandler(event) { - event = event || w.event; - - unbind(this[ILID].tmpImg, EVENTS, imgLoadedHandler); - - this[ILID].tmpImg = null; - - if (inArray(this, self.loaded) === -1) { - imgLoaded(this, event.type !== 'load'); - } - } - - function imgLoaded(img, isBroken) { - var pendingIndex = inArray(img, self.pending); - if (pendingIndex === -1) { - return; - } else { - self.pending.splice(pendingIndex, 1); - } - - self.loaded.push(img); - - self[isBroken ? 'broken' : 'proper'].push(img); - - img[ILID].isBroken = isBroken; - img[ILID].src = img.src; - - setTimeout(function () { - callbacks.trigger('progress', self, img, isBroken); - }); - - if (self.images.length === self.loaded.length) { - setTimeout(doneLoading); - } - } - - function check() { - if (!self.images.length) { - doneLoading(); - return; - } - - var img; - for (var i = 0, il = self.images.length; i < il; i++) { - img = self.images[i]; - img[ILID] = img[ILID] || {}; - - self.pending.push(img); - - if (img[ILID].isBroken !== undefined && img[ILID].src === img.src) { - imgLoaded(img, img[ILID].isBroken); - continue; - } - - if (img.complete && img.naturalWidth !== undefined) { - imgLoaded(img, img.naturalWidth === 0); - continue; - } - - img[ILID].tmpImg = document.createElement('img'); - bind(img[ILID].tmpImg, EVENTS, proxy(img, imgLoadedHandler)); - img[ILID].tmpImg.src = img.src; - } - } - - setTimeout(check); - - setTimeout(terminate, options.timeout); - - return self; - } - - ImagesLoaded.defaults = { - timeout: 10000 }; - - w.ImagesLoaded = ImagesLoaded; - })(window); -}); -define('common/common-paste',[], function () { - "use strict"; - - (function () { - var $, Paste, createHiddenEditable, dataURLtoBlob, isFocusable; - - $ = window.jQuery; - - $.paste = function (pasteContainer) { - var pm; - if (typeof console !== "undefined" && console !== null) { - console.log("DEPRECATED: This method is deprecated. Please use $.fn.pastableNonInputable() instead."); - } - pm = Paste.mountNonInputable(pasteContainer); - return pm._container; - }; - - $.fn.pastableNonInputable = function () { - var el, j, len; - for (j = 0, len = this.length; j < len; j++) { - el = this[j]; - if (el._pastable || $(el).is('textarea, input:text, [contenteditable]')) { - continue; - } - Paste.mountNonInputable(el); - el._pastable = true; - } - return this; - }; - - $.fn.pastableTextarea = function () { - var el, j, len; - for (j = 0, len = this.length; j < len; j++) { - el = this[j]; - if (el._pastable || $(el).is(':not(textarea, input:text)')) { - continue; - } - Paste.mountTextarea(el); - el._pastable = true; - } - return this; - }; - - $.fn.pastableContenteditable = function () { - var el, j, len; - for (j = 0, len = this.length; j < len; j++) { - el = this[j]; - if (el._pastable || $(el).is(':not([contenteditable])')) { - continue; - } - Paste.mountContenteditable(el); - el._pastable = true; - } - return this; - }; - - dataURLtoBlob = function dataURLtoBlob(dataURL, sliceSize) { - var b64Data, byteArray, byteArrays, byteCharacters, byteNumbers, contentType, i, m, offset, ref, slice; - if (sliceSize == null) { - sliceSize = 512; - } - if (!(m = dataURL.match(/^data\:([^\;]+)\;base64\,(.+)$/))) { - return null; - } - ref = m, m = ref[0], contentType = ref[1], b64Data = ref[2]; - byteCharacters = atob(b64Data); - byteArrays = []; - offset = 0; - while (offset < byteCharacters.length) { - slice = byteCharacters.slice(offset, offset + sliceSize); - byteNumbers = new Array(slice.length); - i = 0; - while (i < slice.length) { - byteNumbers[i] = slice.charCodeAt(i); - i++; - } - byteArray = new Uint8Array(byteNumbers); - byteArrays.push(byteArray); - offset += sliceSize; - } - return new Blob(byteArrays, { - type: contentType - }); - }; - - createHiddenEditable = function createHiddenEditable() { - return $(document.createElement('div')).attr('contenteditable', true).attr('aria-hidden', true).attr('tabindex', -1).css({ - width: 1, - height: 1, - position: 'fixed', - left: -100, - overflow: 'hidden' - }); - }; - - isFocusable = function isFocusable(element, hasTabindex) { - var fieldset, focusableIfVisible, img, map, mapName, nodeName; - map = void 0; - mapName = void 0; - img = void 0; - focusableIfVisible = void 0; - fieldset = void 0; - nodeName = element.nodeName.toLowerCase(); - if ('area' === nodeName) { - map = element.parentNode; - mapName = map.name; - if (!element.href || !mapName || map.nodeName.toLowerCase() !== 'map') { - return false; - } - img = $('img[usemap=\'#' + mapName + '\']'); - return img.length > 0 && img.is(':visible'); - } - if (/^(input|select|textarea|button|object)$/.test(nodeName)) { - focusableIfVisible = !element.disabled; - if (focusableIfVisible) { - fieldset = $(element).closest('fieldset')[0]; - if (fieldset) { - focusableIfVisible = !fieldset.disabled; - } - } - } else if ('a' === nodeName) { - focusableIfVisible = element.href || hasTabindex; - } else { - focusableIfVisible = hasTabindex; - } - focusableIfVisible = focusableIfVisible || $(element).is('[contenteditable]'); - return focusableIfVisible && $(element).is(':visible'); - }; - - Paste = function () { - Paste.prototype._target = null; - - Paste.prototype._container = null; - - Paste.mountNonInputable = function (nonInputable) { - var paste; - paste = new Paste(createHiddenEditable().appendTo(nonInputable), nonInputable); - $(nonInputable).on('click', function (_this) { - return function (ev) { - if (!isFocusable(ev.target, false)) { - return paste._container.focus(); - } - }; - }(this)); - paste._container.on('focus', function (_this) { - return function () { - return $(nonInputable).addClass('pastable-focus'); - }; - }(this)); - return paste._container.on('blur', function (_this) { - return function () { - return $(nonInputable).removeClass('pastable-focus'); - }; - }(this)); - }; - - Paste.mountTextarea = function (textarea) { - var ctlDown, paste, ref, ref1; - if ((typeof DataTransfer !== "undefined" && DataTransfer !== null ? DataTransfer.prototype : void 0) && ((ref = Object.getOwnPropertyDescriptor) != null ? (ref1 = ref.call(Object, DataTransfer.prototype, 'items')) != null ? ref1.get : void 0 : void 0)) { - return this.mountContenteditable(textarea); - } - paste = new Paste(createHiddenEditable().insertBefore(textarea), textarea); - ctlDown = false; - $(textarea).on('keyup', function (ev) { - var ref2; - if ((ref2 = ev.keyCode) === 17 || ref2 === 224) { - ctlDown = false; - } - return null; - }); - $(textarea).on('keydown', function (ev) { - var ref2; - if ((ref2 = ev.keyCode) === 17 || ref2 === 224) { - ctlDown = true; - } - if (ev.ctrlKey != null && ev.metaKey != null) { - ctlDown = ev.ctrlKey || ev.metaKey; - } - if (ctlDown && ev.keyCode === 86) { - paste._textarea_focus_stolen = true; - paste._container.focus(); - paste._paste_event_fired = false; - setTimeout(function (_this) { - return function () { - if (!paste._paste_event_fired) { - $(textarea).focus(); - return paste._textarea_focus_stolen = false; - } - }; - }(this), 1); - } - return null; - }); - $(textarea).on('paste', function (_this) { - return function () {}; - }(this)); - $(textarea).on('focus', function (_this) { - return function () { - if (!paste._textarea_focus_stolen) { - return $(textarea).addClass('pastable-focus'); - } - }; - }(this)); - $(textarea).on('blur', function (_this) { - return function () { - if (!paste._textarea_focus_stolen) { - return $(textarea).removeClass('pastable-focus'); - } - }; - }(this)); - $(paste._target).on('_pasteCheckContainerDone', function (_this) { - return function () { - $(textarea).focus(); - return paste._textarea_focus_stolen = false; - }; - }(this)); - return $(paste._target).on('pasteText', function (_this) { - return function (ev, data) { - var content, curEnd, curStart; - curStart = $(textarea).prop('selectionStart'); - curEnd = $(textarea).prop('selectionEnd'); - content = $(textarea).val(); - $(textarea).val("" + content.slice(0, curStart) + data.text + content.slice(curEnd)); - $(textarea)[0].setSelectionRange(curStart + data.text.length, curStart + data.text.length); - return $(textarea).trigger('change'); - }; - }(this)); - }; - - Paste.mountContenteditable = function (contenteditable) { - var paste; - paste = new Paste(contenteditable, contenteditable); - $(contenteditable).on('focus', function (_this) { - return function () { - return $(contenteditable).addClass('pastable-focus'); - }; - }(this)); - return $(contenteditable).on('blur', function (_this) { - return function () { - return $(contenteditable).removeClass('pastable-focus'); - }; - }(this)); - }; - - function Paste(_container, _target) { - this._container = _container; - this._target = _target; - this._container = $(this._container); - this._target = $(this._target).addClass('pastable'); - this._container.on('paste', function (_this) { - return function (ev) { - var clipboardData, file, item, j, k, len, len1, reader, ref, ref1, ref2, ref3, text; - if (ev.currentTarget !== ev.target) { - return ev.preventDefault(); - } - _this._paste_event_fired = true; - if (((ref = ev.originalEvent) != null ? ref.clipboardData : void 0) != null) { - clipboardData = ev.originalEvent.clipboardData; - if (clipboardData.items) { - ref1 = clipboardData.items; - for (j = 0, len = ref1.length; j < len; j++) { - item = ref1[j]; - if (item.type.match(/^image\//)) { - reader = new FileReader(); - reader.onload = function (event) { - return _this._handleImage(event.target.result); - }; - reader.readAsDataURL(item.getAsFile()); - ev.preventDefault(); - break; - } - if (item.type === 'text/plain') { - item.getAsString(function (string) { - return _this._target.trigger('pasteText', { - text: string - }); - }); - } - } - } else { - if (-1 !== Array.prototype.indexOf.call(clipboardData.types, 'text/plain')) { - text = clipboardData.getData('Text'); - setTimeout(function () { - return _this._target.trigger('pasteText', { - text: text - }); - }, 1); - } - _this._checkImagesInContainer(function (src) { - return _this._handleImage(src); - }); - } - } - if (clipboardData = window.clipboardData) { - if ((ref2 = text = clipboardData.getData('Text')) != null ? ref2.length : void 0) { - setTimeout(function () { - _this._target.trigger('pasteText', { - text: text - }); - return _this._target.trigger('_pasteCheckContainerDone'); - }, 1); - } else { - ref3 = clipboardData.files; - for (k = 0, len1 = ref3.length; k < len1; k++) { - file = ref3[k]; - _this._handleImage(URL.createObjectURL(file)); - } - _this._checkImagesInContainer(function (src) {}); - } - } - return null; - }; - }(this)); - } - - Paste.prototype._handleImage = function (src) { - var loader; - if (src.match(/^webkit\-fake\-url\:\/\//)) { - return this._target.trigger('pasteImageError', { - message: "You are trying to paste an image in Safari, however we are unable to retieve its data." - }); - } - loader = new Image(); - loader.crossOrigin = "anonymous"; - loader.onload = function (_this) { - return function () { - var blob, canvas, ctx, dataURL; - canvas = document.createElement('canvas'); - canvas.width = loader.width; - canvas.height = loader.height; - ctx = canvas.getContext('2d'); - ctx.drawImage(loader, 0, 0, canvas.width, canvas.height); - dataURL = null; - try { - dataURL = canvas.toDataURL('image/png'); - blob = dataURLtoBlob(dataURL); - } catch (undefined) {} - if (dataURL) { - return _this._target.trigger('pasteImage', { - blob: blob, - dataURL: dataURL, - width: loader.width, - height: loader.height - }); - } - }; - }(this); - loader.onerror = function (_this) { - return function () { - return _this._target.trigger('pasteImageError', { - message: "Failed to get image from: " + src, - url: src - }); - }; - }(this); - return loader.src = src; - }; - - Paste.prototype._checkImagesInContainer = function (cb) { - var img, j, len, ref, timespan; - timespan = Math.floor(1000 * Math.random()); - ref = this._container.find('img'); - for (j = 0, len = ref.length; j < len; j++) { - img = ref[j]; - img["_paste_marked_" + timespan] = true; - } - return setTimeout(function (_this) { - return function () { - var k, len1, ref1; - ref1 = _this._container.find('img'); - for (k = 0, len1 = ref1.length; k < len1; k++) { - img = ref1[k]; - if (!img["_paste_marked_" + timespan]) { - cb(img.src); - $(img).remove(); - } - } - return _this._target.trigger('_pasteCheckContainerDone'); - }; - }(this), 1); - }; - - return Paste; - }(); - }).call(undefined); -}); -define('common/common-plugin',[], function () { - 'use strict'; - - (function ($) { - $.fn.extend({ - insertAtCaret: function insertAtCaret(myValue) { - var $t = $(this)[0]; - if (document.selection) { - this.focus(); - sel = document.selection.createRange(); - sel.text = myValue; - this.focus(); - } else if ($t.selectionStart || $t.selectionStart == '0') { - var startPos = $t.selectionStart; - var endPos = $t.selectionEnd; - var scrollTop = $t.scrollTop; - $t.value = $t.value.substring(0, startPos) + myValue + $t.value.substring(endPos, $t.value.length); - this.focus(); - $t.selectionStart = startPos + myValue.length; - $t.selectionEnd = startPos + myValue.length; - $t.scrollTop = scrollTop; - } else { - this.value += myValue; - this.focus(); - } - } - }); - })(jQuery); -}); -define('common/common-poll',['exports'], function (exports) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - var minInterval = 6000; - var maxInterval = 300000; - var incInterval = 6000; - - var tolerate = 10; - - var timer = null; - - var inc = 0; - - var interval = minInterval; - - var _pollCb = null; - var _errCb = null; - var _isPause = false; - - function oneHandler() { - - if (_isPause) { - return; - } - - try { - _pollCb && _pollCb(_reset, _stop); - } catch (e) { - _errCb && _errCb(_reset, _stop, e); - - console.log('轮询异常: ' + e); - } - } - - function _start() { - - _isPause = false; - - oneHandler(); - timer = setInterval(function () { - inc++; - oneHandler(); - - - if (inc > tolerate) { - - interval = minInterval + incInterval * (inc - tolerate); - - if (interval <= maxInterval) { - clearInterval(timer); - _start(); - } - } - }, interval); - } - - function _stop() { - - inc = 0; - interval = minInterval; - _isPause = false; - clearInterval(timer); - timer = null; - } - - function _reset() { - - _stop(); - _start(); - } - - function _pause() { - _isPause = true; - } - - exports.default = { - start: function start(pollCb, errCb) { - if (timer) { - _stop(); - } - _pollCb = pollCb; - _errCb = errCb; - _start(); - }, - reset: function reset() { - _reset(); - }, - stop: function stop() { - _stop(); - }, - pause: function pause() { - _pause(); - } - }; -}); -define('common/common-scrollbar',[], function () { - 'use strict'; - - ; - (function (root, factory) { - factory(root.jQuery); - })(window, function ($) { - 'use strict'; - - var debug = false; - - var browser = { - data: { - index: 0, - name: 'scrollbar' - }, - firefox: /firefox/i.test(navigator.userAgent), - macosx: /mac/i.test(navigator.platform), - msedge: /edge\/\d+/i.test(navigator.userAgent), - msie: /(msie|trident)/i.test(navigator.userAgent), - mobile: /android|webos|iphone|ipad|ipod|blackberry/i.test(navigator.userAgent), - overlay: null, - scroll: null, - scrolls: [], - webkit: /webkit/i.test(navigator.userAgent) && !/edge\/\d+/i.test(navigator.userAgent) - }; - - browser.scrolls.add = function (instance) { - this.remove(instance).push(instance); - }; - browser.scrolls.remove = function (instance) { - while ($.inArray(instance, this) >= 0) { - this.splice($.inArray(instance, this), 1); - } - return this; - }; - - var defaults = { - autoScrollSize: true, - autoUpdate: true, - debug: false, - disableBodyScroll: false, - duration: 200, - ignoreMobile: false, - ignoreOverlay: false, - isRtl: false, - scrollStep: 30, - showArrows: false, - stepScrolling: true, - - scrollx: null, - scrolly: null, - - onDestroy: null, - onFallback: null, - onInit: null, - onScroll: null, - onUpdate: null }; - - var BaseScrollbar = function BaseScrollbar(container) { - - if (!browser.scroll) { - browser.overlay = isScrollOverlaysContent(); - browser.scroll = getBrowserScrollSize(); - updateScrollbars(); - - $(window).resize(function () { - updateScrollbars(true); - }); - } - - this.container = container; - this.namespace = '.scrollbar_' + browser.data.index++; - this.options = $.extend({}, defaults, window.jQueryScrollbarOptions || {}); - this.scrollTo = null; - this.scrollx = {}; - this.scrolly = {}; - - container.data(browser.data.name, this); - browser.scrolls.add(this); - }; - - BaseScrollbar.prototype = { - destroy: function destroy() { - - if (!this.wrapper) { - return; - } - - this.container.removeData(browser.data.name); - browser.scrolls.remove(this); - - var scrollLeft = this.container.scrollLeft(); - var scrollTop = this.container.scrollTop(); - - this.container.insertBefore(this.wrapper).css({ - "height": "", - "margin": "", - "max-height": "" - }).removeClass('scroll-content scroll-scrollx_visible scroll-scrolly_visible').off(this.namespace).scrollLeft(scrollLeft).scrollTop(scrollTop); - - this.scrollx.scroll.removeClass('scroll-scrollx_visible').find('div').addBack().off(this.namespace); - this.scrolly.scroll.removeClass('scroll-scrolly_visible').find('div').addBack().off(this.namespace); - - this.wrapper.remove(); - - $(document).add('body').off(this.namespace); - - if ($.isFunction(this.options.onDestroy)) { - this.options.onDestroy.apply(this, [this.container]); - } - }, - init: function init(options) { - var S = this, - c = this.container, - cw = this.containerWrapper || c, - namespace = this.namespace, - o = $.extend(this.options, options || {}), - s = { x: this.scrollx, y: this.scrolly }, - w = this.wrapper, - cssOptions = {}; - - var initScroll = { - scrollLeft: c.scrollLeft(), - scrollTop: c.scrollTop() - }; - - if (browser.mobile && o.ignoreMobile || browser.overlay && o.ignoreOverlay || browser.macosx && !browser.webkit) { - if ($.isFunction(o.onFallback)) { - o.onFallback.apply(this, [c]); - } - return false; - } - - if (!w) { - this.wrapper = w = $('
    ').addClass('scroll-wrapper').addClass(c.attr('class')).css('position', c.css('position') === 'absolute' ? 'absolute' : 'relative').insertBefore(c).append(c); - - if (o.isRtl) { - w.addClass('scroll--rtl'); - } - - if (c.is('textarea')) { - this.containerWrapper = cw = $('
    ').insertBefore(c).append(c); - w.addClass('scroll-textarea'); - } - - cssOptions = { - "height": "auto", - "margin-bottom": browser.scroll.height * -1 + 'px', - "max-height": "" - }; - cssOptions[o.isRtl ? 'margin-left' : 'margin-right'] = browser.scroll.width * -1 + 'px'; - - cw.addClass('scroll-content').css(cssOptions); - - c.on('scroll' + namespace, function (event) { - var scrollLeft = c.scrollLeft(); - var scrollTop = c.scrollTop(); - if (o.isRtl) { - switch (true) { - case browser.firefox: - scrollLeft = Math.abs(scrollLeft); - case browser.msedge || browser.msie: - scrollLeft = c[0].scrollWidth - c[0].clientWidth - scrollLeft; - break; - } - } - if ($.isFunction(o.onScroll)) { - o.onScroll.call(S, { - maxScroll: s.y.maxScrollOffset, - scroll: scrollTop, - size: s.y.size, - visible: s.y.visible - }, { - maxScroll: s.x.maxScrollOffset, - scroll: scrollLeft, - size: s.x.size, - visible: s.x.visible - }); - } - s.x.isVisible && s.x.scroll.bar.css('left', scrollLeft * s.x.kx + 'px'); - s.y.isVisible && s.y.scroll.bar.css('top', scrollTop * s.y.kx + 'px'); - }); - - w.on('scroll' + namespace, function () { - w.scrollTop(0).scrollLeft(0); - }); - - if (o.disableBodyScroll) { - var handleMouseScroll = function handleMouseScroll(event) { - isVerticalScroll(event) ? s.y.isVisible && s.y.mousewheel(event) : s.x.isVisible && s.x.mousewheel(event); - }; - w.on('MozMousePixelScroll' + namespace, handleMouseScroll); - w.on('mousewheel' + namespace, handleMouseScroll); - - if (browser.mobile) { - w.on('touchstart' + namespace, function (event) { - var touch = event.originalEvent.touches && event.originalEvent.touches[0] || event; - var originalTouch = { - pageX: touch.pageX, - pageY: touch.pageY - }; - var originalScroll = { - left: c.scrollLeft(), - top: c.scrollTop() - }; - $(document).on('touchmove' + namespace, function (event) { - var touch = event.originalEvent.targetTouches && event.originalEvent.targetTouches[0] || event; - c.scrollLeft(originalScroll.left + originalTouch.pageX - touch.pageX); - c.scrollTop(originalScroll.top + originalTouch.pageY - touch.pageY); - event.preventDefault(); - }); - $(document).on('touchend' + namespace, function () { - $(document).off(namespace); - }); - }); - } - } - if ($.isFunction(o.onInit)) { - o.onInit.apply(this, [c]); - } - } else { - cssOptions = { - "height": "auto", - "margin-bottom": browser.scroll.height * -1 + 'px', - "max-height": "" - }; - cssOptions[o.isRtl ? 'margin-left' : 'margin-right'] = browser.scroll.width * -1 + 'px'; - cw.css(cssOptions); - } - - $.each(s, function (d, scrollx) { - - var scrollCallback = null; - var scrollForward = 1; - var scrollOffset = d === 'x' ? 'scrollLeft' : 'scrollTop'; - var scrollStep = o.scrollStep; - var scrollTo = function scrollTo() { - var currentOffset = c[scrollOffset](); - c[scrollOffset](currentOffset + scrollStep); - if (scrollForward == 1 && currentOffset + scrollStep >= scrollToValue) currentOffset = c[scrollOffset](); - if (scrollForward == -1 && currentOffset + scrollStep <= scrollToValue) currentOffset = c[scrollOffset](); - if (c[scrollOffset]() == currentOffset && scrollCallback) { - scrollCallback(); - } - }; - var scrollToValue = 0; - - if (!scrollx.scroll) { - - scrollx.scroll = S._getScroll(o['scroll' + d]).addClass('scroll-' + d); - - if (o.showArrows) { - scrollx.scroll.addClass('scroll-element_arrows_visible'); - } - - scrollx.mousewheel = function (event) { - - if (!scrollx.isVisible || d === 'x' && isVerticalScroll(event)) { - return true; - } - if (d === 'y' && !isVerticalScroll(event)) { - s.x.mousewheel(event); - return true; - } - - var delta = event.originalEvent.wheelDelta * -1 || event.originalEvent.detail; - var maxScrollValue = scrollx.size - scrollx.visible - scrollx.offset; - - if (!delta) { - if (d === 'x' && !!event.originalEvent.deltaX) { - delta = event.originalEvent.deltaX * 40; - } else if (d === 'y' && !!event.originalEvent.deltaY) { - delta = event.originalEvent.deltaY * 40; - } - } - - if (delta > 0 && scrollToValue < maxScrollValue || delta < 0 && scrollToValue > 0) { - scrollToValue = scrollToValue + delta; - if (scrollToValue < 0) scrollToValue = 0; - if (scrollToValue > maxScrollValue) scrollToValue = maxScrollValue; - - S.scrollTo = S.scrollTo || {}; - S.scrollTo[scrollOffset] = scrollToValue; - setTimeout(function () { - if (S.scrollTo) { - c.stop().animate(S.scrollTo, 240, 'linear', function () { - scrollToValue = c[scrollOffset](); - }); - S.scrollTo = null; - } - }, 1); - } - - event.preventDefault(); - return false; - }; - - scrollx.scroll.on('MozMousePixelScroll' + namespace, scrollx.mousewheel).on('mousewheel' + namespace, scrollx.mousewheel).on('mouseenter' + namespace, function () { - scrollToValue = c[scrollOffset](); - }); - - scrollx.scroll.find('.scroll-arrow, .scroll-element_track').on('mousedown' + namespace, function (event) { - - if (event.which != 1) return true; - - scrollForward = 1; - - var data = { - eventOffset: event[d === 'x' ? 'pageX' : 'pageY'], - maxScrollValue: scrollx.size - scrollx.visible - scrollx.offset, - scrollbarOffset: scrollx.scroll.bar.offset()[d === 'x' ? 'left' : 'top'], - scrollbarSize: scrollx.scroll.bar[d === 'x' ? 'outerWidth' : 'outerHeight']() - }; - var timeout = 0, - timer = 0; - - if ($(this).hasClass('scroll-arrow')) { - scrollForward = $(this).hasClass("scroll-arrow_more") ? 1 : -1; - scrollStep = o.scrollStep * scrollForward; - scrollToValue = scrollForward > 0 ? data.maxScrollValue : 0; - if (o.isRtl) { - switch (true) { - case browser.firefox: - scrollToValue = scrollForward > 0 ? 0 : data.maxScrollValue * -1; - break; - case browser.msie || browser.msedge: - break; - } - } - } else { - scrollForward = data.eventOffset > data.scrollbarOffset + data.scrollbarSize ? 1 : data.eventOffset < data.scrollbarOffset ? -1 : 0; - if (d === 'x' && o.isRtl && (browser.msie || browser.msedge)) scrollForward = scrollForward * -1; - scrollStep = Math.round(scrollx.visible * 0.75) * scrollForward; - scrollToValue = data.eventOffset - data.scrollbarOffset - (o.stepScrolling ? scrollForward == 1 ? data.scrollbarSize : 0 : Math.round(data.scrollbarSize / 2)); - scrollToValue = c[scrollOffset]() + scrollToValue / scrollx.kx; - } - - S.scrollTo = S.scrollTo || {}; - S.scrollTo[scrollOffset] = o.stepScrolling ? c[scrollOffset]() + scrollStep : scrollToValue; - - if (o.stepScrolling) { - scrollCallback = function scrollCallback() { - scrollToValue = c[scrollOffset](); - clearInterval(timer); - clearTimeout(timeout); - timeout = 0; - timer = 0; - }; - timeout = setTimeout(function () { - timer = setInterval(scrollTo, 40); - }, o.duration + 100); - } - - setTimeout(function () { - if (S.scrollTo) { - c.animate(S.scrollTo, o.duration); - S.scrollTo = null; - } - }, 1); - - return S._handleMouseDown(scrollCallback, event); - }); - - scrollx.scroll.bar.on('mousedown' + namespace, function (event) { - - if (event.which != 1) return true; - - var eventPosition = event[d === 'x' ? 'pageX' : 'pageY']; - var initOffset = c[scrollOffset](); - - scrollx.scroll.addClass('scroll-draggable'); - - $(document).on('mousemove' + namespace, function (event) { - var diff = parseInt((event[d === 'x' ? 'pageX' : 'pageY'] - eventPosition) / scrollx.kx, 10); - if (d === 'x' && o.isRtl && (browser.msie || browser.msedge)) diff = diff * -1; - c[scrollOffset](initOffset + diff); - }); - - return S._handleMouseDown(function () { - scrollx.scroll.removeClass('scroll-draggable'); - scrollToValue = c[scrollOffset](); - }, event); - }); - } - }); - - $.each(s, function (d, scrollx) { - var scrollClass = 'scroll-scroll' + d + '_visible'; - var scrolly = d == "x" ? s.y : s.x; - - scrollx.scroll.removeClass(scrollClass); - scrolly.scroll.removeClass(scrollClass); - cw.removeClass(scrollClass); - }); - - $.each(s, function (d, scrollx) { - $.extend(scrollx, d == "x" ? { - offset: parseInt(c.css('left'), 10) || 0, - size: c.prop('scrollWidth'), - visible: w.width() - } : { - offset: parseInt(c.css('top'), 10) || 0, - size: c.prop('scrollHeight'), - visible: w.height() - }); - }); - - this._updateScroll('x', this.scrollx); - this._updateScroll('y', this.scrolly); - - if ($.isFunction(o.onUpdate)) { - o.onUpdate.apply(this, [c]); - } - - $.each(s, function (d, scrollx) { - - var cssOffset = d === 'x' ? 'left' : 'top'; - var cssFullSize = d === 'x' ? 'outerWidth' : 'outerHeight'; - var cssSize = d === 'x' ? 'width' : 'height'; - var offset = parseInt(c.css(cssOffset), 10) || 0; - - var AreaSize = scrollx.size; - var AreaVisible = scrollx.visible + offset; - - var scrollSize = scrollx.scroll.size[cssFullSize]() + (parseInt(scrollx.scroll.size.css(cssOffset), 10) || 0); - - if (o.autoScrollSize) { - scrollx.scrollbarSize = parseInt(scrollSize * AreaVisible / AreaSize, 10); - scrollx.scroll.bar.css(cssSize, scrollx.scrollbarSize + 'px'); - } - - scrollx.scrollbarSize = scrollx.scroll.bar[cssFullSize](); - scrollx.kx = (scrollSize - scrollx.scrollbarSize) / (AreaSize - AreaVisible) || 1; - scrollx.maxScrollOffset = AreaSize - AreaVisible; - }); - - c.scrollLeft(initScroll.scrollLeft).scrollTop(initScroll.scrollTop).trigger('scroll'); - }, - - _getScroll: function _getScroll(scroll) { - var types = { - advanced: ['
    ', '
    ', '
    ', '
    ', '
    ', '
    ', '
    ', '
    ', '
    ', '
    ', '
    ', '
    ', '
    ', '
    ', '
    ', '
    ', '
    ', '
    ', '
    ', '
    '].join(''), - simple: ['
    ', '
    ', '
    ', '
    ', '
    ', '
    ', '
    '].join('') - }; - if (types[scroll]) { - scroll = types[scroll]; - } - if (!scroll) { - scroll = types['simple']; - } - if (typeof scroll == 'string') { - scroll = $(scroll).appendTo(this.wrapper); - } else { - scroll = $(scroll); - } - $.extend(scroll, { - bar: scroll.find('.scroll-bar'), - size: scroll.find('.scroll-element_size'), - track: scroll.find('.scroll-element_track') - }); - return scroll; - }, - _handleMouseDown: function _handleMouseDown(callback, event) { - - var namespace = this.namespace; - - $(document).on('blur' + namespace, function () { - $(document).add('body').off(namespace); - callback && callback(); - }); - $(document).on('dragstart' + namespace, function (event) { - event.preventDefault(); - return false; - }); - $(document).on('mouseup' + namespace, function () { - $(document).add('body').off(namespace); - callback && callback(); - }); - $('body').on('selectstart' + namespace, function (event) { - event.preventDefault(); - return false; - }); - - event && event.preventDefault(); - return false; - }, - _updateScroll: function _updateScroll(d, scrollx) { - - var container = this.container, - containerWrapper = this.containerWrapper || container, - scrollClass = 'scroll-scroll' + d + '_visible', - scrolly = d === 'x' ? this.scrolly : this.scrollx, - offset = parseInt(this.container.css(d === 'x' ? 'left' : 'top'), 10) || 0, - wrapper = this.wrapper; - - var AreaSize = scrollx.size; - var AreaVisible = scrollx.visible + offset; - - scrollx.isVisible = AreaSize - AreaVisible > 1; - if (scrollx.isVisible) { - scrollx.scroll.addClass(scrollClass); - scrolly.scroll.addClass(scrollClass); - containerWrapper.addClass(scrollClass); - } else { - scrollx.scroll.removeClass(scrollClass); - scrolly.scroll.removeClass(scrollClass); - containerWrapper.removeClass(scrollClass); - } - - if (d === 'y') { - if (container.is('textarea') || AreaSize < AreaVisible) { - containerWrapper.css({ - "height": AreaVisible + browser.scroll.height + 'px', - "max-height": "none" - }); - } else { - containerWrapper.css({ - "max-height": AreaVisible + browser.scroll.height + 'px' - }); - } - } - - if (scrollx.size != container.prop('scrollWidth') || scrolly.size != container.prop('scrollHeight') || scrollx.visible != wrapper.width() || scrolly.visible != wrapper.height() || scrollx.offset != (parseInt(container.css('left'), 10) || 0) || scrolly.offset != (parseInt(container.css('top'), 10) || 0)) { - $.extend(this.scrollx, { - offset: parseInt(container.css('left'), 10) || 0, - size: container.prop('scrollWidth'), - visible: wrapper.width() - }); - $.extend(this.scrolly, { - offset: parseInt(container.css('top'), 10) || 0, - size: this.container.prop('scrollHeight'), - visible: wrapper.height() - }); - this._updateScroll(d === 'x' ? 'y' : 'x', scrolly); - } - } - }; - - var CustomScrollbar = BaseScrollbar; - - $.fn.scrollbar = function (command, args) { - if (typeof command !== 'string') { - args = command; - command = 'init'; - } - if (typeof args === 'undefined') { - args = []; - } - if (!$.isArray(args)) { - args = [args]; - } - this.not('body, .scroll-wrapper').each(function () { - var element = $(this), - instance = element.data(browser.data.name); - if (instance || command === 'init') { - if (!instance) { - instance = new CustomScrollbar(element); - } - if (instance[command]) { - instance[command].apply(instance, args); - } - } - }); - return this; - }; - - $.fn.scrollbar.options = defaults; - - var updateScrollbars = function () { - var timer = 0, - timerCounter = 0; - - return function (force) { - var i, container, options, scroll, wrapper, scrollx, scrolly; - for (i = 0; i < browser.scrolls.length; i++) { - scroll = browser.scrolls[i]; - container = scroll.container; - options = scroll.options; - wrapper = scroll.wrapper; - scrollx = scroll.scrollx; - scrolly = scroll.scrolly; - if (force || options.autoUpdate && wrapper && wrapper.is(':visible') && (container.prop('scrollWidth') != scrollx.size || container.prop('scrollHeight') != scrolly.size || wrapper.width() != scrollx.visible || wrapper.height() != scrolly.visible)) { - scroll.init(); - - if (options.debug) { - window.console && console.log({ - scrollHeight: container.prop('scrollHeight') + ':' + scroll.scrolly.size, - scrollWidth: container.prop('scrollWidth') + ':' + scroll.scrollx.size, - visibleHeight: wrapper.height() + ':' + scroll.scrolly.visible, - visibleWidth: wrapper.width() + ':' + scroll.scrollx.visible - }, true); - timerCounter++; - } - } - } - if (debug && timerCounter > 10) { - window.console && console.log('Scroll updates exceed 10'); - updateScrollbars = function updateScrollbars() {}; - } else { - clearTimeout(timer); - timer = setTimeout(updateScrollbars, 300); - } - }; - }(); - - function getBrowserScrollSize(actualSize) { - - if (browser.webkit && !actualSize) { - return { - height: 0, - width: 0 - }; - } - - if (!browser.data.outer) { - var css = { - "border": "none", - "box-sizing": "content-box", - "height": "200px", - "margin": "0", - "padding": "0", - "width": "200px" - }; - browser.data.inner = $("
    ").css($.extend({}, css)); - browser.data.outer = $("
    ").css($.extend({ - "left": "-1000px", - "overflow": "scroll", - "position": "absolute", - "top": "-1000px" - }, css)).append(browser.data.inner).appendTo("body"); - } - - browser.data.outer.scrollLeft(1000).scrollTop(1000); - - return { - height: Math.ceil(browser.data.outer.offset().top - browser.data.inner.offset().top || 0), - width: Math.ceil(browser.data.outer.offset().left - browser.data.inner.offset().left || 0) - }; - } - - function isScrollOverlaysContent() { - var scrollSize = getBrowserScrollSize(true); - return !(scrollSize.height || scrollSize.width); - } - - function isVerticalScroll(event) { - var e = event.originalEvent; - if (e.axis && e.axis === e.HORIZONTAL_AXIS) return false; - if (e.wheelDeltaX) return false; - return true; - } - }); -}); -define('common/common-tips',['exports'], function (exports) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.default = { - - '/h1': { - key: 'ctrl+h', - label: '/h1 [标题1] (ctrl+h)', - value: '# ' - }, - '/h2': { - label: '/h2 [标题2]', - value: '## ' - }, - '/h3': { - label: '/h3 [标题3]', - value: '### ' - }, - '/h4': { - label: '/h4 [标题4]', - value: '#### ' - }, - '/h5': { - label: '/h5 [标题5]', - value: '##### ' - }, - '/h6': { - key: 'ctrl+shift+h', - label: '/h6 [标题6] (ctrl+shift+h)', - value: '###### ' - }, - '/b': { - key: 'ctrl+b', - label: '/b [粗体] (ctrl+b)', - value: '****', - ch: 2 - }, - '/i': { - key: 'ctrl+i', - label: '/i [斜体] (ctrl+i)', - value: '**', - ch: 1 - }, - '/s': { - label: '/s [删除线]', - value: '~~~~', - ch: 2 - }, - '/code': { - key: 'alt+ctrl+c', - label: '/code [代码] (alt+ctrl+c)', - value: '```\n\n```\n', - line: 2, - ch2: 5 - }, - '/quote': { - key: 'ctrl+\'', - label: '/quote [引用] (ctrl+\')', - value: '> ' - }, - '/list': { - key: 'ctrl+l', - label: '/list [列表] (ctrl+l)', - value: '* ' - }, - '/href': { - key: 'ctrl+k', - label: '/href [链接] (ctrl+k)', - value: '[](http://)', - ch: 1 - }, - '/img': { - key: 'alt+ctrl+i', - label: '/img [图片] (ctrl+alt+i)', - value: '![](http://)', - ch: 1 - }, - '/table': { - label: '/table [表格]', - value: '| 列1 | 列2 | 列3 |\n| ------ | ------ | ------ |\n| 文本 | 文本 | 文本 |\n' - }, - '/hr': { - label: '/hr [分隔线]', - value: '\n-----\n' - }, - '/task': { - label: '/task [任务列表]', - value: '- [ ] 未完成任务\n- [x] 已完成任务', - line: 1, - ch: 11, - ch2: 12 - }, - '/details': { - label: '/details [折叠详情]', - value: '
    \n标题详情内容\n
    ', - line: 1, - ch: 11, - ch2: 25 - }, - '/upload': { - label: '/upload [上传文件] (ctrl+u)', - value: '' - }, - '/shortcuts': { - label: '/shortcuts [热键] (ctrl+/)', - value: '' - } - }; -}); -define('common/common-utils',['exports', 'wurl', 'common/common-diff'], function (exports, _wurl) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.CommonUtils = undefined; - - var _wurl2 = _interopRequireDefault(_wurl); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { - default: obj - }; - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var CommonUtils = exports.CommonUtils = function () { - function CommonUtils() { - _classCallCheck(this, CommonUtils); - - this.regExpOS = { - ios: /(iPad|iPhone|iPod)/g, - mobileChrome: /(CriOS)/g, - mobile: /Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/g, - cellphone: /iP(hone|od)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/g - }; - } - - CommonUtils.prototype.getBaseUrl = function getBaseUrl() { - if (typeof _wurl2.default == 'function') { - if ((0, _wurl2.default)('port') == 80 || (0, _wurl2.default)('port') == 443) { - return (0, _wurl2.default)('protocol') + '://' + (0, _wurl2.default)('hostname'); - } else { - return (0, _wurl2.default)('protocol') + '://' + (0, _wurl2.default)('hostname') + ':' + (0, _wurl2.default)('port'); - } - } - return ''; - }; - - CommonUtils.prototype.getUrl = function getUrl() { - return this.getBaseUrl() + (0, _wurl2.default)('path') + '#' + this.getHash(); - }; - - CommonUtils.prototype.getHash = function getHash() { - var hash = (0, _wurl2.default)('hash'); - return hash ? hash.split('?')[0] : ''; - }; - - CommonUtils.prototype.getBasePath = function getBasePath() { - return this.getBaseUrl() + (0, _wurl2.default)('path'); - }; - - CommonUtils.prototype.getResourceBase = function getResourceBase() { - var basePath = this.getBasePath(); - if (_.endsWith(basePath, '/index.html')) { - basePath = _.replace(basePath, '/index.html', ''); - } - return basePath; - }; - - CommonUtils.prototype.redirect2Login = function redirect2Login(redirectUrl) { - var redirect = this.urlQuery('redirect'); - if (!redirect) { - redirectUrl = redirectUrl ? redirectUrl : (0, _wurl2.default)(); - window.location = this.getBaseUrl() + (0, _wurl2.default)('path') + ('#/login?redirect=' + encodeURIComponent(redirectUrl)); - } else { - console.log('url has contains ?redirect'); - } - }; - - CommonUtils.prototype.urlQuery = function urlQuery(name, url) { - if (url) { - var query = (0, _wurl2.default)('?' + name, url); - if (!query) { - query = (0, _wurl2.default)('?' + name, (0, _wurl2.default)('hash', url)); - } - return query; - } - return (0, _wurl2.default)('?' + name) || (0, _wurl2.default)('?' + name, (0, _wurl2.default)('hash')); - }; - - CommonUtils.prototype.removeUrlQuery = function removeUrlQuery(name, href) { - - var s = href ? href : window.location.href; - - var rs = new RegExp('(&|\\?)?' + name + '=?[^&#]*(.)?', 'g').exec(s); - - - if (rs) { - if (rs[1] == '&') { - return s.replace(new RegExp('&' + name + '=?[^&#]+', 'g'), ''); - } else if (rs[1] == '?') { - if (rs[2] != '&') { - return s.replace(new RegExp('\\?' + name + '=?[^&#]*', 'g'), ''); - } else { - return s.replace(new RegExp('' + name + '=?[^&#]*&', 'g'), ''); - } - } - } - - return s; - }; - - CommonUtils.prototype.isLoginPage = function isLoginPage() { - var hash = (0, _wurl2.default)('hash'); - return _.startsWith(hash, '/login'); - }; - - CommonUtils.prototype.errorAutoTry = function errorAutoTry(callback, time) { - var _this = this; - - if (this.isRunning || this.isLoginPage()) { - return; - } - - var cnt = time ? time : 10; - var timer = null; - var $t = toastr.error('\u7F51\u7EDC\u8FDE\u63A5\u9519\u8BEF,' + cnt + '\u79D2\u540E\u81EA\u52A8\u91CD\u8BD5!', null, { - "closeButton": false, - "timeOut": "0", - "preventDuplicates": false, - "onclick": function onclick() { - clearInterval(_this.timer); - callback && callback(); - } - }); - - this.isRunning = true; - timer = setInterval(function () { - if (cnt === 0) { - clearInterval(timer); - _this.isRunning = false; - toastr.remove(); - callback && callback(); - return; - } - $t && $t.find('.toast-message').text('\u7F51\u7EDC\u8FDE\u63A5\u9519\u8BEF,' + cnt + '\u79D2\u540E\u81EA\u52A8\u91CD\u8BD5!'); - cnt--; - }, 1000); - }; - - CommonUtils.prototype.isElementInViewport = function isElementInViewport(el) { - if (typeof jQuery === "function" && el instanceof jQuery) { - el = el[0]; - } - - var rect = el.getBoundingClientRect(); - - return rect.top >= 0 && rect.left >= 0 && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && rect.right <= (window.innerWidth || document.documentElement.clientWidth); - }; - - CommonUtils.prototype.getChatName = function getChatName(name) { - if (_.startsWith(name, '@')) { - return name.substr(1); - } else { - return name; - } - }; - - CommonUtils.prototype.preParse = function preParse(plainText) { - - var txt = plainText; - $.each(this.parseUsers(plainText), function (index, user) { - txt = txt.replace(new RegExp('{~' + user.username + '}', 'g'), '**`@' + user.name + '`**'); - }); - - return txt; - }; - - CommonUtils.prototype.parseUsers = function parseUsers(plainText) { - var users = []; - var atR = /\{~([^\}]*)\}/g; - var rs = atR.exec(plainText); - while (rs) { - var user = _.find([nsCtx.memberAll].concat(window.tmsUsers ? tmsUsers : []), { username: rs[1] }); - var isNotExists = !_.some(users, { username: rs[1] }); - if (user && isNotExists) { - users.push(user); - } - rs = atR.exec(plainText); - } - - return users; - }; - - CommonUtils.prototype.getUser = function getUser(username) { - return _.find(tmsUsers, { username: username }); - }; - - CommonUtils.prototype.parseUsernames = function parseUsernames(plainText, members) { - var users = this.parseUsers(plainText); - var isExitsAll = _.some(users, { username: 'all' }); - if (isExitsAll) { - return _.without(_.map(members, 'username'), 'all'); - } - return _.map(users, 'username');; - }; - - CommonUtils.prototype.md2html = function md2html(content) { - if (emojify) { - content = emojify.replace(content); - } - return $('
    ').html('' + marked(this.preParse(content))).wrap('
    ').parent().html(); - }; - - CommonUtils.prototype.diffS = function diffS(oldS, newS, way) { - var ways = ['diffChars', 'diffWords', 'diffWordsWithSpace', 'diffLines']; - if (!ways.includes(way)) { - way = 'diffWords'; - } - var delStyle = 'style="background-color: #e6cf56; text-decoration: line-through;"'; - var insStyle = 'style="background-color: #98e287; text-decoration: none;"'; - var diff = JsDiff[way](oldS, newS); - var nodeArr = []; - for (var i = 0; i < diff.length; i++) { - - if (diff[i].added && diff[i + 1] && diff[i + 1].removed) { - var swap = diff[i]; - diff[i] = diff[i + 1]; - diff[i + 1] = swap; - } - - var node; - if (diff[i].removed) { - node = '' + diff[i].value + ''; - } else if (diff[i].added) { - node = '' + diff[i].value + ''; - } else { - node = '' + diff[i].value; - } - nodeArr.push(node); - } - - return '
    ' + nodeArr.join('') + '
    '; - }; - - CommonUtils.prototype.catalog = function catalog($e) { - var $headers = $(":header", $e); - - if ($headers && $headers.size() == 0) { - return false; - } - - var pre = null; - - var link = { - pre: null, - arr: [] - }; - var current = link; - $headers.each(function (index, h) { - var name = h.nodeName; - if (!pre) { - current.arr.push(h); - pre = name; - } else { - if (pre < name) { - var last = current; - current = { - pre: last, - arr: [h] - }; - last.arr.push(current); - pre = name; - } else if (pre == name) { - current.arr.push(h); - } else { - current = current.pre ? current.pre : current; - current.arr.push(h); - pre = name; - } - } - }); - - return link; - }; - - CommonUtils.prototype.generateDir = function generateDir(link, uid) { - var $list = $('
    '); - this.prodDir($list, link, uid); - return $list; - }; - - CommonUtils.prototype.dir = function dir($e, uid) { - var cl = this.catalog($e); - return cl ? this.generateDir(cl, uid) : ''; - }; - - CommonUtils.prototype.prodDir = function prodDir($list, link, uid) { - var _this2 = this; - - $.each(link.arr, function (index, item) { - if (item.hasOwnProperty('arr')) { - var $l = $('
    '); - $list.append($l); - _this2.prodDir($l, item, uid); - } else { - var id = uid ? _.uniqueId(uid) : _.uniqueId('tms-wiki-dir-item-'); - var $item = $('').text($(item).attr('id', id).text()).attr('data-id', id); - $list.append($item); - } - }); - }; - - CommonUtils.prototype.isElementInViewport = function isElementInViewport(el) { - if (typeof jQuery === "function" && el instanceof jQuery) { - el = el[0]; - } - - var rect = el.getBoundingClientRect(); - - return rect.top >= 0 && rect.left >= 0 && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && rect.right <= (window.innerWidth || document.documentElement.clientWidth); - }; - - CommonUtils.prototype.getCursortPosition = function getCursortPosition(ctrl) { - var CaretPos = 0; - if (document.selection) { - ctrl.focus(); - var Sel = document.selection.createRange(); - Sel.moveStart('character', -ctrl.value.length); - CaretPos = Sel.text.length; - } else if (ctrl.selectionStart || ctrl.selectionStart == '0') { - CaretPos = ctrl.selectionStart; - } - return CaretPos; - }; - - CommonUtils.prototype.setCaretPosition = function setCaretPosition(ctrl, pos) { - if (ctrl.setSelectionRange) { - ctrl.focus(); - ctrl.setSelectionRange(pos, pos); - } else if (ctrl.createTextRange) { - var range = ctrl.createTextRange(); - range.collapse(true); - range.moveEnd('character', pos); - range.moveStart('character', pos); - range.select(); - } - }; - - CommonUtils.prototype.isAbsUrl = function isAbsUrl(url) { - if (_.startsWith(url, 'http://')) { - return true; - } else if (_.startsWith(url, 'https://')) { - return true; - } else if (_.startsWith(url, '//')) { - return true; - } - - return false; - }; - - CommonUtils.prototype.escape = function escape(html, encode) { - return html.replace(!encode ? /&(?!#?\w+;)/g : /&/g, '&').replace(//g, '>').replace(/"/g, '"').replace(/'/g, '''); - }; - - CommonUtils.prototype.unescape = function unescape(html) { - return html.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/g, function (_, n) { - n = n.toLowerCase(); - if (n === 'colon') return ':'; - if (n.charAt(0) === '#') { - return n.charAt(1) === 'x' ? String.fromCharCode(parseInt(n.substring(2), 16)) : String.fromCharCode(+n.substring(1)); - } - return ''; - }); - }; - - CommonUtils.prototype.openNewWin = function openNewWin(url) { - - if (url) { - (function () { - var $a = $('
    ').appendTo('body').end(); - $('').appendTo($a).end().click(); - - _.delay(function () { - $a.remove(); - }, 200); - })(); - } - }; - - CommonUtils.prototype.isAdminUser = function isAdminUser(user) { - if (user && user.authorities) { - return _.some(user.authorities, function (item) { - return item.id.authority === 'ROLE_ADMIN'; - }); - } - return false; - }; - - CommonUtils.prototype.isSuperUser = function isSuperUser(user) { - if (user && user.authorities) { - return _.some(user.authorities, function (item) { - return item.id.authority === 'ROLE_SUPER'; - }); - } - return false; - }; - - CommonUtils.prototype.isSBCcase = function isSBCcase(str) { - return (/[^\x00-\xff]/.test(str) - ); - }; - - CommonUtils.prototype.isHanzi = function isHanzi(str) { - return (/[\u4e00-\u9fa5]/ig.test(str) - ); - }; - - CommonUtils.prototype.getByteLen = function getByteLen(val) { - var len = 0; - for (var i = 0; i < val.length; i++) { - if (this.isHanzi(val[i]) || this.isSBCcase(val[i])) { - len += 2; - } else { - len += 1; - } - } - return len; - }; - - CommonUtils.prototype.abbreviate = function abbreviate(value, maxLen) { - if (value && maxLen) { - - var len = 0; - for (var i = 0; i < value.length; i++) { - if (this.isHanzi(value[i]) || this.isSBCcase(value[i])) { - len += 2; - } else { - len += 1; - } - - if (len > maxLen) { - return value.substr(0, i) + '...'; - } - } - } - return value; - }; - - CommonUtils.prototype.isMail = function isMail(mail) { - - var emailRegex = /^([_a-z0-9-]+)(\.[_a-z0-9-]+)*@([a-z0-9-]+)(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/i; - - return emailRegex.test(mail); - }; - - CommonUtils.prototype.isIE = function isIE() { - var isIE11 = !window.ActiveXObject && 'ActiveXObject' in window, - isIE = 'ActiveXObject' in window; - return isIE11 || isIE; - }; - - CommonUtils.prototype.isIE11 = function isIE11() { - return !window.ActiveXObject && 'ActiveXObject' in window; - }; - - CommonUtils.prototype.isIOS = function isIOS() { - var userAgent = navigator.userAgent, - isIOS = userAgent.match(this.regExpOS.ios), - isMobileChrome = userAgent.match(this.regExpOS.mobileChrome); - if (isIOS && !isMobileChrome) { - return true; - } else { - return false; - } - }; - - CommonUtils.prototype.isCellphone = function isCellphone() { - return !!navigator.userAgent.match(this.regExpOS.cellphone); - }; - - CommonUtils.prototype.isMobile = function isMobile() { - return !!navigator.userAgent.match(this.regExpOS.mobile); - }; - - CommonUtils.prototype.isChrome = function isChrome() { - return (/chrome\/([\d.]+)/.test(navigator.userAgent.toLowerCase()) - ); - }; - - CommonUtils.prototype.isSafari = function isSafari() { - return (/version\/([\d.]+)/.test(navigator.userAgent.toLowerCase()) - ); - }; - - CommonUtils.prototype.isFirefox = function isFirefox() { - return (/firefox\/([\d.]+)/.test(navigator.userAgent.toLowerCase()) - ); - }; - - CommonUtils.prototype.isOpera = function isOpera() { - return (/opera.([\d.]+)/.test(navigator.userAgent.toLowerCase()) - ); - }; - - CommonUtils.prototype.diffHtml = function diffHtml(html) { - - var tags = ['html', 'head', 'meta', 'title', 'base', 'link', 'script', 'body', 'div', 'span']; - - var s = ''; - if (html) { - s = html; - _.each(tags, function (tag) { - s = s.replace(new RegExp('<(' + tag + ')', "gi"), '<$1'); - }); - } - - return s; - }; - - CommonUtils.prototype.encodeHtml = function encodeHtml(str) { - var s = ""; - if (str.length == 0) return ""; - s = str.replace(/&/g, ">"); - s = s.replace(//g, ">"); - s = s.replace(/ /g, " "); - s = s.replace(/\'/g, "'"); - s = s.replace(/\"/g, """); - s = s.replace(/\n/g, "
    "); - return s; - }; - - CommonUtils.prototype.decodeHtml = function decodeHtml(str) { - var s = ""; - if (str.length == 0) return ""; - s = str.replace(/>/g, "&"); - s = s.replace(/</g, "<"); - s = s.replace(/>/g, ">"); - s = s.replace(/ /g, " "); - s = s.replace(/'/g, "\'"); - s = s.replace(/"/g, "\""); - s = s.replace(/
    /g, "\n"); - return s; - }; - - return CommonUtils; - }(); - - exports.default = new CommonUtils(); -}); -define('init/config',['exports', 'aurelia-templating-resources', 'aurelia-event-aggregator', 'aurelia-fetch-client', 'toastr', 'wurl', 'common/common-utils', 'marked', 'highlight', 'autosize', 'nprogress', 'push', 'color-hash', 'isomorphic-fetch', 'common/common-plugin', 'common/common-constant', 'common/common-ctx', 'common/common-imgs-loaded', 'modaal'], function (exports, _aureliaTemplatingResources, _aureliaEventAggregator, _aureliaFetchClient, _toastr, _wurl, _commonUtils, _marked, _highlight, _autosize, _nprogress, _push, _colorHash) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.Config = undefined; - - var _toastr2 = _interopRequireDefault(_toastr); - - var _wurl2 = _interopRequireDefault(_wurl); - - var _commonUtils2 = _interopRequireDefault(_commonUtils); - - var _marked2 = _interopRequireDefault(_marked); - - var _highlight2 = _interopRequireDefault(_highlight); - - var _autosize2 = _interopRequireDefault(_autosize); - - var _nprogress2 = _interopRequireDefault(_nprogress); - - var _push2 = _interopRequireDefault(_push); - - var _colorHash2 = _interopRequireDefault(_colorHash); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { - default: obj - }; - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var Config = exports.Config = function () { - function Config() { - _classCallCheck(this, Config); - } - - Config.prototype.initHttp = function initHttp() { - window.json = function (param) { - console.log(JSON.stringify(param)); - return (0, _aureliaFetchClient.json)(param); - }; - window.http = this.aurelia.container.root.get(_aureliaFetchClient.HttpClient); - http.configure(function (config) { - config.withDefaults({ - credentials: 'same-origin', - headers: { - 'Accept': 'application/json', - 'Content-Type': 'application/json', - 'X-Requested-With': 'fetch' - } - }).withInterceptor({ - request: function request(req) { - _nprogress2.default && _nprogress2.default.start(); - return req; - }, - requestError: function requestError(req) { - console.log(req); - }, - response: function response(resp) { - _nprogress2.default && _nprogress2.default.done(); - if (!resp.ok) { - resp.json().then(function (data) { - _toastr2.default.error(data.message); - }); - - if (resp.status == 401) { - _toastr2.default.error('用户未登录!'); - _commonUtils2.default.redirect2Login(); - return; - } - } - - return resp; - }, - responseError: function responseError(resp) { - _toastr2.default.error(resp.message, '网络请求错误!'); - console.log(resp); - } - }); - }); - - return this; - }; - - Config.prototype.initToastr = function initToastr() { - _toastr2.default.options.positionClass = 'toast-bottom-center'; - _toastr2.default.options.preventDuplicates = true; - - return this; - }; - - Config.prototype.initMarked = function initMarked() { - - var renderer = new _marked2.default.Renderer(); - renderer.listitem = function (text) { - if (/^\s*\[[x ]\]\s*/.test(text)) { - text = text.replace(/^\s*\[ \]\s*/, ' ').replace(/^\s*\[x\]\s*/, ' '); - return '
  • ' + text + '
  • '; - } else { - return '
  • ' + text + '
  • '; - } - }; - renderer.link = function (href, title, text) { - if (this.options.sanitize) { - try { - var prot = decodeURIComponent(unescape(href)).replace(/[^\w:]/g, '').toLowerCase(); - } catch (e) { - return ''; - } - if (prot.indexOf('javascript:') === 0 || prot.indexOf('vbscript:') === 0 || prot.indexOf('data:') === 0) { - return ''; - } - } - var out = void 0; - var isChatLink = /\/chat\/.+\?id=.+/g.test((0, _wurl2.default)('hash', href)); - var isCommentLink = /\/blog\/.+\?cid=.+/g.test((0, _wurl2.default)('hash', href)); - if (isChatLink || isCommentLink || _commonUtils2.default.isAbsUrl(href) && (0, _wurl2.default)('hostname', href) != (0, _wurl2.default)('hostname')) { - out = ''; - return out; - }; - - renderer.codespan = function (text) { - return '' + text + ''; - }; - - renderer.code = function (code, lang, escaped) { - var codeBk = code; - if (this.options.highlight) { - var out = this.options.highlight(code, lang); - if (out != null && out !== code) { - escaped = true; - code = out; - } - } - - if (!lang) { - return '
    ' + (escaped ? code : _commonUtils2.default.escape(code, true)) + '\n
    '; - } - - return '
    ' + (escaped ? code : _commonUtils2.default.escape(code, true)) + '\n
    \n'; - }; - - _marked2.default.setOptions({ - renderer: renderer, - breaks: true, - highlight: function highlight(code) { - return _highlight2.default.highlightAuto(code).value; - } - }); - - return this; - }; - - Config.prototype.initAjax = function initAjax() { - $.ajaxSetup({ - cache: false - }); - - var exceptUrls = ['/chat/channel/latest', '/chat/direct/latest', '/chat/channel/poll']; - - $(document).ajaxSend(function (event, jqxhr, settings) { - - var isNotInExceptUrls = _.every(exceptUrls, function (url) { - return settings.url.lastIndexOf(url) == -1; - }); - - if (isNotInExceptUrls) { - _nprogress2.default && _nprogress2.default.start(); - } - }); - - $(document).on('ajaxStop', function () { - _nprogress2.default && _nprogress2.default.done(); - }); - - $(document).ajaxError(function (event, xhr, settings) { - if (xhr && xhr.status == 401) { - _commonUtils2.default.redirect2Login(); - } - }); - - return this; - }; - - Config.prototype.initGlobalVar = function initGlobalVar() { - window.toastr = _toastr2.default; - window.wurl = _wurl2.default; - window.utils = _commonUtils2.default; - window.marked = _marked2.default; - window.autosize = _autosize2.default; - window.push = _push2.default; - window.bs = this.aurelia.container.root.get(_aureliaTemplatingResources.BindingSignaler); - window.ea = this.aurelia.container.root.get(_aureliaEventAggregator.EventAggregator); - window.colorHash = new _colorHash2.default(); - return this; - }; - - Config.prototype.initAnimateCss = function initAnimateCss() { - $.fn.extend({ - animateCss: function animateCss(animationName) { - var animationEnd = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend'; - this.addClass('animated ' + animationName).one(animationEnd, function () { - $(this).removeClass('animated ' + animationName); - }); - } - }); - return this; - }; - - Config.prototype.initEmoji = function initEmoji() { - emojify && emojify.setConfig({ - img_dir: _commonUtils2.default.getResourceBase() + '/img/emoji' - }); - return this; - }; - - Config.prototype.initModaal = function initModaal() { - _.extend($.fn.modaal.options, { - close_text: '关闭', - close_aria_label: '按[esc]关闭', - confirm_button_text: '确认', - confirm_cancel_button_text: '取消', - confirm_title: '操作确认', - accessible_title: '对话框窗口', - confirm_content: '

    默认确认对话框内容.

    ' - }); - return this; - }; - - Config.prototype.context = function context(aurelia) { - this.aurelia = aurelia; - return this; - }; - - return Config; - }(); - - exports.default = new Config(); -}); -define('init/index',['exports', './config', 'jquery', 'jquery.scrollto', 'timeago', 'lodash', 'hotkeys'], function (exports, _config) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.configure = configure; - - var _config2 = _interopRequireDefault(_config); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { - default: obj - }; - } - - function configure(aurelia, params) { - - _config2.default.context(aurelia).initGlobalVar().initHttp().initAjax().initToastr().initMarked().initAnimateCss().initEmoji().initModaal(); - } -}); -define('resources/index',['exports'], function (exports) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.configure = configure; - function configure(aurelia) { - - aurelia.globalResources(['resources/value-converters/vc-common', 'resources/binding-behaviors/bb-key', 'resources/attributes/attr-task', 'resources/attributes/attr-swipebox', 'resources/attributes/attr-pastable', 'resources/attributes/attr-autosize', 'resources/attributes/attr-dropzone', 'resources/attributes/attr-attr', 'resources/attributes/attr-c2c', 'resources/attributes/attr-dimmer', 'resources/attributes/attr-ui-dropdown', 'resources/attributes/attr-ui-dropdown-action', 'resources/attributes/attr-ui-dropdown-hover', 'resources/attributes/attr-ui-tab', 'resources/attributes/attr-ui-popup', 'resources/attributes/attr-ui-checkbox', 'resources/attributes/attr-tablesort', 'resources/attributes/attr-textcomplete', 'resources/attributes/attr-scrollbar', 'resources/attributes/attr-modaal', 'resources/elements/em-modal', 'resources/elements/em-dropdown', 'resources/elements/em-checkbox', 'resources/elements/em-confirm-modal', 'resources/elements/em-hotkeys-modal', 'resources/elements/em-chat-input', 'resources/elements/em-chat-top-menu', 'resources/elements/em-chat-sidebar-left', 'resources/elements/em-chat-content-item', 'resources/elements/em-chat-sidebar-right', 'resources/elements/em-chat-channel-create', 'resources/elements/em-chat-channel-join', 'resources/elements/em-chat-channel-edit', 'resources/elements/em-chat-channel-members-mgr', 'resources/elements/em-chat-channel-members-show', 'resources/elements/em-chat-channel-link-mgr', 'resources/elements/em-chat-system-link-mgr', 'resources/elements/em-chat-msg-popup', 'resources/elements/em-chat-member-popup', 'resources/elements/em-chat-attach', 'resources/elements/em-chat-schedule', 'resources/elements/em-chat-msg', 'resources/elements/em-chat-schedule-edit', 'resources/elements/em-chat-schedule-remind', 'resources/elements/em-chat-share', 'resources/elements/em-chat-content-item-footbar', 'resources/elements/em-blog-write', 'resources/elements/em-blog-left-sidebar', 'resources/elements/em-blog-right-sidebar', 'resources/elements/em-blog-content', 'resources/elements/em-blog-top-menu', 'resources/elements/em-blog-share', 'resources/elements/em-blog-comment', 'resources/elements/em-blog-save', 'resources/elements/em-blog-space-create', 'resources/elements/em-blog-space-edit', 'resources/elements/em-blog-space-update', 'resources/elements/em-blog-history', 'resources/elements/em-blog-history-view', 'resources/elements/em-blog-history-diff', 'resources/elements/em-blog-comment-popup', 'resources/elements/em-blog-space-auth', 'resources/elements/em-user-avatar', 'resources/elements/em-user-edit', 'resources/elements/em-blog-comment-share']); - } -}); -define('test/test-lifecycle',['exports', 'aurelia-framework', 'aurelia-event-aggregator'], function (exports, _aureliaFramework, _aureliaEventAggregator) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.TestLifeCycle = undefined; - - function _initDefineProp(target, property, descriptor, context) { - if (!descriptor) return; - Object.defineProperty(target, property, { - enumerable: descriptor.enumerable, - configurable: descriptor.configurable, - writable: descriptor.writable, - value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 - }); - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { - var desc = {}; - Object['ke' + 'ys'](descriptor).forEach(function (key) { - desc[key] = descriptor[key]; - }); - desc.enumerable = !!desc.enumerable; - desc.configurable = !!desc.configurable; - - if ('value' in desc || desc.initializer) { - desc.writable = true; - } - - desc = decorators.slice().reverse().reduce(function (desc, decorator) { - return decorator(target, property, desc) || desc; - }, desc); - - if (context && desc.initializer !== void 0) { - desc.value = desc.initializer ? desc.initializer.call(context) : void 0; - desc.initializer = undefined; - } - - if (desc.initializer === void 0) { - Object['define' + 'Property'](target, property, desc); - desc = null; - } - - return desc; - } - - function _initializerWarningHelper(descriptor, context) { - throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.'); - } - - var _desc, _value, _class, _descriptor, _class2, _temp; - - var TestLifeCycle = exports.TestLifeCycle = (_class = (_temp = _class2 = function () { - function TestLifeCycle(eventAggregator) { - _classCallCheck(this, TestLifeCycle); - - _initDefineProp(this, 'prop', _descriptor, this); - - this.eventAggregator = eventAggregator; - - console.log('constructor'); - } - - TestLifeCycle.prototype.created = function created(view) { - console.log('created'); - }; - - TestLifeCycle.prototype.bind = function bind(ctx) { - console.log('bind'); - }; - - TestLifeCycle.prototype.unbind = function unbind() { - console.log('unbind'); - }; - - TestLifeCycle.prototype.attached = function attached() { - console.log('attached'); - }; - - TestLifeCycle.prototype.detached = function detached() { - console.log('detached'); - }; - - TestLifeCycle.prototype.canActivate = function canActivate(params, routeConfig, navigationInstruction) { - console.log('canActivate'); - }; - - TestLifeCycle.prototype.activate = function activate(params, routeConfig, navigationInstruction) { - console.log('activate'); - }; - - TestLifeCycle.prototype.canDeactivate = function canDeactivate() { - console.log('canDeactivate'); - }; - - TestLifeCycle.prototype.deactivate = function deactivate() { - console.log('deactivate'); - }; - - return TestLifeCycle; - }(), _class2.inject = [_aureliaEventAggregator.EventAggregator], _temp), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'prop', [_aureliaFramework.bindable], { - enumerable: true, - initializer: function initializer() { - return null; - } - })), _class); -}); -define('user/user-login',['exports'], function (exports) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var UserLogin = exports.UserLogin = function () { - function UserLogin() { - _classCallCheck(this, UserLogin); - - this.username = ''; - this.password = ''; - } - - UserLogin.prototype.attached = function attached() { - $(this.rememberMeRef).checkbox(); - }; - - UserLogin.prototype.kdHandler = function kdHandler(evt) { - if (evt.keyCode === 13) { - this.loginHandler(); - } - - return true; - }; - - UserLogin.prototype.loginHandler = function loginHandler() { - var _this = this; - - var rm = $(this.rememberMeRef).checkbox('is checked') ? 'on' : ''; - - $.post('/admin/signin', { - username: this.username, - password: this.password, - "remember-me": rm - }).done(function () { - - localStorage && localStorage.setItem(nsCons.KEY_LOGIN_USERNAME, _this.username); - - var redirect = utils.urlQuery('redirect'); - if (redirect) { - window.location = decodeURIComponent(redirect); - } else { - var chatTo = null; - if (localStorage) { - chatTo = localStorage.getItem(nsCons.KEY_REMEMBER_LAST_CHAT_TO); - } - if (chatTo) { - window.location = wurl('path') + ('#/chat/' + chatTo); - } else { - window.location = wurl('path') + ('#/chat/@' + _this.username); - } - } - }).fail(function (xhr, sts, err) { - if (xhr.status == 401) { - toastr.error('用户名密码不正确!'); - } else if (xhr.status != 0) { - toastr.error('网络连接错误!'); - } - }); - - - return true; - }; - - return UserLogin; - }(); -}); -define('user/user-pwd-reset',['exports'], function (exports) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var UserPwdReset = exports.UserPwdReset = function () { - function UserPwdReset() { - _classCallCheck(this, UserPwdReset); - - this.mail = ''; - this.pwd = ''; - this.isReq = false; - this.token = utils.urlQuery('id'); - } - - UserPwdReset.prototype.resetPwdHandler = function resetPwdHandler() { - var _this = this; - - if (!$(this.fm).form('is valid')) { - toastr.error('邮件地址输入不合法!'); - return; - } - - this.isReq = true; - http.fetch('/free/user/pwd/reset', { - method: 'post', - body: json({ - mail: this.mail, - baseUrl: utils.getBaseUrl(), - path: wurl('path') - }) - }).then(function (resp) { - if (resp.ok) { - resp.json().then(function (data) { - if (data.success) { - toastr.success('重置密码邮件链接发送成功!'); - _.delay(function () { - window.location = "/admin/login"; - }, 2000); - } else { - toastr.error(data.data, '重置密码邮件链接发送失败!'); - _this.isReq = false; - } - }); - } - }); - }; - - UserPwdReset.prototype.newPwdHandler = function newPwdHandler() { - var _this2 = this; - - if (!$(this.fm2).form('is valid')) { - toastr.error('新密码输入不合法!'); - return; - } - - this.isReq = true; - http.fetch('/free/user/pwd/new', { - method: 'post', - body: json({ - token: this.token, - pwd: this.pwd - }) - }).then(function (resp) { - if (resp.ok) { - resp.json().then(function (data) { - if (data.success) { - toastr.success('重置密码成功!'); - _.delay(function () { - window.location = "/admin/login"; - }, 2000); - } else { - toastr.error(data.data, '重置密码失败!'); - _this2.isReq = false; - } - }); - } - }); - }; - - UserPwdReset.prototype.attached = function attached() { - - $(this.fm).form({ - on: 'blur', - inline: true, - fields: { - mail: ['empty', 'email'] - } - }); - - $(this.fm2).form({ - on: 'blur', - inline: true, - fields: { - mail: ['empty', 'minLength[8]'] - } - }); - }; - - return UserPwdReset; - }(); -}); -define('user/user-register',['exports'], function (exports) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var ViewModel = exports.ViewModel = function () { - function ViewModel() { - _classCallCheck(this, ViewModel); - - this.header = '账户激活页面'; - } - - ViewModel.prototype.activate = function activate(params, routeConfig, navigationInstruction) { - var _this = this; - - if (params.id) { - this.token = params.id; - - this.isReq = true; - this.header = '账户激活中,请稍后...!'; - http.fetch('/free/user/register/activate', { - method: 'post', - body: json({ - token: this.token - }) - }).then(function (resp) { - if (resp.ok) { - resp.json().then(function (data) { - if (data.success) { - _this.header = '账户激活成功,请返回登录页面登录!'; - } else { - _this.header = '账户激活失败!'; - toastr.error(data.data, '账户激活失败!'); - } - }); - _this.isReq = false; - } - }); - } - }; - - ViewModel.prototype.attached = function attached() { - - $(this.fm).form({ - on: 'blur', - inline: true, - fields: { - username: { - identifier: 'username', - rules: [{ - type: 'empty' - }, { - type: 'minLength[3]' - }, { - type: 'regExp', - value: /^[a-z]+[a-z0-9\.\-_]*[a-z0-9]+$/, - prompt: '小写字母数字.-_组合,字母开头,字母数字结尾' - }] - }, - pwd: { - identifier: 'pwd', - rules: [{ - type: 'empty' - }, { - type: 'minLength[8]' - }] - }, - name: { - identifier: 'name', - rules: [{ - type: 'empty' - }, { - type: 'maxLength[20]' - }] - }, - mail: { - identifier: 'mail', - rules: [{ - type: 'empty' - }, { - type: 'email' - }] - } - } - }); - }; - - ViewModel.prototype.okHandler = function okHandler() { - var _this2 = this; - - if (!$(this.fm).form('is valid')) { - toastr.error('账户注册信息输入不合法!'); - return; - } - - this.isReq = true; - http.fetch('/free/user/register', { - method: 'post', - body: json({ - username: this.username, - pwd: this.pwd, - name: this.name, - mail: this.mail, - baseUrl: utils.getBaseUrl(), - path: wurl('path') - }) - }).then(function (resp) { - if (resp.ok) { - resp.json().then(function (data) { - if (data.success) { - toastr.success('注册成功,请通过接收到的激活邮件激活账户!'); - _.delay(function () { - window.location = "/admin/login"; - }, 2000); - } else { - toastr.error(data.data, '注册失败!'); - _this2.isReq = false; - } - }); - } - }); - }; - - return ViewModel; - }(); -}); -define('resources/attributes/attr-attr',['exports', 'aurelia-framework', 'aurelia-dependency-injection'], function (exports, _aureliaFramework, _aureliaDependencyInjection) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.AttrAttr = undefined; - - function _initDefineProp(target, property, descriptor, context) { - if (!descriptor) return; - Object.defineProperty(target, property, { - enumerable: descriptor.enumerable, - configurable: descriptor.configurable, - writable: descriptor.writable, - value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 - }); - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { - var desc = {}; - Object['ke' + 'ys'](descriptor).forEach(function (key) { - desc[key] = descriptor[key]; - }); - desc.enumerable = !!desc.enumerable; - desc.configurable = !!desc.configurable; - - if ('value' in desc || desc.initializer) { - desc.writable = true; - } - - desc = decorators.slice().reverse().reduce(function (desc, decorator) { - return decorator(target, property, desc) || desc; - }, desc); - - if (context && desc.initializer !== void 0) { - desc.value = desc.initializer ? desc.initializer.call(context) : void 0; - desc.initializer = undefined; - } - - if (desc.initializer === void 0) { - Object['define' + 'Property'](target, property, desc); - desc = null; - } - - return desc; - } - - function _initializerWarningHelper(descriptor, context) { - throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.'); - } - - var _dec, _dec2, _class, _desc, _value, _class2, _descriptor, _descriptor2; - - var AttrAttr = exports.AttrAttr = (_dec = (0, _aureliaFramework.customAttribute)('attr'), _dec2 = (0, _aureliaDependencyInjection.inject)(Element), _dec(_class = _dec2(_class = (_class2 = function () { - function AttrAttr(element) { - _classCallCheck(this, AttrAttr); - - _initDefineProp(this, 'name', _descriptor, this); - - _initDefineProp(this, 'value', _descriptor2, this); - - this.element = element; - } - - AttrAttr.prototype.nameChanged = function nameChanged(value) {}; - - AttrAttr.prototype.valueChanged = function valueChanged(value) { - - this.value = value; - - if (value) { - $(this.element).attr(this.name, value); - } else { - $(this.element).removeAttr(this.name); - } - }; - - AttrAttr.prototype.bind = function bind(bindingContext) { - this.valueChanged(this.value); - }; - - AttrAttr.prototype.unbind = function unbind() {}; - - return AttrAttr; - }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'name', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'value', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - })), _class2)) || _class) || _class); -}); -define('resources/attributes/attr-autosize',['exports', 'aurelia-framework', 'aurelia-templating'], function (exports, _aureliaFramework, _aureliaTemplating) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.AttrAutosize = undefined; - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var _dec, _dec2, _class; - - var AttrAutosize = exports.AttrAutosize = (_dec = (0, _aureliaTemplating.customAttribute)('autosize'), _dec2 = (0, _aureliaFramework.inject)(Element), _dec(_class = _dec2(_class = function () { - function AttrAutosize(element) { - _classCallCheck(this, AttrAutosize); - - this.element = element; - } - - AttrAutosize.prototype.valueChanged = function valueChanged(newValue, oldValue) { - autosize(this.element); - }; - - AttrAutosize.prototype.bind = function bind(bindingContext) { - this.valueChanged(this.value); - }; - - AttrAutosize.prototype.unbind = function unbind() { - autosize.destroy(this.elements); - }; - - return AttrAutosize; - }()) || _class) || _class); -}); -define('resources/attributes/attr-c2c',['exports', 'aurelia-framework', 'clipboard'], function (exports, _aureliaFramework, _clipboard) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.AttrC2cCustomAttribute = undefined; - - var _clipboard2 = _interopRequireDefault(_clipboard); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { - default: obj - }; - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var _dec, _dec2, _class; - - var AttrC2cCustomAttribute = exports.AttrC2cCustomAttribute = (_dec = (0, _aureliaFramework.customAttribute)('c2c'), _dec2 = (0, _aureliaFramework.inject)(Element), _dec(_class = _dec2(_class = function () { - function AttrC2cCustomAttribute(element) { - _classCallCheck(this, AttrC2cCustomAttribute); - - this.element = element; - this._init(); - } - - AttrC2cCustomAttribute.prototype._init = function _init() { - var _this = this; - - $(this.element).append(''); - this.clipboard = new _clipboard2.default($(this.element).find('i.copy.icon')[0], { - text: function text(trigger) { - return _this.value ? _this.value : $(_this.element).text(); - } - }); - var $tp = $(this.element).find('[data-tooltip]').hover(function () {}, function () { - $(this).attr('data-tooltip', '复制到剪贴板!'); - }); - this.clipboard.on('success', function (e) { - $tp.attr('data-tooltip', '复制成功!'); - }).on('error', function (e) { - $tp.attr('data-tooltip', '复制失败!'); - }); - - $(this.element).hover(function () { - if (_this.value || $(_this.element).text()) { - $tp.show(); - } - }, function () { - $tp.hide(); - }); - }; - - AttrC2cCustomAttribute.prototype.unbind = function unbind() { - this.clipboard && this.clipboard.destroy(); - }; - - return AttrC2cCustomAttribute; - }()) || _class) || _class); -}); -define('resources/attributes/attr-dimmer',['exports', 'aurelia-dependency-injection', 'aurelia-templating'], function (exports, _aureliaDependencyInjection, _aureliaTemplating) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.AttrDimmer = undefined; - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var _dec, _dec2, _class; - - var AttrDimmer = exports.AttrDimmer = (_dec = (0, _aureliaTemplating.customAttribute)('dimmer'), _dec2 = (0, _aureliaDependencyInjection.inject)(Element), _dec(_class = _dec2(_class = function () { - function AttrDimmer(element) { - _classCallCheck(this, AttrDimmer); - - this.element = element; - this.$dimmer = $('
    '); - } - - AttrDimmer.prototype.valueChanged = function valueChanged(newValue) { - if (this.value) { - $(this.element).prepend(this.$dimmer); - } else { - this.$dimmer.remove(); - } - }; - - AttrDimmer.prototype.bind = function bind(bindingContext) { - this.valueChanged(this.value); - }; - - return AttrDimmer; - }()) || _class) || _class); -}); -define('resources/attributes/attr-dropzone',['exports', 'aurelia-framework', 'aurelia-templating', 'aurelia-event-aggregator'], function (exports, _aureliaFramework, _aureliaTemplating, _aureliaEventAggregator) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.AttrDropzone = undefined; - - function _initDefineProp(target, property, descriptor, context) { - if (!descriptor) return; - Object.defineProperty(target, property, { - enumerable: descriptor.enumerable, - configurable: descriptor.configurable, - writable: descriptor.writable, - value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 - }); - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { - var desc = {}; - Object['ke' + 'ys'](descriptor).forEach(function (key) { - desc[key] = descriptor[key]; - }); - desc.enumerable = !!desc.enumerable; - desc.configurable = !!desc.configurable; - - if ('value' in desc || desc.initializer) { - desc.writable = true; - } - - desc = decorators.slice().reverse().reduce(function (desc, decorator) { - return decorator(target, property, desc) || desc; - }, desc); - - if (context && desc.initializer !== void 0) { - desc.value = desc.initializer ? desc.initializer.call(context) : void 0; - desc.initializer = undefined; - } - - if (desc.initializer === void 0) { - Object['define' + 'Property'](target, property, desc); - desc = null; - } - - return desc; - } - - function _initializerWarningHelper(descriptor, context) { - throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.'); - } - - var _dec, _dec2, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3; - - var AttrDropzone = exports.AttrDropzone = (_dec = (0, _aureliaTemplating.customAttribute)('dropzone'), _dec2 = (0, _aureliaFramework.inject)(Element, _aureliaEventAggregator.EventAggregator), _dec(_class = _dec2(_class = (_class2 = function () { - function AttrDropzone(element, eventAggregator) { - var _this = this; - - _classCallCheck(this, AttrDropzone); - - _initDefineProp(this, 'clickable', _descriptor, this); - - _initDefineProp(this, 'target', _descriptor2, this); - - _initDefineProp(this, 'type', _descriptor3, this); - - this.element = element; - this.eventAggregator = eventAggregator; - - this.subscribe = this.eventAggregator.subscribe(nsCons.EVENT_CHAT_MSG_EDIT_UPLOAD, function (payload) { - if (payload.target === _this.target) { - $(_this.element).click(); - } - }); - } - - AttrDropzone.prototype.valueChanged = function valueChanged(newValue, oldValue) { - - var target = this.target ? this.target : this.element; - var toType = this.type ? this.type : nsCtx.isAt ? 'User' : 'Channel'; - - $(this.element).parent().addClass('tms-dropzone-preview-hidden'); - - $(this.element).children().andSelf().dropzone({ - url: "/admin/file/upload", - paramName: 'file', - clickable: !!this.clickable, - dictDefaultMessage: '', - maxFilesize: 10, - addRemoveLinks: true, - - dictCancelUpload: '取消上传', - dictCancelUploadConfirmation: '确定要取消上传吗?', - dictFileTooBig: '文件过大({{filesize}}M),最大限制:{{maxFilesize}}M', - init: function init() { - this.on("sending", function (file, xhr, formData) { - formData.append('toType', toType); - if ('Blog' !== toType) { - formData.append('toId', nsCtx.chatTo); - } - }); - this.on("success", function (file, data) { - if (data.success) { - - $.each(data.data, function (index, item) { - if (item.type == 'Image') { - $(target).insertAtCaret('![{name}]({baseURL}{path}{uuidName}) '.replace(/\{name\}/g, item.name).replace(/\{baseURL\}/g, utils.getBaseUrl() + '/').replace(/\{path\}/g, item.path).replace(/\{uuidName\}/g, item.uuidName)); - } else { - $(target).insertAtCaret('[{name}]({baseURL}{path}{uuidName}) '.replace(/\{name\}/g, item.name).replace(/\{baseURL\}/g, utils.getBaseUrl() + '/').replace(/\{path\}/g, "admin/file/download/").replace(/\{uuidName\}/g, item.id)); - } - }); - toastr.success('上传成功!'); - } else { - toastr.error(data.data, '上传失败!'); - } - }); - this.on("error", function (file, errorMessage, xhr) { - toastr.error(errorMessage, '上传失败!'); - }); - this.on("complete", function (file) { - this.removeFile(file); - }); - } - }); - }; - - AttrDropzone.prototype.bind = function bind(bindingContext) { - this.valueChanged(this.value); - }; - - return AttrDropzone; - }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'clickable', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'target', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'type', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - })), _class2)) || _class) || _class); -}); -define('resources/attributes/attr-modaal',['exports', 'aurelia-framework', 'aurelia-templating'], function (exports, _aureliaFramework, _aureliaTemplating) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.AttrModaalCustomAttribute = undefined; - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var _dec, _dec2, _class; - - var AttrModaalCustomAttribute = exports.AttrModaalCustomAttribute = (_dec = (0, _aureliaTemplating.customAttribute)('modaal'), _dec2 = (0, _aureliaFramework.inject)(Element), _dec(_class = _dec2(_class = function () { - function AttrModaalCustomAttribute(element) { - _classCallCheck(this, AttrModaalCustomAttribute); - - this.element = element; - } - - AttrModaalCustomAttribute.prototype.valueChanged = function valueChanged(newValue, oldValue) { - var _this = this; - - _.defer(function () { - $(_this.element).modaal({ - fullscreen: true, - overlay_close: false, - animation: 'none', - - before_open: function before_open() { - ea.publish(nsCons.EVENT_MODAAL_BEFORE_OPEN, { - id: newValue - }); - }, - after_open: function after_open() { - ea.publish(nsCons.EVENT_MODAAL_AFTER_OPEN, { - id: newValue - }); - }, - before_close: function before_close() { - ea.publish(nsCons.EVENT_MODAAL_BEFORE_CLOSE, { - id: newValue - }); - }, - after_close: function after_close() { - ea.publish(nsCons.EVENT_MODAAL_AFTER_CLOSE, { - id: newValue - }); - } - }); - }); - }; - - return AttrModaalCustomAttribute; - }()) || _class) || _class); -}); -define('resources/attributes/attr-pastable',['exports', 'aurelia-framework', 'aurelia-templating', 'common/common-plugin', 'common/common-paste'], function (exports, _aureliaFramework, _aureliaTemplating) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.AttrPastable = undefined; - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var _dec, _dec2, _class; - - var AttrPastable = exports.AttrPastable = (_dec = (0, _aureliaTemplating.customAttribute)('pastable'), _dec2 = (0, _aureliaFramework.inject)(Element), _dec(_class = _dec2(_class = function () { - function AttrPastable(element) { - _classCallCheck(this, AttrPastable); - - this.element = element; - } - - AttrPastable.prototype.valueChanged = function valueChanged(newValue, oldValue) { - var _this = this; - - $(this.element).pastableTextarea().on('pasteImage', function (ev, data) { - - $.post('/admin/file/base64', { - dataURL: data.dataURL, - type: data.blob.type, - toType: nsCtx.isAt ? 'User' : 'Channel', - toId: nsCtx.chatTo - }, function (data, textStatus, xhr) { - if (data.success) { - $(_this.element).insertAtCaret('![{name}]({baseURL}{path}{uuidName})'.replace(/\{name\}/g, data.data.name).replace(/\{baseURL\}/g, utils.getBaseUrl() + '/').replace(/\{path\}/g, data.data.path).replace(/\{uuidName\}/g, data.data.uuidName)); - } - }); - }).on('pasteImageError', function (ev, data) { - toastr.error(data.message, '剪贴板粘贴图片错误!'); - }); - }; - - AttrPastable.prototype.bind = function bind(bindingContext) { - this.valueChanged(this.value); - }; - - return AttrPastable; - }()) || _class) || _class); -}); -define('resources/attributes/attr-scrollbar',['exports', 'aurelia-framework', 'aurelia-templating', 'common/common-scrollbar'], function (exports, _aureliaFramework, _aureliaTemplating) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.AttrScrollbarCustomAttribute = undefined; - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var _dec, _dec2, _class; - - var AttrScrollbarCustomAttribute = exports.AttrScrollbarCustomAttribute = (_dec = (0, _aureliaTemplating.customAttribute)('scrollbar'), _dec2 = (0, _aureliaFramework.inject)(Element), _dec(_class = _dec2(_class = function () { - function AttrScrollbarCustomAttribute(element) { - _classCallCheck(this, AttrScrollbarCustomAttribute); - - this.element = element; - } - - AttrScrollbarCustomAttribute.prototype.valueChanged = function valueChanged(newValue, oldValue) { - var _this = this; - - this.cls = newValue ? newValue : $(window).width() < 768 ? 'scrollbar-macosx' : 'scrollbar-outer'; - jQuery(this.element).addClass(this.cls).scrollbar({ - "onScroll": function onScroll(y, x) { - if (y.scroll == y.maxScroll) { - ea.publish(nsCons.EVENT_SCROLLBAR_SCROLL_TO_BOTTOM, { - element: _this.element, - x: x, - y: y - }); - } - } - }); - }; - - AttrScrollbarCustomAttribute.prototype.unbind = function unbind() { - try { - jQuery(this.element).removeClass(this.cls).scrollbar('destroy'); - } catch (err) {} - }; - - return AttrScrollbarCustomAttribute; - }()) || _class) || _class); -}); -define('resources/attributes/attr-swipebox',['exports', 'aurelia-framework', 'aurelia-templating', 'swipebox'], function (exports, _aureliaFramework, _aureliaTemplating) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.AttrSwipebox = undefined; - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var _dec, _dec2, _class; - - var AttrSwipebox = exports.AttrSwipebox = (_dec = (0, _aureliaTemplating.customAttribute)('swipebox'), _dec2 = (0, _aureliaFramework.inject)(Element), _dec(_class = _dec2(_class = function () { - function AttrSwipebox(element) { - _classCallCheck(this, AttrSwipebox); - - this.element = element; - } - - AttrSwipebox.prototype.valueChanged = function valueChanged(newValue, oldValue) { - var _this = this; - - $(this.element).on('click', 'img', function (event) { - event.preventDefault(); - var $img = $(event.target); - var imgs = []; - var initialIndexOnArray = 0; - $(_this.element).find('img').each(function (index, img) { - imgs.push({ href: $(img).attr('src'), title: $(img).attr('alt') }); - if (event.target == img) { - initialIndexOnArray = index; - } - }); - $.swipebox(imgs, { - useCSS: true, - useSVG: true, - initialIndexOnArray: initialIndexOnArray, - hideCloseButtonOnMobile: false, - removeBarsOnMobile: true, - hideBarsDelay: 3000, - videoMaxWidth: 1140, - beforeOpen: function beforeOpen() {}, - afterOpen: null, - afterClose: function afterClose() {}, - loopAtEnd: !!newValue }); - }); - }; - - AttrSwipebox.prototype.bind = function bind(bindingContext) { - this.valueChanged(this.value); - }; - - return AttrSwipebox; - }()) || _class) || _class); -}); -define('resources/attributes/attr-tablesort',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.AttrTablesortCustomAttribute = undefined; - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var _dec, _dec2, _class; - - var AttrTablesortCustomAttribute = exports.AttrTablesortCustomAttribute = (_dec = (0, _aureliaFramework.customAttribute)('tablesort'), _dec2 = (0, _aureliaFramework.inject)(Element), _dec(_class = _dec2(_class = function () { - function AttrTablesortCustomAttribute(element) { - _classCallCheck(this, AttrTablesortCustomAttribute); - - this.element = element; - } - - AttrTablesortCustomAttribute.prototype.valueChanged = function valueChanged(newValue, oldValue) {}; - - AttrTablesortCustomAttribute.prototype._init = function _init() { - if ($(this.element).is('table')) { - $(this.element).addClass('sortable').tablesort(); - } else { - console.warn('tablesort element is not table tag!'); - } - }; - - AttrTablesortCustomAttribute.prototype.bind = function bind() { - this._init(); - }; - - return AttrTablesortCustomAttribute; - }()) || _class) || _class); -}); -define('resources/attributes/attr-task',['exports', 'aurelia-dependency-injection', 'aurelia-templating'], function (exports, _aureliaDependencyInjection, _aureliaTemplating) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.AttrTask = undefined; - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var _dec, _dec2, _class; - - var AttrTask = exports.AttrTask = (_dec = (0, _aureliaTemplating.customAttribute)('task'), _dec2 = (0, _aureliaDependencyInjection.inject)(Element), _dec(_class = _dec2(_class = function () { - function AttrTask(element) { - _classCallCheck(this, AttrTask); - - this.task = null; - this.bindingCtx = null; - - this.element = element; - } - - AttrTask.prototype.valueChanged = function valueChanged(newValue) { - this.task = newValue; - if (_.isFunction(this.task)) { - _.bind(this.task, this.bindingCtx, this.element)(); - } - }; - - AttrTask.prototype.bind = function bind(bindingContext) { - this.bindingCtx = bindingContext; - this.valueChanged(this.value); - }; - - AttrTask.prototype.unbind = function unbind() { - this.element = null; - this.task = null; - this.bindingCtx = null; - }; - - return AttrTask; - }()) || _class) || _class); -}); -define('resources/attributes/attr-textcomplete',['exports', 'aurelia-framework', 'aurelia-templating', 'common/common-tips', 'common/common-emoji'], function (exports, _aureliaFramework, _aureliaTemplating, _commonTips, _commonEmoji) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.AttrTextcompleteCustomAttribute = undefined; - - var _commonTips2 = _interopRequireDefault(_commonTips); - - var _commonEmoji2 = _interopRequireDefault(_commonEmoji); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { - default: obj - }; - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var _dec, _dec2, _class; - - var AttrTextcompleteCustomAttribute = exports.AttrTextcompleteCustomAttribute = (_dec = (0, _aureliaTemplating.customAttribute)('textcomplete'), _dec2 = (0, _aureliaFramework.inject)(Element), _dec(_class = _dec2(_class = function () { - function AttrTextcompleteCustomAttribute(element) { - _classCallCheck(this, AttrTextcompleteCustomAttribute); - - this.element = element; - this.initHotkeys(); - } - - AttrTextcompleteCustomAttribute.prototype.tipsActionHandler = function tipsActionHandler(value) { - if (value == '/upload') { - $(this.element).next('.tms-edit-actions').find('button > .upload.icon').click(); - } else if (value == '/shortcuts') { - ea.publish(nsCons.EVENT_SHOW_HOTKEYS_MODAL, {}); - } else if (value == 'search') { - _.delay(function () { - utils.openNewWin(nsCons.STR_EMOJI_SEARCH_URL); - }, 200); - } else { - return true; - } - return false; - }; - - AttrTextcompleteCustomAttribute.prototype.valueChanged = function valueChanged() { - var _this = this; - - if (this.value) { - this.members = this.value; - $(this.element).textcomplete([{ - match: /(|\b)(\/.*)$/, - search: function search(term, callback) { - var keys = _.keys(_commonTips2.default); - callback($.map(keys, function (key) { - return key.indexOf(term) === 0 ? key : null; - })); - }, - template: function template(value, term) { - return _commonTips2.default[value].label; - }, - replace: function replace(value) { - if (_this.tipsActionHandler(value)) { - _.defer(function () { - autosize.update(_this.element); - }); - _this.setCaretPosition(_commonTips2.default[value].ch2 ? _commonTips2.default[value].ch2 : _commonTips2.default[value].ch); - return '$1' + _commonTips2.default[value].value; - } else { - return ''; - } - } - }, { - match: /(^|\s)@(\w*)$/, - search: function search(term, callback) { - callback($.map(_this.members, function (member) { - return member.enabled && member.username.indexOf(term) >= 0 ? member.username : null; - })); - }, - template: function template(value, term) { - var user = _.find(_this.members, { username: value }); - return user.name + ' - ' + user.mails + ' (' + user.username + ')'; - }, - replace: function replace(value) { - return '$1{~' + value + '}'; - } - }, { - match: /(^|\s):([\+\-\w]*)$/, - search: function search(term, callback) { - callback($.map(_commonEmoji2.default, function (emoji) { - return _.some(emoji.split('_'), function (item) { - return item.indexOf(term) === 0; - }) ? emoji : null; - })); - }, - template: function template(value, term) { - if (value == 'search') { - return '\u8868\u60C5\u67E5\u627E - :search'; - } - var emojiKey = ':' + value + ':'; - return emojify.replace(emojiKey) + ' - ' + emojiKey; - }, - replace: function replace(value) { - if (_this.tipsActionHandler(value)) { - return '$1:' + value + ': '; - } else { - return ''; - } - } - }], { - appendTo: $(this.element).prev('.textcomplete-container').find('.append-to'), - maxCount: nsCons.NUM_TEXT_COMPLETE_MAX_COUNT - }); - } else { - this.unbind(); - } - }; - - AttrTextcompleteCustomAttribute.prototype.setCaretPosition = function setCaretPosition(ch) { - var _this2 = this; - - ch && _.delay(function () { - var cr = utils.getCursortPosition(_this2.element); - utils.setCaretPosition(_this2.element, cr - ch); - }, 100); - }; - - AttrTextcompleteCustomAttribute.prototype.initHotkeys = function initHotkeys() { - var _this3 = this; - - _.each(_.filter(_.values(_commonTips2.default), 'key'), function (value) { - $(_this3.element).bind('keydown', value.key, function (evt) { - evt.preventDefault(); - $(_this3.element).insertAtCaret(value.value); - var cr = utils.getCursortPosition(_this3.element); - var ch = value.ch2 ? value.ch2 : value.ch; - ch && utils.setCaretPosition(_this3.element, cr - ch); - _.defer(function () { - autosize.update(_this3.element); - }); - }); - }); - }; - - AttrTextcompleteCustomAttribute.prototype.unbind = function unbind() { - try { - $(this.element).textcomplete('destroy'); - } catch (err) {} - }; - - return AttrTextcompleteCustomAttribute; - }()) || _class) || _class); -}); -define('resources/attributes/attr-ui-checkbox',['exports', 'aurelia-framework', 'aurelia-templating'], function (exports, _aureliaFramework, _aureliaTemplating) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.AttrUiCheckboxCustomAttribute = undefined; - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var _dec, _dec2, _class; - - var AttrUiCheckboxCustomAttribute = exports.AttrUiCheckboxCustomAttribute = (_dec = (0, _aureliaTemplating.customAttribute)('ui-checkbox'), _dec2 = (0, _aureliaFramework.inject)(Element), _dec(_class = _dec2(_class = function () { - function AttrUiCheckboxCustomAttribute(element) { - _classCallCheck(this, AttrUiCheckboxCustomAttribute); - - this.element = element; - } - - AttrUiCheckboxCustomAttribute.prototype.valueChanged = function valueChanged(newValue, oldValue) { - $(this.element).checkbox(); - }; - - return AttrUiCheckboxCustomAttribute; - }()) || _class) || _class); -}); -define('resources/attributes/attr-ui-dropdown-action',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.AttrUiDropdownActionCustomAttribute = undefined; - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var _dec, _dec2, _class; - - var AttrUiDropdownActionCustomAttribute = exports.AttrUiDropdownActionCustomAttribute = (_dec = (0, _aureliaFramework.customAttribute)('ui-dropdown-action'), _dec2 = (0, _aureliaFramework.inject)(Element), _dec(_class = _dec2(_class = function () { - function AttrUiDropdownActionCustomAttribute(element) { - _classCallCheck(this, AttrUiDropdownActionCustomAttribute); - - this.element = element; - } - - AttrUiDropdownActionCustomAttribute.prototype.valueChanged = function valueChanged(newValue, oldValue) {}; - - AttrUiDropdownActionCustomAttribute.prototype._init = function _init(context) { - var _this = this; - - _.defer(function () { - $(_this.element).dropdown({ - action: 'hide', - context: context - }); - }); - }; - - AttrUiDropdownActionCustomAttribute.prototype.bind = function bind() { - this._init(this.value ? this.value : window); - }; - - return AttrUiDropdownActionCustomAttribute; - }()) || _class) || _class); -}); -define('resources/attributes/attr-ui-dropdown-hover',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.AttrUiDropdownHoverCustomAttribute = undefined; - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var _dec, _dec2, _class; - - var AttrUiDropdownHoverCustomAttribute = exports.AttrUiDropdownHoverCustomAttribute = (_dec = (0, _aureliaFramework.customAttribute)('ui-dropdown-hover'), _dec2 = (0, _aureliaFramework.inject)(Element), _dec(_class = _dec2(_class = function () { - function AttrUiDropdownHoverCustomAttribute(element) { - _classCallCheck(this, AttrUiDropdownHoverCustomAttribute); - - this.element = element; - } - - AttrUiDropdownHoverCustomAttribute.prototype.valueChanged = function valueChanged(newValue, oldValue) {}; - - AttrUiDropdownHoverCustomAttribute.prototype._init = function _init(action) { - var _this = this; - - _.defer(function () { - $(_this.element).dropdown({ - on: 'hover', - action: action - }); - }); - }; - - AttrUiDropdownHoverCustomAttribute.prototype.bind = function bind() { - this._init(this.value ? this.value : 'hide'); - }; - - return AttrUiDropdownHoverCustomAttribute; - }()) || _class) || _class); -}); -define('resources/attributes/attr-ui-dropdown',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.AttrUiDropdownCustomAttribute = undefined; - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var _dec, _dec2, _class; - - var AttrUiDropdownCustomAttribute = exports.AttrUiDropdownCustomAttribute = (_dec = (0, _aureliaFramework.customAttribute)('ui-dropdown'), _dec2 = (0, _aureliaFramework.inject)(Element), _dec(_class = _dec2(_class = function () { - function AttrUiDropdownCustomAttribute(element) { - _classCallCheck(this, AttrUiDropdownCustomAttribute); - - this.element = element; - } - - AttrUiDropdownCustomAttribute.prototype.valueChanged = function valueChanged(newValue, oldValue) {}; - - AttrUiDropdownCustomAttribute.prototype._init = function _init(action) { - var _this = this; - - _.defer(function () { - $(_this.element).dropdown({ - action: action - }); - }); - }; - - AttrUiDropdownCustomAttribute.prototype.bind = function bind() { - this._init(this.value ? this.value : 'hide'); - }; - - return AttrUiDropdownCustomAttribute; - }()) || _class) || _class); -}); -define('resources/attributes/attr-ui-popup',['exports', 'aurelia-framework', 'aurelia-templating'], function (exports, _aureliaFramework, _aureliaTemplating) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.AttrUiPopupCustomAttribute = undefined; - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var _dec, _dec2, _class; - - var AttrUiPopupCustomAttribute = exports.AttrUiPopupCustomAttribute = (_dec = (0, _aureliaTemplating.customAttribute)('ui-popup'), _dec2 = (0, _aureliaFramework.inject)(Element), _dec(_class = _dec2(_class = function () { - function AttrUiPopupCustomAttribute(element) { - _classCallCheck(this, AttrUiPopupCustomAttribute); - - this.element = element; - } - - AttrUiPopupCustomAttribute.prototype.valueChanged = function valueChanged(newValue, oldValue) { - var _this = this; - - _.defer(function () { - $(_this.element).popup({ - on: 'click', - inline: true, - silent: true, - - position: newValue ? newValue : 'bottom right', - jitter: 300, - delay: { - show: 300, - hide: 300 - }, - onShow: function onShow() {}, - onVisible: function onVisible() {} - }); - }); - }; - - return AttrUiPopupCustomAttribute; - }()) || _class) || _class); -}); -define('resources/attributes/attr-ui-tab',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.AttrUiTabCustomAttribute = undefined; - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var _dec, _dec2, _class; - - var AttrUiTabCustomAttribute = exports.AttrUiTabCustomAttribute = (_dec = (0, _aureliaFramework.customAttribute)('ui-tab'), _dec2 = (0, _aureliaFramework.inject)(Element), _dec(_class = _dec2(_class = function () { - function AttrUiTabCustomAttribute(element) { - _classCallCheck(this, AttrUiTabCustomAttribute); - - this.element = element; - } - - AttrUiTabCustomAttribute.prototype.valueChanged = function valueChanged(newValue, oldValue) {}; - - AttrUiTabCustomAttribute.prototype._init = function _init() { - var _this = this; - - _.defer(function () { - $(_this.element).find('.item').tab(); - }); - }; - - AttrUiTabCustomAttribute.prototype.bind = function bind() { - this._init(); - }; - - return AttrUiTabCustomAttribute; - }()) || _class) || _class); -}); -define('resources/binding-behaviors/bb-key',['exports'], function (exports) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var keyCodes = { - 'esc': 27, - 'tab': 9, - 'enter': 13, - 'space': 32, - 'up': 38, - 'left': 37, - 'right': 39, - 'down': 40, - 'backspace': 8, - 'delete': 46 - }; - - function keyHandler(event) { - - if (event && event.ctrlKey == this.keyState.ctrl && event.altKey == this.keyState.alt && event.shiftKey == this.keyState.shift && event.keyCode == this.keyState.keyCode) { - this.originalMethod(event); - } else {} - - return true; - } - - var KeyBindingBehavior = exports.KeyBindingBehavior = function () { - function KeyBindingBehavior() { - _classCallCheck(this, KeyBindingBehavior); - } - - KeyBindingBehavior.prototype.bind = function bind(binding, source) { - var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 13; - var metaKeys = arguments[3]; - - var methodName = 'updateTarget'; - if (binding.callSource) { - methodName = 'callSource'; - } else if (binding.updateSource && binding.mode === bindingMode.twoWay) { - methodName = 'updateSource'; - } - - binding.originalMethod = binding[methodName]; - binding.originalMethod.originalName = methodName; - - binding[methodName] = keyHandler; - var keyCode = _.isInteger(key) ? key : key.length === 1 ? key.charCodeAt(0) : keyCodes[key]; - if (_.isUndefined(keyCode)) { - console.warn('Unmapping keyCode for KeyBindingBehavior!'); - } - binding.keyState = { - ctrl: _.includes(metaKeys, 'ctrl'), - alt: _.includes(metaKeys, 'alt'), - shift: _.includes(metaKeys, 'shift'), - keyCode: keyCode - }; - }; - - KeyBindingBehavior.prototype.unbind = function unbind(binding, source) { - binding[binding.originalMethod.originalName] = binding.originalMethod; - binding.originalMethod = null; - }; - - return KeyBindingBehavior; - }(); -}); -define('resources/value-converters/vc-common',['exports', 'color-hash', 'common/common-tags', 'jquery-format', 'timeago'], function (exports, _colorHash, _commonTags) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.DiffHtmlValueConverter = exports.Nl2brValueConverter = exports.LabelCssValueConverter = exports.LabelColorValueConverter = exports.ChatLabelFilterValueConverter = exports.ChatLabelTipValueConverter = exports.ChatLabelExistValueConverter = exports.EmojiReplValueConverter = exports.EmojiValueConverter = exports.UserNameValueConverter = exports.SortChannelsValueConverter = exports.SortUsernamesValueConverter = exports.SortUsersValueConverter = exports.SortValueConverter = exports.ParseMdValueConverter = exports.TimeagoValueConverter = exports.NumberValueConverter = exports.DateValueConverter = exports.LowerValueConverter = exports.UpperValueConverter = undefined; - - var _colorHash2 = _interopRequireDefault(_colorHash); - - var _commonTags2 = _interopRequireDefault(_commonTags); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { - default: obj - }; - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var tg = timeago(); - - var UpperValueConverter = exports.UpperValueConverter = function () { - function UpperValueConverter() { - _classCallCheck(this, UpperValueConverter); - } - - UpperValueConverter.prototype.toView = function toView(value) { - return value && value.toUpperCase(); - }; - - return UpperValueConverter; - }(); - - var LowerValueConverter = exports.LowerValueConverter = function () { - function LowerValueConverter() { - _classCallCheck(this, LowerValueConverter); - } - - LowerValueConverter.prototype.toView = function toView(value) { - return value && value.toLowerCase(); - }; - - return LowerValueConverter; - }(); - - var DateValueConverter = exports.DateValueConverter = function () { - function DateValueConverter() { - _classCallCheck(this, DateValueConverter); - } - - DateValueConverter.prototype.toView = function toView(value) { - var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yyyy-MM-dd hh:mm:ss'; - - return _.isInteger(_.toNumber(value)) ? $.format.date(new Date(value), format) : value ? value : ''; - }; - - return DateValueConverter; - }(); - - var NumberValueConverter = exports.NumberValueConverter = function () { - function NumberValueConverter() { - _classCallCheck(this, NumberValueConverter); - } - - NumberValueConverter.prototype.toView = function toView(value) { - var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '#,##0.00'; - - return _.isNumber(_.toNumber(value)) ? $.format.number(value, format) : value ? value : ''; - }; - - return NumberValueConverter; - }(); - - var TimeagoValueConverter = exports.TimeagoValueConverter = function () { - function TimeagoValueConverter() { - _classCallCheck(this, TimeagoValueConverter); - } - - TimeagoValueConverter.prototype.toView = function toView(value) { - return value ? tg.format(value, 'zh_CN') : ''; - }; - - return TimeagoValueConverter; - }(); - - var ParseMdValueConverter = exports.ParseMdValueConverter = function () { - function ParseMdValueConverter() { - _classCallCheck(this, ParseMdValueConverter); - } - - ParseMdValueConverter.prototype.toView = function toView(value) { - return value ? marked(utils.preParse(value)) : ''; - }; - - return ParseMdValueConverter; - }(); - - var SortValueConverter = exports.SortValueConverter = function () { - function SortValueConverter() { - _classCallCheck(this, SortValueConverter); - } - - SortValueConverter.prototype.toView = function toView(value, prop) { - return _.isArray(value) ? _.sortBy(value, prop) : value; - }; - - return SortValueConverter; - }(); - - var SortUsersValueConverter = exports.SortUsersValueConverter = function () { - function SortUsersValueConverter() { - _classCallCheck(this, SortUsersValueConverter); - } - - SortUsersValueConverter.prototype.toView = function toView(value, username) { - if (_.isArray(value) && username) { - var user = _.find(value, { username: username }); - if (user) { - return [user].concat(_.reject(value, { username: username })); - } - } - return value; - }; - - return SortUsersValueConverter; - }(); - - var SortUsernamesValueConverter = exports.SortUsernamesValueConverter = function () { - function SortUsernamesValueConverter() { - _classCallCheck(this, SortUsernamesValueConverter); - } - - SortUsernamesValueConverter.prototype.toView = function toView(value, username) { - if (_.isArray(value) && username) { - if (_.includes(value, username)) { - return [username].concat(_.without(value, username)); - } - } - return value; - }; - - return SortUsernamesValueConverter; - }(); - - var SortChannelsValueConverter = exports.SortChannelsValueConverter = function () { - function SortChannelsValueConverter() { - _classCallCheck(this, SortChannelsValueConverter); - } - - SortChannelsValueConverter.prototype.toView = function toView(value) { - if (_.isArray(value)) { - var channelAll = _.find(value, { name: 'all' }); - if (channelAll) { - return [channelAll].concat(_.reject(value, { name: 'all' })); - } - } - return value; - }; - - return SortChannelsValueConverter; - }(); - - var UserNameValueConverter = exports.UserNameValueConverter = function () { - function UserNameValueConverter() { - _classCallCheck(this, UserNameValueConverter); - } - - UserNameValueConverter.prototype.toView = function toView(value) { - var user = _.find(window.tmsUsers, { username: value }); - if (user) { - return user.name; - } - return value; - }; - - return UserNameValueConverter; - }(); - - var EmojiValueConverter = exports.EmojiValueConverter = function () { - function EmojiValueConverter() { - _classCallCheck(this, EmojiValueConverter); - } - - EmojiValueConverter.prototype.toView = function toView(value, mkbodyDom) { - if (emojify) { - _.defer(function () { - emojify.run(mkbodyDom); - }); - } - return value; - }; - - return EmojiValueConverter; - }(); - - var EmojiReplValueConverter = exports.EmojiReplValueConverter = function () { - function EmojiReplValueConverter() { - _classCallCheck(this, EmojiReplValueConverter); - } - - EmojiReplValueConverter.prototype.toView = function toView(value) { - return emojify.replace(value); - }; - - return EmojiReplValueConverter; - }(); - - var ChatLabelExistValueConverter = exports.ChatLabelExistValueConverter = function () { - function ChatLabelExistValueConverter() { - _classCallCheck(this, ChatLabelExistValueConverter); - } - - ChatLabelExistValueConverter.prototype.toView = function toView(chatLabels, type) { - if (chatLabels && chatLabels.length != 0) { - if (_.some(chatLabels, function (cl) { - return (type ? cl.type == type : true) && cl.voters.length != 0; - })) { - return ''; - } - } - return 'none'; - }; - - return ChatLabelExistValueConverter; - }(); - - var ChatLabelTipValueConverter = exports.ChatLabelTipValueConverter = function () { - function ChatLabelTipValueConverter() { - _classCallCheck(this, ChatLabelTipValueConverter); - } - - ChatLabelTipValueConverter.prototype.toView = function toView(chatLabel) { - var vs = _.map(chatLabel.voters, function (v) { - return v.name ? v.name : v.username; - }); - return '' + _.join(vs, ',') + vs.length + '\u4EBA' + (chatLabel.type == 'Emoji' ? '表示了' : '标记了') + ' [' + (chatLabel.type == 'Emoji' ? chatLabel.description : chatLabel.name) + ']'; - }; - - return ChatLabelTipValueConverter; - }(); - - var ChatLabelFilterValueConverter = exports.ChatLabelFilterValueConverter = function () { - function ChatLabelFilterValueConverter() { - _classCallCheck(this, ChatLabelFilterValueConverter); - } - - ChatLabelFilterValueConverter.prototype.toView = function toView(chatLabels) { - var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'Emoji'; - - return _.filter(chatLabels, { type: type }); - }; - - return ChatLabelFilterValueConverter; - }(); - - var LabelColorValueConverter = exports.LabelColorValueConverter = function () { - function LabelColorValueConverter() { - _classCallCheck(this, LabelColorValueConverter); - } - - LabelColorValueConverter.prototype.toView = function toView(chatLabel) { - var tag = _.find(_commonTags2.default, { value: chatLabel.name }); - return tag ? tag.color : ''; - }; - - return LabelColorValueConverter; - }(); - - var LabelCssValueConverter = exports.LabelCssValueConverter = function () { - function LabelCssValueConverter() { - _classCallCheck(this, LabelCssValueConverter); - } - - LabelCssValueConverter.prototype.toView = function toView(chatLabel) { - var cs = colorHash.rgb(chatLabel.name); - var bgColor = 'rgba(' + cs[0] + ', ' + cs[1] + ', ' + cs[2] + ', 0.6)'; - var color = 'rgba(' + (255 - cs[0]) + ', ' + (255 - cs[1]) + ', ' + (255 - cs[2]) + ', 1)'; - - var tag = _.find(_commonTags2.default, { value: chatLabel.name }); - return !tag ? { "background-color": bgColor, "color": color } : ''; - }; - - return LabelCssValueConverter; - }(); - - var Nl2brValueConverter = exports.Nl2brValueConverter = function () { - function Nl2brValueConverter() { - _classCallCheck(this, Nl2brValueConverter); - } - - Nl2brValueConverter.prototype.toView = function toView(value) { - if (value) { - return _.replace(value, /\n/g, '
    '); - } - return value; - }; - - return Nl2brValueConverter; - }(); - - var DiffHtmlValueConverter = exports.DiffHtmlValueConverter = function () { - function DiffHtmlValueConverter() { - _classCallCheck(this, DiffHtmlValueConverter); - } - - DiffHtmlValueConverter.prototype.toView = function toView(value, allowedTags, allowedAttributes) { - if (value) { - return utils.diffHtml(value); - } - return value; - }; - - return DiffHtmlValueConverter; - }(); -}); -define('resources/elements/em-blog-comment-popup',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmBlogCommentPopup = undefined; - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var _class; - - var EmBlogCommentPopup = exports.EmBlogCommentPopup = (0, _aureliaFramework.containerless)(_class = function () { - function EmBlogCommentPopup() { - var _this = this; - - _classCallCheck(this, EmBlogCommentPopup); - - this.subscribe = ea.subscribe(nsCons.EVENT_BLOG_COMMENT_POPUP_SHOW, function (payload) { - _this.id = payload.id; - _this.target = payload.target; - - $(_this.target).popup({ - popup: _this.popup, - hoverable: true, - inline: false, - movePopup: false, - - silent: true, - position: 'bottom left', - jitter: 300, - prefer: 'opposite', - delay: { - show: 300, - hide: 300 - }, - onShow: function onShow() { - $.get('/admin/blog/comment/get', { - cid: _this.id - }, function (data) { - if (data.success) { - _this.comment = data.data; - } else { - toastr.error(data.data, "加载失败!"); - } - }); - } - }).popup('show'); - }); - } - - EmBlogCommentPopup.prototype.unbind = function unbind() { - this.subscribe.dispose(); - }; - - return EmBlogCommentPopup; - }()) || _class; -}); -define('resources/elements/em-blog-comment-share',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmBlogCommentShare = undefined; - - function _initDefineProp(target, property, descriptor, context) { - if (!descriptor) return; - Object.defineProperty(target, property, { - enumerable: descriptor.enumerable, - configurable: descriptor.configurable, - writable: descriptor.writable, - value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 - }); - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { - var desc = {}; - Object['ke' + 'ys'](descriptor).forEach(function (key) { - desc[key] = descriptor[key]; - }); - desc.enumerable = !!desc.enumerable; - desc.configurable = !!desc.configurable; - - if ('value' in desc || desc.initializer) { - desc.writable = true; - } - - desc = decorators.slice().reverse().reduce(function (desc, decorator) { - return decorator(target, property, desc) || desc; - }, desc); - - if (context && desc.initializer !== void 0) { - desc.value = desc.initializer ? desc.initializer.call(context) : void 0; - desc.initializer = undefined; - } - - if (desc.initializer === void 0) { - Object['define' + 'Property'](target, property, desc); - desc = null; - } - - return desc; - } - - function _initializerWarningHelper(descriptor, context) { - throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.'); - } - - var _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3; - - var EmBlogCommentShare = exports.EmBlogCommentShare = (0, _aureliaFramework.containerless)(_class = (_class2 = function () { - function EmBlogCommentShare() { - _classCallCheck(this, EmBlogCommentShare); - - this.shares = []; - this.desc = ''; - - _initDefineProp(this, 'blog', _descriptor, this); - - _initDefineProp(this, 'comment', _descriptor2, this); - - _initDefineProp(this, 'loginUser', _descriptor3, this); - - this.basePath = utils.getBasePath(); - } - - EmBlogCommentShare.prototype.attached = function attached() { - var _this = this; - - $(this.searchRef).search({ - minCharacters: 2, - cache: false, - selectFirstResult: true, - showNoResults: false, - onSelect: function onSelect(result, response) { - result.item._id = _.uniqueId('share-item-'); - result.item._type = result.item.username ? 'user' : 'channel'; - _this.shares.push(result.item); - _.defer(function () { - $(_this.inputSearchRef).val(''); - }); - }, - apiSettings: { - onResponse: function onResponse(resp) { - var response = { - results: [] - }; - $.each(resp.data.users, function (index, item) { - if (!_.find(_.filter(_this.shares, function (c) { - return c._type == 'user'; - }), { username: item.username })) { - response.results.push({ - item: item, - title: ' ' + item.name + ' (' + item.username + ')' - }); - } - }); - $.each(resp.data.channels, function (index, item) { - if (!_.find(_.filter(_this.shares, function (c) { - return c._type == 'channel'; - }), { name: item.name })) { - response.results.push({ - item: item, - title: ' ' + item.title + ' (' + item.name + ')' - }); - } - }); - return response; - }, - url: '/admin/blog/share/to/search?search={query}' - } - }); - $(this.shareRef).popup({ - on: 'click', - inline: true, - silent: true, - position: 'bottom right', - jitter: 300, - delay: { - show: 300, - hide: 300 - }, - onVisible: function onVisible() { - $(_this.inputSearchRef).focus(); - } - }); - }; - - EmBlogCommentShare.prototype.shareSearchKeyupHandler = function shareSearchKeyupHandler(event) { - if (event.keyCode === 13 && !$(this.searchRef).search('is visible')) { - var val = $(this.inputSearchRef).val(); - if (utils.isMail(val)) { - if (!_.find(_.filter(this.shares, function (c) { - return c._type == 'mail'; - }), { mail: val })) { - this.shares.push({ - _id: _.uniqueId('share-item-'), - _type: 'mail', - mail: val - }); - $(this.inputSearchRef).val(''); - } - } - } - }; - - EmBlogCommentShare.prototype.show = function show() { - $(this.shareRef).popup('show'); - }; - - EmBlogCommentShare.prototype.removeShareHandler = function removeShareHandler(item) { - this.shares = _.reject(this.shares, { _id: item._id }); - }; - - EmBlogCommentShare.prototype.cancelHandler = function cancelHandler() { - this._reset(); - }; - - EmBlogCommentShare.prototype._reset = function _reset() { - this.shares = []; - this.desc = ''; - $(this.inputSearchRef).val(''); - $(this.shareRef).popup('hide'); - }; - - EmBlogCommentShare.prototype.shareHandler = function shareHandler() { - var _this2 = this; - - if (this.shares.length === 0) { - toastr.error('请先指定博文评论分享用户或者频道或者邮箱!'); - return; - } - - this.ajaxS = $.post('/admin/blog/comment/share', { - basePath: utils.getBasePath(), - href: this.basePath + '#/blog/' + this.blog.id + '?cid=' + this.comment.id, - id: this.comment.id, - desc: this.desc, - html: utils.md2html(this.comment.content), - users: _.chain(this.shares).filter(function (item) { - return item._type == 'user'; - }).map('username').join().value(), - channels: _.chain(this.shares).filter(function (item) { - return item._type == 'channel'; - }).map('name').join().value(), - mails: _.chain(this.shares).filter(function (item) { - return item._type == 'mail'; - }).map('mail').join().value() - }, function (data, textStatus, xhr) { - if (data.success) { - _this2._reset(); - toastr.success('博文评论分享成功!'); - } else { - toastr.error(data.data, '博文评论分享失败!'); - } - }); - }; - - return EmBlogCommentShare; - }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'blog', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'comment', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'loginUser', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - })), _class2)) || _class; -}); -define('resources/elements/em-blog-comment',['exports', 'aurelia-framework', 'simplemde', 'dropzone', 'common/common-emoji'], function (exports, _aureliaFramework, _simplemde, _dropzone, _commonEmoji) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmBlogComment = undefined; - - var _simplemde2 = _interopRequireDefault(_simplemde); - - var _dropzone2 = _interopRequireDefault(_dropzone); - - var _commonEmoji2 = _interopRequireDefault(_commonEmoji); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { - default: obj - }; - } - - function _initDefineProp(target, property, descriptor, context) { - if (!descriptor) return; - Object.defineProperty(target, property, { - enumerable: descriptor.enumerable, - configurable: descriptor.configurable, - writable: descriptor.writable, - value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 - }); - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { - var desc = {}; - Object['ke' + 'ys'](descriptor).forEach(function (key) { - desc[key] = descriptor[key]; - }); - desc.enumerable = !!desc.enumerable; - desc.configurable = !!desc.configurable; - - if ('value' in desc || desc.initializer) { - desc.writable = true; - } - - desc = decorators.slice().reverse().reduce(function (desc, decorator) { - return decorator(target, property, desc) || desc; - }, desc); - - if (context && desc.initializer !== void 0) { - desc.value = desc.initializer ? desc.initializer.call(context) : void 0; - desc.initializer = undefined; - } - - if (desc.initializer === void 0) { - Object['define' + 'Property'](target, property, desc); - desc = null; - } - - return desc; - } - - function _initializerWarningHelper(descriptor, context) { - throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.'); - } - - var _class, _desc, _value, _class2, _descriptor; - - var EmBlogComment = exports.EmBlogComment = (0, _aureliaFramework.containerless)(_class = (_class2 = function () { - EmBlogComment.prototype.blogChanged = function blogChanged(newValue, oldValue) { - this._refresh(); - }; - - function EmBlogComment() { - var _this2 = this; - - _classCallCheck(this, EmBlogComment); - - this.comments = []; - this.baseUrl = utils.getUrl(); - this.basePath = utils.getBasePath(); - this.offset = 0; - this.isSuper = nsCtx.isSuper; - this.loginUser = nsCtx.loginUser; - this.users = nsCtx.users; - - _initDefineProp(this, 'blog', _descriptor, this); - - this.subscribe = ea.subscribe(nsCons.EVENT_BLOG_COMMENT_MSG_INSERT, function (payload) { - _this2.insertContent('' + payload.content); - _this2._scrollTo('b'); - }); - } - - EmBlogComment.prototype.unbind = function unbind() { - this.subscribe.dispose(); - }; - - EmBlogComment.prototype._refresh = function _refresh() { - var _this3 = this; - - if (!this.blog) { - return; - } - $.get('/admin/blog/comment/query', { - id: this.blog.id, - page: 0, - size: 1000 - }, function (data) { - if (data.success) { - (function () { - _this3.comments = data.data.content; - var cid = utils.urlQuery('cid'); - if (cid) { - _.defer(function () { - _this3.scrollToAfterImgLoaded(cid); - }); - } - ea.publish(nsCons.EVENT_BLOG_COMMENT_CHANGED, { - action: 'query', - comments: _this3.comments - }); - })(); - } else { - toastr.error(data.data); - } - }); - }; - - EmBlogComment.prototype.attached = function attached() { - var _this4 = this; - - this._init(); - - $('.em-blog-comment .comments').on('mouseenter', '.markdown-body a[href*="#/blog/"]:not(.pp-not)', function (event) { - event.preventDefault(); - var $a = $(event.currentTarget); - var cid = utils.urlQuery('cid', $a.attr('href')); - cid && ea.publish(nsCons.EVENT_BLOG_COMMENT_POPUP_SHOW, { - id: cid, - target: event.currentTarget - }); - }); - - $('.em-blog-comment .comments').on('dblclick', '.comment', function (event) { - if (event.ctrlKey) { - var cid = $(event.currentTarget).attr('data-id'); - var $t = $(event.currentTarget).find('.content > textarea'); - var item = _.find(_this4.comments, { id: +cid }); - if (_this4.isSuper || item.creator.username == _this4.loginUser.username) { - _this4.editHandler(item, $t); - } - } - }); - - $('.em-blog-comment .comments').on('click', '.comment', function (event) { - _this4.focusedComment = $(event.currentTarget); - }); - - this.initHotkeys(); - }; - - EmBlogComment.prototype.initHotkeys = function initHotkeys() { - var _this5 = this; - - $(document).bind('keydown', 'r', function (evt) { - evt.preventDefault(); - $('.em-blog-content').scrollTo('max', 120, { - offset: 0 - }); - _this5.simplemde.codemirror.focus(); - }).bind('keydown', 'alt+up', function (evt) { - evt.preventDefault(); - $('.em-blog-content').scrollTo(_this5.getScrollTargetComment(true), 120, { - offset: 0 - }); - }).bind('keydown', 'alt+down', function (evt) { - evt.preventDefault(); - $('.em-blog-content').scrollTo(_this5.getScrollTargetComment(), 120, { - offset: 0 - }); - }); - }; - - EmBlogComment.prototype.getScrollTargetComment = function getScrollTargetComment(isPrev) { - if (isPrev) { - if (this.focusedComment && this.focusedComment.size() === 1) { - var $avatar = this.focusedComment.find('> a.em-user-avatar'); - if (utils.isElementInViewport($avatar)) { - var prev = this.focusedComment.prev('.comment'); - prev.size() === 1 && (this.focusedComment = prev); - } - } else { - this.focusedComment = $(this.blogCommentsRef).children('.comment:first'); - } - } else { - if (this.focusedComment && this.focusedComment.size() === 1) { - var next = this.focusedComment.next('.comment'); - next.size() === 1 && (this.focusedComment = next); - } else { - this.focusedComment = $(this.blogCommentsRef).children('.comment:last'); - } - } - return this.focusedComment; - }; - - EmBlogComment.prototype._init = function _init() { - var _this6 = this; - - this.simplemde = new _simplemde2.default({ - element: this.commentRef, - spellChecker: false, - status: false, - - toolbar: [{ - name: "bold", - action: _simplemde2.default.toggleBold, - className: "fa fa-bold", - title: "粗体" - }, { - name: "italic", - action: _simplemde2.default.toggleItalic, - className: "fa fa-italic", - title: "斜体" - }, { - name: "strikethrough", - action: _simplemde2.default.toggleStrikethrough, - className: "fa fa-strikethrough", - title: "删除线" - }, { - name: "heading", - action: _simplemde2.default.toggleHeadingSmaller, - className: "fa fa-header", - title: "标题" - }, { - name: "heading-smaller", - action: _simplemde2.default.toggleHeadingSmaller, - className: "fa fa-header fa-header-x fa-header-smaller", - title: "变小标题" - }, { - name: "heading-bigger", - action: _simplemde2.default.toggleHeadingBigger, - className: "fa fa-header fa-header-x fa-header-bigger", - title: "变大标题" - }, "|", { - name: "code", - action: _simplemde2.default.toggleCodeBlock, - className: "fa fa-code", - title: "代码" - }, { - name: "quote", - action: _simplemde2.default.toggleBlockquote, - className: "fa fa-quote-left", - title: "引用" - }, { - name: "unordered-list", - action: _simplemde2.default.toggleUnorderedList, - className: "fa fa-list-ul", - title: "无序列表" - }, { - name: "ordered-list", - action: _simplemde2.default.toggleOrderedList, - className: "fa fa-list-ol", - title: "有序列表" - }, { - name: "tasks", - action: function action(editor) { - _this6.insertContent('- [ ] 未完成任务\n- [x] 已完成任务'); - }, - className: "fa fa-check-square-o ", - title: "任务列表" - }, { - name: "details", - action: function action(editor) { - _this6.insertContent('
    \n标题\n

    详情内容

    \n
    '); - }, - className: "fa fa-play ", - title: "折叠详情" - }, "|", { - name: "link", - action: _simplemde2.default.drawLink, - className: "fa fa-link", - title: "创建链接" - }, { - name: "image", - action: _simplemde2.default.drawImage, - className: "fa fa-picture-o", - title: "插入图片" - }, { - name: "table", - action: _simplemde2.default.drawTable, - className: "fa fa-table", - title: "插入表格" - }, { - name: "horizontal-rule", - action: _simplemde2.default.drawHorizontalRule, - className: "fa fa-minus", - title: "插入水平分割线" - }, "|", { - name: "upload", - action: function action(editor) {}, - className: "fa fa-upload", - title: "上传文件" - }, "|", { - name: "preview", - action: _simplemde2.default.togglePreview, - className: "fa fa-eye no-disable", - title: "切换预览" - }, { - name: "guide", - action: 'https://simplemde.com/markdown-guide', - className: "fa fa-question-circle", - title: "Markdown指南" - }], - insertTexts: { - table: ["", "\n\n| 列1 | 列2 | 列3 |\n| ------ | ------ | ------ |\n| 文本 | 文本 | 文本 |\n\n"] - }, - previewRender: function previewRender(plainText, preview) { - if (emojify) { - plainText = emojify.replace(plainText); - } - return marked(utils.preParse(plainText)); - } - }); - - this.simplemde.codemirror.on('keyup', function (cm, e) { - if (e.ctrlKey && e.keyCode == 13) { - _this6.addHandler(); - } else if (e.keyCode == 27) { - _this6.simplemde.value(''); - } - }); - - this.$chatMsgInputRef = $(this.markdownRef).find('.CodeMirror textarea'); - if (this.$chatMsgInputRef.size() === 0) { - this.$chatMsgInputRef = $(this.markdownRef).find('.CodeMirror [contenteditable="true"]'); - } - - this.initPaste(); - - this.initTextcomplete(); - - this.initUploadDropzone($('.CodeMirror-wrap', this.markdownRef), function () { - return _this6.$chatMsgInputRef; - }, false); - - this.initUploadDropzone($('.editor-toolbar .fa.fa-upload', this.markdownRef), function () { - return _this6.$chatMsgInputRef; - }, true); - }; - - EmBlogComment.prototype.initTextcomplete = function initTextcomplete() { - var _this7 = this; - - $(this.$chatMsgInputRef).textcomplete([{ - match: /(^|\s)@(\w*)$/, - search: function search(term, callback) { - callback($.map(nsCtx.users, function (member) { - return member.enabled && member.username.indexOf(term) >= 0 ? member.username : null; - })); - }, - template: function template(value, term) { - var user = _.find(nsCtx.users, { username: value }); - return user.name + ' - ' + user.mails + ' (' + user.username + ')'; - }, - replace: function replace(value) { - return '$1{~' + value + '}'; - } - }, { - match: /(^|\s):([\+\-\w]*)$/, - search: function search(term, callback) { - callback($.map(_commonEmoji2.default, function (emoji) { - return _.some(emoji.split('_'), function (item) { - return item.indexOf(term) === 0; - }) ? emoji : null; - })); - }, - template: function template(value, term) { - if (value == 'search') { - return '\u8868\u60C5\u67E5\u627E - :search'; - } - var emojiKey = ':' + value + ':'; - return emojify.replace(emojiKey) + ' - ' + emojiKey; - }, - replace: function replace(value) { - if (_this7.tipsActionHandler(value)) { - return '$1:' + value + ': '; - } else { - return ''; - } - } - }], { - appendTo: '.tms-blog-comment-status-bar' - }); - - this.simplemde.codemirror.on('keydown', function (cm, e) { - if (_.includes([13, 38, 40], e.keyCode) && _this7.isTipsShow()) { - e.preventDefault(); - } - }); - }; - - EmBlogComment.prototype.isTipsShow = function isTipsShow() { - return $('.tms-blog-comment-status-bar').find('.textcomplete-dropdown:visible').size() === 1; - }; - - EmBlogComment.prototype.tipsActionHandler = function tipsActionHandler(value) { - - if (value == 'search') { - _.delay(function () { - utils.openNewWin(nsCons.STR_EMOJI_SEARCH_URL); - }, 200); - } else { - return true; - } - - return false; - }; - - EmBlogComment.prototype.unbind = function unbind() { - this._reset(); - }; - - EmBlogComment.prototype._reset = function _reset() { - this.blog = null; - this.simplemde.value(''); - this.simplemde.toTextArea(); - this.simplemde = null; - }; - - EmBlogComment.prototype.insertContent = function insertContent(content, mde) { - try { - var cm = mde ? mde.codemirror : this.simplemde.codemirror; - var cursor = cm.getCursor(); - if (cursor) { - cm.replaceRange(content, cursor, cursor); - cm.focus(); - } - } catch (err) { - console.log(err); - } - }; - - EmBlogComment.prototype.replyHandler = function replyHandler(item) { - this.insertContent('[[\u56DE\u590D\u8BC4\u8BBA#' + item.id + '](' + this.baseUrl + '?cid=' + item.id + '){~' + item.creator.username + '}]\n\n'); - this._scrollTo('b'); - }; - - EmBlogComment.prototype.removeHandler = function removeHandler(item) { - var _this8 = this; - - $.post('/admin/blog/comment/remove', { - cid: item.id - }, function (data, textStatus, xhr) { - if (data.success) { - _this8.comments = _.reject(_this8.comments, { id: item.id }); - toastr.success('博文评论移除成功!'); - ea.publish(nsCons.EVENT_BLOG_COMMENT_CHANGED, { - action: 'removed', - comments: _this8.comments - }); - } else { - toastr.error(data.data, '博文评论移除失败!'); - } - }); - }; - - EmBlogComment.prototype.addHandler = function addHandler() { - var _this9 = this; - - var content = this.simplemde.value(); - - if (!$.trim(content)) { - this.simplemde.value(''); - toastr.error('评论内容不能为空!'); - return; - } - - if (this.sending) { - return; - } - - this.sending = true; - - var html = utils.md2html(content); - var users = [nsCtx.memberAll].concat(window.tmsUsers ? tmsUsers : []); - - $.post('/admin/blog/comment/create', { - basePath: utils.getBasePath(), - id: this.blog.id, - users: utils.parseUsernames(content, users).join(','), - content: content, - contentHtml: html - }, function (data, textStatus, xhr) { - if (data.success) { - _this9.comments = [].concat(_this9.comments, [data.data]); - _this9.simplemde.value(''); - toastr.success('博文评论提交成功!'); - _this9.scrollToAfterImgLoaded('b'); - ea.publish(nsCons.EVENT_BLOG_COMMENT_ADDED, {}); - ea.publish(nsCons.EVENT_BLOG_COMMENT_CHANGED, { - action: 'created', - comments: _this9.comments - }); - } else { - toastr.error(data.data, '博文评论提交失败!'); - } - }).always(function () { - _this9.sending = false; - }); - }; - - EmBlogComment.prototype.initPaste = function initPaste() { - var _this10 = this; - - var $paste = void 0; - if (this.$chatMsgInputRef.is('textarea')) { - $paste = $(this.$chatMsgInputRef).pastableTextarea(); - } else { - $paste = $(this.$chatMsgInputRef).pastableContenteditable(); - } - - $paste && $paste.on('pasteImage', function (ev, data) { - - $.post('/admin/file/base64', { - dataURL: data.dataURL, - type: data.blob.type, - toType: 'Blog' - }, function (data, textStatus, xhr) { - if (data.success) { - _this10.insertContent('![{name}]({baseURL}{path}{uuidName})'.replace(/\{name\}/g, data.data.name).replace(/\{baseURL\}/g, utils.getBaseUrl() + '/').replace(/\{path\}/g, data.data.path).replace(/\{uuidName\}/g, data.data.uuidName)); - } - }); - }).on('pasteImageError', function (ev, data) { - toastr.error(data.message, '剪贴板粘贴图片错误!'); - }); - }; - - EmBlogComment.prototype.initUploadDropzone = function initUploadDropzone(domRef, getInputTargetCb, clickable) { - - var _this = this; - - $(domRef).dropzone({ - url: "/admin/file/upload", - paramName: 'file', - clickable: !!clickable, - dictDefaultMessage: '', - maxFilesize: 10, - addRemoveLinks: true, - previewsContainer: '.em-blog-comment .dropzone-previews', - previewTemplate: $('.em-blog-comment .preview-template')[0].innerHTML, - dictCancelUpload: '取消上传', - dictCancelUploadConfirmation: '确定要取消上传吗?', - dictFileTooBig: '文件过大({{filesize}}M),最大限制:{{maxFilesize}}M', - init: function init() { - this.on("sending", function (file, xhr, formData) { - if (!getInputTargetCb()) { - this.removeAllFiles(true); - } else { - formData.append('toType', 'Blog'); - } - }); - this.on("success", function (file, data) { - if (data.success) { - - $.each(data.data, function (index, item) { - if (item.type == 'Image') { - _this.insertContent('![{name}]({baseURL}{path}{uuidName}) '.replace(/\{name\}/g, item.name).replace(/\{baseURL\}/g, utils.getBaseUrl() + '/').replace(/\{path\}/g, item.path).replace(/\{uuidName\}/g, item.uuidName)); - } else { - _this.insertContent('[{name}]({baseURL}{path}{uuidName}) '.replace(/\{name\}/g, item.name).replace(/\{baseURL\}/g, utils.getBaseUrl() + '/').replace(/\{path\}/g, "admin/file/download/").replace(/\{uuidName\}/g, item.id)); - } - }); - toastr.success('上传成功!'); - } else { - toastr.error(data.data, '上传失败!'); - } - }); - this.on("error", function (file, errorMessage, xhr) { - toastr.error(errorMessage, '上传失败!'); - }); - this.on("complete", function (file) { - this.removeFile(file); - }); - } - }); - }; - - EmBlogComment.prototype.scrollToAfterImgLoaded = function scrollToAfterImgLoaded(to) { - var _this11 = this; - - _.defer(function () { - new ImagesLoaded($('.em-blog-content')[0]).always(function () { - _this11._scrollTo(to); - }); - - _this11._scrollTo(to); - }); - }; - - EmBlogComment.prototype._scrollTo = function _scrollTo(to) { - if (to == 'b') { - $('.em-blog-content').scrollTo('max'); - } else if (to == 't') { - $('.em-blog-content').scrollTo(0); - } else { - if (_.some(this.comments, { id: +to })) { - $('.em-blog-content').scrollTo('.comment[data-id="' + to + '"]', { - offset: this.offset - }); - $('.em-blog-content').find('.comment[data-id]').removeClass('active'); - $('.em-blog-content').find('.comment[data-id=' + to + ']').addClass('active'); - } else { - $('.em-blog-content').scrollTo('max'); - toastr.warning('\u535A\u6587\u8BC4\u8BBA[' + to + ']\u4E0D\u5B58\u5728,\u53EF\u80FD\u5DF2\u7ECF\u88AB\u5220\u9664!'); - } - } - }; - - EmBlogComment.prototype.editHandler = function editHandler(item, editTxtRef) { - $.get('/admin/blog/comment/get', { - cid: item.id - }, function (data) { - if (data.success) { - if (item.version != data.data.version) { - _.extend(item, data.data); - } - item.isEditing = true; - item.contentOld = item.content; - _.defer(function () { - $(editTxtRef).focus().select(); - autosize.update(editTxtRef); - }); - } else { - toastr.error(data.data); - } - }); - }; - - EmBlogComment.prototype.refreshHandler = function refreshHandler(item) { - $.get('/admin/blog/comment/get', { - cid: item.id - }, function (data) { - if (item.version != data.data.version) { - _.extend(item, data.data); - toastr.success('刷新同步成功!'); - } else { - toastr.info('博文评论内容暂无变更!'); - } - }); - }; - - EmBlogComment.prototype.eidtKeydownHandler = function eidtKeydownHandler(evt, item, txtRef) { - - if (this.sending) { - return false; - } - - if (evt.ctrlKey && evt.keyCode === 13) { - - this.editSave(item, txtRef); - - return false; - } else if (evt.ctrlKey && evt.keyCode === 85) { - $(txtRef).next('.tms-blog-comment-edit-actions').find('.upload').click(); - return false; - } else if (evt.keyCode === 27) { - this.editCancelHandler(evt, item, txtRef); - } - - return true; - }; - - EmBlogComment.prototype.editOkHandler = function editOkHandler(evt, item, txtRef) { - this.editSave(item, txtRef); - item.isEditing = false; - }; - - EmBlogComment.prototype.editCancelHandler = function editCancelHandler(evt, item, txtRef) { - item.content = item.contentOld; - $(txtRef).val(item.content); - item.isEditing = false; - }; - - EmBlogComment.prototype.editSave = function editSave(item, txtRef) { - var _this12 = this; - - this.sending = true; - - item.content = $(txtRef).val(); - - var html = utils.md2html(item.content); - var htmlOld = utils.md2html(item.contentOld); - - var users = [nsCtx.memberAll].concat(window.tmsUsers ? tmsUsers : []); - $.post('/admin/blog/comment/update', { - basePath: utils.getBasePath(), - id: this.blog.id, - cid: item.id, - version: item.version, - users: utils.parseUsernames(item.content, users).join(','), - content: item.content, - contentHtml: html, - diff: utils.diffS(item.contentOld, item.content) - }, function (data, textStatus, xhr) { - if (data.success) { - toastr.success('博文评论更新成功!'); - item.isEditing = false; - item.version = data.data.version; - } else { - toastr.error(data.data, '博文评论更新失败!'); - } - }).always(function () { - _this12.sending = false; - }); - }; - - EmBlogComment.prototype.isZanDone = function isZanDone(comment) { - var voteZan = comment.voteZan; - if (!voteZan) { - return false; - } - - return voteZan.split(',').includes(this.loginUser.username); - }; - - EmBlogComment.prototype.rateHandler = function rateHandler(item) { - $.post('/admin/blog/comment/vote', { - cid: item.id, - url: utils.getBasePath(), - contentHtml: utils.md2html(item.content), - type: this.isZanDone(item) ? 'Cai' : 'Zan' - }, function (data, textStatus, xhr) { - if (data.success) { - _.extend(item, data.data); - } else { - toastr.error(data.data, '博文投票失败!'); - } - }); - }; - - EmBlogComment.prototype.gotoTopHandler = function gotoTopHandler() { - $('.em-blog-content').scrollTo(0, 120); - }; - - return EmBlogComment; - }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'blog', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - })), _class2)) || _class; -}); -define('resources/elements/em-blog-content',['exports', 'aurelia-framework', 'clipboard-js', 'clipboard'], function (exports, _aureliaFramework, _clipboardJs, _clipboard) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmBlogContent = undefined; - - var _clipboardJs2 = _interopRequireDefault(_clipboardJs); - - var _clipboard2 = _interopRequireDefault(_clipboard); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { - default: obj - }; - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var _class; - - var EmBlogContent = exports.EmBlogContent = (0, _aureliaFramework.containerless)(_class = function () { - function EmBlogContent() { - var _this = this; - - _classCallCheck(this, EmBlogContent); - - this.loginUser = nsCtx.loginUser; - this.isSuper = nsCtx.isSuper; - this.isAdmin = nsCtx.isAdmin; - - this.subscribe = ea.subscribe(nsCons.EVENT_BLOG_SWITCH, function (payload) { - _this.getBlog(); - ea.publish(nsCons.EVENT_BLOG_RIGHT_SIDEBAR_TOGGLE, { - isHide: true - }); - }); - this.subscribe2 = ea.subscribe(nsCons.EVENT_BLOG_CHANGED, function (payload) { - if (payload.action == 'updated') { - _.extend(_this.blog, payload.blog); - _.defer(function () { - return _this.catalogHandler(true); - }); - } - }); - this.subscribe3 = ea.subscribe(nsCons.EVENT_BLOG_COMMENT_ADDED, function (payload) { - if (!_this.blogFollower) { - _this.getFollower(); - } - }); - this.subscribe4 = ea.subscribe(nsCons.EVENT_BLOG_COMMENT_CHANGED, function (payload) { - _this.comments = payload.comments; - }); - - this.throttleCreateHandler = _.throttle(function () { - _this.createHandler(); - }, 1000, { 'trailing': false }); - this.throttleEditHandler = _.throttle(function () { - _this.editHandler(); - }, 1000, { 'trailing': false }); - this.throttleCopyHandler = _.throttle(function () { - _this.copyHandler(); - }, 1000, { 'trailing': false }); - } - - EmBlogContent.prototype.unbind = function unbind() { - this.subscribe.dispose(); - this.subscribe2.dispose(); - this.subscribe3.dispose(); - this.subscribe4.dispose(); - }; - - EmBlogContent.prototype.attached = function attached() { - var _this2 = this; - - this.getBlog(); - - new _clipboard2.default('.em-blog-content .tms-clipboard').on('success', function (e) { - toastr.success('复制到剪贴板成功!'); - }).on('error', function (e) { - toastr.error('复制到剪贴板失败!'); - }); - - $('.em-blog-content').on('click', 'code[data-code]', function (event) { - if (event.ctrlKey) { - event.stopImmediatePropagation(); - event.preventDefault(); - _clipboardJs2.default.copy($(event.currentTarget).attr('data-code')).then(function () { - toastr.success('复制到剪贴板成功!'); - }, function (err) { - toastr.error('复制到剪贴板失败!'); - }); - } - }); - - $('.em-blog-content').on('click', '.pre-code-wrapper', function (event) { - if (event.ctrlKey) { - event.stopImmediatePropagation(); - event.preventDefault(); - _clipboardJs2.default.copy($(event.currentTarget).find('i[data-clipboard-text]').attr('data-clipboard-text')).then(function () { - toastr.success('复制到剪贴板成功!'); - }, function (err) { - toastr.error('复制到剪贴板失败!'); - }); - } - }); - - $('.em-blog-right-sidebar').on('click', '.panel-blog-dir .wiki-dir-item', function (event) { - event.preventDefault(); - if ($(window).width() <= 768) { - ea.publish(nsCons.EVENT_BLOG_RIGHT_SIDEBAR_TOGGLE, { isHide: true }); - } - $('.em-blog-content').scrollTo('#' + $(event.currentTarget).attr('data-id'), 200, { - offset: 0 - }); - }); - - $(this.mkbodyRef).on('dblclick', function (event) { - if (event.ctrlKey) { - if (_this2.blog.openEdit || _this2.isSuper || _this2.blog.creator.username == _this2.loginUser.username) { - _this2.editHandler(); - } - } - }); - - $('.em-blog-content').scroll(_.throttle(function (event) { - try { - var sHeight = $('.em-blog-content')[0].scrollHeight; - var sTop = $('.em-blog-content')[0].scrollTop; - - var scale = sTop * 1.0 / (sHeight - $('.em-blog-content').outerHeight()); - _this2.progressWidth = $('.em-blog-content').outerWidth() * scale; - - _this2.fixDirItem(); - } catch (err) { - _this2.progressWidth = 0; - } - }, 10)); - - $(this.feedRef).on('mouseenter', '.event a[href*="#/blog/"]:not(.pp-not)', function (event) { - event.preventDefault(); - var $a = $(event.currentTarget); - var cid = utils.urlQuery('cid', $a.attr('href')); - cid && ea.publish(nsCons.EVENT_BLOG_COMMENT_POPUP_SHOW, { - id: cid, - target: event.currentTarget - }); - }); - - this.initHotkeys(); - }; - - EmBlogContent.prototype.fixDirItem = function fixDirItem() { - var fixId = null; - var preId = null; - _.each(this.dirItemIds, function (id) { - if (!preId) { - if (utils.isElementInViewport($('#' + id))) { - fixId = id; - return false; - } - } else { - if (utils.isElementInViewport($('#' + id)) && !utils.isElementInViewport($('#' + preId))) { - fixId = id; - return false; - } - } - }); - - if (fixId) { - var fixDirItem = $('.em-blog-right-sidebar .panel-blog-dir').find('.wiki-dir-item[data-id="' + fixId + '"]'); - if (fixDirItem) { - $('.em-blog-right-sidebar .panel-blog-dir').find('.wiki-dir-item[data-id]').removeClass('active'); - fixDirItem.addClass('active'); - - $('.em-blog-right-sidebar .scrollbar-macosx.scroll-content.scroll-scrolly_visible').scrollTo(fixDirItem, 10, { - offset: -120 - }); - } - } - }; - - EmBlogContent.prototype.initHotkeys = function initHotkeys() { - var _this3 = this; - - try { - $(document).bind('keyup', 'e', function (evt) { - evt.preventDefault(); - if (_this3.blog.openEdit || _this3.isSuper || _this3.blog.creator.username == _this3.loginUser.username) { - _this3.throttleEditHandler(); - } - }).bind('keyup', 'c', function (evt) { - evt.preventDefault(); - _this3.throttleCreateHandler(); - }).bind('keydown', 'd', function (evt) { - evt.preventDefault(); - if (_this3.dir) { - _this3.catalogHandler(); - } - }).bind('keydown', 's', function (evt) { - evt.preventDefault(); - _this3.blogShareVm.show(); - }).bind('keydown', 'f', function (evt) { - evt.preventDefault(); - _this3.followerHandler(); - }).bind('keydown', 't', function (event) { - event.preventDefault(); - $('.em-blog-content').scrollTo(0, 200, { - offset: 0 - }); - }).bind('keydown', 'b', function (event) { - event.preventDefault(); - $('.em-blog-content').scrollTo('max', 200, { - offset: 0 - }); - }).bind('keydown', 'alt+r', function (event) { - event.preventDefault(); - _this3.refreshHandler(); - }).bind('keydown', 'alt+h', function (event) { - event.preventDefault(); - _this3.historyHandler(); - }).bind('keydown', 'alt+l', function (event) { - event.preventDefault(); - _this3.authHandler(); - }).bind('keydown', 'alt+s', function (event) { - event.preventDefault(); - _this3.stowHandler(); - }).bind('keydown', 'alt+c', function (event) { - event.preventDefault(); - _this3.throttleCopyHandler(); - }).bind('keydown', 'alt+m', function (event) { - event.preventDefault(); - _this3.updateSpaceHandler(); - }).bind('keydown', 'alt+o', function (event) { - event.preventDefault(); - _this3.openEditHandler(); - }).bind('keydown', 'alt+ctrl+d', function (event) { - event.preventDefault(); - _this3.deleteHandler(); - }); - } catch (err) { - console.log(err); - } - }; - - EmBlogContent.prototype._dir = function _dir() { - var _this4 = this; - - this.dir = utils.dir($(this.mkbodyRef), 'tms-blog-dir-item-'); - this.dirItemIds = []; - if (this.dir) { - $(this.dir).find('a.item.wiki-dir-item').each(function (index, el) { - _this4.dirItemIds.push($(el).attr('data-id')); - }); - } - return this.dir; - }; - - EmBlogContent.prototype.getMyLog = function getMyLog() { - var _this5 = this; - - this.ajaxS = $.get('/admin/blog/log/my', function (data) { - if (data.success) { - _this5.logs = data.data; - } else { - toastr.error(data.data); - } - }); - }; - - EmBlogContent.prototype.getBlog = function getBlog() { - var _this6 = this; - - this.progressWidth = 0; - if (!nsCtx.blogId || isNaN(new Number(nsCtx.blogId))) { - this.blog = null; - this.getMyLog(); - return; - } - - this.getStow(); - this.getFollower(); - - return $.get('/admin/blog/get', { - id: nsCtx.blogId - }, function (data) { - if (data.success) { - _this6.blog = data.data; - ea.publish(nsCons.EVENT_BLOG_VIEW_CHANGED, _this6.blog); - _.defer(function () { - return _this6.catalogHandler(true); - }); - _this6.getMyTags(); - } else { - toastr.error(data.data, "获取博文失败!"); - } - }); - }; - - EmBlogContent.prototype.getMyTags = function getMyTags() { - var _this7 = this; - - $.get('/admin/blog/tag/my', function (data) { - var tags = []; - if (data.success) { - tags = data.data; - } - _this7.tags = _.unionBy(tags, _this7.blog.tags, 'name'); - - _.defer(function () { - var tags = _.map(_this7.blog.tags, "name"); - $(_this7.tagsRef).dropdown({}).dropdown('clear').dropdown('set selected', tags).dropdown({ - allowAdditions: true, - onAdd: function onAdd(addedValue, addedText, $addedChoice) { - $.post('/admin/blog/tag/add', { - id: _this7.blog.id, - tags: addedValue - }, function (data, textStatus, xhr) { - if (data.success) { - toastr.success('添加标签成功!'); - } else { - toastr.error(data.data, '添加标签失败!'); - } - }); - }, - onLabelRemove: function onLabelRemove(removedValue) { - $.post('/admin/blog/tag/remove', { - id: _this7.blog.id, - tags: removedValue - }, function (data, textStatus, xhr) { - if (data.success) { - toastr.success('移除标签成功!'); - } else { - toastr.error(data.data, '移除标签失败!'); - } - }); - } - }); - }); - }); - }; - - EmBlogContent.prototype.getStow = function getStow() { - var _this8 = this; - - $.get('/admin/blog/stow/get', { - id: nsCtx.blogId - }, function (data) { - if (data.success) { - _this8.blogStow = data.data; - } else { - toastr.error(data.data); - } - }); - }; - - EmBlogContent.prototype.getFollower = function getFollower() { - var _this9 = this; - - $.get('/admin/blog/follower/get', { - id: nsCtx.blogId - }, function (data) { - if (data.success) { - _this9.blogFollower = data.data; - } else { - toastr.error(data.data); - } - }); - }; - - EmBlogContent.prototype.editHandler = function editHandler() { - if (!nsCtx.isModaalOpening) { - ea.publish(nsCons.EVENT_BLOG_ACTION, { action: 'edit', id: this.blog.id }); - } - }; - - EmBlogContent.prototype.deleteHandler = function deleteHandler() { - var _this10 = this; - - if (this.isSuper || this.blog.creator.username == this.loginUser.username) { - this.emConfirmModal.show({ - title: '删除确认', - content: '确认要删除该博文吗?', - onapprove: function onapprove() { - $.post("/admin/blog/delete", { - id: _this10.blog.id - }, function (data, textStatus, xhr) { - if (data.success) { - toastr.success('删除博文成功!'); - ea.publish(nsCons.EVENT_BLOG_CHANGED, { - action: 'deleted', - blog: _this10.blog - }); - ea.publish(nsCons.EVENT_APP_ROUTER_NAVIGATE, { - to: '#/blog' - }); - } else { - toastr.error(data.data, '删除博文失败!'); - } - }); - } - }); - } - }; - - EmBlogContent.prototype.createHandler = function createHandler() { - if (!nsCtx.isModaalOpening) { - $('a[href="#modaal-blog-write"]').click(); - } - }; - - EmBlogContent.prototype.updateSpaceHandler = function updateSpaceHandler() { - if (this.isSuper || this.blog.creator.username == this.loginUser.username) { - this.blogSpaceUpdateVm.show(this.blog); - } - }; - - EmBlogContent.prototype.updatePrivatedHandler = function updatePrivatedHandler() { - var _this11 = this; - - $.post('/admin/blog/privated/update', { - id: this.blog.id, - privated: !this.blog.privated - }, function (data, textStatus, xhr) { - if (data.success) { - _.extend(_this11.blog, data.data); - ea.publish(nsCons.EVENT_BLOG_CHANGED, { - action: 'updated', - blog: _this11.blog - }); - toastr.success('更新博文可见性成功!'); - } else { - toastr.error(data.data, '更新博文可见性失败!'); - } - }); - }; - - EmBlogContent.prototype.isZanDone = function isZanDone() { - var voteZan = this.blog.voteZan; - if (!voteZan) { - return false; - } - - return voteZan.split(',').includes(this.loginUser.username); - }; - - EmBlogContent.prototype.rateHandler = function rateHandler() { - var _this12 = this; - - $.post('/admin/blog/vote', { - id: this.blog.id, - url: utils.getBasePath(), - contentHtml: utils.md2html(this.blog.content), - type: this.isZanDone() ? 'Cai' : 'Zan' - }, function (data, textStatus, xhr) { - if (data.success) { - _.extend(_this12.blog, data.data); - } else { - toastr.error(data.data, '博文投票失败!'); - } - }); - }; - - EmBlogContent.prototype.openEditHandler = function openEditHandler() { - var _this13 = this; - - if (this.isSuper || this.blog.creator.username == this.loginUser.username) { - $.post('/admin/blog/openEdit', { - id: this.blog.id, - open: !this.blog.openEdit - }, function (data, textStatus, xhr) { - if (data.success) { - _this13.blog.openEdit = !_this13.blog.openEdit; - ea.publish(nsCons.EVENT_BLOG_CHANGED, { - action: 'updated', - blog: _this13.blog - }); - toastr.success(_this13.blog.openEdit ? '开放协作编辑成功!' : '关闭协作编辑成功!'); - } else { - toastr.error(data.data, '协作编辑操作失败!'); - } - }); - } - }; - - EmBlogContent.prototype.refreshHandler = function refreshHandler() { - var p = this.getBlog(); - p && p.done(function () { - toastr.success('刷新操作成功!'); - }); - }; - - EmBlogContent.prototype.historyHandler = function historyHandler() { - this.blogHistoryVm.show(this.blog); - }; - - EmBlogContent.prototype.catalogHandler = function catalogHandler() { - var justRefresh = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; - - ea.publish(nsCons.EVENT_BLOG_RIGHT_SIDEBAR_TOGGLE, { - justRefresh: justRefresh, - action: 'dir', - dir: this._dir() - }); - }; - - EmBlogContent.prototype.authHandler = function authHandler() { - if (this.isSuper || this.blog.creator.username == this.loginUser.username) { - this.blogSpaceAuthVm.show('blog', this.blog); - } - }; - - EmBlogContent.prototype.copyHandler = function copyHandler() { - if (!nsCtx.isModaalOpening) { - ea.publish(nsCons.EVENT_BLOG_ACTION, { action: 'copy', id: this.blog.id }); - } - }; - - EmBlogContent.prototype.stowHandler = function stowHandler() { - var _this14 = this; - - if (!this.blogStow) { - $.post('/admin/blog/stow/add', { - id: this.blog.id - }, function (data, textStatus, xhr) { - if (data.success) { - _this14.blogStow = data.data; - ea.publish(nsCons.EVENT_BLOG_STOW_CHANGED, { action: 'add', data: _this14.blogStow }); - toastr.success('博文收藏成功!'); - } else { - toastr.error(data.data); - } - }); - } else { - $.post('/admin/blog/stow/remove', { - sid: this.blogStow.id - }, function (data, textStatus, xhr) { - if (data.success) { - ea.publish(nsCons.EVENT_BLOG_STOW_CHANGED, { action: 'remove', data: _this14.blogStow }); - _this14.blogStow = null; - toastr.success('删除博文收藏成功!'); - } else { - toastr.error(data.data); - } - }); - } - }; - - EmBlogContent.prototype.followerHandler = function followerHandler() { - var _this15 = this; - - if (!this.blogFollower) { - $.post('/admin/blog/follower/add', { - id: this.blog.id - }, function (data, textStatus, xhr) { - if (data.success) { - _this15.blogFollower = data.data; - toastr.success('博文关注成功!'); - } else { - toastr.error(data.data); - } - }); - } else { - $.post('/admin/blog/follower/remove', { - fid: this.blogFollower.id - }, function (data, textStatus, xhr) { - if (data.success) { - _this15.blogFollower = null; - toastr.success('取消博文关注成功!'); - } else { - toastr.error(data.data); - } - }); - } - }; - - EmBlogContent.prototype.dimmerHandler = function dimmerHandler() { - ea.publish(nsCons.EVENT_BLOG_LEFT_SIDEBAR_TOGGLE, { isHide: true }); - ea.publish(nsCons.EVENT_BLOG_RIGHT_SIDEBAR_TOGGLE, { isHide: true }); - }; - - EmBlogContent.prototype.commentsHandler = function commentsHandler() { - $('.em-blog-content').scrollTo('.em-blog-comment ', 120, { - offset: -16 - }); - }; - - EmBlogContent.prototype.openFeedEventItemHandler = function openFeedEventItemHandler(item) { - item.isOpen = !item.isOpen; - }; - - EmBlogContent.prototype.feedEventItemMouseleaveHandler = function feedEventItemMouseleaveHandler(item) { - item.isOpen = false; - }; - - EmBlogContent.prototype.refreshFeedHandler = function refreshFeedHandler() { - this.getMyLog(); - }; - - return EmBlogContent; - }()) || _class; -}); -define('resources/elements/em-blog-history-diff',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmBlogHistoryDiff = undefined; - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var _class; - - var EmBlogHistoryDiff = exports.EmBlogHistoryDiff = (0, _aureliaFramework.containerless)(_class = function () { - function EmBlogHistoryDiff() { - _classCallCheck(this, EmBlogHistoryDiff); - } - - EmBlogHistoryDiff.prototype.showHandler = function showHandler() {}; - - EmBlogHistoryDiff.prototype.approveHandler = function approveHandler() {}; - - EmBlogHistoryDiff.prototype.show = function show(f, s, fIndex, sIndex) { - this.f = f; - this.s = s; - this.fIndex = fIndex; - this.sIndex = sIndex; - this.diffHtml = utils.diffS(s.content, f.content); - this.emModal.show({ hideOnApprove: true, autoDimmer: false }); - }; - - return EmBlogHistoryDiff; - }()) || _class; -}); -define('resources/elements/em-blog-history-view',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmBlogHistoryView = undefined; - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var _class; - - var EmBlogHistoryView = exports.EmBlogHistoryView = (0, _aureliaFramework.containerless)(_class = function () { - function EmBlogHistoryView() { - _classCallCheck(this, EmBlogHistoryView); - - this.isSuper = nsCtx.isSuper; - this.loginUser = nsCtx.loginUser; - } - - EmBlogHistoryView.prototype.showHandler = function showHandler() {}; - - EmBlogHistoryView.prototype.approveHandler = function approveHandler() {}; - - EmBlogHistoryView.prototype.show = function show(blogHistory, ver, isCurrentVer) { - this.blogHistory = blogHistory; - this.blog = blogHistory.blog; - this.ver = ver; - this.isCurrentVer = isCurrentVer; - this.emModal.show({ hideOnApprove: true, autoDimmer: false }); - }; - - EmBlogHistoryView.prototype.restoreHandler = function restoreHandler() { - var _this = this; - - this.ajax1 = $.post('/admin/blog/history/restore', { hid: this.blogHistory.id }, function (data, textStatus, xhr) { - if (data.success) { - ea.publish(nsCons.EVENT_BLOG_CHANGED, { action: 'updated', blog: data.data }); - ea.publish(nsCons.EVENT_BLOG_HISTORY_CHANGED, {}); - toastr.success('博文历史记录还原成功!'); - _this.emModal.hide(); - } else { - toastr.error(data.data, '博文历史记录还原失败!'); - } - }); - }; - - return EmBlogHistoryView; - }()) || _class; -}); -define('resources/elements/em-blog-history',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmBlogHistory = undefined; - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var _class; - - var EmBlogHistory = exports.EmBlogHistory = (0, _aureliaFramework.containerless)(_class = function () { - function EmBlogHistory() { - var _this = this; - - _classCallCheck(this, EmBlogHistory); - - this.isSuper = nsCtx.isSuper; - this.loginUser = nsCtx.loginUser; - - this.subscribe = ea.subscribe(nsCons.EVENT_BLOG_HISTORY_CHANGED, function (payload) { - _this.refreshHistory(); - }); - } - - EmBlogHistory.prototype.unbind = function unbind() { - this.subscribe.dispose(); - }; - - EmBlogHistory.prototype.viewHistoryHandler = function viewHistoryHandler(blogHistory, ver, isCurrentVer) { - this.blogHistoryViewVm.show(blogHistory, ver, isCurrentVer); - }; - - EmBlogHistory.prototype.refreshHistory = function refreshHistory() { - var _this2 = this; - - $.get('/admin/blog/history/list', { - id: this.blog.id - }, function (data) { - if (data.success) { - _this2.oldHistories = data.data; - _this2.histories = _.reverse(_.clone(data.data)); - } else { - toastr.error(data.data, '获取博文历史失败!'); - } - }); - }; - - EmBlogHistory.prototype.showHandler = function showHandler() { - this.refreshHistory(); - }; - - EmBlogHistory.prototype.approveHandler = function approveHandler() {}; - - EmBlogHistory.prototype.show = function show(blog) { - this.blog = blog; - this.emModal.show({ hideOnApprove: true, autoDimmer: false }); - }; - - EmBlogHistory.prototype.restoreHandler = function restoreHandler(item) { - var _this3 = this; - - this.ajax1 = $.post('/admin/blog/history/restore', { hid: item.id }, function (data, textStatus, xhr) { - if (data.success) { - ea.publish(nsCons.EVENT_BLOG_CHANGED, { action: 'updated', blog: data.data }); - _this3.refreshHistory(); - toastr.success('博文历史记录还原成功!'); - } else { - toastr.error(data.data, '博文历史记录还原失败!'); - } - }); - }; - - EmBlogHistory.prototype.removeHandler = function removeHandler(item) { - var _this4 = this; - - this.ajax2 = $.post('/admin/blog/history/remove', { hid: item.id }, function (data, textStatus, xhr) { - if (data.success) { - _this4.refreshHistory(); - toastr.success('博文历史记录删除成功!'); - } else { - toastr.error(data.data, '博文历史记录删除失败!'); - } - }); - }; - - EmBlogHistory.prototype.diffHandler = function diffHandler() { - var list = [].concat(this.oldHistories, [this.blog]); - var chks = _.filter(list, 'checked'); - if (chks && chks.length > 1) { - var f = chks[chks.length - 1]; - var s = chks[chks.length - 2]; - var fIndex = _.indexOf(list, f); - var sIndex = _.indexOf(list, s); - this.blogHistoryDiffVm.show(f, s, fIndex, sIndex); - } else { - toastr.error('请先选择要比较版本'); - } - }; - - return EmBlogHistory; - }()) || _class; -}); -define('resources/elements/em-blog-left-sidebar',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmBlogLeftSidebar = undefined; - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var _class; - - var EmBlogLeftSidebar = exports.EmBlogLeftSidebar = (0, _aureliaFramework.containerless)(_class = function () { - function EmBlogLeftSidebar() { - var _this = this; - - _classCallCheck(this, EmBlogLeftSidebar); - - this.isHide = true; - this.blogs = []; - this.spaces = []; - this.noSpaceBlogs = []; - this.loginUser = nsCtx.loginUser; - this.isSuper = nsCtx.isSuper; - this.filter = ''; - this.spaceStow = { - name: '我的收藏', - open: false - }; - - this.subscribe = ea.subscribe(nsCons.EVENT_BLOG_CHANGED, function (payload) { - if (payload.action == 'created') { - _this.blogs = [payload.blog].concat(_this.blogs); - _this.calcTree(); - ea.publish(nsCons.EVENT_APP_ROUTER_NAVIGATE, { to: '#/blog/' + payload.blog.id }); - } else if (payload.action == 'updated') { - _.extend(_.find(_this.blogs, { id: payload.blog.id }), payload.blog); - _this.calcTree(); - } else if (payload.action == 'deleted') { - _this.blogStows = _.reject(_this.blogStows, function (bs) { - return bs.blog.id == payload.blog.id; - }); - _this.blogs = _.reject(_this.blogs, { id: payload.blog.id }); - _this.calcTree(); - } - }); - this.subscribe4 = ea.subscribe(nsCons.EVENT_SPACE_CHANGED, function (payload) { - if (payload.action == 'created') { - _this.spaces = [payload.space].concat(_this.spaces); - _this.calcTree(); - } else if (payload.action == 'updated') { - _.extend(_.find(_this.spaces, { id: payload.space.id }), payload.space); - _this.calcTree(); - } - }); - this.subscribe2 = ea.subscribe(nsCons.EVENT_BLOG_SWITCH, function (payload) { - _this.blog = _.find(_this.blogs, { id: +nsCtx.blogId }); - }); - this.subscribe3 = ea.subscribe(nsCons.EVENT_BLOG_TOGGLE_SIDEBAR, function (payload) { - _this.isHide = payload; - }); - this.subscribe5 = ea.subscribe(nsCons.EVENT_BLOG_STOW_CHANGED, function (payload) { - _this._refreshBlogStows(); - }); - - this._doFilerDebounce = _.debounce(function () { - return _this._doFiler(); - }, 120, { leading: true }); - } - - EmBlogLeftSidebar.prototype.unbind = function unbind() { - this.subscribe.dispose(); - this.subscribe2.dispose(); - this.subscribe3.dispose(); - this.subscribe4.dispose(); - this.subscribe5.dispose(); - }; - - EmBlogLeftSidebar.prototype.attached = function attached() { - - this.refresh(); - this._refreshSysLinks(); - this._refreshBlogStows(); - }; - - EmBlogLeftSidebar.prototype._refreshSysLinks = function _refreshSysLinks() { - var _this2 = this; - - $.get('/admin/link/listByApp', function (data) { - if (data.success) { - _this2.sysLinks = data.data; - } else { - _this2.sysLinks = []; - } - }); - }; - - EmBlogLeftSidebar.prototype._refreshBlogStows = function _refreshBlogStows() { - var _this3 = this; - - $.get('/admin/blog/stow/listMy', function (data) { - if (data.success) { - _this3.blogStows = data.data; - } else { - toastr.error(data.data); - } - }); - }; - - EmBlogLeftSidebar.prototype.refresh = function refresh() { - var _this4 = this; - - $.when(this.getSpaces(), this.getBlogTree()).done(function () { - _this4.calcTree(); - }); - }; - - EmBlogLeftSidebar.prototype.calcTree = function calcTree() { - var _this5 = this; - - this.noSpaceBlogs = []; - $.each(this.spaces, function (index, space) { - space.blogs = []; - $.each(_this5.blogs, function (index, blog) { - if (blog.space) { - if (blog.space.id === space.id) { - space.blogs.push(blog); - if (nsCtx.blogId == blog.id) { - space.open = true; - } - } - } - }); - }); - - this.noSpaceBlogs = _.filter(this.blogs, function (b) { - return !b.space; - }); - }; - - EmBlogLeftSidebar.prototype.spaceToggleHandler = function spaceToggleHandler(space) { - space.open = !space.open; - }; - - EmBlogLeftSidebar.prototype.getBlogTree = function getBlogTree() { - var _this6 = this; - - return $.get('/admin/blog/listMy', function (data) { - if (data.success) { - _this6.blogs = data.data; - _this6.blog = _.find(_this6.blogs, { id: +nsCtx.blogId }); - } - }); - }; - - EmBlogLeftSidebar.prototype.getSpaces = function getSpaces() { - var _this7 = this; - - return $.get('/admin/space/listMy', {}, function (data) { - if (data.success) { - _this7.spaces = data.data; - } - }); - }; - - EmBlogLeftSidebar.prototype.editSpaceHandler = function editSpaceHandler(space) { - this.spaceEditVm.show(space); - }; - - EmBlogLeftSidebar.prototype.delSpaceHandler = function delSpaceHandler(space) { - var _this8 = this; - - this.confirmMd.show({ - onapprove: function onapprove() { - $.post('/admin/space/delete', { - id: space.id - }, function (data) { - if (data.success) { - toastr.success('删除空间成功!'); - _this8.spaces = _.reject(_this8.spaces, { id: space.id }); - } else { - toastr.error(data.data, '删除空间失败!'); - } - }); - } - }); - }; - - EmBlogLeftSidebar.prototype.authSpaceHandler = function authSpaceHandler(space) { - this.blogSpaceAuthVm.show('space', space); - }; - - EmBlogLeftSidebar.prototype.clearFilterHandler = function clearFilterHandler() { - this.filter = ''; - this._doFilerDebounce(); - }; - - EmBlogLeftSidebar.prototype.filterKeyupHandler = function filterKeyupHandler(event) { - this._doFilerDebounce(); - }; - - EmBlogLeftSidebar.prototype._doFiler = function _doFiler() { - var _this9 = this; - - _.each(this.blogs, function (b) { - if (!_.includes(_.toLower(b.title), _.toLower(_this9.filter))) { - b._hidden = true; - } else { - b._hidden = false; - } - }); - - _.each(this.spaces, function (s) { - if (!_.some(s.blogs, function (b) { - return !b._hidden; - })) { - s._hidden = true; - } else { - s._hidden = false; - s.open = true; - } - }); - - _.each(this.blogStows, function (bs) { - if (!_.includes(_.toLower(bs.blog.title), _.toLower(_this9.filter))) { - bs._hidden = true; - } else { - bs._hidden = false; - } - }); - - if (!_.some(this.blogStows, function (bs) { - return !bs._hidden; - })) { - this.spaceStow.open = false; - } else { - this.spaceStow.open = true; - } - - if (!this.filter) { - _.each(this.spaces, function (s) { - if (_.find(s.blogs, { id: +nsCtx.blogId })) { - s.open = true; - } else { - s.open = false; - } - }); - this.spaceStow.open = false; - } - }; - - EmBlogLeftSidebar.prototype.sysLinkHandler = function sysLinkHandler(item) { - $.post('/admin/link/count/inc', { id: item.id }); - return true; - }; - - return EmBlogLeftSidebar; - }()) || _class; -}); -define('resources/elements/em-blog-right-sidebar',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmBlogRightSidebar = undefined; - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var _class; - - var EmBlogRightSidebar = exports.EmBlogRightSidebar = (0, _aureliaFramework.containerless)(_class = function () { - function EmBlogRightSidebar() { - var _this = this; - - _classCallCheck(this, EmBlogRightSidebar); - - this.subscribe = ea.subscribe(nsCons.EVENT_BLOG_RIGHT_SIDEBAR_TOGGLE, function (payload) { - if (payload.action == 'dir') { - $(_this.dirRef).empty().append(payload.dir); - } - }); - } - - EmBlogRightSidebar.prototype.unbind = function unbind() { - this.subscribe.dispose(); - }; - - return EmBlogRightSidebar; - }()) || _class; -}); -define('resources/elements/em-blog-save',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmBlogSave = undefined; - - function _initDefineProp(target, property, descriptor, context) { - if (!descriptor) return; - Object.defineProperty(target, property, { - enumerable: descriptor.enumerable, - configurable: descriptor.configurable, - writable: descriptor.writable, - value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 - }); - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { - var desc = {}; - Object['ke' + 'ys'](descriptor).forEach(function (key) { - desc[key] = descriptor[key]; - }); - desc.enumerable = !!desc.enumerable; - desc.configurable = !!desc.configurable; - - if ('value' in desc || desc.initializer) { - desc.writable = true; - } - - desc = decorators.slice().reverse().reduce(function (desc, decorator) { - return decorator(target, property, desc) || desc; - }, desc); - - if (context && desc.initializer !== void 0) { - desc.value = desc.initializer ? desc.initializer.call(context) : void 0; - desc.initializer = undefined; - } - - if (desc.initializer === void 0) { - Object['define' + 'Property'](target, property, desc); - desc = null; - } - - return desc; - } - - function _initializerWarningHelper(descriptor, context) { - throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.'); - } - - var _class, _desc, _value, _class2, _descriptor; - - var EmBlogSave = exports.EmBlogSave = (0, _aureliaFramework.containerless)(_class = (_class2 = function () { - EmBlogSave.prototype.triggerChanged = function triggerChanged() { - var _this = this; - - $(this.trigger).click(function (event) { - _this.show(); - }); - }; - - function EmBlogSave() { - var _this2 = this; - - _classCallCheck(this, EmBlogSave); - - _initDefineProp(this, 'trigger', _descriptor, this); - - this.loginUser = nsCtx.loginUser; - this.isSuper = nsCtx.isSuper; - - this.subscribe = ea.subscribe(nsCons.EVENT_BLOG_SAVE, function (payload) { - _this2.blogInfo = payload; - _this2.show(); - }); - } - - EmBlogSave.prototype.attached = function attached() { - $(this.chk).checkbox(); - }; - - EmBlogSave.prototype.unbind = function unbind() { - this.subscribe.dispose(); - }; - - EmBlogSave.prototype.show = function show() { - this.emModal.show({ hideOnApprove: false, autoDimmer: true }); - }; - - EmBlogSave.prototype.showHandler = function showHandler() { - var _this3 = this; - - $(this.chk).checkbox('set unchecked'); - $.get('/admin/space/listMy', function (data) { - if (data.success) { - _this3.spaces = data.data; - } - }); - }; - - EmBlogSave.prototype.approveHandler = function approveHandler(modal) { - var _this4 = this; - - var html = utils.md2html(this.blogInfo.content); - var users = [nsCtx.memberAll].concat(window.tmsUsers ? tmsUsers : []); - - var spaceId = $(this.spacesRef).dropdown('get value'); - - localStorage && localStorage.setItem(nsCons.KEY_BLOG_COMMON_SPACE, spaceId); - - $.post('/admin/blog/create', { - url: utils.getBasePath(), - usernames: utils.parseUsernames(this.blogInfo.content, users).join(','), - title: this.blogInfo.title, - content: this.blogInfo.content, - spaceId: spaceId, - privated: $(this.chk).checkbox('is checked'), - contentHtml: html - }, function (data, textStatus, xhr) { - if (data.success) { - _this4.blog = data.data; - toastr.success('博文保存成功!'); - ea.publish(nsCons.EVENT_BLOG_CHANGED, { - action: 'created', - blog: _this4.blog - }); - modal.hide(); - $('a[href="#modaal-blog-write"]').modaal('close'); - } else { - toastr.error(data.data, '博文保存失败!'); - } - }); - }; - - EmBlogSave.prototype.initSpacesHandler = function initSpacesHandler(last) { - var _this5 = this; - - if (last) { - _.defer(function () { - $(_this5.spacesRef).dropdown('clear'); - if (localStorage) { - var sid = localStorage.getItem(nsCons.KEY_BLOG_COMMON_SPACE); - if (sid) { - $(_this5.spacesRef).dropdown('set selected', sid); - } - } - }); - } - }; - - return EmBlogSave; - }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'trigger', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - })), _class2)) || _class; -}); -define('resources/elements/em-blog-share',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmBlogShare = undefined; - - function _initDefineProp(target, property, descriptor, context) { - if (!descriptor) return; - Object.defineProperty(target, property, { - enumerable: descriptor.enumerable, - configurable: descriptor.configurable, - writable: descriptor.writable, - value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 - }); - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { - var desc = {}; - Object['ke' + 'ys'](descriptor).forEach(function (key) { - desc[key] = descriptor[key]; - }); - desc.enumerable = !!desc.enumerable; - desc.configurable = !!desc.configurable; - - if ('value' in desc || desc.initializer) { - desc.writable = true; - } - - desc = decorators.slice().reverse().reduce(function (desc, decorator) { - return decorator(target, property, desc) || desc; - }, desc); - - if (context && desc.initializer !== void 0) { - desc.value = desc.initializer ? desc.initializer.call(context) : void 0; - desc.initializer = undefined; - } - - if (desc.initializer === void 0) { - Object['define' + 'Property'](target, property, desc); - desc = null; - } - - return desc; - } - - function _initializerWarningHelper(descriptor, context) { - throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.'); - } - - var _class, _desc, _value, _class2, _descriptor; - - var EmBlogShare = exports.EmBlogShare = (0, _aureliaFramework.containerless)(_class = (_class2 = function () { - function EmBlogShare() { - _classCallCheck(this, EmBlogShare); - - this.shares = []; - this.desc = ''; - - _initDefineProp(this, 'blog', _descriptor, this); - - this.basePath = utils.getBasePath(); - } - - EmBlogShare.prototype.attached = function attached() { - var _this = this; - - $(this.searchRef).search({ - minCharacters: 2, - cache: false, - selectFirstResult: true, - showNoResults: false, - onSelect: function onSelect(result, response) { - result.item._id = _.uniqueId('share-item-'); - result.item._type = result.item.username ? 'user' : 'channel'; - _this.shares.push(result.item); - _.defer(function () { - $(_this.inputSearchRef).val(''); - }); - }, - apiSettings: { - onResponse: function onResponse(resp) { - var response = { - results: [] - }; - $.each(resp.data.users, function (index, item) { - if (!_.find(_.filter(_this.shares, function (c) { - return c._type == 'user'; - }), { username: item.username })) { - response.results.push({ - item: item, - title: ' ' + item.name + ' (' + item.username + ')' - }); - } - }); - $.each(resp.data.channels, function (index, item) { - if (!_.find(_.filter(_this.shares, function (c) { - return c._type == 'channel'; - }), { name: item.name })) { - response.results.push({ - item: item, - title: ' ' + item.title + ' (' + item.name + ')' - }); - } - }); - return response; - }, - url: '/admin/blog/share/to/search?search={query}' - } - }); - $(this.shareRef).popup({ - on: 'click', - inline: true, - silent: true, - position: 'bottom right', - jitter: 300, - delay: { - show: 300, - hide: 300 - }, - onVisible: function onVisible() { - $(_this.inputSearchRef).focus(); - } - }); - }; - - EmBlogShare.prototype.shareSearchKeyupHandler = function shareSearchKeyupHandler(event) { - if (event.keyCode === 13 && !$(this.searchRef).search('is visible')) { - var val = $(this.inputSearchRef).val(); - if (utils.isMail(val)) { - if (!_.find(_.filter(this.shares, function (c) { - return c._type == 'mail'; - }), { mail: val })) { - this.shares.push({ - _id: _.uniqueId('share-item-'), - _type: 'mail', - mail: val - }); - $(this.inputSearchRef).val(''); - } - } - } - }; - - EmBlogShare.prototype.show = function show() { - $(this.shareRef).popup('show'); - }; - - EmBlogShare.prototype.removeShareHandler = function removeShareHandler(item) { - this.shares = _.reject(this.shares, { _id: item._id }); - }; - - EmBlogShare.prototype.cancelHandler = function cancelHandler() { - this._reset(); - }; - - EmBlogShare.prototype._reset = function _reset() { - this.shares = []; - this.desc = ''; - $(this.inputSearchRef).val(''); - $(this.shareRef).popup('hide'); - }; - - EmBlogShare.prototype.shareHandler = function shareHandler() { - var _this2 = this; - - if (this.shares.length === 0) { - toastr.error('请先指定博文分享用户或者频道或者邮箱!'); - return; - } - - this.ajaxS = $.post('/admin/blog/share', { - basePath: utils.getBasePath(), - id: this.blog.id, - desc: this.desc, - title: this.blog.title, - html: utils.md2html(this.blog.content), - users: _.chain(this.shares).filter(function (item) { - return item._type == 'user'; - }).map('username').join().value(), - channels: _.chain(this.shares).filter(function (item) { - return item._type == 'channel'; - }).map('name').join().value(), - mails: _.chain(this.shares).filter(function (item) { - return item._type == 'mail'; - }).map('mail').join().value() - }, function (data, textStatus, xhr) { - if (data.success) { - _this2._reset(); - toastr.success('博文分享成功!'); - } else { - toastr.error(data.data, '博文分享失败!'); - } - }); - }; - - return EmBlogShare; - }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'blog', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - })), _class2)) || _class; -}); -define('resources/elements/em-blog-space-auth',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmBlogSpaceAuth = undefined; - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var _class; - - var EmBlogSpaceAuth = exports.EmBlogSpaceAuth = (0, _aureliaFramework.containerless)(_class = function () { - function EmBlogSpaceAuth() { - _classCallCheck(this, EmBlogSpaceAuth); - - this.shares = []; - } - - EmBlogSpaceAuth.prototype._isBlog = function _isBlog() { - return this.type == 'blog'; - }; - - EmBlogSpaceAuth.prototype.attached = function attached() { - var _this = this; - - $(this.chk).checkbox({ - onChange: function onChange() { - if (_this._isBlog()) { - $.post('/admin/blog/privated/update', { - id: _this.authO.id, - privated: $(_this.chk).checkbox('is checked') - }, function (data, textStatus, xhr) { - if (data.success) { - _.extend(_this.authO, data.data); - ea.publish(nsCons.EVENT_BLOG_CHANGED, { - action: 'updated', - blog: data.data - }); - toastr.success('更新博文可见性成功!'); - } else { - toastr.error(data.data, '更新博文可见性失败!'); - } - }); - } else { - $.post('/admin/space/update', { - id: _this.authO.id, - privated: $(_this.chk).checkbox('is checked') - }, function (data, textStatus, xhr) { - if (data.success) { - _.extend(_this.authO, data.data); - ea.publish(nsCons.EVENT_SPACE_CHANGED, { - action: 'updated', - space: data.data - }); - toastr.success('更新空间可见性成功!'); - } else { - toastr.error(data.data, '更新空间可见性失败!'); - } - }); - } - } - }); - $(this.chk2).checkbox({ - onChange: function onChange() { - if (_this._isBlog()) { - $.post('/admin/blog/opened/update', { - id: _this.authO.id, - opened: $(_this.chk2).checkbox('is checked') - }, function (data, textStatus, xhr) { - if (data.success) { - _.extend(_this.authO, data.data); - ea.publish(nsCons.EVENT_BLOG_CHANGED, { - action: 'updated', - blog: data.data - }); - toastr.success('更新博文可见性成功!'); - } else { - toastr.error(data.data, '更新博文可见性失败!'); - } - }); - } else { - $.post('/admin/space/update', { - id: _this.authO.id, - opened: $(_this.chk2).checkbox('is checked') - }, function (data, textStatus, xhr) { - if (data.success) { - _.extend(_this.authO, data.data); - ea.publish(nsCons.EVENT_SPACE_CHANGED, { - action: 'updated', - space: data.data - }); - toastr.success('更新空间可见性成功!'); - } else { - toastr.error(data.data, '更新空间可见性失败!'); - } - }); - } - } - }); - - $(this.searchRef).search({ - minCharacters: 2, - cache: false, - selectFirstResult: true, - onSelect: function onSelect(result, response) { - result.item._id = _.uniqueId('share-item-'); - _.defer(function () { - $(_this.inputSearchRef).val(''); - }); - - var param = { id: _this.authO.id }; - if (result.item.username) { - _.extend(param, { users: result.item.username }); - } else { - _.extend(param, { channels: result.item.id }); - } - - if (_this._isBlog()) { - $.post('/admin/blog/auth/add', param, function (data, textStatus, xhr) { - if (data.success) { - _this.shares.push(result.item); - _this.authO.blogAuthorities = data.data.blogAuthorities; - } else { - toastr.error(data.data); - } - }); - } else { - $.post('/admin/space/auth/add', param, function (data, textStatus, xhr) { - if (data.success) { - _this.shares.push(result.item); - _this.authO.spaceAuthorities = data.data.spaceAuthorities; - } else { - toastr.error(data.data); - } - }); - } - }, - apiSettings: { - onResponse: function onResponse(resp) { - var response = { - results: [] - }; - $.each(resp.data.users, function (index, item) { - if (!_.find(_this.shares, { username: item.username })) { - response.results.push({ - item: item, - title: ' ' + item.name + ' (' + item.username + ')' - }); - } - }); - $.each(resp.data.channels, function (index, item) { - if (!_.find(_.filter(_this.shares, function (c) { - return !c.username; - }), { name: item.name })) { - response.results.push({ - item: item, - title: ' ' + item.title + ' (' + item.name + ')' - }); - } - }); - return response; - }, - url: '/admin/blog/share/to/search?search={query}' - } - }); - }; - - EmBlogSpaceAuth.prototype.removeShareHandler = function removeShareHandler(item) { - var _this2 = this; - - var param = { id: this.authO.id }; - if (item.username) { - _.extend(param, { users: item.username }); - } else { - _.extend(param, { channels: item.id }); - } - - if (this._isBlog()) { - $.post('/admin/blog/auth/remove', param, function (data, textStatus, xhr) { - if (data.success) { - _this2.shares = _.reject(_this2.shares, { _id: item._id }); - _this2.authO.blogAuthorities = data.data.blogAuthorities; - } else { - toastr.error(data.data); - } - }); - } else { - $.post('/admin/space/auth/remove', param, function (data, textStatus, xhr) { - if (data.success) { - _this2.shares = _.reject(_this2.shares, { _id: item._id }); - _this2.authO.spaceAuthorities = data.data.spaceAuthorities; - } else { - toastr.error(data.data); - } - }); - } - }; - - EmBlogSpaceAuth.prototype._reset = function _reset() { - this.shares = []; - $(this.inputSearchRef).val(''); - }; - - EmBlogSpaceAuth.prototype.show = function show(type, authO) { - this.type = type; - this.authO = authO; - this.emModal.show({ hideOnApprove: true, autoDimmer: false }); - }; - - EmBlogSpaceAuth.prototype.showHandler = function showHandler() { - var _this3 = this; - - this._reset(); - $(this.chk).checkbox(this.authO.privated ? 'set checked' : 'set unchecked'); - $(this.chk2).checkbox(this.authO.opened ? 'set checked' : 'set unchecked'); - var auths = void 0; - if (this._isBlog()) { - auths = this.authO.blogAuthorities; - } else { - auths = this.authO.spaceAuthorities; - } - _.forEach(auths, function (item) { - var share = item.user ? item.user : item.channel; - share._id = _.uniqueId('share-item-'); - _this3.shares.push(share); - }); - }; - - EmBlogSpaceAuth.prototype.approveHandler = function approveHandler() {}; - - return EmBlogSpaceAuth; - }()) || _class; -}); -define('resources/elements/em-blog-space-create',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmBlogSpaceCreate = undefined; - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var _class; - - var EmBlogSpaceCreate = exports.EmBlogSpaceCreate = (0, _aureliaFramework.containerless)(_class = function () { - function EmBlogSpaceCreate() { - _classCallCheck(this, EmBlogSpaceCreate); - } - - EmBlogSpaceCreate.prototype.attached = function attached() { - $(this.chk).checkbox(); - }; - - EmBlogSpaceCreate.prototype.createHandler = function createHandler() { - var _this = this; - - this.ajax = $.post('/admin/space/create', { - name: this.name, - desc: this.desc, - privated: $(this.chk).checkbox('is checked') - }, function (data, textStatus, xhr) { - if (data.success) { - _this.name = ''; - _this.desc = ''; - $(_this.chk).checkbox('set unchecked'); - toastr.success('空间创建成功!'); - $(_this.ppRef).popup('hide'); - ea.publish(nsCons.EVENT_SPACE_CHANGED, { action: 'created', space: data.data }); - } else { - toastr.error(data.data, '空间创建失败!'); - } - }); - }; - - return EmBlogSpaceCreate; - }()) || _class; -}); -define('resources/elements/em-blog-space-edit',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmBlogSpaceEdit = undefined; - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var _class; - - var EmBlogSpaceEdit = exports.EmBlogSpaceEdit = (0, _aureliaFramework.containerless)(_class = function () { - function EmBlogSpaceEdit() { - _classCallCheck(this, EmBlogSpaceEdit); - } - - EmBlogSpaceEdit.prototype.attached = function attached() { - $(this.chk).checkbox(); - }; - - EmBlogSpaceEdit.prototype.show = function show(space) { - this.space = space; - this.emModal.show({ hideOnApprove: false, autoDimmer: true }); - }; - - EmBlogSpaceEdit.prototype.showHandler = function showHandler() { - var _this = this; - - $.get('/admin/space/get', { - id: this.space.id - }, function (data) { - if (data.success) { - _this.space = data.data; - $(_this.chk).checkbox(_this.space.privated ? 'set checked' : 'set unchecked'); - } - }); - }; - - EmBlogSpaceEdit.prototype.approveHandler = function approveHandler(modal) { - $.post('/admin/space/update', { - id: this.space.id, - name: this.space.name, - desc: this.space.description, - privated: $(this.chk).checkbox('is checked') - }, function (data, textStatus, xhr) { - if (data.success) { - toastr.success('空间更新成功!'); - ea.publish(nsCons.EVENT_SPACE_CHANGED, { - action: 'updated', - space: data.data - }); - modal.hide(); - } else { - toastr.error(data.data, '空间更新失败!'); - } - }); - }; - - return EmBlogSpaceEdit; - }()) || _class; -}); -define('resources/elements/em-blog-space-update',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmBlogSpaceUpdate = undefined; - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var _class; - - var EmBlogSpaceUpdate = exports.EmBlogSpaceUpdate = (0, _aureliaFramework.containerless)(_class = function () { - function EmBlogSpaceUpdate() { - _classCallCheck(this, EmBlogSpaceUpdate); - - this.loginUser = nsCtx.loginUser; - this.isSuper = nsCtx.isSuper; - } - - EmBlogSpaceUpdate.prototype.attached = function attached() {}; - - EmBlogSpaceUpdate.prototype.show = function show(blog) { - this.blog = blog; - this.emModal.show({ hideOnApprove: false, autoDimmer: true }); - }; - - EmBlogSpaceUpdate.prototype.showHandler = function showHandler() { - var _this = this; - - $.get('/admin/space/listMy', function (data) { - if (data.success) { - _this.spaces = data.data; - } - }); - }; - - EmBlogSpaceUpdate.prototype.approveHandler = function approveHandler(modal) { - var sid = $(this.spacesRef).dropdown('get value'); - $.post('/admin/blog/space/update', { - id: this.blog.id, - sid: sid ? sid : null - }, function (data, textStatus, xhr) { - if (data.success) { - toastr.success('博文空间更新成功!'); - if (!data.data.space) { - data.data.space = null; - } - ea.publish(nsCons.EVENT_BLOG_CHANGED, { - action: 'updated', - blog: data.data - }); - modal.hide(); - } else { - toastr.error(data.data, '博文空间更新失败!'); - } - }); - }; - - EmBlogSpaceUpdate.prototype.initSpacesHandler = function initSpacesHandler(last) { - var _this2 = this; - - if (last) { - _.defer(function () { - $(_this2.spacesRef).dropdown('clear').dropdown('set selected', _this2.blog.space ? _this2.blog.space.id + '' : ''); - }); - } - }; - - return EmBlogSpaceUpdate; - }()) || _class; -}); -define('resources/elements/em-blog-top-menu',['exports', 'aurelia-framework', 'timeago'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmBlogTopMenu = undefined; - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var _class; - - var tg = timeago(); - - var EmBlogTopMenu = exports.EmBlogTopMenu = (0, _aureliaFramework.containerless)(_class = function () { - function EmBlogTopMenu() { - var _this = this; - - _classCallCheck(this, EmBlogTopMenu); - - this.isHide = true; - this.loginUser = nsCtx.loginUser; - - this.subscribe = ea.subscribe(nsCons.EVENT_BLOG_SWITCH, function (payload) { - _this.toggleHandler(true); - }); - this.subscribe = ea.subscribe(nsCons.EVENT_BLOG_LEFT_SIDEBAR_TOGGLE, function (payload) { - _this.toggleHandler(payload.isHide); - }); - } - - EmBlogTopMenu.prototype.unbind = function unbind() { - this.subscribe.dispose(); - }; - - EmBlogTopMenu.prototype.attached = function attached() { - var _this2 = this; - - $(this.logoRef).on('mouseenter', function (event) { - $(_this2.logoRef).animateCss('flip'); - }); - - $(this.searchRef).search({ - type: 'category', - minCharacters: 2, - selectFirstResult: true, - onSelect: function onSelect(result, response) { - $(_this2.searchRef).search('hide results'); - _.defer(function () { - $(_this2.searchRef).find('input').blur(); - ea.publish(nsCons.EVENT_APP_ROUTER_NAVIGATE, { to: result.url }); - }); - return false; - }, - apiSettings: { - onResponse: function onResponse(resp) { - var response = { - results: { - blogs: { - name: '\u535A\u6587 (' + resp.data.blogs.length + ')', - results: [] - }, - comments: { - name: '\u8BC4\u8BBA (' + resp.data.comments.length + ')', - results: [] - } - } - }; - $.each(resp.data.blogs, function (index, item) { - response.results.blogs.results.push({ - title: item.title, - - description: '' + item.creator.name + ' \u521B\u5EFA\u4E8E ' + tg.format(item.createDate, 'zh_CN'), - url: '#/blog/' + item.id - }); - }); - $.each(resp.data.comments, function (index, item) { - response.results.comments.results.push({ - title: '#/blog/' + item.targetId + '?cid=' + item.id, - - description: '' + item.creator.name + ' \u521B\u5EFA\u4E8E ' + tg.format(item.createDate, 'zh_CN') + '
    ' + utils.encodeHtml(item.content), - url: '#/blog/' + item.targetId + '?cid=' + item.id - }); - }); - return response; - }, - url: '/admin/blog/search?search={query}&comment=true&ellipsis=60' - } - }); - - this._refreshSysLinks(); - - if (nsCtx.blogId == 'create') { - _.defer(function () { - $('a[href="#modaal-blog-write"]').click(); - }); - } - }; - - EmBlogTopMenu.prototype._refreshSysLinks = function _refreshSysLinks() { - var _this3 = this; - - $.get('/admin/link/listByApp', function (data) { - if (data.success) { - _this3.sysLinks = data.data; - } else { - _this3.sysLinks = []; - } - }); - }; - - EmBlogTopMenu.prototype.searchBlurHandler = function searchBlurHandler() { - this.isSearchFocus = false; - }; - - EmBlogTopMenu.prototype.searchFocusHandler = function searchFocusHandler() { - this.isSearchFocus = true; - }; - - EmBlogTopMenu.prototype.toggleHandler = function toggleHandler(isHide) { - if (this.isHide === isHide) { - return; - } - this.isHide = isHide ? isHide : !this.isHide; - ea.publish(nsCons.EVENT_BLOG_TOGGLE_SIDEBAR, this.isHide); - }; - - EmBlogTopMenu.prototype.userEditHandler = function userEditHandler() { - this.userEditMd.show(); - }; - - EmBlogTopMenu.prototype.logoutHandler = function logoutHandler() { - $.post('/admin/logout').always(function () { - utils.redirect2Login(); - }); - }; - - EmBlogTopMenu.prototype.searchKeyupHandler = function searchKeyupHandler(event) { - if (event.keyCode == 27) { - $(this.searchRef).search('set value', ''); - } - }; - - return EmBlogTopMenu; - }()) || _class; -}); -define('resources/elements/em-blog-write',['exports', 'aurelia-framework', 'simplemde', 'dropzone', 'common/common-emoji'], function (exports, _aureliaFramework, _simplemde, _dropzone, _commonEmoji) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmBlogWrite = undefined; - - var _simplemde2 = _interopRequireDefault(_simplemde); - - var _dropzone2 = _interopRequireDefault(_dropzone); - - var _commonEmoji2 = _interopRequireDefault(_commonEmoji); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { - default: obj - }; - } - - function _initDefineProp(target, property, descriptor, context) { - if (!descriptor) return; - Object.defineProperty(target, property, { - enumerable: descriptor.enumerable, - configurable: descriptor.configurable, - writable: descriptor.writable, - value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 - }); - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { - var desc = {}; - Object['ke' + 'ys'](descriptor).forEach(function (key) { - desc[key] = descriptor[key]; - }); - desc.enumerable = !!desc.enumerable; - desc.configurable = !!desc.configurable; - - if ('value' in desc || desc.initializer) { - desc.writable = true; - } - - desc = decorators.slice().reverse().reduce(function (desc, decorator) { - return decorator(target, property, desc) || desc; - }, desc); - - if (context && desc.initializer !== void 0) { - desc.value = desc.initializer ? desc.initializer.call(context) : void 0; - desc.initializer = undefined; - } - - if (desc.initializer === void 0) { - Object['define' + 'Property'](target, property, desc); - desc = null; - } - - return desc; - } - - function _initializerWarningHelper(descriptor, context) { - throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.'); - } - - var _class, _desc, _value, _class2, _descriptor, _class3, _temp; - - var EmBlogWrite = exports.EmBlogWrite = (0, _aureliaFramework.containerless)(_class = (_class2 = (_temp = _class3 = function () { - function EmBlogWrite() { - var _this2 = this; - - _classCallCheck(this, EmBlogWrite); - - _initDefineProp(this, 'members', _descriptor, this); - - this.subscribe = ea.subscribe(nsCons.EVENT_MODAAL_AFTER_OPEN, function (payload) { - if (payload.id == EmBlogWrite.NAME) { - nsCtx.isModaalOpening = true; - _this2.init(); - } - }); - this.subscribe2 = ea.subscribe(nsCons.EVENT_MODAAL_BEFORE_CLOSE, function (payload) { - if (payload.id == EmBlogWrite.NAME) { - _this2.destroy(); - nsCtx.isModaalOpening = false; - } - }); - this.subscribe3 = ea.subscribe(nsCons.EVENT_BLOG_ACTION, function (payload) { - _this2.action = payload.action; - $.get('/admin/blog/get', { id: payload.id }, function (data) { - if (data.success) { - _this2.blog = data.data; - $('a[href="#modaal-blog-write"]').click(); - } - }); - }); - this.subscribe4 = ea.subscribe(nsCons.EVENT_BLOG_CHANGED, function (payload) { - _this2.action = payload.action; - if (payload.action === 'created') { - _this2.blog = payload.blog; - $('#blog-save-btn span').text('更新'); - $('#blog-save-btn').attr('title', 'ctrl+click更新后关闭窗口'); - } - }); - - this.blogTitleInputKeyupInit = _.once(function () { - $('#blog-title-input').keyup(function (e) { - var $t = $(e.currentTarget); - - if (!e.shiftKey && e.keyCode == 13) { - if (_this2.simplemde.value()) { - _this2.save(e, true); - } else { - _this2.simplemde.codemirror.focus(); - } - } else if (e.shiftKey && e.keyCode == 13) { - _this2.simplemde.codemirror.focus(); - } else if (e.keyCode == 27) { - $t.val(''); - } - }); - }); - } - - EmBlogWrite.prototype.unbind = function unbind() { - this.subscribe.dispose(); - this.subscribe2.dispose(); - this.subscribe3.dispose(); - this.subscribe4.dispose(); - }; - - EmBlogWrite.prototype._reset = function _reset() { - this.action = null; - this.blog = null; - $('#blog-save-btn span').text('保存'); - $('#blog-save-btn').attr('title', 'ctrl+click快速保存'); - $('#blog-title-input').val(''); - this.simplemde.value(''); - this.simplemde.toTextArea(); - this.simplemde = null; - }; - - EmBlogWrite.prototype._editInit = function _editInit() { - $('#blog-title-input').val(this.blog.title); - this.simplemde.value(this.blog.content); - $('#blog-save-btn span').text('更新'); - $('#blog-save-btn').attr('title', 'ctrl+click更新后关闭窗口'); - }; - - EmBlogWrite.prototype._writeInit = function _writeInit() { - var _this3 = this; - - var ccid = utils.urlQuery('ccid'); - var cdid = utils.urlQuery('cdid'); - var url = null; - var id = null; - if (ccid) { - url = '/admin/chat/channel/get'; - id = ccid; - } else if (cdid) { - url = '/admin/chat/direct/get'; - id = cdid; - } - - if (url) { - $.get(url, { id: +id }, function (data) { - if (data.success) { - _this3.simplemde.value(data.data.content); - var val = $('#blog-title-input').val(); - if (!val) { - var ms = /#{1,6}[\s]+(.+)\n?/g.exec(data.data.content); - if (ms && ms.length > 1) { - $('#blog-title-input').val(ms[1]); - } - } - } else { - toastr.error(data.data, '获取沟通消息失败!'); - } - }); - } - }; - - EmBlogWrite.prototype._copyInit = function _copyInit() { - $('#blog-title-input').val(this.blog.title + ' (副本)'); - this.simplemde.value(this.blog.content); - this.blog = null; - }; - - EmBlogWrite.prototype.init = function init() { - var _this4 = this; - - this.simplemde = new _simplemde2.default({ - element: $('#txt-blog-write')[0], - spellChecker: false, - - toolbar: [{ - name: "bold", - action: _simplemde2.default.toggleBold, - className: "fa fa-bold", - title: "粗体" - }, { - name: "italic", - action: _simplemde2.default.toggleItalic, - className: "fa fa-italic", - title: "斜体" - }, { - name: "strikethrough", - action: _simplemde2.default.toggleStrikethrough, - className: "fa fa-strikethrough", - title: "删除线" - }, { - name: "heading", - action: _simplemde2.default.toggleHeadingSmaller, - className: "fa fa-header", - title: "标题" - }, { - name: "heading-smaller", - action: _simplemde2.default.toggleHeadingSmaller, - className: "fa fa-header fa-header-x fa-header-smaller", - title: "变小标题" - }, { - name: "heading-bigger", - action: _simplemde2.default.toggleHeadingBigger, - className: "fa fa-header fa-header-x fa-header-bigger", - title: "变大标题" - }, "|", { - name: "code", - action: _simplemde2.default.toggleCodeBlock, - className: "fa fa-code", - title: "代码" - }, { - name: "quote", - action: _simplemde2.default.toggleBlockquote, - className: "fa fa-quote-left", - title: "引用" - }, { - name: "unordered-list", - action: _simplemde2.default.toggleUnorderedList, - className: "fa fa-list-ul", - title: "无序列表" - }, { - name: "ordered-list", - action: _simplemde2.default.toggleOrderedList, - className: "fa fa-list-ol", - title: "有序列表" - }, { - name: "tasks", - action: function action(editor) { - _this4.insertContent('- [ ] 未完成任务\n- [x] 已完成任务'); - }, - className: "fa fa-check-square-o ", - title: "任务列表" - }, { - name: "details", - action: function action(editor) { - _this4.insertContent('
    \n标题\n

    详情内容

    \n
    '); - }, - className: "fa fa-play ", - title: "折叠详情" - }, "|", { - name: "link", - action: _simplemde2.default.drawLink, - className: "fa fa-link", - title: "创建链接" - }, { - name: "image", - action: _simplemde2.default.drawImage, - className: "fa fa-picture-o", - title: "插入图片" - }, { - name: "table", - action: _simplemde2.default.drawTable, - className: "fa fa-table", - title: "插入表格" - }, { - name: "horizontal-rule", - action: _simplemde2.default.drawHorizontalRule, - className: "fa fa-minus", - title: "插入水平分割线" - }, "|", { - name: "upload", - action: function action(editor) {}, - className: "fa fa-upload", - title: "上传文件" - }, "|", { - name: "preview", - action: _simplemde2.default.togglePreview, - className: "fa fa-eye no-disable", - title: "切换预览" - }, { - name: "side-by-side", - action: _simplemde2.default.toggleSideBySide, - className: "fa fa-columns no-disable no-mobile", - title: "实时预览" - }, { - name: "fullscreen", - action: _simplemde2.default.toggleFullScreen, - className: "fa fa-arrows-alt no-disable no-mobile", - title: "全屏" - }, { - name: "guide", - action: 'https://simplemde.com/markdown-guide', - className: "fa fa-question-circle", - title: "Markdown指南" - }], - insertTexts: { - table: ["", "\n\n| 列1 | 列2 | 列3 |\n| ------ | ------ | ------ |\n| 文本 | 文本 | 文本 |\n\n"] - }, - previewRender: function previewRender(plainText, preview) { - if (emojify) { - plainText = emojify.replace(plainText); - } - return marked(utils.preParse(plainText)); - } - }); - - this.simplemde.codemirror.on('keyup', function (cm, e) { - if (e.ctrlKey && e.keyCode == 13) { - _this4.save(e, true); - } else if (e.keyCode == 27) { - _this4.simplemde.value(''); - } else if (e.keyCode == 13) { - var val = $('#blog-title-input').val(); - if (!val) { - var ms = /#{1,6}[\s]+(.+)\n?/g.exec(_this4.simplemde.value()); - if (ms && ms.length > 1) { - $('#blog-title-input').val(ms[1]); - } - } - } - }); - - this.$chatMsgInputRef = $('#txt-blog-write-wrapper').find('.CodeMirror textarea'); - if (this.$chatMsgInputRef.size() === 0) { - this.$chatMsgInputRef = $('#txt-blog-write-wrapper').find('.CodeMirror [contenteditable="true"]'); - } - - if (this.action == 'edit') { - this._editInit(); - } else if (this.action == 'copy') { - this._copyInit(); - } else { - this._writeInit(); - } - - $('#blog-title-input').focus(); - - this.initPaste(); - this.initTextcomplete(); - - this.initUploadDropzone($('.CodeMirror-wrap', '#txt-blog-write-wrapper'), function () { - return _this4.$chatMsgInputRef; - }, false); - - this.initUploadDropzone($('.editor-toolbar .fa.fa-upload', '#txt-blog-write-wrapper'), function () { - return _this4.$chatMsgInputRef; - }, true); - - this.blogTitleInputKeyupInit(); - }; - - EmBlogWrite.prototype.close = function close() { - $('a[href="#modaal-blog-write"]').modaal('close'); - }; - - EmBlogWrite.prototype.initTextcomplete = function initTextcomplete() { - var _this5 = this; - - $(this.$chatMsgInputRef).textcomplete([{ - match: /(^|\s)@(\w*)$/, - search: function search(term, callback) { - callback($.map(nsCtx.users, function (member) { - return member.enabled && member.username.indexOf(term) >= 0 ? member.username : null; - })); - }, - template: function template(value, term) { - var user = _.find(nsCtx.users, { username: value }); - return user.name + ' - ' + user.mails + ' (' + user.username + ')'; - }, - replace: function replace(value) { - return '$1{~' + value + '}'; - } - }, { - match: /(^|\s):([\+\-\w]*)$/, - search: function search(term, callback) { - callback($.map(_commonEmoji2.default, function (emoji) { - return _.some(emoji.split('_'), function (item) { - return item.indexOf(term) === 0; - }) ? emoji : null; - })); - }, - template: function template(value, term) { - if (value == 'search') { - return '\u8868\u60C5\u67E5\u627E - :search'; - } - var emojiKey = ':' + value + ':'; - return emojify.replace(emojiKey) + ' - ' + emojiKey; - }, - replace: function replace(value) { - if (_this5.tipsActionHandler(value)) { - return '$1:' + value + ': '; - } else { - return ''; - } - } - }], { - appendTo: '.tms-blog-write-status-bar', - maxCount: 5 - }); - - this.simplemde.codemirror.on('keydown', function (cm, e) { - if (_.includes([13, 38, 40], e.keyCode) && _this5.isTipsShow()) { - e.preventDefault(); - } - }); - }; - - EmBlogWrite.prototype.isTipsShow = function isTipsShow() { - return $('.tms-blog-write-status-bar').find('.textcomplete-dropdown:visible').size() === 1; - }; - - EmBlogWrite.prototype.tipsActionHandler = function tipsActionHandler(value) { - - if (value == 'search') { - _.delay(function () { - utils.openNewWin(nsCons.STR_EMOJI_SEARCH_URL); - }, 200); - } else { - return true; - } - - return false; - }; - - EmBlogWrite.prototype.initPaste = function initPaste() { - var _this6 = this; - - var $paste = void 0; - if (this.$chatMsgInputRef.is('textarea')) { - $paste = $(this.$chatMsgInputRef).pastableTextarea(); - } else { - $paste = $(this.$chatMsgInputRef).pastableContenteditable(); - } - - $paste && $paste.on('pasteImage', function (ev, data) { - - $.post('/admin/file/base64', { - dataURL: data.dataURL, - type: data.blob.type, - toType: 'Blog' - }, function (data, textStatus, xhr) { - if (data.success) { - _this6.insertContent('![{name}]({baseURL}{path}{uuidName})'.replace(/\{name\}/g, data.data.name).replace(/\{baseURL\}/g, utils.getBaseUrl() + '/').replace(/\{path\}/g, data.data.path).replace(/\{uuidName\}/g, data.data.uuidName)); - } - }); - }).on('pasteImageError', function (ev, data) { - toastr.error(data.message, '剪贴板粘贴图片错误!'); - }); - }; - - EmBlogWrite.prototype.initUploadDropzone = function initUploadDropzone(domRef, getInputTargetCb, clickable) { - - var _this = this; - - $(domRef).dropzone({ - url: "/admin/file/upload", - paramName: 'file', - clickable: !!clickable, - dictDefaultMessage: '', - maxFilesize: 10, - addRemoveLinks: true, - previewsContainer: '.em-blog-write .dropzone-previews', - previewTemplate: $('.em-blog-write .preview-template')[0].innerHTML, - dictCancelUpload: '取消上传', - dictCancelUploadConfirmation: '确定要取消上传吗?', - dictFileTooBig: '文件过大({{filesize}}M),最大限制:{{maxFilesize}}M', - init: function init() { - this.on("sending", function (file, xhr, formData) { - if (!getInputTargetCb()) { - this.removeAllFiles(true); - } else { - formData.append('toType', 'Blog'); - } - }); - this.on("success", function (file, data) { - if (data.success) { - - $.each(data.data, function (index, item) { - if (item.type == 'Image') { - _this.insertContent('![{name}]({baseURL}{path}{uuidName}) '.replace(/\{name\}/g, item.name).replace(/\{baseURL\}/g, utils.getBaseUrl() + '/').replace(/\{path\}/g, item.path).replace(/\{uuidName\}/g, item.uuidName)); - } else { - _this.insertContent('[{name}]({baseURL}{path}{uuidName}) '.replace(/\{name\}/g, item.name).replace(/\{baseURL\}/g, utils.getBaseUrl() + '/').replace(/\{path\}/g, "admin/file/download/").replace(/\{uuidName\}/g, item.id)); - } - }); - toastr.success('上传成功!'); - } else { - toastr.error(data.data, '上传失败!'); - } - }); - this.on("error", function (file, errorMessage, xhr) { - toastr.error(errorMessage, '上传失败!'); - }); - this.on("complete", function (file) { - this.removeFile(file); - }); - } - }); - }; - - EmBlogWrite.prototype.insertContent = function insertContent(content, mde) { - try { - var cm = mde ? mde.codemirror : this.simplemde.codemirror; - var cursor = cm.getCursor(); - if (cursor) { - cm.replaceRange(content, cursor, cursor); - cm.focus(); - } - } catch (err) { - console.log(err); - } - }; - - EmBlogWrite.prototype.destroy = function destroy() { - this._reset(); - }; - - EmBlogWrite.prototype.attached = function attached() { - var _this7 = this; - - $('#blog-save-btn').click(function (event) { - _this7.save(event); - }); - }; - - EmBlogWrite.prototype.save = function save(event, isKey) { - var _this8 = this; - - var title = $('#blog-title-input').val(); - var content = this.simplemde.value(); - - if (!$.trim(title)) { - $('#blog-title-input').val(''); - toastr.error('标题不能为空!'); - return; - } - - if (!$.trim(content)) { - this.simplemde.value(''); - toastr.error('内容不能为空!'); - return; - } - - if (!this.blog) { - if (event.ctrlKey) { - $.post('/admin/blog/create', { - url: utils.getBasePath(), - usernames: utils.parseUsernames(content, [nsCtx.memberAll].concat(window.tmsUsers ? tmsUsers : [])).join(','), - title: title, - content: content, - spaceId: '', - privated: false, - contentHtml: utils.md2html(content) - }, function (data, textStatus, xhr) { - if (data.success) { - _this8.blog = data.data; - toastr.success('博文保存成功!'); - ea.publish(nsCons.EVENT_BLOG_CHANGED, { - action: 'created', - blog: _this8.blog - }); - $('a[href="#modaal-blog-write"]').modaal('close'); - } else { - toastr.error(data.data, '博文保存失败!'); - } - }); - } else { - ea.publish(nsCons.EVENT_BLOG_SAVE, { - title: title, - content: content - }); - } - } else { - - if (this.sending) { - return; - } - - this.sending = true; - $('#blog-save-btn i').show(); - - var html = utils.md2html(content); - var users = [nsCtx.memberAll].concat(window.tmsUsers ? tmsUsers : []); - - $.post('/admin/blog/update', { - url: utils.getBasePath(), - id: this.blog.id, - version: this.blog.version, - usernames: utils.parseUsernames(content, users).join(','), - title: title, - content: content, - diff: utils.diffS(this.blog.content, content) - }, function (data, textStatus, xhr) { - if (data.success) { - _this8.blog = data.data; - toastr.success('博文更新成功!'); - ea.publish(nsCons.EVENT_BLOG_CHANGED, { - action: 'updated', - blog: _this8.blog - }); - if (!isKey) { - event && event.ctrlKey && _this8.close(); - } else { - event && event.ctrlKey && event.shiftKey && _this8.close(); - } - } else { - toastr.error(data.data, '博文更新失败!'); - } - }).always(function () { - _this8.sending = false; - $('#blog-save-btn i').hide(); - }); - } - }; - - return EmBlogWrite; - }(), _class3.NAME = 'blog-create', _temp), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'members', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - })), _class2)) || _class; -}); -define('resources/elements/em-chat-attach',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmChatAttach = undefined; - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var _class; - - var EmChatAttach = exports.EmChatAttach = (0, _aureliaFramework.containerless)(_class = function () { - function EmChatAttach() { - _classCallCheck(this, EmChatAttach); - - this.type = 'Image'; - this.search = ''; - } - - EmChatAttach.prototype.attached = function attached() { - $(this.tabRef).find('.item').tab({ - onVisible: function onVisible(tabPath) {} - }); - }; - - EmChatAttach.prototype.moreHandler = function moreHandler() { - this._listByPage(true); - }; - - EmChatAttach.prototype._listByPage = function _listByPage() { - var _this = this; - - var nextPage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; - - var url = nsCtx.isAt ? '/admin/file/listByUser' : '/admin/file/listByChannel'; - this.ajax = $.get(url, { - name: nsCtx.chatTo, - type: this.type, - page: this.page ? nextPage ? this.page.number + 1 : this.page.number : 0, - size: 10, - search: this.search - }, function (data) { - _this.page = data.data; - _this.moreCnt = _this.page.last ? 0 : _this.page.totalElements - (_this.page.number + 1) * _this.page.size; - if (!nextPage) { - _this.attachs = data.data.content; - } else { - _this.attachs = _.concat(_this.attachs, data.data.content); - } - }); - }; - - EmChatAttach.prototype.fetch = function fetch() { - this.page = null; - this.moreCnt = 0; - this.attachs = null; - if ($(window).width() > 991) { - $(this.searchRef).focus(); - } - this._listByPage(); - }; - - EmChatAttach.prototype.tabClickHandler = function tabClickHandler(tabPath) { - this.type = tabPath; - this.fetch(); - }; - - EmChatAttach.prototype.searchHandler = function searchHandler() { - this.fetch(); - }; - - EmChatAttach.prototype.keyupHandler = function keyupHandler(event) { - if (event.keyCode == 13) { - this.fetch(); - } else if (event.keyCode == 27) { - this.search = ''; - this.fetch(); - } - return true; - }; - - return EmChatAttach; - }()) || _class; -}); -define('resources/elements/em-chat-channel-create',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmChatChannelCreate = undefined; - - function _initDefineProp(target, property, descriptor, context) { - if (!descriptor) return; - Object.defineProperty(target, property, { - enumerable: descriptor.enumerable, - configurable: descriptor.configurable, - writable: descriptor.writable, - value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 - }); - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { - var desc = {}; - Object['ke' + 'ys'](descriptor).forEach(function (key) { - desc[key] = descriptor[key]; - }); - desc.enumerable = !!desc.enumerable; - desc.configurable = !!desc.configurable; - - if ('value' in desc || desc.initializer) { - desc.writable = true; - } - - desc = decorators.slice().reverse().reduce(function (desc, decorator) { - return decorator(target, property, desc) || desc; - }, desc); - - if (context && desc.initializer !== void 0) { - desc.value = desc.initializer ? desc.initializer.call(context) : void 0; - desc.initializer = undefined; - } - - if (desc.initializer === void 0) { - Object['define' + 'Property'](target, property, desc); - desc = null; - } - - return desc; - } - - function _initializerWarningHelper(descriptor, context) { - throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.'); - } - - var _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3; - - var EmChatChannelCreate = exports.EmChatChannelCreate = (0, _aureliaFramework.containerless)(_class = (_class2 = function () { - function EmChatChannelCreate() { - _classCallCheck(this, EmChatChannelCreate); - - _initDefineProp(this, 'loginUser', _descriptor, this); - - _initDefineProp(this, 'trigger', _descriptor2, this); - - _initDefineProp(this, 'name', _descriptor3, this); - - this.activeTab = 'channel-create'; - this.nameRegex = /^[a-z][a-z0-9_\-]{0,49}$/; - } - - EmChatChannelCreate.prototype.nameChanged = function nameChanged(news, old) { - this.oldName = old; - if (news && !this.nameRegex.test(news)) { - this.name = this._getOldName(); - } - }; - - EmChatChannelCreate.prototype._getOldName = function _getOldName() { - if (!this.nameRegex.test(this.oldName)) { - this.oldName = ''; - } - - return this.oldName; - }; - - EmChatChannelCreate.prototype.triggerChanged = function triggerChanged(newValue, oldValue) { - var _this = this; - - $(this.trigger).click(function () { - _this.emModal.show({ - hideOnApprove: false, - autoDimmer: true - }); - }); - }; - - EmChatChannelCreate.prototype.showHandler = function showHandler() { - this._reset(); - }; - - EmChatChannelCreate.prototype._reset = function _reset() { - this.name = ''; - this.title = ''; - this.desc = ''; - $(this.chk).checkbox('set checked'); - this.channelJoinVm.refresh(); - }; - - EmChatChannelCreate.prototype.attached = function attached() { - var _this2 = this; - - $(this.chk).checkbox(); - $(this.tabRef).find('.item').tab({ - onVisible: function onVisible(tabPath) { - _this2.activeTab = tabPath; - } - }); - }; - - EmChatChannelCreate.prototype.approveHandler = function approveHandler(modal) { - - $.post('/admin/channel/create', { - name: this.name, - title: this.title, - desc: this.desc, - privated: $(this.chk).checkbox('is checked') - }, function (data) { - if (data.success) { - modal.hide(); - toastr.success('创建频道成功!'); - ea.publish(nsCons.EVENT_CHAT_CHANNEL_CREATED, { - channel: data.data - }); - } else { - modal.hideDimmer(); - toastr.error(data.data, '创建频道失败!'); - } - }); - }; - - return EmChatChannelCreate; - }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'loginUser', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'trigger', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'name', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - })), _class2)) || _class; -}); -define('resources/elements/em-chat-channel-edit',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmChatChannelEdit = undefined; - - function _initDefineProp(target, property, descriptor, context) { - if (!descriptor) return; - Object.defineProperty(target, property, { - enumerable: descriptor.enumerable, - configurable: descriptor.configurable, - writable: descriptor.writable, - value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 - }); - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { - var desc = {}; - Object['ke' + 'ys'](descriptor).forEach(function (key) { - desc[key] = descriptor[key]; - }); - desc.enumerable = !!desc.enumerable; - desc.configurable = !!desc.configurable; - - if ('value' in desc || desc.initializer) { - desc.writable = true; - } - - desc = decorators.slice().reverse().reduce(function (desc, decorator) { - return decorator(target, property, desc) || desc; - }, desc); - - if (context && desc.initializer !== void 0) { - desc.value = desc.initializer ? desc.initializer.call(context) : void 0; - desc.initializer = undefined; - } - - if (desc.initializer === void 0) { - Object['define' + 'Property'](target, property, desc); - desc = null; - } - - return desc; - } - - function _initializerWarningHelper(descriptor, context) { - throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.'); - } - - var _class, _desc, _value, _class2, _descriptor; - - var EmChatChannelEdit = exports.EmChatChannelEdit = (0, _aureliaFramework.containerless)(_class = (_class2 = function () { - function EmChatChannelEdit() { - _classCallCheck(this, EmChatChannelEdit); - - _initDefineProp(this, 'channel', _descriptor, this); - } - - EmChatChannelEdit.prototype.channelChanged = function channelChanged() { - - if (this.channel) { - var chkSet = this.channel.privated ? 'set checked' : 'set unchecked'; - $(this.chk).checkbox(chkSet); - } - }; - - EmChatChannelEdit.prototype.show = function show() { - this.emModal.show({ - hideOnApprove: false, - autoDimmer: true - }); - }; - - EmChatChannelEdit.prototype.showHandler = function showHandler() {}; - - EmChatChannelEdit.prototype.attached = function attached() { - $(this.chk).checkbox(); - }; - - EmChatChannelEdit.prototype.approveHandler = function approveHandler(modal) { - - $.post('/admin/channel/update', { - id: this.channel.id, - title: this.channel.title, - desc: this.channel.description, - privated: $(this.chk).checkbox('is checked') - }, function (data) { - modal.hide(); - if (data.success) { - toastr.success('更新频道成功!'); - } else { - toastr.error(data.data, '编辑频道失败!'); - } - }); - }; - - return EmChatChannelEdit; - }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'channel', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - })), _class2)) || _class; -}); -define('resources/elements/em-chat-channel-join',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmChatChannelJoin = undefined; - - function _initDefineProp(target, property, descriptor, context) { - if (!descriptor) return; - Object.defineProperty(target, property, { - enumerable: descriptor.enumerable, - configurable: descriptor.configurable, - writable: descriptor.writable, - value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 - }); - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { - var desc = {}; - Object['ke' + 'ys'](descriptor).forEach(function (key) { - desc[key] = descriptor[key]; - }); - desc.enumerable = !!desc.enumerable; - desc.configurable = !!desc.configurable; - - if ('value' in desc || desc.initializer) { - desc.writable = true; - } - - desc = decorators.slice().reverse().reduce(function (desc, decorator) { - return decorator(target, property, desc) || desc; - }, desc); - - if (context && desc.initializer !== void 0) { - desc.value = desc.initializer ? desc.initializer.call(context) : void 0; - desc.initializer = undefined; - } - - if (desc.initializer === void 0) { - Object['define' + 'Property'](target, property, desc); - desc = null; - } - - return desc; - } - - function _initializerWarningHelper(descriptor, context) { - throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.'); - } - - var _class, _desc, _value, _class2, _descriptor; - - var EmChatChannelJoin = exports.EmChatChannelJoin = (0, _aureliaFramework.containerless)(_class = (_class2 = function () { - function EmChatChannelJoin() { - _classCallCheck(this, EmChatChannelJoin); - - _initDefineProp(this, 'loginUser', _descriptor, this); - } - - EmChatChannelJoin.prototype._getChannels = function _getChannels() { - var _this = this; - - $.get('/admin/channel/list', function (data) { - if (data.success) { - _this.channels = data.data; - _.each(_this.channels, function (item) { - item.joined = _.some(item.members, function (m) { - return m.username == _this.loginUser.username; - }); - }); - } else { - toastr.error(data.data, '获取频道列表失败!'); - } - }); - }; - - EmChatChannelJoin.prototype.refresh = function refresh() { - this._getChannels(); - }; - - EmChatChannelJoin.prototype.joinHandler = function joinHandler(item) { - this.confirmMd.show({ - content: '\u786E\u5B9A\u8981\u52A0\u5165\u9891\u9053' + item.title + '\u5417?', - onapprove: function onapprove() { - $.post('/admin/channel/join', { - id: item.id - }, function (data) { - if (data.success) { - toastr.success('加入频道成功!'); - item.joined = true; - ea.publish(nsCons.EVENT_CHAT_CHANNEL_JOINED, { channel: data.data }); - } else { - toastr.error(data.data, '加入频道失败!'); - } - }); - } - }); - }; - - EmChatChannelJoin.prototype.leaveHandler = function leaveHandler(item) { - this.confirmMd.show({ - content: '\u786E\u5B9A\u8981\u79BB\u5F00\u9891\u9053' + item.title + '\u5417?', - onapprove: function onapprove() { - $.post('/admin/channel/leave', { - id: item.id - }, function (data) { - if (data.success) { - toastr.success('离开频道成功!'); - item.joined = false; - ea.publish(nsCons.EVENT_CHAT_CHANNEL_LEAVED, { channel: data.data }); - } else { - toastr.error(data.data, '离开频道失败!'); - } - }); - } - }); - }; - - return EmChatChannelJoin; - }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'loginUser', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - })), _class2)) || _class; -}); -define('resources/elements/em-chat-channel-link-mgr',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmChatChannelLinkMgr = undefined; - - function _initDefineProp(target, property, descriptor, context) { - if (!descriptor) return; - Object.defineProperty(target, property, { - enumerable: descriptor.enumerable, - configurable: descriptor.configurable, - writable: descriptor.writable, - value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 - }); - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { - var desc = {}; - Object['ke' + 'ys'](descriptor).forEach(function (key) { - desc[key] = descriptor[key]; - }); - desc.enumerable = !!desc.enumerable; - desc.configurable = !!desc.configurable; - - if ('value' in desc || desc.initializer) { - desc.writable = true; - } - - desc = decorators.slice().reverse().reduce(function (desc, decorator) { - return decorator(target, property, desc) || desc; - }, desc); - - if (context && desc.initializer !== void 0) { - desc.value = desc.initializer ? desc.initializer.call(context) : void 0; - desc.initializer = undefined; - } - - if (desc.initializer === void 0) { - Object['define' + 'Property'](target, property, desc); - desc = null; - } - - return desc; - } - - function _initializerWarningHelper(descriptor, context) { - throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.'); - } - - var _class, _desc, _value, _class2, _descriptor, _descriptor2; - - var EmChatChannelLinkMgr = exports.EmChatChannelLinkMgr = (0, _aureliaFramework.containerless)(_class = (_class2 = function () { - function EmChatChannelLinkMgr() { - _classCallCheck(this, EmChatChannelLinkMgr); - - _initDefineProp(this, 'channel', _descriptor, this); - - _initDefineProp(this, 'loginUser', _descriptor2, this); - - this.links = []; - } - - EmChatChannelLinkMgr.prototype.channelChanged = function channelChanged(news, old) { - var _this = this; - - if (this.channel) { - $.get('/admin/link/listBy', { - channelId: this.channel.id - }, function (data) { - if (data.success) { - _this.links = data.data; - } else { - _this.links = []; - } - }); - } - }; - - EmChatChannelLinkMgr.prototype.addHandler = function addHandler() { - var _this2 = this; - - $.post('/admin/link/create', { - title: this.title, - href: this.href, - channelId: this.channel.id - }, function (data, textStatus, xhr) { - if (data.success) { - _this2.title = ''; - _this2.href = ''; - _this2.links.push(data.data); - ea.publish(nsCons.EVENT_CHANNEL_LINKS_REFRESH, {}); - } else { - toastr.error(data.data); - } - }); - }; - - EmChatChannelLinkMgr.prototype.delHandler = function delHandler(item) { - var _this3 = this; - - $.post('/admin/link/delete', { - id: item.id - }, function (data, textStatus, xhr) { - if (data.success) { - _this3.links = _.reject(_this3.links, { id: item.id }); - ea.publish(nsCons.EVENT_CHANNEL_LINKS_REFRESH, {}); - toastr.success('删除成功!'); - } else { - toastr.error(data.data); - } - }); - }; - - EmChatChannelLinkMgr.prototype.editHandler = function editHandler(item) { - item.oldTitle = item.title; - item.oldHref = item.href; - item.isEditing = true; - }; - - EmChatChannelLinkMgr.prototype.updateHandler = function updateHandler(item) { - $.post('/admin/link/update', { - id: item.id, - title: item.title, - href: item.href - }, function (data, textStatus, xhr) { - if (data.success) { - item.isEditing = false; - ea.publish(nsCons.EVENT_CHANNEL_LINKS_REFRESH, {}); - toastr.success('更新成功!'); - } else { - toastr.error(data.data); - } - }); - }; - - EmChatChannelLinkMgr.prototype.showHandler = function showHandler() { - this._reset(); - }; - - EmChatChannelLinkMgr.prototype._reset = function _reset() {}; - - EmChatChannelLinkMgr.prototype.attached = function attached() {}; - - EmChatChannelLinkMgr.prototype.show = function show() { - this.channelChanged(); - this.emModal.show({ autoDimmer: false }); - }; - - EmChatChannelLinkMgr.prototype.approveHandler = function approveHandler(modal) {}; - - return EmChatChannelLinkMgr; - }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'channel', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'loginUser', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - })), _class2)) || _class; -}); -define('resources/elements/em-chat-channel-members-mgr',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmChatChannelMembersMgr = undefined; - - function _initDefineProp(target, property, descriptor, context) { - if (!descriptor) return; - Object.defineProperty(target, property, { - enumerable: descriptor.enumerable, - configurable: descriptor.configurable, - writable: descriptor.writable, - value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 - }); - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { - var desc = {}; - Object['ke' + 'ys'](descriptor).forEach(function (key) { - desc[key] = descriptor[key]; - }); - desc.enumerable = !!desc.enumerable; - desc.configurable = !!desc.configurable; - - if ('value' in desc || desc.initializer) { - desc.writable = true; - } - - desc = decorators.slice().reverse().reduce(function (desc, decorator) { - return decorator(target, property, desc) || desc; - }, desc); - - if (context && desc.initializer !== void 0) { - desc.value = desc.initializer ? desc.initializer.call(context) : void 0; - desc.initializer = undefined; - } - - if (desc.initializer === void 0) { - Object['define' + 'Property'](target, property, desc); - desc = null; - } - - return desc; - } - - function _initializerWarningHelper(descriptor, context) { - throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.'); - } - - var _class, _desc, _value, _class2, _descriptor, _descriptor2; - - var EmChatChannelMembersMgr = exports.EmChatChannelMembersMgr = (0, _aureliaFramework.containerless)(_class = (_class2 = function () { - function EmChatChannelMembersMgr() { - var _this = this; - - _classCallCheck(this, EmChatChannelMembersMgr); - - _initDefineProp(this, 'channel', _descriptor, this); - - _initDefineProp(this, 'users', _descriptor2, this); - - this.membersOpts = { - onAdd: function onAdd(addedValue, addedText, $addedChoice) { - _this.emModal.showDimmer(); - $.post('/admin/channel/addMember', { - id: _this.channel.id, - members: addedValue, - baseUrl: utils.getBaseUrl(), - path: wurl('path') - }, function (data, textStatus, xhr) { - if (data.success) { - toastr.success('添加成员成功!'); - _this.channel.members = data.data.members; - ea.publish(nsCons.EVENT_CHAT_CHANNEL_MEMBER_ADD_OR_REMOVE, { - type: 'add', - members: data.data.members - }); - } else { - toastr.error(data.data, '添加成员失败!'); - } - }).always(function () { - _this.emModal.hideDimmer(); - }); - }, - onLabelRemove: function onLabelRemove(removedValue) { - if (_this.channel.owner.username == removedValue) { - return false; - } - - _this.emModal.showDimmer(); - $.post('/admin/channel/removeMember', { - id: _this.channel.id, - members: removedValue, - baseUrl: utils.getBaseUrl(), - path: wurl('path') - }, function (data, textStatus, xhr) { - if (data.success) { - toastr.success('移除成员成功!'); - _this.channel.members = data.data.members; - ea.publish(nsCons.EVENT_CHAT_CHANNEL_MEMBER_ADD_OR_REMOVE, { - type: 'remove', - members: data.data.members - }); - } else { - toastr.error(data.data, '移除成员失败!'); - } - }).always(function () { - _this.emModal.hideDimmer(); - }); - } - }; - } - - EmChatChannelMembersMgr.prototype.channelChanged = function channelChanged() { - var _this2 = this; - - if (this.channel) { - (function () { - var usernames = _.sortBy(_.map(_this2.channel.members, 'username')); - - _.defer(function () { - $(_this2.membersRef).dropdown().dropdown('clear').dropdown('set selected', usernames).dropdown(_this2.membersOpts); - }); - })(); - } - }; - - EmChatChannelMembersMgr.prototype.attached = function attached() {}; - - EmChatChannelMembersMgr.prototype.initMembersUI = function initMembersUI(last) { - var _this3 = this; - - if (last) { - _.defer(function () { - _this3.channelChanged(); - }); - } - }; - - EmChatChannelMembersMgr.prototype.showHandler = function showHandler() { - $(this.membersRef).dropdown().dropdown('clear'); - this.channelChanged(); - }; - - EmChatChannelMembersMgr.prototype.approveHandler = function approveHandler(modal) {}; - - EmChatChannelMembersMgr.prototype.show = function show() { - this.emModal.show({ - hideOnApprove: true, - autoDimmer: false - }); - }; - - return EmChatChannelMembersMgr; - }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'channel', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'users', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - })), _class2)) || _class; -}); -define('resources/elements/em-chat-channel-members-show',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmChatChannelMembersShow = undefined; - - function _initDefineProp(target, property, descriptor, context) { - if (!descriptor) return; - Object.defineProperty(target, property, { - enumerable: descriptor.enumerable, - configurable: descriptor.configurable, - writable: descriptor.writable, - value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 - }); - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { - var desc = {}; - Object['ke' + 'ys'](descriptor).forEach(function (key) { - desc[key] = descriptor[key]; - }); - desc.enumerable = !!desc.enumerable; - desc.configurable = !!desc.configurable; - - if ('value' in desc || desc.initializer) { - desc.writable = true; - } - - desc = decorators.slice().reverse().reduce(function (desc, decorator) { - return decorator(target, property, desc) || desc; - }, desc); - - if (context && desc.initializer !== void 0) { - desc.value = desc.initializer ? desc.initializer.call(context) : void 0; - desc.initializer = undefined; - } - - if (desc.initializer === void 0) { - Object['define' + 'Property'](target, property, desc); - desc = null; - } - - return desc; - } - - function _initializerWarningHelper(descriptor, context) { - throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.'); - } - - var _class, _desc, _value, _class2, _descriptor; - - var EmChatChannelMembersShow = exports.EmChatChannelMembersShow = (0, _aureliaFramework.containerless)(_class = (_class2 = function () { - function EmChatChannelMembersShow() { - _classCallCheck(this, EmChatChannelMembersShow); - - _initDefineProp(this, 'channel', _descriptor, this); - } - - EmChatChannelMembersShow.prototype.showHandler = function showHandler() {}; - - EmChatChannelMembersShow.prototype.approveHandler = function approveHandler(modal) {}; - - EmChatChannelMembersShow.prototype.show = function show() { - this.emModal.show({ - hideOnApprove: true, - autoDimmer: false - }); - }; - - return EmChatChannelMembersShow; - }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'channel', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - })), _class2)) || _class; -}); -define('resources/elements/em-chat-content-item-footbar',['exports', 'aurelia-framework', 'common/common-tags'], function (exports, _aureliaFramework, _commonTags) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmChatContentItemFootbar = undefined; - - var _commonTags2 = _interopRequireDefault(_commonTags); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { - default: obj - }; - } - - function _initDefineProp(target, property, descriptor, context) { - if (!descriptor) return; - Object.defineProperty(target, property, { - enumerable: descriptor.enumerable, - configurable: descriptor.configurable, - writable: descriptor.writable, - value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 - }); - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { - var desc = {}; - Object['ke' + 'ys'](descriptor).forEach(function (key) { - desc[key] = descriptor[key]; - }); - desc.enumerable = !!desc.enumerable; - desc.configurable = !!desc.configurable; - - if ('value' in desc || desc.initializer) { - desc.writable = true; - } - - desc = decorators.slice().reverse().reduce(function (desc, decorator) { - return decorator(target, property, desc) || desc; - }, desc); - - if (context && desc.initializer !== void 0) { - desc.value = desc.initializer ? desc.initializer.call(context) : void 0; - desc.initializer = undefined; - } - - if (desc.initializer === void 0) { - Object['define' + 'Property'](target, property, desc); - desc = null; - } - - return desc; - } - - function _initializerWarningHelper(descriptor, context) { - throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.'); - } - - var _class, _desc, _value, _class2, _descriptor; - - var EmChatContentItemFootbar = exports.EmChatContentItemFootbar = (0, _aureliaFramework.containerless)(_class = (_class2 = function () { - function EmChatContentItemFootbar() { - _classCallCheck(this, EmChatContentItemFootbar); - - _initDefineProp(this, 'chat', _descriptor, this); - - this.emojis = [{ - label: '赞同', - value: ':+1:', - type: 'emoji' - }, { - label: '反对', - value: ':-1:', - type: 'emoji' - }, { - label: '知悉', - value: ':ok_hand:', - type: 'emoji' - }, { - label: '关注', - value: ':eyes:', - type: 'emoji' - }, { - label: '爱心', - value: ':heart:', - type: 'emoji' - }, { - label: '开心', - value: ':laughing:', - type: 'emoji' - }, { - label: '困惑', - value: ':confused:', - type: 'emoji' - }, { - label: '悲伤', - value: ':cry:', - type: 'emoji' - }]; - - this.tags = _commonTags2.default; - } - - EmChatContentItemFootbar.prototype.attached = function attached() { - var _this = this; - - $([this.addEmojiRef]).popup({ - inline: true, - hoverable: true - }); - $([this.addTagRef]).popup({ - inline: true, - hoverable: true, - - onHide: function onHide() { - _this.isCustomTag = false; - $(_this.tagRef).val(''); - } - }); - }; - - EmChatContentItemFootbar.prototype.toggleChatLabelHandler = function toggleChatLabelHandler(item) { - var _this2 = this; - - $.post('/admin/chat/' + (nsCtx.isAt ? 'direct' : 'channel') + '/label/toggle', { - url: nsCtx.isAt ? utils.getBasePath() : utils.getUrl(), - meta: item.type == 'emoji' ? $(emojify.replace(item.value)).attr('src') : item.value, - type: item.type == 'emoji' ? 'Emoji' : 'Tag', - contentHtml: utils.md2html(this.chat.content), - name: item.value, - desc: item.label, - id: this.chat.id - }, function (data, textStatus, xhr) { - if (data.success) { - var cl = _.find(_this2.chat.chatLabels, { id: data.data.id }); - if (cl) { - cl.voters = data.data.voters; - } else { - _this2.chat.chatLabels = [].concat(_this2.chat.chatLabels, [data.data]); - } - bs.signal('sg-chatlabel-refresh'); - } else { - toastr.error(data.data); - } - }); - }; - - EmChatContentItemFootbar.prototype.toggleCustomTagHandler = function toggleCustomTagHandler() { - var _this3 = this; - - if (this.isCustomTag) { - var v = $(this.tagRef).val(); - if (v) { - this.toggleChatLabelHandler({ - label: v, - value: v, - type: 'Tag' - }); - $(this.tagRef).val(''); - } - } else { - _.defer(function () { - return $(_this3.tagRef).focus(); - }); - } - this.isCustomTag = !this.isCustomTag; - }; - - EmChatContentItemFootbar.prototype.tagKeyupHandler = function tagKeyupHandler() { - this.toggleCustomTagHandler(); - }; - - return EmChatContentItemFootbar; - }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'chat', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - })), _class2)) || _class; -}); -define('resources/elements/em-chat-content-item',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmChatContentItem = undefined; - - function _initDefineProp(target, property, descriptor, context) { - if (!descriptor) return; - Object.defineProperty(target, property, { - enumerable: descriptor.enumerable, - configurable: descriptor.configurable, - writable: descriptor.writable, - value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 - }); - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { - var desc = {}; - Object['ke' + 'ys'](descriptor).forEach(function (key) { - desc[key] = descriptor[key]; - }); - desc.enumerable = !!desc.enumerable; - desc.configurable = !!desc.configurable; - - if ('value' in desc || desc.initializer) { - desc.writable = true; - } - - desc = decorators.slice().reverse().reduce(function (desc, decorator) { - return decorator(target, property, desc) || desc; - }, desc); - - if (context && desc.initializer !== void 0) { - desc.value = desc.initializer ? desc.initializer.call(context) : void 0; - desc.initializer = undefined; - } - - if (desc.initializer === void 0) { - Object['define' + 'Property'](target, property, desc); - desc = null; - } - - return desc; - } - - function _initializerWarningHelper(descriptor, context) { - throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.'); - } - - var _dec, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6; - - var EmChatContentItem = exports.EmChatContentItem = (_dec = (0, _aureliaFramework.bindable)({ defaultBindingMode: _aureliaFramework.bindingMode.twoWay }), (0, _aureliaFramework.containerless)(_class = (_class2 = function () { - function EmChatContentItem() { - var _this = this; - - _classCallCheck(this, EmChatContentItem); - - _initDefineProp(this, 'chats', _descriptor, this); - - _initDefineProp(this, 'loginUser', _descriptor2, this); - - _initDefineProp(this, 'isAt', _descriptor3, this); - - _initDefineProp(this, 'channel', _descriptor4, this); - - _initDefineProp(this, 'markId', _descriptor5, this); - - _initDefineProp(this, 'chatTo', _descriptor6, this); - - this.members = []; - this.basePath = utils.getBasePath(); - - this.subscribe = ea.subscribe(nsCons.EVENT_CHAT_CHANNEL_MEMBER_ADD_OR_REMOVE, function (payload) { - _this.members = [nsCtx.memberAll].concat(payload.members); - }); - } - - EmChatContentItem.prototype.unbind = function unbind() { - this.subscribe.dispose(); - }; - - EmChatContentItem.prototype.attached = function attached() { - var _this2 = this; - - $('.tms-chat-direct').on('click', '.markdown-body .at-user', function (event) { - event.preventDefault(); - ea.publish(nsCons.EVENT_CHAT_MSG_INSERT, { - content: '{~' + $(event.currentTarget).attr('data-value') + '} ' - }); - }); - - $('.tms-chat-direct').on('mouseenter', '.markdown-body a[href*="#/chat/"]:not(.pp-not)', function (event) { - event.preventDefault(); - var $a = $(event.currentTarget); - ea.publish(nsCons.EVENT_CHAT_MSG_POPUP_SHOW, { - id: utils.urlQuery('id', $a.attr('href')), - target: event.currentTarget - }); - }); - - $('.tms-chat-direct').on('mouseenter', '.tms-content-body .em-chat-content-item', function (event) { - event.preventDefault(); - var $c = $(event.currentTarget); - - ea.publish(nsCons.EVENT_CHAT_MSG_WIKI_DIR, { - dir: utils.dir($c.find('> .content > .markdown-body')) - }); - }); - - $('.tms-chat-direct').on('click', '.panel-wiki-dir .wiki-dir-item', function (event) { - event.preventDefault(); - ea.publish(nsCons.EVENT_CHAT_CONTENT_SCROLL_TO, { target: $('#' + $(event.currentTarget).attr('data-id')) }); - }); - - $('.tms-chat-direct').on('mouseenter', 'span[data-value].at-user:not(.pp-not),a[data-value].author:not(.pp-not)', function (event) { - event.preventDefault(); - var $a = $(event.currentTarget); - ea.publish(nsCons.EVENT_CHAT_MEMBER_POPUP_SHOW, { - channel: _this2.channel, - username: $a.attr('data-value'), - target: event.currentTarget - }); - }); - - this.initHotkeys(); - }; - - EmChatContentItem.prototype.channelChanged = function channelChanged() { - - if (this.channel) { - this.members = [nsCtx.memberAll].concat(this.channel.members); - } else { - this.members = []; - } - }; - - EmChatContentItem.prototype.deleteHandler = function deleteHandler(item) { - var _this3 = this; - - this.emConfirmModal.show({ - onapprove: function onapprove() { - - var url = void 0; - - if (_this3.isAt) { - url = '/admin/chat/direct/delete'; - } else { - url = '/admin/chat/channel/delete'; - } - - $.post(url, { - id: item.id - }, function (data, textStatus, xhr) { - if (data.success) { - _this3.chats = _.reject(_this3.chats, { - id: item.id - }); - toastr.success('删除消息成功!'); - } else { - toastr.error(data.data, '删除消息失败!'); - } - }); - } - }); - }; - - EmChatContentItem.prototype.initHotkeys = function initHotkeys() { - var _this4 = this; - - $(document).bind('keydown', 'e', function (evt) { - evt.preventDefault(); - var chat = _.findLast(_this4.chats, function (c) { - return c.creator.username == _this4.loginUser.username; - }); - if (chat) { - _this4.editHandler(chat, $('.em-chat-content-item[data-id="' + chat.id + '"]').find('> .content > textarea')); - } - }); - }; - - EmChatContentItem.prototype.editHandler = function editHandler(item, editTxtRef) { - - $.get('/admin/chat/' + (this.isAt ? 'direct' : 'channel') + '/get', { - id: item.id - }, function (data) { - if (data.success) { - if (item.version != data.data.version) { - _.extend(item, data.data); - } - item.isEditing = true; - item.contentOld = item.content; - _.defer(function () { - $(editTxtRef).focus().select(); - autosize.update(editTxtRef); - }); - } else { - toastr.error(data.data); - } - }); - }; - - EmChatContentItem.prototype.editOkHandler = function editOkHandler(evt, item, txtRef) { - this.editSave(item, txtRef); - item.isEditing = false; - }; - - EmChatContentItem.prototype.editCancelHandler = function editCancelHandler(evt, item, txtRef) { - item.content = item.contentOld; - $(txtRef).val(item.content); - item.isEditing = false; - }; - - EmChatContentItem.prototype.editSave = function editSave(item, txtRef) { - var _this5 = this; - - this.sending = true; - - item.content = $(txtRef).val(); - - var html = utils.md2html(item.content); - var htmlOld = utils.md2html(item.contentOld); - - var url = void 0; - var data = void 0; - - if (this.isAt) { - url = '/admin/chat/direct/update'; - data = { - baseUrl: utils.getBaseUrl(), - path: wurl('path'), - id: item.id, - content: item.content, - diff: utils.diffS(item.contentOld, item.content) - }; - } else { - url = '/admin/chat/channel/update'; - data = { - url: utils.getUrl(), - id: item.id, - version: item.version, - usernames: utils.parseUsernames(item.content, this.members).join(','), - content: item.content, - diff: utils.diffS(item.contentOld, item.content) - }; - } - - $.post(url, data, function (data, textStatus, xhr) { - if (data.success) { - toastr.success('更新消息成功!'); - item.isEditing = false; - item.version = data.data.version; - } else { - toastr.error(data.data, '更新消息失败!'); - } - }).always(function () { - _this5.sending = false; - }); - }; - - EmChatContentItem.prototype.eidtKeydownHandler = function eidtKeydownHandler(evt, item, txtRef) { - - if (this.sending) { - return false; - } - - if (evt.ctrlKey && evt.keyCode === 13) { - - this.editSave(item, txtRef); - - return false; - } else if (evt.ctrlKey && evt.keyCode === 85) { - $(txtRef).next('.tms-edit-actions').find('.upload').click(); - return false; - } else if (evt.keyCode === 27) { - this.editCancelHandler(evt, item, txtRef); - } - - return true; - }; - - EmChatContentItem.prototype.notifyRendered = function notifyRendered(last, item) { - if (last) { - _.defer(function () { - ea.publish(nsCons.EVENT_CHAT_LAST_ITEM_RENDERED, { - item: item - }); - }); - } - }; - - EmChatContentItem.prototype.stowHandler = function stowHandler(item) { - - if (item.isStow) { - this.unStowHandler(item); - return; - } - - $.post('/admin/chat/channel/stow', { - id: item.id - }, function (data, textStatus, xhr) { - item.isStow = true; - if (data.success) { - item.stowId = data.data.id; - toastr.success('收藏消息成功!'); - } else { - item.stowId = data.msgs && data.msgs.length > 0 ? data.msgs[0].id : ''; - } - }); - }; - - EmChatContentItem.prototype.unStowHandler = function unStowHandler(item) { - if (!item.stowId) { - return; - } - $.post('/admin/chat/channel/removeStow', { - id: item.stowId - }, function (data, textStatus, xhr) { - item.isStow = false; - item.stowId = ''; - if (data.success) { - toastr.success('移除收藏消息成功!'); - } else {} - }); - }; - - EmChatContentItem.prototype.openEditHandler = function openEditHandler(item) { - $.post('/admin/chat/channel/openEdit', { - id: item.id, - open: !item.openEdit - }, function (data, textStatus, xhr) { - if (data.success) { - item.openEdit = !item.openEdit; - toastr.success((item.openEdit ? '开启' : '关闭') + '\u534F\u4F5C\u7F16\u8F91\u6210\u529F!'); - } else { - toastr.success((!item.openEdit ? '开启' : '关闭') + '\u534F\u4F5C\u7F16\u8F91\u5931\u8D25!'); - } - }); - }; - - EmChatContentItem.prototype.replyHandler = function replyHandler(item) { - ea.publish(nsCons.EVENT_CHAT_MSG_INSERT, { - content: '[[\u56DE\u590D#' + item.id + '](' + utils.getUrl() + '?id=' + item.id + '){~' + item.creator.username + '}]\n\n' - }); - - $.post('/admin/chat/channel/markAsReadedByChat', { - chatId: item.id - }); - }; - - EmChatContentItem.prototype.creatorNameHandler = function creatorNameHandler(item) { - ea.publish(nsCons.EVENT_CHAT_MSG_INSERT, { - content: '{~' + item.creator.username + '} ' - }); - }; - - EmChatContentItem.prototype.refreshHandler = function refreshHandler(item) { - $.get('/admin/chat/channel/get', { - id: item.id - }, function (data) { - if (item.version != data.data.version) { - _.extend(item, data.data); - toastr.success('刷新同步成功!'); - } else { - toastr.info('消息内容暂无变更!'); - } - }); - }; - - EmChatContentItem.prototype.likeHandler = function likeHandler(item, isLike) { - - if (isLike && item.isZanVoted || !isLike && item.isCaiVoted) { - return; - } - - $.post('/admin/chat/channel/vote', { - id: item.id, - url: utils.getUrl(), - contentHtml: utils.md2html(item.content), - type: isLike ? 'Zan' : 'Cai' - }, function (data, textStatus, xhr) { - if (data.success) { - _.extend(item, data.data); - if (isLike) { - item.isZanVoted = true; - } else { - item.isCaiVoted = true; - } - } else { - toastr.error(data.data); - } - }); - }; - - EmChatContentItem.prototype.pinHandler = function pinHandler(item) { - $.post('/admin/chat/channel/pin/toggle', { - id: item.id, - cid: this.channel.id - }, function (data, textStatus, xhr) { - if (data.success) { - toastr.success('' + (data.code == 200 ? '固定频道消息成功!' : '解除固定频道消息成功!')); - item.isPin = data.code == 200; - } else { - toastr.error(data.data); - } - }); - }; - - return EmChatContentItem; - }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'chats', [_dec], { - enumerable: true, - initializer: null - }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'loginUser', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'isAt', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, 'channel', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, 'markId', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, 'chatTo', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - })), _class2)) || _class); -}); -define('resources/elements/em-chat-input',['exports', 'aurelia-framework', 'common/common-tips', 'common/common-emoji', 'simplemde', 'textcomplete'], function (exports, _aureliaFramework, _commonTips, _commonEmoji, _simplemde) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmChatInput = undefined; - - var _commonTips2 = _interopRequireDefault(_commonTips); - - var _commonEmoji2 = _interopRequireDefault(_commonEmoji); - - var _simplemde2 = _interopRequireDefault(_simplemde); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { - default: obj - }; - } - - function _initDefineProp(target, property, descriptor, context) { - if (!descriptor) return; - Object.defineProperty(target, property, { - enumerable: descriptor.enumerable, - configurable: descriptor.configurable, - writable: descriptor.writable, - value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 - }); - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { - var desc = {}; - Object['ke' + 'ys'](descriptor).forEach(function (key) { - desc[key] = descriptor[key]; - }); - desc.enumerable = !!desc.enumerable; - desc.configurable = !!desc.configurable; - - if ('value' in desc || desc.initializer) { - desc.writable = true; - } - - desc = decorators.slice().reverse().reduce(function (desc, decorator) { - return decorator(target, property, desc) || desc; - }, desc); - - if (context && desc.initializer !== void 0) { - desc.value = desc.initializer ? desc.initializer.call(context) : void 0; - desc.initializer = undefined; - } - - if (desc.initializer === void 0) { - Object['define' + 'Property'](target, property, desc); - desc = null; - } - - return desc; - } - - function _initializerWarningHelper(descriptor, context) { - throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.'); - } - - var _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3; - - var EmChatInput = exports.EmChatInput = (0, _aureliaFramework.containerless)(_class = (_class2 = function () { - EmChatInput.prototype.channelChanged = function channelChanged() { - - if (this.channel) { - this.members = [nsCtx.memberAll].concat(this.channel.members); - } else { - this.members = []; - } - }; - - function EmChatInput() { - var _this2 = this; - - _classCallCheck(this, EmChatInput); - - _initDefineProp(this, 'chatTo', _descriptor, this); - - _initDefineProp(this, 'isAt', _descriptor2, this); - - _initDefineProp(this, 'channel', _descriptor3, this); - - this.members = []; - this.isMobile = utils.isMobile(); - - this.subscribe = ea.subscribe(nsCons.EVENT_SHOW_HOTKEYS_MODAL, function (payload) { - _this2.emHotkeysModal.show(); - }); - this.subscribe1 = ea.subscribe(nsCons.EVENT_CHAT_CHANNEL_MEMBER_ADD_OR_REMOVE, function (payload) { - _this2.members = [nsCtx.memberAll].concat(payload.members); - }); - this.subscribe2 = ea.subscribe(nsCons.EVENT_CHAT_MSG_INSERT, function (payload) { - _this2.insertContent(payload.content); - }); - } - - EmChatInput.prototype.unbind = function unbind() { - this.subscribe.dispose(); - this.subscribe1.dispose(); - this.subscribe2.dispose(); - }; - - EmChatInput.prototype.initHotkeys = function initHotkeys() { - var _this3 = this; - - $(document).bind('keydown', 'r', function () { - event.preventDefault(); - _this3.simplemde.codemirror.focus(); - }); - }; - - EmChatInput.prototype.attached = function attached() { - this.initSimpleMDE(this.chatInputRef); - this.initDropzone(); - this.initPaste(); - this.initHotkeys(); - }; - - EmChatInput.prototype.initPaste = function initPaste() { - var _this4 = this; - - var $paste = void 0; - if (this.$chatMsgInputRef.is('textarea')) { - $paste = $(this.$chatMsgInputRef).pastableTextarea(); - } else { - $paste = $(this.$chatMsgInputRef).pastableContenteditable(); - } - - $paste && $paste.on('pasteImage', function (ev, data) { - - $.post('/admin/file/base64', { - dataURL: data.dataURL, - type: data.blob.type, - toType: nsCtx.isAt ? 'User' : 'Channel', - toId: nsCtx.chatTo - }, function (data, textStatus, xhr) { - if (data.success) { - _this4.insertContent('![{name}]({baseURL}{path}{uuidName})'.replace(/\{name\}/g, data.data.name).replace(/\{baseURL\}/g, utils.getBaseUrl() + '/').replace(/\{path\}/g, data.data.path).replace(/\{uuidName\}/g, data.data.uuidName)); - } - }); - }).on('pasteImageError', function (ev, data) { - toastr.error(data.message, '剪贴板粘贴图片错误!'); - }); - }; - - EmChatInput.prototype.initDropzone = function initDropzone() { - var _this5 = this; - - this.initUploadDropzone($('.CodeMirror-wrap', this.inputRef), function () { - return _this5.$chatMsgInputRef; - }, false); - this.initUploadDropzone($(this.btnItemUploadRef).children().andSelf(), function () { - return _this5.$chatMsgInputRef; - }, true); - - $(this.chatBtnRef).popup({ - inline: true, - hoverable: true, - position: 'bottom left', - delay: { - show: 300, - hide: 300 - } - }); - }; - - EmChatInput.prototype.initUploadDropzone = function initUploadDropzone(domRef, getInputTargetCb, clickable) { - - var _this = this; - - $(domRef).dropzone({ - url: "/admin/file/upload", - paramName: 'file', - clickable: !!clickable, - dictDefaultMessage: '', - maxFilesize: 10, - addRemoveLinks: true, - previewsContainer: this.chatStatusBarRef, - previewTemplate: this.previewTemplateRef.innerHTML, - dictCancelUpload: '取消上传', - dictCancelUploadConfirmation: '确定要取消上传吗?', - dictFileTooBig: '文件过大({{filesize}}M),最大限制:{{maxFilesize}}M', - init: function init() { - this.on("sending", function (file, xhr, formData) { - if (!getInputTargetCb()) { - this.removeAllFiles(true); - } else { - formData.append('toType', nsCtx.isAt ? 'User' : 'Channel'); - formData.append('toId', nsCtx.chatTo); - } - }); - this.on("success", function (file, data) { - if (data.success) { - - $.each(data.data, function (index, item) { - if (item.type == 'Image') { - _this.insertContent('![{name}]({baseURL}{path}{uuidName}) '.replace(/\{name\}/g, item.name).replace(/\{baseURL\}/g, utils.getBaseUrl() + '/').replace(/\{path\}/g, item.path).replace(/\{uuidName\}/g, item.uuidName)); - } else { - _this.insertContent('[{name}]({baseURL}{path}{uuidName}) '.replace(/\{name\}/g, item.name).replace(/\{baseURL\}/g, utils.getBaseUrl() + '/').replace(/\{path\}/g, "admin/file/download/").replace(/\{uuidName\}/g, item.id)); - } - }); - toastr.success('上传成功!'); - } else { - toastr.error(data.data, '上传失败!'); - } - }); - this.on("error", function (file, errorMessage, xhr) { - toastr.error(errorMessage, '上传失败!'); - }); - this.on("complete", function (file) { - this.removeFile(file); - }); - } - }); - }; - - EmChatInput.prototype.initSimpleMDE = function initSimpleMDE(textareaDom) { - var _this6 = this; - - this.simplemde = new _simplemde2.default({ - element: textareaDom, - spellChecker: false, - status: false, - autofocus: true, - toolbar: false, - - autoDownloadFontAwesome: false, - insertTexts: { - table: ["", "\n\n| 列1 | 列2 | 列3 |\n| ------ | ------ | ------ |\n| 文本 | 文本 | 文本 |\n\n"] - }, - previewRender: function previewRender(plainText, preview) { - return _this6.simplemde.markdown(utils.preParse(plainText)); - } - }); - - this.$chatMsgInputRef = $(this.inputRef).find('.textareaWrapper .CodeMirror textarea'); - if (this.$chatMsgInputRef.size() === 0) { - this.$chatMsgInputRef = $(this.inputRef).find('.textareaWrapper .CodeMirror [contenteditable="true"]'); - } - - this.initTextcomplete(); - }; - - EmChatInput.prototype.initTextcomplete = function initTextcomplete() { - var _this7 = this; - - $(this.$chatMsgInputRef).textcomplete([{ - match: /(|\b)(\/.*)$/, - search: function search(term, callback) { - var keys = _.keys(_commonTips2.default); - callback($.map(keys, function (key) { - return key.indexOf(term) === 0 ? key : null; - })); - }, - template: function template(value, term) { - return _commonTips2.default[value].label; - }, - replace: function replace(value) { - if (_this7.tipsActionHandler(value)) { - _this7.setCaretPosition(_commonTips2.default[value].line, _commonTips2.default[value].ch); - return '$1' + _commonTips2.default[value].value; - } else { - return ''; - } - } - }, { - match: /(^|\s)@(\w*)$/, - search: function search(term, callback) { - callback($.map(_this7.members, function (member) { - return member.enabled && member.username.indexOf(term) >= 0 ? member.username : null; - })); - }, - template: function template(value, term) { - var user = _.find(_this7.members, { username: value }); - return user.name + ' - ' + user.mails + ' (' + user.username + ')'; - }, - replace: function replace(value) { - return '$1{~' + value + '}'; - } - }, { - match: /(^|\s):([\+\-\w]*)$/, - search: function search(term, callback) { - callback($.map(_commonEmoji2.default, function (emoji) { - return _.some(emoji.split('_'), function (item) { - return item.indexOf(term) === 0; - }) ? emoji : null; - })); - }, - template: function template(value, term) { - if (value == 'search') { - return '\u8868\u60C5\u67E5\u627E - :search'; - } - var emojiKey = ':' + value + ':'; - return emojify.replace(emojiKey) + ' - ' + emojiKey; - }, - replace: function replace(value) { - if (_this7.tipsActionHandler(value)) { - return '$1:' + value + ': '; - } else { - return ''; - } - } - }], { - appendTo: '.tms-chat-status-bar', - maxCount: nsCons.NUM_TEXT_COMPLETE_MAX_COUNT - }); - - this.simplemde.codemirror.on('keydown', function (cm, e) { - if (_.includes([13, 38, 40], e.keyCode) && _this7.isTipsShow()) { - e.preventDefault(); - } else if (e.ctrlKey && e.keyCode === 13) { - _this7.sendChatMsg(); - } else if (e.keyCode === 27) { - _this7.simplemde.value(''); - } else if (e.ctrlKey && e.keyCode == 85) { - $(_this7.btnItemUploadRef).find('.content').click(); - } else if (e.ctrlKey && e.keyCode == 191) { - _this7.emHotkeysModal.show(); - } - }); - }; - - EmChatInput.prototype.setCaretPosition = function setCaretPosition(line, ch) { - var _this8 = this; - - (line || ch) && _.delay(function () { - var cr = _this8.simplemde.codemirror.getCursor(); - _this8.simplemde.codemirror.setCursor({ - line: cr.line - (line ? line : 0), - ch: cr.line ? ch ? ch : 0 : cr.ch - (ch ? ch : 0) - }); - }, 100); - }; - - EmChatInput.prototype.sendChatMsg = function sendChatMsg() { - var _this9 = this; - - var content = this.simplemde.value(); - - if (!$.trim(content)) { - this.simplemde.value(''); - return; - } - - if (this.sending) { - return; - } - - this.sending = true; - - var html = utils.md2html(content); - - var url = void 0; - var data = void 0; - if (this.isAt) { - url = '/admin/chat/direct/create'; - data = { - baseUrl: utils.getBaseUrl(), - path: wurl('path'), - chatTo: this.chatTo, - content: content, - contentHtml: html - }; - } else { - url = '/admin/chat/channel/create'; - data = { - url: utils.getUrl(), - channelId: this.channel.id, - usernames: utils.parseUsernames(content, this.members).join(','), - content: content, - contentHtml: html - }; - } - $.post(url, data, function (data, textStatus, xhr) { - if (data.success) { - _this9.simplemde.value(''); - ea.publish(nsCons.EVENT_CHAT_MSG_SENDED, { - data: data - }); - } else { - toastr.error(data.data, '发送消息失败!'); - } - }).always(function () { - _this9.sending = false; - }); - }; - - EmChatInput.prototype.sendChatMsgHandler = function sendChatMsgHandler() { - this.sendChatMsg(); - }; - - EmChatInput.prototype.isTipsShow = function isTipsShow() { - return $(this.chatStatusBarRef).find('.textcomplete-dropdown:visible').size() === 1; - }; - - EmChatInput.prototype.insertContent = function insertContent(content, mde) { - try { - var cm = mde ? mde.codemirror : this.simplemde.codemirror; - var cursor = cm.getCursor(); - if (cursor) { - cm.replaceRange(content, cursor, cursor); - cm.focus(); - } - } catch (err) { - console.log(err); - } - }; - - EmChatInput.prototype.tipsActionHandler = function tipsActionHandler(value) { - if (value == '/upload') { - $(this.btnItemUploadRef).find('.content').click(); - } else if (value == '/shortcuts') { - this.emHotkeysModal.show(); - } else if (value == 'search') { - _.delay(function () { - utils.openNewWin(nsCons.STR_EMOJI_SEARCH_URL); - }, 200); - } else { - return true; - } - - return false; - }; - - EmChatInput.prototype.togglePreviewHandler = function togglePreviewHandler() { - this.simplemde.togglePreview(); - }; - - return EmChatInput; - }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'chatTo', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'isAt', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'channel', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - })), _class2)) || _class; -}); -define('resources/elements/em-chat-member-popup',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmChatMemberPopup = undefined; - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var _class; - - var EmChatMemberPopup = exports.EmChatMemberPopup = (0, _aureliaFramework.containerless)(_class = function () { - function EmChatMemberPopup() { - var _this = this; - - _classCallCheck(this, EmChatMemberPopup); - - this.members = []; - this.member = {}; - - this.subscribe = ea.subscribe(nsCons.EVENT_CHAT_MEMBER_POPUP_SHOW, function (payload) { - _this.channel = payload.channel; - _this.username = payload.username; - _this.target = payload.target; - if (_this.username == 'all') { - if (!_this.channel) { - return; - } - _this.members = _this.channel.members; - } else { - _this.member = utils.getUser(_this.username); - var user = utils.getUser(_this.member.creator); - _this.member.creatorName = user && !!user.name ? user.name : _this.member.creator; - } - _.defer(function () { - - $(_this.target).popup({ - popup: _this.popup, - hoverable: true, - inline: false, - silent: true, - movePopup: false, - position: 'bottom left', - jitter: 300, - prefer: 'opposite', - - delay: { - show: 300, - hide: 300 - } - }).popup('show'); - }); - }); - } - - EmChatMemberPopup.prototype.unbind = function unbind() { - this.subscribe.dispose(); - }; - - return EmChatMemberPopup; - }()) || _class; -}); -define('resources/elements/em-chat-msg-popup',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmChatMsgPopup = undefined; - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var _class; - - var EmChatMsgPopup = exports.EmChatMsgPopup = (0, _aureliaFramework.containerless)(_class = function () { - function EmChatMsgPopup() { - var _this = this; - - _classCallCheck(this, EmChatMsgPopup); - - this.subscribe = ea.subscribe(nsCons.EVENT_CHAT_MSG_POPUP_SHOW, function (payload) { - _this.id = payload.id; - _this.target = payload.target; - - if (!_this.id) { - return; - } - - $(_this.target).popup({ - popup: _this.popup, - hoverable: true, - inline: false, - movePopup: false, - - silent: true, - position: 'bottom left', - jitter: 300, - prefer: 'opposite', - delay: { - show: 300, - hide: 300 - }, - onShow: function onShow() { - $.get('/admin/chat/channel/get', { - id: _this.id - }, function (data) { - if (data.success) { - _this.chatMsg = data.data; - } else { - toastr.error(data.data, "加载失败!"); - } - }); - } - }).popup('show'); - }); - } - - EmChatMsgPopup.prototype.unbind = function unbind() { - this.subscribe.dispose(); - }; - - return EmChatMsgPopup; - }()) || _class; -}); -define('resources/elements/em-chat-msg',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmChatMsg = undefined; - - function _initDefineProp(target, property, descriptor, context) { - if (!descriptor) return; - Object.defineProperty(target, property, { - enumerable: descriptor.enumerable, - configurable: descriptor.configurable, - writable: descriptor.writable, - value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 - }); - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { - var desc = {}; - Object['ke' + 'ys'](descriptor).forEach(function (key) { - desc[key] = descriptor[key]; - }); - desc.enumerable = !!desc.enumerable; - desc.configurable = !!desc.configurable; - - if ('value' in desc || desc.initializer) { - desc.writable = true; - } - - desc = decorators.slice().reverse().reduce(function (desc, decorator) { - return decorator(target, property, desc) || desc; - }, desc); - - if (context && desc.initializer !== void 0) { - desc.value = desc.initializer ? desc.initializer.call(context) : void 0; - desc.initializer = undefined; - } - - if (desc.initializer === void 0) { - Object['define' + 'Property'](target, property, desc); - desc = null; - } - - return desc; - } - - function _initializerWarningHelper(descriptor, context) { - throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.'); - } - - var _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5; - - var EmChatMsg = exports.EmChatMsg = (0, _aureliaFramework.containerless)(_class = (_class2 = function () { - function EmChatMsg() { - _classCallCheck(this, EmChatMsg); - - this.last = true; - - _initDefineProp(this, 'loginUser', _descriptor, this); - - _initDefineProp(this, 'isAt', _descriptor2, this); - - _initDefineProp(this, 'channel', _descriptor3, this); - - _initDefineProp(this, 'chats', _descriptor4, this); - - _initDefineProp(this, 'actived', _descriptor5, this); - - this.basePath = utils.getBasePath(); - } - - EmChatMsg.prototype.attached = function attached() { - this.initHotkeys(); - }; - - EmChatMsg.prototype.initHotkeys = function initHotkeys() { - var _this = this; - - $(document).bind('keydown', 'o', function (event) { - event.preventDefault(); - var item = _.find(_this.chats, { isHover: true }); - item && (item.isOpen = !item.isOpen); - }); - }; - - EmChatMsg.prototype.activedChanged = function activedChanged() { - if (!this.actived) { - return; - } - - var payload = this.actived.payload; - var result = payload.result; - - if (this.actived.payload.action == nsCons.ACTION_TYPE_AT) { - this.page = result; - this.chats = _.map(result.content, function (item) { - var chatChannel = item.chatChannel; - chatChannel.chatAt = item; - return chatChannel; - }); - this.last = result.last; - this.moreCnt = result.totalElements - (result.number + 1) * result.size; - } else if (this.actived.payload.action == nsCons.ACTION_TYPE_STOW) { - this.chats = payload.result; - this.last = true; - } else if (this.actived.payload.action == nsCons.ACTION_TYPE_PIN) { - this.chats = payload.result; - this.last = true; - } else if (this.actived.payload.action == nsCons.ACTION_TYPE_SEARCH) { - this.search = payload.search; - this.page = result; - this.chats = result.content; - this.last = result.last; - this.moreCnt = result.totalElements - (result.number + 1) * result.size; - } - }; - - EmChatMsg.prototype.searchItemMouseleaveHandler = function searchItemMouseleaveHandler(item) { - item.isOpen = false; - item.isHover = false; - }; - - EmChatMsg.prototype.searchItemMouseenterHandler = function searchItemMouseenterHandler(item) { - item.isHover = true; - }; - - EmChatMsg.prototype.gotoChatHandler = function gotoChatHandler(item) { - ea.publish(nsCons.EVENT_CHAT_SEARCH_GOTO_CHAT_ITEM, { chatItem: item }); - }; - - EmChatMsg.prototype.openSearchItemHandler = function openSearchItemHandler(item) { - item.isOpen = !item.isOpen; - }; - - EmChatMsg.prototype.searchMoreHandler = function searchMoreHandler() { - var _this2 = this; - - if (this.actived.payload.action == nsCons.ACTION_TYPE_SEARCH) { - this.searchMoreP = $.get('/admin/chat/direct/search', { - search: this.search, - size: this.page.size, - page: this.page.number + 1 - }, function (data) { - if (data.success) { - _this2.chats = _.concat(_this2.chats, data.data.content); - - _this2.page = data.data; - _this2.last = data.data.last; - _this2.moreCnt = data.data.totalElements - (data.data.number + 1) * data.data.size; - } - }); - } else { - this.searchMoreP = $.get('/admin/chat/channel/getAts', { - size: this.page.size, - page: this.page.number + 1 - }, function (data) { - if (data.success) { - _this2.chats = _.concat(_this2.chats, _.map(data.data.content, function (item) { - var chatChannel = item.chatChannel; - chatChannel.chatAt = item; - return chatChannel; - })); - - _this2.page = data.data; - _this2.last = data.data.last; - _this2.moreCnt = data.data.totalElements - (data.data.number + 1) * data.data.size; - } - }); - } - }; - - EmChatMsg.prototype.removePinHandler = function removePinHandler(item) { - var _this3 = this; - - $.post('/admin/chat/channel/pin/toggle', { - id: item.id, - cid: this.channel.id - }, function (data, textStatus, xhr) { - if (data.success) { - _this3.chats = _.reject(_this3.chats, { - id: item.id - }); - toastr.success('移除固定消息成功!'); - } else { - toastr.error(data.data, '移除固定消息失败!'); - } - }); - }; - - EmChatMsg.prototype.removeStowHandler = function removeStowHandler(item) { - var _this4 = this; - - $.post('/admin/chat/channel/removeStow', { - id: item.chatStow.id - }, function (data, textStatus, xhr) { - if (data.success) { - _this4.chats = _.reject(_this4.chats, { - id: item.id - }); - toastr.success('移除收藏消息成功!'); - } else { - toastr.error(data.data, '移除收藏消息失败!'); - } - }); - }; - - EmChatMsg.prototype.removeAtHandler = function removeAtHandler(item) { - var _this5 = this; - - $.post('/admin/chat/channel/markAsReaded', { - chatAtId: item.chatAt.id - }, function (data, textStatus, xhr) { - if (data.success) { - _this5.chats = _.reject(_this5.chats, { - id: item.id - }); - } else { - toastr.error(data.data, '移除@消息失败!'); - } - }); - }; - - return EmChatMsg; - }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'loginUser', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'isAt', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'channel', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, 'chats', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, 'actived', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - })), _class2)) || _class; -}); -define('resources/elements/em-chat-schedule-edit',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmChatScheduleEdit = undefined; - - function _initDefineProp(target, property, descriptor, context) { - if (!descriptor) return; - Object.defineProperty(target, property, { - enumerable: descriptor.enumerable, - configurable: descriptor.configurable, - writable: descriptor.writable, - value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 - }); - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { - var desc = {}; - Object['ke' + 'ys'](descriptor).forEach(function (key) { - desc[key] = descriptor[key]; - }); - desc.enumerable = !!desc.enumerable; - desc.configurable = !!desc.configurable; - - if ('value' in desc || desc.initializer) { - desc.writable = true; - } - - desc = decorators.slice().reverse().reduce(function (desc, decorator) { - return decorator(target, property, desc) || desc; - }, desc); - - if (context && desc.initializer !== void 0) { - desc.value = desc.initializer ? desc.initializer.call(context) : void 0; - desc.initializer = undefined; - } - - if (desc.initializer === void 0) { - Object['define' + 'Property'](target, property, desc); - desc = null; - } - - return desc; - } - - function _initializerWarningHelper(descriptor, context) { - throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.'); - } - - var _class, _desc, _value, _class2, _descriptor; - - var EmChatScheduleEdit = exports.EmChatScheduleEdit = (0, _aureliaFramework.containerless)(_class = (_class2 = function () { - function EmChatScheduleEdit() { - var _this = this; - - _classCallCheck(this, EmChatScheduleEdit); - - _initDefineProp(this, 'loginUser', _descriptor, this); - - this.actorsOpts = { - onAdd: function onAdd(addedValue, addedText, $addedChoice) { - $.post('/admin/schedule/addActors', { - id: _this.event.id, - basePath: utils.getBasePath(), - actors: addedValue - }, function (data, textStatus, xhr) { - if (data.success) { - toastr.success('添加参与者成功!'); - ea.publish(nsCons.EVENT_SCHEDULE_REFRESH, {}); - } else { - toastr.error(data.data); - } - }); - }, - onLabelRemove: function onLabelRemove(removedValue) { - if (_this.loginUser.username == removedValue) { - return false; - } - $.post('/admin/schedule/removeActors', { - id: _this.event.id, - basePath: utils.getBasePath(), - actors: removedValue - }, function (data, textStatus, xhr) { - if (data.success) { - toastr.success('移除参与者成功!'); - ea.publish(nsCons.EVENT_SCHEDULE_REFRESH, {}); - } else { - toastr.error(data.data); - } - }); - } - }; - } - - EmChatScheduleEdit.prototype.attached = function attached() { - $(this.startRef).calendar({ - today: true, - endCalendar: $(this.endRef) - }); - $(this.endRef).calendar({ - today: true, - startCalendar: $(this.startRef) - }); - }; - - EmChatScheduleEdit.prototype.initMembersUI = function initMembersUI(last) { - var _this2 = this; - - if (last) { - _.defer(function () { - var actors = [_this2.loginUser.username]; - if (_this2.event) { - actors = _.map(_this2.event.actors, 'username'); - } - - $(_this2.actorsRef).dropdown().dropdown('clear').dropdown('set selected', actors).dropdown(_this2.actorsOpts); - }); - } - }; - - EmChatScheduleEdit.prototype.titleKeyupHandler = function titleKeyupHandler(event) { - if (event.ctrlKey && event.keyCode === 13) { - this.updateHandler(); - } - }; - - EmChatScheduleEdit.prototype.clearStartDateHandler = function clearStartDateHandler() { - $(this.startRef).calendar('clear'); - }; - - EmChatScheduleEdit.prototype.clearEndDateHandler = function clearEndDateHandler() { - $(this.endRef).calendar('clear'); - }; - - EmChatScheduleEdit.prototype.show = function show(calEvent) { - this.event = _.clone(calEvent); - - this.showHandler(); - - $(this.scheduleEditRef).popup({ - on: 'click', - - inline: true, - silent: true, - - position: 'bottom center', - jitter: 300, - prefer: 'opposite', - delay: { - show: 300, - hide: 300 - } - }).popup('show'); - }; - - EmChatScheduleEdit.prototype.showHandler = function showHandler() { - var _this3 = this; - - this.users = window.tmsUsers; - $(this.actorsRef).dropdown().dropdown('clear'); - _.defer(function () { - if (_this3.event.start) { - $(_this3.startRef).calendar('set date', _this3.event.start.toDate()); - } else { - $(_this3.startRef).calendar('clear'); - } - - if (_this3.event.end) { - $(_this3.endRef).calendar('set date', _this3.event.end.toDate()); - } else { - $(_this3.endRef).calendar('clear'); - } - - var actors = _.map(_this3.event.actors, 'username'); - - $(_this3.actorsRef).dropdown('set selected', actors).dropdown(_this3.actorsOpts); - - if (_this3.event.creator.username == _this3.loginUser.username) { - $(_this3.titleRef).focus(); - } - - autosize.update(_this3.titleRef); - }); - }; - - EmChatScheduleEdit.prototype.updateHandler = function updateHandler() { - var _this4 = this; - - if (!this.event.title) { - toastr.error('日程内容不能为空!'); - return; - } - - var data = { - id: this.event.id, - basePath: utils.getBasePath(), - title: this.event.title - }; - var start = $(this.startRef).calendar('get date'); - var end = $(this.endRef).calendar('get date'); - - if (start) { - data.startDate = start; - } else { - data.startDate = new Date(); - } - - if (end) { - data.endDate = end; - } - - $.post('/admin/schedule/update2', data, function (data, textStatus, xhr) { - if (data.success) { - toastr.success('更新日程成功!'); - $(_this4.scheduleEditRef).popup('hide'); - ea.publish(nsCons.EVENT_SCHEDULE_REFRESH, {}); - } else { - toastr.error(data.data); - } - }); - }; - - EmChatScheduleEdit.prototype.delHandler = function delHandler() { - var _this5 = this; - - this.emConfirmModal.show({ - onapprove: function onapprove() { - - $.post('/admin/schedule/delete', { - id: _this5.event.id, - basePath: utils.getBasePath() - }, function (data, textStatus, xhr) { - if (data.success) { - toastr.success('日程删除成功!'); - ea.publish(nsCons.EVENT_SCHEDULE_REFRESH, {}); - } else { - toastr.error(data.data); - } - }); - } - }); - }; - - return EmChatScheduleEdit; - }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'loginUser', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - })), _class2)) || _class; -}); -define('resources/elements/em-chat-schedule-remind',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmChatScheduleRemind = undefined; - - function _initDefineProp(target, property, descriptor, context) { - if (!descriptor) return; - Object.defineProperty(target, property, { - enumerable: descriptor.enumerable, - configurable: descriptor.configurable, - writable: descriptor.writable, - value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 - }); - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { - var desc = {}; - Object['ke' + 'ys'](descriptor).forEach(function (key) { - desc[key] = descriptor[key]; - }); - desc.enumerable = !!desc.enumerable; - desc.configurable = !!desc.configurable; - - if ('value' in desc || desc.initializer) { - desc.writable = true; - } - - desc = decorators.slice().reverse().reduce(function (desc, decorator) { - return decorator(target, property, desc) || desc; - }, desc); - - if (context && desc.initializer !== void 0) { - desc.value = desc.initializer ? desc.initializer.call(context) : void 0; - desc.initializer = undefined; - } - - if (desc.initializer === void 0) { - Object['define' + 'Property'](target, property, desc); - desc = null; - } - - return desc; - } - - function _initializerWarningHelper(descriptor, context) { - throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.'); - } - - var _class, _desc, _value, _class2, _descriptor; - - var EmChatScheduleRemind = exports.EmChatScheduleRemind = (0, _aureliaFramework.containerless)(_class = (_class2 = function () { - function EmChatScheduleRemind() { - _classCallCheck(this, EmChatScheduleRemind); - - _initDefineProp(this, 'events', _descriptor, this); - - this.interval = 5000; - this.headOffset = 10 * 60 * 1000; - this.reminded = []; - - this._pollCheck(); - } - - EmChatScheduleRemind.prototype.unbind = function unbind() { - this.timer && clearInterval(this.timer); - }; - - EmChatScheduleRemind.prototype._pollCheck = function _pollCheck() { - var _this = this; - - this.timer = setInterval(function () { - - if (!_this.events) { - return; - } - - var now = new Date().getTime(); - _.each(_this.events, function (event) { - if (event.start && !_.includes(_this.reminded, event.id)) { - var start = event.start; - if (start > now && start < now + _this.headOffset) { - _this.event = event; - _this.reminded.push(event.id); - _this._desktopPuh(); - _this.show(); - } - } - }); - }, this.interval); - }; - - EmChatScheduleRemind.prototype._desktopPuh = function _desktopPuh() { - push.create('TMS日程提醒通知', { - body: '\u5185\u5BB9: ' + this.event.title, - icon: { - x16: 'img/tms-x16.ico', - x32: 'img/tms-x32.png' - }, - timeout: 5000 - }); - }; - - EmChatScheduleRemind.prototype.showHandler = function showHandler() {}; - - EmChatScheduleRemind.prototype.approveHandler = function approveHandler() {}; - - EmChatScheduleRemind.prototype.show = function show() { - this.emModal.show({ - hideOnApprove: true, - autoDimmer: false - }); - }; - - return EmChatScheduleRemind; - }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'events', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - })), _class2)) || _class; -}); -define('resources/elements/em-chat-schedule',['exports', 'aurelia-framework', 'moment', 'fullcalendar', 'fullcalendar/dist/locale/zh-cn'], function (exports, _aureliaFramework, _moment) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmChatSchedule = undefined; - - var _moment2 = _interopRequireDefault(_moment); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { - default: obj - }; - } - - function _initDefineProp(target, property, descriptor, context) { - if (!descriptor) return; - Object.defineProperty(target, property, { - enumerable: descriptor.enumerable, - configurable: descriptor.configurable, - writable: descriptor.writable, - value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 - }); - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { - var desc = {}; - Object['ke' + 'ys'](descriptor).forEach(function (key) { - desc[key] = descriptor[key]; - }); - desc.enumerable = !!desc.enumerable; - desc.configurable = !!desc.configurable; - - if ('value' in desc || desc.initializer) { - desc.writable = true; - } - - desc = decorators.slice().reverse().reduce(function (desc, decorator) { - return decorator(target, property, desc) || desc; - }, desc); - - if (context && desc.initializer !== void 0) { - desc.value = desc.initializer ? desc.initializer.call(context) : void 0; - desc.initializer = undefined; - } - - if (desc.initializer === void 0) { - Object['define' + 'Property'](target, property, desc); - desc = null; - } - - return desc; - } - - function _initializerWarningHelper(descriptor, context) { - throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.'); - } - - var _class, _desc, _value, _class2, _descriptor; - - var EmChatSchedule = exports.EmChatSchedule = (0, _aureliaFramework.containerless)(_class = (_class2 = function () { - EmChatSchedule.prototype.show = function show() { - var _this = this; - - this.users = window.tmsUsers; - - _.defer(function () { - $(_this.scheduleRef).fullCalendar('today'); - }); - _.delay(function () { - $(_this.scheduleRef).fullCalendar('option', 'height', 'parent'); - $(_this.scheduleRef).fullCalendar('refetchEvents'); - }, 500); - }; - - function EmChatSchedule() { - var _this2 = this; - - _classCallCheck(this, EmChatSchedule); - - _initDefineProp(this, 'loginUser', _descriptor, this); - - this.offset = 100; - - this.actorsOpts = { - onAdd: function onAdd(addedValue, addedText, $addedChoice) {}, - onLabelRemove: function onLabelRemove(removedValue) { - if (_this2.loginUser.username == removedValue) { - return false; - } - } - }; - - this.subscribe = ea.subscribe(nsCons.EVENT_SCHEDULE_REFRESH, function (payload) { - $(_this2.scheduleRef).fullCalendar('refetchEvents'); - }); - - this._getEvents(); - } - - EmChatSchedule.prototype._getEvents = function _getEvents(start, end, callback) { - var _this3 = this; - - var data = {}; - if (start) { - data.start = start.unix(); - } - if (end) { - data.start = end.unix(); - } - $.get('/admin/schedule/listMy', data, function (data) { - if (data.success) { - _this3.events = _.map(data.data, function (item) { - var event = { - id: item.id, - title: item.title, - actors: item.actors, - creator: item.creator - }; - - if (item.startDate) { - event.start = item.startDate; - } else { - event.start = new Date().getTime(); - } - - if (item.endDate) { - event.end = item.endDate; - } - - return event; - }); - callback && callback(_this3.events); - } - }); - }; - - EmChatSchedule.prototype.unbind = function unbind() { - this.subscribe.dispose(); - }; - - EmChatSchedule.prototype.attached = function attached() { - var _this4 = this; - - $(this.scheduleRef).fullCalendar({ - header: { - left: 'prev,next today', - - center: 'title', - right: 'month,agendaWeek,agendaDay,listWeek' - }, - - height: 'parent', - defaultDate: new Date(), - defaultView: 'listWeek', - editable: true, - eventLimit: true, - navLinks: true, - - timezone: 'local', - dayClick: function dayClick(date, jsEvent, view) { - - $(_this4.startRef).calendar('set date', date.toDate()); - _this4.isPopupShowForDayClick = true; - $(_this4.addRef).popup('show'); - }, - eventClick: function eventClick(calEvent, jsEvent, view) { - _this4.scheduleEditVm.show(calEvent); - }, - eventMouseover: function eventMouseover(event, jsEvent, view) {}, - eventMouseout: function eventMouseout(event, jsEvent, view) {}, - events: function events(start, end, timezone, callback) { - - _this4._getEvents(start, end, callback); - }, - eventDrop: function eventDrop(event, delta, revertFunc) { - - if (event.creator.username != _this4.loginUser.username) { - toastr.error('您没有权限修改!'); - ea.publish(nsCons.EVENT_SCHEDULE_REFRESH, {}); - return; - } - - _this4._updateDate(event.id, event.start, event.end); - }, - eventResize: function eventResize(event, delta, revertFunc) { - - if (event.creator.username != _this4.loginUser.username) { - toastr.error('您没有权限修改!'); - ea.publish(nsCons.EVENT_SCHEDULE_REFRESH, {}); - return; - } - - _this4._updateDate(event.id, event.start, event.end); - } - }); - - $(this.addRef).popup({ - on: 'click', - - inline: true, - - silent: true, - - jitter: 300, - position: 'bottom center', - delay: { - show: 300, - hide: 300 - }, - onVisible: function onVisible() { - $(_this4.titleRef).focus(); - autosize.update(_this4.titleRef); - if (!_this4.title && !_this4.isPopupShowForDayClick) { - $(_this4.startRef).calendar('set date', new Date()); - } - _this4.isPopupShowForDayClick = false; - } - }); - - $(this.startRef).calendar({ - today: true, - endCalendar: $(this.endRef) - }); - $(this.endRef).calendar({ - today: true, - startCalendar: $(this.startRef) - }); - - this._reset(); - }; - - EmChatSchedule.prototype.titleKeyupHandler = function titleKeyupHandler(event) { - if (event.ctrlKey && event.keyCode === 13) { - this.addHandler(); - } - }; - - EmChatSchedule.prototype._updateDate = function _updateDate(id, start, end) { - var data = { - id: id, - basePath: utils.getBasePath() - }; - - if (start) { - data.startDate = start.toDate(); - } else { - data.startDate = new Date(); - } - - if (end) { - data.endDate = end.toDate(); - } - - $.post('/admin/schedule/updateStartEndDate', data, function (data, textStatus, xhr) { - if (data.success) { - toastr.success('更新日程成功!'); - ea.publish(nsCons.EVENT_SCHEDULE_REFRESH, {}); - } else { - toastr.error(data.data); - } - }); - }; - - EmChatSchedule.prototype.initMembersUI = function initMembersUI(last) { - var _this5 = this; - - if (last) { - _.defer(function () { - $(_this5.actorsRef).dropdown().dropdown('clear').dropdown(_this5.actorsOpts).dropdown('set selected', [_this5.loginUser.username]); - }); - } - }; - - EmChatSchedule.prototype.clearStartDateHandler = function clearStartDateHandler() { - $(this.startRef).calendar('clear'); - }; - - EmChatSchedule.prototype.clearEndDateHandler = function clearEndDateHandler() { - $(this.endRef).calendar('clear'); - }; - - EmChatSchedule.prototype.addHandler = function addHandler() { - var _this6 = this; - - if (!this.title) { - toastr.error('日程内容不能为空!'); - return; - } - - var data = { - title: this.title, - basePath: utils.getBasePath(), - actors: $(this.actorsRef).dropdown('get value') - }; - - var start = $(this.startRef).calendar('get date'); - var end = $(this.endRef).calendar('get date'); - - if (start) { - data.startDate = start; - } else { - data.startDate = new Date(); - } - - if (end) { - data.endDate = end; - } - - $.post('/admin/schedule/create', data, function (data, textStatus, xhr) { - if (data.success) { - $(_this6.scheduleRef).fullCalendar('refetchEvents'); - toastr.success('添加日程成功!'); - _this6._reset(); - $(_this6.addRef).popup('hide'); - } else { - toastr.error(data.data); - } - }); - }; - - EmChatSchedule.prototype._reset = function _reset() { - this.title = ''; - $(this.startRef).calendar('set date', new Date()); - $(this.endRef).calendar('clear'); - $(this.actorsRef).dropdown('clear'); - if (this.loginUser && this.loginUser.username) { - $(this.actorsRef).dropdown('set selected', [this.loginUser.username]).dropdown('set value', this.loginUser.username); - } - }; - - return EmChatSchedule; - }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'loginUser', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - })), _class2)) || _class; -}); -define('resources/elements/em-chat-share',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmChatShare = undefined; - - function _initDefineProp(target, property, descriptor, context) { - if (!descriptor) return; - Object.defineProperty(target, property, { - enumerable: descriptor.enumerable, - configurable: descriptor.configurable, - writable: descriptor.writable, - value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 - }); - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { - var desc = {}; - Object['ke' + 'ys'](descriptor).forEach(function (key) { - desc[key] = descriptor[key]; - }); - desc.enumerable = !!desc.enumerable; - desc.configurable = !!desc.configurable; - - if ('value' in desc || desc.initializer) { - desc.writable = true; - } - - desc = decorators.slice().reverse().reduce(function (desc, decorator) { - return decorator(target, property, desc) || desc; - }, desc); - - if (context && desc.initializer !== void 0) { - desc.value = desc.initializer ? desc.initializer.call(context) : void 0; - desc.initializer = undefined; - } - - if (desc.initializer === void 0) { - Object['define' + 'Property'](target, property, desc); - desc = null; - } - - return desc; - } - - function _initializerWarningHelper(descriptor, context) { - throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.'); - } - - var _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4; - - var EmChatShare = exports.EmChatShare = (0, _aureliaFramework.containerless)(_class = (_class2 = function () { - function EmChatShare() { - _classCallCheck(this, EmChatShare); - - this.shares = []; - this.desc = ''; - - _initDefineProp(this, 'chat', _descriptor, this); - - _initDefineProp(this, 'channel', _descriptor2, this); - - _initDefineProp(this, 'loginUser', _descriptor3, this); - - _initDefineProp(this, 'isAt', _descriptor4, this); - - this.basePath = utils.getBasePath(); - } - - EmChatShare.prototype.attached = function attached() { - var _this = this; - - $(this.searchRef).search({ - minCharacters: 2, - cache: false, - selectFirstResult: true, - showNoResults: false, - onSelect: function onSelect(result, response) { - result.item._id = _.uniqueId('share-item-'); - result.item._type = result.item.username ? 'user' : 'channel'; - _this.shares.push(result.item); - _.defer(function () { - $(_this.inputSearchRef).val(''); - }); - }, - apiSettings: { - onResponse: function onResponse(resp) { - var response = { - results: [] - }; - $.each(resp.data.users, function (index, item) { - if (!_.find(_.filter(_this.shares, function (c) { - return c._type == 'user'; - }), { username: item.username })) { - response.results.push({ - item: item, - title: ' ' + item.name + ' (' + item.username + ')' - }); - } - }); - $.each(resp.data.channels, function (index, item) { - if (!_.find(_.filter(_this.shares, function (c) { - return c._type == 'channel'; - }), { name: item.name })) { - response.results.push({ - item: item, - title: ' ' + item.title + ' (' + item.name + ')' - }); - } - }); - return response; - }, - url: '/admin/blog/share/to/search?search={query}' - } - }); - $(this.shareRef).popup({ - on: 'click', - inline: true, - silent: true, - position: 'bottom right', - jitter: 300, - delay: { - show: 300, - hide: 300 - }, - onVisible: function onVisible() { - $(_this.inputSearchRef).focus(); - } - }); - }; - - EmChatShare.prototype.shareSearchKeyupHandler = function shareSearchKeyupHandler(event) { - if (event.keyCode === 13 && !$(this.searchRef).search('is visible')) { - var val = $(this.inputSearchRef).val(); - if (utils.isMail(val)) { - if (!_.find(_.filter(this.shares, function (c) { - return c._type == 'mail'; - }), { mail: val })) { - this.shares.push({ - _id: _.uniqueId('share-item-'), - _type: 'mail', - mail: val - }); - $(this.inputSearchRef).val(''); - } - } - } - }; - - EmChatShare.prototype.show = function show() { - $(this.shareRef).popup('show'); - }; - - EmChatShare.prototype.removeShareHandler = function removeShareHandler(item) { - this.shares = _.reject(this.shares, { _id: item._id }); - }; - - EmChatShare.prototype.cancelHandler = function cancelHandler() { - this._reset(); - }; - - EmChatShare.prototype._reset = function _reset() { - this.shares = []; - this.desc = ''; - $(this.inputSearchRef).val(''); - $(this.shareRef).popup('hide'); - }; - - EmChatShare.prototype.shareHandler = function shareHandler() { - var _this2 = this; - - if (this.shares.length === 0) { - toastr.error('请先指定沟通消息分享用户或者频道或者邮箱!'); - return; - } - - this.ajaxS = $.post('/admin/chat/' + (this.isAt ? 'direct' : 'channel') + '/share', { - basePath: utils.getBasePath(), - href: this.basePath + '#/chat/' + (this.isAt ? '@' + this.loginUser.username : this.channel.name) + '?id=' + this.chat.id, - id: this.chat.id, - desc: this.desc, - html: utils.md2html(this.chat.content), - users: _.chain(this.shares).filter(function (item) { - return item._type == 'user'; - }).map('username').join().value(), - channels: _.chain(this.shares).filter(function (item) { - return item._type == 'channel'; - }).map('name').join().value(), - mails: _.chain(this.shares).filter(function (item) { - return item._type == 'mail'; - }).map('mail').join().value() - }, function (data, textStatus, xhr) { - if (data.success) { - _this2._reset(); - toastr.success('沟通消息分享成功!'); - } else { - toastr.error(data.data, '沟通消息分享失败!'); - } - }); - }; - - return EmChatShare; - }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'chat', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'channel', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'loginUser', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, 'isAt', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - })), _class2)) || _class; -}); -define('resources/elements/em-chat-sidebar-left',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmChatSidebarLeft = undefined; - - function _initDefineProp(target, property, descriptor, context) { - if (!descriptor) return; - Object.defineProperty(target, property, { - enumerable: descriptor.enumerable, - configurable: descriptor.configurable, - writable: descriptor.writable, - value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 - }); - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { - var desc = {}; - Object['ke' + 'ys'](descriptor).forEach(function (key) { - desc[key] = descriptor[key]; - }); - desc.enumerable = !!desc.enumerable; - desc.configurable = !!desc.configurable; - - if ('value' in desc || desc.initializer) { - desc.writable = true; - } - - desc = decorators.slice().reverse().reduce(function (desc, decorator) { - return decorator(target, property, desc) || desc; - }, desc); - - if (context && desc.initializer !== void 0) { - desc.value = desc.initializer ? desc.initializer.call(context) : void 0; - desc.initializer = undefined; - } - - if (desc.initializer === void 0) { - Object['define' + 'Property'](target, property, desc); - desc = null; - } - - return desc; - } - - function _initializerWarningHelper(descriptor, context) { - throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.'); - } - - var _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5; - - var EmChatSidebarLeft = exports.EmChatSidebarLeft = (0, _aureliaFramework.containerless)(_class = (_class2 = function () { - EmChatSidebarLeft.prototype.usersChanged = function usersChanged() { - this._filter(); - }; - - EmChatSidebarLeft.prototype.channelsChanged = function channelsChanged() { - this._filter(); - }; - - EmChatSidebarLeft.prototype.loginUserChanged = function loginUserChanged() { - if (this.loginUser) { - this.isSuper = utils.isSuperUser(this.loginUser); - } - }; - - function EmChatSidebarLeft() { - var _this = this; - - _classCallCheck(this, EmChatSidebarLeft); - - _initDefineProp(this, 'users', _descriptor, this); - - _initDefineProp(this, 'loginUser', _descriptor2, this); - - _initDefineProp(this, 'channels', _descriptor3, this); - - _initDefineProp(this, 'chatTo', _descriptor4, this); - - _initDefineProp(this, 'isAt', _descriptor5, this); - - this.filter = ''; - this.isSuper = nsCtx.isSuper; - - this.subscribe = ea.subscribe(nsCons.EVENT_CHANNEL_ACTIONS, function (payload) { - _this[payload.action](payload.item); - }); - this.subscribe1 = ea.subscribe(nsCons.EVENT_SYSTEM_LINKS_REFRESH, function (payload) { - _this._refreshSysLinks(); - }); - } - - EmChatSidebarLeft.prototype._refreshSysLinks = function _refreshSysLinks() { - var _this2 = this; - - $.get('/admin/link/listByApp', function (data) { - if (data.success) { - _this2.sysLinks = data.data; - } else { - _this2.sysLinks = []; - } - }); - }; - - EmChatSidebarLeft.prototype.unbind = function unbind() { - this.subscribe.dispose(); - this.subscribe1.dispose(); - }; - - EmChatSidebarLeft.prototype.bind = function bind(bindingCtx, overrideCtx) { - this._refreshSysLinks(); - }; - - EmChatSidebarLeft.prototype.attached = function attached() { - var _this3 = this; - - $(this.logoRef).on('mouseenter', function (event) { - $(_this3.logoRef).animateCss('flip'); - }); - }; - - EmChatSidebarLeft.prototype._filter = function _filter() { - var _this4 = this; - - _.each(this.users, function (item) { - item.hidden = item.username.indexOf(_this4.filter) == -1; - }); - - _.each(this.channels, function (item) { - item.hidden = item.name.indexOf(_this4.filter) == -1; - }); - }; - - EmChatSidebarLeft.prototype.chatToUserFilerKeyupHanlder = function chatToUserFilerKeyupHanlder(evt) { - this._filter(); - - if (evt.keyCode === 13) { - var user = _.find(this.users, { - hidden: false - }); - - if (user) { - window.location = wurl('path') + ('#/chat/@' + user.username); - return; - } - - var channel = _.find(this.channels, { - hidden: false - }); - - if (channel) { - window.location = wurl('path') + ('#/chat/' + channel.name); - return; - } - } - }; - - EmChatSidebarLeft.prototype.clearFilterHandler = function clearFilterHandler() { - var _this5 = this; - - this.filter = ''; - _.each(this.users, function (item) { - item.hidden = item.username.indexOf(_this5.filter) == -1; - }); - _.each(this.channels, function (item) { - item.hidden = item.name.indexOf(_this5.filter) == -1; - }); - }; - - EmChatSidebarLeft.prototype.editHandler = function editHandler(item) { - this.selectedChannel = item; - this.channelEditMd.show(); - }; - - EmChatSidebarLeft.prototype.delHandler = function delHandler(item) { - var _this6 = this; - - this.confirmMd.show({ - onapprove: function onapprove() { - $.post('/admin/channel/delete', { - id: item.id - }, function (data) { - if (data.success) { - toastr.success('删除频道成功!'); - _.remove(_this6.channels, { id: item.id }); - ea.publish(nsCons.EVENT_CHAT_CHANNEL_DELETED, { channel: item }); - } else { - toastr.error(data.data, '删除频道失败!'); - } - }); - } - }); - }; - - EmChatSidebarLeft.prototype.membersMgrHandler = function membersMgrHandler(item) { - this.selectedChannel = item; - this.channelMembersMgrMd.show(); - }; - - EmChatSidebarLeft.prototype.membersShowHandler = function membersShowHandler(item) { - this.selectedChannel = item; - this.channelMembersShowMd.show(); - }; - - EmChatSidebarLeft.prototype.leaveHandler = function leaveHandler(item) { - this.confirmMd.show({ - content: '\u786E\u5B9A\u8981\u79BB\u5F00\u9891\u9053' + item.title + '\u5417?', - onapprove: function onapprove() { - $.post('/admin/channel/leave', { - id: item.id - }, function (data) { - if (data.success) { - toastr.success('离开频道成功!'); - ea.publish(nsCons.EVENT_CHAT_CHANNEL_LEAVED, { channel: data.data }); - } else { - toastr.error(data.data, '离开频道失败!'); - } - }); - } - }); - }; - - EmChatSidebarLeft.prototype.switchHandler = function switchHandler() { - ea.publish(nsCons.EVENT_SWITCH_CHAT_TO, {}); - }; - - EmChatSidebarLeft.prototype.addChannelLinkHandler = function addChannelLinkHandler(event) { - this.sysLinkMgrVm.show(); - }; - - EmChatSidebarLeft.prototype.isSubscribed = function isSubscribed(item) { - return _.some(item.subscriber, { username: this.loginUser.username }); - }; - - EmChatSidebarLeft.prototype.subscribeHandler = function subscribeHandler(item) { - - var isSub = this.isSubscribed(item); - - $.post('/admin/channel/' + (isSub ? 'unsubscribe' : 'subscribe'), { - id: item.id - }, function (data) { - if (data.success) { - item.subscriber = data.data.subscriber; - toastr.success((isSub ? '取消订阅' : '订阅频道') + '\u6210\u529F!'); - item.isSubscribed = !isSub; - } else { - toastr.error(data.data, (isSub ? '取消订阅' : '订阅频道') + '\u5931\u8D25!'); - } - }); - }; - - EmChatSidebarLeft.prototype.sysLinkHandler = function sysLinkHandler(item) { - $.post('/admin/link/count/inc', { id: item.id }); - return true; - }; - - return EmChatSidebarLeft; - }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'users', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'loginUser', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'channels', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, 'chatTo', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, 'isAt', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - })), _class2)) || _class; -}); -define('resources/elements/em-chat-sidebar-right',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmChatSidebarRight = undefined; - - function _initDefineProp(target, property, descriptor, context) { - if (!descriptor) return; - Object.defineProperty(target, property, { - enumerable: descriptor.enumerable, - configurable: descriptor.configurable, - writable: descriptor.writable, - value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 - }); - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { - var desc = {}; - Object['ke' + 'ys'](descriptor).forEach(function (key) { - desc[key] = descriptor[key]; - }); - desc.enumerable = !!desc.enumerable; - desc.configurable = !!desc.configurable; - - if ('value' in desc || desc.initializer) { - desc.writable = true; - } - - desc = decorators.slice().reverse().reduce(function (desc, decorator) { - return decorator(target, property, desc) || desc; - }, desc); - - if (context && desc.initializer !== void 0) { - desc.value = desc.initializer ? desc.initializer.call(context) : void 0; - desc.initializer = undefined; - } - - if (desc.initializer === void 0) { - Object['define' + 'Property'](target, property, desc); - desc = null; - } - - return desc; - } - - function _initializerWarningHelper(descriptor, context) { - throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.'); - } - - var _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3; - - var EmChatSidebarRight = exports.EmChatSidebarRight = (0, _aureliaFramework.containerless)(_class = (_class2 = function () { - function EmChatSidebarRight() { - var _actionMapping, - _this = this; - - _classCallCheck(this, EmChatSidebarRight); - - _initDefineProp(this, 'loginUser', _descriptor, this); - - _initDefineProp(this, 'isAt', _descriptor2, this); - - _initDefineProp(this, 'channel', _descriptor3, this); - - this.actionMapping = (_actionMapping = {}, _actionMapping[nsCons.ACTION_TYPE_DIR] = { handler: this.dirHandler, nodata: '', show: 'dir' }, _actionMapping[nsCons.ACTION_TYPE_AT] = { nodata: '暂无@消息', show: 'msg' }, _actionMapping[nsCons.ACTION_TYPE_STOW] = { nodata: '暂无收藏消息', show: 'msg' }, _actionMapping[nsCons.ACTION_TYPE_ATTACH] = { handler: this.attachHandler, nodata: '', show: 'attach' }, _actionMapping[nsCons.ACTION_TYPE_SCHEDULE] = { handler: this.scheduleHandler, nodata: '', show: 'schedule' }, _actionMapping[nsCons.ACTION_TYPE_SEARCH] = { nodata: '无符合检索结果', show: 'msg' }, _actionMapping[nsCons.ACTION_TYPE_PIN] = { nodata: '暂无频道固定消息', show: 'msg' }, _actionMapping); - - - this.subscribe = ea.subscribe(nsCons.EVENT_CHAT_RIGHT_SIDEBAR_TOGGLE, function (payload) { - _this.actived = _.clone(_this.actionMapping[payload.action]); - _this.actived.payload = payload; - if (_this.actived.handler) { - _.bind(_this.actived.handler, _this, payload)(); - } - }); - } - - EmChatSidebarRight.prototype.unbind = function unbind() { - this.subscribe.dispose(); - }; - - EmChatSidebarRight.prototype.attachHandler = function attachHandler(payload) { - this.chatAttachVm.fetch(); - }; - - EmChatSidebarRight.prototype.dirHandler = function dirHandler(payload) { - $(this.dirRef).empty().append(payload.result); - }; - - EmChatSidebarRight.prototype.scheduleHandler = function scheduleHandler(payload) { - this.chatScheduleVm.show(); - }; - - return EmChatSidebarRight; - }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'loginUser', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'isAt', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'channel', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - })), _class2)) || _class; -}); -define('resources/elements/em-chat-system-link-mgr',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmChatSystemLinkMgr = undefined; - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var _class; - - var EmChatSystemLinkMgr = exports.EmChatSystemLinkMgr = (0, _aureliaFramework.containerless)(_class = function () { - function EmChatSystemLinkMgr() { - _classCallCheck(this, EmChatSystemLinkMgr); - - this.links = []; - } - - EmChatSystemLinkMgr.prototype.addHandler = function addHandler() { - var _this = this; - - $.post('/admin/link/create', { - title: this.title, - href: this.href, - type: 'App' - }, function (data, textStatus, xhr) { - if (data.success) { - _this.title = ''; - _this.href = ''; - _this.links.push(data.data); - ea.publish(nsCons.EVENT_SYSTEM_LINKS_REFRESH, {}); - } else { - toastr.error(data.data); - } - }); - }; - - EmChatSystemLinkMgr.prototype.delHandler = function delHandler(item) { - var _this2 = this; - - $.post('/admin/link/delete', { - id: item.id - }, function (data, textStatus, xhr) { - if (data.success) { - _this2.links = _.reject(_this2.links, { id: item.id }); - ea.publish(nsCons.EVENT_SYSTEM_LINKS_REFRESH, {}); - toastr.success('删除成功!'); - } else { - toastr.error(data.data); - } - }); - }; - - EmChatSystemLinkMgr.prototype.editHandler = function editHandler(item) { - item.oldTitle = item.title; - item.oldHref = item.href; - item.isEditing = true; - }; - - EmChatSystemLinkMgr.prototype.updateHandler = function updateHandler(item) { - $.post('/admin/link/update', { - id: item.id, - title: item.title, - href: item.href - }, function (data, textStatus, xhr) { - if (data.success) { - item.isEditing = false; - ea.publish(nsCons.EVENT_SYSTEM_LINKS_REFRESH, {}); - toastr.success('更新成功!'); - } else { - toastr.error(data.data); - } - }); - }; - - EmChatSystemLinkMgr.prototype.showHandler = function showHandler() { - var _this3 = this; - - $.get('/admin/link/listByApp', function (data) { - if (data.success) { - _this3.links = data.data; - } else { - _this3.links = []; - } - }); - }; - - EmChatSystemLinkMgr.prototype.show = function show() { - this.emModal.show({ autoDimmer: false }); - }; - - EmChatSystemLinkMgr.prototype.approveHandler = function approveHandler(modal) {}; - - return EmChatSystemLinkMgr; - }()) || _class; -}); -define('resources/elements/em-chat-top-menu',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmChatTopMenu = undefined; - - function _initDefineProp(target, property, descriptor, context) { - if (!descriptor) return; - Object.defineProperty(target, property, { - enumerable: descriptor.enumerable, - configurable: descriptor.configurable, - writable: descriptor.writable, - value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 - }); - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { - var desc = {}; - Object['ke' + 'ys'](descriptor).forEach(function (key) { - desc[key] = descriptor[key]; - }); - desc.enumerable = !!desc.enumerable; - desc.configurable = !!desc.configurable; - - if ('value' in desc || desc.initializer) { - desc.writable = true; - } - - desc = decorators.slice().reverse().reduce(function (desc, decorator) { - return decorator(target, property, desc) || desc; - }, desc); - - if (context && desc.initializer !== void 0) { - desc.value = desc.initializer ? desc.initializer.call(context) : void 0; - desc.initializer = undefined; - } - - if (desc.initializer === void 0) { - Object['define' + 'Property'](target, property, desc); - desc = null; - } - - return desc; - } - - function _initializerWarningHelper(descriptor, context) { - throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.'); - } - - var _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9; - - var EmChatTopMenu = exports.EmChatTopMenu = (0, _aureliaFramework.containerless)(_class = (_class2 = function () { - EmChatTopMenu.prototype.loginUserChanged = function loginUserChanged() { - if (this.loginUser) { - this.isSuper = utils.isSuperUser(this.loginUser); - } - }; - - EmChatTopMenu.prototype.chatToChanged = function chatToChanged() { - $(this.chatToDropdownRef).dropdown('set selected', this.chatId).dropdown('hide'); - }; - - EmChatTopMenu.prototype.channelChanged = function channelChanged() { - this._refreshChannelLinks(); - }; - - EmChatTopMenu.prototype._refreshChannelLinks = function _refreshChannelLinks() { - var _this = this; - - if (this.channel) { - $.get('/admin/link/listBy', { - channelId: this.channel.id - }, function (data) { - if (data.success) { - _this.channelLinks = data.data; - } else { - _this.channelLinks = []; - } - }); - } - }; - - function EmChatTopMenu() { - var _this2 = this; - - _classCallCheck(this, EmChatTopMenu); - - _initDefineProp(this, 'loginUser', _descriptor, this); - - _initDefineProp(this, 'chatUser', _descriptor2, this); - - _initDefineProp(this, 'users', _descriptor3, this); - - _initDefineProp(this, 'channels', _descriptor4, this); - - _initDefineProp(this, 'channel', _descriptor5, this); - - _initDefineProp(this, 'loginUser', _descriptor6, this); - - _initDefineProp(this, 'chatId', _descriptor7, this); - - _initDefineProp(this, 'chatTo', _descriptor8, this); - - _initDefineProp(this, 'isAt', _descriptor9, this); - - this.isRightSidebarShow = false; - this.activeType = ''; - this.ACTION_TYPE_SEARCH = nsCons.ACTION_TYPE_SEARCH; - this.ACTION_TYPE_STOW = nsCons.ACTION_TYPE_STOW; - this.ACTION_TYPE_PIN = nsCons.ACTION_TYPE_PIN; - this.ACTION_TYPE_AT = nsCons.ACTION_TYPE_AT; - this.ACTION_TYPE_DIR = nsCons.ACTION_TYPE_DIR; - this.ACTION_TYPE_ATTACH = nsCons.ACTION_TYPE_ATTACH; - this.ACTION_TYPE_SCHEDULE = nsCons.ACTION_TYPE_SCHEDULE; - this.countAt = null; - this.newAtCnt = 0; - this.channelLinks = []; - - this.subscribe = ea.subscribe(nsCons.EVENT_CHAT_MSG_WIKI_DIR, function (payload) { - _this2.dir = payload.dir; - - if (_this2.activeType == _this2.ACTION_TYPE_DIR && _this2.isRightSidebarShow) { - ea.publish(nsCons.EVENT_CHAT_RIGHT_SIDEBAR_TOGGLE, { - action: _this2.activeType, - result: _this2.dir - }); - } - }); - - this.subscribe1 = ea.subscribe(nsCons.EVENT_CHAT_POLL_UPDATE, function (payload) { - if (_this2.countAt !== null && _this2.newAtCnt <= 0) { - _this2.newAtCnt = payload.countAt - _this2.countAt; - } - _this2.countAt = payload.countAt; - _this2.countMyRecentSchedule = payload.countMyRecentSchedule; - }); - - this.subscribe2 = ea.subscribe(nsCons.EVENT_SWITCH_CHAT_TO, function (payload) { - $(_this2.chatToDropdownRef).dropdown('toggle'); - }); - - this.subscribe3 = ea.subscribe(nsCons.EVENT_CHANNEL_LINKS_REFRESH, function (payload) { - _this2._refreshChannelLinks(); - }); - } - - EmChatTopMenu.prototype.unbind = function unbind() { - this.subscribe.dispose(); - this.subscribe1.dispose(); - this.subscribe2.dispose(); - this.subscribe3.dispose(); - }; - - EmChatTopMenu.prototype.attached = function attached() { - this.initHotkeys(); - this.initSearch(); - }; - - EmChatTopMenu.prototype.initSearch = function initSearch() { - var _this3 = this; - - var source = []; - if (localStorage) { - var v = localStorage.getItem('tms/chat-direct:search'); - source = v ? $.parseJSON(v) : []; - } - this.searchSource = source; - $(this.searchRef).search({ - source: source, - onSelect: function onSelect(result, response) { - _this3.searchHandler(); - }, - onResults: function onResults() { - $(_this3.searchRef).search('hide results'); - } - }); - }; - - EmChatTopMenu.prototype.searchHandler = function searchHandler() { - var _this4 = this; - - $(this.searchRef).search('hide results'); - - var search = $(this.searchInputRef).val(); - - if (!search || search.length < 2) { - toastr.error('检索条件至少需要两个字符!'); - return; - } - - this.search = search; - - var isExists = false; - $.each(this.searchSource, function (index, val) { - if (val.title == search) { - isExists = true; - return false; - } - }); - if (!isExists) { - this.searchSource.splice(0, 0, { - title: search - }); - $(this.searchRef).search({ - source: _.clone(this.searchSource) - }); - } - localStorage && localStorage.setItem('tms/chat-direct:search', JSON.stringify(this.searchSource)); - - var url = void 0; - var data = void 0; - if (this.isAt) { - url = '/admin/chat/direct/search'; - data = { - search: this.search, - size: 20, - page: 0 - }; - } else { - url = '/admin/chat/channel/search'; - data = { - search: this.search, - channelId: this.channel.id, - size: 20, - page: 0 - }; - } - - this.searchingP = $.get(url, data, function (data) { - if (data.success) { - _this4.toggleRightSidebar(true); - - ea.publish(nsCons.EVENT_CHAT_RIGHT_SIDEBAR_TOGGLE, { - action: _this4.activeType, - result: data.data, - search: _this4.search - }); - } - }); - }; - - EmChatTopMenu.prototype.initHotkeys = function initHotkeys() { - var _this5 = this; - - $(document).bind('keydown', 's', function (event) { - event.preventDefault(); - _this5.toggleRightSidebar(); - }).bind('keydown', 'ctrl+k', function (event) { - event.preventDefault(); - $(_this5.chatToDropdownRef).dropdown('toggle'); - }); - - $(this.filterChatToUser).bind('keydown', 'ctrl+k', function (event) { - event.preventDefault(); - $(_this5.chatToDropdownRef).dropdown('toggle'); - }); - }; - - EmChatTopMenu.prototype.initChatToDropdownHandler = function initChatToDropdownHandler(last) { - var _this6 = this; - - if (last) { - _.defer(function () { - $(_this6.chatToDropdownRef).dropdown().dropdown('set selected', _this6.chatId).dropdown({ - onChange: function onChange(value, text, $choice) { - window.location = wurl('path') + ('#/chat/' + $choice.attr('data-id')); - } - }); - }); - } - }; - - EmChatTopMenu.prototype.searchFocusHandler = function searchFocusHandler() { - $(this.searchInputRef).css('width', 'auto'); - $(this.searchRemoveRef).show(); - this.isActiveSearch = true; - }; - - EmChatTopMenu.prototype.searchBlurHandler = function searchBlurHandler() { - if (!$(this.searchInputRef).val()) { - $(this.searchInputRef).css('width', '95px'); - $(this.searchRemoveRef).hide(); - this.isActiveSearch = false; - } - }; - - EmChatTopMenu.prototype.sibebarRightHandler = function sibebarRightHandler(event) { - this.toggleRightSidebar(); - }; - - EmChatTopMenu.prototype.toggleRightSidebar = function toggleRightSidebar(asShow) { - if (_.isUndefined(asShow)) { - this.isRightSidebarShow = !this.isRightSidebarShow; - } else { - this.isRightSidebarShow = asShow; - } - - ea.publish(nsCons.EVENT_CHAT_SIDEBAR_TOGGLE, { - isShow: this.isRightSidebarShow - }); - }; - - EmChatTopMenu.prototype.searchKeyupHandler = function searchKeyupHandler(evt) { - if (evt.keyCode === 13) { - this.activeType = nsCons.ACTION_TYPE_SEARCH; - this.searchHandler(); - } else if (evt.keyCode === 27) { - this.clearSearchHandler(); - } - return true; - }; - - EmChatTopMenu.prototype.clearSearchHandler = function clearSearchHandler() { - $(this.searchInputRef).val('').focus(); - }; - - EmChatTopMenu.prototype.showStowHandler = function showStowHandler(event) { - var _this7 = this; - - if (this.isRightSidebarShow && this.activeType == nsCons.ACTION_TYPE_STOW && !event.ctrlKey) { - this.toggleRightSidebar(); - return; - } - - this.activeType = nsCons.ACTION_TYPE_STOW; - this.ajaxStow = $.get('/admin/chat/channel/getStows', function (data) { - if (data.success) { - var stowChats = _.map(data.data, function (item) { - var chatChannel = item.chatChannel; - chatChannel.chatStow = item; - return chatChannel; - }); - ea.publish(nsCons.EVENT_CHAT_RIGHT_SIDEBAR_TOGGLE, { - action: _this7.activeType, - result: _.reverse(stowChats) - }); - _this7.toggleRightSidebar(true); - } else { - toastr.error(data.data, '获取收藏消息失败!'); - } - }); - }; - - EmChatTopMenu.prototype.showAtHandler = function showAtHandler(event) { - var _this8 = this; - - if (this.isRightSidebarShow && this.activeType == nsCons.ACTION_TYPE_AT && this.newAtCnt == 0 && !event.ctrlKey) { - this.toggleRightSidebar(); - return; - } - - this.activeType = nsCons.ACTION_TYPE_AT; - this.newAtCnt = 0; - this.ajaxAt = $.get('/admin/chat/channel/getAts', { - page: 0, - size: 20 - }, function (data) { - if (data.success) { - ea.publish(nsCons.EVENT_CHAT_RIGHT_SIDEBAR_TOGGLE, { - action: _this8.activeType, - result: data.data - }); - _this8.toggleRightSidebar(true); - } else { - toastr.error(data.data, '获取@消息失败!'); - } - }); - }; - - EmChatTopMenu.prototype.logoutHandler = function logoutHandler() { - $.post('/admin/logout').always(function () { - utils.redirect2Login(); - }); - }; - - EmChatTopMenu.prototype.showWikiDirHandler = function showWikiDirHandler(event) { - - if (this.isRightSidebarShow && this.activeType == nsCons.ACTION_TYPE_DIR && !event.ctrlKey) { - this.toggleRightSidebar(); - return; - } - - this.activeType = nsCons.ACTION_TYPE_DIR; - ea.publish(nsCons.EVENT_CHAT_RIGHT_SIDEBAR_TOGGLE, { - action: this.activeType, - result: this.dir - }); - this.toggleRightSidebar(true); - }; - - EmChatTopMenu.prototype.showAttachHandler = function showAttachHandler(event) { - - if (this.isRightSidebarShow && this.activeType == nsCons.ACTION_TYPE_ATTACH && !event.ctrlKey) { - this.toggleRightSidebar(); - return; - } - - this.activeType = nsCons.ACTION_TYPE_ATTACH; - ea.publish(nsCons.EVENT_CHAT_RIGHT_SIDEBAR_TOGGLE, { - action: this.activeType - }); - this.toggleRightSidebar(true); - }; - - EmChatTopMenu.prototype.showScheduleHandler = function showScheduleHandler(event) { - - if (this.isRightSidebarShow && this.activeType == nsCons.ACTION_TYPE_SCHEDULE && !event.ctrlKey) { - this.toggleRightSidebar(); - return; - } - - this.activeType = nsCons.ACTION_TYPE_SCHEDULE; - ea.publish(nsCons.EVENT_CHAT_RIGHT_SIDEBAR_TOGGLE, { - action: this.activeType - }); - this.toggleRightSidebar(true); - }; - - EmChatTopMenu.prototype.userEditHandler = function userEditHandler() { - this.userEditMd.show(); - }; - - EmChatTopMenu.prototype.membersShowHandler = function membersShowHandler(item, event) { - event.stopImmediatePropagation(); - ea.publish(nsCons.EVENT_CHANNEL_ACTIONS, { - action: 'membersShowHandler', - item: item - }); - }; - - EmChatTopMenu.prototype.leaveHandler = function leaveHandler(item, event) { - event.stopImmediatePropagation(); - ea.publish(nsCons.EVENT_CHANNEL_ACTIONS, { - action: 'leaveHandler', - item: item - }); - }; - - EmChatTopMenu.prototype.membersMgrHandler = function membersMgrHandler(item, event) { - event.stopImmediatePropagation(); - ea.publish(nsCons.EVENT_CHANNEL_ACTIONS, { - action: 'membersMgrHandler', - item: item - }); - }; - - EmChatTopMenu.prototype.editHandler = function editHandler(item, event) { - event.stopImmediatePropagation(); - ea.publish(nsCons.EVENT_CHANNEL_ACTIONS, { - action: 'editHandler', - item: item - }); - }; - - EmChatTopMenu.prototype.delHandler = function delHandler(item, event) { - event.stopImmediatePropagation(); - ea.publish(nsCons.EVENT_CHANNEL_ACTIONS, { - action: 'delHandler', - item: item - }); - }; - - EmChatTopMenu.prototype.viewOrMgrUsersHandler = function viewOrMgrUsersHandler(event) { - - if (this.channel.owner.username == this.loginUser.username) { - this.membersMgrHandler(this.channel, event); - } else { - this.membersShowHandler(this.channel, event); - } - }; - - EmChatTopMenu.prototype.channelInfoHandler = function channelInfoHandler(event) { - - if (this.channel.owner.username == this.loginUser.username) { - this.editHandler(this.channel, event); - } else { - event.stopImmediatePropagation(); - } - }; - - EmChatTopMenu.prototype.userInfoHandler = function userInfoHandler(event) { - event.stopImmediatePropagation(); - }; - - EmChatTopMenu.prototype.stopImmediatePropagationHandler = function stopImmediatePropagationHandler(event) { - event.stopImmediatePropagation(); - }; - - EmChatTopMenu.prototype.mailToHandler = function mailToHandler(event) { - event.stopImmediatePropagation(); - window.location = 'mailto:' + this.chatUser.mails; - }; - - EmChatTopMenu.prototype.channelLinksHandler = function channelLinksHandler(event) { - event.stopImmediatePropagation(); - $(this.channelLinksDdRef).dropdown('toggle'); - }; - - EmChatTopMenu.prototype.addChannelLinkHandler = function addChannelLinkHandler(event) { - this.channelLinkMgrVm.show(); - }; - - EmChatTopMenu.prototype.openChannelLinkHandler = function openChannelLinkHandler(event, item) { - event.stopImmediatePropagation(); - $(this.channelLinksDdRef).dropdown('hide'); - utils.openNewWin(item.href); - $.post('/admin/link/count/inc', { id: item.id }); - }; - - EmChatTopMenu.prototype.showPinHandler = function showPinHandler(event) { - var _this9 = this; - - event.stopImmediatePropagation(); - if (this.isRightSidebarShow && this.activeType == nsCons.ACTION_TYPE_PIN && !event.ctrlKey) { - this.toggleRightSidebar(); - return; - } - - this.activeType = nsCons.ACTION_TYPE_PIN; - - this.ajaxPin = $.get('/admin/chat/channel/pin/list', { - cid: this.channel.id - }, function (data) { - if (data.success) { - var pinChats = _.map(data.data, function (item) { - var chatChannel = item.chatChannel; - chatChannel.chatPin = item; - return chatChannel; - }); - ea.publish(nsCons.EVENT_CHAT_RIGHT_SIDEBAR_TOGGLE, { - action: _this9.activeType, - result: _.reverse(pinChats) - }); - _this9.toggleRightSidebar(true); - } else { - toastr.error(data.data, '获取频道固定消息失败!'); - } - }); - }; - - return EmChatTopMenu; - }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'loginUser', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'chatUser', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'users', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, 'channels', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, 'channel', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, 'loginUser', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, 'chatId', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, 'chatTo', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, 'isAt', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - })), _class2)) || _class; -}); -define('resources/elements/em-checkbox',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmCheckbox = undefined; - - function _initDefineProp(target, property, descriptor, context) { - if (!descriptor) return; - Object.defineProperty(target, property, { - enumerable: descriptor.enumerable, - configurable: descriptor.configurable, - writable: descriptor.writable, - value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 - }); - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { - var desc = {}; - Object['ke' + 'ys'](descriptor).forEach(function (key) { - desc[key] = descriptor[key]; - }); - desc.enumerable = !!desc.enumerable; - desc.configurable = !!desc.configurable; - - if ('value' in desc || desc.initializer) { - desc.writable = true; - } - - desc = decorators.slice().reverse().reduce(function (desc, decorator) { - return decorator(target, property, desc) || desc; - }, desc); - - if (context && desc.initializer !== void 0) { - desc.value = desc.initializer ? desc.initializer.call(context) : void 0; - desc.initializer = undefined; - } - - if (desc.initializer === void 0) { - Object['define' + 'Property'](target, property, desc); - desc = null; - } - - return desc; - } - - function _initializerWarningHelper(descriptor, context) { - throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.'); - } - - var _dec, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9; - - var EmCheckbox = exports.EmCheckbox = (_dec = (0, _aureliaFramework.bindable)({ defaultBindingMode: _aureliaFramework.bindingMode.twoWay }), (0, _aureliaFramework.containerless)(_class = (_class2 = function () { - function EmCheckbox() { - _classCallCheck(this, EmCheckbox); - - _initDefineProp(this, 'label', _descriptor, this); - - _initDefineProp(this, 'title', _descriptor2, this); - - _initDefineProp(this, 'classes', _descriptor3, this); - - _initDefineProp(this, 'onchange', _descriptor4, this); - - _initDefineProp(this, 'onchecked', _descriptor5, this); - - _initDefineProp(this, 'onunchecked', _descriptor6, this); - - _initDefineProp(this, 'emCheckboxAll', _descriptor7, this); - - _initDefineProp(this, 'checked', _descriptor8, this); - - _initDefineProp(this, 'signal', _descriptor9, this); - } - - EmCheckbox.prototype.checkedChanged = function checkedChanged(news, old) { - if (news) { - $(this.checkbox).checkbox('set checked'); - } else { - $(this.checkbox).checkbox('set unchecked'); - } - - this.signal && bs.signal(this.signal); - }; - - EmCheckbox.prototype.attached = function attached() { - var _this = this; - - $(this.checkbox).checkbox({ - onChecked: function onChecked() { - _this.checked = true; - _.defer(function () { - _this.emCheckboxAll && _this.emCheckboxAll.refreshCheckedStatus(); - _this.onchecked && _this.onchecked(_this); - _this.signal && bs.signal(_this.signal); - }); - }, - onUnchecked: function onUnchecked() { - _this.checked = false; - _.defer(function () { - _this.emCheckboxAll && _this.emCheckboxAll.refreshCheckedStatus(); - _this.onunchecked && _this.onunchecked(_this); - _this.signal && bs.signal(_this.signal); - }); - }, - onChange: function onChange() { - _.defer(function () { - _this.onchange && _this.onchange(_this); - }); - } - }); - this.checkedChanged(this.checked); - }; - - return EmCheckbox; - }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'label', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'title', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'classes', [_aureliaFramework.bindable], { - enumerable: true, - initializer: function initializer() { - return 'fitted'; - } - }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, 'onchange', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, 'onchecked', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, 'onunchecked', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, 'emCheckboxAll', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, 'checked', [_dec], { - enumerable: true, - initializer: null - }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, 'signal', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - })), _class2)) || _class); -}); -define('resources/elements/em-confirm-modal',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmConfirmModal = undefined; - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var EmConfirmModal = exports.EmConfirmModal = function () { - function EmConfirmModal() { - _classCallCheck(this, EmConfirmModal); - - this.config = {}; - } - - EmConfirmModal.prototype.detached = function detached() { - $(this.md).remove(); - }; - - EmConfirmModal.prototype.attached = function attached() { - var _this = this; - - $(this.md).modal({ - closable: false, - allowMultiple: true, - onApprove: function onApprove() { - _this.onapprove && _this.onapprove(); - }, - onDeny: function onDeny() { - _this.ondeny && _this.ondeny(); - } - }); - }; - - EmConfirmModal.prototype.reset = function reset() { - this.config = { - title: '操作确认', - content: '确定要执行该操作吗?', - warning: false - }; - }; - - EmConfirmModal.prototype.show = function show(config) { - - this.reset(); - - if (config) { - this.config = _.extend(this.config, config); - } - - if (config && config.onapprove) { - this.onapprove = config.onapprove; - } - - if (config && config.ondeny) { - this.ondeny = config.ondeny; - } - - $(this.md).modal('show'); - }; - - EmConfirmModal.prototype.hide = function hide() { - $(this.md).modal('hide'); - }; - - return EmConfirmModal; - }(); -}); -define('resources/elements/em-dropdown',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmDropdown = undefined; - - function _initDefineProp(target, property, descriptor, context) { - if (!descriptor) return; - Object.defineProperty(target, property, { - enumerable: descriptor.enumerable, - configurable: descriptor.configurable, - writable: descriptor.writable, - value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 - }); - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { - var desc = {}; - Object['ke' + 'ys'](descriptor).forEach(function (key) { - desc[key] = descriptor[key]; - }); - desc.enumerable = !!desc.enumerable; - desc.configurable = !!desc.configurable; - - if ('value' in desc || desc.initializer) { - desc.writable = true; - } - - desc = decorators.slice().reverse().reduce(function (desc, decorator) { - return decorator(target, property, desc) || desc; - }, desc); - - if (context && desc.initializer !== void 0) { - desc.value = desc.initializer ? desc.initializer.call(context) : void 0; - desc.initializer = undefined; - } - - if (desc.initializer === void 0) { - Object['define' + 'Property'](target, property, desc); - desc = null; - } - - return desc; - } - - function _initializerWarningHelper(descriptor, context) { - throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.'); - } - - var _dec, _desc, _value, _class, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7; - - var EmDropdown = exports.EmDropdown = (_dec = (0, _aureliaFramework.bindable)({ defaultBindingMode: _aureliaFramework.bindingMode.twoWay }), (_class = function () { - function EmDropdown() { - _classCallCheck(this, EmDropdown); - - _initDefineProp(this, 'name', _descriptor, this); - - _initDefineProp(this, 'text', _descriptor2, this); - - _initDefineProp(this, 'labelProp', _descriptor3, this); - - _initDefineProp(this, 'valueProp', _descriptor4, this); - - _initDefineProp(this, 'selectedItem', _descriptor5, this); - - _initDefineProp(this, 'menuItems', _descriptor6, this); - - _initDefineProp(this, 'classes', _descriptor7, this); - } - - EmDropdown.prototype.selectedItemChanged = function selectedItemChanged(news, old) { - var _this = this; - - if (news) { - _.defer(function () { - $(_this.dropdown).dropdown('set selected', news); - }); - } - }; - - EmDropdown.prototype.menuItemsChanged = function menuItemsChanged(news, old) { - if (_.isEmpty(news)) { - $(this.dropdown).dropdown('clear'); - this.selectedItem = null; - } - }; - - EmDropdown.prototype.initDropdownHandler = function initDropdownHandler(last) { - var _this2 = this; - - if (last) { - _.defer(function () { - $(_this2.dropdown).dropdown({ - onChange: function onChange(value, text, $choice) { - _this2.selectedItem = value; - } - }).dropdown('set selected', _this2.selectedItem); - }); - } - }; - - return EmDropdown; - }(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'name', [_aureliaFramework.bindable], { - enumerable: true, - initializer: function initializer() { - return _.uniqueId('em-dropdown-'); - } - }), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, 'text', [_aureliaFramework.bindable], { - enumerable: true, - initializer: function initializer() { - return ''; - } - }), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, 'labelProp', [_aureliaFramework.bindable], { - enumerable: true, - initializer: function initializer() { - return 'label'; - } - }), _descriptor4 = _applyDecoratedDescriptor(_class.prototype, 'valueProp', [_aureliaFramework.bindable], { - enumerable: true, - initializer: function initializer() { - return 'value'; - } - }), _descriptor5 = _applyDecoratedDescriptor(_class.prototype, 'selectedItem', [_dec], { - enumerable: true, - initializer: null - }), _descriptor6 = _applyDecoratedDescriptor(_class.prototype, 'menuItems', [_aureliaFramework.bindable], { - enumerable: true, - initializer: function initializer() { - return []; - } - }), _descriptor7 = _applyDecoratedDescriptor(_class.prototype, 'classes', [_aureliaFramework.bindable], { - enumerable: true, - initializer: function initializer() { - return 'selection'; - } - })), _class)); -}); -define('resources/elements/em-hotkeys-modal',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmHotkeysModal = undefined; - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var EmHotkeysModal = exports.EmHotkeysModal = function () { - function EmHotkeysModal() { - _classCallCheck(this, EmHotkeysModal); - } - - EmHotkeysModal.prototype.attached = function attached() { - $(this.md).modal(); - }; - - EmHotkeysModal.prototype.show = function show() { - $(this.md).modal('show'); - }; - - return EmHotkeysModal; - }(); -}); -define('resources/elements/em-modal',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmModal = undefined; - - function _initDefineProp(target, property, descriptor, context) { - if (!descriptor) return; - Object.defineProperty(target, property, { - enumerable: descriptor.enumerable, - configurable: descriptor.configurable, - writable: descriptor.writable, - value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 - }); - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { - var desc = {}; - Object['ke' + 'ys'](descriptor).forEach(function (key) { - desc[key] = descriptor[key]; - }); - desc.enumerable = !!desc.enumerable; - desc.configurable = !!desc.configurable; - - if ('value' in desc || desc.initializer) { - desc.writable = true; - } - - desc = decorators.slice().reverse().reduce(function (desc, decorator) { - return decorator(target, property, desc) || desc; - }, desc); - - if (context && desc.initializer !== void 0) { - desc.value = desc.initializer ? desc.initializer.call(context) : void 0; - desc.initializer = undefined; - } - - if (desc.initializer === void 0) { - Object['define' + 'Property'](target, property, desc); - desc = null; - } - - return desc; - } - - function _initializerWarningHelper(descriptor, context) { - throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.'); - } - - var _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9; - - var EmModal = exports.EmModal = (0, _aureliaFramework.containerless)(_class = (_class2 = function () { - function EmModal() { - _classCallCheck(this, EmModal); - - _initDefineProp(this, 'confirmLabel', _descriptor, this); - - _initDefineProp(this, 'cancelLabel', _descriptor2, this); - - _initDefineProp(this, 'onapprove', _descriptor3, this); - - _initDefineProp(this, 'ondeny', _descriptor4, this); - - _initDefineProp(this, 'onshow', _descriptor5, this); - - _initDefineProp(this, 'onvisible', _descriptor6, this); - - _initDefineProp(this, 'disabled', _descriptor7, this); - - _initDefineProp(this, 'classes', _descriptor8, this); - - _initDefineProp(this, 'showConfirm', _descriptor9, this); - - this.options = { - hideOnApprove: true, - autoDimmer: true - }; - } - - EmModal.prototype.detached = function detached() { - $(this.modal).remove(); - }; - - EmModal.prototype.attached = function attached() { - var _this = this; - - $(this.modal).modal({ - closable: false, - autofocus: false, - observeChanges: true, - allowMultiple: true, - - onShow: function onShow() { - _this.onshow && _this.onshow(_this); - }, - onVisible: function onVisible() { - _this.onvisible && _this.onvisible(_this); - }, - onApprove: function onApprove() { - _this.options.autoDimmer && _this.showDimmer(); - _this.onapprove && _this.onapprove(_this); - return _this.options.hideOnApprove; - }, - onDeny: function onDeny() { - _this.ondeny && _this.ondeny(_this); - } - }); - }; - - EmModal.prototype.showDimmer = function showDimmer() { - this.loading = true; - $(this.modal).find('.dimmer').dimmer('show'); - }; - - EmModal.prototype.hideDimmer = function hideDimmer() { - this.loading = false; - $(this.modal).find('.dimmer').dimmer('hide'); - }; - - EmModal.prototype.show = function show(options) { - _.extend(this.options, options); - $(this.modal).modal('show'); - }; - - EmModal.prototype.hide = function hide() { - this.hideDimmer(); - $(this.modal).modal('hide'); - }; - - EmModal.prototype.refresh = function refresh() { - var _this2 = this; - - _.defer(function () { - $(_this2.modal).modal('refresh'); - }); - }; - - return EmModal; - }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'confirmLabel', [_aureliaFramework.bindable], { - enumerable: true, - initializer: function initializer() { - return '确认'; - } - }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'cancelLabel', [_aureliaFramework.bindable], { - enumerable: true, - initializer: function initializer() { - return '取消'; - } - }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'onapprove', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, 'ondeny', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, 'onshow', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, 'onvisible', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - }), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, 'disabled', [_aureliaFramework.bindable], { - enumerable: true, - initializer: function initializer() { - return false; - } - }), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, 'classes', [_aureliaFramework.bindable], { - enumerable: true, - initializer: function initializer() { - return 'small'; - } - }), _descriptor9 = _applyDecoratedDescriptor(_class2.prototype, 'showConfirm', [_aureliaFramework.bindable], { - enumerable: true, - initializer: function initializer() { - return true; - } - })), _class2)) || _class; -}); -define('resources/elements/em-user-avatar',['exports', 'aurelia-framework', 'color-hash'], function (exports, _aureliaFramework, _colorHash) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmUserAvatar = undefined; - - var _colorHash2 = _interopRequireDefault(_colorHash); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { - default: obj - }; - } - - function _initDefineProp(target, property, descriptor, context) { - if (!descriptor) return; - Object.defineProperty(target, property, { - enumerable: descriptor.enumerable, - configurable: descriptor.configurable, - writable: descriptor.writable, - value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 - }); - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { - var desc = {}; - Object['ke' + 'ys'](descriptor).forEach(function (key) { - desc[key] = descriptor[key]; - }); - desc.enumerable = !!desc.enumerable; - desc.configurable = !!desc.configurable; - - if ('value' in desc || desc.initializer) { - desc.writable = true; - } - - desc = decorators.slice().reverse().reduce(function (desc, decorator) { - return decorator(target, property, desc) || desc; - }, desc); - - if (context && desc.initializer !== void 0) { - desc.value = desc.initializer ? desc.initializer.call(context) : void 0; - desc.initializer = undefined; - } - - if (desc.initializer === void 0) { - Object['define' + 'Property'](target, property, desc); - desc = null; - } - - return desc; - } - - function _initializerWarningHelper(descriptor, context) { - throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.'); - } - - var _class, _desc, _value, _class2, _descriptor; - - var EmUserAvatar = exports.EmUserAvatar = (0, _aureliaFramework.containerless)(_class = (_class2 = function () { - function EmUserAvatar() { - _classCallCheck(this, EmUserAvatar); - - _initDefineProp(this, 'user', _descriptor, this); - } - - EmUserAvatar.prototype.userChanged = function userChanged() { - if (this.user) { - this._calcNameChar(); - - var cs = colorHash.rgb(this.user.username); - this.bgColor = 'rgba(' + cs[0] + ', ' + cs[1] + ', ' + cs[2] + ', 0.6)'; - - this.color = 'rgba(' + (255 - cs[0]) + ', ' + (255 - cs[1]) + ', ' + (255 - cs[2]) + ', 1)'; - } - }; - - EmUserAvatar.prototype._calcNameChar = function _calcNameChar() { - var lastChar = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; - - if (this.user.name) { - this.nameChar = lastChar ? _.last(this.user.name) : _.first(this.user.name); - } else { - this.nameChar = lastChar ? _.last(this.user.username) : _.first(this.user.username); - } - }; - - EmUserAvatar.prototype.attached = function attached() { - var _this = this; - - $(this.avatarRef).hover(function () { - _this._calcNameChar(false); - }, function () { - _this._calcNameChar(); - }); - }; - - return EmUserAvatar; - }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'user', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - })), _class2)) || _class; -}); -define('resources/elements/em-user-edit',['exports', 'aurelia-framework'], function (exports, _aureliaFramework) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.EmUserEdit = undefined; - - function _initDefineProp(target, property, descriptor, context) { - if (!descriptor) return; - Object.defineProperty(target, property, { - enumerable: descriptor.enumerable, - configurable: descriptor.configurable, - writable: descriptor.writable, - value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 - }); - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { - var desc = {}; - Object['ke' + 'ys'](descriptor).forEach(function (key) { - desc[key] = descriptor[key]; - }); - desc.enumerable = !!desc.enumerable; - desc.configurable = !!desc.configurable; - - if ('value' in desc || desc.initializer) { - desc.writable = true; - } - - desc = decorators.slice().reverse().reduce(function (desc, decorator) { - return decorator(target, property, desc) || desc; - }, desc); - - if (context && desc.initializer !== void 0) { - desc.value = desc.initializer ? desc.initializer.call(context) : void 0; - desc.initializer = undefined; - } - - if (desc.initializer === void 0) { - Object['define' + 'Property'](target, property, desc); - desc = null; - } - - return desc; - } - - function _initializerWarningHelper(descriptor, context) { - throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.'); - } - - var _class, _desc, _value, _class2, _descriptor; - - var EmUserEdit = exports.EmUserEdit = (0, _aureliaFramework.containerless)(_class = (_class2 = function () { - function EmUserEdit() { - _classCallCheck(this, EmUserEdit); - - _initDefineProp(this, 'user', _descriptor, this); - } - - EmUserEdit.prototype.show = function show() { - this.emModal.show({ - hideOnApprove: false, - autoDimmer: true - }); - }; - - EmUserEdit.prototype.showHandler = function showHandler() {}; - - EmUserEdit.prototype.attached = function attached() { - $(this.frm).form({ - on: 'blur', - inline: true, - fields: { - name: 'empty', - mail: ['empty', 'email'] - } - }); - }; - - EmUserEdit.prototype._chkOk = function _chkOk() { - var pwd = this.user.password; - if (pwd && pwd.length < 8) { - toastr.error('密码长度不能少于8位字符!'); - return false; - } - - return true; - }; - - EmUserEdit.prototype.approveHandler = function approveHandler(modal) { - var _this = this; - - if (this._chkOk() && $(this.frm).form('is valid')) { - $.post('/admin/user/update2', { - username: this.user.username, - password: this.user.password, - name: this.user.name, - mail: this.user.mails - }, function (data) { - modal.hide(); - _this.user.password = ''; - if (data.success) { - toastr.success('更新个人信息成功!'); - } else { - toastr.error(data.data, '更新个人信息失败!'); - } - }); - } else { - modal.hideDimmer(); - } - }; - - return EmUserEdit; - }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'user', [_aureliaFramework.bindable], { - enumerable: true, - initializer: null - })), _class2)) || _class; -}); -define('aurelia-templating-resources/compose',['exports', 'aurelia-dependency-injection', 'aurelia-task-queue', 'aurelia-templating', 'aurelia-pal'], function (exports, _aureliaDependencyInjection, _aureliaTaskQueue, _aureliaTemplating, _aureliaPal) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.Compose = undefined; - - function _initDefineProp(target, property, descriptor, context) { - if (!descriptor) return; - Object.defineProperty(target, property, { - enumerable: descriptor.enumerable, - configurable: descriptor.configurable, - writable: descriptor.writable, - value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 - }); - } - - - - function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { - var desc = {}; - Object['ke' + 'ys'](descriptor).forEach(function (key) { - desc[key] = descriptor[key]; - }); - desc.enumerable = !!desc.enumerable; - desc.configurable = !!desc.configurable; - - if ('value' in desc || desc.initializer) { - desc.writable = true; - } - - desc = decorators.slice().reverse().reduce(function (desc, decorator) { - return decorator(target, property, desc) || desc; - }, desc); - - if (context && desc.initializer !== void 0) { - desc.value = desc.initializer ? desc.initializer.call(context) : void 0; - desc.initializer = undefined; - } - - if (desc.initializer === void 0) { - Object['define' + 'Property'](target, property, desc); - desc = null; - } - - return desc; - } - - function _initializerWarningHelper(descriptor, context) { - throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.'); - } - - var _dec, _dec2, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3; - - var Compose = exports.Compose = (_dec = (0, _aureliaTemplating.customElement)('compose'), _dec2 = (0, _aureliaDependencyInjection.inject)(_aureliaPal.DOM.Element, _aureliaDependencyInjection.Container, _aureliaTemplating.CompositionEngine, _aureliaTemplating.ViewSlot, _aureliaTemplating.ViewResources, _aureliaTaskQueue.TaskQueue), _dec(_class = (0, _aureliaTemplating.noView)(_class = _dec2(_class = (_class2 = function () { - function Compose(element, container, compositionEngine, viewSlot, viewResources, taskQueue) { - - - _initDefineProp(this, 'model', _descriptor, this); - - _initDefineProp(this, 'view', _descriptor2, this); - - _initDefineProp(this, 'viewModel', _descriptor3, this); - - this.element = element; - this.container = container; - this.compositionEngine = compositionEngine; - this.viewSlot = viewSlot; - this.viewResources = viewResources; - this.taskQueue = taskQueue; - this.currentController = null; - this.currentViewModel = null; - } - - Compose.prototype.created = function created(owningView) { - this.owningView = owningView; - }; - - Compose.prototype.bind = function bind(bindingContext, overrideContext) { - this.bindingContext = bindingContext; - this.overrideContext = overrideContext; - processInstruction(this, createInstruction(this, { - view: this.view, - viewModel: this.viewModel, - model: this.model - })); - }; - - Compose.prototype.unbind = function unbind(bindingContext, overrideContext) { - this.bindingContext = null; - this.overrideContext = null; - var returnToCache = true; - var skipAnimation = true; - this.viewSlot.removeAll(returnToCache, skipAnimation); - }; - - Compose.prototype.modelChanged = function modelChanged(newValue, oldValue) { - var _this = this; - - if (this.currentInstruction) { - this.currentInstruction.model = newValue; - return; - } - - this.taskQueue.queueMicroTask(function () { - if (_this.currentInstruction) { - _this.currentInstruction.model = newValue; - return; - } - - var vm = _this.currentViewModel; - - if (vm && typeof vm.activate === 'function') { - vm.activate(newValue); - } - }); - }; - - Compose.prototype.viewChanged = function viewChanged(newValue, oldValue) { - var _this2 = this; - - var instruction = createInstruction(this, { - view: newValue, - viewModel: this.currentViewModel || this.viewModel, - model: this.model - }); - - if (this.currentInstruction) { - this.currentInstruction = instruction; - return; - } - - this.currentInstruction = instruction; - this.taskQueue.queueMicroTask(function () { - return processInstruction(_this2, _this2.currentInstruction); - }); - }; - - Compose.prototype.viewModelChanged = function viewModelChanged(newValue, oldValue) { - var _this3 = this; - - var instruction = createInstruction(this, { - viewModel: newValue, - view: this.view, - model: this.model - }); - - if (this.currentInstruction) { - this.currentInstruction = instruction; - return; - } - - this.currentInstruction = instruction; - this.taskQueue.queueMicroTask(function () { - return processInstruction(_this3, _this3.currentInstruction); - }); - }; - - return Compose; - }(), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'model', [_aureliaTemplating.bindable], { - enumerable: true, - initializer: null - }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'view', [_aureliaTemplating.bindable], { - enumerable: true, - initializer: null - }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'viewModel', [_aureliaTemplating.bindable], { - enumerable: true, - initializer: null - })), _class2)) || _class) || _class) || _class); - - - function createInstruction(composer, instruction) { - return Object.assign(instruction, { - bindingContext: composer.bindingContext, - overrideContext: composer.overrideContext, - owningView: composer.owningView, - container: composer.container, - viewSlot: composer.viewSlot, - viewResources: composer.viewResources, - currentController: composer.currentController, - host: composer.element - }); - } - - function processInstruction(composer, instruction) { - composer.currentInstruction = null; - composer.compositionEngine.compose(instruction).then(function (controller) { - composer.currentController = controller; - composer.currentViewModel = controller ? controller.viewModel : null; - }); - } -}); -define('aurelia-templating-resources/if',['exports', 'aurelia-templating', 'aurelia-dependency-injection'], function (exports, _aureliaTemplating, _aureliaDependencyInjection) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.If = undefined; - - - - var _dec, _dec2, _class; - - var If = exports.If = (_dec = (0, _aureliaTemplating.customAttribute)('if'), _dec2 = (0, _aureliaDependencyInjection.inject)(_aureliaTemplating.BoundViewFactory, _aureliaTemplating.ViewSlot), _dec(_class = (0, _aureliaTemplating.templateController)(_class = _dec2(_class = function () { - function If(viewFactory, viewSlot) { - - - this.viewFactory = viewFactory; - this.viewSlot = viewSlot; - this.showing = false; - this.view = null; - this.bindingContext = null; - this.overrideContext = null; - } - - If.prototype.bind = function bind(bindingContext, overrideContext) { - this.bindingContext = bindingContext; - this.overrideContext = overrideContext; - this.valueChanged(this.value); - }; - - If.prototype.valueChanged = function valueChanged(newValue) { - var _this = this; - - if (this.__queuedChanges) { - this.__queuedChanges.push(newValue); - return; - } - - var maybePromise = this._runValueChanged(newValue); - if (maybePromise instanceof Promise) { - (function () { - var queuedChanges = _this.__queuedChanges = []; - - var runQueuedChanges = function runQueuedChanges() { - if (!queuedChanges.length) { - _this.__queuedChanges = undefined; - return; - } - - var nextPromise = _this._runValueChanged(queuedChanges.shift()) || Promise.resolve(); - nextPromise.then(runQueuedChanges); - }; - - maybePromise.then(runQueuedChanges); - })(); - } - }; - - If.prototype._runValueChanged = function _runValueChanged(newValue) { - var _this2 = this; - - if (!newValue) { - var viewOrPromise = void 0; - if (this.view !== null && this.showing) { - viewOrPromise = this.viewSlot.remove(this.view); - if (viewOrPromise instanceof Promise) { - viewOrPromise.then(function () { - return _this2.view.unbind(); - }); - } else { - this.view.unbind(); - } - } - - this.showing = false; - return viewOrPromise; - } - - if (this.view === null) { - this.view = this.viewFactory.create(); - } - - if (!this.view.isBound) { - this.view.bind(this.bindingContext, this.overrideContext); - } - - if (!this.showing) { - this.showing = true; - return this.viewSlot.add(this.view); - } - - return undefined; - }; - - If.prototype.unbind = function unbind() { - if (this.view === null) { - return; - } - - this.view.unbind(); - - if (!this.viewFactory.isCaching) { - return; - } - - if (this.showing) { - this.showing = false; - this.viewSlot.remove(this.view, true, true); - } - this.view.returnToCache(); - this.view = null; - }; - - return If; - }()) || _class) || _class) || _class); -}); -define('aurelia-templating-resources/with',['exports', 'aurelia-dependency-injection', 'aurelia-templating', 'aurelia-binding'], function (exports, _aureliaDependencyInjection, _aureliaTemplating, _aureliaBinding) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.With = undefined; - - - - var _dec, _dec2, _class; - - var With = exports.With = (_dec = (0, _aureliaTemplating.customAttribute)('with'), _dec2 = (0, _aureliaDependencyInjection.inject)(_aureliaTemplating.BoundViewFactory, _aureliaTemplating.ViewSlot), _dec(_class = (0, _aureliaTemplating.templateController)(_class = _dec2(_class = function () { - function With(viewFactory, viewSlot) { - - - this.viewFactory = viewFactory; - this.viewSlot = viewSlot; - this.parentOverrideContext = null; - this.view = null; - } - - With.prototype.bind = function bind(bindingContext, overrideContext) { - this.parentOverrideContext = overrideContext; - this.valueChanged(this.value); - }; - - With.prototype.valueChanged = function valueChanged(newValue) { - var overrideContext = (0, _aureliaBinding.createOverrideContext)(newValue, this.parentOverrideContext); - if (!this.view) { - this.view = this.viewFactory.create(); - this.view.bind(newValue, overrideContext); - this.viewSlot.add(this.view); - } else { - this.view.bind(newValue, overrideContext); - } - }; - - With.prototype.unbind = function unbind() { - this.parentOverrideContext = null; - - if (this.view) { - this.view.unbind(); - } - }; - - return With; - }()) || _class) || _class) || _class); -}); -define('aurelia-templating-resources/repeat',['exports', 'aurelia-dependency-injection', 'aurelia-binding', 'aurelia-templating', './repeat-strategy-locator', './repeat-utilities', './analyze-view-factory', './abstract-repeater'], function (exports, _aureliaDependencyInjection, _aureliaBinding, _aureliaTemplating, _repeatStrategyLocator, _repeatUtilities, _analyzeViewFactory, _abstractRepeater) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.Repeat = undefined; - - function _initDefineProp(target, property, descriptor, context) { - if (!descriptor) return; - Object.defineProperty(target, property, { - enumerable: descriptor.enumerable, - configurable: descriptor.configurable, - writable: descriptor.writable, - value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 - }); - } - - - - function _possibleConstructorReturn(self, call) { - if (!self) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - - return call && (typeof call === "object" || typeof call === "function") ? call : self; - } - - function _inherits(subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); - } - - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - enumerable: false, - writable: true, - configurable: true - } - }); - if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; - } - - function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { - var desc = {}; - Object['ke' + 'ys'](descriptor).forEach(function (key) { - desc[key] = descriptor[key]; - }); - desc.enumerable = !!desc.enumerable; - desc.configurable = !!desc.configurable; - - if ('value' in desc || desc.initializer) { - desc.writable = true; - } - - desc = decorators.slice().reverse().reduce(function (desc, decorator) { - return decorator(target, property, desc) || desc; - }, desc); - - if (context && desc.initializer !== void 0) { - desc.value = desc.initializer ? desc.initializer.call(context) : void 0; - desc.initializer = undefined; - } - - if (desc.initializer === void 0) { - Object['define' + 'Property'](target, property, desc); - desc = null; - } - - return desc; - } - - function _initializerWarningHelper(descriptor, context) { - throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.'); - } - - var _dec, _dec2, _class, _desc, _value, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4; - - var Repeat = exports.Repeat = (_dec = (0, _aureliaTemplating.customAttribute)('repeat'), _dec2 = (0, _aureliaDependencyInjection.inject)(_aureliaTemplating.BoundViewFactory, _aureliaTemplating.TargetInstruction, _aureliaTemplating.ViewSlot, _aureliaTemplating.ViewResources, _aureliaBinding.ObserverLocator, _repeatStrategyLocator.RepeatStrategyLocator), _dec(_class = (0, _aureliaTemplating.templateController)(_class = _dec2(_class = (_class2 = function (_AbstractRepeater) { - _inherits(Repeat, _AbstractRepeater); - - function Repeat(viewFactory, instruction, viewSlot, viewResources, observerLocator, strategyLocator) { - - - var _this = _possibleConstructorReturn(this, _AbstractRepeater.call(this, { - local: 'item', - viewsRequireLifecycle: (0, _analyzeViewFactory.viewsRequireLifecycle)(viewFactory) - })); - - _initDefineProp(_this, 'items', _descriptor, _this); - - _initDefineProp(_this, 'local', _descriptor2, _this); - - _initDefineProp(_this, 'key', _descriptor3, _this); - - _initDefineProp(_this, 'value', _descriptor4, _this); - - _this.viewFactory = viewFactory; - _this.instruction = instruction; - _this.viewSlot = viewSlot; - _this.lookupFunctions = viewResources.lookupFunctions; - _this.observerLocator = observerLocator; - _this.key = 'key'; - _this.value = 'value'; - _this.strategyLocator = strategyLocator; - _this.ignoreMutation = false; - _this.sourceExpression = (0, _repeatUtilities.getItemsSourceExpression)(_this.instruction, 'repeat.for'); - _this.isOneTime = (0, _repeatUtilities.isOneTime)(_this.sourceExpression); - _this.viewsRequireLifecycle = (0, _analyzeViewFactory.viewsRequireLifecycle)(viewFactory); - return _this; - } - - Repeat.prototype.call = function call(context, changes) { - this[context](this.items, changes); - }; - - Repeat.prototype.bind = function bind(bindingContext, overrideContext) { - this.scope = { bindingContext: bindingContext, overrideContext: overrideContext }; - this.matcherBinding = this._captureAndRemoveMatcherBinding(); - this.itemsChanged(); - }; - - Repeat.prototype.unbind = function unbind() { - this.scope = null; - this.items = null; - this.matcherBinding = null; - this.viewSlot.removeAll(true); - this._unsubscribeCollection(); - }; - - Repeat.prototype._unsubscribeCollection = function _unsubscribeCollection() { - if (this.collectionObserver) { - this.collectionObserver.unsubscribe(this.callContext, this); - this.collectionObserver = null; - this.callContext = null; - } - }; - - Repeat.prototype.itemsChanged = function itemsChanged() { - this._unsubscribeCollection(); - - if (!this.scope) { - return; - } - - var items = this.items; - this.strategy = this.strategyLocator.getStrategy(items); - if (!this.strategy) { - throw new Error('Value for \'' + this.sourceExpression + '\' is non-repeatable'); - } - - if (!this.isOneTime && !this._observeInnerCollection()) { - this._observeCollection(); - } - this.strategy.instanceChanged(this, items); - }; - - Repeat.prototype._getInnerCollection = function _getInnerCollection() { - var expression = (0, _repeatUtilities.unwrapExpression)(this.sourceExpression); - if (!expression) { - return null; - } - return expression.evaluate(this.scope, null); - }; - - Repeat.prototype.handleCollectionMutated = function handleCollectionMutated(collection, changes) { - if (!this.collectionObserver) { - return; - } - this.strategy.instanceMutated(this, collection, changes); - }; - - Repeat.prototype.handleInnerCollectionMutated = function handleInnerCollectionMutated(collection, changes) { - var _this2 = this; - - if (!this.collectionObserver) { - return; - } - - if (this.ignoreMutation) { - return; - } - this.ignoreMutation = true; - var newItems = this.sourceExpression.evaluate(this.scope, this.lookupFunctions); - this.observerLocator.taskQueue.queueMicroTask(function () { - return _this2.ignoreMutation = false; - }); - - if (newItems === this.items) { - this.itemsChanged(); - } else { - this.items = newItems; - } - }; - - Repeat.prototype._observeInnerCollection = function _observeInnerCollection() { - var items = this._getInnerCollection(); - var strategy = this.strategyLocator.getStrategy(items); - if (!strategy) { - return false; - } - this.collectionObserver = strategy.getCollectionObserver(this.observerLocator, items); - if (!this.collectionObserver) { - return false; - } - this.callContext = 'handleInnerCollectionMutated'; - this.collectionObserver.subscribe(this.callContext, this); - return true; - }; - - Repeat.prototype._observeCollection = function _observeCollection() { - var items = this.items; - this.collectionObserver = this.strategy.getCollectionObserver(this.observerLocator, items); - if (this.collectionObserver) { - this.callContext = 'handleCollectionMutated'; - this.collectionObserver.subscribe(this.callContext, this); - } - }; - - Repeat.prototype._captureAndRemoveMatcherBinding = function _captureAndRemoveMatcherBinding() { - if (this.viewFactory.viewFactory) { - var instructions = this.viewFactory.viewFactory.instructions; - var instructionIds = Object.keys(instructions); - for (var i = 0; i < instructionIds.length; i++) { - var expressions = instructions[instructionIds[i]].expressions; - if (expressions) { - for (var ii = 0; i < expressions.length; i++) { - if (expressions[ii].targetProperty === 'matcher') { - var matcherBinding = expressions[ii]; - expressions.splice(ii, 1); - return matcherBinding; - } - } - } - } - } - - return undefined; - }; - - Repeat.prototype.viewCount = function viewCount() { - return this.viewSlot.children.length; - }; - - Repeat.prototype.views = function views() { - return this.viewSlot.children; - }; - - Repeat.prototype.view = function view(index) { - return this.viewSlot.children[index]; - }; - - Repeat.prototype.matcher = function matcher() { - return this.matcherBinding ? this.matcherBinding.sourceExpression.evaluate(this.scope, this.matcherBinding.lookupFunctions) : null; - }; - - Repeat.prototype.addView = function addView(bindingContext, overrideContext) { - var view = this.viewFactory.create(); - view.bind(bindingContext, overrideContext); - this.viewSlot.add(view); - }; - - Repeat.prototype.insertView = function insertView(index, bindingContext, overrideContext) { - var view = this.viewFactory.create(); - view.bind(bindingContext, overrideContext); - this.viewSlot.insert(index, view); - }; - - Repeat.prototype.moveView = function moveView(sourceIndex, targetIndex) { - this.viewSlot.move(sourceIndex, targetIndex); - }; - - Repeat.prototype.removeAllViews = function removeAllViews(returnToCache, skipAnimation) { - return this.viewSlot.removeAll(returnToCache, skipAnimation); - }; - - Repeat.prototype.removeViews = function removeViews(viewsToRemove, returnToCache, skipAnimation) { - return this.viewSlot.removeMany(viewsToRemove, returnToCache, skipAnimation); - }; - - Repeat.prototype.removeView = function removeView(index, returnToCache, skipAnimation) { - return this.viewSlot.removeAt(index, returnToCache, skipAnimation); - }; - - Repeat.prototype.updateBindings = function updateBindings(view) { - var j = view.bindings.length; - while (j--) { - (0, _repeatUtilities.updateOneTimeBinding)(view.bindings[j]); - } - j = view.controllers.length; - while (j--) { - var k = view.controllers[j].boundProperties.length; - while (k--) { - var binding = view.controllers[j].boundProperties[k].binding; - (0, _repeatUtilities.updateOneTimeBinding)(binding); - } - } - }; - - return Repeat; - }(_abstractRepeater.AbstractRepeater), (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'items', [_aureliaTemplating.bindable], { - enumerable: true, - initializer: null - }), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, 'local', [_aureliaTemplating.bindable], { - enumerable: true, - initializer: null - }), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, 'key', [_aureliaTemplating.bindable], { - enumerable: true, - initializer: null - }), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, 'value', [_aureliaTemplating.bindable], { - enumerable: true, - initializer: null - })), _class2)) || _class) || _class) || _class); -}); -define('aurelia-templating-resources/repeat-strategy-locator',['exports', './null-repeat-strategy', './array-repeat-strategy', './map-repeat-strategy', './set-repeat-strategy', './number-repeat-strategy'], function (exports, _nullRepeatStrategy, _arrayRepeatStrategy, _mapRepeatStrategy, _setRepeatStrategy, _numberRepeatStrategy) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.RepeatStrategyLocator = undefined; - - - - var RepeatStrategyLocator = exports.RepeatStrategyLocator = function () { - function RepeatStrategyLocator() { - - - this.matchers = []; - this.strategies = []; - - this.addStrategy(function (items) { - return items === null || items === undefined; - }, new _nullRepeatStrategy.NullRepeatStrategy()); - this.addStrategy(function (items) { - return items instanceof Array; - }, new _arrayRepeatStrategy.ArrayRepeatStrategy()); - this.addStrategy(function (items) { - return items instanceof Map; - }, new _mapRepeatStrategy.MapRepeatStrategy()); - this.addStrategy(function (items) { - return items instanceof Set; - }, new _setRepeatStrategy.SetRepeatStrategy()); - this.addStrategy(function (items) { - return typeof items === 'number'; - }, new _numberRepeatStrategy.NumberRepeatStrategy()); - } - - RepeatStrategyLocator.prototype.addStrategy = function addStrategy(matcher, strategy) { - this.matchers.push(matcher); - this.strategies.push(strategy); - }; - - RepeatStrategyLocator.prototype.getStrategy = function getStrategy(items) { - var matchers = this.matchers; - - for (var i = 0, ii = matchers.length; i < ii; ++i) { - if (matchers[i](items)) { - return this.strategies[i]; - } - } - - return null; - }; - - return RepeatStrategyLocator; - }(); -}); -define('aurelia-templating-resources/null-repeat-strategy',["exports"], function (exports) { - "use strict"; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - - - var NullRepeatStrategy = exports.NullRepeatStrategy = function () { - function NullRepeatStrategy() { - - } - - NullRepeatStrategy.prototype.instanceChanged = function instanceChanged(repeat, items) { - repeat.removeAllViews(true); - }; - - NullRepeatStrategy.prototype.getCollectionObserver = function getCollectionObserver(observerLocator, items) {}; - - return NullRepeatStrategy; - }(); -}); -define('aurelia-templating-resources/array-repeat-strategy',['exports', './repeat-utilities', 'aurelia-binding'], function (exports, _repeatUtilities, _aureliaBinding) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.ArrayRepeatStrategy = undefined; - - - - var ArrayRepeatStrategy = exports.ArrayRepeatStrategy = function () { - function ArrayRepeatStrategy() { - - } - - ArrayRepeatStrategy.prototype.getCollectionObserver = function getCollectionObserver(observerLocator, items) { - return observerLocator.getArrayObserver(items); - }; - - ArrayRepeatStrategy.prototype.instanceChanged = function instanceChanged(repeat, items) { - var _this = this; - - var itemsLength = items.length; - - if (!items || itemsLength === 0) { - repeat.removeAllViews(true, !repeat.viewsRequireLifecycle); - return; - } - - var children = repeat.views(); - var viewsLength = children.length; - - if (viewsLength === 0) { - this._standardProcessInstanceChanged(repeat, items); - return; - } - - if (repeat.viewsRequireLifecycle) { - (function () { - var childrenSnapshot = children.slice(0); - var itemNameInBindingContext = repeat.local; - var matcher = repeat.matcher(); - - var itemsPreviouslyInViews = []; - var viewsToRemove = []; - - for (var index = 0; index < viewsLength; index++) { - var view = childrenSnapshot[index]; - var oldItem = view.bindingContext[itemNameInBindingContext]; - - if ((0, _repeatUtilities.indexOf)(items, oldItem, matcher) === -1) { - viewsToRemove.push(view); - } else { - itemsPreviouslyInViews.push(oldItem); - } - } - - var updateViews = void 0; - var removePromise = void 0; - - if (itemsPreviouslyInViews.length > 0) { - removePromise = repeat.removeViews(viewsToRemove, true, !repeat.viewsRequireLifecycle); - updateViews = function updateViews() { - for (var _index = 0; _index < itemsLength; _index++) { - var item = items[_index]; - var indexOfView = (0, _repeatUtilities.indexOf)(itemsPreviouslyInViews, item, matcher, _index); - var _view = void 0; - - if (indexOfView === -1) { - var overrideContext = (0, _repeatUtilities.createFullOverrideContext)(repeat, items[_index], _index, itemsLength); - repeat.insertView(_index, overrideContext.bindingContext, overrideContext); - - itemsPreviouslyInViews.splice(_index, 0, undefined); - } else if (indexOfView === _index) { - _view = children[indexOfView]; - itemsPreviouslyInViews[indexOfView] = undefined; - } else { - _view = children[indexOfView]; - repeat.moveView(indexOfView, _index); - itemsPreviouslyInViews.splice(indexOfView, 1); - itemsPreviouslyInViews.splice(_index, 0, undefined); - } - - if (_view) { - (0, _repeatUtilities.updateOverrideContext)(_view.overrideContext, _index, itemsLength); - } - } - - _this._inPlaceProcessItems(repeat, items); - }; - } else { - removePromise = repeat.removeAllViews(true, !repeat.viewsRequireLifecycle); - updateViews = function updateViews() { - return _this._standardProcessInstanceChanged(repeat, items); - }; - } - - if (removePromise instanceof Promise) { - removePromise.then(updateViews); - } else { - updateViews(); - } - })(); - } else { - this._inPlaceProcessItems(repeat, items); - } - }; - - ArrayRepeatStrategy.prototype._standardProcessInstanceChanged = function _standardProcessInstanceChanged(repeat, items) { - for (var i = 0, ii = items.length; i < ii; i++) { - var overrideContext = (0, _repeatUtilities.createFullOverrideContext)(repeat, items[i], i, ii); - repeat.addView(overrideContext.bindingContext, overrideContext); - } - }; - - ArrayRepeatStrategy.prototype._inPlaceProcessItems = function _inPlaceProcessItems(repeat, items) { - var itemsLength = items.length; - var viewsLength = repeat.viewCount(); - - while (viewsLength > itemsLength) { - viewsLength--; - repeat.removeView(viewsLength, true, !repeat.viewsRequireLifecycle); - } - - var local = repeat.local; - - for (var i = 0; i < viewsLength; i++) { - var view = repeat.view(i); - var last = i === itemsLength - 1; - var middle = i !== 0 && !last; - - if (view.bindingContext[local] === items[i] && view.overrideContext.$middle === middle && view.overrideContext.$last === last) { - continue; - } - - view.bindingContext[local] = items[i]; - view.overrideContext.$middle = middle; - view.overrideContext.$last = last; - repeat.updateBindings(view); - } - - for (var _i = viewsLength; _i < itemsLength; _i++) { - var overrideContext = (0, _repeatUtilities.createFullOverrideContext)(repeat, items[_i], _i, itemsLength); - repeat.addView(overrideContext.bindingContext, overrideContext); - } - }; - - ArrayRepeatStrategy.prototype.instanceMutated = function instanceMutated(repeat, array, splices) { - var _this2 = this; - - if (repeat.__queuedSplices) { - for (var i = 0, ii = splices.length; i < ii; ++i) { - var _splices$i = splices[i]; - var index = _splices$i.index; - var removed = _splices$i.removed; - var addedCount = _splices$i.addedCount; - - (0, _aureliaBinding.mergeSplice)(repeat.__queuedSplices, index, removed, addedCount); - } - - repeat.__array = array.slice(0); - return; - } - - var maybePromise = this._runSplices(repeat, array.slice(0), splices); - if (maybePromise instanceof Promise) { - (function () { - var queuedSplices = repeat.__queuedSplices = []; - - var runQueuedSplices = function runQueuedSplices() { - if (!queuedSplices.length) { - repeat.__queuedSplices = undefined; - repeat.__array = undefined; - return; - } - - var nextPromise = _this2._runSplices(repeat, repeat.__array, queuedSplices) || Promise.resolve(); - queuedSplices = repeat.__queuedSplices = []; - nextPromise.then(runQueuedSplices); - }; - - maybePromise.then(runQueuedSplices); - })(); - } - }; - - ArrayRepeatStrategy.prototype._runSplices = function _runSplices(repeat, array, splices) { - var _this3 = this; - - var removeDelta = 0; - var rmPromises = []; - - for (var i = 0, ii = splices.length; i < ii; ++i) { - var splice = splices[i]; - var removed = splice.removed; - - for (var j = 0, jj = removed.length; j < jj; ++j) { - var viewOrPromise = repeat.removeView(splice.index + removeDelta + rmPromises.length, true); - if (viewOrPromise instanceof Promise) { - rmPromises.push(viewOrPromise); - } - } - removeDelta -= splice.addedCount; - } - - if (rmPromises.length > 0) { - return Promise.all(rmPromises).then(function () { - var spliceIndexLow = _this3._handleAddedSplices(repeat, array, splices); - (0, _repeatUtilities.updateOverrideContexts)(repeat.views(), spliceIndexLow); - }); - } - - var spliceIndexLow = this._handleAddedSplices(repeat, array, splices); - (0, _repeatUtilities.updateOverrideContexts)(repeat.views(), spliceIndexLow); - - return undefined; - }; - - ArrayRepeatStrategy.prototype._handleAddedSplices = function _handleAddedSplices(repeat, array, splices) { - var spliceIndex = void 0; - var spliceIndexLow = void 0; - var arrayLength = array.length; - for (var i = 0, ii = splices.length; i < ii; ++i) { - var splice = splices[i]; - var addIndex = spliceIndex = splice.index; - var end = splice.index + splice.addedCount; - - if (typeof spliceIndexLow === 'undefined' || spliceIndexLow === null || spliceIndexLow > splice.index) { - spliceIndexLow = spliceIndex; - } - - for (; addIndex < end; ++addIndex) { - var overrideContext = (0, _repeatUtilities.createFullOverrideContext)(repeat, array[addIndex], addIndex, arrayLength); - repeat.insertView(addIndex, overrideContext.bindingContext, overrideContext); - } - } - - return spliceIndexLow; - }; - - return ArrayRepeatStrategy; - }(); -}); -define('aurelia-templating-resources/repeat-utilities',['exports', 'aurelia-binding'], function (exports, _aureliaBinding) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.updateOverrideContexts = updateOverrideContexts; - exports.createFullOverrideContext = createFullOverrideContext; - exports.updateOverrideContext = updateOverrideContext; - exports.getItemsSourceExpression = getItemsSourceExpression; - exports.unwrapExpression = unwrapExpression; - exports.isOneTime = isOneTime; - exports.updateOneTimeBinding = updateOneTimeBinding; - exports.indexOf = indexOf; - - - var oneTime = _aureliaBinding.bindingMode.oneTime; - - function updateOverrideContexts(views, startIndex) { - var length = views.length; - - if (startIndex > 0) { - startIndex = startIndex - 1; - } - - for (; startIndex < length; ++startIndex) { - updateOverrideContext(views[startIndex].overrideContext, startIndex, length); - } - } - - function createFullOverrideContext(repeat, data, index, length, key) { - var bindingContext = {}; - var overrideContext = (0, _aureliaBinding.createOverrideContext)(bindingContext, repeat.scope.overrideContext); - - if (typeof key !== 'undefined') { - bindingContext[repeat.key] = key; - bindingContext[repeat.value] = data; - } else { - bindingContext[repeat.local] = data; - } - updateOverrideContext(overrideContext, index, length); - return overrideContext; - } - - function updateOverrideContext(overrideContext, index, length) { - var first = index === 0; - var last = index === length - 1; - var even = index % 2 === 0; - - overrideContext.$index = index; - overrideContext.$first = first; - overrideContext.$last = last; - overrideContext.$middle = !(first || last); - overrideContext.$odd = !even; - overrideContext.$even = even; - } - - function getItemsSourceExpression(instruction, attrName) { - return instruction.behaviorInstructions.filter(function (bi) { - return bi.originalAttrName === attrName; - })[0].attributes.items.sourceExpression; - } - - function unwrapExpression(expression) { - var unwrapped = false; - while (expression instanceof _aureliaBinding.BindingBehavior) { - expression = expression.expression; - } - while (expression instanceof _aureliaBinding.ValueConverter) { - expression = expression.expression; - unwrapped = true; - } - return unwrapped ? expression : null; - } - - function isOneTime(expression) { - while (expression instanceof _aureliaBinding.BindingBehavior) { - if (expression.name === 'oneTime') { - return true; - } - expression = expression.expression; - } - return false; - } - - function updateOneTimeBinding(binding) { - if (binding.call && binding.mode === oneTime) { - binding.call(_aureliaBinding.sourceContext); - } else if (binding.updateOneTimeBindings) { - binding.updateOneTimeBindings(); - } - } - - function indexOf(array, item, matcher, startIndex) { - if (!matcher) { - return array.indexOf(item); - } - var length = array.length; - for (var index = startIndex || 0; index < length; index++) { - if (matcher(array[index], item)) { - return index; - } - } - return -1; - } -}); -define('aurelia-templating-resources/map-repeat-strategy',['exports', './repeat-utilities'], function (exports, _repeatUtilities) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.MapRepeatStrategy = undefined; - - - - var MapRepeatStrategy = exports.MapRepeatStrategy = function () { - function MapRepeatStrategy() { - - } - - MapRepeatStrategy.prototype.getCollectionObserver = function getCollectionObserver(observerLocator, items) { - return observerLocator.getMapObserver(items); - }; - - MapRepeatStrategy.prototype.instanceChanged = function instanceChanged(repeat, items) { - var _this = this; - - var removePromise = repeat.removeAllViews(true, !repeat.viewsRequireLifecycle); - if (removePromise instanceof Promise) { - removePromise.then(function () { - return _this._standardProcessItems(repeat, items); - }); - return; - } - this._standardProcessItems(repeat, items); - }; - - MapRepeatStrategy.prototype._standardProcessItems = function _standardProcessItems(repeat, items) { - var index = 0; - var overrideContext = void 0; - - items.forEach(function (value, key) { - overrideContext = (0, _repeatUtilities.createFullOverrideContext)(repeat, value, index, items.size, key); - repeat.addView(overrideContext.bindingContext, overrideContext); - ++index; - }); - }; - - MapRepeatStrategy.prototype.instanceMutated = function instanceMutated(repeat, map, records) { - var key = void 0; - var i = void 0; - var ii = void 0; - var overrideContext = void 0; - var removeIndex = void 0; - var record = void 0; - var rmPromises = []; - var viewOrPromise = void 0; - - for (i = 0, ii = records.length; i < ii; ++i) { - record = records[i]; - key = record.key; - switch (record.type) { - case 'update': - removeIndex = this._getViewIndexByKey(repeat, key); - viewOrPromise = repeat.removeView(removeIndex, true, !repeat.viewsRequireLifecycle); - if (viewOrPromise instanceof Promise) { - rmPromises.push(viewOrPromise); - } - overrideContext = (0, _repeatUtilities.createFullOverrideContext)(repeat, map.get(key), removeIndex, map.size, key); - repeat.insertView(removeIndex, overrideContext.bindingContext, overrideContext); - break; - case 'add': - overrideContext = (0, _repeatUtilities.createFullOverrideContext)(repeat, map.get(key), map.size - 1, map.size, key); - repeat.insertView(map.size - 1, overrideContext.bindingContext, overrideContext); - break; - case 'delete': - if (record.oldValue === undefined) { - return; - } - removeIndex = this._getViewIndexByKey(repeat, key); - viewOrPromise = repeat.removeView(removeIndex, true, !repeat.viewsRequireLifecycle); - if (viewOrPromise instanceof Promise) { - rmPromises.push(viewOrPromise); - } - break; - case 'clear': - repeat.removeAllViews(true, !repeat.viewsRequireLifecycle); - break; - default: - continue; - } - } - - if (rmPromises.length > 0) { - Promise.all(rmPromises).then(function () { - (0, _repeatUtilities.updateOverrideContexts)(repeat.views(), 0); - }); - } else { - (0, _repeatUtilities.updateOverrideContexts)(repeat.views(), 0); - } - }; - - MapRepeatStrategy.prototype._getViewIndexByKey = function _getViewIndexByKey(repeat, key) { - var i = void 0; - var ii = void 0; - var child = void 0; - - for (i = 0, ii = repeat.viewCount(); i < ii; ++i) { - child = repeat.view(i); - if (child.bindingContext[repeat.key] === key) { - return i; - } - } - - return undefined; - }; - - return MapRepeatStrategy; - }(); -}); -define('aurelia-templating-resources/set-repeat-strategy',['exports', './repeat-utilities'], function (exports, _repeatUtilities) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.SetRepeatStrategy = undefined; - - - - var SetRepeatStrategy = exports.SetRepeatStrategy = function () { - function SetRepeatStrategy() { - - } - - SetRepeatStrategy.prototype.getCollectionObserver = function getCollectionObserver(observerLocator, items) { - return observerLocator.getSetObserver(items); - }; - - SetRepeatStrategy.prototype.instanceChanged = function instanceChanged(repeat, items) { - var _this = this; - - var removePromise = repeat.removeAllViews(true, !repeat.viewsRequireLifecycle); - if (removePromise instanceof Promise) { - removePromise.then(function () { - return _this._standardProcessItems(repeat, items); - }); - return; - } - this._standardProcessItems(repeat, items); - }; - - SetRepeatStrategy.prototype._standardProcessItems = function _standardProcessItems(repeat, items) { - var index = 0; - var overrideContext = void 0; - - items.forEach(function (value) { - overrideContext = (0, _repeatUtilities.createFullOverrideContext)(repeat, value, index, items.size); - repeat.addView(overrideContext.bindingContext, overrideContext); - ++index; - }); - }; - - SetRepeatStrategy.prototype.instanceMutated = function instanceMutated(repeat, set, records) { - var value = void 0; - var i = void 0; - var ii = void 0; - var overrideContext = void 0; - var removeIndex = void 0; - var record = void 0; - var rmPromises = []; - var viewOrPromise = void 0; - - for (i = 0, ii = records.length; i < ii; ++i) { - record = records[i]; - value = record.value; - switch (record.type) { - case 'add': - overrideContext = (0, _repeatUtilities.createFullOverrideContext)(repeat, value, set.size - 1, set.size); - repeat.insertView(set.size - 1, overrideContext.bindingContext, overrideContext); - break; - case 'delete': - removeIndex = this._getViewIndexByValue(repeat, value); - viewOrPromise = repeat.removeView(removeIndex, true, !repeat.viewsRequireLifecycle); - if (viewOrPromise instanceof Promise) { - rmPromises.push(viewOrPromise); - } - break; - case 'clear': - repeat.removeAllViews(true, !repeat.viewsRequireLifecycle); - break; - default: - continue; - } - } - - if (rmPromises.length > 0) { - Promise.all(rmPromises).then(function () { - (0, _repeatUtilities.updateOverrideContexts)(repeat.views(), 0); - }); - } else { - (0, _repeatUtilities.updateOverrideContexts)(repeat.views(), 0); - } - }; - - SetRepeatStrategy.prototype._getViewIndexByValue = function _getViewIndexByValue(repeat, value) { - var i = void 0; - var ii = void 0; - var child = void 0; - - for (i = 0, ii = repeat.viewCount(); i < ii; ++i) { - child = repeat.view(i); - if (child.bindingContext[repeat.local] === value) { - return i; - } - } - - return undefined; - }; - - return SetRepeatStrategy; - }(); -}); -define('aurelia-templating-resources/number-repeat-strategy',['exports', './repeat-utilities'], function (exports, _repeatUtilities) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.NumberRepeatStrategy = undefined; - - - - var NumberRepeatStrategy = exports.NumberRepeatStrategy = function () { - function NumberRepeatStrategy() { - - } - - NumberRepeatStrategy.prototype.getCollectionObserver = function getCollectionObserver() { - return null; - }; - - NumberRepeatStrategy.prototype.instanceChanged = function instanceChanged(repeat, value) { - var _this = this; - - var removePromise = repeat.removeAllViews(true, !repeat.viewsRequireLifecycle); - if (removePromise instanceof Promise) { - removePromise.then(function () { - return _this._standardProcessItems(repeat, value); - }); - return; - } - this._standardProcessItems(repeat, value); - }; - - NumberRepeatStrategy.prototype._standardProcessItems = function _standardProcessItems(repeat, value) { - var childrenLength = repeat.viewCount(); - var i = void 0; - var ii = void 0; - var overrideContext = void 0; - var viewsToRemove = void 0; - - value = Math.floor(value); - viewsToRemove = childrenLength - value; - - if (viewsToRemove > 0) { - if (viewsToRemove > childrenLength) { - viewsToRemove = childrenLength; - } - - for (i = 0, ii = viewsToRemove; i < ii; ++i) { - repeat.removeView(childrenLength - (i + 1), true, !repeat.viewsRequireLifecycle); - } - - return; - } - - for (i = childrenLength, ii = value; i < ii; ++i) { - overrideContext = (0, _repeatUtilities.createFullOverrideContext)(repeat, i, i, ii); - repeat.addView(overrideContext.bindingContext, overrideContext); - } - - (0, _repeatUtilities.updateOverrideContexts)(repeat.views(), 0); - }; - - return NumberRepeatStrategy; - }(); -}); -define('aurelia-templating-resources/analyze-view-factory',['exports'], function (exports) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.viewsRequireLifecycle = viewsRequireLifecycle; - var lifecycleOptionalBehaviors = exports.lifecycleOptionalBehaviors = ['focus', 'if', 'repeat', 'show', 'with']; - - function behaviorRequiresLifecycle(instruction) { - var t = instruction.type; - var name = t.elementName !== null ? t.elementName : t.attributeName; - return lifecycleOptionalBehaviors.indexOf(name) === -1 && (t.handlesAttached || t.handlesBind || t.handlesCreated || t.handlesDetached || t.handlesUnbind) || t.viewFactory && viewsRequireLifecycle(t.viewFactory) || instruction.viewFactory && viewsRequireLifecycle(instruction.viewFactory); - } - - function targetRequiresLifecycle(instruction) { - var behaviors = instruction.behaviorInstructions; - if (behaviors) { - var i = behaviors.length; - while (i--) { - if (behaviorRequiresLifecycle(behaviors[i])) { - return true; - } - } - } - - return instruction.viewFactory && viewsRequireLifecycle(instruction.viewFactory); - } - - function viewsRequireLifecycle(viewFactory) { - if ('_viewsRequireLifecycle' in viewFactory) { - return viewFactory._viewsRequireLifecycle; - } - - viewFactory._viewsRequireLifecycle = false; - - if (viewFactory.viewFactory) { - viewFactory._viewsRequireLifecycle = viewsRequireLifecycle(viewFactory.viewFactory); - return viewFactory._viewsRequireLifecycle; - } - - if (viewFactory.template.querySelector('.au-animate')) { - viewFactory._viewsRequireLifecycle = true; - return true; - } - - for (var id in viewFactory.instructions) { - if (targetRequiresLifecycle(viewFactory.instructions[id])) { - viewFactory._viewsRequireLifecycle = true; - return true; - } - } - - viewFactory._viewsRequireLifecycle = false; - return false; - } -}); -define('aurelia-templating-resources/abstract-repeater',['exports'], function (exports) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - - - var AbstractRepeater = exports.AbstractRepeater = function () { - function AbstractRepeater(options) { - - - Object.assign(this, { - local: 'items', - viewsRequireLifecycle: true - }, options); - } - - AbstractRepeater.prototype.viewCount = function viewCount() { - throw new Error('subclass must implement `viewCount`'); - }; - - AbstractRepeater.prototype.views = function views() { - throw new Error('subclass must implement `views`'); - }; - - AbstractRepeater.prototype.view = function view(index) { - throw new Error('subclass must implement `view`'); - }; - - AbstractRepeater.prototype.matcher = function matcher() { - throw new Error('subclass must implement `matcher`'); - }; - - AbstractRepeater.prototype.addView = function addView(bindingContext, overrideContext) { - throw new Error('subclass must implement `addView`'); - }; - - AbstractRepeater.prototype.insertView = function insertView(index, bindingContext, overrideContext) { - throw new Error('subclass must implement `insertView`'); - }; - - AbstractRepeater.prototype.moveView = function moveView(sourceIndex, targetIndex) { - throw new Error('subclass must implement `moveView`'); - }; - - AbstractRepeater.prototype.removeAllViews = function removeAllViews(returnToCache, skipAnimation) { - throw new Error('subclass must implement `removeAllViews`'); - }; - - AbstractRepeater.prototype.removeViews = function removeViews(viewsToRemove, returnToCache, skipAnimation) { - throw new Error('subclass must implement `removeView`'); - }; - - AbstractRepeater.prototype.removeView = function removeView(index, returnToCache, skipAnimation) { - throw new Error('subclass must implement `removeView`'); - }; - - AbstractRepeater.prototype.updateBindings = function updateBindings(view) { - throw new Error('subclass must implement `updateBindings`'); - }; - - return AbstractRepeater; - }(); -}); -define('aurelia-templating-resources/show',['exports', 'aurelia-dependency-injection', 'aurelia-templating', 'aurelia-pal', './aurelia-hide-style'], function (exports, _aureliaDependencyInjection, _aureliaTemplating, _aureliaPal, _aureliaHideStyle) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.Show = undefined; - - - - var _dec, _dec2, _class; - - var Show = exports.Show = (_dec = (0, _aureliaTemplating.customAttribute)('show'), _dec2 = (0, _aureliaDependencyInjection.inject)(_aureliaPal.DOM.Element, _aureliaTemplating.Animator, _aureliaDependencyInjection.Optional.of(_aureliaPal.DOM.boundary, true)), _dec(_class = _dec2(_class = function () { - function Show(element, animator, domBoundary) { - - - this.element = element; - this.animator = animator; - this.domBoundary = domBoundary; - } - - Show.prototype.created = function created() { - (0, _aureliaHideStyle.injectAureliaHideStyleAtBoundary)(this.domBoundary); - }; - - Show.prototype.valueChanged = function valueChanged(newValue) { - if (newValue) { - this.animator.removeClass(this.element, _aureliaHideStyle.aureliaHideClassName); - } else { - this.animator.addClass(this.element, _aureliaHideStyle.aureliaHideClassName); - } - }; - - Show.prototype.bind = function bind(bindingContext) { - this.valueChanged(this.value); - }; - - return Show; - }()) || _class) || _class); -}); -define('aurelia-templating-resources/aurelia-hide-style',['exports', 'aurelia-pal'], function (exports, _aureliaPal) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.aureliaHideClassName = undefined; - exports.injectAureliaHideStyleAtHead = injectAureliaHideStyleAtHead; - exports.injectAureliaHideStyleAtBoundary = injectAureliaHideStyleAtBoundary; - var aureliaHideClassName = exports.aureliaHideClassName = 'aurelia-hide'; - - var aureliaHideClass = '.' + aureliaHideClassName + ' { display:none !important; }'; - - function injectAureliaHideStyleAtHead() { - _aureliaPal.DOM.injectStyles(aureliaHideClass); - } - - function injectAureliaHideStyleAtBoundary(domBoundary) { - if (_aureliaPal.FEATURE.shadowDOM && domBoundary && !domBoundary.hasAureliaHideStyle) { - domBoundary.hasAureliaHideStyle = true; - _aureliaPal.DOM.injectStyles(aureliaHideClass, domBoundary); - } - } -}); -define('aurelia-templating-resources/hide',['exports', 'aurelia-dependency-injection', 'aurelia-templating', 'aurelia-pal', './aurelia-hide-style'], function (exports, _aureliaDependencyInjection, _aureliaTemplating, _aureliaPal, _aureliaHideStyle) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.Hide = undefined; - - - - var _dec, _dec2, _class; - - var Hide = exports.Hide = (_dec = (0, _aureliaTemplating.customAttribute)('hide'), _dec2 = (0, _aureliaDependencyInjection.inject)(_aureliaPal.DOM.Element, _aureliaTemplating.Animator, _aureliaDependencyInjection.Optional.of(_aureliaPal.DOM.boundary, true)), _dec(_class = _dec2(_class = function () { - function Hide(element, animator, domBoundary) { - - - this.element = element; - this.animator = animator; - this.domBoundary = domBoundary; - } - - Hide.prototype.created = function created() { - (0, _aureliaHideStyle.injectAureliaHideStyleAtBoundary)(this.domBoundary); - }; - - Hide.prototype.valueChanged = function valueChanged(newValue) { - if (newValue) { - this.animator.addClass(this.element, _aureliaHideStyle.aureliaHideClassName); - } else { - this.animator.removeClass(this.element, _aureliaHideStyle.aureliaHideClassName); - } - }; - - Hide.prototype.bind = function bind(bindingContext) { - this.valueChanged(this.value); - }; - - return Hide; - }()) || _class) || _class); -}); -define('aurelia-templating-resources/sanitize-html',['exports', 'aurelia-binding', 'aurelia-dependency-injection', './html-sanitizer'], function (exports, _aureliaBinding, _aureliaDependencyInjection, _htmlSanitizer) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.SanitizeHTMLValueConverter = undefined; - - - - var _dec, _dec2, _class; - - var SanitizeHTMLValueConverter = exports.SanitizeHTMLValueConverter = (_dec = (0, _aureliaBinding.valueConverter)('sanitizeHTML'), _dec2 = (0, _aureliaDependencyInjection.inject)(_htmlSanitizer.HTMLSanitizer), _dec(_class = _dec2(_class = function () { - function SanitizeHTMLValueConverter(sanitizer) { - - - this.sanitizer = sanitizer; - } - - SanitizeHTMLValueConverter.prototype.toView = function toView(untrustedMarkup) { - if (untrustedMarkup === null || untrustedMarkup === undefined) { - return null; - } - - return this.sanitizer.sanitize(untrustedMarkup); - }; - - return SanitizeHTMLValueConverter; - }()) || _class) || _class); -}); -define('aurelia-templating-resources/html-sanitizer',['exports'], function (exports) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - - - var SCRIPT_REGEX = /)<[^<]*)*<\/script>/gi; - - var HTMLSanitizer = exports.HTMLSanitizer = function () { - function HTMLSanitizer() { - - } - - HTMLSanitizer.prototype.sanitize = function sanitize(input) { - return input.replace(SCRIPT_REGEX, ''); - }; - - return HTMLSanitizer; - }(); -}); -define('aurelia-templating-resources/replaceable',['exports', 'aurelia-dependency-injection', 'aurelia-templating'], function (exports, _aureliaDependencyInjection, _aureliaTemplating) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.Replaceable = undefined; - - - - var _dec, _dec2, _class; - - var Replaceable = exports.Replaceable = (_dec = (0, _aureliaTemplating.customAttribute)('replaceable'), _dec2 = (0, _aureliaDependencyInjection.inject)(_aureliaTemplating.BoundViewFactory, _aureliaTemplating.ViewSlot), _dec(_class = (0, _aureliaTemplating.templateController)(_class = _dec2(_class = function () { - function Replaceable(viewFactory, viewSlot) { - - - this.viewFactory = viewFactory; - this.viewSlot = viewSlot; - this.view = null; - } - - Replaceable.prototype.bind = function bind(bindingContext, overrideContext) { - if (this.view === null) { - this.view = this.viewFactory.create(); - this.viewSlot.add(this.view); - } - - this.view.bind(bindingContext, overrideContext); - }; - - Replaceable.prototype.unbind = function unbind() { - this.view.unbind(); - }; - - return Replaceable; - }()) || _class) || _class) || _class); -}); -define('aurelia-templating-resources/focus',['exports', 'aurelia-templating', 'aurelia-binding', 'aurelia-dependency-injection', 'aurelia-task-queue', 'aurelia-pal'], function (exports, _aureliaTemplating, _aureliaBinding, _aureliaDependencyInjection, _aureliaTaskQueue, _aureliaPal) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.Focus = undefined; - - - - var _dec, _dec2, _class; - - var Focus = exports.Focus = (_dec = (0, _aureliaTemplating.customAttribute)('focus', _aureliaBinding.bindingMode.twoWay), _dec2 = (0, _aureliaDependencyInjection.inject)(_aureliaPal.DOM.Element, _aureliaTaskQueue.TaskQueue), _dec(_class = _dec2(_class = function () { - function Focus(element, taskQueue) { - var _this = this; - - - - this.element = element; - this.taskQueue = taskQueue; - this.isAttached = false; - this.needsApply = false; - - this.focusListener = function (e) { - _this.value = true; - }; - this.blurListener = function (e) { - if (_aureliaPal.DOM.activeElement !== _this.element) { - _this.value = false; - } - }; - } - - Focus.prototype.valueChanged = function valueChanged(newValue) { - if (this.isAttached) { - this._apply(); - } else { - this.needsApply = true; - } - }; - - Focus.prototype._apply = function _apply() { - var _this2 = this; - - if (this.value) { - this.taskQueue.queueMicroTask(function () { - if (_this2.value) { - _this2.element.focus(); - } - }); - } else { - this.element.blur(); - } - }; - - Focus.prototype.attached = function attached() { - this.isAttached = true; - if (this.needsApply) { - this.needsApply = false; - this._apply(); - } - this.element.addEventListener('focus', this.focusListener); - this.element.addEventListener('blur', this.blurListener); - }; - - Focus.prototype.detached = function detached() { - this.isAttached = false; - this.element.removeEventListener('focus', this.focusListener); - this.element.removeEventListener('blur', this.blurListener); - }; - - return Focus; - }()) || _class) || _class); -}); -define('aurelia-templating-resources/css-resource',['exports', 'aurelia-templating', 'aurelia-loader', 'aurelia-dependency-injection', 'aurelia-path', 'aurelia-pal'], function (exports, _aureliaTemplating, _aureliaLoader, _aureliaDependencyInjection, _aureliaPath, _aureliaPal) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports._createCSSResource = _createCSSResource; - - function _possibleConstructorReturn(self, call) { - if (!self) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - - return call && (typeof call === "object" || typeof call === "function") ? call : self; - } - - function _inherits(subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); - } - - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - enumerable: false, - writable: true, - configurable: true - } - }); - if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; - } - - - - var cssUrlMatcher = /url\((?!['"]data)([^)]+)\)/gi; - - function fixupCSSUrls(address, css) { - if (typeof css !== 'string') { - throw new Error('Failed loading required CSS file: ' + address); - } - return css.replace(cssUrlMatcher, function (match, p1) { - var quote = p1.charAt(0); - if (quote === '\'' || quote === '"') { - p1 = p1.substr(1, p1.length - 2); - } - return 'url(\'' + (0, _aureliaPath.relativeToFile)(p1, address) + '\')'; - }); - } - - var CSSResource = function () { - function CSSResource(address) { - - - this.address = address; - this._scoped = null; - this._global = false; - this._alreadyGloballyInjected = false; - } - - CSSResource.prototype.initialize = function initialize(container, target) { - this._scoped = new target(this); - }; - - CSSResource.prototype.register = function register(registry, name) { - if (name === 'scoped') { - registry.registerViewEngineHooks(this._scoped); - } else { - this._global = true; - } - }; - - CSSResource.prototype.load = function load(container) { - var _this = this; - - return container.get(_aureliaLoader.Loader).loadText(this.address).catch(function (err) { - return null; - }).then(function (text) { - text = fixupCSSUrls(_this.address, text); - _this._scoped.css = text; - if (_this._global) { - _this._alreadyGloballyInjected = true; - _aureliaPal.DOM.injectStyles(text); - } - }); - }; - - return CSSResource; - }(); - - var CSSViewEngineHooks = function () { - function CSSViewEngineHooks(owner) { - - - this.owner = owner; - this.css = null; - } - - CSSViewEngineHooks.prototype.beforeCompile = function beforeCompile(content, resources, instruction) { - if (instruction.targetShadowDOM) { - _aureliaPal.DOM.injectStyles(this.css, content, true); - } else if (_aureliaPal.FEATURE.scopedCSS) { - var styleNode = _aureliaPal.DOM.injectStyles(this.css, content, true); - styleNode.setAttribute('scoped', 'scoped'); - } else if (!this.owner._alreadyGloballyInjected) { - _aureliaPal.DOM.injectStyles(this.css); - this.owner._alreadyGloballyInjected = true; - } - }; - - return CSSViewEngineHooks; - }(); - - function _createCSSResource(address) { - var _dec, _class; - - var ViewCSS = (_dec = (0, _aureliaTemplating.resource)(new CSSResource(address)), _dec(_class = function (_CSSViewEngineHooks) { - _inherits(ViewCSS, _CSSViewEngineHooks); - - function ViewCSS() { - - - return _possibleConstructorReturn(this, _CSSViewEngineHooks.apply(this, arguments)); - } - - return ViewCSS; - }(CSSViewEngineHooks)) || _class); - - return ViewCSS; - } -}); -define('aurelia-templating-resources/attr-binding-behavior',['exports', 'aurelia-binding'], function (exports, _aureliaBinding) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.AttrBindingBehavior = undefined; - - - - var AttrBindingBehavior = exports.AttrBindingBehavior = function () { - function AttrBindingBehavior() { - - } - - AttrBindingBehavior.prototype.bind = function bind(binding, source) { - binding.targetObserver = new _aureliaBinding.DataAttributeObserver(binding.target, binding.targetProperty); - }; - - AttrBindingBehavior.prototype.unbind = function unbind(binding, source) {}; - - return AttrBindingBehavior; - }(); -}); -define('aurelia-templating-resources/binding-mode-behaviors',['exports', 'aurelia-binding', 'aurelia-metadata'], function (exports, _aureliaBinding, _aureliaMetadata) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.TwoWayBindingBehavior = exports.OneWayBindingBehavior = exports.OneTimeBindingBehavior = undefined; - - - - var _dec, _class, _dec2, _class2, _dec3, _class3; - - var modeBindingBehavior = { - bind: function bind(binding, source, lookupFunctions) { - binding.originalMode = binding.mode; - binding.mode = this.mode; - }, - unbind: function unbind(binding, source) { - binding.mode = binding.originalMode; - binding.originalMode = null; - } - }; - - var OneTimeBindingBehavior = exports.OneTimeBindingBehavior = (_dec = (0, _aureliaMetadata.mixin)(modeBindingBehavior), _dec(_class = function OneTimeBindingBehavior() { - - - this.mode = _aureliaBinding.bindingMode.oneTime; - }) || _class); - var OneWayBindingBehavior = exports.OneWayBindingBehavior = (_dec2 = (0, _aureliaMetadata.mixin)(modeBindingBehavior), _dec2(_class2 = function OneWayBindingBehavior() { - - - this.mode = _aureliaBinding.bindingMode.oneWay; - }) || _class2); - var TwoWayBindingBehavior = exports.TwoWayBindingBehavior = (_dec3 = (0, _aureliaMetadata.mixin)(modeBindingBehavior), _dec3(_class3 = function TwoWayBindingBehavior() { - - - this.mode = _aureliaBinding.bindingMode.twoWay; - }) || _class3); -}); -define('aurelia-templating-resources/throttle-binding-behavior',['exports', 'aurelia-binding'], function (exports, _aureliaBinding) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.ThrottleBindingBehavior = undefined; - - - - function throttle(newValue) { - var _this = this; - - var state = this.throttleState; - var elapsed = +new Date() - state.last; - if (elapsed >= state.delay) { - clearTimeout(state.timeoutId); - state.timeoutId = null; - state.last = +new Date(); - this.throttledMethod(newValue); - return; - } - state.newValue = newValue; - if (state.timeoutId === null) { - state.timeoutId = setTimeout(function () { - state.timeoutId = null; - state.last = +new Date(); - _this.throttledMethod(state.newValue); - }, state.delay - elapsed); - } - } - - var ThrottleBindingBehavior = exports.ThrottleBindingBehavior = function () { - function ThrottleBindingBehavior() { - - } - - ThrottleBindingBehavior.prototype.bind = function bind(binding, source) { - var delay = arguments.length <= 2 || arguments[2] === undefined ? 200 : arguments[2]; - - var methodToThrottle = 'updateTarget'; - if (binding.callSource) { - methodToThrottle = 'callSource'; - } else if (binding.updateSource && binding.mode === _aureliaBinding.bindingMode.twoWay) { - methodToThrottle = 'updateSource'; - } - - binding.throttledMethod = binding[methodToThrottle]; - binding.throttledMethod.originalName = methodToThrottle; - - binding[methodToThrottle] = throttle; - - binding.throttleState = { - delay: delay, - last: 0, - timeoutId: null - }; - }; - - ThrottleBindingBehavior.prototype.unbind = function unbind(binding, source) { - var methodToRestore = binding.throttledMethod.originalName; - binding[methodToRestore] = binding.throttledMethod; - binding.throttledMethod = null; - clearTimeout(binding.throttleState.timeoutId); - binding.throttleState = null; - }; - - return ThrottleBindingBehavior; - }(); -}); -define('aurelia-templating-resources/debounce-binding-behavior',['exports', 'aurelia-binding'], function (exports, _aureliaBinding) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.DebounceBindingBehavior = undefined; - - - - function debounce(newValue) { - var _this = this; - - var state = this.debounceState; - if (state.immediate) { - state.immediate = false; - this.debouncedMethod(newValue); - return; - } - clearTimeout(state.timeoutId); - state.timeoutId = setTimeout(function () { - return _this.debouncedMethod(newValue); - }, state.delay); - } - - var DebounceBindingBehavior = exports.DebounceBindingBehavior = function () { - function DebounceBindingBehavior() { - - } - - DebounceBindingBehavior.prototype.bind = function bind(binding, source) { - var delay = arguments.length <= 2 || arguments[2] === undefined ? 200 : arguments[2]; - - var methodToDebounce = 'updateTarget'; - if (binding.callSource) { - methodToDebounce = 'callSource'; - } else if (binding.updateSource && binding.mode === _aureliaBinding.bindingMode.twoWay) { - methodToDebounce = 'updateSource'; - } - - binding.debouncedMethod = binding[methodToDebounce]; - binding.debouncedMethod.originalName = methodToDebounce; - - binding[methodToDebounce] = debounce; - - binding.debounceState = { - delay: delay, - timeoutId: null, - immediate: methodToDebounce === 'updateTarget' }; - }; - - DebounceBindingBehavior.prototype.unbind = function unbind(binding, source) { - var methodToRestore = binding.debouncedMethod.originalName; - binding[methodToRestore] = binding.debouncedMethod; - binding.debouncedMethod = null; - clearTimeout(binding.debounceState.timeoutId); - binding.debounceState = null; - }; - - return DebounceBindingBehavior; - }(); -}); -define('aurelia-templating-resources/signal-binding-behavior',['exports', './binding-signaler'], function (exports, _bindingSignaler) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.SignalBindingBehavior = undefined; - - - - var SignalBindingBehavior = exports.SignalBindingBehavior = function () { - SignalBindingBehavior.inject = function inject() { - return [_bindingSignaler.BindingSignaler]; - }; - - function SignalBindingBehavior(bindingSignaler) { - - - this.signals = bindingSignaler.signals; - } - - SignalBindingBehavior.prototype.bind = function bind(binding, source) { - if (!binding.updateTarget) { - throw new Error('Only property bindings and string interpolation bindings can be signaled. Trigger, delegate and call bindings cannot be signaled.'); - } - if (arguments.length === 3) { - var name = arguments[2]; - var bindings = this.signals[name] || (this.signals[name] = []); - bindings.push(binding); - binding.signalName = name; - } else if (arguments.length > 3) { - var names = Array.prototype.slice.call(arguments, 2); - var i = names.length; - while (i--) { - var _name = names[i]; - var _bindings = this.signals[_name] || (this.signals[_name] = []); - _bindings.push(binding); - } - binding.signalName = names; - } else { - throw new Error('Signal name is required.'); - } - }; - - SignalBindingBehavior.prototype.unbind = function unbind(binding, source) { - var name = binding.signalName; - binding.signalName = null; - if (Array.isArray(name)) { - var names = name; - var i = names.length; - while (i--) { - var n = names[i]; - var bindings = this.signals[n]; - bindings.splice(bindings.indexOf(binding), 1); - } - } else { - var _bindings2 = this.signals[name]; - _bindings2.splice(_bindings2.indexOf(binding), 1); - } - }; - - return SignalBindingBehavior; - }(); -}); -define('aurelia-templating-resources/binding-signaler',['exports', 'aurelia-binding'], function (exports, _aureliaBinding) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.BindingSignaler = undefined; - - - - var BindingSignaler = exports.BindingSignaler = function () { - function BindingSignaler() { - - - this.signals = {}; - } - - BindingSignaler.prototype.signal = function signal(name) { - var bindings = this.signals[name]; - if (!bindings) { - return; - } - var i = bindings.length; - while (i--) { - bindings[i].call(_aureliaBinding.sourceContext); - } - }; - - return BindingSignaler; - }(); -}); -define('aurelia-templating-resources/update-trigger-binding-behavior',['exports', 'aurelia-binding'], function (exports, _aureliaBinding) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.UpdateTriggerBindingBehavior = undefined; - - - - var _class, _temp; - - var eventNamesRequired = 'The updateTrigger binding behavior requires at least one event name argument: eg '; - var notApplicableMessage = 'The updateTrigger binding behavior can only be applied to two-way bindings on input/select elements.'; - - var UpdateTriggerBindingBehavior = exports.UpdateTriggerBindingBehavior = (_temp = _class = function () { - function UpdateTriggerBindingBehavior(eventManager) { - - - this.eventManager = eventManager; - } - - UpdateTriggerBindingBehavior.prototype.bind = function bind(binding, source) { - for (var _len = arguments.length, events = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { - events[_key - 2] = arguments[_key]; - } - - if (events.length === 0) { - throw new Error(eventNamesRequired); - } - if (binding.mode !== _aureliaBinding.bindingMode.twoWay) { - throw new Error(notApplicableMessage); - } - - var targetObserver = binding.observerLocator.getObserver(binding.target, binding.targetProperty); - if (!targetObserver.handler) { - throw new Error(notApplicableMessage); - } - binding.targetObserver = targetObserver; - - targetObserver.originalHandler = binding.targetObserver.handler; - - var handler = this.eventManager.createElementHandler(events); - targetObserver.handler = handler; - }; - - UpdateTriggerBindingBehavior.prototype.unbind = function unbind(binding, source) { - binding.targetObserver.handler = binding.targetObserver.originalHandler; - binding.targetObserver.originalHandler = null; - }; - - return UpdateTriggerBindingBehavior; - }(), _class.inject = [_aureliaBinding.EventManager], _temp); -}); -define('aurelia-templating-resources/html-resource-plugin',['exports', 'aurelia-templating', './dynamic-element'], function (exports, _aureliaTemplating, _dynamicElement) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.getElementName = getElementName; - exports.configure = configure; - function getElementName(address) { - return (/([^\/^\?]+)\.html/i.exec(address)[1].toLowerCase() - ); - } - - function configure(config) { - var viewEngine = config.container.get(_aureliaTemplating.ViewEngine); - var loader = config.aurelia.loader; - - viewEngine.addResourcePlugin('.html', { - 'fetch': function fetch(address) { - return loader.loadTemplate(address).then(function (registryEntry) { - var _ref; - - var bindable = registryEntry.template.getAttribute('bindable'); - var elementName = getElementName(address); - - if (bindable) { - bindable = bindable.split(',').map(function (x) { - return x.trim(); - }); - registryEntry.template.removeAttribute('bindable'); - } else { - bindable = []; - } - - return _ref = {}, _ref[elementName] = (0, _dynamicElement._createDynamicElement)(elementName, address, bindable), _ref; - }); - } - }); - } -}); -define('aurelia-templating-resources/dynamic-element',['exports', 'aurelia-templating'], function (exports, _aureliaTemplating) { - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports._createDynamicElement = _createDynamicElement; - - - - function _createDynamicElement(name, viewUrl, bindableNames) { - var _dec, _dec2, _class; - - var DynamicElement = (_dec = (0, _aureliaTemplating.customElement)(name), _dec2 = (0, _aureliaTemplating.useView)(viewUrl), _dec(_class = _dec2(_class = function () { - function DynamicElement() { - - } - - DynamicElement.prototype.bind = function bind(bindingContext) { - this.$parent = bindingContext; - }; - - return DynamicElement; - }()) || _class) || _class); - - for (var i = 0, ii = bindableNames.length; i < ii; ++i) { - (0, _aureliaTemplating.bindable)(bindableNames[i])(DynamicElement); - } - return DynamicElement; - } -}); -/* -Syntax highlighting with language autodetection. -https://highlightjs.org/ -*/ - -(function(factory) { - - // Find the global object for export to both the browser and web workers. - var globalObject = typeof window === 'object' && window || - typeof self === 'object' && self; - - // Setup highlight.js for different environments. First is Node.js or - // CommonJS. - if(typeof exports !== 'undefined') { - factory(exports); - } else if(globalObject) { - // Export hljs globally even when using AMD for cases when this script - // is loaded with others that may still expect a global hljs. - globalObject.hljs = factory({}); - - // Finally register the global hljs with AMD. - if(typeof define === 'function' && define.amd) { - define('highlight/lib/highlight',[], function() { - return globalObject.hljs; - }); - } - } - -}(function(hljs) { - // Convenience variables for build-in objects - var ArrayProto = [], - objectKeys = Object.keys; - - // Global internal variables used within the highlight.js library. - var languages = {}, - aliases = {}; - - // Regular expressions used throughout the highlight.js library. - var noHighlightRe = /^(no-?highlight|plain|text)$/i, - languagePrefixRe = /\blang(?:uage)?-([\w-]+)\b/i, - fixMarkupRe = /((^(<[^>]+>|\t|)+|(?:\n)))/gm; - - var spanEndTag = ''; - - // Global options used when within external APIs. This is modified when - // calling the `hljs.configure` function. - var options = { - classPrefix: 'hljs-', - tabReplace: null, - useBR: false, - languages: undefined - }; - - // Object map that is used to escape some common HTML characters. - var escapeRegexMap = { - '&': '&', - '<': '<', - '>': '>' - }; - - /* Utility functions */ - - function escape(value) { - return value.replace(/[&<>]/gm, function(character) { - return escapeRegexMap[character]; - }); - } - - function tag(node) { - return node.nodeName.toLowerCase(); - } - - function testRe(re, lexeme) { - var match = re && re.exec(lexeme); - return match && match.index === 0; - } - - function isNotHighlighted(language) { - return noHighlightRe.test(language); - } - - function blockLanguage(block) { - var i, match, length, _class; - var classes = block.className + ' '; - - classes += block.parentNode ? block.parentNode.className : ''; - - // language-* takes precedence over non-prefixed class names. - match = languagePrefixRe.exec(classes); - if (match) { - return getLanguage(match[1]) ? match[1] : 'no-highlight'; - } - - classes = classes.split(/\s+/); - - for (i = 0, length = classes.length; i < length; i++) { - _class = classes[i] - - if (isNotHighlighted(_class) || getLanguage(_class)) { - return _class; - } - } - } - - function inherit(parent, obj) { - var key; - var result = {}; - - for (key in parent) - result[key] = parent[key]; - if (obj) - for (key in obj) - result[key] = obj[key]; - return result; - } - - /* Stream merging */ - - function nodeStream(node) { - var result = []; - (function _nodeStream(node, offset) { - for (var child = node.firstChild; child; child = child.nextSibling) { - if (child.nodeType === 3) - offset += child.nodeValue.length; - else if (child.nodeType === 1) { - result.push({ - event: 'start', - offset: offset, - node: child - }); - offset = _nodeStream(child, offset); - // Prevent void elements from having an end tag that would actually - // double them in the output. There are more void elements in HTML - // but we list only those realistically expected in code display. - if (!tag(child).match(/br|hr|img|input/)) { - result.push({ - event: 'stop', - offset: offset, - node: child - }); - } - } - } - return offset; - })(node, 0); - return result; - } - - function mergeStreams(original, highlighted, value) { - var processed = 0; - var result = ''; - var nodeStack = []; - - function selectStream() { - if (!original.length || !highlighted.length) { - return original.length ? original : highlighted; - } - if (original[0].offset !== highlighted[0].offset) { - return (original[0].offset < highlighted[0].offset) ? original : highlighted; - } - - /* - To avoid starting the stream just before it should stop the order is - ensured that original always starts first and closes last: - - if (event1 == 'start' && event2 == 'start') - return original; - if (event1 == 'start' && event2 == 'stop') - return highlighted; - if (event1 == 'stop' && event2 == 'start') - return original; - if (event1 == 'stop' && event2 == 'stop') - return highlighted; - - ... which is collapsed to: - */ - return highlighted[0].event === 'start' ? original : highlighted; - } - - function open(node) { - function attr_str(a) {return ' ' + a.nodeName + '="' + escape(a.value) + '"';} - result += '<' + tag(node) + ArrayProto.map.call(node.attributes, attr_str).join('') + '>'; - } - - function close(node) { - result += ''; - } - - function render(event) { - (event.event === 'start' ? open : close)(event.node); - } - - while (original.length || highlighted.length) { - var stream = selectStream(); - result += escape(value.substr(processed, stream[0].offset - processed)); - processed = stream[0].offset; - if (stream === original) { - /* - On any opening or closing tag of the original markup we first close - the entire highlighted node stack, then render the original tag along - with all the following original tags at the same offset and then - reopen all the tags on the highlighted stack. - */ - nodeStack.reverse().forEach(close); - do { - render(stream.splice(0, 1)[0]); - stream = selectStream(); - } while (stream === original && stream.length && stream[0].offset === processed); - nodeStack.reverse().forEach(open); - } else { - if (stream[0].event === 'start') { - nodeStack.push(stream[0].node); - } else { - nodeStack.pop(); - } - render(stream.splice(0, 1)[0]); - } - } - return result + escape(value.substr(processed)); - } - - /* Initialization */ - - function compileLanguage(language) { - - function reStr(re) { - return (re && re.source) || re; - } - - function langRe(value, global) { - return new RegExp( - reStr(value), - 'm' + (language.case_insensitive ? 'i' : '') + (global ? 'g' : '') - ); - } - - function compileMode(mode, parent) { - if (mode.compiled) - return; - mode.compiled = true; - - mode.keywords = mode.keywords || mode.beginKeywords; - if (mode.keywords) { - var compiled_keywords = {}; - - var flatten = function(className, str) { - if (language.case_insensitive) { - str = str.toLowerCase(); - } - str.split(' ').forEach(function(kw) { - var pair = kw.split('|'); - compiled_keywords[pair[0]] = [className, pair[1] ? Number(pair[1]) : 1]; - }); - }; - - if (typeof mode.keywords === 'string') { // string - flatten('keyword', mode.keywords); - } else { - objectKeys(mode.keywords).forEach(function (className) { - flatten(className, mode.keywords[className]); - }); - } - mode.keywords = compiled_keywords; - } - mode.lexemesRe = langRe(mode.lexemes || /\w+/, true); - - if (parent) { - if (mode.beginKeywords) { - mode.begin = '\\b(' + mode.beginKeywords.split(' ').join('|') + ')\\b'; - } - if (!mode.begin) - mode.begin = /\B|\b/; - mode.beginRe = langRe(mode.begin); - if (!mode.end && !mode.endsWithParent) - mode.end = /\B|\b/; - if (mode.end) - mode.endRe = langRe(mode.end); - mode.terminator_end = reStr(mode.end) || ''; - if (mode.endsWithParent && parent.terminator_end) - mode.terminator_end += (mode.end ? '|' : '') + parent.terminator_end; - } - if (mode.illegal) - mode.illegalRe = langRe(mode.illegal); - if (mode.relevance == null) - mode.relevance = 1; - if (!mode.contains) { - mode.contains = []; - } - var expanded_contains = []; - mode.contains.forEach(function(c) { - if (c.variants) { - c.variants.forEach(function(v) {expanded_contains.push(inherit(c, v));}); - } else { - expanded_contains.push(c === 'self' ? mode : c); - } - }); - mode.contains = expanded_contains; - mode.contains.forEach(function(c) {compileMode(c, mode);}); - - if (mode.starts) { - compileMode(mode.starts, parent); - } - - var terminators = - mode.contains.map(function(c) { - return c.beginKeywords ? '\\.?(' + c.begin + ')\\.?' : c.begin; - }) - .concat([mode.terminator_end, mode.illegal]) - .map(reStr) - .filter(Boolean); - mode.terminators = terminators.length ? langRe(terminators.join('|'), true) : {exec: function(/*s*/) {return null;}}; - } - - compileMode(language); - } - - /* - Core highlighting function. Accepts a language name, or an alias, and a - string with the code to highlight. Returns an object with the following - properties: - - - relevance (int) - - value (an HTML string with highlighting markup) - - */ - function highlight(name, value, ignore_illegals, continuation) { - - function subMode(lexeme, mode) { - var i, length; - - for (i = 0, length = mode.contains.length; i < length; i++) { - if (testRe(mode.contains[i].beginRe, lexeme)) { - return mode.contains[i]; - } - } - } - - function endOfMode(mode, lexeme) { - if (testRe(mode.endRe, lexeme)) { - while (mode.endsParent && mode.parent) { - mode = mode.parent; - } - return mode; - } - if (mode.endsWithParent) { - return endOfMode(mode.parent, lexeme); - } - } - - function isIllegal(lexeme, mode) { - return !ignore_illegals && testRe(mode.illegalRe, lexeme); - } - - function keywordMatch(mode, match) { - var match_str = language.case_insensitive ? match[0].toLowerCase() : match[0]; - return mode.keywords.hasOwnProperty(match_str) && mode.keywords[match_str]; - } - - function buildSpan(classname, insideSpan, leaveOpen, noPrefix) { - var classPrefix = noPrefix ? '' : options.classPrefix, - openSpan = ''; - - return openSpan + insideSpan + closeSpan; - } - - function processKeywords() { - var keyword_match, last_index, match, result; - - if (!top.keywords) - return escape(mode_buffer); - - result = ''; - last_index = 0; - top.lexemesRe.lastIndex = 0; - match = top.lexemesRe.exec(mode_buffer); - - while (match) { - result += escape(mode_buffer.substr(last_index, match.index - last_index)); - keyword_match = keywordMatch(top, match); - if (keyword_match) { - relevance += keyword_match[1]; - result += buildSpan(keyword_match[0], escape(match[0])); - } else { - result += escape(match[0]); - } - last_index = top.lexemesRe.lastIndex; - match = top.lexemesRe.exec(mode_buffer); - } - return result + escape(mode_buffer.substr(last_index)); - } - - function processSubLanguage() { - var explicit = typeof top.subLanguage === 'string'; - if (explicit && !languages[top.subLanguage]) { - return escape(mode_buffer); - } - - var result = explicit ? - highlight(top.subLanguage, mode_buffer, true, continuations[top.subLanguage]) : - highlightAuto(mode_buffer, top.subLanguage.length ? top.subLanguage : undefined); - - // Counting embedded language score towards the host language may be disabled - // with zeroing the containing mode relevance. Usecase in point is Markdown that - // allows XML everywhere and makes every XML snippet to have a much larger Markdown - // score. - if (top.relevance > 0) { - relevance += result.relevance; - } - if (explicit) { - continuations[top.subLanguage] = result.top; - } - return buildSpan(result.language, result.value, false, true); - } - - function processBuffer() { - result += (top.subLanguage != null ? processSubLanguage() : processKeywords()); - mode_buffer = ''; - } - - function startNewMode(mode) { - result += mode.className? buildSpan(mode.className, '', true): ''; - top = Object.create(mode, {parent: {value: top}}); - } - - function processLexeme(buffer, lexeme) { - - mode_buffer += buffer; - - if (lexeme == null) { - processBuffer(); - return 0; - } - - var new_mode = subMode(lexeme, top); - if (new_mode) { - if (new_mode.skip) { - mode_buffer += lexeme; - } else { - if (new_mode.excludeBegin) { - mode_buffer += lexeme; - } - processBuffer(); - if (!new_mode.returnBegin && !new_mode.excludeBegin) { - mode_buffer = lexeme; - } - } - startNewMode(new_mode, lexeme); - return new_mode.returnBegin ? 0 : lexeme.length; - } - - var end_mode = endOfMode(top, lexeme); - if (end_mode) { - var origin = top; - if (origin.skip) { - mode_buffer += lexeme; - } else { - if (!(origin.returnEnd || origin.excludeEnd)) { - mode_buffer += lexeme; - } - processBuffer(); - if (origin.excludeEnd) { - mode_buffer = lexeme; - } - } - do { - if (top.className) { - result += spanEndTag; - } - if (!top.skip) { - relevance += top.relevance; - } - top = top.parent; - } while (top !== end_mode.parent); - if (end_mode.starts) { - startNewMode(end_mode.starts, ''); - } - return origin.returnEnd ? 0 : lexeme.length; - } - - if (isIllegal(lexeme, top)) - throw new Error('Illegal lexeme "' + lexeme + '" for mode "' + (top.className || '') + '"'); - - /* - Parser should not reach this point as all types of lexemes should be caught - earlier, but if it does due to some bug make sure it advances at least one - character forward to prevent infinite looping. - */ - mode_buffer += lexeme; - return lexeme.length || 1; - } - - var language = getLanguage(name); - if (!language) { - throw new Error('Unknown language: "' + name + '"'); - } - - compileLanguage(language); - var top = continuation || language; - var continuations = {}; // keep continuations for sub-languages - var result = '', current; - for(current = top; current !== language; current = current.parent) { - if (current.className) { - result = buildSpan(current.className, '', true) + result; - } - } - var mode_buffer = ''; - var relevance = 0; - try { - var match, count, index = 0; - while (true) { - top.terminators.lastIndex = index; - match = top.terminators.exec(value); - if (!match) - break; - count = processLexeme(value.substr(index, match.index - index), match[0]); - index = match.index + count; - } - processLexeme(value.substr(index)); - for(current = top; current.parent; current = current.parent) { // close dangling modes - if (current.className) { - result += spanEndTag; - } - } - return { - relevance: relevance, - value: result, - language: name, - top: top - }; - } catch (e) { - if (e.message && e.message.indexOf('Illegal') !== -1) { - return { - relevance: 0, - value: escape(value) - }; - } else { - throw e; - } - } - } - - /* - Highlighting with language detection. Accepts a string with the code to - highlight. Returns an object with the following properties: - - - language (detected language) - - relevance (int) - - value (an HTML string with highlighting markup) - - second_best (object with the same structure for second-best heuristically - detected language, may be absent) - - */ - function highlightAuto(text, languageSubset) { - languageSubset = languageSubset || options.languages || objectKeys(languages); - var result = { - relevance: 0, - value: escape(text) - }; - var second_best = result; - languageSubset.filter(getLanguage).forEach(function(name) { - var current = highlight(name, text, false); - current.language = name; - if (current.relevance > second_best.relevance) { - second_best = current; - } - if (current.relevance > result.relevance) { - second_best = result; - result = current; - } - }); - if (second_best.language) { - result.second_best = second_best; - } - return result; - } - - /* - Post-processing of the highlighted markup: - - - replace TABs with something more useful - - replace real line-breaks with '
    ' for non-pre containers - - */ - function fixMarkup(value) { - return !(options.tabReplace || options.useBR) - ? value - : value.replace(fixMarkupRe, function(match, p1) { - if (options.useBR && match === '\n') { - return '
    '; - } else if (options.tabReplace) { - return p1.replace(/\t/g, options.tabReplace); - } - }); - } - - function buildClassName(prevClassName, currentLang, resultLang) { - var language = currentLang ? aliases[currentLang] : resultLang, - result = [prevClassName.trim()]; - - if (!prevClassName.match(/\bhljs\b/)) { - result.push('hljs'); - } - - if (prevClassName.indexOf(language) === -1) { - result.push(language); - } - - return result.join(' ').trim(); - } - - /* - Applies highlighting to a DOM node containing code. Accepts a DOM node and - two optional parameters for fixMarkup. - */ - function highlightBlock(block) { - var node, originalStream, result, resultNode, text; - var language = blockLanguage(block); - - if (isNotHighlighted(language)) - return; - - if (options.useBR) { - node = document.createElementNS('http://www.w3.org/1999/xhtml', 'div'); - node.innerHTML = block.innerHTML.replace(/\n/g, '').replace(//g, '\n'); - } else { - node = block; - } - text = node.textContent; - result = language ? highlight(language, text, true) : highlightAuto(text); - - originalStream = nodeStream(node); - if (originalStream.length) { - resultNode = document.createElementNS('http://www.w3.org/1999/xhtml', 'div'); - resultNode.innerHTML = result.value; - result.value = mergeStreams(originalStream, nodeStream(resultNode), text); - } - result.value = fixMarkup(result.value); - - block.innerHTML = result.value; - block.className = buildClassName(block.className, language, result.language); - block.result = { - language: result.language, - re: result.relevance - }; - if (result.second_best) { - block.second_best = { - language: result.second_best.language, - re: result.second_best.relevance - }; - } - } - - /* - Updates highlight.js global options with values passed in the form of an object. - */ - function configure(user_options) { - options = inherit(options, user_options); - } - - /* - Applies highlighting to all
    ..
    blocks on a page. - */ - function initHighlighting() { - if (initHighlighting.called) - return; - initHighlighting.called = true; - - var blocks = document.querySelectorAll('pre code'); - ArrayProto.forEach.call(blocks, highlightBlock); - } - - /* - Attaches highlighting to the page load event. - */ - function initHighlightingOnLoad() { - addEventListener('DOMContentLoaded', initHighlighting, false); - addEventListener('load', initHighlighting, false); - } - - function registerLanguage(name, language) { - var lang = languages[name] = language(hljs); - if (lang.aliases) { - lang.aliases.forEach(function(alias) {aliases[alias] = name;}); - } - } - - function listLanguages() { - return objectKeys(languages); - } - - function getLanguage(name) { - name = (name || '').toLowerCase(); - return languages[name] || languages[aliases[name]]; - } - - /* Interface definition */ - - hljs.highlight = highlight; - hljs.highlightAuto = highlightAuto; - hljs.fixMarkup = fixMarkup; - hljs.highlightBlock = highlightBlock; - hljs.configure = configure; - hljs.initHighlighting = initHighlighting; - hljs.initHighlightingOnLoad = initHighlightingOnLoad; - hljs.registerLanguage = registerLanguage; - hljs.listLanguages = listLanguages; - hljs.getLanguage = getLanguage; - hljs.inherit = inherit; - - // Common regexps - hljs.IDENT_RE = '[a-zA-Z]\\w*'; - hljs.UNDERSCORE_IDENT_RE = '[a-zA-Z_]\\w*'; - hljs.NUMBER_RE = '\\b\\d+(\\.\\d+)?'; - hljs.C_NUMBER_RE = '(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)'; // 0x..., 0..., decimal, float - hljs.BINARY_NUMBER_RE = '\\b(0b[01]+)'; // 0b... - hljs.RE_STARTERS_RE = '!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~'; - - // Common modes - hljs.BACKSLASH_ESCAPE = { - begin: '\\\\[\\s\\S]', relevance: 0 - }; - hljs.APOS_STRING_MODE = { - className: 'string', - begin: '\'', end: '\'', - illegal: '\\n', - contains: [hljs.BACKSLASH_ESCAPE] - }; - hljs.QUOTE_STRING_MODE = { - className: 'string', - begin: '"', end: '"', - illegal: '\\n', - contains: [hljs.BACKSLASH_ESCAPE] - }; - hljs.PHRASAL_WORDS_MODE = { - begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|like)\b/ - }; - hljs.COMMENT = function (begin, end, inherits) { - var mode = hljs.inherit( - { - className: 'comment', - begin: begin, end: end, - contains: [] - }, - inherits || {} - ); - mode.contains.push(hljs.PHRASAL_WORDS_MODE); - mode.contains.push({ - className: 'doctag', - begin: '(?:TODO|FIXME|NOTE|BUG|XXX):', - relevance: 0 - }); - return mode; - }; - hljs.C_LINE_COMMENT_MODE = hljs.COMMENT('//', '$'); - hljs.C_BLOCK_COMMENT_MODE = hljs.COMMENT('/\\*', '\\*/'); - hljs.HASH_COMMENT_MODE = hljs.COMMENT('#', '$'); - hljs.NUMBER_MODE = { - className: 'number', - begin: hljs.NUMBER_RE, - relevance: 0 - }; - hljs.C_NUMBER_MODE = { - className: 'number', - begin: hljs.C_NUMBER_RE, - relevance: 0 - }; - hljs.BINARY_NUMBER_MODE = { - className: 'number', - begin: hljs.BINARY_NUMBER_RE, - relevance: 0 - }; - hljs.CSS_NUMBER_MODE = { - className: 'number', - begin: hljs.NUMBER_RE + '(' + - '%|em|ex|ch|rem' + - '|vw|vh|vmin|vmax' + - '|cm|mm|in|pt|pc|px' + - '|deg|grad|rad|turn' + - '|s|ms' + - '|Hz|kHz' + - '|dpi|dpcm|dppx' + - ')?', - relevance: 0 - }; - hljs.REGEXP_MODE = { - className: 'regexp', - begin: /\//, end: /\/[gimuy]*/, - illegal: /\n/, - contains: [ - hljs.BACKSLASH_ESCAPE, - { - begin: /\[/, end: /\]/, - relevance: 0, - contains: [hljs.BACKSLASH_ESCAPE] - } - ] - }; - hljs.TITLE_MODE = { - className: 'title', - begin: hljs.IDENT_RE, - relevance: 0 - }; - hljs.UNDERSCORE_TITLE_MODE = { - className: 'title', - begin: hljs.UNDERSCORE_IDENT_RE, - relevance: 0 - }; - hljs.METHOD_GUARD = { - // excludes method names from keyword processing - begin: '\\.\\s*' + hljs.UNDERSCORE_IDENT_RE, - relevance: 0 - }; - - return hljs; -})); - -define('highlight/lib/languages/1c',['require','exports','module'],function (require, exports, module) {module.exports = function(hljs){ - var IDENT_RE_RU = '[a-zA-Zа-яА-Я][a-zA-Z0-9_а-яА-Я]*'; - var OneS_KEYWORDS = 'возврат дата для если и или иначе иначеесли исключение конецесли ' + - 'конецпопытки конецпроцедуры конецфункции конеццикла константа не перейти перем ' + - 'перечисление по пока попытка прервать продолжить процедура строка тогда фс функция цикл ' + - 'число экспорт'; - var OneS_BUILT_IN = 'ansitooem oemtoansi ввестивидсубконто ввестидату ввестизначение ' + - 'ввестиперечисление ввестипериод ввестиплансчетов ввестистроку ввестичисло вопрос ' + - 'восстановитьзначение врег выбранныйплансчетов вызватьисключение датагод датамесяц ' + - 'датачисло добавитьмесяц завершитьработусистемы заголовоксистемы записьжурналарегистрации ' + - 'запуститьприложение зафиксироватьтранзакцию значениевстроку значениевстрокувнутр ' + - 'значениевфайл значениеизстроки значениеизстрокивнутр значениеизфайла имякомпьютера ' + - 'имяпользователя каталогвременныхфайлов каталогиб каталогпользователя каталогпрограммы ' + - 'кодсимв командасистемы конгода конецпериодаби конецрассчитанногопериодаби ' + - 'конецстандартногоинтервала конквартала конмесяца коннедели лев лог лог10 макс ' + - 'максимальноеколичествосубконто мин монопольныйрежим названиеинтерфейса названиенабораправ ' + - 'назначитьвид назначитьсчет найти найтипомеченныенаудаление найтиссылки началопериодаби ' + - 'началостандартногоинтервала начатьтранзакцию начгода начквартала начмесяца начнедели ' + - 'номерднягода номерднянедели номернеделигода нрег обработкаожидания окр описаниеошибки ' + - 'основнойжурналрасчетов основнойплансчетов основнойязык открытьформу открытьформумодально ' + - 'отменитьтранзакцию очиститьокносообщений периодстр полноеимяпользователя получитьвремята ' + - 'получитьдатута получитьдокументта получитьзначенияотбора получитьпозициюта ' + - 'получитьпустоезначение получитьта прав праводоступа предупреждение префиксавтонумерации ' + - 'пустаястрока пустоезначение рабочаядаттьпустоезначение рабочаядата разделительстраниц ' + - 'разделительстрок разм разобратьпозициюдокумента рассчитатьрегистрына ' + - 'рассчитатьрегистрыпо сигнал симв символтабуляции создатьобъект сокрл сокрлп сокрп ' + - 'сообщить состояние сохранитьзначение сред статусвозврата стрдлина стрзаменить ' + - 'стрколичествострок стрполучитьстроку стрчисловхождений сформироватьпозициюдокумента ' + - 'счетпокоду текущаядата текущеевремя типзначения типзначениястр удалитьобъекты ' + - 'установитьтана установитьтапо фиксшаблон формат цел шаблон'; - var DQUOTE = {begin: '""'}; - var STR_START = { - className: 'string', - begin: '"', end: '"|$', - contains: [DQUOTE] - }; - var STR_CONT = { - className: 'string', - begin: '\\|', end: '"|$', - contains: [DQUOTE] - }; - - return { - case_insensitive: true, - lexemes: IDENT_RE_RU, - keywords: {keyword: OneS_KEYWORDS, built_in: OneS_BUILT_IN}, - contains: [ - hljs.C_LINE_COMMENT_MODE, - hljs.NUMBER_MODE, - STR_START, STR_CONT, - { - className: 'function', - begin: '(процедура|функция)', end: '$', - lexemes: IDENT_RE_RU, - keywords: 'процедура функция', - contains: [ - { - begin: 'экспорт', endsWithParent: true, - lexemes: IDENT_RE_RU, - keywords: 'экспорт', - contains: [hljs.C_LINE_COMMENT_MODE] - }, - { - className: 'params', - begin: '\\(', end: '\\)', - lexemes: IDENT_RE_RU, - keywords: 'знач', - contains: [STR_START, STR_CONT] - }, - hljs.C_LINE_COMMENT_MODE, - hljs.inherit(hljs.TITLE_MODE, {begin: IDENT_RE_RU}) - ] - }, - {className: 'meta', begin: '#', end: '$'}, - {className: 'number', begin: '\'\\d{2}\\.\\d{2}\\.(\\d{2}|\\d{4})\''} // date - ] - }; -}; -}); - -define('highlight/lib/languages/abnf',['require','exports','module'],function (require, exports, module) {module.exports = function(hljs) { - var regexes = { - ruleDeclaration: "^[a-zA-Z][a-zA-Z0-9-]*", - unexpectedChars: "[!@#$^&',?+~`|:]" - }; - - var keywords = [ - "ALPHA", - "BIT", - "CHAR", - "CR", - "CRLF", - "CTL", - "DIGIT", - "DQUOTE", - "HEXDIG", - "HTAB", - "LF", - "LWSP", - "OCTET", - "SP", - "VCHAR", - "WSP" - ]; - - var commentMode = hljs.COMMENT(";", "$"); - - var terminalBinaryMode = { - className: "symbol", - begin: /%b[0-1]+(-[0-1]+|(\.[0-1]+)+){0,1}/ - }; - - var terminalDecimalMode = { - className: "symbol", - begin: /%d[0-9]+(-[0-9]+|(\.[0-9]+)+){0,1}/ - }; - - var terminalHexadecimalMode = { - className: "symbol", - begin: /%x[0-9A-F]+(-[0-9A-F]+|(\.[0-9A-F]+)+){0,1}/, - }; - - var caseSensitivityIndicatorMode = { - className: "symbol", - begin: /%[si]/ - }; - - var ruleDeclarationMode = { - begin: regexes.ruleDeclaration + '\\s*=', - returnBegin: true, - end: /=/, - relevance: 0, - contains: [{className: "attribute", begin: regexes.ruleDeclaration}] - }; - - return { - illegal: regexes.unexpectedChars, - keywords: keywords.join(" "), - contains: [ - ruleDeclarationMode, - commentMode, - terminalBinaryMode, - terminalDecimalMode, - terminalHexadecimalMode, - caseSensitivityIndicatorMode, - hljs.QUOTE_STRING_MODE, - hljs.NUMBER_MODE - ] - }; -}; -}); - -define('highlight/lib/languages/accesslog',['require','exports','module'],function (require, exports, module) {module.exports = function(hljs) { - return { - contains: [ - // IP - { - className: 'number', - begin: '\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b' - }, - // Other numbers - { - className: 'number', - begin: '\\b\\d+\\b', - relevance: 0 - }, - // Requests - { - className: 'string', - begin: '"(GET|POST|HEAD|PUT|DELETE|CONNECT|OPTIONS|PATCH|TRACE)', end: '"', - keywords: 'GET POST HEAD PUT DELETE CONNECT OPTIONS PATCH TRACE', - illegal: '\\n', - relevance: 10 - }, - // Dates - { - className: 'string', - begin: /\[/, end: /\]/, - illegal: '\\n' - }, - // Strings - { - className: 'string', - begin: '"', end: '"', - illegal: '\\n' - } - ] - }; -}; -}); - -define('highlight/lib/languages/actionscript',['require','exports','module'],function (require, exports, module) {module.exports = function(hljs) { - var IDENT_RE = '[a-zA-Z_$][a-zA-Z0-9_$]*'; - var IDENT_FUNC_RETURN_TYPE_RE = '([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)'; - - var AS3_REST_ARG_MODE = { - className: 'rest_arg', - begin: '[.]{3}', end: IDENT_RE, - relevance: 10 - }; - - return { - aliases: ['as'], - keywords: { - keyword: 'as break case catch class const continue default delete do dynamic each ' + - 'else extends final finally for function get if implements import in include ' + - 'instanceof interface internal is namespace native new override package private ' + - 'protected public return set static super switch this throw try typeof use var void ' + - 'while with', - literal: 'true false null undefined' - }, - contains: [ - hljs.APOS_STRING_MODE, - hljs.QUOTE_STRING_MODE, - hljs.C_LINE_COMMENT_MODE, - hljs.C_BLOCK_COMMENT_MODE, - hljs.C_NUMBER_MODE, - { - className: 'class', - beginKeywords: 'package', end: '{', - contains: [hljs.TITLE_MODE] - }, - { - className: 'class', - beginKeywords: 'class interface', end: '{', excludeEnd: true, - contains: [ - { - beginKeywords: 'extends implements' - }, - hljs.TITLE_MODE - ] - }, - { - className: 'meta', - beginKeywords: 'import include', end: ';', - keywords: {'meta-keyword': 'import include'} - }, - { - className: 'function', - beginKeywords: 'function', end: '[{;]', excludeEnd: true, - illegal: '\\S', - contains: [ - hljs.TITLE_MODE, - { - className: 'params', - begin: '\\(', end: '\\)', - contains: [ - hljs.APOS_STRING_MODE, - hljs.QUOTE_STRING_MODE, - hljs.C_LINE_COMMENT_MODE, - hljs.C_BLOCK_COMMENT_MODE, - AS3_REST_ARG_MODE - ] - }, - { - begin: ':\\s*' + IDENT_FUNC_RETURN_TYPE_RE - } - ] - }, - hljs.METHOD_GUARD - ], - illegal: /#/ - }; -}; -}); - -define('highlight/lib/languages/ada',['require','exports','module'],function (require, exports, module) {module.exports = // We try to support full Ada2012 -// -// We highlight all appearances of types, keywords, literals (string, char, number, bool) -// and titles (user defined function/procedure/package) -// CSS classes are set accordingly -// -// Languages causing problems for language detection: -// xml (broken by Foo : Bar type), elm (broken by Foo : Bar type), vbscript-html (broken by body keyword) -// sql (ada default.txt has a lot of sql keywords) - -function(hljs) { - // Regular expression for Ada numeric literals. - // stolen form the VHDL highlighter - - // Decimal literal: - var INTEGER_RE = '\\d(_|\\d)*'; - var EXPONENT_RE = '[eE][-+]?' + INTEGER_RE; - var DECIMAL_LITERAL_RE = INTEGER_RE + '(\\.' + INTEGER_RE + ')?' + '(' + EXPONENT_RE + ')?'; - - // Based literal: - var BASED_INTEGER_RE = '\\w+'; - var BASED_LITERAL_RE = INTEGER_RE + '#' + BASED_INTEGER_RE + '(\\.' + BASED_INTEGER_RE + ')?' + '#' + '(' + EXPONENT_RE + ')?'; - - var NUMBER_RE = '\\b(' + BASED_LITERAL_RE + '|' + DECIMAL_LITERAL_RE + ')'; - - // Identifier regex - var ID_REGEX = '[A-Za-z](_?[A-Za-z0-9.])*'; - - // bad chars, only allowed in literals - var BAD_CHARS = '[]{}%#\'\"' - - // Ada doesn't have block comments, only line comments - var COMMENTS = hljs.COMMENT('--', '$'); - - // variable declarations of the form - // Foo : Bar := Baz; - // where only Bar will be highlighted - var VAR_DECLS = { - // TODO: These spaces are not required by the Ada syntax - // however, I have yet to see handwritten Ada code where - // someone does not put spaces around : - begin: '\\s+:\\s+', end: '\\s*(:=|;|\\)|=>|$)', - // endsWithParent: true, - // returnBegin: true, - illegal: BAD_CHARS, - contains: [ - { - // workaround to avoid highlighting - // named loops and declare blocks - beginKeywords: 'loop for declare others', - endsParent: true, - }, - { - // properly highlight all modifiers - className: 'keyword', - beginKeywords: 'not null constant access function procedure in out aliased exception' - }, - { - className: 'type', - begin: ID_REGEX, - endsParent: true, - relevance: 0, - } - ] - }; - - return { - case_insensitive: true, - keywords: { - keyword: - 'abort else new return abs elsif not reverse abstract end ' + - 'accept entry select access exception of separate aliased exit or some ' + - 'all others subtype and for out synchronized array function overriding ' + - 'at tagged generic package task begin goto pragma terminate ' + - 'body private then if procedure type case in protected constant interface ' + - 'is raise use declare range delay limited record when delta loop rem while ' + - 'digits renames with do mod requeue xor', - literal: - 'True False', - }, - contains: [ - COMMENTS, - // strings "foobar" - { - className: 'string', - begin: /"/, end: /"/, - contains: [{begin: /""/, relevance: 0}] - }, - // characters '' - { - // character literals always contain one char - className: 'string', - begin: /'.'/ - }, - { - // number literals - className: 'number', - begin: NUMBER_RE, - relevance: 0 - }, - { - // Attributes - className: 'symbol', - begin: "'" + ID_REGEX, - }, - { - // package definition, maybe inside generic - className: 'title', - begin: '(\\bwith\\s+)?(\\bprivate\\s+)?\\bpackage\\s+(\\bbody\\s+)?', end: '(is|$)', - keywords: 'package body', - excludeBegin: true, - excludeEnd: true, - illegal: BAD_CHARS - }, - { - // function/procedure declaration/definition - // maybe inside generic - begin: '(\\b(with|overriding)\\s+)?\\b(function|procedure)\\s+', end: '(\\bis|\\bwith|\\brenames|\\)\\s*;)', - keywords: 'overriding function procedure with is renames return', - // we need to re-match the 'function' keyword, so that - // the title mode below matches only exactly once - returnBegin: true, - contains: - [ - COMMENTS, - { - // name of the function/procedure - className: 'title', - begin: '(\\bwith\\s+)?\\b(function|procedure)\\s+', - end: '(\\(|\\s+|$)', - excludeBegin: true, - excludeEnd: true, - illegal: BAD_CHARS - }, - // 'self' - // // parameter types - VAR_DECLS, - { - // return type - className: 'type', - begin: '\\breturn\\s+', end: '(\\s+|;|$)', - keywords: 'return', - excludeBegin: true, - excludeEnd: true, - // we are done with functions - endsParent: true, - illegal: BAD_CHARS - - }, - ] - }, - { - // new type declarations - // maybe inside generic - className: 'type', - begin: '\\b(sub)?type\\s+', end: '\\s+', - keywords: 'type', - excludeBegin: true, - illegal: BAD_CHARS - }, - - // see comment above the definition - VAR_DECLS, - - // no markup - // relevance boosters for small snippets - // {begin: '\\s*=>\\s*'}, - // {begin: '\\s*:=\\s*'}, - // {begin: '\\s+:=\\s+'}, - ] - }; -}; -}); - -define('highlight/lib/languages/apache',['require','exports','module'],function (require, exports, module) {module.exports = function(hljs) { - var NUMBER = {className: 'number', begin: '[\\$%]\\d+'}; - return { - aliases: ['apacheconf'], - case_insensitive: true, - contains: [ - hljs.HASH_COMMENT_MODE, - {className: 'section', begin: ''}, - { - className: 'attribute', - begin: /\w+/, - relevance: 0, - // keywords aren’t needed for highlighting per se, they only boost relevance - // for a very generally defined mode (starts with a word, ends with line-end - keywords: { - nomarkup: - 'order deny allow setenv rewriterule rewriteengine rewritecond documentroot ' + - 'sethandler errordocument loadmodule options header listen serverroot ' + - 'servername' - }, - starts: { - end: /$/, - relevance: 0, - keywords: { - literal: 'on off all' - }, - contains: [ - { - className: 'meta', - begin: '\\s\\[', end: '\\]$' - }, - { - className: 'variable', - begin: '[\\$%]\\{', end: '\\}', - contains: ['self', NUMBER] - }, - NUMBER, - hljs.QUOTE_STRING_MODE - ] - } - } - ], - illegal: /\S/ - }; -}; -}); - -define('highlight/lib/languages/applescript',['require','exports','module'],function (require, exports, module) {module.exports = function(hljs) { - var STRING = hljs.inherit(hljs.QUOTE_STRING_MODE, {illegal: ''}); - var PARAMS = { - className: 'params', - begin: '\\(', end: '\\)', - contains: ['self', hljs.C_NUMBER_MODE, STRING] - }; - var COMMENT_MODE_1 = hljs.COMMENT('--', '$'); - var COMMENT_MODE_2 = hljs.COMMENT( - '\\(\\*', - '\\*\\)', - { - contains: ['self', COMMENT_MODE_1] //allow nesting - } - ); - var COMMENTS = [ - COMMENT_MODE_1, - COMMENT_MODE_2, - hljs.HASH_COMMENT_MODE - ]; - - return { - aliases: ['osascript'], - keywords: { - keyword: - 'about above after against and around as at back before beginning ' + - 'behind below beneath beside between but by considering ' + - 'contain contains continue copy div does eighth else end equal ' + - 'equals error every exit fifth first for fourth from front ' + - 'get given global if ignoring in into is it its last local me ' + - 'middle mod my ninth not of on onto or over prop property put ref ' + - 'reference repeat returning script second set seventh since ' + - 'sixth some tell tenth that the|0 then third through thru ' + - 'timeout times to transaction try until where while whose with ' + - 'without', - literal: - 'AppleScript false linefeed return pi quote result space tab true', - built_in: - 'alias application boolean class constant date file integer list ' + - 'number real record string text ' + - 'activate beep count delay launch log offset read round ' + - 'run say summarize write ' + - 'character characters contents day frontmost id item length ' + - 'month name paragraph paragraphs rest reverse running time version ' + - 'weekday word words year' - }, - contains: [ - STRING, - hljs.C_NUMBER_MODE, - { - className: 'built_in', - begin: - '\\b(clipboard info|the clipboard|info for|list (disks|folder)|' + - 'mount volume|path to|(close|open for) access|(get|set) eof|' + - 'current date|do shell script|get volume settings|random number|' + - 'set volume|system attribute|system info|time to GMT|' + - '(load|run|store) script|scripting components|' + - 'ASCII (character|number)|localized string|' + - 'choose (application|color|file|file name|' + - 'folder|from list|remote application|URL)|' + - 'display (alert|dialog))\\b|^\\s*return\\b' - }, - { - className: 'literal', - begin: - '\\b(text item delimiters|current application|missing value)\\b' - }, - { - className: 'keyword', - begin: - '\\b(apart from|aside from|instead of|out of|greater than|' + - "isn't|(doesn't|does not) (equal|come before|come after|contain)|" + - '(greater|less) than( or equal)?|(starts?|ends|begins?) with|' + - 'contained by|comes (before|after)|a (ref|reference)|POSIX file|' + - 'POSIX path|(date|time) string|quoted form)\\b' - }, - { - beginKeywords: 'on', - illegal: '[${=;\\n]', - contains: [hljs.UNDERSCORE_TITLE_MODE, PARAMS] - } - ].concat(COMMENTS), - illegal: '//|->|=>|\\[\\[' - }; -}; -}); - -define('highlight/lib/languages/cpp',['require','exports','module'],function (require, exports, module) {module.exports = function(hljs) { - var CPP_PRIMITIVE_TYPES = { - className: 'keyword', - begin: '\\b[a-z\\d_]*_t\\b' - }; - - var STRINGS = { - className: 'string', - variants: [ - { - begin: '(u8?|U)?L?"', end: '"', - illegal: '\\n', - contains: [hljs.BACKSLASH_ESCAPE] - }, - { - begin: '(u8?|U)?R"', end: '"', - contains: [hljs.BACKSLASH_ESCAPE] - }, - { - begin: '\'\\\\?.', end: '\'', - illegal: '.' - } - ] - }; - - var NUMBERS = { - className: 'number', - variants: [ - { begin: '\\b(0b[01\']+)' }, - { begin: '\\b([\\d\']+(\\.[\\d\']*)?|\\.[\\d\']+)(u|U|l|L|ul|UL|f|F|b|B)' }, - { begin: '(-?)(\\b0[xX][a-fA-F0-9\']+|(\\b[\\d\']+(\\.[\\d\']*)?|\\.[\\d\']+)([eE][-+]?[\\d\']+)?)' } - ], - relevance: 0 - }; - - var PREPROCESSOR = { - className: 'meta', - begin: /#\s*[a-z]+\b/, end: /$/, - keywords: { - 'meta-keyword': - 'if else elif endif define undef warning error line ' + - 'pragma ifdef ifndef include' - }, - contains: [ - { - begin: /\\\n/, relevance: 0 - }, - hljs.inherit(STRINGS, {className: 'meta-string'}), - { - className: 'meta-string', - begin: '<', end: '>', - illegal: '\\n', - }, - hljs.C_LINE_COMMENT_MODE, - hljs.C_BLOCK_COMMENT_MODE - ] - }; - - var FUNCTION_TITLE = hljs.IDENT_RE + '\\s*\\('; - - var CPP_KEYWORDS = { - keyword: 'int float while private char catch import module export virtual operator sizeof ' + - 'dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace ' + - 'unsigned long volatile static protected bool template mutable if public friend ' + - 'do goto auto void enum else break extern using class asm case typeid ' + - 'short reinterpret_cast|10 default double register explicit signed typename try this ' + - 'switch continue inline delete alignof constexpr decltype ' + - 'noexcept static_assert thread_local restrict _Bool complex _Complex _Imaginary ' + - 'atomic_bool atomic_char atomic_schar ' + - 'atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong ' + - 'atomic_ullong new throw return', - built_in: 'std string cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream ' + - 'auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set ' + - 'unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos ' + - 'asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp ' + - 'fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper ' + - 'isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow ' + - 'printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp ' + - 'strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan ' + - 'vfprintf vprintf vsprintf endl initializer_list unique_ptr', - literal: 'true false nullptr NULL' - }; - - var EXPRESSION_CONTAINS = [ - CPP_PRIMITIVE_TYPES, - hljs.C_LINE_COMMENT_MODE, - hljs.C_BLOCK_COMMENT_MODE, - NUMBERS, - STRINGS - ]; - - return { - aliases: ['c', 'cc', 'h', 'c++', 'h++', 'hpp'], - keywords: CPP_KEYWORDS, - illegal: '', - keywords: CPP_KEYWORDS, - contains: ['self', CPP_PRIMITIVE_TYPES] - }, - { - begin: hljs.IDENT_RE + '::', - keywords: CPP_KEYWORDS - }, - { - // This mode covers expression context where we can't expect a function - // definition and shouldn't highlight anything that looks like one: - // `return some()`, `else if()`, `(x*sum(1, 2))` - variants: [ - {begin: /=/, end: /;/}, - {begin: /\(/, end: /\)/}, - {beginKeywords: 'new throw return else', end: /;/} - ], - keywords: CPP_KEYWORDS, - contains: EXPRESSION_CONTAINS.concat([ - { - begin: /\(/, end: /\)/, - keywords: CPP_KEYWORDS, - contains: EXPRESSION_CONTAINS.concat(['self']), - relevance: 0 - } - ]), - relevance: 0 - }, - { - className: 'function', - begin: '(' + hljs.IDENT_RE + '[\\*&\\s]+)+' + FUNCTION_TITLE, - returnBegin: true, end: /[{;=]/, - excludeEnd: true, - keywords: CPP_KEYWORDS, - illegal: /[^\w\s\*&]/, - contains: [ - { - begin: FUNCTION_TITLE, returnBegin: true, - contains: [hljs.TITLE_MODE], - relevance: 0 - }, - { - className: 'params', - begin: /\(/, end: /\)/, - keywords: CPP_KEYWORDS, - relevance: 0, - contains: [ - hljs.C_LINE_COMMENT_MODE, - hljs.C_BLOCK_COMMENT_MODE, - STRINGS, - NUMBERS, - CPP_PRIMITIVE_TYPES - ] - }, - hljs.C_LINE_COMMENT_MODE, - hljs.C_BLOCK_COMMENT_MODE, - PREPROCESSOR - ] - } - ]), - exports: { - preprocessor: PREPROCESSOR, - strings: STRINGS, - keywords: CPP_KEYWORDS - } - }; -}; -}); - -define('highlight/lib/languages/arduino',['require','exports','module'],function (require, exports, module) {module.exports = function(hljs) { - var CPP = hljs.getLanguage('cpp').exports; - return { - keywords: { - keyword: - 'boolean byte word string String array ' + CPP.keywords.keyword, - built_in: - 'setup loop while catch for if do goto try switch case else ' + - 'default break continue return ' + - 'KeyboardController MouseController SoftwareSerial ' + - 'EthernetServer EthernetClient LiquidCrystal ' + - 'RobotControl GSMVoiceCall EthernetUDP EsploraTFT ' + - 'HttpClient RobotMotor WiFiClient GSMScanner ' + - 'FileSystem Scheduler GSMServer YunClient YunServer ' + - 'IPAddress GSMClient GSMModem Keyboard Ethernet ' + - 'Console GSMBand Esplora Stepper Process ' + - 'WiFiUDP GSM_SMS Mailbox USBHost Firmata PImage ' + - 'Client Server GSMPIN FileIO Bridge Serial ' + - 'EEPROM Stream Mouse Audio Servo File Task ' + - 'GPRS WiFi Wire TFT GSM SPI SD ' + - 'runShellCommandAsynchronously analogWriteResolution ' + - 'retrieveCallingNumber printFirmwareVersion ' + - 'analogReadResolution sendDigitalPortPair ' + - 'noListenOnLocalhost readJoystickButton setFirmwareVersion ' + - 'readJoystickSwitch scrollDisplayRight getVoiceCallStatus ' + - 'scrollDisplayLeft writeMicroseconds delayMicroseconds ' + - 'beginTransmission getSignalStrength runAsynchronously ' + - 'getAsynchronously listenOnLocalhost getCurrentCarrier ' + - 'readAccelerometer messageAvailable sendDigitalPorts ' + - 'lineFollowConfig countryNameWrite runShellCommand ' + - 'readStringUntil rewindDirectory readTemperature ' + - 'setClockDivider readLightSensor endTransmission ' + - 'analogReference detachInterrupt countryNameRead ' + - 'attachInterrupt encryptionType readBytesUntil ' + - 'robotNameWrite readMicrophone robotNameRead cityNameWrite ' + - 'userNameWrite readJoystickY readJoystickX mouseReleased ' + - 'openNextFile scanNetworks noInterrupts digitalWrite ' + - 'beginSpeaker mousePressed isActionDone mouseDragged ' + - 'displayLogos noAutoscroll addParameter remoteNumber ' + - 'getModifiers keyboardRead userNameRead waitContinue ' + - 'processInput parseCommand printVersion readNetworks ' + - 'writeMessage blinkVersion cityNameRead readMessage ' + - 'setDataMode parsePacket isListening setBitOrder ' + - 'beginPacket isDirectory motorsWrite drawCompass ' + - 'digitalRead clearScreen serialEvent rightToLeft ' + - 'setTextSize leftToRight requestFrom keyReleased ' + - 'compassRead analogWrite interrupts WiFiServer ' + - 'disconnect playMelody parseFloat autoscroll ' + - 'getPINUsed setPINUsed setTimeout sendAnalog ' + - 'readSlider analogRead beginWrite createChar ' + - 'motorsStop keyPressed tempoWrite readButton ' + - 'subnetMask debugPrint macAddress writeGreen ' + - 'randomSeed attachGPRS readString sendString ' + - 'remotePort releaseAll mouseMoved background ' + - 'getXChange getYChange answerCall getResult ' + - 'voiceCall endPacket constrain getSocket writeJSON ' + - 'getButton available connected findUntil readBytes ' + - 'exitValue readGreen writeBlue startLoop IPAddress ' + - 'isPressed sendSysex pauseMode gatewayIP setCursor ' + - 'getOemKey tuneWrite noDisplay loadImage switchPIN ' + - 'onRequest onReceive changePIN playFile noBuffer ' + - 'parseInt overflow checkPIN knobRead beginTFT ' + - 'bitClear updateIR bitWrite position writeRGB ' + - 'highByte writeRed setSpeed readBlue noStroke ' + - 'remoteIP transfer shutdown hangCall beginSMS ' + - 'endWrite attached maintain noCursor checkReg ' + - 'checkPUK shiftOut isValid shiftIn pulseIn ' + - 'connect println localIP pinMode getIMEI ' + - 'display noBlink process getBand running beginSD ' + - 'drawBMP lowByte setBand release bitRead prepare ' + - 'pointTo readRed setMode noFill remove listen ' + - 'stroke detach attach noTone exists buffer ' + - 'height bitSet circle config cursor random ' + - 'IRread setDNS endSMS getKey micros ' + - 'millis begin print write ready flush width ' + - 'isPIN blink clear press mkdir rmdir close ' + - 'point yield image BSSID click delay ' + - 'read text move peek beep rect line open ' + - 'seek fill size turn stop home find ' + - 'step tone sqrt RSSI SSID ' + - 'end bit tan cos sin pow map abs max ' + - 'min get run put', - literal: - 'DIGITAL_MESSAGE FIRMATA_STRING ANALOG_MESSAGE ' + - 'REPORT_DIGITAL REPORT_ANALOG INPUT_PULLUP ' + - 'SET_PIN_MODE INTERNAL2V56 SYSTEM_RESET LED_BUILTIN ' + - 'INTERNAL1V1 SYSEX_START INTERNAL EXTERNAL ' + - 'DEFAULT OUTPUT INPUT HIGH LOW' - }, - contains: [ - CPP.preprocessor, - hljs.C_LINE_COMMENT_MODE, - hljs.C_BLOCK_COMMENT_MODE, - hljs.APOS_STRING_MODE, - hljs.QUOTE_STRING_MODE, - hljs.C_NUMBER_MODE - ] - }; -}; -}); - -define('highlight/lib/languages/armasm',['require','exports','module'],function (require, exports, module) {module.exports = function(hljs) { - //local labels: %?[FB]?[AT]?\d{1,2}\w+ - return { - case_insensitive: true, - aliases: ['arm'], - lexemes: '\\.?' + hljs.IDENT_RE, - keywords: { - meta: - //GNU preprocs - '.2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .arm .thumb .code16 .code32 .force_thumb .thumb_func .ltorg '+ - //ARM directives - 'ALIAS ALIGN ARM AREA ASSERT ATTR CN CODE CODE16 CODE32 COMMON CP DATA DCB DCD DCDU DCDO DCFD DCFDU DCI DCQ DCQU DCW DCWU DN ELIF ELSE END ENDFUNC ENDIF ENDP ENTRY EQU EXPORT EXPORTAS EXTERN FIELD FILL FUNCTION GBLA GBLL GBLS GET GLOBAL IF IMPORT INCBIN INCLUDE INFO KEEP LCLA LCLL LCLS LTORG MACRO MAP MEND MEXIT NOFP OPT PRESERVE8 PROC QN READONLY RELOC REQUIRE REQUIRE8 RLIST FN ROUT SETA SETL SETS SN SPACE SUBT THUMB THUMBX TTL WHILE WEND ', - built_in: - 'r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 '+ //standard registers - 'pc lr sp ip sl sb fp '+ //typical regs plus backward compatibility - 'a1 a2 a3 a4 v1 v2 v3 v4 v5 v6 v7 v8 f0 f1 f2 f3 f4 f5 f6 f7 '+ //more regs and fp - 'p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 '+ //coprocessor regs - 'c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 '+ //more coproc - 'q0 q1 q2 q3 q4 q5 q6 q7 q8 q9 q10 q11 q12 q13 q14 q15 '+ //advanced SIMD NEON regs - - //program status registers - 'cpsr_c cpsr_x cpsr_s cpsr_f cpsr_cx cpsr_cxs cpsr_xs cpsr_xsf cpsr_sf cpsr_cxsf '+ - 'spsr_c spsr_x spsr_s spsr_f spsr_cx spsr_cxs spsr_xs spsr_xsf spsr_sf spsr_cxsf '+ - - //NEON and VFP registers - 's0 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 '+ - 's16 s17 s18 s19 s20 s21 s22 s23 s24 s25 s26 s27 s28 s29 s30 s31 '+ - 'd0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 '+ - 'd16 d17 d18 d19 d20 d21 d22 d23 d24 d25 d26 d27 d28 d29 d30 d31 ' + - - '{PC} {VAR} {TRUE} {FALSE} {OPT} {CONFIG} {ENDIAN} {CODESIZE} {CPU} {FPU} {ARCHITECTURE} {PCSTOREOFFSET} {ARMASM_VERSION} {INTER} {ROPI} {RWPI} {SWST} {NOSWST} . @' - }, - contains: [ - { - className: 'keyword', - begin: '\\b('+ //mnemonics - 'adc|'+ - '(qd?|sh?|u[qh]?)?add(8|16)?|usada?8|(q|sh?|u[qh]?)?(as|sa)x|'+ - 'and|adrl?|sbc|rs[bc]|asr|b[lx]?|blx|bxj|cbn?z|tb[bh]|bic|'+ - 'bfc|bfi|[su]bfx|bkpt|cdp2?|clz|clrex|cmp|cmn|cpsi[ed]|cps|'+ - 'setend|dbg|dmb|dsb|eor|isb|it[te]{0,3}|lsl|lsr|ror|rrx|'+ - 'ldm(([id][ab])|f[ds])?|ldr((s|ex)?[bhd])?|movt?|mvn|mra|mar|'+ - 'mul|[us]mull|smul[bwt][bt]|smu[as]d|smmul|smmla|'+ - 'mla|umlaal|smlal?([wbt][bt]|d)|mls|smlsl?[ds]|smc|svc|sev|'+ - 'mia([bt]{2}|ph)?|mrr?c2?|mcrr2?|mrs|msr|orr|orn|pkh(tb|bt)|rbit|'+ - 'rev(16|sh)?|sel|[su]sat(16)?|nop|pop|push|rfe([id][ab])?|'+ - 'stm([id][ab])?|str(ex)?[bhd]?|(qd?)?sub|(sh?|q|u[qh]?)?sub(8|16)|'+ - '[su]xt(a?h|a?b(16)?)|srs([id][ab])?|swpb?|swi|smi|tst|teq|'+ - 'wfe|wfi|yield'+ - ')'+ - '(eq|ne|cs|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al|hs|lo)?'+ //condition codes - '[sptrx]?' , //legal postfixes - end: '\\s' - }, - hljs.COMMENT('[;@]', '$', {relevance: 0}), - hljs.C_BLOCK_COMMENT_MODE, - hljs.QUOTE_STRING_MODE, - { - className: 'string', - begin: '\'', - end: '[^\\\\]\'', - relevance: 0 - }, - { - className: 'title', - begin: '\\|', end: '\\|', - illegal: '\\n', - relevance: 0 - }, - { - className: 'number', - variants: [ - {begin: '[#$=]?0x[0-9a-f]+'}, //hex - {begin: '[#$=]?0b[01]+'}, //bin - {begin: '[#$=]\\d+'}, //literal - {begin: '\\b\\d+'} //bare number - ], - relevance: 0 - }, - { - className: 'symbol', - variants: [ - {begin: '^[a-z_\\.\\$][a-z0-9_\\.\\$]+'}, //ARM syntax - {begin: '^\\s*[a-z_\\.\\$][a-z0-9_\\.\\$]+:'}, //GNU ARM syntax - {begin: '[=#]\\w+' } //label reference - ], - relevance: 0 - } - ] - }; -}; -}); - -define('highlight/lib/languages/xml',['require','exports','module'],function (require, exports, module) {module.exports = function(hljs) { - var XML_IDENT_RE = '[A-Za-z0-9\\._:-]+'; - var TAG_INTERNALS = { - endsWithParent: true, - illegal: /`]+/} - ] - } - ] - } - ] - }; - return { - aliases: ['html', 'xhtml', 'rss', 'atom', 'xjb', 'xsd', 'xsl', 'plist'], - case_insensitive: true, - contains: [ - { - className: 'meta', - begin: '', - relevance: 10, - contains: [{begin: '\\[', end: '\\]'}] - }, - hljs.COMMENT( - '', - { - relevance: 10 - } - ), - { - begin: '<\\!\\[CDATA\\[', end: '\\]\\]>', - relevance: 10 - }, - { - begin: /<\?(php)?/, end: /\?>/, - subLanguage: 'php', - contains: [{begin: '/\\*', end: '\\*/', skip: true}] - }, - { - className: 'tag', - /* - The lookahead pattern (?=...) ensures that 'begin' only matches - '|$)', end: '>', - keywords: {name: 'style'}, - contains: [TAG_INTERNALS], - starts: { - end: '', returnEnd: true, - subLanguage: ['css', 'xml'] - } - }, - { - className: 'tag', - // See the comment in the ' + marked(this.preParse(content))).wrap('
    ').parent().html();\r\n }\r\n\r\n /**\r\n * 文本比较\r\n * @param {[type]} oldS [description]\r\n * @param {[type]} newS [description]\r\n * @return {[type]} [description]\r\n */\r\n diffS(oldS, newS, way) {\r\n var ways = ['diffChars', 'diffWords', 'diffWordsWithSpace', 'diffLines'];\r\n if (!ways.includes(way)) {\r\n way = 'diffWords';\r\n }\r\n var delStyle = 'style=\"background-color: #e6cf56; text-decoration: line-through;\"';\r\n var insStyle = 'style=\"background-color: #98e287; text-decoration: none;\"';\r\n var diff = JsDiff[way](oldS, newS);\r\n var nodeArr = [];\r\n for (var i = 0; i < diff.length; i++) {\r\n\r\n if (diff[i].added && diff[i + 1] && diff[i + 1].removed) {\r\n var swap = diff[i];\r\n diff[i] = diff[i + 1];\r\n diff[i + 1] = swap;\r\n }\r\n\r\n var node;\r\n if (diff[i].removed) {\r\n node = `${diff[i].value}`;\r\n } else if (diff[i].added) {\r\n node = `${diff[i].value}`;\r\n } else {\r\n node = `${diff[i].value}`;\r\n }\r\n nodeArr.push(node);\r\n }\r\n\r\n return `
    ${nodeArr.join('')}
    `;\r\n }\r\n\r\n /**\r\n * 解析wiki目录\r\n * @param {[type]} $e [description]\r\n * @return {[type]} [description]\r\n */\r\n catalog($e) {\r\n var $headers = $(\":header\", $e);\r\n\r\n if ($headers && $headers.size() == 0) {\r\n return false;\r\n }\r\n\r\n var pre = null;\r\n\r\n var link = {\r\n pre: null,\r\n arr: []\r\n };\r\n var current = link;\r\n $headers.each(function(index, h) {\r\n var name = h.nodeName;\r\n if (!pre) {\r\n current.arr.push(h);\r\n pre = name;\r\n } else {\r\n if (pre < name) {\r\n var last = current;\r\n current = {\r\n pre: last,\r\n arr: [h]\r\n };\r\n last.arr.push(current);\r\n pre = name;\r\n } else if (pre == name) {\r\n current.arr.push(h);\r\n } else {\r\n current = current.pre ? current.pre : current;\r\n current.arr.push(h);\r\n pre = name;\r\n }\r\n }\r\n });\r\n\r\n return link;\r\n }\r\n\r\n generateDir(link, uid) {\r\n var $list = $('
    ');\r\n this.prodDir($list, link, uid);\r\n return $list;\r\n }\r\n\r\n dir($e, uid) {\r\n let cl = this.catalog($e);\r\n return cl ? this.generateDir(cl, uid) : '';\r\n }\r\n\r\n prodDir($list, link, uid) {\r\n $.each(link.arr, (index, item) => {\r\n if (item.hasOwnProperty('arr')) {\r\n var $l = $('
    ');\r\n $list.append($l);\r\n this.prodDir($l, item, uid);\r\n } else {\r\n var id = uid ? _.uniqueId(uid) : _.uniqueId('tms-wiki-dir-item-');\r\n var $item = $('
    ').text($(item).attr('id', id).text()).attr('data-id', id);\r\n $list.append($item);\r\n }\r\n });\r\n }\r\n\r\n isElementInViewport(el) {\r\n\r\n //special bonus for those using jQuery\r\n if (typeof jQuery === \"function\" && el instanceof jQuery) {\r\n el = el[0];\r\n }\r\n\r\n var rect = el.getBoundingClientRect();\r\n\r\n return (\r\n rect.top >= 0 &&\r\n rect.left >= 0 &&\r\n rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && /*or $(window).height() */\r\n rect.right <= (window.innerWidth || document.documentElement.clientWidth) /*or $(window).width() */\r\n );\r\n }\r\n\r\n /**\r\n * 获取光标位置函数\r\n * @param {[type]} ctrl [description]\r\n * @return {[type]} [description]\r\n */\r\n getCursortPosition(ctrl) {\r\n var CaretPos = 0; // IE Support\r\n if (document.selection) {\r\n ctrl.focus();\r\n var Sel = document.selection.createRange();\r\n Sel.moveStart('character', -ctrl.value.length);\r\n CaretPos = Sel.text.length;\r\n }\r\n // Firefox support\r\n else if (ctrl.selectionStart || ctrl.selectionStart == '0') {\r\n CaretPos = ctrl.selectionStart;\r\n }\r\n return (CaretPos);\r\n }\r\n\r\n /**\r\n * 设置光标位置函数\r\n * @param {[type]} ctrl [description]\r\n * @param {[type]} pos [description]\r\n */\r\n setCaretPosition(ctrl, pos) {\r\n if (ctrl.setSelectionRange) {\r\n ctrl.focus();\r\n ctrl.setSelectionRange(pos, pos);\r\n } else if (ctrl.createTextRange) {\r\n var range = ctrl.createTextRange();\r\n range.collapse(true);\r\n range.moveEnd('character', pos);\r\n range.moveStart('character', pos);\r\n range.select();\r\n }\r\n }\r\n\r\n /**\r\n * 是否为绝对url\r\n * @param {[type]} url [description]\r\n * @return {Boolean} [description]\r\n */\r\n isAbsUrl(url) {\r\n if (_.startsWith(url, 'http://')) {\r\n return true;\r\n } else if (_.startsWith(url, 'https://')) {\r\n return true;\r\n } else if (_.startsWith(url, '//')) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n escape(html, encode) {\r\n return html\r\n .replace(!encode ? /&(?!#?\\w+;)/g : /&/g, '&')\r\n .replace(//g, '>')\r\n .replace(/\"/g, '"')\r\n .replace(/'/g, ''');\r\n }\r\n\r\n unescape(html) {\r\n // explicitly match decimal, hex, and named HTML entities \r\n return html.replace(/&(#(?:\\d+)|(?:#x[0-9A-Fa-f]+)|(?:\\w+));?/g, function(_, n) {\r\n n = n.toLowerCase();\r\n if (n === 'colon') return ':';\r\n if (n.charAt(0) === '#') {\r\n return n.charAt(1) === 'x' ? String.fromCharCode(parseInt(n.substring(2), 16)) : String.fromCharCode(+n.substring(1));\r\n }\r\n return '';\r\n });\r\n }\r\n\r\n /**\r\n * 打开新的浏览器窗口,并跳转到指定页面\r\n * url:需要跳转的地址\r\n */\r\n openNewWin(url) {\r\n\r\n if (url) {\r\n let $a = $(``).appendTo('body').end();\r\n $(``).appendTo($a).end().click();\r\n\r\n _.delay(() => {\r\n $a.remove();\r\n }, 200);\r\n }\r\n\r\n }\r\n\r\n isAdminUser(user) {\r\n if (user && user.authorities) {\r\n return _.some(user.authorities, (item) => {\r\n return item.id.authority === 'ROLE_ADMIN';\r\n });\r\n }\r\n return false;\r\n }\r\n\r\n isSuperUser(user) {\r\n if (user && user.authorities) {\r\n return _.some(user.authorities, (item) => {\r\n return item.id.authority === 'ROLE_SUPER';\r\n });\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * 判断是否为全角字符\r\n * @param {[type]} str 待判断字符\r\n * @return {Boolean} true: 全角 false: 半角 \r\n */\r\n isSBCcase(str) {\r\n // [^\\x00-\\xff]全角字符\r\n return /[^\\x00-\\xff]/.test(str);\r\n }\r\n\r\n /**\r\n * 判断是否为汉字\r\n * @param {[type]} str 待判断字符\r\n * @return {Boolean} true: 汉字 false: 非汉字\r\n */\r\n isHanzi(str) {\r\n // [\\u4e00-\\u9fa5]汉字 \r\n return /[\\u4e00-\\u9fa5]/ig.test(str);\r\n }\r\n\r\n /**\r\n * 获取字符串byte长度\r\n * val: 要计算的字符串\r\n * return: 字符串byte长度\r\n */\r\n getByteLen(val) {\r\n var len = 0;\r\n for (var i = 0; i < val.length; i++) {\r\n if (this.isHanzi(val[i]) || this.isSBCcase(val[i])) {\r\n len += 2;\r\n } else {\r\n len += 1;\r\n }\r\n }\r\n return len;\r\n }\r\n\r\n /**\r\n * 制字符串的最大显示长度\r\n * value: 要处理的字符串\r\n * maxLen: 限制长度\r\n * return: 处理截取后的字符串\r\n */\r\n abbreviate(value, maxLen) {\r\n if (value && maxLen) {\r\n\r\n var len = 0;\r\n for (var i = 0; i < value.length; i++) {\r\n if (this.isHanzi(value[i]) || this.isSBCcase(value[i])) {\r\n len += 2;\r\n } else {\r\n len += 1;\r\n }\r\n\r\n if (len > maxLen) {\r\n return value.substr(0, i) + '...';\r\n }\r\n }\r\n }\r\n return value;\r\n }\r\n\r\n isMail(mail) {\r\n\r\n var emailRegex = /^([_a-z0-9-]+)(\\.[_a-z0-9-]+)*@([a-z0-9-]+)(\\.[a-z0-9-]+)*(\\.[a-z]{2,4})$/i;\r\n\r\n return emailRegex.test(mail);\r\n }\r\n\r\n // 浏览器OS判断正则表达式\r\n regExpOS = {\r\n ios: /(iPad|iPhone|iPod)/g,\r\n mobileChrome: /(CriOS)/g,\r\n mobile: /Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/g,\r\n cellphone: /iP(hone|od)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/g\r\n }\r\n\r\n // 是否为IE\r\n isIE() {\r\n var\r\n isIE11 = (!(window.ActiveXObject) && 'ActiveXObject' in window),\r\n isIE = ('ActiveXObject' in window);\r\n return (isIE11 || isIE);\r\n }\r\n\r\n // 是否为IE11\r\n isIE11() {\r\n return (!(window.ActiveXObject) && 'ActiveXObject' in window);\r\n }\r\n\r\n // 是否为IOS\r\n isIOS() {\r\n var\r\n userAgent = navigator.userAgent,\r\n isIOS = userAgent.match(this.regExpOS.ios),\r\n isMobileChrome = userAgent.match(this.regExpOS.mobileChrome);\r\n if (isIOS && !isMobileChrome) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n // 是否为cellphone\r\n isCellphone() {\r\n return !!navigator.userAgent.match(this.regExpOS.cellphone);\r\n }\r\n\r\n // 是否为Mobile\r\n isMobile() {\r\n return !!navigator.userAgent.match(this.regExpOS.mobile)\r\n }\r\n\r\n // 是否为Chrome\r\n isChrome() {\r\n return /chrome\\/([\\d.]+)/.test(navigator.userAgent.toLowerCase());\r\n }\r\n\r\n // 是否为Safari\r\n isSafari() {\r\n return /version\\/([\\d.]+)/.test(navigator.userAgent.toLowerCase());\r\n }\r\n\r\n // 是否为Firefox\r\n isFirefox() {\r\n return /firefox\\/([\\d.]+)/.test(navigator.userAgent.toLowerCase());\r\n }\r\n\r\n // 是否为Opera\r\n isOpera() {\r\n return /opera.([\\d.]+)/.test(navigator.userAgent.toLowerCase());\r\n }\r\n\r\n diffHtml(html) {\r\n\r\n var tags = ['html', 'head', 'meta', 'title', 'base', 'link', 'script', 'body', 'div', 'span'];\r\n\r\n var s = '';\r\n if (html) {\r\n s = html;\r\n _.each(tags, (tag) => {\r\n s = s.replace(new RegExp(`<(${tag})`, \"gi\"), `<$1`);\r\n });\r\n }\r\n\r\n return s;\r\n }\r\n\r\n encodeHtml(str) {\r\n var s = \"\";\r\n if (str.length == 0) return \"\";\r\n s = str.replace(/&/g, \">\");\r\n s = s.replace(//g, \">\");\r\n s = s.replace(/ /g, \" \");\r\n s = s.replace(/\\'/g, \"'\");\r\n s = s.replace(/\\\"/g, \""\");\r\n s = s.replace(/\\n/g, \"
    \");\r\n return s;\r\n }\r\n\r\n decodeHtml(str) {\r\n var s = \"\";\r\n if (str.length == 0) return \"\";\r\n s = str.replace(/>/g, \"&\");\r\n s = s.replace(/</g, \"<\");\r\n s = s.replace(/>/g, \">\");\r\n s = s.replace(/ /g, \" \");\r\n s = s.replace(/'/g, \"\\'\");\r\n s = s.replace(/"/g, \"\\\"\");\r\n s = s.replace(/
    /g, \"\\n\");\r\n return s;\r\n }\r\n}\r\n\r\nexport default new CommonUtils();\r\n","import { BindingSignaler } from 'aurelia-templating-resources';\r\nimport { EventAggregator } from 'aurelia-event-aggregator';\r\nimport 'isomorphic-fetch';\r\nimport { HttpClient, json } from 'aurelia-fetch-client';\r\nimport {\r\n default as toastr\r\n} from 'toastr';\r\nimport {\r\n default as wurl\r\n} from 'wurl';\r\nimport utils from 'common/common-utils';\r\nimport 'common/common-plugin'\r\nimport 'common/common-constant';\r\nimport 'common/common-ctx';\r\nimport 'common/common-imgs-loaded';\r\nimport {\r\n default as marked\r\n} from 'marked'; // https://github.com/chjj/marked\r\nimport {\r\n default as hljs\r\n} from 'highlight';\r\nimport {\r\n default as autosize\r\n} from 'autosize';\r\nimport {\r\n default as NProgress\r\n}\r\nfrom 'nprogress';\r\nimport {\r\n default as push\r\n} from 'push';\r\nimport {\r\n default as ColorHash\r\n} from 'color-hash';\r\nimport 'modaal';\r\n\r\nexport class Config {\r\n\r\n initHttp() {\r\n window.json = (param) => {\r\n console.log(JSON.stringify(param));\r\n return json(param);\r\n };\r\n window.http = this.aurelia.container.root.get(HttpClient);\r\n http.configure(config => {\r\n config\r\n // .withBaseUrl(nsParam.baseUrl)\r\n .withDefaults({\r\n credentials: 'same-origin',\r\n headers: {\r\n 'Accept': 'application/json',\r\n 'Content-Type': 'application/json',\r\n 'X-Requested-With': 'fetch'\r\n }\r\n })\r\n .withInterceptor({\r\n request(req) {\r\n NProgress && NProgress.start();\r\n return req;\r\n },\r\n requestError(req) {\r\n console.log(req);\r\n },\r\n response(resp) {\r\n NProgress && NProgress.done();\r\n if (!resp.ok) {\r\n resp.json().then((data) => {\r\n // toastr.error('PATH: ' + data.path + '
    STATUS: ' + data.status + '
    EXCEPTION:
    ' + data.exception + '
    MESSAGE:
    ' + data.message, data.error);\r\n toastr.error(data.message);\r\n });\r\n\r\n if (resp.status == 401) {\r\n toastr.error('用户未登录!');\r\n utils.redirect2Login();\r\n return;\r\n }\r\n }\r\n\r\n return resp;\r\n },\r\n responseError(resp) {\r\n toastr.error(resp.message, '网络请求错误!');\r\n console.log(resp);\r\n }\r\n });\r\n });\r\n\r\n return this;\r\n }\r\n\r\n initToastr() {\r\n\r\n // toastr弹出消息提示插件全局配置设置\r\n toastr.options.positionClass = 'toast-bottom-center';\r\n toastr.options.preventDuplicates = true;\r\n\r\n return this;\r\n }\r\n\r\n initMarked() {\r\n\r\n let renderer = new marked.Renderer();\r\n renderer.listitem = function(text) {\r\n if (/^\\s*\\[[x ]\\]\\s*/.test(text)) {\r\n text = text\r\n .replace(/^\\s*\\[ \\]\\s*/, ' ')\r\n .replace(/^\\s*\\[x\\]\\s*/, ' ');\r\n return '
  • ' + text + '
  • ';\r\n } else {\r\n return '
  • ' + text + '
  • ';\r\n }\r\n };\r\n renderer.link = function(href, title, text) {\r\n if (this.options.sanitize) {\r\n try {\r\n var prot = decodeURIComponent(unescape(href))\r\n .replace(/[^\\w:]/g, '')\r\n .toLowerCase();\r\n } catch (e) {\r\n return '';\r\n }\r\n if (prot.indexOf('javascript:') === 0 || prot.indexOf('vbscript:') === 0 || prot.indexOf('data:') === 0) {\r\n return '';\r\n }\r\n }\r\n let out;\r\n let isChatLink = /\\/chat\\/.+\\?id=.+/g.test(wurl('hash', href));\r\n let isCommentLink = /\\/blog\\/.+\\?cid=.+/g.test(wurl('hash', href));\r\n if (isChatLink || isCommentLink || (utils.isAbsUrl(href) && (wurl('hostname', href) != wurl('hostname')))) {\r\n out = '';\r\n return out;\r\n };\r\n\r\n renderer.codespan = function(text) {\r\n return `${text}`;\r\n };\r\n\r\n renderer.code = function(code, lang, escaped) {\r\n let codeBk = code;\r\n if (this.options.highlight) {\r\n var out = this.options.highlight(code, lang);\r\n if (out != null && out !== code) {\r\n escaped = true;\r\n code = out;\r\n }\r\n }\r\n\r\n if (!lang) {\r\n return `
    ${escaped ? code : utils.escape(code, true)}\\n
    `;\r\n }\r\n\r\n return `
    ${escaped ? code : utils.escape(code, true)}\\n
    \\n`;\r\n };\r\n\r\n // https://github.com/chjj/marked\r\n marked.setOptions({\r\n renderer: renderer,\r\n breaks: true,\r\n highlight: function(code) {\r\n return hljs.highlightAuto(code).value;\r\n }\r\n });\r\n\r\n return this;\r\n }\r\n\r\n initAjax() {\r\n // ajax全局配置选项设置\r\n $.ajaxSetup({\r\n // ajax请求不缓存\r\n cache: false,\r\n });\r\n\r\n let exceptUrls = [\r\n '/chat/channel/latest',\r\n '/chat/direct/latest',\r\n '/chat/channel/poll'\r\n ];\r\n\r\n $(document).ajaxSend(function(event, jqxhr, settings) {\r\n\r\n let isNotInExceptUrls = _.every(exceptUrls, (url) => {\r\n return (settings.url.lastIndexOf(url) == -1);\r\n });\r\n\r\n if (isNotInExceptUrls) {\r\n NProgress && NProgress.start();\r\n }\r\n });\r\n\r\n // $(document).on('ajaxStart', function() {\r\n // NProgress && NProgress.start();\r\n // });\r\n $(document).on('ajaxStop', function() {\r\n NProgress && NProgress.done();\r\n });\r\n // $(document).ajaxComplete(function(event, request, settings) {\r\n // console.log(request);\r\n // });\r\n $(document).ajaxError(function(event, xhr, settings) {\r\n if (xhr && xhr.status == 401) {\r\n utils.redirect2Login();\r\n }\r\n });\r\n\r\n return this;\r\n }\r\n\r\n initGlobalVar() {\r\n window.toastr = toastr;\r\n window.wurl = wurl;\r\n window.utils = utils;\r\n window.marked = marked;\r\n window.autosize = autosize;\r\n window.push = push;\r\n window.bs = this.aurelia.container.root.get(BindingSignaler);\r\n window.ea = this.aurelia.container.root.get(EventAggregator);\r\n window.colorHash = new ColorHash();\r\n return this;\r\n }\r\n\r\n initAnimateCss() {\r\n $.fn.extend({\r\n animateCss: function(animationName) {\r\n var animationEnd = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend';\r\n this.addClass('animated ' + animationName).one(animationEnd, function() {\r\n $(this).removeClass('animated ' + animationName);\r\n });\r\n }\r\n });\r\n return this;\r\n }\r\n\r\n initEmoji() {\r\n emojify && emojify.setConfig({\r\n img_dir: utils.getResourceBase() + '/img/emoji'\r\n });\r\n return this;\r\n }\r\n\r\n initModaal() {\r\n _.extend($.fn.modaal.options, {\r\n close_text: '关闭',\r\n close_aria_label: '按[esc]关闭',\r\n confirm_button_text: '确认',\r\n confirm_cancel_button_text: '取消',\r\n confirm_title: '操作确认',\r\n accessible_title: '对话框窗口',\r\n confirm_content: '

    默认确认对话框内容.

    ',\r\n });\r\n return this;\r\n }\r\n\r\n context(aurelia) {\r\n this.aurelia = aurelia;\r\n return this;\r\n }\r\n\r\n}\r\n\r\nexport default new Config();\r\n","/**\r\n * 程序初次加载启动,进行一些初始化操作:\r\n */\r\nimport 'jquery';\r\nimport 'jquery.scrollto'; // https://github.com/flesler/jquery.scrollTo\r\nimport 'timeago';\r\nimport 'lodash';\r\nimport 'hotkeys';\r\n\r\nimport config from './config';\r\n\r\nexport function configure(aurelia, params) {\r\n\r\n config.context(aurelia)\r\n .initGlobalVar()\r\n .initHttp()\r\n .initAjax()\r\n .initToastr()\r\n .initMarked()\r\n .initAnimateCss()\r\n .initEmoji()\r\n .initModaal();\r\n}\r\n","/* \r\n代码生成常用命令:\r\nau generate element\r\nau generate attribute\r\nau generate value-converter\r\nau generate binding-behavior\r\nau generate task\r\nau generate generator\r\n*/\r\n/* 加载全局资源 */\r\nexport function configure(aurelia) {\r\n\r\n aurelia.globalResources([\r\n 'resources/value-converters/vc-common',\r\n 'resources/binding-behaviors/bb-key',\r\n 'resources/attributes/attr-task',\r\n 'resources/attributes/attr-swipebox',\r\n 'resources/attributes/attr-pastable',\r\n 'resources/attributes/attr-autosize',\r\n 'resources/attributes/attr-dropzone',\r\n 'resources/attributes/attr-attr',\r\n 'resources/attributes/attr-c2c',\r\n 'resources/attributes/attr-dimmer',\r\n 'resources/attributes/attr-ui-dropdown',\r\n 'resources/attributes/attr-ui-dropdown-action',\r\n 'resources/attributes/attr-ui-dropdown-hover',\r\n 'resources/attributes/attr-ui-tab',\r\n 'resources/attributes/attr-ui-popup',\r\n 'resources/attributes/attr-ui-checkbox',\r\n 'resources/attributes/attr-tablesort',\r\n 'resources/attributes/attr-textcomplete',\r\n 'resources/attributes/attr-scrollbar',\r\n 'resources/attributes/attr-modaal',\r\n 'resources/elements/em-modal',\r\n 'resources/elements/em-dropdown',\r\n 'resources/elements/em-checkbox',\r\n 'resources/elements/em-confirm-modal',\r\n 'resources/elements/em-hotkeys-modal',\r\n 'resources/elements/em-chat-input',\r\n 'resources/elements/em-chat-top-menu',\r\n 'resources/elements/em-chat-sidebar-left',\r\n 'resources/elements/em-chat-content-item',\r\n 'resources/elements/em-chat-sidebar-right',\r\n 'resources/elements/em-chat-channel-create',\r\n 'resources/elements/em-chat-channel-join',\r\n 'resources/elements/em-chat-channel-edit',\r\n 'resources/elements/em-chat-channel-members-mgr',\r\n 'resources/elements/em-chat-channel-members-show',\r\n 'resources/elements/em-chat-channel-link-mgr',\r\n 'resources/elements/em-chat-system-link-mgr',\r\n 'resources/elements/em-chat-msg-popup',\r\n 'resources/elements/em-chat-member-popup',\r\n 'resources/elements/em-chat-attach',\r\n 'resources/elements/em-chat-schedule',\r\n 'resources/elements/em-chat-msg',\r\n 'resources/elements/em-chat-schedule-edit',\r\n 'resources/elements/em-chat-schedule-remind',\r\n 'resources/elements/em-chat-share',\r\n 'resources/elements/em-chat-content-item-footbar',\r\n 'resources/elements/em-blog-write',\r\n 'resources/elements/em-blog-left-sidebar',\r\n 'resources/elements/em-blog-right-sidebar',\r\n 'resources/elements/em-blog-content',\r\n 'resources/elements/em-blog-top-menu',\r\n 'resources/elements/em-blog-share',\r\n 'resources/elements/em-blog-comment',\r\n 'resources/elements/em-blog-save',\r\n 'resources/elements/em-blog-space-create',\r\n 'resources/elements/em-blog-space-edit',\r\n 'resources/elements/em-blog-space-update',\r\n 'resources/elements/em-blog-history',\r\n 'resources/elements/em-blog-history-view',\r\n 'resources/elements/em-blog-history-diff',\r\n 'resources/elements/em-blog-comment-popup',\r\n 'resources/elements/em-blog-space-auth',\r\n 'resources/elements/em-user-avatar',\r\n 'resources/elements/em-user-edit',\r\n 'resources/elements/em-blog-comment-share',\r\n ]);\r\n}\r\n","import {\r\n bindable\r\n}\r\nfrom 'aurelia-framework';\r\nimport {\r\n EventAggregator\r\n}\r\nfrom 'aurelia-event-aggregator';\r\n\r\n/**\r\n * description\r\n */\r\nexport class TestLifeCycle {\r\n\r\n @\r\n bindable\r\n prop = null;\r\n\r\n static inject = [EventAggregator];\r\n\r\n /**\r\n * 构造函数\r\n */\r\n constructor(eventAggregator) {\r\n this.eventAggregator = eventAggregator;\r\n\r\n console.log('constructor');\r\n\r\n // this.subscribe1 = this.eventAggregator.subscribe('', (payload) => {\r\n\r\n // });\r\n\r\n }\r\n\r\n /**\r\n * 在视图和视图模型都被创建后调用, 允许访问视图实例对象.\r\n * @param {[object]} view 视图实例对象\r\n */\r\n created(view) {\r\n console.log('created');\r\n }\r\n\r\n /**\r\n * 当数据绑定引擎绑定到视图时被调用\r\n * @param {[object]} ctx 视图绑定上下文环境对象\r\n */\r\n bind(ctx) {\r\n console.log('bind');\r\n }\r\n\r\n /**\r\n * 当数据绑定引擎从视图解除绑定时被调用\r\n */\r\n unbind() {\r\n console.log('unbind');\r\n // this.subscribe1.dispose();\r\n }\r\n\r\n /**\r\n * 当视图被附加到DOM中时被调用\r\n */\r\n attached() {\r\n console.log('attached');\r\n }\r\n\r\n /**\r\n * 当视图从DOM中分离时被调用\r\n */\r\n detached() {\r\n console.log('detached');\r\n }\r\n\r\n /**\r\n * 控制是否可以导航到当前路由视图模型(ViewModel)\r\n * @param {[object]} params 参数\r\n * @param {[object]} routeConfig 路由配置\r\n * @param {[object]} navigationInstruction 导航指令\r\n * @return {[boolean | promise]} 返回一个boolean类型, 一个boolean类型延迟许诺(promise)或者一个导航(navigation)命令.\r\n */\r\n canActivate(params, routeConfig, navigationInstruction) {\r\n console.log('canActivate');\r\n }\r\n\r\n /**\r\n * 在视图模型(ViewModel)展示前执行一些自定义代码逻辑\r\n * @param {[object]} params 参数\r\n * @param {[object]} routeConfig 路由配置\r\n * @param {[object]} navigationInstruction 导航指令\r\n * @return {[promise]} 你可以可选的返回一个延迟许诺(promise), 告诉路由等待执行bind和attach视图(view), 直到你完成你的处理工作.\r\n */\r\n activate(params, routeConfig, navigationInstruction) {\r\n console.log('activate');\r\n }\r\n\r\n /**\r\n * 控制是否可以导航离开当前路由视图模型(ViewModel)到其它路由视图模型(ViewModel)\r\n * @return {[boolean | promise]} 返回一个boolean类型, 一个boolean类型延迟许诺(promise)或者一个导航(navigation)命令.\r\n */\r\n canDeactivate() {\r\n console.log('canDeactivate');\r\n }\r\n\r\n /**\r\n * 在当前视图模型(ViewModel)切换离开后执行一些自定义代码逻辑\r\n * @return {[promise]} 你可以可选的返回一个延迟许诺(promise), 告诉路由等待, 直到你完成你的处理工作.\r\n */\r\n deactivate() {\r\n console.log('deactivate');\r\n }\r\n}\r\n","export class UserLogin {\r\n\r\n username = '';\r\n password = '';\r\n\r\n /**\r\n * 当视图被附加到DOM中时被调用\r\n */\r\n attached() {\r\n $(this.rememberMeRef).checkbox();\r\n }\r\n\r\n kdHandler(evt) {\r\n if (evt.keyCode === 13) {\r\n this.loginHandler();\r\n }\r\n\r\n return true;\r\n }\r\n\r\n loginHandler() {\r\n\r\n // $.get('/admin/login', (data) => {\r\n\r\n let rm = $(this.rememberMeRef).checkbox('is checked') ? 'on' : '';\r\n\r\n $.post('/admin/signin', {\r\n username: this.username,\r\n password: this.password,\r\n \"remember-me\": rm\r\n }).done(() => {\r\n\r\n localStorage && localStorage.setItem(nsCons.KEY_LOGIN_USERNAME, this.username);\r\n\r\n let redirect = utils.urlQuery('redirect');\r\n if (redirect) {\r\n window.location = decodeURIComponent(redirect);\r\n } else {\r\n let chatTo = null;\r\n if (localStorage) {\r\n chatTo = localStorage.getItem(nsCons.KEY_REMEMBER_LAST_CHAT_TO);\r\n }\r\n if (chatTo) {\r\n window.location = wurl('path') + `#/chat/${chatTo}`;\r\n } else {\r\n window.location = wurl('path') + `#/chat/@${this.username}`;\r\n }\r\n }\r\n\r\n }).fail((xhr, sts, err) => {\r\n if (xhr.status == 401) {\r\n toastr.error('用户名密码不正确!');\r\n } else if (xhr.status != 0) {\r\n toastr.error('网络连接错误!');\r\n }\r\n });\r\n // });\r\n\r\n return true;\r\n\r\n }\r\n}\r\n","/**\r\n * 用户密码重置\r\n */\r\nexport class UserPwdReset {\r\n\r\n mail = '';\r\n pwd = '';\r\n\r\n isReq = false;\r\n\r\n token = utils.urlQuery('id');\r\n\r\n resetPwdHandler() {\r\n\r\n if (!$(this.fm).form('is valid')) {\r\n toastr.error('邮件地址输入不合法!');\r\n return;\r\n }\r\n\r\n this.isReq = true;\r\n http.fetch('/free/user/pwd/reset', {\r\n method: 'post',\r\n body: json({\r\n mail: this.mail,\r\n baseUrl: utils.getBaseUrl(),\r\n path: wurl('path')\r\n })\r\n }).then((resp) => {\r\n if (resp.ok) {\r\n resp.json().then((data) => {\r\n if (data.success) {\r\n toastr.success('重置密码邮件链接发送成功!');\r\n _.delay(() => {\r\n window.location = \"/admin/login\";\r\n }, 2000);\r\n } else {\r\n toastr.error(data.data, '重置密码邮件链接发送失败!');\r\n this.isReq = false;\r\n }\r\n });\r\n }\r\n\r\n });\r\n }\r\n\r\n newPwdHandler() {\r\n\r\n if (!$(this.fm2).form('is valid')) {\r\n toastr.error('新密码输入不合法!');\r\n return;\r\n }\r\n\r\n this.isReq = true;\r\n http.fetch('/free/user/pwd/new', {\r\n method: 'post',\r\n body: json({\r\n token: this.token,\r\n pwd: this.pwd\r\n })\r\n }).then((resp) => {\r\n if (resp.ok) {\r\n resp.json().then((data) => {\r\n if (data.success) {\r\n toastr.success('重置密码成功!');\r\n _.delay(() => {\r\n window.location = \"/admin/login\";\r\n }, 2000);\r\n } else {\r\n toastr.error(data.data, '重置密码失败!');\r\n this.isReq = false;\r\n }\r\n });\r\n }\r\n \r\n });\r\n }\r\n\r\n /**\r\n * 当视图被附加到DOM中时被调用\r\n */\r\n attached() {\r\n\r\n $(this.fm).form({\r\n on: 'blur',\r\n inline: true,\r\n fields: {\r\n mail: ['empty', 'email']\r\n }\r\n });\r\n\r\n $(this.fm2).form({\r\n on: 'blur',\r\n inline: true,\r\n fields: {\r\n mail: ['empty', 'minLength[8]']\r\n }\r\n });\r\n }\r\n\r\n}\r\n","/**\r\n * 账户注册\r\n */\r\nexport class ViewModel {\r\n\r\n header = '账户激活页面';\r\n\r\n /**\r\n * 在视图模型(ViewModel)展示前执行一些自定义代码逻辑\r\n * @param {[object]} params 参数\r\n * @param {[object]} routeConfig 路由配置\r\n * @param {[object]} navigationInstruction 导航指令\r\n * @return {[promise]} 你可以可选的返回一个延迟许诺(promise), 告诉路由等待执行bind和attach视图(view), 直到你完成你的处理工作.\r\n */\r\n activate(params, routeConfig, navigationInstruction) {\r\n\r\n if (params.id) {\r\n this.token = params.id;\r\n\r\n this.isReq = true;\r\n this.header = '账户激活中,请稍后...!';\r\n http.fetch('/free/user/register/activate', {\r\n method: 'post',\r\n body: json({\r\n token: this.token\r\n })\r\n }).then((resp) => {\r\n if (resp.ok) {\r\n resp.json().then((data) => {\r\n if (data.success) {\r\n this.header = '账户激活成功,请返回登录页面登录!';\r\n } else {\r\n this.header = '账户激活失败!';\r\n toastr.error(data.data, '账户激活失败!');\r\n }\r\n });\r\n this.isReq = false;\r\n }\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * 当视图被附加到DOM中时被调用\r\n */\r\n attached() {\r\n\r\n $(this.fm).form({\r\n on: 'blur',\r\n inline: true,\r\n fields: {\r\n username: {\r\n identifier: 'username',\r\n rules: [{\r\n type: 'empty'\r\n }, {\r\n type: 'minLength[3]'\r\n }, {\r\n type: 'regExp',\r\n value: /^[a-z]+[a-z0-9\\.\\-_]*[a-z0-9]+$/,\r\n prompt: '小写字母数字.-_组合,字母开头,字母数字结尾'\r\n }]\r\n },\r\n pwd: {\r\n identifier: 'pwd',\r\n rules: [{\r\n type: 'empty'\r\n }, {\r\n type: 'minLength[8]'\r\n }]\r\n },\r\n name: {\r\n identifier: 'name',\r\n rules: [{\r\n type: 'empty'\r\n }, {\r\n type: 'maxLength[20]'\r\n }]\r\n },\r\n mail: {\r\n identifier: 'mail',\r\n rules: [{\r\n type: 'empty'\r\n }, {\r\n type: 'email'\r\n }]\r\n }\r\n }\r\n });\r\n\r\n }\r\n\r\n okHandler() {\r\n\r\n if (!$(this.fm).form('is valid')) {\r\n toastr.error('账户注册信息输入不合法!');\r\n return;\r\n }\r\n\r\n this.isReq = true;\r\n http.fetch('/free/user/register', {\r\n method: 'post',\r\n body: json({\r\n username: this.username,\r\n pwd: this.pwd,\r\n name: this.name,\r\n mail: this.mail,\r\n baseUrl: utils.getBaseUrl(),\r\n path: wurl('path')\r\n })\r\n }).then((resp) => {\r\n if (resp.ok) {\r\n resp.json().then((data) => {\r\n if (data.success) {\r\n toastr.success('注册成功,请通过接收到的激活邮件激活账户!');\r\n _.delay(() => {\r\n window.location = \"/admin/login\";\r\n }, 2000);\r\n } else {\r\n toastr.error(data.data, '注册失败!');\r\n this.isReq = false;\r\n }\r\n });\r\n\r\n }\r\n });\r\n\r\n }\r\n\r\n}\r\n","import { customAttribute, bindable } from 'aurelia-framework';\r\nimport { inject } from 'aurelia-dependency-injection';\r\n\r\n@customAttribute('attr')\r\n@inject(Element)\r\nexport class AttrAttr {\r\n\r\n @bindable name;\r\n @bindable value;\r\n\r\n constructor(element) {\r\n\r\n this.element = element;\r\n }\r\n\r\n nameChanged(value) {}\r\n\r\n valueChanged(value) {\r\n\r\n this.value = value;\r\n\r\n if (value) {\r\n $(this.element).attr(this.name, value);\r\n } else {\r\n $(this.element).removeAttr(this.name);\r\n }\r\n }\r\n\r\n bind(bindingContext) {\r\n this.valueChanged(this.value);\r\n }\r\n\r\n unbind() {}\r\n}\r\n","import { inject } from 'aurelia-framework';\r\nimport { customAttribute } from 'aurelia-templating';\r\n\r\n@customAttribute('autosize')\r\n@inject(Element)\r\nexport class AttrAutosize {\r\n\r\n constructor(element) {\r\n this.element = element;\r\n }\r\n\r\n valueChanged(newValue, oldValue) {\r\n autosize(this.element);\r\n }\r\n\r\n bind(bindingContext) {\r\n this.valueChanged(this.value);\r\n }\r\n\r\n /**\r\n * 当数据绑定引擎从视图解除绑定时被调用\r\n */\r\n unbind() {\r\n autosize.destroy(this.elements)\r\n }\r\n}\r\n","import { customAttribute, inject } from 'aurelia-framework';\r\nimport Clipboard from 'clipboard';\r\n\r\n@customAttribute('c2c')\r\n@inject(Element)\r\nexport class AttrC2cCustomAttribute {\r\n\r\n constructor(element) {\r\n this.element = element;\r\n this._init();\r\n }\r\n\r\n _init() {\r\n\r\n $(this.element).append(``);\r\n this.clipboard = new Clipboard($(this.element).find('i.copy.icon')[0], {\r\n text: (trigger) => {\r\n return this.value ? this.value : $(this.element).text();\r\n }\r\n });\r\n let $tp = $(this.element).find('[data-tooltip]').hover(function() {}, function() {\r\n $(this).attr('data-tooltip', '复制到剪贴板!');\r\n });\r\n this.clipboard.on('success', (e) => {\r\n $tp.attr('data-tooltip', '复制成功!');\r\n }).on('error', (e) => {\r\n $tp.attr('data-tooltip', '复制失败!');\r\n });\r\n\r\n $(this.element).hover(() => {\r\n if (this.value || $(this.element).text()) {\r\n $tp.show();\r\n }\r\n }, () => {\r\n $tp.hide();\r\n });\r\n }\r\n\r\n unbind() {\r\n this.clipboard && this.clipboard.destroy();\r\n }\r\n}\r\n","import { inject } from 'aurelia-dependency-injection';\r\nimport { customAttribute } from 'aurelia-templating';\r\n\r\n@customAttribute('dimmer')\r\n@inject(Element)\r\nexport class AttrDimmer {\r\n\r\n constructor(element) {\r\n\r\n this.element = element;\r\n this.$dimmer = $('
    ');\r\n }\r\n\r\n valueChanged(newValue) {\r\n if (this.value) {\r\n $(this.element).prepend(this.$dimmer);\r\n } else {\r\n this.$dimmer.remove();\r\n }\r\n }\r\n\r\n bind(bindingContext) {\r\n this.valueChanged(this.value);\r\n }\r\n\r\n}\r\n","import { bindable, inject } from 'aurelia-framework';\r\nimport { customAttribute } from 'aurelia-templating';\r\nimport {\r\n EventAggregator\r\n}\r\nfrom 'aurelia-event-aggregator';\r\n\r\n@customAttribute('dropzone')\r\n@inject(Element, EventAggregator)\r\nexport class AttrDropzone {\r\n\r\n @bindable clickable;\r\n @bindable target;\r\n @bindable type;\r\n\r\n constructor(element, eventAggregator) {\r\n this.element = element;\r\n this.eventAggregator = eventAggregator;\r\n\r\n this.subscribe = this.eventAggregator.subscribe(nsCons.EVENT_CHAT_MSG_EDIT_UPLOAD, (payload) => {\r\n if (payload.target === this.target) {\r\n $(this.element).click();\r\n }\r\n });\r\n }\r\n\r\n valueChanged(newValue, oldValue) {\r\n\r\n let target = this.target ? this.target : this.element;\r\n let toType = this.type ? this.type : (nsCtx.isAt ? 'User' : 'Channel');\r\n\r\n $(this.element).parent().addClass('tms-dropzone-preview-hidden');\r\n\r\n $(this.element).children().andSelf().dropzone({\r\n url: \"/admin/file/upload\",\r\n paramName: 'file',\r\n clickable: !!this.clickable,\r\n dictDefaultMessage: '',\r\n maxFilesize: 10,\r\n addRemoveLinks: true,\r\n // previewsContainer: this.chatStatusBarRef,\r\n // previewTemplate: this.previewTemplateRef.innerHTML,\r\n dictCancelUpload: '取消上传',\r\n dictCancelUploadConfirmation: '确定要取消上传吗?',\r\n dictFileTooBig: '文件过大({{filesize}}M),最大限制:{{maxFilesize}}M',\r\n init: function() {\r\n this.on(\"sending\", function(file, xhr, formData) {\r\n formData.append('toType', toType);\r\n if('Blog' !== toType) {\r\n formData.append('toId', nsCtx.chatTo);\r\n }\r\n });\r\n this.on(\"success\", function(file, data) {\r\n if (data.success) {\r\n\r\n $.each(data.data, function(index, item) {\r\n if (item.type == 'Image') {\r\n $(target).insertAtCaret('![{name}]({baseURL}{path}{uuidName}) '\r\n .replace(/\\{name\\}/g, item.name)\r\n .replace(/\\{baseURL\\}/g, utils.getBaseUrl() + '/')\r\n .replace(/\\{path\\}/g, item.path)\r\n .replace(/\\{uuidName\\}/g, item.uuidName));\r\n } else {\r\n $(target).insertAtCaret('[{name}]({baseURL}{path}{uuidName}) '\r\n .replace(/\\{name\\}/g, item.name)\r\n .replace(/\\{baseURL\\}/g, utils.getBaseUrl() + '/')\r\n .replace(/\\{path\\}/g, \"admin/file/download/\")\r\n .replace(/\\{uuidName\\}/g, item.id));\r\n }\r\n });\r\n toastr.success('上传成功!');\r\n } else {\r\n toastr.error(data.data, '上传失败!');\r\n }\r\n\r\n });\r\n this.on(\"error\", function(file, errorMessage, xhr) {\r\n toastr.error(errorMessage, '上传失败!');\r\n });\r\n this.on(\"complete\", function(file) {\r\n this.removeFile(file);\r\n });\r\n }\r\n });\r\n }\r\n\r\n bind(bindingContext) {\r\n this.valueChanged(this.value);\r\n }\r\n}\r\n","import { inject } from 'aurelia-framework';\r\nimport { customAttribute } from 'aurelia-templating';\r\n\r\n@customAttribute('modaal')\r\n@inject(Element)\r\nexport class AttrModaalCustomAttribute {\r\n\r\n constructor(element) {\r\n this.element = element;\r\n }\r\n\r\n valueChanged(newValue, oldValue) {\r\n // https://github.com/humaan/Modaal\r\n _.defer(() => {\r\n $(this.element).modaal({\r\n fullscreen: true,\r\n overlay_close: false,\r\n animation: 'none',\r\n // animation_speed: 100,\r\n // after_callback_delay: 120,\r\n // is_locked: true,\r\n // start_open: true,\r\n before_open: () => {\r\n ea.publish(nsCons.EVENT_MODAAL_BEFORE_OPEN, {\r\n id: newValue\r\n });\r\n },\r\n after_open: () => {\r\n ea.publish(nsCons.EVENT_MODAAL_AFTER_OPEN, {\r\n id: newValue\r\n });\r\n },\r\n before_close: () => {\r\n ea.publish(nsCons.EVENT_MODAAL_BEFORE_CLOSE, {\r\n id: newValue\r\n });\r\n },\r\n after_close: () => {\r\n ea.publish(nsCons.EVENT_MODAAL_AFTER_CLOSE, {\r\n id: newValue\r\n });\r\n }\r\n });\r\n });\r\n\r\n }\r\n}\r\n","import { inject } from 'aurelia-framework';\r\nimport { customAttribute } from 'aurelia-templating';\r\nimport 'common/common-plugin';\r\nimport 'common/common-paste';\r\n\r\n@customAttribute('pastable')\r\n@inject(Element)\r\nexport class AttrPastable {\r\n\r\n constructor(element) {\r\n this.element = element;\r\n }\r\n\r\n valueChanged(newValue, oldValue) {\r\n // clipboard paste image\r\n $(this.element).pastableTextarea().on('pasteImage', (ev, data) => {\r\n\r\n $.post('/admin/file/base64', {\r\n dataURL: data.dataURL,\r\n type: data.blob.type,\r\n toType: nsCtx.isAt ? 'User' : 'Channel',\r\n toId: nsCtx.chatTo\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n $(this.element).insertAtCaret('![{name}]({baseURL}{path}{uuidName})'\r\n .replace(/\\{name\\}/g, data.data.name)\r\n .replace(/\\{baseURL\\}/g, utils.getBaseUrl() + '/')\r\n .replace(/\\{path\\}/g, data.data.path)\r\n .replace(/\\{uuidName\\}/g, data.data.uuidName));\r\n }\r\n });\r\n }).on('pasteImageError', (ev, data) => {\r\n toastr.error(data.message, '剪贴板粘贴图片错误!');\r\n });\r\n }\r\n\r\n bind(bindingContext) {\r\n this.valueChanged(this.value);\r\n }\r\n}\r\n","import { inject } from 'aurelia-framework';\r\nimport { customAttribute } from 'aurelia-templating';\r\nimport 'common/common-scrollbar';\r\n\r\n@customAttribute('scrollbar')\r\n@inject(Element)\r\nexport class AttrScrollbarCustomAttribute {\r\n\r\n constructor(element) {\r\n this.element = element;\r\n }\r\n\r\n valueChanged(newValue, oldValue) {\r\n this.cls = newValue ? newValue : ($(window).width() < 768 ? 'scrollbar-macosx' : 'scrollbar-outer');\r\n jQuery(this.element).addClass(this.cls).scrollbar({\r\n \"onScroll\": (y, x) => {\r\n if (y.scroll == y.maxScroll) { // Scrolled to bottom\r\n ea.publish(nsCons.EVENT_SCROLLBAR_SCROLL_TO_BOTTOM, {\r\n element: this.element,\r\n x: x,\r\n y: y\r\n });\r\n }\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * 当数据绑定引擎从视图解除绑定时被调用\r\n */\r\n unbind() {\r\n try {\r\n jQuery(this.element).removeClass(this.cls).scrollbar('destroy');\r\n } catch (err) {}\r\n }\r\n}\r\n","import { inject } from 'aurelia-framework';\r\nimport { customAttribute } from 'aurelia-templating';\r\nimport 'swipebox';\r\n\r\n@customAttribute('swipebox')\r\n@inject(Element)\r\nexport class AttrSwipebox {\r\n\r\n constructor(element) {\r\n this.element = element;\r\n }\r\n\r\n valueChanged(newValue, oldValue) {\r\n\r\n $(this.element).on('click', 'img', (event) => {\r\n event.preventDefault();\r\n let $img = $(event.target);\r\n var imgs = [];\r\n var initialIndexOnArray = 0;\r\n $(this.element).find('img').each(function(index, img) {\r\n imgs.push({ href: $(img).attr('src'), title: $(img).attr('alt') });\r\n if (event.target == img) {\r\n initialIndexOnArray = index;\r\n }\r\n });\r\n $.swipebox(imgs, {\r\n useCSS: true, // false will force the use of jQuery for animations\r\n useSVG: true, // false to force the use of png for buttons\r\n initialIndexOnArray: initialIndexOnArray, // which image index to init when a array is passed\r\n hideCloseButtonOnMobile: false, // true will hide the close button on mobile devices\r\n removeBarsOnMobile: true, // false will show top bar on mobile devices\r\n hideBarsDelay: 3000, // delay before hiding bars on desktop\r\n videoMaxWidth: 1140, // videos max width\r\n beforeOpen: function() {}, // called before opening\r\n afterOpen: null, // called after opening\r\n afterClose: function() {}, // called after closing\r\n loopAtEnd: !!newValue // true will return to the first image after the last image is reached\r\n });\r\n });\r\n }\r\n\r\n bind(bindingContext) {\r\n this.valueChanged(this.value);\r\n }\r\n}\r\n","import { customAttribute, inject } from 'aurelia-framework';\r\n\r\n@customAttribute('tablesort')\r\n@inject(Element)\r\nexport class AttrTablesortCustomAttribute {\r\n\r\n constructor(element) {\r\n this.element = element;\r\n }\r\n\r\n valueChanged(newValue, oldValue) {\r\n\r\n }\r\n\r\n _init() {\r\n if ($(this.element).is('table')) {\r\n $(this.element).addClass('sortable').tablesort();\r\n } else {\r\n \tconsole.warn('tablesort element is not table tag!');\r\n }\r\n }\r\n\r\n bind() {\r\n \tthis._init();\r\n }\r\n}\r\n","import {\r\n inject\r\n}\r\nfrom 'aurelia-dependency-injection';\r\nimport {\r\n customAttribute\r\n}\r\nfrom 'aurelia-templating';\r\n\r\n\r\n@customAttribute('task')\r\n@inject(Element)\r\nexport class AttrTask {\r\n\r\n task = null;\r\n bindingCtx = null;\r\n\r\n constructor(element) {\r\n this.element = element;\r\n }\r\n\r\n valueChanged(newValue) {\r\n this.task = newValue;\r\n if (_.isFunction(this.task)) {\r\n _.bind(this.task, this.bindingCtx, this.element)();\r\n }\r\n }\r\n\r\n bind(bindingContext) {\r\n this.bindingCtx = bindingContext;\r\n this.valueChanged(this.value);\r\n }\r\n\r\n unbind() {\r\n this.element = null;\r\n this.task = null;\r\n this.bindingCtx = null;\r\n }\r\n\r\n}\r\n","import { inject } from 'aurelia-framework';\r\nimport { customAttribute } from 'aurelia-templating';\r\nimport tips from 'common/common-tips';\r\nimport emojis from 'common/common-emoji';\r\n\r\n@customAttribute('textcomplete')\r\n@inject(Element)\r\nexport class AttrTextcompleteCustomAttribute {\r\n\r\n constructor(element) {\r\n this.element = element;\r\n this.initHotkeys();\r\n }\r\n\r\n tipsActionHandler(value) {\r\n if (value == '/upload') {\r\n $(this.element).next('.tms-edit-actions').find('button > .upload.icon').click();\r\n } else if (value == '/shortcuts') {\r\n ea.publish(nsCons.EVENT_SHOW_HOTKEYS_MODAL, {});\r\n } else if (value == 'search') {\r\n _.delay(() => { utils.openNewWin(nsCons.STR_EMOJI_SEARCH_URL); }, 200);\r\n } else {\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n valueChanged() {\r\n if (this.value) {\r\n this.members = this.value;\r\n $(this.element).textcomplete([{ // chat msg help\r\n match: /(|\\b)(\\/.*)$/,\r\n search: (term, callback) => {\r\n var keys = _.keys(tips);\r\n callback($.map(keys, (key) => {\r\n return key.indexOf(term) === 0 ? key : null;\r\n }));\r\n },\r\n template: (value, term) => {\r\n return tips[value].label;\r\n },\r\n replace: (value) => {\r\n if (this.tipsActionHandler(value)) {\r\n _.defer(() => {\r\n autosize.update(this.element);\r\n });\r\n this.setCaretPosition(tips[value].ch2 ? tips[value].ch2 : tips[value].ch);\r\n return `$1${tips[value].value}`;\r\n } else {\r\n return '';\r\n }\r\n }\r\n }, { // @user\r\n match: /(^|\\s)@(\\w*)$/,\r\n search: (term, callback) => {\r\n callback($.map(this.members, (member) => {\r\n return (member.enabled && member.username.indexOf(term) >= 0) ? member.username : null;\r\n }));\r\n },\r\n template: (value, term) => {\r\n let user = _.find(this.members, { username: value });\r\n return `${user.name} - ${user.mails} (${user.username})`;\r\n },\r\n replace: (value) => {\r\n return `$1{~${value}}`;\r\n }\r\n }, { // emoji\r\n match: /(^|\\s):([\\+\\-\\w]*)$/,\r\n search: function(term, callback) {\r\n callback($.map(emojis, (emoji) => {\r\n return _.some(emoji.split('_'), (item) => {\r\n return item.indexOf(term) === 0;\r\n }) ? emoji : null;\r\n }));\r\n },\r\n template: (value, term) => {\r\n if (value == 'search') {\r\n return `表情查找 - :search`;\r\n }\r\n let emojiKey = `:${value}:`;\r\n return `${emojify.replace(emojiKey)} - ${emojiKey}`;\r\n },\r\n replace: (value) => {\r\n if (this.tipsActionHandler(value)) {\r\n return '$1:' + value + ': ';\r\n } else {\r\n return '';\r\n }\r\n }\r\n }], {\r\n appendTo: $(this.element).prev('.textcomplete-container').find('.append-to'),\r\n maxCount: nsCons.NUM_TEXT_COMPLETE_MAX_COUNT\r\n });\r\n } else {\r\n this.unbind();\r\n }\r\n }\r\n\r\n setCaretPosition(ch) {\r\n (ch) && (_.delay(() => {\r\n let cr = utils.getCursortPosition(this.element);\r\n utils.setCaretPosition(this.element, cr - ch);\r\n }, 100));\r\n }\r\n\r\n initHotkeys() {\r\n\r\n _.each(_.filter(_.values(tips), 'key'), (value) => {\r\n $(this.element).bind('keydown', value.key, (evt) => {\r\n evt.preventDefault();\r\n $(this.element).insertAtCaret(value.value);\r\n let cr = utils.getCursortPosition(this.element);\r\n let ch = value.ch2 ? value.ch2 : value.ch;\r\n ch && (utils.setCaretPosition(this.element, cr - ch));\r\n _.defer(() => {\r\n autosize.update(this.element);\r\n });\r\n });\r\n });\r\n\r\n }\r\n\r\n unbind() {\r\n try {\r\n $(this.element).textcomplete('destroy');\r\n } catch (err) {}\r\n }\r\n}\r\n","import { inject } from 'aurelia-framework';\nimport { customAttribute } from 'aurelia-templating';\n\n@customAttribute('ui-checkbox')\n@inject(Element)\nexport class AttrUiCheckboxCustomAttribute {\n\n constructor(element) {\n this.element = element;\n }\n\n valueChanged(newValue, oldValue) {\n $(this.element).checkbox();\n }\n}\n","import { customAttribute, inject } from 'aurelia-framework';\r\n\r\n@customAttribute('ui-dropdown-action')\r\n@inject(Element)\r\nexport class AttrUiDropdownActionCustomAttribute {\r\n\r\n constructor(element) {\r\n this.element = element;\r\n }\r\n\r\n valueChanged(newValue, oldValue) {\r\n\r\n }\r\n\r\n _init(context) {\r\n _.defer(() => {\r\n $(this.element).dropdown({\r\n action: 'hide',\r\n context: context\r\n });\r\n });\r\n }\r\n\r\n bind() {\r\n this._init(this.value ? this.value : window);\r\n }\r\n}\r\n","import { customAttribute, inject } from 'aurelia-framework';\r\n\r\n@customAttribute('ui-dropdown-hover')\r\n@inject(Element)\r\nexport class AttrUiDropdownHoverCustomAttribute {\r\n\r\n constructor(element) {\r\n this.element = element;\r\n }\r\n\r\n valueChanged(newValue, oldValue) {\r\n\r\n }\r\n\r\n _init(action) {\r\n _.defer(() => {\r\n $(this.element).dropdown({\r\n on: 'hover',\r\n action: action\r\n });\r\n });\r\n }\r\n\r\n bind() {\r\n this._init(this.value ? this.value : 'hide');\r\n }\r\n}\r\n","import { customAttribute, inject } from 'aurelia-framework';\r\n\r\n@customAttribute('ui-dropdown')\r\n@inject(Element)\r\nexport class AttrUiDropdownCustomAttribute {\r\n\r\n constructor(element) {\r\n this.element = element;\r\n }\r\n\r\n valueChanged(newValue, oldValue) {\r\n\r\n }\r\n\r\n _init(action) {\r\n _.defer(() => {\r\n $(this.element).dropdown({\r\n action: action\r\n });\r\n });\r\n }\r\n\r\n bind() {\r\n this._init(this.value ? this.value : 'hide');\r\n }\r\n}\r\n","import { inject } from 'aurelia-framework';\r\nimport { customAttribute } from 'aurelia-templating';\r\n\r\n@customAttribute('ui-popup')\r\n@inject(Element)\r\nexport class AttrUiPopupCustomAttribute {\r\n\r\n constructor(element) {\r\n this.element = element;\r\n }\r\n\r\n valueChanged(newValue, oldValue) {\r\n _.defer(() => {\r\n $(this.element).popup({\r\n \ton: 'click',\r\n inline: true,\r\n silent: true,\r\n // hoverable: true,\r\n position: newValue ? newValue : 'bottom right',\r\n jitter: 300,\r\n delay: {\r\n show: 300,\r\n hide: 300\r\n },\r\n onShow: () => {\r\n \t\r\n },\r\n onVisible: () => {\r\n\r\n }\r\n });\r\n });\r\n\r\n }\r\n}\r\n","import { customAttribute, inject } from 'aurelia-framework';\r\n\r\n@customAttribute('ui-tab')\r\n@inject(Element)\r\nexport class AttrUiTabCustomAttribute {\r\n\r\n constructor(element) {\r\n this.element = element;\r\n }\r\n\r\n valueChanged(newValue, oldValue) {\r\n\r\n }\r\n\r\n _init() {\r\n _.defer(() => {\r\n $(this.element).find('.item').tab();\r\n });\r\n }\r\n\r\n bind() {\r\n this._init();\r\n }\r\n}\r\n","const keyCodes = {\r\n 'esc': 27,\r\n 'tab': 9,\r\n 'enter': 13,\r\n 'space': 32,\r\n 'up': 38,\r\n 'left': 37,\r\n 'right': 39,\r\n 'down': 40,\r\n 'backspace': 8,\r\n 'delete': 46\r\n}\r\n\r\nfunction keyHandler(event) {\r\n\r\n if (event && event.ctrlKey == this.keyState.ctrl && event.altKey == this.keyState.alt && event.shiftKey == this.keyState.shift && event.keyCode == this.keyState.keyCode) {\r\n this.originalMethod(event);\r\n } else {\r\n // console.warn(`Unknown event [${event}] for KeyBindingBehavior!`);\r\n }\r\n\r\n return true;\r\n}\r\n\r\nexport class KeyBindingBehavior {\r\n\r\n bind(binding, source, key = 13, metaKeys) {\r\n // determine which method to throttle.\r\n let methodName = 'updateTarget'; // one-way bindings or interpolation bindings\r\n if (binding.callSource) {\r\n methodName = 'callSource'; // listener and call bindings\r\n } else if (binding.updateSource && binding.mode === bindingMode.twoWay) {\r\n methodName = 'updateSource'; // two-way bindings\r\n }\r\n\r\n // stash the original method and it's name.\r\n // note: a generic name like \"originalMethod\" is not used to avoid collisions\r\n // with other binding behavior types.\r\n binding.originalMethod = binding[methodName];\r\n binding.originalMethod.originalName = methodName;\r\n\r\n // replace the original method with the throttling version.\r\n binding[methodName] = keyHandler;\r\n let keyCode = _.isInteger(key) ? key : (key.length === 1 ? key.charCodeAt(0) : keyCodes[key]);\r\n if (_.isUndefined(keyCode)) {\r\n console.warn(`Unmapping keyCode for KeyBindingBehavior!`);\r\n }\r\n binding.keyState = {\r\n ctrl: _.includes(metaKeys, 'ctrl'),\r\n alt: _.includes(metaKeys, 'alt'),\r\n shift: _.includes(metaKeys, 'shift'),\r\n keyCode: keyCode,\r\n };\r\n }\r\n\r\n unbind(binding, source) {\r\n // restore the state of the binding.\r\n binding[binding.originalMethod.originalName] = binding.originalMethod;\r\n binding.originalMethod = null;\r\n }\r\n}\r\n","import 'jquery-format';\r\nimport 'timeago';\r\nimport {\r\n default as ColorHash\r\n} from 'color-hash';\r\nimport tags from 'common/common-tags';\r\n\r\nlet tg = timeago();\r\n\r\n/**\r\n * 该文件用于定义值的过滤转换器\r\n *\r\n */\r\n// ============================================================\r\n/**\r\n * 转换为大写形式\r\n * eg:

    ${name | upper}

    \r\n */\r\nexport class UpperValueConverter {\r\n toView(value) {\r\n return value && value.toUpperCase();\r\n }\r\n}\r\n\r\n/**\r\n * 转换为小写形式\r\n * eg:

    ${name | lower}

    \r\n */\r\nexport class LowerValueConverter {\r\n toView(value) {\r\n return value && value.toLowerCase();\r\n }\r\n}\r\n\r\n/**\r\n * 时间格式化值转换器, using as: 4234234234 | dateFormat\r\n * doc: https://www.npmjs.com/package/jquery-format\r\n */\r\nexport class DateValueConverter {\r\n toView(value, format = 'yyyy-MM-dd hh:mm:ss') {\r\n return _.isInteger(_.toNumber(value)) ? $.format.date(new Date(value), format) : (value ? value : '');\r\n }\r\n}\r\n\r\n/**\r\n * 数值格式化值转换器, using as: 4234234234 | numberFormat\r\n * doc: https://www.npmjs.com/package/jquery-format\r\n */\r\nexport class NumberValueConverter {\r\n toView(value, format = '#,##0.00') {\r\n return _.isNumber(_.toNumber(value)) ? $.format.number(value, format) : (value ? value : '');\r\n }\r\n}\r\n\r\n/**\r\n * 日期timeago值转换器\r\n * doc: \r\n * https://www.npmjs.com/package/better-timeago\r\n * https://www.npmjs.com/package/better-timeago-locale-zh-cn\r\n */\r\nexport class TimeagoValueConverter {\r\n toView(value) {\r\n return value ? tg.format(value, 'zh_CN') : '';\r\n }\r\n}\r\n\r\n/**\r\n * markdown内容解析处理\r\n */\r\nexport class ParseMdValueConverter {\r\n toView(value) {\r\n return value ? marked(utils.preParse(value)) : '';\r\n }\r\n}\r\n\r\nexport class SortValueConverter {\r\n toView(value, prop) {\r\n return _.isArray(value) ? _.sortBy(value, prop) : value;\r\n }\r\n}\r\n\r\nexport class SortUsersValueConverter {\r\n toView(value, username) {\r\n if (_.isArray(value) && username) {\r\n let user = _.find(value, { username: username });\r\n if (user) {\r\n return [user, ..._.reject(value, { username: username })];\r\n }\r\n }\r\n return value;\r\n }\r\n}\r\n\r\nexport class SortUsernamesValueConverter {\r\n toView(value, username) {\r\n if (_.isArray(value) && username) {\r\n if (_.includes(value, username)) {\r\n return [username, ..._.without(value, username)];\r\n }\r\n }\r\n return value;\r\n }\r\n}\r\n\r\nexport class SortChannelsValueConverter {\r\n toView(value) {\r\n if (_.isArray(value)) {\r\n let channelAll = _.find(value, { name: 'all' });\r\n if (channelAll) {\r\n return [channelAll, ..._.reject(value, { name: 'all' })]\r\n }\r\n }\r\n return value;\r\n }\r\n}\r\n\r\nexport class UserNameValueConverter {\r\n toView(value) {\r\n let user = _.find(window.tmsUsers, { username: value });\r\n if (user) {\r\n return user.name;\r\n }\r\n return value;\r\n }\r\n}\r\n\r\nexport class EmojiValueConverter {\r\n toView(value, mkbodyDom) {\r\n if (emojify) {\r\n _.defer(() => {\r\n emojify.run(mkbodyDom);\r\n });\r\n }\r\n return value;\r\n }\r\n}\r\n\r\nexport class EmojiReplValueConverter {\r\n toView(value) {\r\n return emojify.replace(value);\r\n }\r\n}\r\n\r\nexport class ChatLabelExistValueConverter {\r\n toView(chatLabels, type) {\r\n if (chatLabels && chatLabels.length != 0) {\r\n if (_.some(chatLabels, cl => (type ? cl.type == type : true) && cl.voters.length != 0)) {\r\n return '';\r\n }\r\n }\r\n return 'none';\r\n }\r\n}\r\n\r\nexport class ChatLabelTipValueConverter {\r\n toView(chatLabel) {\r\n let vs = _.map(chatLabel.voters, v => v.name ? v.name : v.username);\r\n return `${_.join(vs, ',')}${vs.length}人${chatLabel.type == 'Emoji' ? '表示了' : '标记了'} [${chatLabel.type == 'Emoji' ? chatLabel.description : chatLabel.name}]`\r\n }\r\n}\r\n\r\nexport class ChatLabelFilterValueConverter {\r\n toView(chatLabels, type = 'Emoji') {\r\n return _.filter(chatLabels, { type: type });\r\n }\r\n}\r\n\r\nexport class LabelColorValueConverter {\r\n\r\n toView(chatLabel) {\r\n let tag = _.find(tags, { value: chatLabel.name });\r\n return tag ? tag.color : '';\r\n }\r\n}\r\n\r\nexport class LabelCssValueConverter {\r\n\r\n toView(chatLabel) {\r\n let cs = colorHash.rgb(chatLabel.name);\r\n let bgColor = `rgba(${cs[0]}, ${cs[1]}, ${cs[2]}, 0.6)`;\r\n let color = `rgba(${255 - cs[0]}, ${255 - cs[1]}, ${255 - cs[2]}, 1)`;\r\n\r\n let tag = _.find(tags, { value: chatLabel.name });\r\n return !tag ? { \"background-color\": bgColor, \"color\": color } : '';\r\n }\r\n}\r\n\r\nexport class Nl2brValueConverter {\r\n toView(value) {\r\n if (value) {\r\n return _.replace(value, /\\n/g, '
    ');\r\n }\r\n return value;\r\n }\r\n}\r\n\r\nexport class DiffHtmlValueConverter {\r\n toView(value, allowedTags, allowedAttributes) {\r\n if (value) {\r\n return utils.diffHtml(value);\r\n }\r\n return value;\r\n }\r\n}\r\n","import { bindable, containerless } from 'aurelia-framework';\n\n@containerless\nexport class EmBlogCommentPopup {\n\n comment;\n\n /**\n * 构造函数\n */\n constructor() {\n this.subscribe = ea.subscribe(nsCons.EVENT_BLOG_COMMENT_POPUP_SHOW, (payload) => {\n this.id = payload.id;\n this.target = payload.target;\n\n $(this.target).popup({\n popup: this.popup,\n hoverable: true,\n inline: false,\n movePopup: false,\n // position: 'top left',\n // maxSearchDepth: 50,\n silent: true,\n position: 'bottom left',\n jitter: 300,\n prefer: 'opposite',\n delay: {\n show: 300,\n hide: 300\n },\n onShow: () => {\n $.get('/admin/blog/comment/get', {\n cid: this.id\n }, (data) => {\n if (data.success) {\n this.comment = data.data;\n } else {\n toastr.error(data.data, \"加载失败!\");\n }\n });\n }\n }).popup('show');\n });\n }\n\n /**\n * 当数据绑定引擎从视图解除绑定时被调用\n */\n unbind() {\n this.subscribe.dispose();\n }\n}\n","import { bindable, containerless } from 'aurelia-framework';\n\n@containerless\nexport class EmBlogCommentShare {\n\n shares = [];\n desc = '';\n\n @bindable blog;\n @bindable comment;\n @bindable loginUser;\n\n basePath = utils.getBasePath();\n\n /**\n * 当视图被附加到DOM中时被调用\n */\n attached() {\n $(this.searchRef)\n .search({\n minCharacters: 2,\n cache: false,\n selectFirstResult: true,\n showNoResults: false,\n onSelect: (result, response) => {\n result.item._id = _.uniqueId('share-item-');\n result.item._type = result.item.username ? 'user' : 'channel';\n this.shares.push(result.item);\n _.defer(() => { $(this.inputSearchRef).val(''); });\n },\n apiSettings: {\n onResponse: (resp) => {\n var response = {\n results: []\n };\n $.each(resp.data.users, (index, item) => {\n if (!_.find(_.filter(this.shares, c => c._type == 'user'), { username: item.username })) {\n response.results.push({\n item: item,\n title: ` ${item.name} (${item.username})`,\n });\n }\n });\n $.each(resp.data.channels, (index, item) => {\n if (!_.find(_.filter(this.shares, c => c._type == 'channel'), { name: item.name })) {\n response.results.push({\n item: item,\n title: ` ${item.title} (${item.name})`,\n });\n }\n });\n return response;\n },\n url: '/admin/blog/share/to/search?search={query}'\n }\n });\n $(this.shareRef).popup({\n on: 'click',\n inline: true,\n silent: true,\n position: 'bottom right',\n jitter: 300,\n delay: {\n show: 300,\n hide: 300\n },\n onVisible: () => {\n $(this.inputSearchRef).focus();\n }\n });\n }\n\n shareSearchKeyupHandler(event) {\n if (event.keyCode === 13 && !$(this.searchRef).search('is visible')) {\n let val = $(this.inputSearchRef).val();\n if (utils.isMail(val)) {\n if (!_.find(_.filter(this.shares, c => c._type == 'mail'), { mail: val })) {\n this.shares.push({\n _id: _.uniqueId('share-item-'),\n _type: 'mail',\n mail: val\n });\n $(this.inputSearchRef).val('');\n }\n }\n }\n }\n\n show() {\n $(this.shareRef).popup('show');\n }\n\n removeShareHandler(item) {\n this.shares = _.reject(this.shares, { _id: item._id });\n }\n\n cancelHandler() {\n this._reset();\n }\n\n _reset() {\n this.shares = [];\n this.desc = '';\n $(this.inputSearchRef).val('');\n $(this.shareRef).popup('hide');\n }\n\n shareHandler() {\n\n if (this.shares.length === 0) {\n toastr.error('请先指定博文评论分享用户或者频道或者邮箱!');\n return;\n }\n\n this.ajaxS = $.post(`/admin/blog/comment/share`, {\n basePath: utils.getBasePath(),\n href: `${this.basePath}#/blog/${this.blog.id}?cid=${this.comment.id}`,\n id: this.comment.id,\n desc: this.desc,\n html: utils.md2html(this.comment.content),\n users: _.chain(this.shares).filter(item => item._type == 'user').map('username').join().value(),\n channels: _.chain(this.shares).filter(item => item._type == 'channel').map('name').join().value(),\n mails: _.chain(this.shares).filter(item => item._type == 'mail').map('mail').join().value()\n }, (data, textStatus, xhr) => {\n if (data.success) {\n this._reset();\n toastr.success('博文评论分享成功!');\n } else {\n toastr.error(data.data, '博文评论分享失败!');\n }\n });\n }\n}\n","import { bindable, containerless } from 'aurelia-framework';\r\nimport {\r\n default as SimpleMDE\r\n} from 'simplemde';\r\nimport {\r\n default as Dropzone\r\n} from 'dropzone';\r\nimport emojis from 'common/common-emoji';\r\n\r\n@containerless\r\nexport class EmBlogComment {\r\n\r\n comments = [];\r\n\r\n baseUrl = utils.getUrl();\r\n basePath = utils.getBasePath();\r\n offset = 0;\r\n isSuper = nsCtx.isSuper;\r\n loginUser = nsCtx.loginUser;\r\n users = nsCtx.users;\r\n\r\n @bindable blog;\r\n\r\n blogChanged(newValue, oldValue) {\r\n this._refresh();\r\n }\r\n\r\n /**\r\n * 构造函数\r\n */\r\n constructor() {\r\n this.subscribe = ea.subscribe(nsCons.EVENT_BLOG_COMMENT_MSG_INSERT, (payload) => {\r\n this.insertContent(`${payload.content}`);\r\n this._scrollTo('b');\r\n });\r\n }\r\n\r\n /**\r\n * 当数据绑定引擎从视图解除绑定时被调用\r\n */\r\n unbind() {\r\n this.subscribe.dispose();\r\n }\r\n\r\n _refresh() {\r\n if (!this.blog) {\r\n return;\r\n }\r\n $.get('/admin/blog/comment/query', {\r\n id: this.blog.id,\r\n page: 0,\r\n size: 1000\r\n }, (data) => {\r\n if (data.success) {\r\n this.comments = data.data.content;\r\n let cid = utils.urlQuery('cid');\r\n if (cid) {\r\n _.defer(() => {\r\n this.scrollToAfterImgLoaded(cid);\r\n });\r\n }\r\n ea.publish(nsCons.EVENT_BLOG_COMMENT_CHANGED, {\r\n action: 'query',\r\n comments: this.comments\r\n });\r\n } else {\r\n toastr.error(data.data);\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * 当视图被附加到DOM中时被调用\r\n */\r\n attached() {\r\n this._init();\r\n\r\n // 消息popup\r\n $('.em-blog-comment .comments').on('mouseenter', '.markdown-body a[href*=\"#/blog/\"]:not(.pp-not)', (event) => {\r\n event.preventDefault();\r\n var $a = $(event.currentTarget);\r\n let cid = utils.urlQuery('cid', $a.attr('href'));\r\n cid && ea.publish(nsCons.EVENT_BLOG_COMMENT_POPUP_SHOW, {\r\n id: cid,\r\n target: event.currentTarget\r\n });\r\n });\r\n\r\n $('.em-blog-comment .comments').on('dblclick', '.comment', (event) => {\r\n if (event.ctrlKey) {\r\n let cid = $(event.currentTarget).attr('data-id');\r\n let $t = $(event.currentTarget).find('.content > textarea');\r\n let item = _.find(this.comments, { id: +cid });\r\n if (this.isSuper || item.creator.username == this.loginUser.username) {\r\n this.editHandler(item, $t);\r\n }\r\n }\r\n });\r\n\r\n $('.em-blog-comment .comments').on('click', '.comment', (event) => {\r\n this.focusedComment = $(event.currentTarget);\r\n });\r\n\r\n this.initHotkeys();\r\n }\r\n\r\n initHotkeys() {\r\n $(document).bind('keydown', 'r', (evt) => { // reply\r\n evt.preventDefault();\r\n $('.em-blog-content').scrollTo(`max`, 120, {\r\n offset: 0\r\n });\r\n this.simplemde.codemirror.focus();\r\n }).bind('keydown', 'alt+up', (evt) => { // comment pre\r\n evt.preventDefault();\r\n $('.em-blog-content').scrollTo(this.getScrollTargetComment(true), 120, {\r\n offset: 0\r\n });\r\n }).bind('keydown', 'alt+down', (evt) => { // comment next\r\n evt.preventDefault();\r\n $('.em-blog-content').scrollTo(this.getScrollTargetComment(), 120, {\r\n offset: 0\r\n });\r\n });\r\n\r\n }\r\n\r\n getScrollTargetComment(isPrev) {\r\n if (isPrev) {\r\n if (this.focusedComment && this.focusedComment.size() === 1) {\r\n let $avatar = this.focusedComment.find('> a.em-user-avatar');\r\n if (utils.isElementInViewport($avatar)) {\r\n let prev = this.focusedComment.prev('.comment');\r\n (prev.size() === 1) && (this.focusedComment = prev);\r\n }\r\n } else {\r\n this.focusedComment = $(this.blogCommentsRef).children('.comment:first');\r\n }\r\n } else {\r\n if (this.focusedComment && this.focusedComment.size() === 1) {\r\n let next = this.focusedComment.next('.comment');\r\n (next.size() === 1) && (this.focusedComment = next);\r\n } else {\r\n this.focusedComment = $(this.blogCommentsRef).children('.comment:last');\r\n }\r\n }\r\n return this.focusedComment;\r\n }\r\n\r\n _init() {\r\n this.simplemde = new SimpleMDE({\r\n element: this.commentRef,\r\n spellChecker: false,\r\n status: false,\r\n // autofocus: true,\r\n // toolbar: false,\r\n // forceSync: true,\r\n // autoDownloadFontAwesome: false,\r\n toolbar: [{\r\n name: \"bold\",\r\n action: SimpleMDE.toggleBold,\r\n className: \"fa fa-bold\",\r\n title: \"粗体\",\r\n }, {\r\n name: \"italic\",\r\n action: SimpleMDE.toggleItalic,\r\n className: \"fa fa-italic\",\r\n title: \"斜体\",\r\n }, {\r\n name: \"strikethrough\",\r\n action: SimpleMDE.toggleStrikethrough,\r\n className: \"fa fa-strikethrough\",\r\n title: \"删除线\",\r\n }, {\r\n name: \"heading\",\r\n action: SimpleMDE.toggleHeadingSmaller,\r\n className: \"fa fa-header\",\r\n title: \"标题\",\r\n }, {\r\n name: \"heading-smaller\",\r\n action: SimpleMDE.toggleHeadingSmaller,\r\n className: \"fa fa-header fa-header-x fa-header-smaller\",\r\n title: \"变小标题\",\r\n }, {\r\n name: \"heading-bigger\",\r\n action: SimpleMDE.toggleHeadingBigger,\r\n className: \"fa fa-header fa-header-x fa-header-bigger\",\r\n title: \"变大标题\",\r\n }, \"|\", {\r\n name: \"code\",\r\n action: SimpleMDE.toggleCodeBlock,\r\n className: \"fa fa-code\",\r\n title: \"代码\",\r\n }, {\r\n name: \"quote\",\r\n action: SimpleMDE.toggleBlockquote,\r\n className: \"fa fa-quote-left\",\r\n title: \"引用\",\r\n }, {\r\n name: \"unordered-list\",\r\n action: SimpleMDE.toggleUnorderedList,\r\n className: \"fa fa-list-ul\",\r\n title: \"无序列表\",\r\n }, {\r\n name: \"ordered-list\",\r\n action: SimpleMDE.toggleOrderedList,\r\n className: \"fa fa-list-ol\",\r\n title: \"有序列表\",\r\n }, {\r\n name: \"tasks\",\r\n action: (editor) => {\r\n this.insertContent('- [ ] 未完成任务\\n- [x] 已完成任务');\r\n },\r\n className: \"fa fa-check-square-o \",\r\n title: \"任务列表\",\r\n }, {\r\n name: \"details\",\r\n action: (editor) => {\r\n this.insertContent('
    \\n标题\\n

    详情内容

    \\n
    ');\r\n },\r\n className: \"fa fa-play \",\r\n title: \"折叠详情\",\r\n }, \"|\", {\r\n name: \"link\",\r\n action: SimpleMDE.drawLink,\r\n className: \"fa fa-link\",\r\n title: \"创建链接\",\r\n }, {\r\n name: \"image\",\r\n action: SimpleMDE.drawImage,\r\n className: \"fa fa-picture-o\",\r\n title: \"插入图片\",\r\n }, {\r\n name: \"table\",\r\n action: SimpleMDE.drawTable,\r\n className: \"fa fa-table\",\r\n title: \"插入表格\",\r\n }, {\r\n name: \"horizontal-rule\",\r\n action: SimpleMDE.drawHorizontalRule,\r\n className: \"fa fa-minus\",\r\n title: \"插入水平分割线\",\r\n }, \"|\", {\r\n name: \"upload\",\r\n action: function(editor) {},\r\n className: \"fa fa-upload\",\r\n title: \"上传文件\",\r\n }, \"|\", {\r\n name: \"preview\",\r\n action: SimpleMDE.togglePreview,\r\n className: \"fa fa-eye no-disable\",\r\n title: \"切换预览\",\r\n },\r\n // {\r\n // name: \"side-by-side\",\r\n // action: SimpleMDE.toggleSideBySide,\r\n // className: \"fa fa-columns no-disable no-mobile\",\r\n // title: \"实时预览\",\r\n // }, {\r\n // name: \"fullscreen\",\r\n // action: SimpleMDE.toggleFullScreen,\r\n // className: \"fa fa-arrows-alt no-disable no-mobile\",\r\n // title: \"全屏\",\r\n // }, \r\n {\r\n name: \"guide\",\r\n action: 'https://simplemde.com/markdown-guide',\r\n className: \"fa fa-question-circle\",\r\n title: \"Markdown指南\",\r\n }\r\n\r\n ],\r\n insertTexts: {\r\n table: [\"\", \"\\n\\n| 列1 | 列2 | 列3 |\\n| ------ | ------ | ------ |\\n| 文本 | 文本 | 文本 |\\n\\n\"],\r\n },\r\n previewRender: (plainText, preview) => { // Async method\r\n if (emojify) {\r\n plainText = emojify.replace(plainText);\r\n }\r\n return marked(utils.preParse(plainText));\r\n },\r\n });\r\n\r\n this.simplemde.codemirror.on('keyup', (cm, e) => {\r\n if (e.ctrlKey && e.keyCode == 13) { // Ctrl+Enter\r\n this.addHandler();\r\n } else if (e.keyCode == 27) { // Esc\r\n this.simplemde.value('');\r\n }\r\n });\r\n\r\n this.$chatMsgInputRef = $(this.markdownRef).find('.CodeMirror textarea');\r\n if (this.$chatMsgInputRef.size() === 0) {\r\n this.$chatMsgInputRef = $(this.markdownRef).find('.CodeMirror [contenteditable=\"true\"]');\r\n }\r\n\r\n this.initPaste();\r\n\r\n this.initTextcomplete();\r\n\r\n this.initUploadDropzone($('.CodeMirror-wrap', this.markdownRef), () => {\r\n return this.$chatMsgInputRef\r\n }, false);\r\n\r\n this.initUploadDropzone($('.editor-toolbar .fa.fa-upload', this.markdownRef), () => {\r\n return this.$chatMsgInputRef\r\n }, true);\r\n\r\n }\r\n\r\n initTextcomplete() {\r\n\r\n $(this.$chatMsgInputRef).textcomplete([{ // @user\r\n match: /(^|\\s)@(\\w*)$/,\r\n search: (term, callback) => {\r\n callback($.map(nsCtx.users, (member) => {\r\n return (member.enabled && member.username.indexOf(term) >= 0) ? member.username : null;\r\n }));\r\n },\r\n template: (value, term) => {\r\n let user = _.find(nsCtx.users, { username: value });\r\n return `${user.name} - ${user.mails} (${user.username})`;\r\n },\r\n replace: (value) => {\r\n return `$1{~${value}}`;\r\n }\r\n }, { // emoji\r\n match: /(^|\\s):([\\+\\-\\w]*)$/,\r\n search: function(term, callback) {\r\n callback($.map(emojis, (emoji) => {\r\n return _.some(emoji.split('_'), (item) => {\r\n return item.indexOf(term) === 0;\r\n }) ? emoji : null;\r\n }));\r\n },\r\n template: (value, term) => {\r\n if (value == 'search') {\r\n return `表情查找 - :search`;\r\n }\r\n let emojiKey = `:${value}:`;\r\n return `${emojify.replace(emojiKey)} - ${emojiKey}`;\r\n },\r\n replace: (value) => {\r\n if (this.tipsActionHandler(value)) {\r\n return '$1:' + value + ': ';\r\n } else {\r\n return '';\r\n }\r\n }\r\n }], {\r\n appendTo: '.tms-blog-comment-status-bar',\r\n // maxCount: nsCons.NUM_TEXT_COMPLETE_MAX_COUNT\r\n });\r\n\r\n this.simplemde.codemirror.on('keydown', (cm, e) => {\r\n if (_.includes([13, 38, 40], e.keyCode) && this.isTipsShow()) { // enter | up | down\r\n e.preventDefault();\r\n }\r\n });\r\n }\r\n\r\n isTipsShow() {\r\n return $('.tms-blog-comment-status-bar').find('.textcomplete-dropdown:visible').size() === 1;\r\n }\r\n\r\n tipsActionHandler(value) {\r\n\r\n if (value == 'search') {\r\n _.delay(() => { utils.openNewWin(nsCons.STR_EMOJI_SEARCH_URL); }, 200);\r\n } else {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * 当数据绑定引擎从视图解除绑定时被调用\r\n */\r\n unbind() {\r\n this._reset();\r\n }\r\n\r\n _reset() {\r\n this.blog = null;\r\n this.simplemde.value('');\r\n this.simplemde.toTextArea();\r\n this.simplemde = null;\r\n }\r\n\r\n /**\r\n * 编辑器插入自定义沟通内容\r\n * @param {[type]} cm [description]\r\n * @param {[type]} comment [description]\r\n * @return {[type]} [description]\r\n */\r\n insertContent(content, mde) {\r\n try {\r\n let cm = mde ? mde.codemirror : this.simplemde.codemirror;\r\n var cursor = cm.getCursor();\r\n if (cursor) {\r\n cm.replaceRange(content, cursor, cursor);\r\n cm.focus();\r\n }\r\n } catch (err) { console.log(err); }\r\n }\r\n\r\n replyHandler(item) {\r\n this.insertContent(`[[回复评论#${item.id}](${this.baseUrl}?cid=${item.id}){~${item.creator.username}}]\\n\\n`);\r\n this._scrollTo('b');\r\n }\r\n\r\n removeHandler(item) {\r\n $.post('/admin/blog/comment/remove', {\r\n cid: item.id\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n this.comments = _.reject(this.comments, { id: item.id });\r\n toastr.success('博文评论移除成功!');\r\n ea.publish(nsCons.EVENT_BLOG_COMMENT_CHANGED, {\r\n action: 'removed',\r\n comments: this.comments\r\n });\r\n } else {\r\n toastr.error(data.data, '博文评论移除失败!');\r\n }\r\n });\r\n }\r\n\r\n addHandler() {\r\n let content = this.simplemde.value();\r\n\r\n if (!$.trim(content)) {\r\n this.simplemde.value('');\r\n toastr.error('评论内容不能为空!');\r\n return;\r\n }\r\n\r\n if (this.sending) {\r\n return;\r\n }\r\n\r\n this.sending = true;\r\n\r\n var html = utils.md2html(content);\r\n let users = [nsCtx.memberAll, ...(window.tmsUsers ? tmsUsers : [])];\r\n\r\n $.post(`/admin/blog/comment/create`, {\r\n basePath: utils.getBasePath(),\r\n id: this.blog.id,\r\n users: utils.parseUsernames(content, users).join(','),\r\n content: content,\r\n contentHtml: html\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n this.comments = [...this.comments, data.data];\r\n this.simplemde.value('');\r\n toastr.success('博文评论提交成功!');\r\n this.scrollToAfterImgLoaded('b');\r\n ea.publish(nsCons.EVENT_BLOG_COMMENT_ADDED, {});\r\n ea.publish(nsCons.EVENT_BLOG_COMMENT_CHANGED, {\r\n action: 'created',\r\n comments: this.comments\r\n });\r\n } else {\r\n toastr.error(data.data, '博文评论提交失败!');\r\n }\r\n }).always(() => {\r\n this.sending = false;\r\n });\r\n }\r\n\r\n initPaste() {\r\n\r\n let $paste;\r\n if (this.$chatMsgInputRef.is('textarea')) {\r\n $paste = $(this.$chatMsgInputRef).pastableTextarea();\r\n } else {\r\n $paste = $(this.$chatMsgInputRef).pastableContenteditable();\r\n }\r\n\r\n $paste && ($paste.on('pasteImage', (ev, data) => {\r\n\r\n $.post('/admin/file/base64', {\r\n dataURL: data.dataURL,\r\n type: data.blob.type,\r\n toType: 'Blog'\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n this.insertContent('![{name}]({baseURL}{path}{uuidName})'\r\n .replace(/\\{name\\}/g, data.data.name)\r\n .replace(/\\{baseURL\\}/g, utils.getBaseUrl() + '/')\r\n .replace(/\\{path\\}/g, data.data.path)\r\n .replace(/\\{uuidName\\}/g, data.data.uuidName));\r\n }\r\n });\r\n }).on('pasteImageError', (ev, data) => {\r\n toastr.error(data.message, '剪贴板粘贴图片错误!');\r\n }));\r\n }\r\n\r\n initUploadDropzone(domRef, getInputTargetCb, clickable) {\r\n\r\n let _this = this;\r\n\r\n $(domRef).dropzone({\r\n url: \"/admin/file/upload\",\r\n paramName: 'file',\r\n clickable: !!clickable,\r\n dictDefaultMessage: '',\r\n maxFilesize: 10,\r\n addRemoveLinks: true,\r\n previewsContainer: '.em-blog-comment .dropzone-previews',\r\n previewTemplate: $('.em-blog-comment .preview-template')[0].innerHTML,\r\n dictCancelUpload: '取消上传',\r\n dictCancelUploadConfirmation: '确定要取消上传吗?',\r\n dictFileTooBig: '文件过大({{filesize}}M),最大限制:{{maxFilesize}}M',\r\n init: function() {\r\n this.on(\"sending\", function(file, xhr, formData) {\r\n if (!getInputTargetCb()) {\r\n this.removeAllFiles(true);\r\n } else {\r\n formData.append('toType', 'Blog');\r\n }\r\n });\r\n this.on(\"success\", function(file, data) {\r\n if (data.success) {\r\n\r\n $.each(data.data, function(index, item) {\r\n if (item.type == 'Image') {\r\n _this.insertContent('![{name}]({baseURL}{path}{uuidName}) '\r\n .replace(/\\{name\\}/g, item.name)\r\n .replace(/\\{baseURL\\}/g, utils.getBaseUrl() + '/')\r\n .replace(/\\{path\\}/g, item.path)\r\n .replace(/\\{uuidName\\}/g, item.uuidName));\r\n } else {\r\n _this.insertContent('[{name}]({baseURL}{path}{uuidName}) '\r\n .replace(/\\{name\\}/g, item.name)\r\n .replace(/\\{baseURL\\}/g, utils.getBaseUrl() + '/')\r\n .replace(/\\{path\\}/g, \"admin/file/download/\")\r\n .replace(/\\{uuidName\\}/g, item.id));\r\n }\r\n });\r\n toastr.success('上传成功!');\r\n } else {\r\n toastr.error(data.data, '上传失败!');\r\n }\r\n\r\n });\r\n this.on(\"error\", function(file, errorMessage, xhr) {\r\n toastr.error(errorMessage, '上传失败!');\r\n });\r\n this.on(\"complete\", function(file) {\r\n this.removeFile(file);\r\n });\r\n }\r\n });\r\n }\r\n\r\n scrollToAfterImgLoaded(to) {\r\n _.defer(() => {\r\n new ImagesLoaded($('.em-blog-content')[0]).always(() => {\r\n this._scrollTo(to);\r\n });\r\n\r\n this._scrollTo(to);\r\n });\r\n\r\n }\r\n\r\n _scrollTo(to) {\r\n if (to == 'b') {\r\n $('.em-blog-content').scrollTo('max');\r\n } else if (to == 't') {\r\n $('.em-blog-content').scrollTo(0);\r\n } else {\r\n if (_.some(this.comments, { id: +to })) {\r\n $('.em-blog-content').scrollTo(`.comment[data-id=\"${to}\"]`, {\r\n offset: this.offset\r\n });\r\n $('.em-blog-content').find(`.comment[data-id]`).removeClass('active');\r\n $('.em-blog-content').find(`.comment[data-id=${to}]`).addClass('active');\r\n } else {\r\n $('.em-blog-content').scrollTo('max');\r\n toastr.warning(`博文评论[${to}]不存在,可能已经被删除!`);\r\n }\r\n }\r\n }\r\n\r\n editHandler(item, editTxtRef) {\r\n $.get(`/admin/blog/comment/get`, {\r\n cid: item.id\r\n }, (data) => {\r\n if (data.success) {\r\n if (item.version != data.data.version) {\r\n _.extend(item, data.data);\r\n }\r\n item.isEditing = true;\r\n item.contentOld = item.content;\r\n _.defer(() => {\r\n $(editTxtRef).focus().select();\r\n autosize.update(editTxtRef);\r\n });\r\n } else {\r\n toastr.error(data.data);\r\n }\r\n\r\n });\r\n }\r\n\r\n refreshHandler(item) {\r\n $.get('/admin/blog/comment/get', {\r\n cid: item.id\r\n }, (data) => {\r\n if (item.version != data.data.version) {\r\n _.extend(item, data.data);\r\n toastr.success('刷新同步成功!');\r\n } else {\r\n toastr.info('博文评论内容暂无变更!');\r\n }\r\n });\r\n }\r\n\r\n eidtKeydownHandler(evt, item, txtRef) {\r\n\r\n if (this.sending) {\r\n return false;\r\n }\r\n\r\n if (evt.ctrlKey && evt.keyCode === 13) {\r\n\r\n this.editSave(item, txtRef);\r\n\r\n return false;\r\n } else if (evt.ctrlKey && evt.keyCode === 85) {\r\n $(txtRef).next('.tms-blog-comment-edit-actions').find('.upload').click();\r\n return false;\r\n } else if (evt.keyCode === 27) {\r\n this.editCancelHandler(evt, item, txtRef);\r\n }\r\n\r\n return true;\r\n }\r\n\r\n editOkHandler(evt, item, txtRef) {\r\n this.editSave(item, txtRef);\r\n item.isEditing = false;\r\n }\r\n\r\n editCancelHandler(evt, item, txtRef) {\r\n item.content = item.contentOld;\r\n $(txtRef).val(item.content);\r\n item.isEditing = false;\r\n }\r\n\r\n editSave(item, txtRef) {\r\n\r\n this.sending = true;\r\n\r\n item.content = $(txtRef).val();\r\n\r\n var html = utils.md2html(item.content);\r\n var htmlOld = utils.md2html(item.contentOld);\r\n\r\n let users = [nsCtx.memberAll, ...(window.tmsUsers ? tmsUsers : [])];\r\n $.post(`/admin/blog/comment/update`, {\r\n basePath: utils.getBasePath(),\r\n id: this.blog.id,\r\n cid: item.id,\r\n version: item.version,\r\n users: utils.parseUsernames(item.content, users).join(','),\r\n content: item.content,\r\n contentHtml: html,\r\n diff: utils.diffS(item.contentOld, item.content),\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n toastr.success('博文评论更新成功!');\r\n item.isEditing = false;\r\n item.version = data.data.version;\r\n } else {\r\n toastr.error(data.data, '博文评论更新失败!');\r\n }\r\n }).always(() => {\r\n this.sending = false;\r\n });\r\n }\r\n\r\n isZanDone(comment) {\r\n let voteZan = comment.voteZan;\r\n if (!voteZan) {\r\n return false;\r\n }\r\n\r\n return voteZan.split(',').includes(this.loginUser.username);\r\n }\r\n\r\n rateHandler(item) {\r\n $.post('/admin/blog/comment/vote', {\r\n cid: item.id,\r\n url: utils.getBasePath(),\r\n contentHtml: utils.md2html(item.content),\r\n type: this.isZanDone(item) ? 'Cai' : 'Zan'\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n _.extend(item, data.data);\r\n } else {\r\n toastr.error(data.data, '博文投票失败!');\r\n }\r\n });\r\n\r\n }\r\n\r\n gotoTopHandler() {\r\n $('.em-blog-content').scrollTo(0, 120);\r\n }\r\n\r\n}\r\n","import { bindable, containerless } from 'aurelia-framework';\r\nimport {\r\n default as clipboard\r\n} from 'clipboard-js';\r\nimport {\r\n default as Clipboard\r\n} from 'clipboard';\r\n\r\n@containerless\r\nexport class EmBlogContent {\r\n\r\n blog;\r\n\r\n loginUser = nsCtx.loginUser;\r\n isSuper = nsCtx.isSuper;\r\n isAdmin = nsCtx.isAdmin;\r\n\r\n /**\r\n * 构造函数\r\n */\r\n constructor() {\r\n this.subscribe = ea.subscribe(nsCons.EVENT_BLOG_SWITCH, (payload) => {\r\n this.getBlog();\r\n ea.publish(nsCons.EVENT_BLOG_RIGHT_SIDEBAR_TOGGLE, {\r\n isHide: true\r\n });\r\n });\r\n this.subscribe2 = ea.subscribe(nsCons.EVENT_BLOG_CHANGED, (payload) => {\r\n if (payload.action == 'updated') {\r\n _.extend(this.blog, payload.blog);\r\n _.defer(() => this.catalogHandler(true));\r\n }\r\n });\r\n this.subscribe3 = ea.subscribe(nsCons.EVENT_BLOG_COMMENT_ADDED, (payload) => {\r\n if (!this.blogFollower) {\r\n this.getFollower();\r\n }\r\n });\r\n this.subscribe4 = ea.subscribe(nsCons.EVENT_BLOG_COMMENT_CHANGED, (payload) => {\r\n this.comments = payload.comments;\r\n });\r\n\r\n this.throttleCreateHandler = _.throttle(() => { this.createHandler() }, 1000, { 'trailing': false });\r\n this.throttleEditHandler = _.throttle(() => { this.editHandler() }, 1000, { 'trailing': false });\r\n this.throttleCopyHandler = _.throttle(() => { this.copyHandler() }, 1000, { 'trailing': false });\r\n }\r\n\r\n /**\r\n * 当数据绑定引擎从视图解除绑定时被调用\r\n */\r\n unbind() {\r\n this.subscribe.dispose();\r\n this.subscribe2.dispose();\r\n this.subscribe3.dispose();\r\n this.subscribe4.dispose();\r\n }\r\n\r\n /**\r\n * 当视图被附加到DOM中时被调用\r\n */\r\n attached() {\r\n this.getBlog();\r\n\r\n new Clipboard('.em-blog-content .tms-clipboard')\r\n .on('success', function(e) {\r\n toastr.success('复制到剪贴板成功!');\r\n }).on('error', function(e) {\r\n toastr.error('复制到剪贴板失败!');\r\n });\r\n\r\n $('.em-blog-content').on('click', 'code[data-code]', function(event) {\r\n if (event.ctrlKey) {\r\n event.stopImmediatePropagation();\r\n event.preventDefault();\r\n clipboard.copy($(event.currentTarget).attr('data-code')).then(\r\n () => { toastr.success('复制到剪贴板成功!'); },\r\n (err) => { toastr.error('复制到剪贴板失败!'); }\r\n );\r\n }\r\n });\r\n\r\n $('.em-blog-content').on('click', '.pre-code-wrapper', function(event) {\r\n if (event.ctrlKey) {\r\n event.stopImmediatePropagation();\r\n event.preventDefault();\r\n clipboard.copy($(event.currentTarget).find('i[data-clipboard-text]').attr('data-clipboard-text')).then(\r\n () => { toastr.success('复制到剪贴板成功!'); },\r\n (err) => { toastr.error('复制到剪贴板失败!'); }\r\n );\r\n }\r\n });\r\n\r\n $('.em-blog-right-sidebar').on('click', '.panel-blog-dir .wiki-dir-item', (event) => {\r\n event.preventDefault();\r\n if ($(window).width() <= 768) {\r\n ea.publish(nsCons.EVENT_BLOG_RIGHT_SIDEBAR_TOGGLE, { isHide: true });\r\n }\r\n $('.em-blog-content').scrollTo(`#${$(event.currentTarget).attr('data-id')}`, 200, {\r\n offset: 0\r\n });\r\n });\r\n\r\n $(this.mkbodyRef).on('dblclick', (event) => {\r\n if (event.ctrlKey) {\r\n if (this.blog.openEdit || this.isSuper || this.blog.creator.username == this.loginUser.username) {\r\n this.editHandler();\r\n }\r\n }\r\n });\r\n\r\n $('.em-blog-content').scroll(_.throttle((event) => {\r\n try {\r\n let sHeight = $('.em-blog-content')[0].scrollHeight;\r\n let sTop = $('.em-blog-content')[0].scrollTop;\r\n\r\n let scale = sTop * 1.0 / (sHeight - $('.em-blog-content').outerHeight());\r\n this.progressWidth = $('.em-blog-content').outerWidth() * scale;\r\n\r\n this.fixDirItem();\r\n\r\n } catch (err) { this.progressWidth = 0; }\r\n\r\n }, 10));\r\n\r\n // 消息popup\r\n $(this.feedRef).on('mouseenter', '.event a[href*=\"#/blog/\"]:not(.pp-not)', (event) => {\r\n event.preventDefault();\r\n var $a = $(event.currentTarget);\r\n let cid = utils.urlQuery('cid', $a.attr('href'));\r\n cid && ea.publish(nsCons.EVENT_BLOG_COMMENT_POPUP_SHOW, {\r\n id: cid,\r\n target: event.currentTarget\r\n });\r\n });\r\n\r\n this.initHotkeys();\r\n }\r\n\r\n fixDirItem() {\r\n let fixId = null;\r\n let preId = null;\r\n _.each(this.dirItemIds, (id) => {\r\n if (!preId) {\r\n if (utils.isElementInViewport($(`#${id}`))) {\r\n fixId = id;\r\n return false;\r\n }\r\n } else {\r\n if (utils.isElementInViewport($(`#${id}`)) && !utils.isElementInViewport($(`#${preId}`))) {\r\n fixId = id;\r\n return false;\r\n }\r\n }\r\n });\r\n\r\n if (fixId) {\r\n let fixDirItem = $('.em-blog-right-sidebar .panel-blog-dir').find(`.wiki-dir-item[data-id=\"${fixId}\"]`);\r\n if (fixDirItem) {\r\n $('.em-blog-right-sidebar .panel-blog-dir').find(`.wiki-dir-item[data-id]`).removeClass('active');\r\n fixDirItem.addClass('active');\r\n\r\n $('.em-blog-right-sidebar .scrollbar-macosx.scroll-content.scroll-scrolly_visible').scrollTo(fixDirItem, 10, {\r\n offset: -120\r\n });\r\n }\r\n }\r\n }\r\n\r\n initHotkeys() {\r\n try {\r\n $(document).bind('keyup', 'e', (evt) => { // edit\r\n evt.preventDefault();\r\n if (this.blog.openEdit || this.isSuper || this.blog.creator.username == this.loginUser.username) {\r\n this.throttleEditHandler();\r\n }\r\n }).bind('keyup', 'c', (evt) => { // create\r\n evt.preventDefault();\r\n this.throttleCreateHandler();\r\n }).bind('keydown', 'd', (evt) => { // dir\r\n evt.preventDefault();\r\n if (this.dir) {\r\n this.catalogHandler();\r\n }\r\n }).bind('keydown', 's', (evt) => { // share\r\n evt.preventDefault();\r\n this.blogShareVm.show();\r\n }).bind('keydown', 'f', (evt) => { // follow\r\n evt.preventDefault();\r\n this.followerHandler();\r\n }).bind('keydown', 't', (event) => { // scroll top\r\n event.preventDefault();\r\n $('.em-blog-content').scrollTo(0, 200, {\r\n offset: 0\r\n });\r\n }).bind('keydown', 'b', (event) => { // scroll bottom\r\n event.preventDefault();\r\n $('.em-blog-content').scrollTo(`max`, 200, {\r\n offset: 0\r\n });\r\n }).bind('keydown', 'alt+r', (event) => { // refresh\r\n event.preventDefault();\r\n this.refreshHandler();\r\n }).bind('keydown', 'alt+h', (event) => { // history\r\n event.preventDefault();\r\n this.historyHandler();\r\n }).bind('keydown', 'alt+l', (event) => { // history\r\n event.preventDefault();\r\n this.authHandler();\r\n }).bind('keydown', 'alt+s', (event) => { // stow\r\n event.preventDefault();\r\n this.stowHandler();\r\n }).bind('keydown', 'alt+c', (event) => { // copy\r\n event.preventDefault();\r\n this.throttleCopyHandler();\r\n }).bind('keydown', 'alt+m', (event) => { // move space\r\n event.preventDefault();\r\n this.updateSpaceHandler();\r\n }).bind('keydown', 'alt+o', (event) => { // open edit\r\n event.preventDefault();\r\n this.openEditHandler();\r\n }).bind('keydown', 'alt+ctrl+d', (event) => { // delete\r\n event.preventDefault();\r\n this.deleteHandler();\r\n });\r\n } catch (err) { console.log(err); }\r\n\r\n }\r\n\r\n _dir() {\r\n this.dir = utils.dir($(this.mkbodyRef), 'tms-blog-dir-item-');\r\n this.dirItemIds = [];\r\n if (this.dir) {\r\n $(this.dir).find('a.item.wiki-dir-item').each((index, el) => {\r\n this.dirItemIds.push($(el).attr('data-id'));\r\n });\r\n }\r\n return this.dir;\r\n }\r\n\r\n getMyLog() {\r\n this.ajaxS = $.get('/admin/blog/log/my', (data) => {\r\n if (data.success) {\r\n // this.logs = _.reverse(data.data);\r\n this.logs = data.data;\r\n } else {\r\n toastr.error(data.data);\r\n }\r\n });\r\n }\r\n\r\n getBlog() {\r\n this.progressWidth = 0;\r\n if (!nsCtx.blogId || isNaN(new Number(nsCtx.blogId))) {\r\n this.blog = null;\r\n this.getMyLog();\r\n return;\r\n }\r\n\r\n this.getStow();\r\n this.getFollower();\r\n\r\n return $.get('/admin/blog/get', {\r\n id: nsCtx.blogId\r\n }, (data) => {\r\n if (data.success) {\r\n this.blog = data.data;\r\n ea.publish(nsCons.EVENT_BLOG_VIEW_CHANGED, this.blog);\r\n _.defer(() => this.catalogHandler(true));\r\n this.getMyTags();\r\n } else {\r\n toastr.error(data.data, \"获取博文失败!\");\r\n }\r\n });\r\n }\r\n\r\n getMyTags() {\r\n $.get('/admin/blog/tag/my', (data) => {\r\n let tags = [];\r\n if (data.success) {\r\n tags = data.data;\r\n }\r\n this.tags = _.unionBy(tags, this.blog.tags, 'name');\r\n\r\n _.defer(() => {\r\n let tags = _.map(this.blog.tags, \"name\");\r\n $(this.tagsRef).dropdown({}).dropdown('clear').dropdown('set selected', tags).dropdown({\r\n allowAdditions: true,\r\n onAdd: (addedValue, addedText, $addedChoice) => {\r\n $.post('/admin/blog/tag/add', {\r\n id: this.blog.id,\r\n tags: addedValue\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n toastr.success('添加标签成功!');\r\n } else {\r\n toastr.error(data.data, '添加标签失败!');\r\n }\r\n });\r\n },\r\n onLabelRemove: (removedValue) => {\r\n $.post('/admin/blog/tag/remove', {\r\n id: this.blog.id,\r\n tags: removedValue\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n toastr.success('移除标签成功!');\r\n } else {\r\n toastr.error(data.data, '移除标签失败!');\r\n }\r\n });\r\n }\r\n });\r\n });\r\n });\r\n }\r\n\r\n getStow() {\r\n $.get('/admin/blog/stow/get', {\r\n id: nsCtx.blogId\r\n }, (data) => {\r\n if (data.success) {\r\n this.blogStow = data.data;\r\n } else {\r\n toastr.error(data.data);\r\n }\r\n });\r\n }\r\n\r\n getFollower() {\r\n $.get('/admin/blog/follower/get', {\r\n id: nsCtx.blogId\r\n }, (data) => {\r\n if (data.success) {\r\n this.blogFollower = data.data;\r\n } else {\r\n toastr.error(data.data);\r\n }\r\n });\r\n }\r\n\r\n editHandler() {\r\n if (!nsCtx.isModaalOpening) {\r\n ea.publish(nsCons.EVENT_BLOG_ACTION, { action: 'edit', id: this.blog.id });\r\n }\r\n }\r\n\r\n deleteHandler() {\r\n if (this.isSuper || this.blog.creator.username == this.loginUser.username) {\r\n this.emConfirmModal.show({\r\n title: '删除确认',\r\n content: '确认要删除该博文吗?',\r\n onapprove: () => {\r\n $.post(\"/admin/blog/delete\", {\r\n id: this.blog.id\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n toastr.success('删除博文成功!');\r\n ea.publish(nsCons.EVENT_BLOG_CHANGED, {\r\n action: 'deleted',\r\n blog: this.blog\r\n });\r\n ea.publish(nsCons.EVENT_APP_ROUTER_NAVIGATE, {\r\n to: '#/blog'\r\n });\r\n } else {\r\n toastr.error(data.data, '删除博文失败!');\r\n }\r\n });\r\n }\r\n });\r\n }\r\n }\r\n\r\n createHandler() {\r\n if (!nsCtx.isModaalOpening) {\r\n $('a[href=\"#modaal-blog-write\"]').click();\r\n }\r\n }\r\n\r\n updateSpaceHandler() {\r\n if (this.isSuper || this.blog.creator.username == this.loginUser.username) {\r\n this.blogSpaceUpdateVm.show(this.blog);\r\n }\r\n }\r\n\r\n updatePrivatedHandler() {\r\n $.post('/admin/blog/privated/update', {\r\n id: this.blog.id,\r\n privated: !this.blog.privated\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n _.extend(this.blog, data.data);\r\n ea.publish(nsCons.EVENT_BLOG_CHANGED, {\r\n action: 'updated',\r\n blog: this.blog\r\n });\r\n toastr.success('更新博文可见性成功!');\r\n } else {\r\n toastr.error(data.data, '更新博文可见性失败!');\r\n }\r\n });\r\n }\r\n\r\n isZanDone() {\r\n let voteZan = this.blog.voteZan;\r\n if (!voteZan) {\r\n return false;\r\n }\r\n\r\n return voteZan.split(',').includes(this.loginUser.username);\r\n }\r\n\r\n rateHandler() {\r\n $.post('/admin/blog/vote', {\r\n id: this.blog.id,\r\n url: utils.getBasePath(),\r\n contentHtml: utils.md2html(this.blog.content),\r\n type: this.isZanDone() ? 'Cai' : 'Zan'\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n _.extend(this.blog, data.data);\r\n } else {\r\n toastr.error(data.data, '博文投票失败!');\r\n }\r\n });\r\n }\r\n\r\n openEditHandler() {\r\n if (this.isSuper || this.blog.creator.username == this.loginUser.username) {\r\n $.post('/admin/blog/openEdit', {\r\n id: this.blog.id,\r\n open: !this.blog.openEdit\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n this.blog.openEdit = !this.blog.openEdit;\r\n ea.publish(nsCons.EVENT_BLOG_CHANGED, {\r\n action: 'updated',\r\n blog: this.blog\r\n });\r\n toastr.success(this.blog.openEdit ? '开放协作编辑成功!' : '关闭协作编辑成功!');\r\n } else {\r\n toastr.error(data.data, '协作编辑操作失败!');\r\n }\r\n });\r\n }\r\n }\r\n\r\n refreshHandler() {\r\n let p = this.getBlog();\r\n p && p.done(() => { toastr.success('刷新操作成功!'); });\r\n }\r\n\r\n historyHandler() {\r\n this.blogHistoryVm.show(this.blog);\r\n }\r\n\r\n catalogHandler(justRefresh = false) {\r\n ea.publish(nsCons.EVENT_BLOG_RIGHT_SIDEBAR_TOGGLE, {\r\n justRefresh: justRefresh,\r\n action: 'dir',\r\n dir: this._dir()\r\n });\r\n }\r\n\r\n authHandler() {\r\n if (this.isSuper || this.blog.creator.username == this.loginUser.username) {\r\n this.blogSpaceAuthVm.show('blog', this.blog);\r\n }\r\n }\r\n\r\n copyHandler() {\r\n if (!nsCtx.isModaalOpening) {\r\n ea.publish(nsCons.EVENT_BLOG_ACTION, { action: 'copy', id: this.blog.id });\r\n }\r\n }\r\n\r\n stowHandler() {\r\n if (!this.blogStow) {\r\n $.post('/admin/blog/stow/add', {\r\n id: this.blog.id\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n this.blogStow = data.data;\r\n ea.publish(nsCons.EVENT_BLOG_STOW_CHANGED, { action: 'add', data: this.blogStow });\r\n toastr.success('博文收藏成功!');\r\n } else {\r\n toastr.error(data.data);\r\n }\r\n });\r\n } else {\r\n $.post('/admin/blog/stow/remove', {\r\n sid: this.blogStow.id\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n ea.publish(nsCons.EVENT_BLOG_STOW_CHANGED, { action: 'remove', data: this.blogStow });\r\n this.blogStow = null;\r\n toastr.success('删除博文收藏成功!');\r\n } else {\r\n toastr.error(data.data);\r\n }\r\n });\r\n }\r\n\r\n }\r\n\r\n followerHandler() {\r\n if (!this.blogFollower) {\r\n $.post('/admin/blog/follower/add', {\r\n id: this.blog.id\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n this.blogFollower = data.data;\r\n toastr.success('博文关注成功!');\r\n } else {\r\n toastr.error(data.data);\r\n }\r\n });\r\n } else {\r\n $.post('/admin/blog/follower/remove', {\r\n fid: this.blogFollower.id\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n this.blogFollower = null;\r\n toastr.success('取消博文关注成功!');\r\n } else {\r\n toastr.error(data.data);\r\n }\r\n });\r\n }\r\n\r\n }\r\n\r\n dimmerHandler() {\r\n ea.publish(nsCons.EVENT_BLOG_LEFT_SIDEBAR_TOGGLE, { isHide: true });\r\n ea.publish(nsCons.EVENT_BLOG_RIGHT_SIDEBAR_TOGGLE, { isHide: true });\r\n }\r\n\r\n commentsHandler() {\r\n $('.em-blog-content').scrollTo(`.em-blog-comment `, 120, {\r\n offset: -16\r\n });\r\n }\r\n\r\n openFeedEventItemHandler(item) {\r\n item.isOpen = !item.isOpen;\r\n }\r\n\r\n feedEventItemMouseleaveHandler(item) {\r\n item.isOpen = false;\r\n }\r\n\r\n refreshFeedHandler() {\r\n this.getMyLog();\r\n }\r\n}\r\n","import { bindable, containerless } from 'aurelia-framework';\n\n@containerless\nexport class EmBlogHistoryDiff {\n\n showHandler() {}\n\n approveHandler() {\n\n }\n\n show(f, s, fIndex, sIndex) {\n this.f = f;\n this.s = s;\n this.fIndex = fIndex;\n this.sIndex = sIndex;\n this.diffHtml = utils.diffS(s.content, f.content);\n this.emModal.show({ hideOnApprove: true, autoDimmer: false });\n }\n}\n","import { bindable, containerless } from 'aurelia-framework';\n\n@containerless\nexport class EmBlogHistoryView {\n\n isSuper = nsCtx.isSuper;\n loginUser = nsCtx.loginUser;\n\n showHandler() {}\n\n approveHandler() {\n\n }\n\n show(blogHistory, ver, isCurrentVer) {\n this.blogHistory = blogHistory;\n this.blog = blogHistory.blog;\n this.ver = ver;\n this.isCurrentVer = isCurrentVer;\n this.emModal.show({ hideOnApprove: true, autoDimmer: false });\n }\n\n restoreHandler() {\n this.ajax1 = $.post('/admin/blog/history/restore', { hid: this.blogHistory.id }, (data, textStatus, xhr) => {\n if (data.success) {\n ea.publish(nsCons.EVENT_BLOG_CHANGED, { action: 'updated', blog: data.data });\n ea.publish(nsCons.EVENT_BLOG_HISTORY_CHANGED, {});\n toastr.success('博文历史记录还原成功!');\n this.emModal.hide();\n } else {\n toastr.error(data.data, '博文历史记录还原失败!');\n }\n });\n }\n}\n","import { bindable, containerless } from 'aurelia-framework';\n\n@containerless\nexport class EmBlogHistory {\n\n isSuper = nsCtx.isSuper;\n loginUser = nsCtx.loginUser;\n\n /**\n * 构造函数\n */\n constructor() {\n this.subscribe = ea.subscribe(nsCons.EVENT_BLOG_HISTORY_CHANGED, (payload) => {\n this.refreshHistory();\n });\n }\n\n /**\n * 当数据绑定引擎从视图解除绑定时被调用\n */\n unbind() {\n this.subscribe.dispose();\n }\n\n viewHistoryHandler(blogHistory, ver, isCurrentVer) {\n this.blogHistoryViewVm.show(blogHistory, ver, isCurrentVer);\n }\n\n refreshHistory() {\n $.get('/admin/blog/history/list', {\n id: this.blog.id\n }, (data) => {\n if (data.success) {\n \tthis.oldHistories = data.data;\n this.histories = _.reverse(_.clone(data.data));\n } else {\n toastr.error(data.data, '获取博文历史失败!');\n }\n });\n }\n\n showHandler() {\n this.refreshHistory();\n }\n\n approveHandler() {\n\n }\n\n show(blog) {\n this.blog = blog;\n this.emModal.show({ hideOnApprove: true, autoDimmer: false });\n }\n\n restoreHandler(item) {\n this.ajax1 = $.post('/admin/blog/history/restore', { hid: item.id }, (data, textStatus, xhr) => {\n if (data.success) {\n ea.publish(nsCons.EVENT_BLOG_CHANGED, { action: 'updated', blog: data.data });\n this.refreshHistory();\n toastr.success('博文历史记录还原成功!');\n } else {\n toastr.error(data.data, '博文历史记录还原失败!');\n }\n });\n }\n\n removeHandler(item) {\n this.ajax2 = $.post('/admin/blog/history/remove', { hid: item.id }, (data, textStatus, xhr) => {\n if (data.success) {\n this.refreshHistory();\n toastr.success('博文历史记录删除成功!');\n } else {\n toastr.error(data.data, '博文历史记录删除失败!');\n }\n });\n }\n\n diffHandler() {\n let list = [...this.oldHistories, this.blog];\n let chks = _.filter(list, 'checked');\n if (chks && chks.length > 1) {\n let f = chks[chks.length - 1];\n let s = chks[chks.length - 2];\n let fIndex = _.indexOf(list, f);\n let sIndex = _.indexOf(list, s);\n this.blogHistoryDiffVm.show(f, s, fIndex, sIndex);\n } else {\n toastr.error('请先选择要比较版本');\n }\n }\n}\n","import { bindable, containerless } from 'aurelia-framework';\r\n\r\n@containerless\r\nexport class EmBlogLeftSidebar {\r\n\r\n isHide = true;\r\n blogs = [];\r\n spaces = [];\r\n noSpaceBlogs = [];\r\n\r\n loginUser = nsCtx.loginUser;\r\n isSuper = nsCtx.isSuper;\r\n\r\n filter = ''; // 过滤查找条件\r\n\r\n spaceStow = {\r\n name: '我的收藏',\r\n open: false\r\n };\r\n\r\n /**\r\n * 构造函数\r\n */\r\n constructor() {\r\n this.subscribe = ea.subscribe(nsCons.EVENT_BLOG_CHANGED, (payload) => {\r\n if (payload.action == 'created') {\r\n this.blogs = [payload.blog, ...this.blogs];\r\n this.calcTree();\r\n ea.publish(nsCons.EVENT_APP_ROUTER_NAVIGATE, { to: `#/blog/${payload.blog.id}` });\r\n } else if (payload.action == 'updated') {\r\n _.extend(_.find(this.blogs, { id: payload.blog.id }), payload.blog);\r\n this.calcTree();\r\n } else if (payload.action == 'deleted') {\r\n this.blogStows = _.reject(this.blogStows, bs => bs.blog.id == payload.blog.id);\r\n this.blogs = _.reject(this.blogs, { id: payload.blog.id });\r\n this.calcTree();\r\n }\r\n });\r\n this.subscribe4 = ea.subscribe(nsCons.EVENT_SPACE_CHANGED, (payload) => {\r\n if (payload.action == 'created') {\r\n this.spaces = [payload.space, ...this.spaces];\r\n this.calcTree();\r\n } else if (payload.action == 'updated') {\r\n _.extend(_.find(this.spaces, { id: payload.space.id }), payload.space);\r\n this.calcTree();\r\n }\r\n });\r\n this.subscribe2 = ea.subscribe(nsCons.EVENT_BLOG_SWITCH, (payload) => {\r\n this.blog = _.find(this.blogs, { id: +nsCtx.blogId });\r\n });\r\n this.subscribe3 = ea.subscribe(nsCons.EVENT_BLOG_TOGGLE_SIDEBAR, (payload) => {\r\n this.isHide = payload;\r\n });\r\n this.subscribe5 = ea.subscribe(nsCons.EVENT_BLOG_STOW_CHANGED, (payload) => {\r\n this._refreshBlogStows();\r\n });\r\n\r\n this._doFilerDebounce = _.debounce(() => this._doFiler(), 120, { leading: true });\r\n }\r\n\r\n /**\r\n * 当数据绑定引擎从视图解除绑定时被调用\r\n */\r\n unbind() {\r\n this.subscribe.dispose();\r\n this.subscribe2.dispose();\r\n this.subscribe3.dispose();\r\n this.subscribe4.dispose();\r\n this.subscribe5.dispose();\r\n }\r\n\r\n /**\r\n * 当视图被附加到DOM中时被调用\r\n */\r\n attached() {\r\n\r\n this.refresh();\r\n this._refreshSysLinks();\r\n this._refreshBlogStows();\r\n }\r\n\r\n\r\n _refreshSysLinks() {\r\n $.get('/admin/link/listByApp', (data) => {\r\n if (data.success) {\r\n this.sysLinks = data.data;\r\n } else {\r\n this.sysLinks = [];\r\n }\r\n });\r\n }\r\n\r\n _refreshBlogStows() {\r\n $.get('/admin/blog/stow/listMy', (data) => {\r\n if (data.success) {\r\n this.blogStows = data.data;\r\n } else {\r\n toastr.error(data.data);\r\n }\r\n });\r\n }\r\n\r\n refresh() {\r\n $.when(this.getSpaces(), this.getBlogTree()).done(() => {\r\n this.calcTree();\r\n });\r\n }\r\n\r\n calcTree() {\r\n this.noSpaceBlogs = [];\r\n $.each(this.spaces, (index, space) => {\r\n space.blogs = [];\r\n $.each(this.blogs, (index, blog) => {\r\n if (blog.space) {\r\n if (blog.space.id === space.id) {\r\n space.blogs.push(blog);\r\n if (nsCtx.blogId == blog.id) {\r\n space.open = true;\r\n }\r\n }\r\n }\r\n });\r\n });\r\n\r\n this.noSpaceBlogs = _.filter(this.blogs, b => !b.space);\r\n }\r\n\r\n spaceToggleHandler(space) {\r\n space.open = !space.open;\r\n }\r\n\r\n getBlogTree() {\r\n return $.get('/admin/blog/listMy', (data) => {\r\n if (data.success) {\r\n this.blogs = data.data;\r\n this.blog = _.find(this.blogs, { id: +nsCtx.blogId });\r\n }\r\n });\r\n }\r\n\r\n getSpaces() {\r\n return $.get('/admin/space/listMy', {}, (data) => {\r\n if (data.success) {\r\n this.spaces = data.data;\r\n }\r\n });\r\n }\r\n\r\n editSpaceHandler(space) {\r\n this.spaceEditVm.show(space);\r\n }\r\n\r\n delSpaceHandler(space) {\r\n this.confirmMd.show({\r\n onapprove: () => {\r\n $.post('/admin/space/delete', {\r\n id: space.id\r\n }, (data) => {\r\n if (data.success) {\r\n toastr.success('删除空间成功!');\r\n this.spaces = _.reject(this.spaces, { id: space.id });\r\n } else {\r\n toastr.error(data.data, '删除空间失败!');\r\n }\r\n });\r\n }\r\n });\r\n }\r\n\r\n authSpaceHandler(space) {\r\n this.blogSpaceAuthVm.show('space', space);\r\n }\r\n\r\n clearFilterHandler() {\r\n this.filter = '';\r\n this._doFilerDebounce();\r\n }\r\n\r\n filterKeyupHandler(event) {\r\n this._doFilerDebounce();\r\n }\r\n\r\n _doFiler() {\r\n _.each(this.blogs, b => {\r\n if (!_.includes(_.toLower(b.title), _.toLower(this.filter))) {\r\n b._hidden = true;\r\n } else {\r\n b._hidden = false;\r\n }\r\n });\r\n\r\n _.each(this.spaces, s => {\r\n if (!_.some(s.blogs, b => !b._hidden)) {\r\n s._hidden = true;\r\n } else {\r\n s._hidden = false;\r\n s.open = true;\r\n }\r\n });\r\n\r\n _.each(this.blogStows, bs => {\r\n if (!_.includes(_.toLower(bs.blog.title), _.toLower(this.filter))) {\r\n bs._hidden = true;\r\n } else {\r\n bs._hidden = false;\r\n }\r\n });\r\n\r\n if (!_.some(this.blogStows, bs => !bs._hidden)) {\r\n this.spaceStow.open = false;\r\n } else {\r\n this.spaceStow.open = true;\r\n }\r\n\r\n if (!this.filter) {\r\n _.each(this.spaces, s => {\r\n if (_.find(s.blogs, { id: +nsCtx.blogId })) {\r\n s.open = true;\r\n } else {\r\n s.open = false;\r\n }\r\n });\r\n this.spaceStow.open = false;\r\n }\r\n }\r\n\r\n sysLinkHandler(item) {\r\n $.post('/admin/link/count/inc', { id: item.id });\r\n return true;\r\n }\r\n}\r\n","import { bindable, containerless } from 'aurelia-framework';\n\n@containerless\nexport class EmBlogRightSidebar {\n\n /**\n * 构造函数\n */\n constructor() {\n this.subscribe = ea.subscribe(nsCons.EVENT_BLOG_RIGHT_SIDEBAR_TOGGLE, (payload) => {\n if (payload.action == 'dir') {\n $(this.dirRef).empty().append(payload.dir);\n }\n });\n }\n\n /**\n * 当数据绑定引擎从视图解除绑定时被调用\n */\n unbind() {\n this.subscribe.dispose();\n }\n}\n","import { bindable, containerless } from 'aurelia-framework';\r\n\r\n@containerless\r\nexport class EmBlogSave {\r\n\r\n @bindable trigger;\r\n\r\n loginUser = nsCtx.loginUser;\r\n isSuper = nsCtx.isSuper;\r\n\r\n triggerChanged() {\r\n\r\n $(this.trigger).click((event) => {\r\n this.show();\r\n });\r\n\r\n }\r\n\r\n /**\r\n * 构造函数\r\n */\r\n constructor() {\r\n this.subscribe = ea.subscribe(nsCons.EVENT_BLOG_SAVE, (payload) => {\r\n this.blogInfo = payload;\r\n this.show();\r\n });\r\n }\r\n\r\n /**\r\n * 当视图被附加到DOM中时被调用\r\n */\r\n attached() {\r\n $(this.chk).checkbox();\r\n }\r\n\r\n /**\r\n * 当数据绑定引擎从视图解除绑定时被调用\r\n */\r\n unbind() {\r\n this.subscribe.dispose();\r\n }\r\n\r\n show() {\r\n this.emModal.show({ hideOnApprove: false, autoDimmer: true });\r\n }\r\n\r\n showHandler() {\r\n $(this.chk).checkbox('set unchecked');\r\n $.get('/admin/space/listMy', (data) => {\r\n if (data.success) {\r\n this.spaces = data.data;\r\n }\r\n });\r\n }\r\n\r\n approveHandler(modal) {\r\n\r\n var html = utils.md2html(this.blogInfo.content);\r\n let users = [nsCtx.memberAll, ...(window.tmsUsers ? tmsUsers : [])];\r\n\r\n let spaceId = $(this.spacesRef).dropdown('get value');\r\n\r\n localStorage && localStorage.setItem(nsCons.KEY_BLOG_COMMON_SPACE, spaceId);\r\n\r\n $.post(`/admin/blog/create`, {\r\n url: utils.getBasePath(),\r\n usernames: utils.parseUsernames(this.blogInfo.content, users).join(','),\r\n title: this.blogInfo.title,\r\n content: this.blogInfo.content,\r\n spaceId: spaceId,\r\n privated: $(this.chk).checkbox('is checked'),\r\n contentHtml: html\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n this.blog = data.data;\r\n toastr.success('博文保存成功!');\r\n ea.publish(nsCons.EVENT_BLOG_CHANGED, {\r\n action: 'created',\r\n blog: this.blog\r\n });\r\n modal.hide();\r\n $('a[href=\"#modaal-blog-write\"]').modaal('close');\r\n } else {\r\n toastr.error(data.data, '博文保存失败!');\r\n }\r\n });\r\n }\r\n\r\n initSpacesHandler(last) {\r\n if (last) {\r\n _.defer(() => {\r\n $(this.spacesRef).dropdown('clear');\r\n if (localStorage) {\r\n let sid = localStorage.getItem(nsCons.KEY_BLOG_COMMON_SPACE);\r\n if (sid) {\r\n $(this.spacesRef).dropdown('set selected', sid);\r\n }\r\n }\r\n });\r\n }\r\n }\r\n}\r\n","import { bindable, containerless } from 'aurelia-framework';\r\n\r\n@containerless\r\nexport class EmBlogShare {\r\n\r\n shares = [];\r\n desc = '';\r\n\r\n @bindable blog;\r\n\r\n basePath = utils.getBasePath();\r\n\r\n /**\r\n * 当视图被附加到DOM中时被调用\r\n */\r\n attached() {\r\n $(this.searchRef)\r\n .search({\r\n minCharacters: 2,\r\n cache: false,\r\n selectFirstResult: true,\r\n showNoResults: false,\r\n onSelect: (result, response) => {\r\n result.item._id = _.uniqueId('share-item-');\r\n result.item._type = result.item.username ? 'user' : 'channel';\r\n this.shares.push(result.item);\r\n _.defer(() => { $(this.inputSearchRef).val(''); });\r\n },\r\n apiSettings: {\r\n onResponse: (resp) => {\r\n var response = {\r\n results: []\r\n };\r\n $.each(resp.data.users, (index, item) => {\r\n if (!_.find(_.filter(this.shares, c => c._type == 'user'), { username: item.username })) {\r\n response.results.push({\r\n item: item,\r\n title: ` ${item.name} (${item.username})`,\r\n });\r\n }\r\n });\r\n $.each(resp.data.channels, (index, item) => {\r\n if (!_.find(_.filter(this.shares, c => c._type == 'channel'), { name: item.name })) {\r\n response.results.push({\r\n item: item,\r\n title: ` ${item.title} (${item.name})`,\r\n });\r\n }\r\n });\r\n return response;\r\n },\r\n url: '/admin/blog/share/to/search?search={query}'\r\n }\r\n });\r\n $(this.shareRef).popup({\r\n on: 'click',\r\n inline: true,\r\n silent: true,\r\n position: 'bottom right',\r\n jitter: 300,\r\n delay: {\r\n show: 300,\r\n hide: 300\r\n },\r\n onVisible: () => {\r\n $(this.inputSearchRef).focus();\r\n }\r\n });\r\n }\r\n\r\n shareSearchKeyupHandler(event) {\r\n if (event.keyCode === 13 && !$(this.searchRef).search('is visible')) {\r\n let val = $(this.inputSearchRef).val();\r\n if (utils.isMail(val)) {\r\n if (!_.find(_.filter(this.shares, c => c._type == 'mail'), { mail: val })) {\r\n this.shares.push({\r\n _id: _.uniqueId('share-item-'),\r\n _type: 'mail',\r\n mail: val\r\n });\r\n $(this.inputSearchRef).val('');\r\n }\r\n }\r\n }\r\n }\r\n\r\n show() {\r\n $(this.shareRef).popup('show');\r\n }\r\n\r\n removeShareHandler(item) {\r\n this.shares = _.reject(this.shares, { _id: item._id });\r\n }\r\n\r\n cancelHandler() {\r\n this._reset();\r\n }\r\n\r\n _reset() {\r\n this.shares = [];\r\n this.desc = '';\r\n $(this.inputSearchRef).val('');\r\n $(this.shareRef).popup('hide');\r\n }\r\n\r\n shareHandler() {\r\n\r\n if (this.shares.length === 0) {\r\n toastr.error('请先指定博文分享用户或者频道或者邮箱!');\r\n return;\r\n }\r\n\r\n this.ajaxS = $.post('/admin/blog/share', {\r\n basePath: utils.getBasePath(),\r\n id: this.blog.id,\r\n desc: this.desc,\r\n title: this.blog.title,\r\n html: utils.md2html(this.blog.content),\r\n users: _.chain(this.shares).filter(item => item._type == 'user').map('username').join().value(),\r\n channels: _.chain(this.shares).filter(item => item._type == 'channel').map('name').join().value(),\r\n mails: _.chain(this.shares).filter(item => item._type == 'mail').map('mail').join().value()\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n this._reset();\r\n toastr.success('博文分享成功!');\r\n } else {\r\n toastr.error(data.data, '博文分享失败!');\r\n }\r\n });\r\n }\r\n}\r\n","import { bindable, containerless } from 'aurelia-framework';\r\n\r\n@containerless\r\nexport class EmBlogSpaceAuth {\r\n\r\n shares = [];\r\n\r\n type; // blog | space\r\n authO;\r\n\r\n _isBlog() {\r\n return this.type == 'blog';\r\n }\r\n\r\n /**\r\n * 当视图被附加到DOM中时被调用\r\n */\r\n attached() {\r\n $(this.chk).checkbox({ // privated\r\n onChange: () => {\r\n if (this._isBlog()) {\r\n $.post('/admin/blog/privated/update', {\r\n id: this.authO.id,\r\n privated: $(this.chk).checkbox('is checked')\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n _.extend(this.authO, data.data);\r\n ea.publish(nsCons.EVENT_BLOG_CHANGED, {\r\n action: 'updated',\r\n blog: data.data\r\n });\r\n toastr.success('更新博文可见性成功!');\r\n } else {\r\n toastr.error(data.data, '更新博文可见性失败!');\r\n }\r\n });\r\n } else {\r\n $.post('/admin/space/update', {\r\n id: this.authO.id,\r\n privated: $(this.chk).checkbox('is checked')\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n _.extend(this.authO, data.data);\r\n ea.publish(nsCons.EVENT_SPACE_CHANGED, {\r\n action: 'updated',\r\n space: data.data\r\n });\r\n toastr.success('更新空间可见性成功!');\r\n } else {\r\n toastr.error(data.data, '更新空间可见性失败!');\r\n }\r\n });\r\n }\r\n }\r\n });\r\n $(this.chk2).checkbox({ // opened\r\n onChange: () => {\r\n if (this._isBlog()) {\r\n $.post('/admin/blog/opened/update', {\r\n id: this.authO.id,\r\n opened: $(this.chk2).checkbox('is checked')\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n _.extend(this.authO, data.data);\r\n ea.publish(nsCons.EVENT_BLOG_CHANGED, {\r\n action: 'updated',\r\n blog: data.data\r\n });\r\n toastr.success('更新博文可见性成功!');\r\n } else {\r\n toastr.error(data.data, '更新博文可见性失败!');\r\n }\r\n });\r\n } else {\r\n $.post('/admin/space/update', {\r\n id: this.authO.id,\r\n opened: $(this.chk2).checkbox('is checked')\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n _.extend(this.authO, data.data);\r\n ea.publish(nsCons.EVENT_SPACE_CHANGED, {\r\n action: 'updated',\r\n space: data.data\r\n });\r\n toastr.success('更新空间可见性成功!');\r\n } else {\r\n toastr.error(data.data, '更新空间可见性失败!');\r\n }\r\n });\r\n }\r\n }\r\n });\r\n\r\n $(this.searchRef)\r\n .search({\r\n minCharacters: 2,\r\n cache: false,\r\n selectFirstResult: true,\r\n onSelect: (result, response) => {\r\n result.item._id = _.uniqueId('share-item-');\r\n _.defer(() => { $(this.inputSearchRef).val(''); });\r\n\r\n let param = { id: this.authO.id };\r\n if (result.item.username) {\r\n _.extend(param, { users: result.item.username });\r\n } else {\r\n _.extend(param, { channels: result.item.id });\r\n }\r\n\r\n if (this._isBlog()) {\r\n $.post('/admin/blog/auth/add', param, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n this.shares.push(result.item);\r\n this.authO.blogAuthorities = data.data.blogAuthorities;\r\n } else {\r\n toastr.error(data.data);\r\n }\r\n });\r\n } else {\r\n $.post('/admin/space/auth/add', param, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n this.shares.push(result.item);\r\n this.authO.spaceAuthorities = data.data.spaceAuthorities;\r\n } else {\r\n toastr.error(data.data);\r\n }\r\n });\r\n }\r\n },\r\n apiSettings: {\r\n onResponse: (resp) => {\r\n var response = {\r\n results: []\r\n };\r\n $.each(resp.data.users, (index, item) => {\r\n if (!_.find(this.shares, { username: item.username })) {\r\n response.results.push({\r\n item: item,\r\n title: ` ${item.name} (${item.username})`,\r\n });\r\n }\r\n });\r\n $.each(resp.data.channels, (index, item) => {\r\n if (!_.find(_.filter(this.shares, c => !c.username), { name: item.name })) {\r\n response.results.push({\r\n item: item,\r\n title: ` ${item.title} (${item.name})`,\r\n });\r\n }\r\n });\r\n return response;\r\n },\r\n url: '/admin/blog/share/to/search?search={query}'\r\n }\r\n });\r\n }\r\n\r\n removeShareHandler(item) {\r\n let param = { id: this.authO.id };\r\n if (item.username) {\r\n _.extend(param, { users: item.username });\r\n } else {\r\n _.extend(param, { channels: item.id });\r\n }\r\n\r\n if (this._isBlog()) {\r\n $.post('/admin/blog/auth/remove', param, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n this.shares = _.reject(this.shares, { _id: item._id });\r\n this.authO.blogAuthorities = data.data.blogAuthorities;\r\n } else {\r\n toastr.error(data.data);\r\n }\r\n });\r\n } else {\r\n $.post('/admin/space/auth/remove', param, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n this.shares = _.reject(this.shares, { _id: item._id });\r\n this.authO.spaceAuthorities = data.data.spaceAuthorities;\r\n } else {\r\n toastr.error(data.data);\r\n }\r\n });\r\n }\r\n }\r\n\r\n _reset() {\r\n this.shares = [];\r\n $(this.inputSearchRef).val('');\r\n }\r\n\r\n show(type, authO) {\r\n this.type = type;\r\n this.authO = authO;\r\n this.emModal.show({ hideOnApprove: true, autoDimmer: false });\r\n }\r\n\r\n showHandler() {\r\n this._reset();\r\n $(this.chk).checkbox(this.authO.privated ? 'set checked' : 'set unchecked');\r\n $(this.chk2).checkbox(this.authO.opened ? 'set checked' : 'set unchecked');\r\n let auths;\r\n if (this._isBlog()) {\r\n auths = this.authO.blogAuthorities;\r\n } else {\r\n auths = this.authO.spaceAuthorities;\r\n }\r\n _.forEach(auths, (item) => {\r\n let share = item.user ? item.user : item.channel;\r\n share._id = _.uniqueId('share-item-');\r\n this.shares.push(share);\r\n });\r\n }\r\n\r\n approveHandler() {\r\n\r\n }\r\n}\r\n","import { bindable, containerless } from 'aurelia-framework';\n\n@containerless\nexport class EmBlogSpaceCreate {\n\n /**\n * 当视图被附加到DOM中时被调用\n */\n attached() {\n $(this.chk).checkbox();\n }\n\n createHandler() {\n this.ajax = $.post('/admin/space/create', {\n name: this.name,\n desc: this.desc,\n privated: $(this.chk).checkbox('is checked'),\n }, (data, textStatus, xhr) => {\n if (data.success) {\n this.name = '';\n this.desc = '';\n $(this.chk).checkbox('set unchecked');\n toastr.success('空间创建成功!');\n $(this.ppRef).popup('hide');\n ea.publish(nsCons.EVENT_SPACE_CHANGED, { action: 'created', space: data.data });\n } else {\n toastr.error(data.data, '空间创建失败!');\n }\n });\n }\n}\n","import { bindable, containerless } from 'aurelia-framework';\n\n@containerless\nexport class EmBlogSpaceEdit {\n\n space;\n\n /**\n * 当视图被附加到DOM中时被调用\n */\n attached() {\n $(this.chk).checkbox();\n }\n\n show(space) {\n this.space = space;\n this.emModal.show({ hideOnApprove: false, autoDimmer: true });\n }\n\n showHandler() {\n $.get('/admin/space/get', {\n id: this.space.id\n }, (data) => {\n if (data.success) {\n this.space = data.data;\n $(this.chk).checkbox(this.space.privated ? 'set checked' : 'set unchecked');\n }\n });\n }\n\n approveHandler(modal) {\n $.post('/admin/space/update', {\n id: this.space.id,\n name: this.space.name,\n desc: this.space.description,\n privated: $(this.chk).checkbox('is checked')\n }, (data, textStatus, xhr) => {\n if (data.success) {\n toastr.success('空间更新成功!');\n ea.publish(nsCons.EVENT_SPACE_CHANGED, {\n action: 'updated',\n space: data.data\n });\n modal.hide();\n } else {\n toastr.error(data.data, '空间更新失败!');\n }\n });\n }\n}\n","import { bindable, containerless } from 'aurelia-framework';\r\n\r\n@containerless\r\nexport class EmBlogSpaceUpdate {\r\n\r\n blog;\r\n\r\n loginUser = nsCtx.loginUser;\r\n isSuper = nsCtx.isSuper;\r\n\r\n /**\r\n * 当视图被附加到DOM中时被调用\r\n */\r\n attached() {}\r\n\r\n show(blog) {\r\n this.blog = blog;\r\n this.emModal.show({ hideOnApprove: false, autoDimmer: true });\r\n }\r\n\r\n showHandler() {\r\n $.get('/admin/space/listMy', (data) => {\r\n if (data.success) {\r\n this.spaces = data.data;\r\n }\r\n });\r\n }\r\n\r\n approveHandler(modal) {\r\n let sid = $(this.spacesRef).dropdown('get value');\r\n $.post('/admin/blog/space/update', {\r\n id: this.blog.id,\r\n sid: sid ? sid : null,\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n toastr.success('博文空间更新成功!');\r\n if (!data.data.space) {\r\n data.data.space = null; // 确保_.extend(oldBlog, blog)更新空间属性\r\n }\r\n ea.publish(nsCons.EVENT_BLOG_CHANGED, {\r\n action: 'updated',\r\n blog: data.data\r\n });\r\n modal.hide();\r\n } else {\r\n toastr.error(data.data, '博文空间更新失败!');\r\n }\r\n });\r\n }\r\n\r\n initSpacesHandler(last) {\r\n if (last) {\r\n _.defer(() => {\r\n $(this.spacesRef).dropdown('clear').dropdown('set selected', this.blog.space ? this.blog.space.id + '' : '');\r\n });\r\n }\r\n }\r\n}\r\n","import { bindable, containerless } from 'aurelia-framework';\r\nimport 'timeago';\r\nlet tg = timeago();\r\n\r\n@containerless\r\nexport class EmBlogTopMenu {\r\n\r\n isHide = true;\r\n\r\n loginUser = nsCtx.loginUser;\r\n\r\n /**\r\n * 构造函数\r\n */\r\n constructor() {\r\n this.subscribe = ea.subscribe(nsCons.EVENT_BLOG_SWITCH, (payload) => {\r\n this.toggleHandler(true);\r\n });\r\n this.subscribe = ea.subscribe(nsCons.EVENT_BLOG_LEFT_SIDEBAR_TOGGLE, (payload) => {\r\n this.toggleHandler(payload.isHide);\r\n });\r\n }\r\n\r\n /**\r\n * 当数据绑定引擎从视图解除绑定时被调用\r\n */\r\n unbind() {\r\n this.subscribe.dispose();\r\n }\r\n\r\n /**\r\n * 当视图被附加到DOM中时被调用\r\n */\r\n attached() {\r\n $(this.logoRef).on('mouseenter', (event) => {\r\n $(this.logoRef).animateCss('flip');\r\n });\r\n\r\n $(this.searchRef)\r\n .search({\r\n type: 'category',\r\n minCharacters: 2,\r\n selectFirstResult: true,\r\n onSelect: (result, response) => {\r\n $(this.searchRef).search('hide results');\r\n _.defer(() => {\r\n $(this.searchRef).find('input').blur();\r\n ea.publish(nsCons.EVENT_APP_ROUTER_NAVIGATE, { to: result.url });\r\n });\r\n return false;\r\n },\r\n apiSettings: {\r\n onResponse: function(resp) {\r\n // var response = {\r\n // results: []\r\n // };\r\n // $.each(resp.data, (index, item) => {\r\n // response.results.push({\r\n // title: item.title,\r\n // // description: utils.abbreviate(item.content, 65),\r\n // description: `${item.creator.name} 创建于 ${tg.format(item.createDate, 'zh_CN')}`,\r\n // url: `#/blog/${item.id}`\r\n // });\r\n // });\r\n var response = {\r\n results: {\r\n blogs: {\r\n name: `博文 (${resp.data.blogs.length})`,\r\n results: []\r\n },\r\n comments: {\r\n name: `评论 (${resp.data.comments.length})`,\r\n results: []\r\n }\r\n }\r\n };\r\n $.each(resp.data.blogs, (index, item) => {\r\n response.results.blogs.results.push({\r\n title: item.title,\r\n // description: utils.abbreviate(item.content, 65),\r\n description: `${item.creator.name} 创建于 ${tg.format(item.createDate, 'zh_CN')}`,\r\n url: `#/blog/${item.id}`\r\n });\r\n });\r\n $.each(resp.data.comments, (index, item) => {\r\n response.results.comments.results.push({\r\n title: `#/blog/${item.targetId}?cid=${item.id}`,\r\n // description: item.content,\r\n description: `${item.creator.name} 创建于 ${tg.format(item.createDate, 'zh_CN')}
    ${utils.encodeHtml(item.content)}`,\r\n url: `#/blog/${item.targetId}?cid=${item.id}`\r\n });\r\n });\r\n return response;\r\n },\r\n url: '/admin/blog/search?search={query}&comment=true&ellipsis=60'\r\n }\r\n });\r\n\r\n this._refreshSysLinks();\r\n\r\n if (nsCtx.blogId == 'create') {\r\n _.defer(() => { $('a[href=\"#modaal-blog-write\"]').click(); });\r\n }\r\n }\r\n\r\n _refreshSysLinks() {\r\n $.get('/admin/link/listByApp', (data) => {\r\n if (data.success) {\r\n this.sysLinks = data.data;\r\n } else {\r\n this.sysLinks = [];\r\n }\r\n });\r\n }\r\n\r\n searchBlurHandler() {\r\n this.isSearchFocus = false;\r\n }\r\n\r\n searchFocusHandler() {\r\n this.isSearchFocus = true;\r\n }\r\n\r\n toggleHandler(isHide) {\r\n if (this.isHide === isHide) {\r\n return;\r\n }\r\n this.isHide = isHide ? isHide : !this.isHide;\r\n ea.publish(nsCons.EVENT_BLOG_TOGGLE_SIDEBAR, this.isHide);\r\n }\r\n\r\n userEditHandler() {\r\n this.userEditMd.show();\r\n }\r\n\r\n logoutHandler() {\r\n $.post('/admin/logout').always(() => {\r\n utils.redirect2Login();\r\n });\r\n }\r\n\r\n searchKeyupHandler(event) {\r\n if (event.keyCode == 27) {\r\n $(this.searchRef).search('set value', '');\r\n }\r\n }\r\n}\r\n","import { bindable, containerless } from 'aurelia-framework';\r\nimport {\r\n default as SimpleMDE\r\n} from 'simplemde';\r\nimport {\r\n default as Dropzone\r\n} from 'dropzone';\r\nimport emojis from 'common/common-emoji';\r\n\r\n@containerless\r\nexport class EmBlogWrite {\r\n\r\n @bindable members;\r\n\r\n static NAME = 'blog-create';\r\n\r\n /**\r\n * 构造函数\r\n */\r\n constructor() {\r\n\r\n this.subscribe = ea.subscribe(nsCons.EVENT_MODAAL_AFTER_OPEN, (payload) => {\r\n if (payload.id == EmBlogWrite.NAME) {\r\n nsCtx.isModaalOpening = true;\r\n this.init();\r\n }\r\n });\r\n this.subscribe2 = ea.subscribe(nsCons.EVENT_MODAAL_BEFORE_CLOSE, (payload) => {\r\n if (payload.id == EmBlogWrite.NAME) {\r\n this.destroy();\r\n nsCtx.isModaalOpening = false;\r\n }\r\n });\r\n this.subscribe3 = ea.subscribe(nsCons.EVENT_BLOG_ACTION, (payload) => {\r\n this.action = payload.action;\r\n $.get('/admin/blog/get', { id: payload.id }, (data) => {\r\n if (data.success) {\r\n this.blog = data.data;\r\n $('a[href=\"#modaal-blog-write\"]').click();\r\n }\r\n });\r\n\r\n });\r\n this.subscribe4 = ea.subscribe(nsCons.EVENT_BLOG_CHANGED, (payload) => {\r\n this.action = payload.action;\r\n if (payload.action === 'created') {\r\n this.blog = payload.blog;\r\n $('#blog-save-btn span').text('更新');\r\n $('#blog-save-btn').attr('title', 'ctrl+click更新后关闭窗口');\r\n }\r\n\r\n });\r\n\r\n this.blogTitleInputKeyupInit = _.once(() => {\r\n $('#blog-title-input').keyup((e) => {\r\n let $t = $(e.currentTarget);\r\n\r\n if (!e.shiftKey && e.keyCode == 13) { // Enter\r\n if (this.simplemde.value()) {\r\n this.save(e, true);\r\n } else {\r\n this.simplemde.codemirror.focus();\r\n }\r\n\r\n } else if (e.shiftKey && e.keyCode == 13) { // Esc\r\n this.simplemde.codemirror.focus();\r\n } else if (e.keyCode == 27) { // Esc\r\n $t.val('');\r\n }\r\n });\r\n });\r\n }\r\n\r\n /**\r\n * 当数据绑定引擎从视图解除绑定时被调用\r\n */\r\n unbind() {\r\n this.subscribe.dispose();\r\n this.subscribe2.dispose();\r\n this.subscribe3.dispose();\r\n this.subscribe4.dispose();\r\n }\r\n\r\n _reset() {\r\n this.action = null;\r\n this.blog = null;\r\n $('#blog-save-btn span').text('保存');\r\n $('#blog-save-btn').attr('title', 'ctrl+click快速保存');\r\n $('#blog-title-input').val('');\r\n this.simplemde.value('');\r\n this.simplemde.toTextArea();\r\n this.simplemde = null;\r\n }\r\n\r\n _editInit() {\r\n $('#blog-title-input').val(this.blog.title);\r\n this.simplemde.value(this.blog.content);\r\n $('#blog-save-btn span').text('更新');\r\n $('#blog-save-btn').attr('title', 'ctrl+click更新后关闭窗口');\r\n }\r\n\r\n _writeInit() {\r\n let ccid = utils.urlQuery('ccid'); // chat channel id\r\n let cdid = utils.urlQuery('cdid'); // chat direct id\r\n let url = null;\r\n let id = null;\r\n if (ccid) {\r\n url = `/admin/chat/channel/get`;\r\n id = ccid;\r\n } else if (cdid) {\r\n url = `/admin/chat/direct/get`;\r\n id = cdid;\r\n }\r\n\r\n if (url) {\r\n $.get(url, { id: +id }, (data) => {\r\n if (data.success) {\r\n this.simplemde.value(data.data.content);\r\n let val = $('#blog-title-input').val();\r\n if (!val) {\r\n let ms = /#{1,6}[\\s]+(.+)\\n?/g.exec(data.data.content);\r\n if (ms && ms.length > 1) {\r\n $('#blog-title-input').val(ms[1]);\r\n }\r\n }\r\n } else {\r\n toastr.error(data.data, '获取沟通消息失败!');\r\n }\r\n });\r\n }\r\n }\r\n\r\n _copyInit() {\r\n $('#blog-title-input').val(this.blog.title + ' (副本)');\r\n this.simplemde.value(this.blog.content);\r\n this.blog = null;\r\n }\r\n\r\n init() {\r\n\r\n this.simplemde = new SimpleMDE({\r\n element: $('#txt-blog-write')[0],\r\n spellChecker: false,\r\n // status: false,\r\n // autofocus: true,\r\n // toolbar: false,\r\n // forceSync: true,\r\n // autoDownloadFontAwesome: false,\r\n toolbar: [{\r\n name: \"bold\",\r\n action: SimpleMDE.toggleBold,\r\n className: \"fa fa-bold\",\r\n title: \"粗体\",\r\n }, {\r\n name: \"italic\",\r\n action: SimpleMDE.toggleItalic,\r\n className: \"fa fa-italic\",\r\n title: \"斜体\",\r\n }, {\r\n name: \"strikethrough\",\r\n action: SimpleMDE.toggleStrikethrough,\r\n className: \"fa fa-strikethrough\",\r\n title: \"删除线\",\r\n }, {\r\n name: \"heading\",\r\n action: SimpleMDE.toggleHeadingSmaller,\r\n className: \"fa fa-header\",\r\n title: \"标题\",\r\n }, {\r\n name: \"heading-smaller\",\r\n action: SimpleMDE.toggleHeadingSmaller,\r\n className: \"fa fa-header fa-header-x fa-header-smaller\",\r\n title: \"变小标题\",\r\n }, {\r\n name: \"heading-bigger\",\r\n action: SimpleMDE.toggleHeadingBigger,\r\n className: \"fa fa-header fa-header-x fa-header-bigger\",\r\n title: \"变大标题\",\r\n }, \"|\", {\r\n name: \"code\",\r\n action: SimpleMDE.toggleCodeBlock,\r\n className: \"fa fa-code\",\r\n title: \"代码\",\r\n }, {\r\n name: \"quote\",\r\n action: SimpleMDE.toggleBlockquote,\r\n className: \"fa fa-quote-left\",\r\n title: \"引用\",\r\n }, {\r\n name: \"unordered-list\",\r\n action: SimpleMDE.toggleUnorderedList,\r\n className: \"fa fa-list-ul\",\r\n title: \"无序列表\",\r\n }, {\r\n name: \"ordered-list\",\r\n action: SimpleMDE.toggleOrderedList,\r\n className: \"fa fa-list-ol\",\r\n title: \"有序列表\",\r\n }, {\r\n name: \"tasks\",\r\n action: (editor) => {\r\n this.insertContent('- [ ] 未完成任务\\n- [x] 已完成任务');\r\n },\r\n className: \"fa fa-check-square-o \",\r\n title: \"任务列表\",\r\n }, {\r\n name: \"details\",\r\n action: (editor) => {\r\n this.insertContent('
    \\n标题\\n

    详情内容

    \\n
    ');\r\n },\r\n className: \"fa fa-play \",\r\n title: \"折叠详情\",\r\n }, \"|\", {\r\n name: \"link\",\r\n action: SimpleMDE.drawLink,\r\n className: \"fa fa-link\",\r\n title: \"创建链接\",\r\n }, {\r\n name: \"image\",\r\n action: SimpleMDE.drawImage,\r\n className: \"fa fa-picture-o\",\r\n title: \"插入图片\",\r\n }, {\r\n name: \"table\",\r\n action: SimpleMDE.drawTable,\r\n className: \"fa fa-table\",\r\n title: \"插入表格\",\r\n }, {\r\n name: \"horizontal-rule\",\r\n action: SimpleMDE.drawHorizontalRule,\r\n className: \"fa fa-minus\",\r\n title: \"插入水平分割线\",\r\n }, \"|\", {\r\n name: \"upload\",\r\n action: function(editor) {},\r\n className: \"fa fa-upload\",\r\n title: \"上传文件\",\r\n }, \"|\", {\r\n name: \"preview\",\r\n action: SimpleMDE.togglePreview,\r\n className: \"fa fa-eye no-disable\",\r\n title: \"切换预览\",\r\n }, {\r\n name: \"side-by-side\",\r\n action: SimpleMDE.toggleSideBySide,\r\n className: \"fa fa-columns no-disable no-mobile\",\r\n title: \"实时预览\",\r\n }, {\r\n name: \"fullscreen\",\r\n action: SimpleMDE.toggleFullScreen,\r\n className: \"fa fa-arrows-alt no-disable no-mobile\",\r\n title: \"全屏\",\r\n }, {\r\n name: \"guide\",\r\n action: 'https://simplemde.com/markdown-guide',\r\n className: \"fa fa-question-circle\",\r\n title: \"Markdown指南\",\r\n }\r\n\r\n ],\r\n insertTexts: {\r\n table: [\"\", \"\\n\\n| 列1 | 列2 | 列3 |\\n| ------ | ------ | ------ |\\n| 文本 | 文本 | 文本 |\\n\\n\"],\r\n },\r\n previewRender: (plainText, preview) => { // Async method\r\n if (emojify) {\r\n plainText = emojify.replace(plainText);\r\n }\r\n return marked(utils.preParse(plainText));\r\n },\r\n });\r\n\r\n this.simplemde.codemirror.on('keyup', (cm, e) => {\r\n if (e.ctrlKey && e.keyCode == 13) { // Ctrl+Enter\r\n this.save(e, true);\r\n } else if (e.keyCode == 27) { // Esc\r\n this.simplemde.value('');\r\n } else if (e.keyCode == 13) { // Enter\r\n let val = $('#blog-title-input').val();\r\n if (!val) {\r\n let ms = /#{1,6}[\\s]+(.+)\\n?/g.exec(this.simplemde.value());\r\n if (ms && ms.length > 1) {\r\n $('#blog-title-input').val(ms[1]);\r\n }\r\n }\r\n }\r\n });\r\n\r\n this.$chatMsgInputRef = $('#txt-blog-write-wrapper').find('.CodeMirror textarea');\r\n if (this.$chatMsgInputRef.size() === 0) {\r\n this.$chatMsgInputRef = $('#txt-blog-write-wrapper').find('.CodeMirror [contenteditable=\"true\"]');\r\n }\r\n\r\n if (this.action == 'edit') { // edit\r\n this._editInit();\r\n } else if (this.action == 'copy') {\r\n this._copyInit();\r\n } else {\r\n this._writeInit();\r\n }\r\n\r\n $('#blog-title-input').focus();\r\n\r\n this.initPaste();\r\n this.initTextcomplete();\r\n\r\n this.initUploadDropzone($('.CodeMirror-wrap', '#txt-blog-write-wrapper'), () => {\r\n return this.$chatMsgInputRef\r\n }, false);\r\n\r\n this.initUploadDropzone($('.editor-toolbar .fa.fa-upload', '#txt-blog-write-wrapper'), () => {\r\n return this.$chatMsgInputRef\r\n }, true);\r\n\r\n this.blogTitleInputKeyupInit();\r\n\r\n }\r\n\r\n close() {\r\n $('a[href=\"#modaal-blog-write\"]').modaal('close');\r\n }\r\n\r\n initTextcomplete() {\r\n\r\n $(this.$chatMsgInputRef).textcomplete([{ // @user\r\n match: /(^|\\s)@(\\w*)$/,\r\n search: (term, callback) => {\r\n callback($.map(nsCtx.users, (member) => {\r\n return (member.enabled && member.username.indexOf(term) >= 0) ? member.username : null;\r\n }));\r\n },\r\n template: (value, term) => {\r\n let user = _.find(nsCtx.users, { username: value });\r\n return `${user.name} - ${user.mails} (${user.username})`;\r\n },\r\n replace: (value) => {\r\n return `$1{~${value}}`;\r\n }\r\n }, { // emoji\r\n match: /(^|\\s):([\\+\\-\\w]*)$/,\r\n search: function(term, callback) {\r\n callback($.map(emojis, (emoji) => {\r\n return _.some(emoji.split('_'), (item) => {\r\n return item.indexOf(term) === 0;\r\n }) ? emoji : null;\r\n }));\r\n },\r\n template: (value, term) => {\r\n if (value == 'search') {\r\n return `表情查找 - :search`;\r\n }\r\n let emojiKey = `:${value}:`;\r\n return `${emojify.replace(emojiKey)} - ${emojiKey}`;\r\n },\r\n replace: (value) => {\r\n if (this.tipsActionHandler(value)) {\r\n return '$1:' + value + ': ';\r\n } else {\r\n return '';\r\n }\r\n }\r\n }], {\r\n appendTo: '.tms-blog-write-status-bar',\r\n maxCount: 5\r\n });\r\n\r\n this.simplemde.codemirror.on('keydown', (cm, e) => {\r\n if (_.includes([13, 38, 40], e.keyCode) && this.isTipsShow()) { // enter | up | down\r\n e.preventDefault();\r\n }\r\n });\r\n }\r\n\r\n isTipsShow() {\r\n return $('.tms-blog-write-status-bar').find('.textcomplete-dropdown:visible').size() === 1;\r\n }\r\n\r\n tipsActionHandler(value) {\r\n\r\n if (value == 'search') {\r\n _.delay(() => { utils.openNewWin(nsCons.STR_EMOJI_SEARCH_URL); }, 200);\r\n } else {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n initPaste() {\r\n\r\n let $paste;\r\n if (this.$chatMsgInputRef.is('textarea')) {\r\n $paste = $(this.$chatMsgInputRef).pastableTextarea();\r\n } else {\r\n $paste = $(this.$chatMsgInputRef).pastableContenteditable();\r\n }\r\n\r\n $paste && ($paste.on('pasteImage', (ev, data) => {\r\n\r\n $.post('/admin/file/base64', {\r\n dataURL: data.dataURL,\r\n type: data.blob.type,\r\n toType: 'Blog'\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n this.insertContent('![{name}]({baseURL}{path}{uuidName})'\r\n .replace(/\\{name\\}/g, data.data.name)\r\n .replace(/\\{baseURL\\}/g, utils.getBaseUrl() + '/')\r\n .replace(/\\{path\\}/g, data.data.path)\r\n .replace(/\\{uuidName\\}/g, data.data.uuidName));\r\n }\r\n });\r\n }).on('pasteImageError', (ev, data) => {\r\n toastr.error(data.message, '剪贴板粘贴图片错误!');\r\n }));\r\n }\r\n\r\n initUploadDropzone(domRef, getInputTargetCb, clickable) {\r\n\r\n let _this = this;\r\n\r\n $(domRef).dropzone({\r\n url: \"/admin/file/upload\",\r\n paramName: 'file',\r\n clickable: !!clickable,\r\n dictDefaultMessage: '',\r\n maxFilesize: 10,\r\n addRemoveLinks: true,\r\n previewsContainer: '.em-blog-write .dropzone-previews',\r\n previewTemplate: $('.em-blog-write .preview-template')[0].innerHTML,\r\n dictCancelUpload: '取消上传',\r\n dictCancelUploadConfirmation: '确定要取消上传吗?',\r\n dictFileTooBig: '文件过大({{filesize}}M),最大限制:{{maxFilesize}}M',\r\n init: function() {\r\n this.on(\"sending\", function(file, xhr, formData) {\r\n if (!getInputTargetCb()) {\r\n this.removeAllFiles(true);\r\n } else {\r\n formData.append('toType', 'Blog');\r\n }\r\n });\r\n this.on(\"success\", function(file, data) {\r\n if (data.success) {\r\n\r\n $.each(data.data, function(index, item) {\r\n if (item.type == 'Image') {\r\n _this.insertContent('![{name}]({baseURL}{path}{uuidName}) '\r\n .replace(/\\{name\\}/g, item.name)\r\n .replace(/\\{baseURL\\}/g, utils.getBaseUrl() + '/')\r\n .replace(/\\{path\\}/g, item.path)\r\n .replace(/\\{uuidName\\}/g, item.uuidName));\r\n } else {\r\n _this.insertContent('[{name}]({baseURL}{path}{uuidName}) '\r\n .replace(/\\{name\\}/g, item.name)\r\n .replace(/\\{baseURL\\}/g, utils.getBaseUrl() + '/')\r\n .replace(/\\{path\\}/g, \"admin/file/download/\")\r\n .replace(/\\{uuidName\\}/g, item.id));\r\n }\r\n });\r\n toastr.success('上传成功!');\r\n } else {\r\n toastr.error(data.data, '上传失败!');\r\n }\r\n\r\n });\r\n this.on(\"error\", function(file, errorMessage, xhr) {\r\n toastr.error(errorMessage, '上传失败!');\r\n });\r\n this.on(\"complete\", function(file) {\r\n this.removeFile(file);\r\n });\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * 编辑器插入自定义沟通内容\r\n * @param {[type]} cm [description]\r\n * @param {[type]} comment [description]\r\n * @return {[type]} [description]\r\n */\r\n insertContent(content, mde) {\r\n try {\r\n let cm = mde ? mde.codemirror : this.simplemde.codemirror;\r\n var cursor = cm.getCursor();\r\n if (cursor) {\r\n cm.replaceRange(content, cursor, cursor);\r\n cm.focus();\r\n }\r\n } catch (err) { console.log(err); }\r\n\r\n }\r\n\r\n destroy() {\r\n this._reset();\r\n }\r\n\r\n /**\r\n * 当视图被附加到DOM中时被调用\r\n */\r\n attached() {\r\n $('#blog-save-btn').click((event) => {\r\n this.save(event);\r\n });\r\n }\r\n\r\n save(event, isKey) {\r\n\r\n let title = $('#blog-title-input').val();\r\n let content = this.simplemde.value();\r\n\r\n if (!$.trim(title)) {\r\n $('#blog-title-input').val('');\r\n toastr.error('标题不能为空!');\r\n return;\r\n }\r\n\r\n if (!$.trim(content)) {\r\n this.simplemde.value('');\r\n toastr.error('内容不能为空!');\r\n return;\r\n }\r\n\r\n if (!this.blog) {\r\n if (event.ctrlKey) {\r\n $.post(`/admin/blog/create`, {\r\n url: utils.getBasePath(),\r\n usernames: utils.parseUsernames(content, [nsCtx.memberAll, ...(window.tmsUsers ? tmsUsers : [])]).join(','),\r\n title: title,\r\n content: content,\r\n spaceId: '',\r\n privated: false,\r\n contentHtml: utils.md2html(content)\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n this.blog = data.data;\r\n toastr.success('博文保存成功!');\r\n ea.publish(nsCons.EVENT_BLOG_CHANGED, {\r\n action: 'created',\r\n blog: this.blog\r\n });\r\n $('a[href=\"#modaal-blog-write\"]').modaal('close');\r\n } else {\r\n toastr.error(data.data, '博文保存失败!');\r\n }\r\n });\r\n } else {\r\n ea.publish(nsCons.EVENT_BLOG_SAVE, {\r\n title: title,\r\n content: content,\r\n });\r\n }\r\n } else {\r\n\r\n if (this.sending) {\r\n return;\r\n }\r\n\r\n this.sending = true;\r\n $('#blog-save-btn i').show();\r\n\r\n var html = utils.md2html(content);\r\n let users = [nsCtx.memberAll, ...(window.tmsUsers ? tmsUsers : [])];\r\n\r\n $.post('/admin/blog/update', {\r\n url: utils.getBasePath(),\r\n id: this.blog.id,\r\n version: this.blog.version,\r\n usernames: utils.parseUsernames(content, users).join(','),\r\n title: title,\r\n content: content,\r\n diff: utils.diffS(this.blog.content, content),\r\n // contentHtml: html,\r\n // contentHtmlOld: htmlOld\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n this.blog = data.data;\r\n toastr.success('博文更新成功!');\r\n ea.publish(nsCons.EVENT_BLOG_CHANGED, {\r\n action: 'updated',\r\n blog: this.blog\r\n });\r\n if (!isKey) {\r\n (event && event.ctrlKey) && this.close();\r\n } else {\r\n (event && event.ctrlKey && event.shiftKey) && this.close();\r\n }\r\n } else {\r\n toastr.error(data.data, '博文更新失败!');\r\n }\r\n }).always(() => {\r\n this.sending = false;\r\n $('#blog-save-btn i').hide();\r\n });\r\n }\r\n\r\n }\r\n\r\n}\r\n","import { bindable, containerless } from 'aurelia-framework';\r\n\r\n@containerless\r\nexport class EmChatAttach {\r\n\r\n type = 'Image'; //Image | Attachment\r\n search = '';\r\n\r\n /**\r\n * 当视图被附加到DOM中时被调用\r\n */\r\n attached() {\r\n $(this.tabRef).find('.item').tab({\r\n onVisible: (tabPath) => {\r\n // this.type = tabPath;\r\n // this.fetch();\r\n }\r\n });\r\n }\r\n\r\n moreHandler() {\r\n this._listByPage(true);\r\n }\r\n\r\n _listByPage(nextPage = false) {\r\n let url = nsCtx.isAt ? '/admin/file/listByUser' : '/admin/file/listByChannel';\r\n this.ajax = $.get(url, {\r\n name: nsCtx.chatTo,\r\n type: this.type,\r\n page: this.page ? (nextPage ? this.page.number + 1 : this.page.number) : 0,\r\n size: 10,\r\n search: this.search\r\n }, (data) => {\r\n this.page = data.data;\r\n this.moreCnt = this.page.last ? 0 : this.page.totalElements - (this.page.number + 1) * this.page.size;\r\n if (!nextPage) {\r\n this.attachs = data.data.content;\r\n } else {\r\n this.attachs = _.concat(this.attachs, data.data.content);\r\n }\r\n\r\n });\r\n }\r\n\r\n fetch() {\r\n this.page = null;\r\n this.moreCnt = 0;\r\n this.attachs = null;\r\n if ($(window).width() > 991) {\r\n $(this.searchRef).focus();\r\n }\r\n this._listByPage();\r\n }\r\n\r\n tabClickHandler(tabPath) {\r\n this.type = tabPath;\r\n this.fetch();\r\n }\r\n\r\n searchHandler() {\r\n this.fetch();\r\n }\r\n\r\n keyupHandler(event) {\r\n if (event.keyCode == 13) {\r\n this.fetch();\r\n } else if (event.keyCode == 27) {\r\n this.search = '';\r\n this.fetch();\r\n }\r\n return true;\r\n }\r\n\r\n}\r\n","import { bindable, containerless } from 'aurelia-framework';\r\n\r\n@containerless\r\nexport class EmChatChannelCreate {\r\n\r\n @bindable loginUser;\r\n @bindable trigger;\r\n @bindable name;\r\n activeTab = 'channel-create';\r\n\r\n nameRegex = /^[a-z][a-z0-9_\\-]{0,49}$/;\r\n\r\n nameChanged(news, old) {\r\n this.oldName = old;\r\n if (news && !this.nameRegex.test(news)) {\r\n this.name = this._getOldName();\r\n }\r\n }\r\n\r\n _getOldName() {\r\n if (!this.nameRegex.test(this.oldName)) {\r\n this.oldName = '';\r\n }\r\n\r\n return this.oldName;\r\n }\r\n\r\n triggerChanged(newValue, oldValue) {\r\n $(this.trigger).click(() => {\r\n this.emModal.show({\r\n hideOnApprove: false,\r\n autoDimmer: true\r\n });\r\n });\r\n }\r\n\r\n showHandler() {\r\n this._reset();\r\n }\r\n\r\n _reset() {\r\n this.name = '';\r\n this.title = '';\r\n this.desc = '';\r\n $(this.chk).checkbox('set checked');\r\n this.channelJoinVm.refresh();\r\n }\r\n\r\n /**\r\n * 当视图被附加到DOM中时被调用\r\n */\r\n attached() {\r\n $(this.chk).checkbox();\r\n $(this.tabRef).find('.item').tab({\r\n onVisible: (tabPath) => {\r\n this.activeTab = tabPath;\r\n }\r\n });\r\n }\r\n\r\n approveHandler(modal) {\r\n\r\n $.post('/admin/channel/create', {\r\n name: this.name,\r\n title: this.title,\r\n desc: this.desc,\r\n privated: $(this.chk).checkbox('is checked')\r\n }, (data) => {\r\n if (data.success) {\r\n modal.hide();\r\n toastr.success('创建频道成功!');\r\n ea.publish(nsCons.EVENT_CHAT_CHANNEL_CREATED, {\r\n channel: data.data\r\n });\r\n } else {\r\n modal.hideDimmer();\r\n toastr.error(data.data, '创建频道失败!');\r\n }\r\n });\r\n\r\n }\r\n}\r\n","import { bindable, containerless } from 'aurelia-framework';\n\n@containerless\nexport class EmChatChannelEdit {\n\n @bindable channel;\n\n channelChanged() {\n\n if (this.channel) {\n let chkSet = this.channel.privated ? 'set checked' : 'set unchecked';\n $(this.chk).checkbox(chkSet);\n }\n\n }\n\n show() {\n this.emModal.show({\n hideOnApprove: false,\n autoDimmer: true\n });\n }\n\n showHandler() {}\n\n /**\n * 当视图被附加到DOM中时被调用\n */\n attached() {\n $(this.chk).checkbox();\n }\n\n approveHandler(modal) {\n\n $.post('/admin/channel/update', {\n id: this.channel.id,\n title: this.channel.title,\n desc: this.channel.description,\n privated: $(this.chk).checkbox('is checked')\n }, (data) => {\n modal.hide();\n if (data.success) {\n toastr.success('更新频道成功!');\n } else {\n toastr.error(data.data, '编辑频道失败!');\n }\n });\n\n }\n}\n","import { bindable, containerless } from 'aurelia-framework';\r\n\r\n@containerless\r\nexport class EmChatChannelJoin {\r\n\r\n @bindable loginUser;\r\n\r\n _getChannels() {\r\n $.get('/admin/channel/list', (data) => {\r\n if (data.success) {\r\n this.channels = data.data;\r\n _.each(this.channels, (item) => {\r\n item.joined = _.some(item.members, (m) => {\r\n return m.username == this.loginUser.username;\r\n });\r\n });\r\n } else {\r\n toastr.error(data.data, '获取频道列表失败!');\r\n }\r\n });\r\n }\r\n\r\n refresh() {\r\n this._getChannels();\r\n }\r\n\r\n joinHandler(item) {\r\n this.confirmMd.show({\r\n content: `确定要加入频道${item.title}吗?`,\r\n onapprove: () => {\r\n $.post('/admin/channel/join', {\r\n id: item.id\r\n }, (data) => {\r\n if (data.success) {\r\n toastr.success('加入频道成功!');\r\n item.joined = true;\r\n ea.publish(nsCons.EVENT_CHAT_CHANNEL_JOINED, { channel: data.data });\r\n } else {\r\n toastr.error(data.data, '加入频道失败!');\r\n }\r\n });\r\n }\r\n });\r\n }\r\n\r\n leaveHandler(item) {\r\n this.confirmMd.show({\r\n content: `确定要离开频道${item.title}吗?`,\r\n onapprove: () => {\r\n $.post('/admin/channel/leave', {\r\n id: item.id\r\n }, (data) => {\r\n if (data.success) {\r\n toastr.success('离开频道成功!');\r\n item.joined = false;\r\n ea.publish(nsCons.EVENT_CHAT_CHANNEL_LEAVED, { channel: data.data });\r\n } else {\r\n toastr.error(data.data, '离开频道失败!');\r\n }\r\n });\r\n }\r\n });\r\n }\r\n}\r\n","import { bindable, containerless } from 'aurelia-framework';\r\n\r\n@containerless\r\nexport class EmChatChannelLinkMgr {\r\n\r\n @bindable channel;\r\n\r\n @bindable loginUser;\r\n\r\n links = [];\r\n\r\n channelChanged(news, old) {\r\n if (this.channel) {\r\n $.get('/admin/link/listBy', {\r\n channelId: this.channel.id\r\n }, (data) => {\r\n if (data.success) {\r\n this.links = data.data;\r\n } else {\r\n this.links = [];\r\n }\r\n });\r\n }\r\n }\r\n\r\n addHandler() {\r\n $.post('/admin/link/create', {\r\n title: this.title,\r\n href: this.href,\r\n channelId: this.channel.id\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n this.title = '';\r\n this.href = '';\r\n this.links.push(data.data);\r\n ea.publish(nsCons.EVENT_CHANNEL_LINKS_REFRESH, {});\r\n } else {\r\n toastr.error(data.data);\r\n }\r\n });\r\n }\r\n\r\n delHandler(item) {\r\n $.post('/admin/link/delete', {\r\n id: item.id\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n this.links = _.reject(this.links, { id: item.id });\r\n ea.publish(nsCons.EVENT_CHANNEL_LINKS_REFRESH, {});\r\n toastr.success('删除成功!');\r\n } else {\r\n toastr.error(data.data);\r\n }\r\n });\r\n }\r\n\r\n editHandler(item) {\r\n item.oldTitle = item.title;\r\n item.oldHref = item.href;\r\n item.isEditing = true;\r\n }\r\n\r\n updateHandler(item) {\r\n $.post('/admin/link/update', {\r\n id: item.id,\r\n title: item.title,\r\n href: item.href,\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n item.isEditing = false;\r\n ea.publish(nsCons.EVENT_CHANNEL_LINKS_REFRESH, {});\r\n toastr.success('更新成功!');\r\n } else {\r\n toastr.error(data.data);\r\n }\r\n });\r\n }\r\n\r\n showHandler() {\r\n this._reset();\r\n }\r\n\r\n _reset() {}\r\n\r\n /**\r\n * 当视图被附加到DOM中时被调用\r\n */\r\n attached() {}\r\n\r\n show() {\r\n this.channelChanged();\r\n this.emModal.show({ autoDimmer: false });\r\n }\r\n\r\n approveHandler(modal) {\r\n\r\n }\r\n}\r\n","import { bindable, containerless } from 'aurelia-framework';\r\n\r\n@containerless\r\nexport class EmChatChannelMembersMgr {\r\n\r\n @bindable channel;\r\n @bindable users;\r\n\r\n /**\r\n * 构造函数\r\n */\r\n constructor() {\r\n this.membersOpts = {\r\n onAdd: (addedValue, addedText, $addedChoice) => {\r\n this.emModal.showDimmer();\r\n $.post('/admin/channel/addMember', {\r\n id: this.channel.id,\r\n members: addedValue,\r\n baseUrl: utils.getBaseUrl(),\r\n path: wurl('path'),\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n toastr.success('添加成员成功!');\r\n this.channel.members = data.data.members;\r\n ea.publish(nsCons.EVENT_CHAT_CHANNEL_MEMBER_ADD_OR_REMOVE, {\r\n type: 'add',\r\n members: data.data.members\r\n });\r\n } else {\r\n toastr.error(data.data, '添加成员失败!');\r\n }\r\n }).always(() => {\r\n this.emModal.hideDimmer();\r\n });\r\n },\r\n onLabelRemove: (removedValue) => {\r\n if (this.channel.owner.username == removedValue) {\r\n return false;\r\n }\r\n\r\n this.emModal.showDimmer();\r\n $.post('/admin/channel/removeMember', {\r\n id: this.channel.id,\r\n members: removedValue,\r\n baseUrl: utils.getBaseUrl(),\r\n path: wurl('path'),\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n toastr.success('移除成员成功!');\r\n this.channel.members = data.data.members;\r\n ea.publish(nsCons.EVENT_CHAT_CHANNEL_MEMBER_ADD_OR_REMOVE, {\r\n type: 'remove',\r\n members: data.data.members\r\n });\r\n } else {\r\n toastr.error(data.data, '移除成员失败!');\r\n }\r\n }).always(() => {\r\n this.emModal.hideDimmer();\r\n });\r\n }\r\n };\r\n }\r\n\r\n channelChanged() {\r\n if (this.channel) {\r\n let usernames = _.sortBy(_.map(this.channel.members, 'username'));\r\n // usernames = [this.channel.owner.username, ..._.without(usernames, this.channel.owner.username)];\r\n _.defer(() => {\r\n $(this.membersRef).dropdown().dropdown('clear').dropdown('set selected', usernames).dropdown(this.membersOpts);\r\n });\r\n\r\n }\r\n }\r\n\r\n /**\r\n * 当视图被附加到DOM中时被调用\r\n */\r\n attached() {\r\n\r\n }\r\n\r\n initMembersUI(last) {\r\n\r\n if (last) {\r\n _.defer(() => {\r\n this.channelChanged();\r\n });\r\n }\r\n }\r\n\r\n showHandler() {\r\n $(this.membersRef).dropdown().dropdown('clear');\r\n this.channelChanged();\r\n }\r\n\r\n approveHandler(modal) {\r\n\r\n }\r\n\r\n show() {\r\n this.emModal.show({\r\n hideOnApprove: true,\r\n autoDimmer: false\r\n });\r\n }\r\n}\r\n","import { bindable, containerless } from 'aurelia-framework';\n\n@containerless\nexport class EmChatChannelMembersShow {\n\n @bindable channel;\n\n showHandler() {\n\n }\n\n approveHandler(modal) {\n\n }\n\n show() {\n this.emModal.show({\n hideOnApprove: true,\n autoDimmer: false\n });\n }\n}\n","import { bindable, containerless } from 'aurelia-framework';\r\nimport tags from 'common/common-tags';\r\n\r\n@containerless\r\nexport class EmChatContentItemFootbar {\r\n\r\n @bindable chat;\r\n\r\n emojis = [{\r\n label: '赞同',\r\n value: ':+1:',\r\n type: 'emoji'\r\n }, {\r\n label: '反对',\r\n value: ':-1:',\r\n type: 'emoji'\r\n }, {\r\n label: '知悉',\r\n value: ':ok_hand:',\r\n type: 'emoji'\r\n }, {\r\n label: '关注',\r\n value: ':eyes:',\r\n type: 'emoji'\r\n }, {\r\n label: '爱心',\r\n value: ':heart:',\r\n type: 'emoji'\r\n }, {\r\n label: '开心',\r\n value: ':laughing:',\r\n type: 'emoji'\r\n }, {\r\n label: '困惑',\r\n value: ':confused:',\r\n type: 'emoji'\r\n }, {\r\n label: '悲伤',\r\n value: ':cry:',\r\n type: 'emoji'\r\n }];\r\n\r\n /**\r\n * 构造函数\r\n */\r\n constructor() {\r\n this.tags = tags;\r\n }\r\n\r\n /**\r\n * 当视图被附加到DOM中时被调用\r\n */\r\n attached() {\r\n $([this.addEmojiRef])\r\n .popup({\r\n inline: true,\r\n hoverable: true\r\n });\r\n $([this.addTagRef])\r\n .popup({\r\n inline: true,\r\n hoverable: true,\r\n // position: 'top center',\r\n onHide: () => {\r\n this.isCustomTag = false;\r\n $(this.tagRef).val('');\r\n }\r\n });\r\n }\r\n\r\n toggleChatLabelHandler(item) {\r\n $.post(`/admin/chat/${nsCtx.isAt ? 'direct' : 'channel'}/label/toggle`, {\r\n url: nsCtx.isAt ? utils.getBasePath() : utils.getUrl(),\r\n meta: item.type == 'emoji' ? $(emojify.replace(item.value)).attr('src') : item.value,\r\n type: item.type == 'emoji' ? 'Emoji' : 'Tag',\r\n contentHtml: utils.md2html(this.chat.content),\r\n name: item.value,\r\n desc: item.label,\r\n id: this.chat.id,\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n let cl = _.find(this.chat.chatLabels, { id: data.data.id });\r\n if (cl) {\r\n cl.voters = data.data.voters;\r\n } else {\r\n this.chat.chatLabels = [...this.chat.chatLabels, data.data];\r\n }\r\n bs.signal('sg-chatlabel-refresh');\r\n } else {\r\n toastr.error(data.data);\r\n }\r\n });\r\n }\r\n\r\n toggleCustomTagHandler() {\r\n if (this.isCustomTag) {\r\n let v = $(this.tagRef).val();\r\n if (v) {\r\n this.toggleChatLabelHandler({\r\n label: v,\r\n value: v,\r\n type: 'Tag'\r\n });\r\n $(this.tagRef).val('');\r\n }\r\n } else {\r\n _.defer(() => $(this.tagRef).focus());\r\n }\r\n this.isCustomTag = !this.isCustomTag;\r\n }\r\n\r\n tagKeyupHandler() {\r\n this.toggleCustomTagHandler();\r\n }\r\n}\r\n","import { bindable, containerless, bindingMode } from 'aurelia-framework';\r\n\r\n@containerless\r\nexport class EmChatContentItem {\r\n\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) chats;\r\n @bindable loginUser;\r\n @bindable isAt;\r\n @bindable channel;\r\n @bindable markId;\r\n @bindable chatTo;\r\n members = [];\r\n basePath = utils.getBasePath();\r\n\r\n /**\r\n * 构造函数\r\n */\r\n constructor() {\r\n this.subscribe = ea.subscribe(nsCons.EVENT_CHAT_CHANNEL_MEMBER_ADD_OR_REMOVE, (payload) => {\r\n this.members = [nsCtx.memberAll, ...payload.members];\r\n });\r\n }\r\n\r\n /**\r\n * 当数据绑定引擎从视图解除绑定时被调用\r\n */\r\n unbind() {\r\n this.subscribe.dispose();\r\n }\r\n\r\n /**\r\n * 当视图被附加到DOM中时被调用\r\n */\r\n attached() {\r\n $('.tms-chat-direct').on('click', '.markdown-body .at-user', (event) => {\r\n event.preventDefault();\r\n ea.publish(nsCons.EVENT_CHAT_MSG_INSERT, {\r\n content: `{~${$(event.currentTarget).attr('data-value')}} `\r\n });\r\n });\r\n\r\n // 消息popup\r\n $('.tms-chat-direct').on('mouseenter', '.markdown-body a[href*=\"#/chat/\"]:not(.pp-not)', (event) => {\r\n event.preventDefault();\r\n var $a = $(event.currentTarget);\r\n ea.publish(nsCons.EVENT_CHAT_MSG_POPUP_SHOW, {\r\n id: utils.urlQuery('id', $a.attr('href')),\r\n target: event.currentTarget\r\n });\r\n });\r\n\r\n // wiki dir\r\n $('.tms-chat-direct').on('mouseenter', '.tms-content-body .em-chat-content-item', (event) => {\r\n event.preventDefault();\r\n var $c = $(event.currentTarget);\r\n\r\n ea.publish(nsCons.EVENT_CHAT_MSG_WIKI_DIR, {\r\n dir: utils.dir($c.find('> .content > .markdown-body'))\r\n });\r\n });\r\n\r\n $('.tms-chat-direct').on('click', '.panel-wiki-dir .wiki-dir-item', (event) => {\r\n event.preventDefault();\r\n ea.publish(nsCons.EVENT_CHAT_CONTENT_SCROLL_TO, { target: $('#' + $(event.currentTarget).attr('data-id')) });\r\n });\r\n\r\n // 用户信息popup\r\n $('.tms-chat-direct').on('mouseenter', 'span[data-value].at-user:not(.pp-not),a[data-value].author:not(.pp-not)', (event) => {\r\n event.preventDefault();\r\n var $a = $(event.currentTarget);\r\n ea.publish(nsCons.EVENT_CHAT_MEMBER_POPUP_SHOW, {\r\n channel: this.channel,\r\n username: $a.attr('data-value'),\r\n target: event.currentTarget\r\n });\r\n });\r\n\r\n this.initHotkeys();\r\n }\r\n\r\n channelChanged() {\r\n\r\n if (this.channel) {\r\n this.members = [nsCtx.memberAll, ...this.channel.members];\r\n } else {\r\n this.members = [];\r\n }\r\n }\r\n\r\n deleteHandler(item) {\r\n\r\n this.emConfirmModal.show({\r\n onapprove: () => {\r\n\r\n let url;\r\n\r\n if (this.isAt) {\r\n url = `/admin/chat/direct/delete`;\r\n } else {\r\n url = `/admin/chat/channel/delete`;\r\n }\r\n\r\n $.post(url, {\r\n id: item.id\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n this.chats = _.reject(this.chats, {\r\n id: item.id\r\n });\r\n toastr.success('删除消息成功!');\r\n } else {\r\n toastr.error(data.data, '删除消息失败!');\r\n }\r\n });\r\n }\r\n });\r\n\r\n }\r\n\r\n initHotkeys() {\r\n $(document).bind('keydown', 'e', (evt) => {\r\n evt.preventDefault();\r\n let chat = _.findLast(this.chats, c => c.creator.username == this.loginUser.username);\r\n if (chat) {\r\n this.editHandler(chat, $(`.em-chat-content-item[data-id=\"${chat.id}\"]`).find('> .content > textarea'));\r\n }\r\n });\r\n }\r\n\r\n editHandler(item, editTxtRef) {\r\n\r\n $.get(`/admin/chat/${this.isAt ? 'direct' : 'channel'}/get`, {\r\n id: item.id\r\n }, (data) => {\r\n if (data.success) {\r\n if (item.version != data.data.version) {\r\n _.extend(item, data.data);\r\n }\r\n item.isEditing = true;\r\n item.contentOld = item.content;\r\n _.defer(() => {\r\n $(editTxtRef).focus().select();\r\n autosize.update(editTxtRef);\r\n });\r\n } else {\r\n toastr.error(data.data);\r\n }\r\n\r\n });\r\n }\r\n\r\n editOkHandler(evt, item, txtRef) {\r\n this.editSave(item, txtRef);\r\n item.isEditing = false;\r\n }\r\n\r\n editCancelHandler(evt, item, txtRef) {\r\n item.content = item.contentOld;\r\n $(txtRef).val(item.content);\r\n item.isEditing = false;\r\n }\r\n\r\n editSave(item, txtRef) {\r\n\r\n this.sending = true;\r\n\r\n item.content = $(txtRef).val();\r\n\r\n var html = utils.md2html(item.content);\r\n var htmlOld = utils.md2html(item.contentOld);\r\n\r\n let url;\r\n let data;\r\n\r\n if (this.isAt) {\r\n url = `/admin/chat/direct/update`;\r\n data = {\r\n baseUrl: utils.getBaseUrl(),\r\n path: wurl('path'),\r\n id: item.id,\r\n content: item.content,\r\n diff: utils.diffS(item.contentOld, item.content),\r\n // contentHtml: html,\r\n // contentHtmlOld: htmlOld\r\n };\r\n } else {\r\n url = `/admin/chat/channel/update`;\r\n data = {\r\n url: utils.getUrl(),\r\n id: item.id,\r\n version: item.version,\r\n usernames: utils.parseUsernames(item.content, this.members).join(','),\r\n content: item.content,\r\n diff: utils.diffS(item.contentOld, item.content),\r\n // contentHtml: html,\r\n // contentHtmlOld: htmlOld\r\n };\r\n }\r\n\r\n $.post(url, data, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n toastr.success('更新消息成功!');\r\n item.isEditing = false;\r\n item.version = data.data.version;\r\n } else {\r\n toastr.error(data.data, '更新消息失败!');\r\n }\r\n }).always(() => {\r\n this.sending = false;\r\n });\r\n }\r\n\r\n eidtKeydownHandler(evt, item, txtRef) {\r\n\r\n if (this.sending) {\r\n return false;\r\n }\r\n\r\n if (evt.ctrlKey && evt.keyCode === 13) {\r\n\r\n this.editSave(item, txtRef);\r\n\r\n return false;\r\n } else if (evt.ctrlKey && evt.keyCode === 85) {\r\n $(txtRef).next('.tms-edit-actions').find('.upload').click();\r\n return false;\r\n } else if (evt.keyCode === 27) {\r\n this.editCancelHandler(evt, item, txtRef);\r\n }\r\n\r\n return true;\r\n }\r\n\r\n notifyRendered(last, item) {\r\n if (last) {\r\n _.defer(() => {\r\n ea.publish(nsCons.EVENT_CHAT_LAST_ITEM_RENDERED, {\r\n item: item\r\n });\r\n });\r\n }\r\n }\r\n\r\n stowHandler(item) {\r\n\r\n if (item.isStow) {\r\n this.unStowHandler(item);\r\n return;\r\n }\r\n\r\n $.post('/admin/chat/channel/stow', {\r\n id: item.id\r\n }, (data, textStatus, xhr) => {\r\n item.isStow = true;\r\n if (data.success) {\r\n item.stowId = data.data.id;\r\n toastr.success('收藏消息成功!');\r\n } else {\r\n item.stowId = (data.msgs && data.msgs.length > 0) ? data.msgs[0].id : '';\r\n // toastr.error(data.data, '收藏消息失败!');\r\n }\r\n });\r\n }\r\n\r\n unStowHandler(item) {\r\n if (!item.stowId) {\r\n return;\r\n }\r\n $.post('/admin/chat/channel/removeStow', {\r\n id: item.stowId\r\n }, (data, textStatus, xhr) => {\r\n item.isStow = false;\r\n item.stowId = '';\r\n if (data.success) {\r\n toastr.success('移除收藏消息成功!');\r\n } else {\r\n // toastr.error(data.data, '移除收藏消息失败!');\r\n }\r\n });\r\n }\r\n\r\n openEditHandler(item) {\r\n $.post('/admin/chat/channel/openEdit', {\r\n id: item.id,\r\n open: !item.openEdit\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n item.openEdit = !item.openEdit;\r\n toastr.success(`${item.openEdit ? '开启' : '关闭'}协作编辑成功!`);\r\n } else {\r\n toastr.success(`${!item.openEdit ? '开启' : '关闭'}协作编辑失败!`);\r\n }\r\n });\r\n }\r\n\r\n replyHandler(item) {\r\n ea.publish(nsCons.EVENT_CHAT_MSG_INSERT, {\r\n content: `[[回复#${item.id}](${utils.getUrl()}?id=${item.id}){~${item.creator.username}}]\\n\\n`\r\n });\r\n\r\n // 标记@自己的该消息为已读\r\n $.post('/admin/chat/channel/markAsReadedByChat', {\r\n chatId: item.id\r\n });\r\n }\r\n\r\n creatorNameHandler(item) {\r\n ea.publish(nsCons.EVENT_CHAT_MSG_INSERT, {\r\n content: `{~${item.creator.username}} `\r\n });\r\n }\r\n\r\n refreshHandler(item) {\r\n $.get('/admin/chat/channel/get', {\r\n id: item.id\r\n }, (data) => {\r\n if (item.version != data.data.version) {\r\n _.extend(item, data.data);\r\n toastr.success('刷新同步成功!');\r\n } else {\r\n toastr.info('消息内容暂无变更!');\r\n }\r\n });\r\n }\r\n\r\n likeHandler(item, isLike) {\r\n\r\n if ((isLike && item.isZanVoted) || (!isLike && item.isCaiVoted)) {\r\n return;\r\n }\r\n\r\n $.post('/admin/chat/channel/vote', {\r\n id: item.id,\r\n url: utils.getUrl(),\r\n contentHtml: utils.md2html(item.content),\r\n type: isLike ? 'Zan' : 'Cai'\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n _.extend(item, data.data);\r\n if (isLike) {\r\n item.isZanVoted = true;\r\n } else {\r\n item.isCaiVoted = true;\r\n }\r\n } else {\r\n toastr.error(data.data);\r\n }\r\n });\r\n }\r\n\r\n pinHandler(item) {\r\n $.post('/admin/chat/channel/pin/toggle', {\r\n id: item.id,\r\n cid: this.channel.id\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n toastr.success(`${data.code == 200 ? '固定频道消息成功!' : '解除固定频道消息成功!'}`);\r\n item.isPin = (data.code == 200);\r\n } else {\r\n toastr.error(data.data);\r\n }\r\n });\r\n }\r\n}\r\n","import { bindable, containerless, inject } from 'aurelia-framework';\r\nimport 'textcomplete';\r\nimport tips from 'common/common-tips';\r\nimport emojis from 'common/common-emoji';\r\nimport {\r\n default as SimpleMDE\r\n} from 'simplemde';\r\n\r\n@containerless\r\nexport class EmChatInput {\r\n\r\n @bindable chatTo;\r\n @bindable isAt;\r\n @bindable channel;\r\n members = [];\r\n isMobile = utils.isMobile();\r\n\r\n channelChanged() {\r\n\r\n if (this.channel) {\r\n this.members = [nsCtx.memberAll, ...this.channel.members];\r\n } else {\r\n this.members = [];\r\n }\r\n\r\n }\r\n\r\n /**\r\n * 构造函数\r\n */\r\n constructor() {\r\n this.subscribe = ea.subscribe(nsCons.EVENT_SHOW_HOTKEYS_MODAL, (payload) => {\r\n this.emHotkeysModal.show();\r\n });\r\n this.subscribe1 = ea.subscribe(nsCons.EVENT_CHAT_CHANNEL_MEMBER_ADD_OR_REMOVE, (payload) => {\r\n this.members = [nsCtx.memberAll, ...payload.members];\r\n });\r\n this.subscribe2 = ea.subscribe(nsCons.EVENT_CHAT_MSG_INSERT, (payload) => {\r\n this.insertContent(payload.content);\r\n });\r\n }\r\n\r\n /**\r\n * 当数据绑定引擎从视图解除绑定时被调用\r\n */\r\n unbind() {\r\n this.subscribe.dispose();\r\n this.subscribe1.dispose();\r\n this.subscribe2.dispose();\r\n }\r\n\r\n initHotkeys() {\r\n $(document).bind('keydown', 'r', () => { // reply message\r\n event.preventDefault();\r\n this.simplemde.codemirror.focus();\r\n });\r\n }\r\n\r\n /**\r\n * 当视图被附加到DOM中时被调用\r\n */\r\n attached() {\r\n this.initSimpleMDE(this.chatInputRef);\r\n this.initDropzone();\r\n this.initPaste();\r\n this.initHotkeys();\r\n }\r\n\r\n initPaste() {\r\n\r\n let $paste;\r\n if (this.$chatMsgInputRef.is('textarea')) {\r\n $paste = $(this.$chatMsgInputRef).pastableTextarea();\r\n } else {\r\n $paste = $(this.$chatMsgInputRef).pastableContenteditable();\r\n }\r\n\r\n $paste && ($paste.on('pasteImage', (ev, data) => {\r\n\r\n $.post('/admin/file/base64', {\r\n dataURL: data.dataURL,\r\n type: data.blob.type,\r\n toType: nsCtx.isAt ? 'User' : 'Channel',\r\n toId: nsCtx.chatTo\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n this.insertContent('![{name}]({baseURL}{path}{uuidName})'\r\n .replace(/\\{name\\}/g, data.data.name)\r\n .replace(/\\{baseURL\\}/g, utils.getBaseUrl() + '/')\r\n .replace(/\\{path\\}/g, data.data.path)\r\n .replace(/\\{uuidName\\}/g, data.data.uuidName));\r\n }\r\n });\r\n }).on('pasteImageError', (ev, data) => {\r\n toastr.error(data.message, '剪贴板粘贴图片错误!');\r\n }));\r\n }\r\n\r\n initDropzone() {\r\n this.initUploadDropzone($('.CodeMirror-wrap', this.inputRef), () => {\r\n return this.$chatMsgInputRef\r\n }, false);\r\n this.initUploadDropzone($(this.btnItemUploadRef).children().andSelf(), () => {\r\n return this.$chatMsgInputRef\r\n }, true);\r\n\r\n $(this.chatBtnRef).popup({\r\n inline: true,\r\n hoverable: true,\r\n position: 'bottom left',\r\n delay: {\r\n show: 300,\r\n hide: 300\r\n }\r\n });\r\n\r\n }\r\n\r\n initUploadDropzone(domRef, getInputTargetCb, clickable) {\r\n\r\n let _this = this;\r\n\r\n $(domRef).dropzone({\r\n url: \"/admin/file/upload\",\r\n paramName: 'file',\r\n clickable: !!clickable,\r\n dictDefaultMessage: '',\r\n maxFilesize: 10,\r\n addRemoveLinks: true,\r\n previewsContainer: this.chatStatusBarRef,\r\n previewTemplate: this.previewTemplateRef.innerHTML,\r\n dictCancelUpload: '取消上传',\r\n dictCancelUploadConfirmation: '确定要取消上传吗?',\r\n dictFileTooBig: '文件过大({{filesize}}M),最大限制:{{maxFilesize}}M',\r\n init: function() {\r\n this.on(\"sending\", function(file, xhr, formData) {\r\n if (!getInputTargetCb()) {\r\n this.removeAllFiles(true);\r\n } else {\r\n formData.append('toType', nsCtx.isAt ? 'User' : 'Channel');\r\n formData.append('toId', nsCtx.chatTo);\r\n }\r\n });\r\n this.on(\"success\", function(file, data) {\r\n if (data.success) {\r\n\r\n $.each(data.data, function(index, item) {\r\n if (item.type == 'Image') {\r\n _this.insertContent('![{name}]({baseURL}{path}{uuidName}) '\r\n .replace(/\\{name\\}/g, item.name)\r\n .replace(/\\{baseURL\\}/g, utils.getBaseUrl() + '/')\r\n .replace(/\\{path\\}/g, item.path)\r\n .replace(/\\{uuidName\\}/g, item.uuidName));\r\n } else {\r\n _this.insertContent('[{name}]({baseURL}{path}{uuidName}) '\r\n .replace(/\\{name\\}/g, item.name)\r\n .replace(/\\{baseURL\\}/g, utils.getBaseUrl() + '/')\r\n .replace(/\\{path\\}/g, \"admin/file/download/\")\r\n .replace(/\\{uuidName\\}/g, item.id));\r\n }\r\n });\r\n toastr.success('上传成功!');\r\n } else {\r\n toastr.error(data.data, '上传失败!');\r\n }\r\n\r\n });\r\n this.on(\"error\", function(file, errorMessage, xhr) {\r\n toastr.error(errorMessage, '上传失败!');\r\n });\r\n this.on(\"complete\", function(file) {\r\n this.removeFile(file);\r\n });\r\n }\r\n });\r\n }\r\n\r\n initSimpleMDE(textareaDom) {\r\n this.simplemde = new SimpleMDE({\r\n element: textareaDom,\r\n spellChecker: false,\r\n status: false,\r\n autofocus: true,\r\n toolbar: false,\r\n // forceSync: true,\r\n autoDownloadFontAwesome: false,\r\n insertTexts: {\r\n table: [\"\", \"\\n\\n| 列1 | 列2 | 列3 |\\n| ------ | ------ | ------ |\\n| 文本 | 文本 | 文本 |\\n\\n\"],\r\n },\r\n previewRender: (plainText, preview) => { // Async method\r\n return this.simplemde.markdown(utils.preParse(plainText));\r\n },\r\n });\r\n\r\n this.$chatMsgInputRef = $(this.inputRef).find('.textareaWrapper .CodeMirror textarea');\r\n if (this.$chatMsgInputRef.size() === 0) {\r\n this.$chatMsgInputRef = $(this.inputRef).find('.textareaWrapper .CodeMirror [contenteditable=\"true\"]');\r\n }\r\n\r\n this.initTextcomplete();\r\n }\r\n\r\n initTextcomplete() {\r\n\r\n $(this.$chatMsgInputRef).textcomplete([{ // chat msg help\r\n match: /(|\\b)(\\/.*)$/,\r\n search: (term, callback) => {\r\n var keys = _.keys(tips);\r\n callback($.map(keys, (key) => {\r\n return key.indexOf(term) === 0 ? key : null;\r\n }));\r\n },\r\n template: (value, term) => {\r\n return tips[value].label;\r\n },\r\n replace: (value) => {\r\n if (this.tipsActionHandler(value)) {\r\n this.setCaretPosition(tips[value].line, tips[value].ch);\r\n return `$1${tips[value].value}`;\r\n } else {\r\n return '';\r\n }\r\n }\r\n }, { // @user\r\n match: /(^|\\s)@(\\w*)$/,\r\n search: (term, callback) => {\r\n callback($.map(this.members, (member) => {\r\n return (member.enabled && member.username.indexOf(term) >= 0) ? member.username : null;\r\n }));\r\n },\r\n template: (value, term) => {\r\n let user = _.find(this.members, { username: value });\r\n return `${user.name} - ${user.mails} (${user.username})`;\r\n },\r\n replace: (value) => {\r\n return `$1{~${value}}`;\r\n }\r\n }, { // emoji\r\n match: /(^|\\s):([\\+\\-\\w]*)$/,\r\n search: function(term, callback) {\r\n callback($.map(emojis, (emoji) => {\r\n return _.some(emoji.split('_'), (item) => {\r\n return item.indexOf(term) === 0;\r\n }) ? emoji : null;\r\n }));\r\n },\r\n template: (value, term) => {\r\n if (value == 'search') {\r\n return `表情查找 - :search`;\r\n }\r\n let emojiKey = `:${value}:`;\r\n return `${emojify.replace(emojiKey)} - ${emojiKey}`;\r\n },\r\n replace: (value) => {\r\n if (this.tipsActionHandler(value)) {\r\n return '$1:' + value + ': ';\r\n } else {\r\n return '';\r\n }\r\n }\r\n }], {\r\n appendTo: '.tms-chat-status-bar',\r\n maxCount: nsCons.NUM_TEXT_COMPLETE_MAX_COUNT\r\n });\r\n\r\n this.simplemde.codemirror.on('keydown', (cm, e) => {\r\n if (_.includes([13, 38, 40], e.keyCode) && this.isTipsShow()) { // enter | up | down\r\n e.preventDefault();\r\n } else if (e.ctrlKey && e.keyCode === 13) {\r\n this.sendChatMsg();\r\n } else if (e.keyCode === 27) {\r\n this.simplemde.value('');\r\n } else if (e.ctrlKey && e.keyCode == 85) {\r\n $(this.btnItemUploadRef).find('.content').click();\r\n } else if (e.ctrlKey && e.keyCode == 191) {\r\n this.emHotkeysModal.show();\r\n }\r\n });\r\n }\r\n\r\n setCaretPosition(line, ch) {\r\n (line || ch) && (_.delay(() => {\r\n let cr = this.simplemde.codemirror.getCursor();\r\n this.simplemde.codemirror.setCursor({\r\n line: cr.line - (line ? line : 0),\r\n ch: cr.line ? (ch ? ch : 0) : (cr.ch - (ch ? ch : 0))\r\n });\r\n }, 100));\r\n }\r\n\r\n sendChatMsg() {\r\n\r\n let content = this.simplemde.value();\r\n\r\n if (!$.trim(content)) {\r\n this.simplemde.value('');\r\n return;\r\n }\r\n\r\n if (this.sending) {\r\n return;\r\n }\r\n\r\n this.sending = true;\r\n\r\n var html = utils.md2html(content);\r\n\r\n let url;\r\n let data;\r\n if (this.isAt) {\r\n url = `/admin/chat/direct/create`;\r\n data = {\r\n baseUrl: utils.getBaseUrl(),\r\n path: wurl('path'),\r\n chatTo: this.chatTo,\r\n content: content,\r\n contentHtml: html\r\n };\r\n } else {\r\n url = `/admin/chat/channel/create`;\r\n data = {\r\n url: utils.getUrl(),\r\n channelId: this.channel.id,\r\n usernames: utils.parseUsernames(content, this.members).join(','),\r\n content: content,\r\n contentHtml: html\r\n };\r\n }\r\n $.post(url, data, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n this.simplemde.value('');\r\n ea.publish(nsCons.EVENT_CHAT_MSG_SENDED, {\r\n data: data\r\n });\r\n } else {\r\n toastr.error(data.data, '发送消息失败!');\r\n }\r\n }).always(() => {\r\n this.sending = false;\r\n });\r\n }\r\n\r\n sendChatMsgHandler() {\r\n this.sendChatMsg();\r\n }\r\n\r\n isTipsShow() {\r\n return $(this.chatStatusBarRef).find('.textcomplete-dropdown:visible').size() === 1;\r\n }\r\n\r\n /**\r\n * 编辑器插入自定义沟通内容\r\n * @param {[type]} cm [description]\r\n * @param {[type]} comment [description]\r\n * @return {[type]} [description]\r\n */\r\n insertContent(content, mde) {\r\n try {\r\n let cm = mde ? mde.codemirror : this.simplemde.codemirror;\r\n var cursor = cm.getCursor();\r\n if (cursor) {\r\n cm.replaceRange(content, cursor, cursor);\r\n cm.focus();\r\n }\r\n } catch (err) { console.log(err); }\r\n }\r\n\r\n tipsActionHandler(value) {\r\n if (value == '/upload') {\r\n $(this.btnItemUploadRef).find('.content').click();\r\n } else if (value == '/shortcuts') {\r\n this.emHotkeysModal.show();\r\n } else if (value == 'search') {\r\n _.delay(() => { utils.openNewWin(nsCons.STR_EMOJI_SEARCH_URL); }, 200);\r\n } else {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n togglePreviewHandler() {\r\n this.simplemde.togglePreview();\r\n }\r\n\r\n}\r\n","import { bindable, containerless } from 'aurelia-framework';\r\n\r\n@containerless\r\nexport class EmChatMemberPopup {\r\n\r\n members = [];\r\n member = {};\r\n\r\n /**\r\n * 构造函数\r\n */\r\n constructor() {\r\n this.subscribe = ea.subscribe(nsCons.EVENT_CHAT_MEMBER_POPUP_SHOW, (payload) => {\r\n this.channel = payload.channel;\r\n this.username = payload.username;\r\n this.target = payload.target;\r\n if (this.username == 'all') {\r\n if (!this.channel) {\r\n return;\r\n }\r\n this.members = this.channel.members;\r\n } else {\r\n this.member = utils.getUser(this.username);\r\n let user = utils.getUser(this.member.creator);\r\n this.member.creatorName = (user && (!!user.name)) ? user.name : this.member.creator;\r\n }\r\n _.defer(() => {\r\n\r\n $(this.target).popup({\r\n popup: this.popup,\r\n hoverable: true,\r\n inline: false,\r\n silent: true,\r\n movePopup: false,\r\n position: 'bottom left',\r\n jitter: 300,\r\n prefer: 'opposite',\r\n // boundary: '.tms-content',\r\n // context: '.tms-content',\r\n // maxSearchDepth: 50,\r\n delay: {\r\n show: 300,\r\n hide: 300\r\n }\r\n }).popup('show');\r\n });\r\n });\r\n }\r\n\r\n /**\r\n * 当数据绑定引擎从视图解除绑定时被调用\r\n */\r\n unbind() {\r\n this.subscribe.dispose();\r\n }\r\n}\r\n","import { bindable, containerless } from 'aurelia-framework';\r\n\r\n@containerless\r\nexport class EmChatMsgPopup {\r\n\r\n chatMsg;\r\n\r\n /**\r\n * 构造函数\r\n */\r\n constructor() {\r\n this.subscribe = ea.subscribe(nsCons.EVENT_CHAT_MSG_POPUP_SHOW, (payload) => {\r\n this.id = payload.id;\r\n this.target = payload.target;\r\n\r\n if (!this.id) {\r\n return;\r\n }\r\n\r\n $(this.target).popup({\r\n popup: this.popup,\r\n hoverable: true,\r\n inline: false,\r\n movePopup: false,\r\n // position: 'top left',\r\n // maxSearchDepth: 50,\r\n silent: true,\r\n position: 'bottom left',\r\n jitter: 300,\r\n prefer: 'opposite',\r\n delay: {\r\n show: 300,\r\n hide: 300\r\n },\r\n onShow: () => {\r\n $.get('/admin/chat/channel/get', {\r\n id: this.id\r\n }, (data) => {\r\n if (data.success) {\r\n this.chatMsg = data.data;\r\n } else {\r\n toastr.error(data.data, \"加载失败!\");\r\n }\r\n });\r\n }\r\n }).popup('show');\r\n });\r\n }\r\n\r\n /**\r\n * 当数据绑定引擎从视图解除绑定时被调用\r\n */\r\n unbind() {\r\n this.subscribe.dispose();\r\n }\r\n}\r\n","import { bindable, containerless } from 'aurelia-framework';\n\n@containerless\nexport class EmChatMsg {\n\n last = true;\n @bindable loginUser;\n @bindable isAt;\n @bindable channel;\n\n @bindable chats;\n @bindable actived;\n\n basePath = utils.getBasePath();\n\n /**\n * 当视图被附加到DOM中时被调用\n */\n attached() {\n this.initHotkeys();\n }\n\n initHotkeys() {\n $(document).bind('keydown', 'o', (event) => {\n event.preventDefault();\n let item = _.find(this.chats, { isHover: true });\n item && (item.isOpen = !item.isOpen);\n });\n\n }\n\n activedChanged() {\n if (!this.actived) {\n return;\n }\n\n let payload = this.actived.payload;\n let result = payload.result;\n\n if (this.actived.payload.action == nsCons.ACTION_TYPE_AT) {\n this.page = result;\n this.chats = _.map(result.content, (item) => {\n let chatChannel = item.chatChannel;\n chatChannel.chatAt = item;\n return chatChannel;\n });\n this.last = result.last;\n this.moreCnt = result.totalElements - (result.number + 1) * result.size;\n } else if (this.actived.payload.action == nsCons.ACTION_TYPE_STOW) {\n this.chats = payload.result;\n this.last = true;\n } else if (this.actived.payload.action == nsCons.ACTION_TYPE_PIN) {\n this.chats = payload.result;\n this.last = true;\n } else if (this.actived.payload.action == nsCons.ACTION_TYPE_SEARCH) {\n this.search = payload.search;\n this.page = result;\n this.chats = result.content;\n this.last = result.last;\n this.moreCnt = result.totalElements - (result.number + 1) * result.size;\n }\n }\n\n searchItemMouseleaveHandler(item) {\n item.isOpen = false;\n item.isHover = false;\n }\n\n searchItemMouseenterHandler(item) {\n item.isHover = true;\n }\n\n gotoChatHandler(item) {\n ea.publish(nsCons.EVENT_CHAT_SEARCH_GOTO_CHAT_ITEM, { chatItem: item });\n }\n\n openSearchItemHandler(item) {\n item.isOpen = !item.isOpen;\n }\n\n searchMoreHandler() {\n\n if (this.actived.payload.action == nsCons.ACTION_TYPE_SEARCH) {\n this.searchMoreP = $.get('/admin/chat/direct/search', {\n search: this.search,\n size: this.page.size,\n page: this.page.number + 1\n }, (data) => {\n if (data.success) {\n this.chats = _.concat(this.chats, data.data.content);\n\n this.page = data.data;\n this.last = data.data.last;\n this.moreCnt = data.data.totalElements - (data.data.number + 1) * data.data.size;\n }\n });\n } else {\n this.searchMoreP = $.get('/admin/chat/channel/getAts', {\n size: this.page.size,\n page: this.page.number + 1\n }, (data) => {\n if (data.success) {\n this.chats = _.concat(this.chats, _.map(data.data.content, (item) => {\n let chatChannel = item.chatChannel;\n chatChannel.chatAt = item;\n return chatChannel;\n }));\n\n this.page = data.data;\n this.last = data.data.last;\n this.moreCnt = data.data.totalElements - (data.data.number + 1) * data.data.size;\n }\n });\n }\n }\n\n removePinHandler(item) {\n $.post('/admin/chat/channel/pin/toggle', {\n id: item.id,\n cid: this.channel.id\n }, (data, textStatus, xhr) => {\n if (data.success) {\n this.chats = _.reject(this.chats, {\n id: item.id\n });\n toastr.success('移除固定消息成功!');\n } else {\n toastr.error(data.data, '移除固定消息失败!');\n }\n });\n }\n\n removeStowHandler(item) {\n $.post('/admin/chat/channel/removeStow', {\n id: item.chatStow.id\n }, (data, textStatus, xhr) => {\n if (data.success) {\n this.chats = _.reject(this.chats, {\n id: item.id\n });\n toastr.success('移除收藏消息成功!');\n } else {\n toastr.error(data.data, '移除收藏消息失败!');\n }\n });\n }\n\n removeAtHandler(item) {\n $.post('/admin/chat/channel/markAsReaded', {\n chatAtId: item.chatAt.id\n }, (data, textStatus, xhr) => {\n if (data.success) {\n this.chats = _.reject(this.chats, {\n id: item.id\n });\n } else {\n toastr.error(data.data, '移除@消息失败!');\n }\n });\n }\n}\n","import { bindable, containerless } from 'aurelia-framework';\r\n\r\n@containerless\r\nexport class EmChatScheduleEdit {\r\n\r\n @bindable loginUser;\r\n\r\n /**\r\n * 构造函数\r\n */\r\n constructor() {\r\n this.actorsOpts = {\r\n onAdd: (addedValue, addedText, $addedChoice) => {\r\n $.post('/admin/schedule/addActors', {\r\n id: this.event.id,\r\n basePath: utils.getBasePath(),\r\n actors: addedValue\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n toastr.success('添加参与者成功!');\r\n ea.publish(nsCons.EVENT_SCHEDULE_REFRESH, {});\r\n } else {\r\n toastr.error(data.data);\r\n }\r\n });\r\n },\r\n onLabelRemove: (removedValue) => {\r\n if (this.loginUser.username == removedValue) {\r\n return false;\r\n }\r\n $.post('/admin/schedule/removeActors', {\r\n id: this.event.id,\r\n basePath: utils.getBasePath(),\r\n actors: removedValue\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n toastr.success('移除参与者成功!');\r\n ea.publish(nsCons.EVENT_SCHEDULE_REFRESH, {});\r\n } else {\r\n toastr.error(data.data);\r\n }\r\n });\r\n }\r\n };\r\n }\r\n\r\n attached() {\r\n $(this.startRef).calendar({\r\n today: true,\r\n endCalendar: $(this.endRef)\r\n });\r\n $(this.endRef).calendar({\r\n today: true,\r\n startCalendar: $(this.startRef)\r\n });\r\n\r\n }\r\n\r\n initMembersUI(last) {\r\n if (last) {\r\n _.defer(() => {\r\n let actors = [this.loginUser.username];\r\n if (this.event) {\r\n actors = _.map(this.event.actors, 'username');\r\n }\r\n\r\n $(this.actorsRef).dropdown().dropdown('clear').dropdown('set selected', actors).dropdown(this.actorsOpts);\r\n });\r\n }\r\n }\r\n\r\n titleKeyupHandler(event) {\r\n if (event.ctrlKey && event.keyCode === 13) {\r\n this.updateHandler();\r\n }\r\n }\r\n\r\n clearStartDateHandler() {\r\n $(this.startRef).calendar('clear');\r\n }\r\n\r\n clearEndDateHandler() {\r\n $(this.endRef).calendar('clear');\r\n }\r\n\r\n show(calEvent) {\r\n this.event = _.clone(calEvent);\r\n\r\n this.showHandler();\r\n\r\n $(this.scheduleEditRef).popup({\r\n on: 'click',\r\n // closable: true,\r\n inline: true,\r\n silent: true,\r\n // movePopup: false,\r\n position: 'bottom center',\r\n jitter: 300,\r\n prefer: 'opposite',\r\n delay: {\r\n show: 300,\r\n hide: 300\r\n }\r\n }).popup('show');\r\n }\r\n\r\n showHandler() {\r\n\r\n this.users = window.tmsUsers;\r\n $(this.actorsRef).dropdown().dropdown('clear');\r\n _.defer(() => {\r\n if (this.event.start) {\r\n $(this.startRef).calendar('set date', this.event.start.toDate());\r\n } else {\r\n $(this.startRef).calendar('clear');\r\n }\r\n\r\n if (this.event.end) {\r\n $(this.endRef).calendar('set date', this.event.end.toDate());\r\n } else {\r\n $(this.endRef).calendar('clear');\r\n }\r\n\r\n let actors = _.map(this.event.actors, 'username');\r\n\r\n $(this.actorsRef).dropdown('set selected', actors).dropdown(this.actorsOpts);\r\n\r\n if (this.event.creator.username == this.loginUser.username) {\r\n $(this.titleRef).focus();\r\n }\r\n\r\n autosize.update(this.titleRef);\r\n });\r\n\r\n }\r\n\r\n updateHandler() {\r\n if (!this.event.title) {\r\n toastr.error('日程内容不能为空!');\r\n return;\r\n }\r\n\r\n let data = {\r\n id: this.event.id,\r\n basePath: utils.getBasePath(),\r\n title: this.event.title\r\n };\r\n let start = $(this.startRef).calendar('get date');\r\n let end = $(this.endRef).calendar('get date');\r\n\r\n if (start) {\r\n data.startDate = start;\r\n } else {\r\n data.startDate = new Date();\r\n }\r\n\r\n if (end) {\r\n data.endDate = end;\r\n }\r\n\r\n $.post('/admin/schedule/update2', data, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n toastr.success('更新日程成功!');\r\n $(this.scheduleEditRef).popup('hide');\r\n ea.publish(nsCons.EVENT_SCHEDULE_REFRESH, {});\r\n } else {\r\n toastr.error(data.data);\r\n }\r\n });\r\n }\r\n\r\n delHandler() {\r\n this.emConfirmModal.show({\r\n onapprove: () => {\r\n\r\n $.post('/admin/schedule/delete', {\r\n id: this.event.id,\r\n basePath: utils.getBasePath()\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n toastr.success('日程删除成功!');\r\n ea.publish(nsCons.EVENT_SCHEDULE_REFRESH, {});\r\n } else {\r\n toastr.error(data.data);\r\n }\r\n });\r\n\r\n }\r\n });\r\n }\r\n}\r\n","import { bindable, containerless } from 'aurelia-framework';\r\n\r\n@containerless\r\nexport class EmChatScheduleRemind {\r\n\r\n @bindable events;\r\n\r\n interval = 5000;\r\n\r\n headOffset = 10 * 60 * 1000;\r\n\r\n reminded = [];\r\n\r\n /**\r\n * 构造函数\r\n */\r\n constructor() {\r\n this._pollCheck();\r\n }\r\n\r\n /**\r\n * 当数据绑定引擎从视图解除绑定时被调用\r\n */\r\n unbind() {\r\n this.timer && clearInterval(this.timer);\r\n }\r\n\r\n _pollCheck() {\r\n this.timer = setInterval(() => {\r\n\r\n if (!this.events) {\r\n return;\r\n }\r\n\r\n let now = new Date().getTime();\r\n _.each(this.events, (event) => {\r\n if (event.start && !_.includes(this.reminded, event.id)) {\r\n let start = event.start;\r\n if (start > now && start < (now + this.headOffset)) {\r\n this.event = event;\r\n this.reminded.push(event.id);\r\n this._desktopPuh();\r\n this.show();\r\n }\r\n }\r\n });\r\n\r\n }, this.interval);\r\n }\r\n\r\n _desktopPuh() {\r\n push.create('TMS日程提醒通知', {\r\n body: `内容: ${this.event.title}`,\r\n icon: {\r\n x16: 'img/tms-x16.ico',\r\n x32: 'img/tms-x32.png'\r\n },\r\n timeout: 5000\r\n });\r\n }\r\n\r\n showHandler() {\r\n\r\n }\r\n\r\n approveHandler() {\r\n\r\n }\r\n\r\n show() {\r\n this.emModal.show({\r\n hideOnApprove: true,\r\n autoDimmer: false\r\n });\r\n }\r\n}\r\n","import { bindable, containerless } from 'aurelia-framework';\r\nimport {\r\n default as moment\r\n} from 'moment';\r\nimport 'fullcalendar';\r\nimport 'fullcalendar/dist/locale/zh-cn';\r\n\r\n@containerless\r\nexport class EmChatSchedule {\r\n\r\n @bindable loginUser;\r\n\r\n offset = 100;\r\n\r\n show() {\r\n this.users = window.tmsUsers;\r\n\r\n _.defer(() => {\r\n $(this.scheduleRef).fullCalendar('today');\r\n });\r\n _.delay(() => {\r\n $(this.scheduleRef).fullCalendar('option', 'height', 'parent');\r\n $(this.scheduleRef).fullCalendar('refetchEvents');\r\n }, 500);\r\n }\r\n\r\n /**\r\n * 构造函数\r\n */\r\n constructor() {\r\n this.actorsOpts = {\r\n onAdd: (addedValue, addedText, $addedChoice) => {},\r\n onLabelRemove: (removedValue) => {\r\n if (this.loginUser.username == removedValue) {\r\n return false;\r\n }\r\n }\r\n };\r\n\r\n this.subscribe = ea.subscribe(nsCons.EVENT_SCHEDULE_REFRESH, (payload) => {\r\n $(this.scheduleRef).fullCalendar('refetchEvents');\r\n });\r\n\r\n this._getEvents();\r\n }\r\n\r\n _getEvents(start, end, callback) {\r\n let data = {};\r\n if (start) {\r\n data.start = start.unix();\r\n }\r\n if (end) {\r\n data.start = end.unix();\r\n }\r\n $.get('/admin/schedule/listMy', data, (data) => {\r\n if (data.success) {\r\n this.events = _.map(data.data, (item) => {\r\n let event = {\r\n id: item.id,\r\n title: item.title,\r\n actors: item.actors,\r\n creator: item.creator\r\n };\r\n\r\n if (item.startDate) {\r\n event.start = item.startDate;\r\n } else {\r\n event.start = new Date().getTime();\r\n }\r\n\r\n if (item.endDate) {\r\n event.end = item.endDate;\r\n }\r\n\r\n return event;\r\n });\r\n callback && callback(this.events);\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * 当数据绑定引擎从视图解除绑定时被调用\r\n */\r\n unbind() {\r\n this.subscribe.dispose();\r\n }\r\n\r\n attached() {\r\n\r\n $(this.scheduleRef).fullCalendar({\r\n header: {\r\n left: 'prev,next today',\r\n // center: '',\r\n center: 'title',\r\n right: 'month,agendaWeek,agendaDay,listWeek'\r\n },\r\n // height: $(window).height() - this.offset,\r\n height: 'parent',\r\n defaultDate: new Date(),\r\n defaultView: 'listWeek',\r\n editable: true,\r\n eventLimit: true, // allow \"more\" link when too many events\r\n navLinks: true,\r\n // timezone: 'Asia/Shanghai',\r\n // timezone: 'UTC',\r\n timezone: 'local',\r\n dayClick: (date, jsEvent, view) => {\r\n\r\n $(this.startRef).calendar('set date', date.toDate());\r\n this.isPopupShowForDayClick = true;\r\n $(this.addRef).popup('show');\r\n },\r\n eventClick: (calEvent, jsEvent, view) => {\r\n this.scheduleEditVm.show(calEvent);\r\n },\r\n eventMouseover: (event, jsEvent, view) => {},\r\n eventMouseout: (event, jsEvent, view) => {},\r\n events: (start, end, timezone, callback) => {\r\n\r\n this._getEvents(start, end, callback);\r\n },\r\n eventDrop: (event, delta, revertFunc) => {\r\n\r\n if (event.creator.username != this.loginUser.username) {\r\n toastr.error('您没有权限修改!');\r\n ea.publish(nsCons.EVENT_SCHEDULE_REFRESH, {});\r\n return;\r\n }\r\n\r\n this._updateDate(event.id, event.start, event.end);\r\n },\r\n eventResize: (event, delta, revertFunc) => {\r\n\r\n if (event.creator.username != this.loginUser.username) {\r\n toastr.error('您没有权限修改!');\r\n ea.publish(nsCons.EVENT_SCHEDULE_REFRESH, {});\r\n return;\r\n }\r\n\r\n this._updateDate(event.id, event.start, event.end);\r\n }\r\n });\r\n\r\n $(this.addRef)\r\n .popup({\r\n on: 'click',\r\n // closable: false,\r\n inline: true,\r\n // hoverable: true,\r\n silent: true,\r\n // movePopup: false,\r\n jitter: 300,\r\n position: 'bottom center',\r\n delay: {\r\n show: 300,\r\n hide: 300\r\n },\r\n onVisible: () => {\r\n $(this.titleRef).focus();\r\n autosize.update(this.titleRef);\r\n if (!this.title && !this.isPopupShowForDayClick) {\r\n $(this.startRef).calendar('set date', new Date());\r\n }\r\n this.isPopupShowForDayClick = false;\r\n }\r\n });\r\n\r\n $(this.startRef).calendar({\r\n today: true,\r\n endCalendar: $(this.endRef)\r\n });\r\n $(this.endRef).calendar({\r\n today: true,\r\n startCalendar: $(this.startRef)\r\n });\r\n\r\n this._reset();\r\n }\r\n\r\n titleKeyupHandler(event) {\r\n if (event.ctrlKey && event.keyCode === 13) {\r\n this.addHandler();\r\n }\r\n }\r\n\r\n _updateDate(id, start, end) {\r\n let data = {\r\n id: id,\r\n basePath: utils.getBasePath()\r\n };\r\n\r\n if (start) {\r\n data.startDate = start.toDate();\r\n } else {\r\n data.startDate = new Date();\r\n }\r\n\r\n if (end) {\r\n data.endDate = end.toDate();\r\n }\r\n\r\n $.post('/admin/schedule/updateStartEndDate', data, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n toastr.success('更新日程成功!');\r\n ea.publish(nsCons.EVENT_SCHEDULE_REFRESH, {});\r\n } else {\r\n toastr.error(data.data);\r\n }\r\n });\r\n }\r\n\r\n initMembersUI(last) {\r\n if (last) {\r\n _.defer(() => {\r\n $(this.actorsRef).dropdown().dropdown('clear').dropdown(this.actorsOpts).dropdown('set selected', [this.loginUser.username]);\r\n });\r\n }\r\n }\r\n\r\n clearStartDateHandler() {\r\n $(this.startRef).calendar('clear');\r\n }\r\n\r\n clearEndDateHandler() {\r\n $(this.endRef).calendar('clear');\r\n }\r\n\r\n addHandler() {\r\n\r\n if (!this.title) {\r\n toastr.error('日程内容不能为空!');\r\n return;\r\n }\r\n\r\n let data = {\r\n title: this.title,\r\n basePath: utils.getBasePath(),\r\n actors: $(this.actorsRef).dropdown('get value')\r\n };\r\n\r\n let start = $(this.startRef).calendar('get date');\r\n let end = $(this.endRef).calendar('get date');\r\n\r\n if (start) {\r\n data.startDate = start;\r\n } else {\r\n data.startDate = new Date();\r\n }\r\n\r\n if (end) {\r\n data.endDate = end;\r\n }\r\n\r\n $.post('/admin/schedule/create', data, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n $(this.scheduleRef).fullCalendar('refetchEvents');\r\n toastr.success('添加日程成功!');\r\n this._reset();\r\n $(this.addRef).popup('hide');\r\n } else {\r\n toastr.error(data.data);\r\n }\r\n });\r\n }\r\n\r\n _reset() {\r\n this.title = '';\r\n $(this.startRef).calendar('set date', new Date());\r\n $(this.endRef).calendar('clear');\r\n $(this.actorsRef).dropdown('clear');\r\n if (this.loginUser && this.loginUser.username) {\r\n $(this.actorsRef).dropdown('set selected', [this.loginUser.username]).dropdown('set value', this.loginUser.username);\r\n }\r\n }\r\n}\r\n","import { bindable, containerless } from 'aurelia-framework';\n\n@containerless\nexport class EmChatShare {\n\n shares = [];\n desc = '';\n\n @bindable chat;\n @bindable channel;\n @bindable loginUser;\n @bindable isAt;\n\n basePath = utils.getBasePath();\n\n /**\n * 当视图被附加到DOM中时被调用\n */\n attached() {\n $(this.searchRef)\n .search({\n minCharacters: 2,\n cache: false,\n selectFirstResult: true,\n showNoResults: false,\n onSelect: (result, response) => {\n result.item._id = _.uniqueId('share-item-');\n result.item._type = result.item.username ? 'user' : 'channel';\n this.shares.push(result.item);\n _.defer(() => { $(this.inputSearchRef).val(''); });\n },\n apiSettings: {\n onResponse: (resp) => {\n var response = {\n results: []\n };\n $.each(resp.data.users, (index, item) => {\n if (!_.find(_.filter(this.shares, c => c._type == 'user'), { username: item.username })) {\n response.results.push({\n item: item,\n title: ` ${item.name} (${item.username})`,\n });\n }\n });\n $.each(resp.data.channels, (index, item) => {\n if (!_.find(_.filter(this.shares, c => c._type == 'channel'), { name: item.name })) {\n response.results.push({\n item: item,\n title: ` ${item.title} (${item.name})`,\n });\n }\n });\n return response;\n },\n url: '/admin/blog/share/to/search?search={query}'\n }\n });\n $(this.shareRef).popup({\n on: 'click',\n inline: true,\n silent: true,\n position: 'bottom right',\n jitter: 300,\n delay: {\n show: 300,\n hide: 300\n },\n onVisible: () => {\n $(this.inputSearchRef).focus();\n }\n });\n }\n\n shareSearchKeyupHandler(event) {\n if (event.keyCode === 13 && !$(this.searchRef).search('is visible')) {\n let val = $(this.inputSearchRef).val();\n if (utils.isMail(val)) {\n if (!_.find(_.filter(this.shares, c => c._type == 'mail'), { mail: val })) {\n this.shares.push({\n _id: _.uniqueId('share-item-'),\n _type: 'mail',\n mail: val\n });\n $(this.inputSearchRef).val('');\n }\n }\n }\n }\n\n show() {\n $(this.shareRef).popup('show');\n }\n\n removeShareHandler(item) {\n this.shares = _.reject(this.shares, { _id: item._id });\n }\n\n cancelHandler() {\n this._reset();\n }\n\n _reset() {\n this.shares = [];\n this.desc = '';\n $(this.inputSearchRef).val('');\n $(this.shareRef).popup('hide');\n }\n\n shareHandler() {\n\n if (this.shares.length === 0) {\n toastr.error('请先指定沟通消息分享用户或者频道或者邮箱!');\n return;\n }\n\n this.ajaxS = $.post(`/admin/chat/${this.isAt ? 'direct' : 'channel'}/share`, {\n basePath: utils.getBasePath(),\n href: `${this.basePath}#/chat/${this.isAt ? ('@' + this.loginUser.username) : this.channel.name}?id=${this.chat.id}`,\n id: this.chat.id,\n desc: this.desc,\n html: utils.md2html(this.chat.content),\n users: _.chain(this.shares).filter(item => item._type == 'user').map('username').join().value(),\n channels: _.chain(this.shares).filter(item => item._type == 'channel').map('name').join().value(),\n mails: _.chain(this.shares).filter(item => item._type == 'mail').map('mail').join().value()\n }, (data, textStatus, xhr) => {\n if (data.success) {\n this._reset();\n toastr.success('沟通消息分享成功!');\n } else {\n toastr.error(data.data, '沟通消息分享失败!');\n }\n });\n }\n}\n","import { bindable, containerless } from 'aurelia-framework';\r\n\r\n@containerless\r\nexport class EmChatSidebarLeft {\r\n\r\n @bindable users;\r\n @bindable loginUser;\r\n @bindable channels;\r\n @bindable chatTo;\r\n @bindable isAt;\r\n filter = '';\r\n isSuper = nsCtx.isSuper;\r\n\r\n usersChanged() {\r\n this._filter();\r\n }\r\n\r\n channelsChanged() {\r\n this._filter();\r\n }\r\n\r\n loginUserChanged() {\r\n if (this.loginUser) {\r\n this.isSuper = utils.isSuperUser(this.loginUser);\r\n }\r\n }\r\n\r\n /**\r\n * 构造函数\r\n */\r\n constructor() {\r\n this.subscribe = ea.subscribe(nsCons.EVENT_CHANNEL_ACTIONS, (payload) => {\r\n this[payload.action](payload.item);\r\n });\r\n this.subscribe1 = ea.subscribe(nsCons.EVENT_SYSTEM_LINKS_REFRESH, (payload) => {\r\n this._refreshSysLinks();\r\n });\r\n }\r\n\r\n _refreshSysLinks() {\r\n $.get('/admin/link/listByApp', (data) => {\r\n if (data.success) {\r\n this.sysLinks = data.data;\r\n } else {\r\n this.sysLinks = [];\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * 当数据绑定引擎从视图解除绑定时被调用\r\n */\r\n unbind() {\r\n this.subscribe.dispose();\r\n this.subscribe1.dispose();\r\n }\r\n\r\n bind(bindingCtx, overrideCtx) {\r\n this._refreshSysLinks();\r\n }\r\n\r\n /**\r\n * 当视图被附加到DOM中时被调用\r\n */\r\n attached() {\r\n $(this.logoRef).on('mouseenter', (event) => {\r\n $(this.logoRef).animateCss('flip');\r\n });\r\n }\r\n\r\n _filter() {\r\n\r\n _.each(this.users, (item) => {\r\n item.hidden = item.username.indexOf(this.filter) == -1;\r\n });\r\n\r\n _.each(this.channels, (item) => {\r\n item.hidden = item.name.indexOf(this.filter) == -1;\r\n });\r\n }\r\n\r\n chatToUserFilerKeyupHanlder(evt) {\r\n this._filter();\r\n\r\n if (evt.keyCode === 13) {\r\n let user = _.find(this.users, {\r\n hidden: false\r\n });\r\n\r\n if (user) {\r\n window.location = wurl('path') + `#/chat/@${user.username}`;\r\n return;\r\n }\r\n\r\n let channel = _.find(this.channels, {\r\n hidden: false\r\n });\r\n\r\n if (channel) {\r\n window.location = wurl('path') + `#/chat/${channel.name}`;\r\n return;\r\n }\r\n }\r\n }\r\n\r\n clearFilterHandler() {\r\n this.filter = '';\r\n _.each(this.users, (item) => {\r\n item.hidden = item.username.indexOf(this.filter) == -1;\r\n });\r\n _.each(this.channels, (item) => {\r\n item.hidden = item.name.indexOf(this.filter) == -1;\r\n });\r\n }\r\n\r\n editHandler(item) {\r\n this.selectedChannel = item;\r\n this.channelEditMd.show();\r\n }\r\n\r\n delHandler(item) {\r\n this.confirmMd.show({\r\n onapprove: () => {\r\n $.post('/admin/channel/delete', {\r\n id: item.id\r\n }, (data) => {\r\n if (data.success) {\r\n toastr.success('删除频道成功!');\r\n _.remove(this.channels, { id: item.id });\r\n ea.publish(nsCons.EVENT_CHAT_CHANNEL_DELETED, { channel: item });\r\n } else {\r\n toastr.error(data.data, '删除频道失败!');\r\n }\r\n });\r\n }\r\n });\r\n }\r\n\r\n membersMgrHandler(item) {\r\n this.selectedChannel = item;\r\n this.channelMembersMgrMd.show();\r\n }\r\n\r\n membersShowHandler(item) {\r\n this.selectedChannel = item;\r\n this.channelMembersShowMd.show();\r\n }\r\n\r\n leaveHandler(item) {\r\n this.confirmMd.show({\r\n content: `确定要离开频道${item.title}吗?`,\r\n onapprove: () => {\r\n $.post('/admin/channel/leave', {\r\n id: item.id\r\n }, (data) => {\r\n if (data.success) {\r\n toastr.success('离开频道成功!');\r\n ea.publish(nsCons.EVENT_CHAT_CHANNEL_LEAVED, { channel: data.data });\r\n } else {\r\n toastr.error(data.data, '离开频道失败!');\r\n }\r\n });\r\n }\r\n });\r\n }\r\n\r\n switchHandler() {\r\n ea.publish(nsCons.EVENT_SWITCH_CHAT_TO, {});\r\n }\r\n\r\n addChannelLinkHandler(event) {\r\n this.sysLinkMgrVm.show();\r\n }\r\n\r\n isSubscribed(item) {\r\n return _.some(item.subscriber, { username: this.loginUser.username });\r\n }\r\n\r\n subscribeHandler(item) {\r\n\r\n let isSub = this.isSubscribed(item);\r\n\r\n $.post(`/admin/channel/${isSub ? 'unsubscribe' : 'subscribe'}`, {\r\n id: item.id\r\n }, (data) => {\r\n if (data.success) {\r\n item.subscriber = data.data.subscriber;\r\n toastr.success(`${isSub ? '取消订阅' : '订阅频道'}成功!`);\r\n item.isSubscribed = !isSub;\r\n } else {\r\n toastr.error(data.data, `${isSub ? '取消订阅' : '订阅频道'}失败!`);\r\n }\r\n });\r\n }\r\n\r\n sysLinkHandler(item) {\r\n $.post('/admin/link/count/inc', { id: item.id });\r\n return true;\r\n }\r\n\r\n}\r\n","import { bindable, containerless } from 'aurelia-framework';\r\n\r\n@containerless\r\nexport class EmChatSidebarRight {\r\n\r\n @bindable loginUser;\r\n @bindable isAt;\r\n @bindable channel;\r\n\r\n actionMapping = {\r\n [nsCons.ACTION_TYPE_DIR]: { handler: this.dirHandler, nodata: '', show: 'dir' },\r\n [nsCons.ACTION_TYPE_AT]: { nodata: '暂无@消息', show: 'msg' },\r\n [nsCons.ACTION_TYPE_STOW]: { nodata: '暂无收藏消息', show: 'msg' },\r\n [nsCons.ACTION_TYPE_ATTACH]: { handler: this.attachHandler, nodata: '', show: 'attach' },\r\n [nsCons.ACTION_TYPE_SCHEDULE]: { handler: this.scheduleHandler, nodata: '', show: 'schedule' },\r\n [nsCons.ACTION_TYPE_SEARCH]: { nodata: '无符合检索结果', show: 'msg' },\r\n [nsCons.ACTION_TYPE_PIN]: { nodata: '暂无频道固定消息', show: 'msg' },\r\n }\r\n\r\n /**\r\n * 构造函数\r\n */\r\n constructor() {\r\n\r\n this.subscribe = ea.subscribe(nsCons.EVENT_CHAT_RIGHT_SIDEBAR_TOGGLE, (payload) => {\r\n this.actived = _.clone(this.actionMapping[payload.action]);\r\n this.actived.payload = payload;\r\n if (this.actived.handler) {\r\n _.bind(this.actived.handler, this, payload)();\r\n }\r\n });\r\n\r\n }\r\n\r\n /**\r\n * 当数据绑定引擎从视图解除绑定时被调用\r\n */\r\n unbind() {\r\n this.subscribe.dispose();\r\n }\r\n\r\n attachHandler(payload) {\r\n this.chatAttachVm.fetch();\r\n }\r\n\r\n dirHandler(payload) {\r\n $(this.dirRef).empty().append(payload.result);\r\n }\r\n\r\n scheduleHandler(payload) {\r\n this.chatScheduleVm.show();\r\n }\r\n\r\n}\r\n","import { bindable, containerless } from 'aurelia-framework';\r\n\r\n@containerless\r\nexport class EmChatSystemLinkMgr {\r\n\r\n links = [];\r\n\r\n addHandler() {\r\n $.post('/admin/link/create', {\r\n title: this.title,\r\n href: this.href,\r\n type: 'App'\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n this.title = '';\r\n this.href = '';\r\n this.links.push(data.data);\r\n ea.publish(nsCons.EVENT_SYSTEM_LINKS_REFRESH, {});\r\n } else {\r\n toastr.error(data.data);\r\n }\r\n });\r\n }\r\n\r\n delHandler(item) {\r\n $.post('/admin/link/delete', {\r\n id: item.id\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n this.links = _.reject(this.links, { id: item.id });\r\n ea.publish(nsCons.EVENT_SYSTEM_LINKS_REFRESH, {});\r\n toastr.success('删除成功!');\r\n } else {\r\n toastr.error(data.data);\r\n }\r\n });\r\n }\r\n\r\n editHandler(item) {\r\n item.oldTitle = item.title;\r\n item.oldHref = item.href;\r\n item.isEditing = true;\r\n }\r\n\r\n updateHandler(item) {\r\n $.post('/admin/link/update', {\r\n id: item.id,\r\n title: item.title,\r\n href: item.href,\r\n }, (data, textStatus, xhr) => {\r\n if (data.success) {\r\n item.isEditing = false;\r\n ea.publish(nsCons.EVENT_SYSTEM_LINKS_REFRESH, {});\r\n toastr.success('更新成功!');\r\n } else {\r\n toastr.error(data.data);\r\n }\r\n });\r\n }\r\n\r\n showHandler() {\r\n $.get('/admin/link/listByApp', (data) => {\r\n if (data.success) {\r\n this.links = data.data;\r\n } else {\r\n this.links = [];\r\n }\r\n });\r\n }\r\n\r\n show() {\r\n this.emModal.show({ autoDimmer: false });\r\n }\r\n\r\n approveHandler(modal) {\r\n\r\n }\r\n}\r\n","import { bindable, containerless } from 'aurelia-framework';\r\n\r\n@containerless\r\nexport class EmChatTopMenu {\r\n\r\n @bindable loginUser;\r\n @bindable chatUser;\r\n @bindable users;\r\n @bindable channels;\r\n @bindable channel;\r\n @bindable loginUser;\r\n @bindable chatId;\r\n @bindable chatTo;\r\n @bindable isAt;\r\n isRightSidebarShow = false;\r\n activeType = ''; // 触发激活的操作类型: search | stow | at | attach\r\n\r\n ACTION_TYPE_SEARCH = nsCons.ACTION_TYPE_SEARCH;\r\n ACTION_TYPE_STOW = nsCons.ACTION_TYPE_STOW;\r\n ACTION_TYPE_PIN = nsCons.ACTION_TYPE_PIN;\r\n ACTION_TYPE_AT = nsCons.ACTION_TYPE_AT;\r\n ACTION_TYPE_DIR = nsCons.ACTION_TYPE_DIR;\r\n ACTION_TYPE_ATTACH = nsCons.ACTION_TYPE_ATTACH;\r\n ACTION_TYPE_SCHEDULE = nsCons.ACTION_TYPE_SCHEDULE;\r\n\r\n countAt = null;\r\n newAtCnt = 0;\r\n\r\n channelLinks = [];\r\n\r\n loginUserChanged() {\r\n if (this.loginUser) {\r\n this.isSuper = utils.isSuperUser(this.loginUser);\r\n }\r\n }\r\n\r\n chatToChanged() {\r\n $(this.chatToDropdownRef).dropdown('set selected', this.chatId).dropdown('hide');\r\n }\r\n\r\n channelChanged() {\r\n this._refreshChannelLinks();\r\n }\r\n\r\n _refreshChannelLinks() {\r\n if (this.channel) {\r\n $.get('/admin/link/listBy', {\r\n channelId: this.channel.id\r\n }, (data) => {\r\n if (data.success) {\r\n this.channelLinks = data.data;\r\n } else {\r\n this.channelLinks = [];\r\n }\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * 构造函数\r\n */\r\n constructor() {\r\n this.subscribe = ea.subscribe(nsCons.EVENT_CHAT_MSG_WIKI_DIR, (payload) => {\r\n this.dir = payload.dir;\r\n\r\n if ((this.activeType == this.ACTION_TYPE_DIR) && this.isRightSidebarShow) {\r\n ea.publish(nsCons.EVENT_CHAT_RIGHT_SIDEBAR_TOGGLE, {\r\n action: this.activeType,\r\n result: this.dir\r\n });\r\n }\r\n });\r\n\r\n this.subscribe1 = ea.subscribe(nsCons.EVENT_CHAT_POLL_UPDATE, (payload) => {\r\n if (this.countAt !== null && this.newAtCnt <= 0) {\r\n this.newAtCnt = payload.countAt - this.countAt;\r\n }\r\n this.countAt = payload.countAt;\r\n this.countMyRecentSchedule = payload.countMyRecentSchedule;\r\n });\r\n\r\n this.subscribe2 = ea.subscribe(nsCons.EVENT_SWITCH_CHAT_TO, (payload) => {\r\n $(this.chatToDropdownRef).dropdown('toggle');\r\n });\r\n\r\n this.subscribe3 = ea.subscribe(nsCons.EVENT_CHANNEL_LINKS_REFRESH, (payload) => {\r\n this._refreshChannelLinks();\r\n });\r\n }\r\n\r\n /**\r\n * 当数据绑定引擎从视图解除绑定时被调用\r\n */\r\n unbind() {\r\n this.subscribe.dispose();\r\n this.subscribe1.dispose();\r\n this.subscribe2.dispose();\r\n this.subscribe3.dispose();\r\n }\r\n\r\n /**\r\n * 当视图被附加到DOM中时被调用\r\n */\r\n attached() {\r\n this.initHotkeys();\r\n this.initSearch();\r\n }\r\n\r\n initSearch() {\r\n var source = [];\r\n if (localStorage) {\r\n var v = localStorage.getItem('tms/chat-direct:search');\r\n source = v ? $.parseJSON(v) : [];\r\n }\r\n this.searchSource = source;\r\n $(this.searchRef).search({\r\n source: source,\r\n onSelect: (result, response) => {\r\n this.searchHandler();\r\n },\r\n onResults: () => {\r\n $(this.searchRef).search('hide results');\r\n }\r\n });\r\n\r\n }\r\n\r\n searchHandler() {\r\n\r\n $(this.searchRef).search('hide results');\r\n\r\n let search = $(this.searchInputRef).val();\r\n\r\n if (!search || search.length < 2) {\r\n toastr.error('检索条件至少需要两个字符!');\r\n return;\r\n }\r\n\r\n this.search = search;\r\n\r\n // 保存检索值\r\n var isExists = false;\r\n $.each(this.searchSource, function(index, val) {\r\n if (val.title == search) {\r\n isExists = true;\r\n return false;\r\n }\r\n });\r\n if (!isExists) {\r\n this.searchSource.splice(0, 0, {\r\n title: search\r\n });\r\n $(this.searchRef).search({\r\n source: _.clone(this.searchSource)\r\n });\r\n }\r\n localStorage && localStorage.setItem('tms/chat-direct:search', JSON.stringify(this.searchSource));\r\n\r\n let url;\r\n let data;\r\n if (this.isAt) {\r\n url = `/admin/chat/direct/search`;\r\n data = {\r\n search: this.search,\r\n size: 20,\r\n page: 0\r\n };\r\n } else {\r\n url = `/admin/chat/channel/search`;\r\n data = {\r\n search: this.search,\r\n channelId: this.channel.id,\r\n size: 20,\r\n page: 0\r\n };\r\n }\r\n\r\n this.searchingP = $.get(url, data, (data) => {\r\n if (data.success) {\r\n this.toggleRightSidebar(true);\r\n\r\n ea.publish(nsCons.EVENT_CHAT_RIGHT_SIDEBAR_TOGGLE, {\r\n action: this.activeType,\r\n result: data.data,\r\n search: this.search\r\n });\r\n }\r\n });\r\n }\r\n\r\n initHotkeys() {\r\n $(document).bind('keydown', 's', (event) => { // sidebar\r\n event.preventDefault();\r\n this.toggleRightSidebar();\r\n }).bind('keydown', 'ctrl+k', (event) => {\r\n event.preventDefault();\r\n $(this.chatToDropdownRef).dropdown('toggle');\r\n });\r\n\r\n $(this.filterChatToUser).bind('keydown', 'ctrl+k', (event) => {\r\n event.preventDefault();\r\n $(this.chatToDropdownRef).dropdown('toggle');\r\n });\r\n }\r\n\r\n initChatToDropdownHandler(last) {\r\n if (last) {\r\n _.defer(() => {\r\n $(this.chatToDropdownRef).dropdown().dropdown('set selected', this.chatId).dropdown({\r\n onChange: (value, text, $choice) => {\r\n window.location = wurl('path') + `#/chat/${$choice.attr('data-id')}`;\r\n }\r\n });\r\n });\r\n }\r\n }\r\n\r\n searchFocusHandler() {\r\n $(this.searchInputRef).css('width', 'auto');\r\n $(this.searchRemoveRef).show();\r\n this.isActiveSearch = true;\r\n }\r\n\r\n searchBlurHandler() {\r\n if (!$(this.searchInputRef).val()) {\r\n $(this.searchInputRef).css('width', '95px');\r\n $(this.searchRemoveRef).hide();\r\n this.isActiveSearch = false;\r\n }\r\n }\r\n\r\n sibebarRightHandler(event) {\r\n this.toggleRightSidebar();\r\n }\r\n\r\n toggleRightSidebar(asShow) {\r\n if (_.isUndefined(asShow)) {\r\n this.isRightSidebarShow = !this.isRightSidebarShow;\r\n } else {\r\n this.isRightSidebarShow = asShow;\r\n }\r\n\r\n ea.publish(nsCons.EVENT_CHAT_SIDEBAR_TOGGLE, {\r\n isShow: this.isRightSidebarShow\r\n });\r\n }\r\n\r\n searchKeyupHandler(evt) {\r\n if (evt.keyCode === 13) {\r\n this.activeType = nsCons.ACTION_TYPE_SEARCH;\r\n this.searchHandler();\r\n } else if (evt.keyCode === 27) {\r\n this.clearSearchHandler();\r\n }\r\n return true;\r\n }\r\n\r\n clearSearchHandler() {\r\n $(this.searchInputRef).val('').focus();\r\n }\r\n\r\n showStowHandler(event) {\r\n\r\n if (this.isRightSidebarShow && (this.activeType == nsCons.ACTION_TYPE_STOW) && !event.ctrlKey) {\r\n this.toggleRightSidebar();\r\n return;\r\n }\r\n\r\n this.activeType = nsCons.ACTION_TYPE_STOW;\r\n this.ajaxStow = $.get('/admin/chat/channel/getStows', (data) => {\r\n if (data.success) {\r\n let stowChats = _.map(data.data, (item) => {\r\n let chatChannel = item.chatChannel;\r\n chatChannel.chatStow = item;\r\n return chatChannel;\r\n });\r\n ea.publish(nsCons.EVENT_CHAT_RIGHT_SIDEBAR_TOGGLE, {\r\n action: this.activeType,\r\n result: _.reverse(stowChats)\r\n });\r\n this.toggleRightSidebar(true);\r\n } else {\r\n toastr.error(data.data, '获取收藏消息失败!');\r\n }\r\n });\r\n }\r\n\r\n showAtHandler(event) {\r\n\r\n if (this.isRightSidebarShow && (this.activeType == nsCons.ACTION_TYPE_AT) && (this.newAtCnt == 0) && !event.ctrlKey) {\r\n this.toggleRightSidebar();\r\n return;\r\n }\r\n\r\n this.activeType = nsCons.ACTION_TYPE_AT;\r\n this.newAtCnt = 0;\r\n this.ajaxAt = $.get('/admin/chat/channel/getAts', {\r\n page: 0,\r\n size: 20\r\n }, (data) => {\r\n if (data.success) {\r\n ea.publish(nsCons.EVENT_CHAT_RIGHT_SIDEBAR_TOGGLE, {\r\n action: this.activeType,\r\n result: data.data\r\n });\r\n this.toggleRightSidebar(true);\r\n } else {\r\n toastr.error(data.data, '获取@消息失败!');\r\n }\r\n });\r\n }\r\n\r\n logoutHandler() {\r\n $.post('/admin/logout').always(() => {\r\n utils.redirect2Login();\r\n });\r\n }\r\n\r\n showWikiDirHandler(event) {\r\n\r\n if (this.isRightSidebarShow && (this.activeType == nsCons.ACTION_TYPE_DIR) && !event.ctrlKey) {\r\n this.toggleRightSidebar();\r\n return;\r\n }\r\n\r\n this.activeType = nsCons.ACTION_TYPE_DIR;\r\n ea.publish(nsCons.EVENT_CHAT_RIGHT_SIDEBAR_TOGGLE, {\r\n action: this.activeType,\r\n result: this.dir\r\n });\r\n this.toggleRightSidebar(true);\r\n }\r\n\r\n showAttachHandler(event) {\r\n\r\n if (this.isRightSidebarShow && (this.activeType == nsCons.ACTION_TYPE_ATTACH) && !event.ctrlKey) {\r\n this.toggleRightSidebar();\r\n return;\r\n }\r\n\r\n this.activeType = nsCons.ACTION_TYPE_ATTACH;\r\n ea.publish(nsCons.EVENT_CHAT_RIGHT_SIDEBAR_TOGGLE, {\r\n action: this.activeType\r\n });\r\n this.toggleRightSidebar(true);\r\n }\r\n\r\n showScheduleHandler(event) {\r\n\r\n if (this.isRightSidebarShow && (this.activeType == nsCons.ACTION_TYPE_SCHEDULE) && !event.ctrlKey) {\r\n this.toggleRightSidebar();\r\n return;\r\n }\r\n\r\n this.activeType = nsCons.ACTION_TYPE_SCHEDULE;\r\n ea.publish(nsCons.EVENT_CHAT_RIGHT_SIDEBAR_TOGGLE, {\r\n action: this.activeType\r\n });\r\n this.toggleRightSidebar(true);\r\n }\r\n\r\n userEditHandler() {\r\n this.userEditMd.show();\r\n }\r\n\r\n membersShowHandler(item, event) {\r\n event.stopImmediatePropagation();\r\n ea.publish(nsCons.EVENT_CHANNEL_ACTIONS, {\r\n action: 'membersShowHandler',\r\n item: item\r\n });\r\n }\r\n\r\n leaveHandler(item, event) {\r\n event.stopImmediatePropagation();\r\n ea.publish(nsCons.EVENT_CHANNEL_ACTIONS, {\r\n action: 'leaveHandler',\r\n item: item\r\n });\r\n }\r\n\r\n membersMgrHandler(item, event) {\r\n event.stopImmediatePropagation();\r\n ea.publish(nsCons.EVENT_CHANNEL_ACTIONS, {\r\n action: 'membersMgrHandler',\r\n item: item\r\n });\r\n }\r\n\r\n editHandler(item, event) {\r\n event.stopImmediatePropagation();\r\n ea.publish(nsCons.EVENT_CHANNEL_ACTIONS, {\r\n action: 'editHandler',\r\n item: item\r\n });\r\n }\r\n\r\n delHandler(item, event) {\r\n event.stopImmediatePropagation();\r\n ea.publish(nsCons.EVENT_CHANNEL_ACTIONS, {\r\n action: 'delHandler',\r\n item: item\r\n });\r\n }\r\n\r\n viewOrMgrUsersHandler(event) {\r\n\r\n if (this.channel.owner.username == this.loginUser.username) {\r\n this.membersMgrHandler(this.channel, event);\r\n } else {\r\n this.membersShowHandler(this.channel, event);\r\n }\r\n }\r\n\r\n channelInfoHandler(event) {\r\n\r\n if (this.channel.owner.username == this.loginUser.username) {\r\n this.editHandler(this.channel, event);\r\n } else {\r\n event.stopImmediatePropagation();\r\n }\r\n }\r\n\r\n userInfoHandler(event) {\r\n event.stopImmediatePropagation();\r\n }\r\n\r\n stopImmediatePropagationHandler(event) {\r\n event.stopImmediatePropagation();\r\n }\r\n\r\n mailToHandler(event) {\r\n event.stopImmediatePropagation();\r\n window.location = `mailto:${this.chatUser.mails}`;\r\n }\r\n\r\n channelLinksHandler(event) {\r\n event.stopImmediatePropagation();\r\n $(this.channelLinksDdRef).dropdown('toggle');\r\n }\r\n\r\n addChannelLinkHandler(event) {\r\n this.channelLinkMgrVm.show();\r\n }\r\n\r\n openChannelLinkHandler(event, item) {\r\n event.stopImmediatePropagation();\r\n $(this.channelLinksDdRef).dropdown('hide');\r\n utils.openNewWin(item.href);\r\n $.post('/admin/link/count/inc', { id: item.id });\r\n }\r\n\r\n showPinHandler(event) {\r\n event.stopImmediatePropagation();\r\n if (this.isRightSidebarShow && (this.activeType == nsCons.ACTION_TYPE_PIN) && !event.ctrlKey) {\r\n this.toggleRightSidebar();\r\n return;\r\n }\r\n\r\n this.activeType = nsCons.ACTION_TYPE_PIN;\r\n\r\n this.ajaxPin = $.get('/admin/chat/channel/pin/list', {\r\n cid: this.channel.id\r\n }, (data) => {\r\n if (data.success) {\r\n let pinChats = _.map(data.data, (item) => {\r\n let chatChannel = item.chatChannel;\r\n chatChannel.chatPin = item;\r\n return chatChannel;\r\n });\r\n ea.publish(nsCons.EVENT_CHAT_RIGHT_SIDEBAR_TOGGLE, {\r\n action: this.activeType,\r\n result: _.reverse(pinChats)\r\n });\r\n this.toggleRightSidebar(true);\r\n } else {\r\n toastr.error(data.data, '获取频道固定消息失败!');\r\n }\r\n });\r\n }\r\n}\r\n","import {\n bindable,\n bindingMode,\n containerless\n}\nfrom 'aurelia-framework';\n\n@containerless\nexport class EmCheckbox {\n\n @bindable label;\n @bindable title;\n @bindable classes = 'fitted';\n @bindable onchange;\n @bindable onchecked;\n @bindable onunchecked;\n @bindable emCheckboxAll;\n @bindable({ defaultBindingMode: bindingMode.twoWay }) checked;\n\n @bindable signal;\n\n checkedChanged(news, old) {\n if (news) {\n $(this.checkbox).checkbox('set checked');\n } else {\n $(this.checkbox).checkbox('set unchecked');\n }\n\n this.signal && bs.signal(this.signal);\n }\n\n /**\n * 当视图被附加到DOM中时被调用\n */\n attached() {\n $(this.checkbox).checkbox({\n onChecked: () => {\n this.checked = true;\n _.defer(() => {\n this.emCheckboxAll && this.emCheckboxAll.refreshCheckedStatus();\n this.onchecked && this.onchecked(this);\n this.signal && bs.signal(this.signal);\n });\n\n },\n onUnchecked: () => {\n this.checked = false;\n _.defer(() => {\n this.emCheckboxAll && this.emCheckboxAll.refreshCheckedStatus();\n this.onunchecked && this.onunchecked(this);\n this.signal && bs.signal(this.signal);\n });\n\n },\n onChange: () => {\n _.defer(() => {\n this.onchange && this.onchange(this);\n });\n\n },\n });\n this.checkedChanged(this.checked);\n }\n}\n","import { bindable } from 'aurelia-framework';\r\n\r\nexport class EmConfirmModal {\r\n\r\n\tconfig = {};\r\n\r\n constructor() { // 通过构造函数注入\r\n }\r\n\r\n /**\r\n * 当视图从DOM中分离时被调用\r\n */\r\n detached() {\r\n $(this.md).remove();\r\n }\r\n\r\n attached() {\r\n\r\n $(this.md).modal({\r\n closable: false,\r\n allowMultiple: true,\r\n onApprove: () => {\r\n this.onapprove && this.onapprove();\r\n },\r\n onDeny: () => {\r\n this.ondeny && this.ondeny();\r\n }\r\n });\r\n }\r\n\r\n reset() {\r\n this.config = {\r\n title: '操作确认',\r\n content: '确定要执行该操作吗?',\r\n warning: false\r\n };\r\n }\r\n\r\n /**\r\n * 显示确认窗口\r\n * @param onapprove: 确认回调函数\r\n * @param ondeny: 取消回调函数\r\n */\r\n show(config) {\r\n\r\n this.reset();\r\n\r\n if (config) {\r\n this.config = _.extend(this.config, config);\r\n }\r\n\r\n if (config && config.onapprove) {\r\n this.onapprove = config.onapprove;\r\n }\r\n\r\n if (config && config.ondeny) {\r\n this.ondeny = config.ondeny;\r\n }\r\n\r\n $(this.md).modal('show');\r\n }\r\n\r\n /* 隐藏确认窗口 */\r\n hide() {\r\n $(this.md).modal('hide');\r\n }\r\n}\r\n","import { bindable, bindingMode } from 'aurelia-framework';\r\n\r\nexport class EmDropdown {\r\n\r\n @bindable name = _.uniqueId('em-dropdown-');\r\n @bindable text = '';\r\n @bindable labelProp = 'label';\r\n @bindable valueProp = 'value';\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) selectedItem;\r\n @bindable menuItems = [];\r\n @bindable classes = 'selection';\r\n\r\n selectedItemChanged(news, old) {\r\n \r\n if (news) {\r\n _.defer(() => {\r\n $(this.dropdown).dropdown('set selected', news);\r\n // console.log('selectedItemChanged: ' + news);\r\n });\r\n }\r\n\r\n }\r\n\r\n menuItemsChanged(news, old) {\r\n if (_.isEmpty(news)) {\r\n $(this.dropdown).dropdown('clear')\r\n this.selectedItem = null;\r\n }\r\n }\r\n\r\n initDropdownHandler(last) {\r\n\r\n if (last) {\r\n _.defer(() => {\r\n $(this.dropdown).dropdown({\r\n onChange: (value, text, $choice) => {\r\n // toastr.info(value + ' | ' + text);\r\n this.selectedItem = value;\r\n }\r\n }).dropdown('set selected', this.selectedItem);\r\n // console.log('initDropdownHandler: ' + this.selectedItem);\r\n });\r\n }\r\n }\r\n}\r\n","import { bindable } from 'aurelia-framework';\r\n\r\nexport class EmHotkeysModal {\r\n\r\n /**\r\n * 当视图被附加到DOM中时被调用\r\n */\r\n attached() {\r\n $(this.md).modal();\r\n }\r\n\r\n show() {\r\n $(this.md).modal('show');\r\n }\r\n}\r\n","import {\r\n bindable,\r\n containerless\r\n}\r\nfrom 'aurelia-framework';\r\n\r\n@containerless\r\nexport class EmModal {\r\n\r\n @bindable confirmLabel = '确认';\r\n @bindable cancelLabel = '取消';\r\n @bindable onapprove;\r\n @bindable ondeny;\r\n @bindable onshow;\r\n @bindable onvisible;\r\n @bindable disabled = false;\r\n @bindable classes = 'small';\r\n @bindable showConfirm = true;\r\n\r\n options = {\r\n hideOnApprove: true,\r\n autoDimmer: true\r\n }\r\n\r\n /**\r\n * 当视图从DOM中分离时被调用\r\n */\r\n detached() {\r\n $(this.modal).remove();\r\n }\r\n\r\n /**\r\n * 当视图被附加到DOM中时被调用\r\n */\r\n attached() {\r\n\r\n $(this.modal).modal({\r\n closable: false,\r\n autofocus: false,\r\n observeChanges: true,\r\n allowMultiple: true,\r\n // detachable: false,\r\n onShow: () => {\r\n this.onshow && this.onshow(this);\r\n },\r\n onVisible: () => {\r\n this.onvisible && this.onvisible(this);\r\n },\r\n onApprove: () => {\r\n this.options.autoDimmer && this.showDimmer();\r\n this.onapprove && this.onapprove(this);\r\n return this.options.hideOnApprove;\r\n },\r\n onDeny: () => {\r\n this.ondeny && this.ondeny(this);\r\n }\r\n });\r\n }\r\n\r\n showDimmer() {\r\n this.loading = true;\r\n $(this.modal).find('.dimmer').dimmer('show');\r\n }\r\n\r\n hideDimmer() {\r\n this.loading = false;\r\n $(this.modal).find('.dimmer').dimmer('hide');\r\n }\r\n\r\n show(options) {\r\n _.extend(this.options, options);\r\n $(this.modal).modal('show');\r\n }\r\n\r\n hide() {\r\n this.hideDimmer();\r\n $(this.modal).modal('hide');\r\n }\r\n\r\n refresh() {\r\n // 延迟方法\r\n _.defer(() => {\r\n $(this.modal).modal('refresh');\r\n });\r\n }\r\n\r\n}\r\n","import { bindable, containerless } from 'aurelia-framework';\r\nimport {\r\n default as ColorHash\r\n} from 'color-hash';\r\n\r\n@containerless\r\nexport class EmUserAvatar {\r\n\r\n @bindable user;\r\n\r\n userChanged() {\r\n if (this.user) {\r\n this._calcNameChar();\r\n // let hsl = colorHash.hsl(this.user.username);\r\n let cs = colorHash.rgb(this.user.username);\r\n this.bgColor = `rgba(${cs[0]}, ${cs[1]}, ${cs[2]}, 0.6)`;\r\n // this.bgColor = `hsl(${hsl[0]}, ${hsl[1] * 100}%, ${hsl[2] * 100}%)`;\r\n this.color = `rgba(${255 - cs[0]}, ${255 - cs[1]}, ${255 - cs[2]}, 1)`;\r\n }\r\n }\r\n\r\n _calcNameChar(lastChar = true) {\r\n if (this.user.name) {\r\n this.nameChar = lastChar ? _.last(this.user.name) : _.first(this.user.name);\r\n } else {\r\n this.nameChar = lastChar ? _.last(this.user.username) : _.first(this.user.username);\r\n }\r\n }\r\n\r\n /**\r\n * 当视图被附加到DOM中时被调用\r\n */\r\n attached() {\r\n $(this.avatarRef).hover(() => {\r\n this._calcNameChar(false);\r\n }, () => {\r\n this._calcNameChar();\r\n });\r\n }\r\n\r\n}\r\n","import { bindable, containerless } from 'aurelia-framework';\n\n@containerless\nexport class EmUserEdit {\n\n @bindable user;\n\n show() {\n this.emModal.show({\n hideOnApprove: false,\n autoDimmer: true\n });\n }\n\n showHandler() {\n // $.get('/admin/user/get', {\n // username: this.user.username\n // }, (data) => {});\n }\n\n /**\n * 当视图被附加到DOM中时被调用\n */\n attached() {\n $(this.frm)\n .form({\n on: 'blur',\n inline: true,\n fields: {\n name: 'empty',\n mail: ['empty', 'email'],\n // password: ['minLength[8]'],\n }\n });\n }\n\n _chkOk() {\n let pwd = this.user.password;\n if (pwd && pwd.length < 8) {\n toastr.error('密码长度不能少于8位字符!');\n return false;\n }\n\n return true;\n }\n\n approveHandler(modal) {\n\n if (this._chkOk() && $(this.frm).form('is valid')) {\n $.post('/admin/user/update2', {\n username: this.user.username,\n password: this.user.password,\n name: this.user.name,\n mail: this.user.mails\n }, (data) => {\n modal.hide();\n this.user.password = '';\n if (data.success) {\n toastr.success('更新个人信息成功!');\n } else {\n toastr.error(data.data, '更新个人信息失败!');\n }\n });\n } else {\n modal.hideDimmer();\n }\n }\n}\n","export default [{\r\n label: '待处理',\r\n value: '待处理',\r\n color: 'green',\r\n type: 'tag'\r\n}, {\r\n label: '进行中',\r\n value: '进行中',\r\n color: 'yellow',\r\n type: 'tag'\r\n}, {\r\n label: '已完成',\r\n value: '已完成',\r\n color: 'blue',\r\n type: 'tag'\r\n}, {\r\n label: '已验收',\r\n value: '已验收',\r\n color: 'grey',\r\n type: 'tag'\r\n}];\r\n","html,\r\nbody {\r\n height: 100%;\r\n overflow: hidden;\r\n}\r\n\r\n::-webkit-scrollbar {\r\n width: 6px;\r\n height: 6px;\r\n}\r\n\r\n::-webkit-scrollbar-thumb {\r\n border-radius: 6px;\r\n background-color: #c6c6c6;\r\n}\r\n\r\n::-webkit-scrollbar-thumb:hover {\r\n background: #999;\r\n}\r\n\r\n@media only screen and (min-width: 768px) {\r\n .ui.modal {\r\n &.tms-md450 {\r\n width: 450px!important;\r\n margin-left: -225px!important;\r\n }\r\n &.tms-md510 {\r\n width: 510px!important;\r\n margin-left: -255px!important;\r\n }\r\n &.tms-md540 {\r\n width: 540px!important;\r\n margin-left: -275px!important;\r\n }\r\n }\r\n}\r\n\r\n\r\n/* for swipebox */\r\n\r\n#swipebox-overlay {\r\n background: rgba(13, 13, 13, 0.5)!important;\r\n}\r\n\r\n.keyboard {\r\n background: #fff;\r\n font-weight: 700;\r\n padding: 2px .35rem;\r\n font-size: .8rem;\r\n margin: 0 2px;\r\n border-radius: .25rem;\r\n color: #3d3c40;\r\n border-bottom: 2px solid #9e9ea6;\r\n box-shadow: 0 1px 2px rgba(0, 0, 0, .5);\r\n text-shadow: none;\r\n}\r\n\r\n#nprogress .spinner {\r\n display: none!important;\r\n}\r\n\r\n.tms-dropzone-preview-hidden {\r\n .dz-preview {\r\n display: none!important;\r\n }\r\n}\r\n","code.nx {\r\n background-color: #F8F8F8;\r\n border: 1px solid #EAEAEA;\r\n border-radius: 3px 3px 3px 3px;\r\n margin: 0 2px;\r\n padding: 0 5px;\r\n white-space: nowrap;\r\n}\r\n\r\n.markdown-body {\r\n .pre-code-wrapper {\r\n position: relative;\r\n > i.copy.icon {\r\n display: none;\r\n position: absolute;\r\n top: 0;\r\n right: 0;\r\n cursor: pointer;\r\n }\r\n &:hover {\r\n > i.copy.icon {\r\n display: block;\r\n }\r\n }\r\n }\r\n}\r\n\r\n.tms-disabled {\r\n cursor: default;\r\n opacity: .45!important;\r\n background-image: none!important;\r\n box-shadow: none!important;\r\n pointer-events: none!important;\r\n}\r\n\r\n.tms-hidden {\r\n display: none!important;\r\n}\r\n\r\n.animated {\r\n -webkit-animation-duration: 1s;\r\n animation-duration: 1s;\r\n -webkit-animation-fill-mode: both;\r\n animation-fill-mode: both;\r\n}\r\n\r\n@keyframes flip {\r\n from {\r\n -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -360deg);\r\n transform: perspective(400px) rotate3d(0, 1, 0, -360deg);\r\n -webkit-animation-timing-function: ease-out;\r\n animation-timing-function: ease-out;\r\n }\r\n 40% {\r\n -webkit-transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -190deg);\r\n transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -190deg);\r\n -webkit-animation-timing-function: ease-out;\r\n animation-timing-function: ease-out;\r\n }\r\n 50% {\r\n -webkit-transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -170deg);\r\n transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -170deg);\r\n -webkit-animation-timing-function: ease-in;\r\n animation-timing-function: ease-in;\r\n }\r\n 80% {\r\n -webkit-transform: perspective(400px) scale3d(.95, .95, .95);\r\n transform: perspective(400px) scale3d(.95, .95, .95);\r\n -webkit-animation-timing-function: ease-in;\r\n animation-timing-function: ease-in;\r\n }\r\n to {\r\n -webkit-transform: perspective(400px);\r\n transform: perspective(400px);\r\n -webkit-animation-timing-function: ease-in;\r\n animation-timing-function: ease-in;\r\n }\r\n}\r\n\r\n.animated.flip {\r\n -webkit-backface-visibility: visible;\r\n backface-visibility: visible;\r\n -webkit-animation-name: flip;\r\n animation-name: flip;\r\n}\r\n\r\n.cbutton {\r\n position: relative;\r\n}\r\n\r\n.cbutton::after {\r\n position: absolute;\r\n top: 50%;\r\n left: 50%;\r\n margin: -7px 0 0 -7px;\r\n width: 14px;\r\n height: 14px;\r\n border-radius: 50%;\r\n content: '';\r\n opacity: 0;\r\n pointer-events: none;\r\n}\r\n\r\n\r\n/* Novak */\r\n\r\n.cbutton--effect-novak::after {\r\n background: rgba(111, 148, 182, 0.25);\r\n}\r\n\r\n.cbutton--effect-novak.cbutton--click::after {\r\n -webkit-animation: anim-effect-novak 0.5s forwards;\r\n animation: anim-effect-novak 0.5s forwards;\r\n}\r\n\r\n@-webkit-keyframes anim-effect-novak {\r\n 0% {\r\n opacity: 1;\r\n -webkit-transform: scale3d(0.1, 0.1, 1);\r\n transform: scale3d(0.1, 0.1, 1);\r\n }\r\n 100% {\r\n opacity: 0;\r\n -webkit-transform: scale3d(8, 8, 1);\r\n transform: scale3d(30, 30, 1);\r\n }\r\n}\r\n\r\n@keyframes anim-effect-novak {\r\n 0% {\r\n opacity: 1;\r\n -webkit-transform: scale3d(0.1, 0.1, 1);\r\n transform: scale3d(0.1, 0.1, 1);\r\n }\r\n 100% {\r\n opacity: 0;\r\n -webkit-transform: scale3d(8, 8, 1);\r\n transform: scale3d(30, 30, 1);\r\n }\r\n}\r\n\r\n.emoji {\r\n width: 1.5em;\r\n height: 1.5em;\r\n display: inline-block;\r\n margin-bottom: -.25em;\r\n background-size: contain;\r\n}\r\n",".ui.dimmer {\r\n background-color: rgba(0, 0, 0, 0.5)!important;\r\n &.page.modals {\r\n z-index: 10000;\r\n }\r\n}\r\n\r\n.ui.modal {\r\n > .actions {\r\n > .ui.left.floated.button {\r\n margin-left: 3.5px;\r\n }\r\n }\r\n}\r\n\r\n.ui.list .list .item {\r\n display: list-item!important;\r\n table-layout: fixed;\r\n height: auto!important;\r\n visibility: visible!important;\r\n}\r\n\r\n.ui.list .list .item:after {\r\n content: '';\r\n display: block;\r\n height: 0;\r\n clear: both;\r\n visibility: hidden;\r\n}\r\n\r\n#swipebox-bottom-bar,\r\n#swipebox-top-bar {\r\n background: rgba(0, 0, 0, 0.3)!important;\r\n}\r\n","",".tms-chat-direct {\r\n height: 100%;\r\n .ui.comments {\r\n min-height: e(\"calc(100% - 170px)\");\r\n > .comment {\r\n > .content {\r\n display: block!important;\r\n }\r\n }\r\n }\r\n .tms-edit-textarea {\r\n width: 100%;\r\n }\r\n .ui.selection.list>.item {\r\n cursor: default;\r\n }\r\n .ui.search .prompt {\r\n border-radius: .28571429rem;\r\n }\r\n .tms-content {\r\n position: relative;\r\n margin-left: 220px;\r\n top: 60px;\r\n height: e(\"calc(100% - 60px)\");\r\n // display: -webkit-box;\r\n // display: -ms-flexbox;\r\n // display: flex;\r\n // -webkit-box-align: stretch;\r\n // -ms-flex-align: stretch;\r\n // align-items: stretch;\r\n &.tms-sidebar-show {\r\n .tms-right-sidebar {\r\n width: 388px;\r\n border-left: 1px #e9e9e9 solid;\r\n -webkit-transition: width .15s ease-out 0s;\r\n transition: width .15s ease-out 0s;\r\n margin: 4px;\r\n margin-right: 0;\r\n }\r\n }\r\n @media only screen and (max-width: 767px) {\r\n margin-left: 0;\r\n }\r\n .tms-content-body {\r\n .tms-comments-container {\r\n width: 100%;\r\n height: 100%;\r\n overflow: auto;\r\n }\r\n width: 100%;\r\n height: 100%;\r\n max-width: 100%;\r\n // -webkit-box-flex: 1;\r\n // -ms-flex: 1 1 0px;\r\n // flex: 1 1 0;\r\n // display: -webkit-box;\r\n // display: -ms-flexbox;\r\n // display: flex;\r\n // -webkit-box-align: stretch;\r\n // -ms-flex-align: stretch;\r\n // align-items: stretch;\r\n padding-bottom: 73px;\r\n .ui.comments {\r\n overflow: hidden;\r\n // -webkit-box-flex: 1;\r\n // -ms-flex: 1 1 0px;\r\n // flex: 1 1 0;\r\n max-width: none;\r\n margin-bottom: 12px;\r\n margin-top: 10px;\r\n > .ui.basic.button {\r\n display: block;\r\n margin-right: 0;\r\n }\r\n .tms-pre-more {\r\n margin-bottom: 10px;\r\n }\r\n .tms-next-more {\r\n margin-top: 10px;\r\n position: relative;\r\n .ui.icon.button {\r\n position: absolute;\r\n top: 2px;\r\n right: -1px;\r\n }\r\n }\r\n }\r\n .tms-go {\r\n position: fixed;\r\n left: 240px;\r\n .ui.button {\r\n margin: 0;\r\n background-color: rgba(224, 225, 226, 0.5);\r\n &:hover {\r\n background-color: #CACBCD;\r\n }\r\n }\r\n @media only screen and (max-width: 767px) {\r\n left: 20px;\r\n }\r\n }\r\n .tms-go-head {\r\n top: 80px;\r\n }\r\n .tms-go-foot {\r\n bottom: 90px;\r\n }\r\n }\r\n }\r\n .tms-right-sidebar {\r\n position: absolute;\r\n top: 0;\r\n right: 0;\r\n width: 0;\r\n // height: 100%;\r\n bottom: 0;\r\n overflow: hidden;\r\n padding-top: 10px;\r\n padding-bottom: 10px;\r\n .comments {\r\n .ui.button.tms-search-more {\r\n display: block;\r\n margin: 0;\r\n }\r\n .comment {\r\n .markdown-body {\r\n max-height: 65px;\r\n overflow-y: hidden;\r\n &.tms-open {\r\n max-height: none;\r\n overflow-y: auto;\r\n padding-bottom: 20px;\r\n }\r\n }\r\n .tms-btn-open-search-item {\r\n display: none;\r\n height: 25px;\r\n // background-color: rgba(0, 0, 0, 0.1);\r\n position: absolute;\r\n bottom: 0;\r\n right: 0;\r\n left: 0;\r\n text-align: center;\r\n padding-top: 2px;\r\n background-image: -webkit-linear-gradient(top, rgba(255, 255, 255, 0) 0, #bbbbbb 100%);\r\n background-image: -moz-linear-gradient(top, rgba(255, 255, 255, 0) 0, #bbbbbb 100%);\r\n background-image: -o-linear-gradient(top, rgba(255, 255, 255, 0) 0, #bbbbbb 100%);\r\n background-image: linear-gradient(top, rgba(255, 255, 255, 0) 0, #bbbbbb 100%);\r\n }\r\n &:hover {\r\n .tms-btn-open-search-item {\r\n display: block;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n @media only screen and (max-width: 767px) {\r\n .tms-left-sidebar {\r\n display: none;\r\n }\r\n .tms-right-sidebar {\r\n position: fixed;\r\n left: 0;\r\n right: 0;\r\n bottom: 0;\r\n top: 59px;\r\n background-color: white;\r\n margin-left: 0!important;\r\n .panel-chat-msg {\r\n .ui.basic.segment.minimal.selection.list.segment.comments {\r\n padding-left: 0;\r\n padding-right: 0;\r\n }\r\n }\r\n }\r\n .tms-sidebar-show {\r\n .tms-right-sidebar {\r\n width: 100%!important;\r\n }\r\n }\r\n }\r\n .tms-edit-actions {\r\n .left.button {\r\n border-top-left-radius: 0;\r\n }\r\n .right.button {\r\n border-top-right-radius: 0;\r\n }\r\n }\r\n}\r\n\r\n.tms-chat-progress {\r\n position: absolute;\r\n display: inline-block;\r\n top: 60px;\r\n left: 0;\r\n width: 0;\r\n height: 2px;\r\n margin-left: 220px;\r\n background-color: #c6c6c6;\r\n box-shadow: 0px 0px 8px 0px #c6c6c6;\r\n @media only screen and (max-width: 767px) {\r\n margin-left: 0;\r\n }\r\n}\r\n",".markdown-body {\r\n font-size: 14px;\r\n line-height: 1.6;\r\n}\r\n\r\n.markdown-body > br,\r\n.markdown-body ul br .markdown-body ol br {\r\n display: none;\r\n}\r\n\r\n.markdown-body > *:first-child {\r\n margin-top: 0 !important;\r\n}\r\n\r\n.markdown-body > *:last-child {\r\n margin-bottom: 0 !important;\r\n}\r\n\r\n.markdown-body a {\r\n word-break: break-all;\r\n}\r\n\r\n.markdown-body a.absent {\r\n color: #CC0000;\r\n}\r\n\r\n.markdown-body a.anchor {\r\n bottom: 0;\r\n cursor: pointer;\r\n display: block;\r\n left: 0;\r\n margin-left: -30px;\r\n padding-left: 30px;\r\n position: absolute;\r\n top: 0;\r\n}\r\n\r\n.markdown-body h1,\r\n.markdown-body h2,\r\n.markdown-body h3,\r\n.markdown-body h4,\r\n.markdown-body h5,\r\n.markdown-body h6 {\r\n cursor: text;\r\n font-weight: bold;\r\n margin: 20px 0 10px;\r\n padding: 0;\r\n position: relative;\r\n word-break: break-all;\r\n}\r\n\r\n.markdown-body h1 .mini-icon-link,\r\n.markdown-body h2 .mini-icon-link,\r\n.markdown-body h3 .mini-icon-link,\r\n.markdown-body h4 .mini-icon-link,\r\n.markdown-body h5 .mini-icon-link,\r\n.markdown-body h6 .mini-icon-link {\r\n color: #000000;\r\n display: none;\r\n}\r\n\r\n.markdown-body h1:hover a.anchor,\r\n.markdown-body h2:hover a.anchor,\r\n.markdown-body h3:hover a.anchor,\r\n.markdown-body h4:hover a.anchor,\r\n.markdown-body h5:hover a.anchor,\r\n.markdown-body h6:hover a.anchor {\r\n line-height: 1;\r\n margin-left: -22px;\r\n padding-left: 0;\r\n text-decoration: none;\r\n top: 15%;\r\n}\r\n\r\n.markdown-body h1:hover a.anchor .mini-icon-link,\r\n.markdown-body h2:hover a.anchor .mini-icon-link,\r\n.markdown-body h3:hover a.anchor .mini-icon-link,\r\n.markdown-body h4:hover a.anchor .mini-icon-link,\r\n.markdown-body h5:hover a.anchor .mini-icon-link,\r\n.markdown-body h6:hover a.anchor .mini-icon-link {\r\n display: inline-block;\r\n}\r\n\r\n.markdown-body h1 tt,\r\n.markdown-body h1 code,\r\n.markdown-body h2 tt,\r\n.markdown-body h2 code,\r\n.markdown-body h3 tt,\r\n.markdown-body h3 code,\r\n.markdown-body h4 tt,\r\n.markdown-body h4 code,\r\n.markdown-body h5 tt,\r\n.markdown-body h5 code,\r\n.markdown-body h6 tt,\r\n.markdown-body h6 code {\r\n font-size: inherit;\r\n}\r\n\r\n.markdown-body h1 {\r\n color: #000000;\r\n font-size: 28px;\r\n}\r\n\r\n.markdown-body h2 {\r\n border-bottom: 1px solid #CCCCCC;\r\n color: #000000;\r\n font-size: 24px;\r\n}\r\n\r\n.markdown-body h3 {\r\n font-size: 18px;\r\n}\r\n\r\n.markdown-body h4 {\r\n font-size: 16px;\r\n}\r\n\r\n.markdown-body h5 {\r\n font-size: 14px;\r\n}\r\n\r\n.markdown-body h6 {\r\n color: #777777;\r\n font-size: 14px;\r\n}\r\n\r\n.markdown-body p,\r\n.markdown-body blockquote,\r\n.markdown-body ul,\r\n.markdown-body ol,\r\n.markdown-body dl,\r\n.markdown-body table,\r\n.markdown-body pre {\r\n margin: 15px 0;\r\n}\r\n\r\n.markdown-body hr {\r\n overflow: hidden;\r\n background: 0 0\r\n}\r\n\r\n.markdown-body hr:before {\r\n display: table;\r\n content: \"\"\r\n}\r\n\r\n.markdown-body hr:after {\r\n display: table;\r\n clear: both;\r\n content: \"\"\r\n}\r\n\r\n.markdown-body hr {\r\n height: 4px;\r\n padding: 0;\r\n margin: 16px 0;\r\n background-color: #e7e7e7;\r\n border: 0\r\n}\r\n\r\n.markdown-body hr {\r\n -moz-box-sizing: content-box;\r\n box-sizing: content-box\r\n}\r\n\r\n.markdown-body > h2:first-child,\r\n.markdown-body > h1:first-child,\r\n.markdown-body > h1:first-child + h2,\r\n.markdown-body > h3:first-child,\r\n.markdown-body > h4:first-child,\r\n.markdown-body > h5:first-child,\r\n.markdown-body > h6:first-child {\r\n margin-top: 0;\r\n padding-top: 0;\r\n}\r\n\r\n.markdown-body a:first-child h1,\r\n.markdown-body a:first-child h2,\r\n.markdown-body a:first-child h3,\r\n.markdown-body a:first-child h4,\r\n.markdown-body a:first-child h5,\r\n.markdown-body a:first-child h6 {\r\n margin-top: 0;\r\n padding-top: 0;\r\n}\r\n\r\n.markdown-body h1 + p,\r\n.markdown-body h2 + p,\r\n.markdown-body h3 + p,\r\n.markdown-body h4 + p,\r\n.markdown-body h5 + p,\r\n.markdown-body h6 + p {\r\n margin-top: 0;\r\n}\r\n\r\n.markdown-body li p.first {\r\n display: inline-block;\r\n}\r\n\r\n.markdown-body ul,\r\n.markdown-body ol {\r\n padding-left: 30px;\r\n}\r\n\r\n.markdown-body ul.no-list,\r\n.markdown-body ol.no-list {\r\n list-style-type: none;\r\n padding: 0;\r\n}\r\n\r\n.markdown-body ul li > *:first-child,\r\n.markdown-body ol li > *:first-child {\r\n margin-top: 0;\r\n}\r\n\r\n.markdown-body ul ul,\r\n.markdown-body ul ol,\r\n.markdown-body ol ol,\r\n.markdown-body ol ul {\r\n margin-bottom: 0;\r\n}\r\n\r\n.markdown-body dl {\r\n padding: 0;\r\n}\r\n\r\n.markdown-body dl dt {\r\n font-size: 14px;\r\n font-style: italic;\r\n font-weight: bold;\r\n margin: 15px 0 5px;\r\n padding: 0;\r\n}\r\n\r\n.markdown-body dl dt:first-child {\r\n padding: 0;\r\n}\r\n\r\n.markdown-body dl dt > *:first-child {\r\n margin-top: 0;\r\n}\r\n\r\n.markdown-body dl dt > *:last-child {\r\n margin-bottom: 0;\r\n}\r\n\r\n.markdown-body dl dd {\r\n margin: 0 0 15px;\r\n padding: 0 15px;\r\n}\r\n\r\n.markdown-body dl dd > *:first-child {\r\n margin-top: 0;\r\n}\r\n\r\n.markdown-body dl dd > *:last-child {\r\n margin-bottom: 0;\r\n}\r\n\r\n.markdown-body blockquote {\r\n border-left: 4px solid #DDDDDD;\r\n color: #777777;\r\n padding: 0 15px;\r\n}\r\n\r\n.markdown-body blockquote > *:first-child {\r\n margin-top: 0;\r\n}\r\n\r\n.markdown-body blockquote > *:last-child {\r\n margin-bottom: 0;\r\n}\r\n\r\n.markdown-body table th {\r\n font-weight: bold;\r\n}\r\n\r\n.markdown-body table th,\r\n.markdown-body table td {\r\n border: 1px solid #CCCCCC;\r\n padding: 6px 13px;\r\n}\r\n\r\n.markdown-body table tr {\r\n background-color: #FFFFFF;\r\n border-top: 1px solid #CCCCCC;\r\n}\r\n\r\n.markdown-body table tr:nth-child(2n) {\r\n background-color: #F8F8F8;\r\n}\r\n\r\n.markdown-body img {\r\n max-width: 100%;\r\n}\r\n\r\n.markdown-body span.frame {\r\n display: block;\r\n overflow: hidden;\r\n}\r\n\r\n.markdown-body span.frame > span {\r\n border: 1px solid #DDDDDD;\r\n display: block;\r\n float: left;\r\n margin: 13px 0 0;\r\n overflow: hidden;\r\n padding: 7px;\r\n width: auto;\r\n}\r\n\r\n.markdown-body span.frame span img {\r\n display: block;\r\n float: left;\r\n}\r\n\r\n.markdown-body span.frame span span {\r\n clear: both;\r\n color: #333333;\r\n display: block;\r\n padding: 5px 0 0;\r\n}\r\n\r\n.markdown-body span.align-center {\r\n clear: both;\r\n display: block;\r\n overflow: hidden;\r\n}\r\n\r\n.markdown-body span.align-center > span {\r\n display: block;\r\n margin: 13px auto 0;\r\n overflow: hidden;\r\n text-align: center;\r\n}\r\n\r\n.markdown-body span.align-center span img {\r\n margin: 0 auto;\r\n text-align: center;\r\n}\r\n\r\n.markdown-body span.align-right {\r\n clear: both;\r\n display: block;\r\n overflow: hidden;\r\n}\r\n\r\n.markdown-body span.align-right > span {\r\n display: block;\r\n margin: 13px 0 0;\r\n overflow: hidden;\r\n text-align: right;\r\n}\r\n\r\n.markdown-body span.align-right span img {\r\n margin: 0;\r\n text-align: right;\r\n}\r\n\r\n.markdown-body span.float-left {\r\n display: block;\r\n float: left;\r\n margin-right: 13px;\r\n overflow: hidden;\r\n}\r\n\r\n.markdown-body span.float-left span {\r\n margin: 13px 0 0;\r\n}\r\n\r\n.markdown-body span.float-right {\r\n display: block;\r\n float: right;\r\n margin-left: 13px;\r\n overflow: hidden;\r\n}\r\n\r\n.markdown-body span.float-right > span {\r\n display: block;\r\n margin: 13px auto 0;\r\n overflow: hidden;\r\n text-align: right;\r\n}\r\n\r\n.markdown-body code,\r\n.markdown-body tt {\r\n background-color: #F8F8F8;\r\n border: 1px solid #EAEAEA;\r\n border-radius: 3px 3px 3px 3px;\r\n margin: 0 2px;\r\n padding: 0 5px;\r\n /* white-space: nowrap; */\r\n white-space: normal;\r\n word-break: break-all;\r\n}\r\n\r\n.markdown-body pre > code {\r\n background: none repeat scroll 0 0 transparent;\r\n border: medium none;\r\n margin: 0;\r\n padding: 0;\r\n white-space: pre;\r\n}\r\n\r\n.markdown-body .highlight pre,\r\n.markdown-body pre {\r\n background-color: #F8F8F8;\r\n border: 1px solid #CCCCCC;\r\n border-radius: 3px 3px 3px 3px;\r\n font-size: 13px;\r\n line-height: 19px;\r\n overflow: auto;\r\n padding: 6px 10px;\r\n}\r\n\r\n.markdown-body pre code,\r\n.markdown-body pre tt {\r\n background-color: transparent;\r\n border: medium none;\r\n}\r\n","/*************** SCROLLBAR BASE CSS ***************/\r\n\r\n.scroll-wrapper {\r\n overflow: hidden !important;\r\n padding: 0 !important;\r\n position: relative;\r\n width: 100%;\r\n height: 100%;\r\n}\r\n\r\n.scroll-wrapper > .scroll-content {\r\n border: none !important;\r\n box-sizing: content-box !important;\r\n height: auto;\r\n left: 0;\r\n margin: 0;\r\n max-height: none;\r\n max-width: none !important;\r\n overflow: scroll !important;\r\n padding: 0;\r\n position: relative !important;\r\n top: 0;\r\n width: auto !important;\r\n}\r\n\r\n.scroll-wrapper > .scroll-content::-webkit-scrollbar {\r\n height: 0;\r\n width: 0;\r\n}\r\n\r\n.scroll-element {\r\n display: none;\r\n}\r\n\r\n.scroll-element,\r\n.scroll-element div {\r\n box-sizing: content-box;\r\n}\r\n\r\n.scroll-element.scroll-x.scroll-scrollx_visible,\r\n.scroll-element.scroll-y.scroll-scrolly_visible {\r\n display: block;\r\n}\r\n\r\n.scroll-element .scroll-bar,\r\n.scroll-element .scroll-arrow {\r\n cursor: default;\r\n}\r\n\r\n.scroll-textarea {\r\n border: 1px solid #cccccc;\r\n border-top-color: #999999;\r\n}\r\n\r\n.scroll-textarea > .scroll-content {\r\n overflow: hidden !important;\r\n}\r\n\r\n.scroll-textarea > .scroll-content > textarea {\r\n border: none !important;\r\n box-sizing: border-box;\r\n height: 100% !important;\r\n margin: 0;\r\n max-height: none !important;\r\n max-width: none !important;\r\n overflow: scroll !important;\r\n outline: none;\r\n padding: 2px;\r\n position: relative !important;\r\n top: 0;\r\n width: 100% !important;\r\n}\r\n\r\n.scroll-textarea > .scroll-content > textarea::-webkit-scrollbar {\r\n height: 0;\r\n width: 0;\r\n}\r\n\r\n\r\n/*************** SIMPLE OUTER SCROLLBAR ***************/\r\n\r\n.scrollbar-outer > .scroll-element,\r\n.scrollbar-outer > .scroll-element div {\r\n border: none;\r\n margin: 0;\r\n padding: 0;\r\n position: absolute;\r\n z-index: 10;\r\n}\r\n\r\n.scrollbar-outer > .scroll-element {\r\n background-color: #ffffff;\r\n}\r\n\r\n.scrollbar-outer > .scroll-element div {\r\n display: block;\r\n height: 100%;\r\n left: 0;\r\n top: 0;\r\n width: 100%;\r\n}\r\n\r\n.scrollbar-outer > .scroll-element.scroll-x {\r\n bottom: 0;\r\n height: 12px;\r\n left: 0;\r\n width: 100%;\r\n}\r\n\r\n.scrollbar-outer > .scroll-element.scroll-y {\r\n height: 100%;\r\n right: 0;\r\n top: 0;\r\n width: 12px;\r\n}\r\n\r\n.scrollbar-outer > .scroll-element.scroll-x .scroll-element_outer {\r\n height: 8px;\r\n top: 2px;\r\n}\r\n\r\n.scrollbar-outer > .scroll-element.scroll-y .scroll-element_outer {\r\n left: 2px;\r\n width: 8px;\r\n}\r\n\r\n.scrollbar-outer > .scroll-element .scroll-element_outer {\r\n overflow: hidden;\r\n}\r\n\r\n.scrollbar-outer > .scroll-element .scroll-element_track {\r\n background-color: #eeeeee;\r\n}\r\n\r\n.scrollbar-outer > .scroll-element .scroll-element_outer,\r\n.scrollbar-outer > .scroll-element .scroll-element_track,\r\n.scrollbar-outer > .scroll-element .scroll-bar {\r\n -webkit-border-radius: 8px;\r\n -moz-border-radius: 8px;\r\n border-radius: 8px;\r\n}\r\n\r\n.scrollbar-outer > .scroll-element .scroll-bar {\r\n background-color: #d9d9d9;\r\n}\r\n\r\n.scrollbar-outer > .scroll-element .scroll-bar:hover {\r\n background-color: #c2c2c2;\r\n}\r\n\r\n.scrollbar-outer > .scroll-element.scroll-draggable .scroll-bar {\r\n background-color: #919191;\r\n}\r\n\r\n\r\n/* scrollbar height/width & offset from container borders */\r\n\r\n.scrollbar-outer > .scroll-content.scroll-scrolly_visible {\r\n left: -12px;\r\n margin-left: 12px;\r\n}\r\n\r\n.scrollbar-outer > .scroll-content.scroll-scrollx_visible {\r\n top: -12px;\r\n margin-top: 12px;\r\n}\r\n\r\n.scrollbar-outer > .scroll-element.scroll-x .scroll-bar {\r\n min-width: 10px;\r\n}\r\n\r\n.scrollbar-outer > .scroll-element.scroll-y .scroll-bar {\r\n min-height: 10px;\r\n}\r\n\r\n\r\n/* update scrollbar offset if both scrolls are visible */\r\n\r\n.scrollbar-outer > .scroll-element.scroll-x.scroll-scrolly_visible .scroll-element_track {\r\n left: -14px;\r\n}\r\n\r\n.scrollbar-outer > .scroll-element.scroll-y.scroll-scrollx_visible .scroll-element_track {\r\n top: -14px;\r\n}\r\n\r\n.scrollbar-outer > .scroll-element.scroll-x.scroll-scrolly_visible .scroll-element_size {\r\n left: -14px;\r\n}\r\n\r\n.scrollbar-outer > .scroll-element.scroll-y.scroll-scrollx_visible .scroll-element_size {\r\n top: -14px;\r\n}\r\n\r\n\r\n/*************** SCROLLBAR MAC OS X ***************/\r\n\r\n.scrollbar-macosx > .scroll-element,\r\n.scrollbar-macosx > .scroll-element div {\r\n background: none;\r\n border: none;\r\n margin: 0;\r\n padding: 0;\r\n position: absolute;\r\n z-index: 10;\r\n}\r\n\r\n.scrollbar-macosx > .scroll-element div {\r\n display: block;\r\n height: 100%;\r\n left: 0;\r\n top: 0;\r\n width: 100%;\r\n}\r\n\r\n.scrollbar-macosx > .scroll-element .scroll-element_track {\r\n display: none;\r\n}\r\n\r\n.scrollbar-macosx > .scroll-element .scroll-bar {\r\n background-color: #6C6E71;\r\n display: block;\r\n -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\r\n filter: alpha(opacity=0);\r\n opacity: 0;\r\n -webkit-border-radius: 7px;\r\n -moz-border-radius: 7px;\r\n border-radius: 7px;\r\n -webkit-transition: opacity 0.2s linear;\r\n -moz-transition: opacity 0.2s linear;\r\n -o-transition: opacity 0.2s linear;\r\n -ms-transition: opacity 0.2s linear;\r\n transition: opacity 0.2s linear;\r\n}\r\n\r\n.scrollbar-macosx:hover > .scroll-element .scroll-bar,\r\n.scrollbar-macosx > .scroll-element.scroll-draggable .scroll-bar {\r\n -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=70)\";\r\n filter: alpha(opacity=70);\r\n opacity: 0.7;\r\n}\r\n\r\n.scrollbar-macosx > .scroll-element.scroll-x {\r\n bottom: 0px;\r\n height: 0px;\r\n left: 0;\r\n min-width: 100%;\r\n overflow: visible;\r\n width: 100%;\r\n}\r\n\r\n.scrollbar-macosx > .scroll-element.scroll-y {\r\n height: 100%;\r\n min-height: 100%;\r\n right: 0px;\r\n top: 0;\r\n width: 0px;\r\n}\r\n\r\n\r\n/* scrollbar height/width & offset from container borders */\r\n\r\n.scrollbar-macosx > .scroll-element.scroll-x .scroll-bar {\r\n height: 7px;\r\n min-width: 10px;\r\n top: -9px;\r\n}\r\n\r\n.scrollbar-macosx > .scroll-element.scroll-y .scroll-bar {\r\n left: -9px;\r\n min-height: 10px;\r\n width: 7px;\r\n}\r\n\r\n.scrollbar-macosx > .scroll-element.scroll-x .scroll-element_outer {\r\n left: 2px;\r\n}\r\n\r\n.scrollbar-macosx > .scroll-element.scroll-x .scroll-element_size {\r\n left: -4px;\r\n}\r\n\r\n.scrollbar-macosx > .scroll-element.scroll-y .scroll-element_outer {\r\n top: 2px;\r\n}\r\n\r\n.scrollbar-macosx > .scroll-element.scroll-y .scroll-element_size {\r\n top: -4px;\r\n}\r\n\r\n\r\n/* update scrollbar offset if both scrolls are visible */\r\n\r\n.scrollbar-macosx > .scroll-element.scroll-x.scroll-scrolly_visible .scroll-element_size {\r\n left: -11px;\r\n}\r\n\r\n.scrollbar-macosx > .scroll-element.scroll-y.scroll-scrollx_visible .scroll-element_size {\r\n top: -11px;\r\n}\r\n",".tms-user-login {\r\n width: 100%;\r\n min-height: 100%;\r\n background-color: #5a3636;\r\n overflow: hidden;\r\n .container {\r\n width: 300px;\r\n top: 50px;\r\n margin-left: auto;\r\n margin-right: auto;\r\n position: relative;\r\n }\r\n h2 {\r\n color: rgba(197, 164, 164, 0.8)!important;\r\n }\r\n .ui.form {\r\n background-color: #353131;\r\n }\r\n .ui.error.message {\r\n background-color: #5a3636;\r\n }\r\n .ui.error.message .header {\r\n color: #e0b4b4;\r\n }\r\n .ui.checkbox label {\r\n color: #ad8b8b;\r\n }\r\n .ui.checkbox input:focus~label {\r\n color: #ad8b8b;\r\n }\r\n .ui.checkbox label:hover {\r\n color: #ad8b8b;\r\n }\r\n .ui.button {\r\n background-color: #5a3636;\r\n color: #ad8b75;\r\n }\r\n}\r\n",".tms-user-pwd-reset {\r\n height: 100%;\r\n .tms-flex {\r\n height: 100%;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n }\r\n}\r\n",".tms-user-register {\r\n height: 100%;\r\n .tms-flex {\r\n height: 100%;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n }\r\n}",".em-blog-comment-popup {}",".em-blog-comment-share {\r\n &.ui.popup {\r\n max-width: 100%;\r\n width: 255px;\r\n .ui.input {\r\n width: 225px;\r\n }\r\n textarea {\r\n /* width: 195px!important; */\r\n }\r\n .ui.search>.results .result {\r\n cursor: pointer!important;\r\n display: block!important;\r\n color: rgba(0, 0, 0, .87)!important;\r\n border-bottom: 1px solid rgba(34, 36, 38, .1)!important;\r\n margin: 0!important;\r\n }\r\n .ui.list {\r\n > .item {\r\n color: rgba(0, 0, 0, .87);\r\n }\r\n }\r\n }\r\n &:after {\r\n content: '';\r\n clear: both;\r\n }\r\n .footer {\r\n margin-top: 16px;\r\n .btn-cancel {\r\n float: right;\r\n margin: 6px 0 0 8px!important;\r\n }\r\n }\r\n}\r\n",".em-blog-comment {\r\n margin-top: 32px;\r\n margin-bottom: 32px;\r\n .ui.comments {\r\n > .ui.dividing.header {\r\n margin-bottom: 0;\r\n }\r\n max-width: 100%;\r\n .comment {\r\n margin-top: 0;\r\n &:hover {\r\n background: rgba(0, 0, 0, .03);\r\n color: rgba(0, 0, 0, .8);\r\n .content {\r\n .tools {\r\n display: block;\r\n }\r\n }\r\n &:before {\r\n width: 4px;\r\n }\r\n }\r\n > .ui.divider {\r\n margin-bottom: 0;\r\n }\r\n .content {\r\n .markdown-body {\r\n img {\r\n @media only screen and (min-width: 768px) {\r\n max-width: 360px;\r\n max-height: 360px;\r\n }\r\n }\r\n }\r\n .actions {}\r\n .tms-blog-comment-edit-textarea {\r\n width: 100%;\r\n }\r\n .textcomplete-container {\r\n position: relative;\r\n .append-to {\r\n position: absolute;\r\n left: 0;\r\n bottom: 0;\r\n width: 100%;\r\n }\r\n }\r\n > .tools {\r\n position: absolute;\r\n right: 0;\r\n bottom: 0;\r\n display: none;\r\n > .ui.button {\r\n margin: 0;\r\n background-color: rgba(224, 225, 226, 0.5);\r\n &:hover {\r\n background-color: rgba(224, 225, 226, 1);\r\n }\r\n }\r\n }\r\n }\r\n &.active {\r\n background-color: #f5f5f5;\r\n &:before {\r\n width: 4px;\r\n }\r\n }\r\n &:before {\r\n content: \"\";\r\n position: absolute;\r\n z-index: -1;\r\n top: -2px;\r\n left: -4px;\r\n bottom: 1px;\r\n background: #2098D1;\r\n width: 0;\r\n -webkit-transition-property: width;\r\n transition-property: width;\r\n -webkit-transition-duration: 0.3s;\r\n transition-duration: 0.3s;\r\n -webkit-transition-timing-function: ease-out;\r\n transition-timing-function: ease-out;\r\n }\r\n &:nth-child(2) {\r\n &:before {\r\n top: -1px;\r\n }\r\n }\r\n }\r\n }\r\n .CodeMirror {\r\n min-height: 60px;\r\n }\r\n .CodeMirror-scroll {\r\n min-height: 60px;\r\n }\r\n .dropzone {\r\n position: relative;\r\n .tms-blog-comment-status-bar-wrapper {\r\n position: relative;\r\n width: 100%;\r\n height: 0;\r\n .tms-blog-comment-status-bar {\r\n position: absolute;\r\n bottom: 0;\r\n left: 0;\r\n width: 100%;\r\n }\r\n .dropzone-previews {\r\n position: absolute;\r\n left: 0;\r\n bottom: -7px;\r\n width: 100%;\r\n .dz-preview {\r\n width: 100%;\r\n margin: 0;\r\n .dz-progress {\r\n height: 2px;\r\n background-color: #aaa;\r\n border: none;\r\n }\r\n .dz-remove {\r\n display: none;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",".em-blog-content {\r\n transition: width 0.15s ease-out 0s;\r\n .right-sidebar-show & {\r\n width: e(\"calc(100% - 600px)\")!important;\r\n @media only screen and (max-width: 767px) {\r\n width: 100%!important;\r\n }\r\n }\r\n @media only screen and (max-width: 767px) {\r\n left: 0;\r\n width: 100%!important;\r\n }\r\n // z-index: 103;\r\n position: fixed;\r\n top: 55px;\r\n left: 300px;\r\n width: e(\"calc(100% - 300px)\")!important;\r\n height: e(\"calc(100% - 55px)\")!important;\r\n padding: 16px;\r\n overflow: auto;\r\n > .header {\r\n .ui.header {\r\n .sub.header {\r\n color: #707070;\r\n font-size: 12px;\r\n margin-top: 8px;\r\n a.author {\r\n cursor: pointer;\r\n }\r\n .readCnt {\r\n cursor: pointer;\r\n margin-left: 16px;\r\n a {\r\n cursor: pointer;\r\n }\r\n }\r\n .commentCnt {\r\n cursor: pointer;\r\n margin-left: 16px;\r\n a {\r\n cursor: pointer;\r\n }\r\n }\r\n }\r\n }\r\n margin-bottom: 24px;\r\n }\r\n .topbar {\r\n position: relative;\r\n height: 30px;\r\n margin-bottom: 8px;\r\n > .ui.breadcrumb {\r\n line-height: 30px;\r\n }\r\n &:after {\r\n content: '';\r\n clear: both;\r\n }\r\n .actions {\r\n float: right;\r\n > .ui.basic.button {\r\n padding: 8px;\r\n box-shadow: none;\r\n &:hover {\r\n box-shadow: 0 0 0 1px rgba(34, 36, 38, .35) inset, 0 0 0 0 rgba(34, 36, 38, .15) inset;\r\n }\r\n > i.icon {\r\n margin-right: 2px;\r\n &.hide {\r\n position: relative;\r\n top: -1px;\r\n }\r\n &.unhide {\r\n position: relative;\r\n top: -1px;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n > .ui.message {\r\n .content {\r\n > span {\r\n display: inline-block;\r\n margin-top: 10px;\r\n }\r\n .ui.button {\r\n position: relative;\r\n top: -5px;\r\n left: 10px;\r\n }\r\n }\r\n }\r\n .footer {\r\n margin-top: 16px;\r\n > span {\r\n font-size: 12px;\r\n }\r\n .rate {\r\n margin-right: 16px;\r\n cursor: pointer;\r\n color: #4183c4;\r\n }\r\n > .tags {\r\n float: right;\r\n .ui.selection.dropdown {\r\n border: none;\r\n &:hover {\r\n box-shadow: 0 0px 1px 0px #2185d0;\r\n }\r\n }\r\n }\r\n &:after {\r\n content: '';\r\n clear: both;\r\n display: block;\r\n }\r\n }\r\n > .ui.feed {\r\n margin-bottom: 25px!important;\r\n > .event {\r\n position: relative;\r\n &.opened {\r\n > .content .extra.text {\r\n &:hover {\r\n max-height: none;\r\n overflow-y: auto;\r\n padding-bottom: 25px;\r\n }\r\n }\r\n }\r\n >.label+.content {\r\n max-width: e(\"calc(100% - 50px)\");\r\n }\r\n > .content .extra.text {\r\n position: relative;\r\n max-width: none;\r\n min-height: 25px;\r\n max-height: 60px;\r\n overflow-y: hidden;\r\n &:hover {\r\n > .btn-open {\r\n display: block;\r\n }\r\n }\r\n > .btn-open {\r\n display: none;\r\n height: 25px;\r\n background-color: rgba(0, 0, 0, 0.1);\r\n position: absolute;\r\n bottom: 0;\r\n right: 0;\r\n left: 0;\r\n text-align: center;\r\n padding-top: 2px;\r\n }\r\n pre {\r\n white-space: pre-wrap;\r\n white-space: -moz-pre-wrap;\r\n white-space: -pre-wrap;\r\n white-space: -o-pre-wrap;\r\n word-wrap: break-word;\r\n word-break: break-all;\r\n }\r\n }\r\n &.active {\r\n background: rgba(0, 0, 0, .03);\r\n &:before {\r\n width: 4px;\r\n }\r\n }\r\n &:hover {\r\n background: rgba(0, 0, 0, .03);\r\n &:before {\r\n width: 4px;\r\n }\r\n }\r\n &:before {\r\n content: \"\";\r\n position: absolute;\r\n top: 0;\r\n left: -4px;\r\n bottom: 0;\r\n background: #2098D1;\r\n width: 0;\r\n -webkit-transition-property: width;\r\n transition-property: width;\r\n -webkit-transition-duration: 0.3s;\r\n transition-duration: 0.3s;\r\n -webkit-transition-timing-function: ease-out;\r\n transition-timing-function: ease-out;\r\n }\r\n }\r\n }\r\n}\r\n\r\n.tms-blog-progress {\r\n position: absolute;\r\n display: inline-block;\r\n top: 55px;\r\n left: 0;\r\n width: 0;\r\n height: 2px;\r\n margin-left: 300px;\r\n background-color: #2185d0;\r\n box-shadow: 0px 0px 8px 0px #205081;\r\n @media only screen and (max-width: 767px) {\r\n margin-left: 0;\r\n }\r\n}\r\n\r\n.em-blog-content-wrapper {\r\n position: fixed;\r\n top: 55px;\r\n width: e(\"calc(100vw)\")!important;\r\n height: e(\"calc(100% - 55px)\")!important;\r\n}\r\n\r\n@media only screen and (max-width: 767px) {\r\n .tms-blog {\r\n &.left-sidebar-show {\r\n .em-blog-content-wrapper {\r\n > .ui.dimmer {\r\n display: block;\r\n opacity: 1;\r\n }\r\n }\r\n }\r\n &.right-sidebar-show {\r\n .em-blog-content-wrapper {\r\n > .ui.dimmer {\r\n display: block;\r\n opacity: 1;\r\n }\r\n }\r\n }\r\n .em-blog-content-wrapper {\r\n > .ui.dimmer {\r\n display: none;\r\n }\r\n }\r\n }\r\n}\r\n",".em-blog-history-diff {\r\n > .content {\r\n max-height: 300px;\r\n overflow-y: auto;\r\n }\r\n}\r\n",".em-blog-history-view {\r\n > .topbar {\r\n margin-bottom: 16px;\r\n }\r\n > .content {\r\n max-height: 300px;\r\n overflow-y: auto;\r\n }\r\n}\r\n",".em-blog-history {\r\n > .topbar {\r\n margin-bottom: 16px;\r\n }\r\n > .content {\r\n max-height: 300px;\r\n overflow-y: auto;\r\n }\r\n .ui.table {\r\n td a {\r\n cursor: pointer;\r\n }\r\n }\r\n}\r\n",".em-blog-left-sidebar {\r\n &.ui.left.sidebar {\r\n transition: left 0.15s ease-out 0s;\r\n @media only screen and (max-width: 767px) {\r\n z-index: 104;\r\n &.mobile-hide {\r\n // width: 0;\r\n left: -300px;\r\n }\r\n }\r\n width: 300px;\r\n top: 55px;\r\n left: 0;\r\n height: e(\"calc(100% - 55px)\")!important;\r\n background-color: #f5f5f5;\r\n box-shadow: none!important;\r\n overflow-x: hidden;\r\n .tms-body {\r\n .ui.space.list {\r\n padding: 16px;\r\n padding-left: 15px;\r\n margin-bottom: 0px;\r\n padding-bottom: 8px;\r\n > .item {\r\n position: relative;\r\n &:hover {\r\n box-shadow: 0px 0px 2px -1px #5791cb;\r\n > .actions {\r\n display: inline-block;\r\n }\r\n }\r\n > .icon {\r\n padding-right: 0;\r\n position: relative;\r\n top: -1px;\r\n }\r\n > .content {\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n max-width: 245px;\r\n }\r\n > .actions {\r\n display: none;\r\n position: absolute;\r\n right: 0;\r\n top: -2px;\r\n }\r\n }\r\n .ui.bulleted.list {\r\n padding-left: 16px;\r\n > div.item {\r\n max-width: 220px;\r\n padding-top: 5px;\r\n padding-bottom: 5px;\r\n > a {\r\n display: block;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n min-width: 220px;\r\n }\r\n &:before {\r\n color: #999;\r\n }\r\n &.active {\r\n font-weight: bold;\r\n > a {\r\n color: black;\r\n }\r\n }\r\n &:hover {\r\n // box-shadow: 0px 0px 2px -1px #5791cb;\r\n background-color: rgba(232, 224, 224, 0.5);\r\n }\r\n &.aurelia-hide {\r\n display: none!important;\r\n }\r\n }\r\n }\r\n }\r\n .ui.bulleted.list.no-space {\r\n padding: 20px;\r\n margin-top: 0px;\r\n padding-top: 0px;\r\n > div.item {\r\n padding-top: 5px;\r\n padding-bottom: 5px;\r\n > a {\r\n display: block;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n min-width: 242px;\r\n }\r\n &:before {\r\n color: #999;\r\n }\r\n &.active {\r\n font-weight: bold;\r\n > a {\r\n color: black;\r\n }\r\n }\r\n &:hover {\r\n // box-shadow: 0px 0px 2px -1px #5791cb;\r\n background-color: rgba(232, 224, 224, 0.5);\r\n }\r\n }\r\n }\r\n height: e(\"calc(100% - 40px)\")!important;\r\n }\r\n .tms-footer {\r\n position: absolute;\r\n width: 100%;\r\n height: 40px;\r\n left: 0;\r\n bottom: 0;\r\n background-color: #efe4e4;\r\n .ui.menu {\r\n border: none;\r\n border-radius: 0;\r\n background-color: #e8e0e0;\r\n > .item {\r\n &.tms-search {\r\n position: relative;\r\n height: 40px;\r\n max-width: 207px;\r\n &:before {\r\n width: 0;\r\n }\r\n > .remove.icon {\r\n position: absolute;\r\n right: 5px;\r\n top: 13px;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",".em-blog-right-sidebar {\r\n width: 300px;\r\n background-color: #f5f5f5;\r\n position: fixed;\r\n top: 55px;\r\n right: -300px;\r\n height: e(\"calc(100% - 55px)\");\r\n transition: right 0.15s ease-out 0s;\r\n .right-sidebar-show & {\r\n right: 0;\r\n }\r\n .panel-blog-dir {\r\n padding: 16px;\r\n .wiki-dir-item {\r\n &.active {\r\n background-color: #e8e0e0;\r\n }\r\n }\r\n }\r\n}\r\n",".em-blog-save {}",".em-blog-share {\r\n &.ui.popup {\r\n max-width: 100%;\r\n width: 255px;\r\n .ui.input {\r\n width: 225px;\r\n }\r\n }\r\n &:after {\r\n content: '';\r\n clear: both;\r\n }\r\n .footer {\r\n margin-top: 16px;\r\n .btn-cancel {\r\n float: right;\r\n margin-top: 6px;\r\n margin-left: 8px;\r\n }\r\n }\r\n}\r\n",".em-blog-space-auth {\r\n > .ui.form {\r\n margin-bottom: 16px;\r\n }\r\n .tms-header {\r\n margin-bottom: 8px;\r\n }\r\n .ui.search .prompt {\r\n border-radius: .28571429rem;\r\n }\r\n}\r\n",".em-blog-space-create {\r\n &.ui.popup {\r\n .ui.form {\r\n width: 260px;\r\n }\r\n }\r\n}\r\n",".em-blog-space-edit {}",".em-blog-space-update {}",".em-blog-top-menu {\r\n &.ui.inverted.blue.menu {\r\n background-color: #205081;\r\n height: 55px;\r\n z-index: 103;\r\n .item {\r\n &.tms-toggle {\r\n display: none;\r\n i.icon {\r\n margin-right: 0;\r\n }\r\n }\r\n &.tms-links {\r\n i.icon {\r\n margin-right: 0;\r\n }\r\n }\r\n }\r\n .right.menu {\r\n .item {\r\n .ui.icon.input {\r\n input {\r\n background-color: #103a65;\r\n color: white;\r\n &:focus {\r\n border-color: rgba(34, 36, 38, .15);\r\n box-shadow: none;\r\n }\r\n }\r\n i.icon.search:before {\r\n color: #a3aab0;\r\n }\r\n }\r\n .ui.search>.results {\r\n max-height: 350px;\r\n overflow-y: auto;\r\n left: -150px;\r\n }\r\n }\r\n }\r\n @media only screen and (max-width: 767px) {\r\n .item {\r\n &.tms-links {\r\n display: none;\r\n }\r\n &.tms-logo {\r\n display: none;\r\n }\r\n &.header {\r\n display: none;\r\n }\r\n &.tms-toggle {\r\n display: flex;\r\n }\r\n }\r\n .right.menu {\r\n .item {\r\n .ui.search {\r\n .ui.input {\r\n width: 100px;\r\n }\r\n }\r\n }\r\n }\r\n &.search-focus {\r\n .tms-logo {\r\n display: none;\r\n }\r\n .tms-create {\r\n display: none;\r\n }\r\n .right.menu {\r\n .item {\r\n .ui.search {\r\n .ui.input {\r\n width: initial;\r\n transition: width 0.15s ease-out 0s;\r\n }\r\n }\r\n }\r\n .tms-login-user {\r\n display: none;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n","@top: 15px;\r\n.modaal-wrapper .modaal-close {\r\n @media only screen and (max-width: 827px) {\r\n top: initial!important;\r\n bottom: 10px;\r\n z-index: 2;\r\n }\r\n}\r\n\r\n.em-blog-write {\r\n margin-top: -30px;\r\n margin-bottom: 20px;\r\n > .wrapper {\r\n max-width: 768px;\r\n margin: auto;\r\n > .title {\r\n position: fixed;\r\n z-index: 2;\r\n margin-bottom: 8px;\r\n width: e(\"calc(100% - 60px)\");\r\n @media only screen and (min-width: 828px) {\r\n width: 768px;\r\n }\r\n background-color: white;\r\n padding-top: @top + 3px;\r\n box-shadow: 0px 1px 0px 0px #dddddd;\r\n > .ui.input {\r\n padding-right: 80px;\r\n }\r\n > .ui.button {\r\n position: absolute;\r\n right: 0;\r\n top: @top;\r\n }\r\n }\r\n > .content {\r\n padding-top: @top + 45px;\r\n .editor-toolbar {\r\n &.fullscreen {\r\n z-index: 800;\r\n }\r\n }\r\n }\r\n }\r\n .dropzone {\r\n .dropzone-previews {\r\n position: absolute;\r\n top: @top + 33px;\r\n width: 100%;\r\n .dz-preview {\r\n width: 100%;\r\n margin: 0;\r\n .dz-progress {\r\n height: 2px;\r\n background-color: #aaa;\r\n border: none;\r\n }\r\n .dz-remove {\r\n display: none;\r\n }\r\n }\r\n }\r\n position: relative;\r\n }\r\n .tms-blog-write-status-bar-wrapper {\r\n position: fixed;\r\n z-index: 800;\r\n height: 0;\r\n top: 120px;\r\n width: e(\"calc(100% - 60px)\");\r\n @media only screen and (min-width: 828px) {\r\n width: 768px;\r\n }\r\n .tms-blog-write-status-bar {\r\n position: absolute;\r\n bottom: 0;\r\n left: 0;\r\n width: 100%;\r\n }\r\n }\r\n}\r\n",".em-chat-attach {\r\n &.ui.basic.segment {\r\n margin-bottom: 0;\r\n padding-top: 0;\r\n }\r\n .ui.basic.button {\r\n display: block;\r\n margin-right: 0;\r\n }\r\n .ui.list {\r\n .description {\r\n font-size: 12px;\r\n margin-top: 3px;\r\n }\r\n }\r\n &.ui.menu {\r\n \tmargin-top: 0;\r\n display: -webkit-box;\r\n display: -ms-flexbox;\r\n display: flex;\r\n > .item {\r\n -webkit-box-flex: 1;\r\n -ms-flex: 1;\r\n flex: 1;\r\n display: block!important;\r\n text-align: center;\r\n }\r\n }\r\n &.tms-attach-search-input {\r\n \tpadding: 0 10px;\r\n }\r\n}\r\n",".tms-em-chat-channel-create {\r\n .tms-join {\r\n max-height: 315px;\r\n overflow-y: auto;\r\n }\r\n .ui.form {\r\n > .field {\r\n > label {\r\n width: 35px!important;\r\n }\r\n }\r\n }\r\n}\r\n",".tms-em-chat-channel-link-mgr {\r\n .ui.form {\r\n .one.wide.field {\r\n @media only screen and (min-width: 768px) {\r\n padding: 0;\r\n }\r\n }\r\n }\r\n}\r\n",".tms-em-chat-channel-members-mgr {\r\n .ui.dropdown {\r\n span.owner + i.delete.icon {\r\n display: none;\r\n }\r\n span.disabled-user {\r\n text-decoration: line-through;\r\n font-style: italic;\r\n }\r\n }\r\n .member-table {\r\n max-height: 315px;\r\n overflow-y: auto;\r\n }\r\n}\r\n",".em-chat-channel-members-show {\r\n max-height: 300px;\r\n overflow-y: auto;\r\n}\r\n",".em-chat-content-item-footbar {\r\n margin-top: 8px;\r\n padding-top: 8px;\r\n padding-left: 50px;\r\n .add-btn {\r\n display: none;\r\n color: rgb(88, 96, 105);\r\n &.none {\r\n position: absolute;\r\n bottom: 0;\r\n }\r\n }\r\n .add-emoji-btn {\r\n &.none {\r\n left: 8px;\r\n }\r\n }\r\n .add-tag-btn {\r\n &.none {\r\n left: 45px;\r\n }\r\n }\r\n > .ui.label {\r\n cursor: pointer;\r\n }\r\n .emoji-item {\r\n margin-right: 8px;\r\n img {\r\n cursor: pointer;\r\n }\r\n &:last-child {\r\n margin-right: 0;\r\n }\r\n }\r\n .ui.popup.tags {\r\n > .content {\r\n width: 265px;\r\n > .ui.input {\r\n width: 20px;\r\n }\r\n }\r\n &.customTag {\r\n > .content {\r\n > .ui.label {\r\n display: none;\r\n }\r\n > .ui.input {\r\n width: 265px;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",".em-chat-content-item {\r\n .textcomplete-container {\r\n position: relative;\r\n .append-to {\r\n position: absolute;\r\n left: 0;\r\n bottom: 0;\r\n width: 100%;\r\n }\r\n }\r\n .ui.comments &.comment {\r\n >.avatar~.content {\r\n margin-left: 3em;\r\n }\r\n .actions {\r\n > a {\r\n margin-right: 5px;\r\n }\r\n .dropdown {\r\n > a .ellipsis.icon {\r\n margin-right: 0;\r\n }\r\n .item.tms-red {\r\n color: red;\r\n }\r\n }\r\n }\r\n &:hover {\r\n .tools {\r\n display: block;\r\n }\r\n &:before {\r\n width: 4px;\r\n }\r\n .em-chat-content-item-footbar {\r\n .add-btn {\r\n display: inline-block;\r\n }\r\n }\r\n }\r\n &.active {\r\n &:before {\r\n width: 4px;\r\n }\r\n }\r\n &:before {\r\n content: \"\";\r\n position: absolute;\r\n z-index: -1;\r\n top: 0;\r\n left: 0;\r\n bottom: 0;\r\n background: #2098D1;\r\n width: 0;\r\n -webkit-transition-property: width;\r\n transition-property: width;\r\n -webkit-transition-duration: 0.3s;\r\n transition-duration: 0.3s;\r\n -webkit-transition-timing-function: ease-out;\r\n transition-timing-function: ease-out;\r\n }\r\n }\r\n > .content {\r\n > .metadata > .rating {\r\n @media only screen and (max-width: 767px) {\r\n display: none!important;\r\n }\r\n }\r\n > .markdown-body {\r\n span.at-user {\r\n cursor: pointer;\r\n }\r\n img {\r\n @media only screen and (min-width: 768px) {\r\n max-width: 360px;\r\n max-height: 360px;\r\n }\r\n }\r\n }\r\n > .tools {\r\n position: absolute;\r\n right: 0;\r\n bottom: 0;\r\n display: none;\r\n > .ui.button {\r\n margin: 0;\r\n background-color: rgba(224, 225, 226, 0.5);\r\n &:hover {\r\n background-color: rgba(224, 225, 226, 1);\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",".tms-em-chat-input {\r\n &.ui.segment {\r\n margin: 0;\r\n position: fixed;\r\n bottom: 0;\r\n left: 220px;\r\n right: 0;\r\n background-color: white;\r\n padding-bottom: 22px;\r\n @media only screen and (max-width: 767px) {\r\n left: 0;\r\n }\r\n .tms-chat-status-bar {\r\n .dz-preview {\r\n display: block!important;\r\n width: auto!important;\r\n background: #e0e1e2;\r\n margin: 0;\r\n padding: 7px;\r\n }\r\n }\r\n .ui[class*=\"left action\"].input>textarea {\r\n border-top-left-radius: 0!important;\r\n border-bottom-left-radius: 0!important;\r\n border-left-color: transparent!important;\r\n }\r\n .textareaWrapper {\r\n width: calc(~\"100% - 35px\");\r\n border: 1px solid rgba(34, 36, 38, .15);\r\n border-top-right-radius: .28571429rem;\r\n border-bottom-right-radius: .28571429rem;\r\n .CodeMirror,\r\n .CodeMirror-scroll {\r\n min-height: 0;\r\n border: none;\r\n border-top-right-radius: .28571429rem;\r\n }\r\n .CodeMirror-scroll {\r\n max-height: 300px;\r\n }\r\n }\r\n .ui.input {\r\n margin-right: 5px;\r\n i.send.icon {\r\n z-index: 1;\r\n right: 7px!important;\r\n }\r\n textarea {\r\n resize: none;\r\n width: 100%;\r\n padding-right: 2.67142857em!important;\r\n margin: 0;\r\n max-width: 100%;\r\n outline: 0;\r\n -webkit-tap-highlight-color: rgba(255, 255, 255, 0);\r\n text-align: left;\r\n display: block;\r\n padding: .67861429em 1em;\r\n background: #FFF;\r\n border: none;\r\n color: rgba(0, 0, 0, .87);\r\n box-shadow: none;\r\n border-top-right-radius: .28571429rem;\r\n border-bottom-right-radius: .28571429rem;\r\n }\r\n }\r\n }\r\n .CodeMirror-lines {\r\n margin-right: 30px;\r\n }\r\n .ui.vertical.menu.popup {\r\n width: 145px;\r\n a.item {\r\n > i.icon {\r\n float: left;\r\n margin: 0 .35714286em 0 0;\r\n }\r\n }\r\n }\r\n}\r\n\r\n.tms-chat-direct {\r\n .tms-content {\r\n &.tms-sidebar-show {\r\n @media only screen and (min-width: 768px) {\r\n .tms-em-chat-input {\r\n right: 392px;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n.textcomplete-dropdown {\r\n position: static!important;\r\n border: 1px solid #ddd;\r\n background-color: white;\r\n list-style: none;\r\n padding: 0;\r\n margin: 0;\r\n border-radius: 5px;\r\n li {\r\n /* border-top: 1px solid #ddd; */\r\n padding: 2px 5px;\r\n }\r\n li:first-child {\r\n border-top: none;\r\n border-top-left-radius: 5px;\r\n border-top-right-radius: 5px;\r\n }\r\n li:last-child {\r\n border-bottom-left-radius: 5px;\r\n border-bottom-right-radius: 5px;\r\n }\r\n li:hover,\r\n .active {\r\n background-color: rgb(67, 159, 224);\r\n }\r\n a:hover {\r\n cursor: pointer;\r\n }\r\n li.textcomplete-item {\r\n a {\r\n color: black;\r\n }\r\n &:hover a,\r\n &.active a {\r\n color: white;\r\n }\r\n }\r\n}\r\n\r\n.tms-chat-input-help-meta {\r\n position: absolute;\r\n bottom: 0;\r\n left: 60px;\r\n font-size: 12px;\r\n color: lightgray;\r\n}\r\n",".tms-chat-member-popup {\r\n .ui.cards {\r\n margin-top: 0!important;\r\n .card {\r\n margin-top: 0!important;\r\n .ui.list >.item {\r\n border-radius: 0!important;\r\n }\r\n }\r\n }\r\n}\r\n",".em-chat-msg {\r\n .ui.comments .comment .actions a {\r\n margin-right: 5px;\r\n }\r\n}\r\n",".em-chat-schedule-edit {\r\n // width: 320px!important;\r\n // margin-left: -160px!important;\r\n .ui.form {\r\n width: 300px;\r\n .ui.calendar {\r\n width: 200px;\r\n }\r\n .tms-date-field {\r\n position: relative;\r\n .ui.button {\r\n position: absolute;\r\n top: 0;\r\n right: 0;\r\n }\r\n }\r\n .ui.dropdown {\r\n width: 265px!important;\r\n min-height: 30px;\r\n > a.ui.label {\r\n > input.owner + i.delete.icon {\r\n display: none;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n\r\n.tms-schedule-edit-target {\r\n display: inline-block;\r\n width: 1px;\r\n height: 1px;\r\n position: absolute;\r\n right: 188px;\r\n top: 30px;\r\n}\r\n",".em-chat-schedule-remind {\r\n .ui.table {\r\n tr > td:first-child {\r\n font-weight: bold;\r\n }\r\n }\r\n}\r\n",".em-chat-schedule {\r\n position: relative;\r\n height: 100%;\r\n .tms-add {\r\n position: absolute;\r\n right: 170px;\r\n top: 0;\r\n }\r\n .ui.form {\r\n width: 300px;\r\n .ui.calendar {\r\n width: 200px;\r\n }\r\n .tms-date-field {\r\n position: relative;\r\n .ui.button {\r\n position: absolute;\r\n top: 0;\r\n right: 0;\r\n }\r\n }\r\n .ui.dropdown {\r\n width: 265px!important;\r\n min-height: auto;\r\n > a.ui.label {\r\n > input.owner + i.delete.icon {\r\n display: none;\r\n }\r\n }\r\n }\r\n }\r\n}",".em-chat-share {\r\n &.ui.popup {\r\n max-width: 100%;\r\n width: 255px;\r\n .ui.input {\r\n width: 225px;\r\n }\r\n textarea {\r\n width: 195px!important;\r\n }\r\n .ui.search>.results .result {\r\n cursor: pointer!important;\r\n display: block!important;\r\n color: rgba(0, 0, 0, .87)!important;\r\n border-bottom: 1px solid rgba(34, 36, 38, .1)!important;\r\n margin: 0!important;\r\n }\r\n .ui.list {\r\n > .item {\r\n color: rgba(0, 0, 0, .87);\r\n }\r\n }\r\n }\r\n &:after {\r\n content: '';\r\n clear: both;\r\n }\r\n .footer {\r\n margin-top: 16px;\r\n .btn-cancel {\r\n float: right;\r\n margin: 6px 0 0 8px!important;\r\n }\r\n }\r\n}\r\n",".tms-left-sidebar {\r\n overflow: hidden;\r\n .tms-body {\r\n position: absolute;\r\n top: 98px;\r\n width: 220px;\r\n height: e(\"calc(100% - 150px)\");\r\n overflow: hidden;\r\n padding-right: 2px;\r\n i.circular.icon {\r\n box-shadow: 0 0 0 .1em rgb(65, 131, 196) inset;\r\n }\r\n .title {\r\n position: relative;\r\n margin-left: 10px;\r\n .ui.header {\r\n display: inline-block;\r\n margin-top: 2px;\r\n margin-bottom: 0;\r\n }\r\n i.plus.icon {\r\n position: absolute;\r\n right: 10px;\r\n font-size: 12px;\r\n width: 12px!important;\r\n height: 12px!important;\r\n }\r\n }\r\n .ui.list {\r\n margin-top: 10px;\r\n padding-top: 5px;\r\n box-shadow: 0px -1px 1px -1px rgba(65, 131, 196, 0.5);\r\n > .item {\r\n padding-left: 16px;\r\n border-radius: 0;\r\n > .icon+.content {\r\n padding: 0;\r\n }\r\n &.active {\r\n background: rgba(0, 0, 0, 0.2);\r\n }\r\n &:hover {\r\n background: rgba(0, 0, 0, 0.1)!important;\r\n }\r\n &.disabled-user {\r\n text-decoration: line-through;\r\n font-style: italic;\r\n }\r\n }\r\n }\r\n .tms-name {\r\n white-space: nowrap;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n max-width: 160px;\r\n }\r\n .tms-users {}\r\n .tms-channels {\r\n .ui.list {\r\n a.item {\r\n position: relative;\r\n &:hover {\r\n .actions {\r\n display: inline-block;\r\n }\r\n }\r\n }\r\n }\r\n .actions {\r\n display: none;\r\n position: absolute;\r\n right: 10px;\r\n top: 5px;\r\n }\r\n }\r\n .scroll-element.scroll-y {\r\n background-color: #4d394b;\r\n }\r\n }\r\n &.ui.left.sidebar {\r\n background-color: #4d394b;\r\n width: 220px;\r\n * {\r\n color: #4183c4!important;\r\n }\r\n .tms-header {\r\n > input {\r\n background-color: transparent;\r\n border: 1px rgba(103, 104, 104, 0.5) solid;\r\n font-size: 12px;\r\n padding: 4px;\r\n width: 188px;\r\n outline: none;\r\n margin-top: 10px;\r\n border-radius: 2px;\r\n &::-webkit-input-placeholder {\r\n color: rgba(103, 104, 104, 0.5)!important;\r\n }\r\n &::-moz-placeholder {\r\n color: rgba(103, 104, 104, 0.5)!important;\r\n }\r\n &:-ms-input-placeholder {\r\n color: rgba(103, 104, 104, 0.5)!important;\r\n }\r\n &:focus {\r\n &::-webkit-input-placeholder {\r\n color: rgb(103, 104, 104)!important;\r\n }\r\n &::-moz-placeholder {\r\n color: rgb(103, 104, 104)!important;\r\n }\r\n &:-ms-input-placeholder {\r\n color: rgb(103, 104, 104)!important;\r\n }\r\n }\r\n }\r\n padding: 9px 16px;\r\n box-shadow: 0 1px 1px -1px rgb(65, 131, 196);\r\n h1.ui.header {\r\n margin: 0;\r\n img {\r\n width: 30px;\r\n height: 30px;\r\n margin: 0;\r\n }\r\n }\r\n i.close.icon {\r\n position: absolute;\r\n right: 16px;\r\n top: 60px;\r\n }\r\n }\r\n }\r\n .tms-footer {\r\n position: absolute;\r\n bottom: 0;\r\n left: 0;\r\n right: 0;\r\n .ui.menu {\r\n border-radius: 0;\r\n background-color: rgba(27, 28, 29, 0.2)!important;\r\n .dropdown.item .menu {\r\n border-radius: 0;\r\n }\r\n .item {\r\n font-size: 12px!important;\r\n }\r\n .item:before {\r\n width: 0;\r\n }\r\n .ui.button.item {\r\n width: 140px;\r\n margin-right: 0;\r\n padding-left: 0;\r\n .visible.content {\r\n margin-right: 0;\r\n width: 100%;\r\n }\r\n }\r\n .right.menu {\r\n .ui.dropdown {\r\n .menu {\r\n .header {\r\n min-width: 150px;\r\n position: relative;\r\n .plus.icon {\r\n position: absolute;\r\n right: 0;\r\n top: -7px;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",".em-chat-sidebar-right {\r\n .panel-wiki-dir {\r\n \theight: 100%;\r\n padding-left: 15px;\r\n overflow-y: auto;\r\n }\r\n .panel-chat-schedule {\r\n \theight: e(\"calc(100% - 10px)\");\r\n \toverflow: hidden;\r\n }\r\n}\r\n",".tms-em-chat-system-link-mgr {\r\n .ui.form {\r\n .one.wide.field {\r\n @media only screen and (min-width: 768px) {\r\n padding: 0;\r\n }\r\n }\r\n }\r\n}\r\n",".tms-em-chat-top-menu {\r\n &.ui.top.menu {\r\n padding-left: 220px;\r\n height: 60px;\r\n @media only screen and (max-width: 767px) {\r\n .tms-chat-at.tms-hide {\r\n display: none;\r\n }\r\n }\r\n .item.tms-item:before {\r\n display: none;\r\n }\r\n .right.menu {\r\n .item {\r\n &.tms-login-user {\r\n @media only screen and (max-width: 767px) {\r\n &.tms-hide {\r\n display: none;\r\n }\r\n }\r\n }\r\n &.tms-item {\r\n padding-left: 0;\r\n padding-right: 5px;\r\n @media only screen and (max-width: 767px) {\r\n &.tms-hide {\r\n display: none;\r\n }\r\n &.tms-mobile-hide {\r\n display: none;\r\n }\r\n }\r\n button {\r\n .ui.floating.label {\r\n top: 0;\r\n right: 0;\r\n left: auto;\r\n }\r\n }\r\n &.ui.dropdown {\r\n @media only screen and (max-width: 767px) {\r\n display: flex;\r\n }\r\n display: none;\r\n padding-left: 5px;\r\n margin-right: 5px;\r\n > i.icon {\r\n margin-left: 5px;\r\n }\r\n .menu {\r\n > .item {\r\n .ui.button {\r\n margin: 0;\r\n i.icon {\r\n margin: 0;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n &.tms-search {\r\n @media only screen and (max-width: 767px) {\r\n padding-left: 10px;\r\n padding-right: 10px;\r\n }\r\n }\r\n }\r\n .ui.search {\r\n input {\r\n width: 95px;\r\n transition: width .15s ease-out 0s;\r\n }\r\n i.remove.icon {\r\n display: none;\r\n position: absolute;\r\n right: 0;\r\n left: auto;\r\n }\r\n }\r\n }\r\n @media only screen and (max-width: 767px) {\r\n padding-left: 0;\r\n }\r\n .ui.basic.button {\r\n box-shadow: none;\r\n }\r\n }\r\n > .tms-chat-at {\r\n &.ui.dropdown {\r\n @media only screen and (min-width: 768px) {\r\n min-width: 175px;\r\n padding-top: 0;\r\n padding-left: 13px;\r\n padding-bottom: 20px;\r\n &.item:before {\r\n width: 0;\r\n }\r\n }\r\n > .text {\r\n > .actions {\r\n display: none;\r\n }\r\n }\r\n > .tms-metadata {\r\n position: absolute;\r\n display: flex;\r\n top: 35px;\r\n font-size: 12px;\r\n left: 0;\r\n height: 15px;\r\n .item {\r\n &:before {\r\n top: 5px;\r\n height: 50%;\r\n }\r\n &.tms-channel-info:before {\r\n width: 0;\r\n }\r\n &.tms-user-info:before {\r\n width: 0;\r\n }\r\n }\r\n @media only screen and (max-width: 767px) {\r\n display: none;\r\n }\r\n .tms-channel-links {\r\n .menu {\r\n .header {\r\n min-width: 200px;\r\n }\r\n }\r\n }\r\n }\r\n @media only screen and (max-width: 767px) {\r\n > .text {\r\n display: none;\r\n }\r\n > .dropdown.icon {\r\n margin-left: 6px;\r\n margin-right: 6px;\r\n }\r\n }\r\n .menu {\r\n > .header {\r\n i.plus.icon {\r\n position: absolute;\r\n right: 5px;\r\n top: 7px;\r\n }\r\n }\r\n > .item {\r\n &:hover {\r\n .actions {\r\n display: inline-block;\r\n }\r\n }\r\n .icon {\r\n margin-right: 4px!important;\r\n }\r\n > .actions {\r\n display: none;\r\n position: absolute;\r\n right: 5px;\r\n top: 10px;\r\n .large.ellipsis.horizontal.icon {\r\n font-size: 1.3em!important;\r\n }\r\n }\r\n &.disabled-user {\r\n text-decoration: line-through;\r\n font-style: italic;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",".em-checkbox {}",".tms-em-hotkeys-modal {\r\n ul {\r\n padding-left: 30px;\r\n }\r\n ul.no_bullets {\r\n margin: 0 0 2rem;\r\n }\r\n ul.no_bullets li {\r\n line-height: 2rem;\r\n list-style-type: none;\r\n padding: 0;\r\n font-size: 1rem;\r\n font-weight: 700;\r\n }\r\n &>.content {\r\n background-color: rgba(11, 7, 11, 0.78)!important;\r\n }\r\n .keyboard i.icon {\r\n margin-right: 0px!important;\r\n }\r\n .subtle_silver {\r\n color: #9e9ea6!important;\r\n }\r\n .ui.grid .column {\r\n padding: 0!important;\r\n }\r\n}\r\n",".em-user-avatar {\r\n &.avatar.ui.mini.circular.image {\r\n width: 35px;\r\n height: 35px;\r\n font-size: 35px;\r\n background-color: rgba(150, 178, 183, 0.4);\r\n text-align: center;\r\n margin: 0;\r\n padding-right: 0;\r\n }\r\n .text-char {\r\n display: inline-block;\r\n height: 35px;\r\n line-height: 35px;\r\n vertical-align: top;\r\n }\r\n}\r\n",".tms-em-user-edit {\r\n .ui.form {\r\n .field {\r\n > label {\r\n width: 45px!important;\r\n }\r\n .user-username {\r\n margin-left: 0;\r\n }\r\n }\r\n }\r\n}\r\n\r\n.em-user-edit-modal {\r\n /* Tablet & PC */\r\n @media only screen and (min-width: 768px) {\r\n width: 500px!important;\r\n margin-left: -250px!important;\r\n }\r\n}\r\n"],"sourceRoot":"../src"} \ No newline at end of file diff --git a/scripts/deps-bundle-2a3a568578.js b/scripts/deps-bundle-2a3a568578.js deleted file mode 100644 index 5fd8139832c3023e1592ccb8f0b1dc9293e9b46c..0000000000000000000000000000000000000000 --- a/scripts/deps-bundle-2a3a568578.js +++ /dev/null @@ -1,20 +0,0 @@ -(function(){function e(e){this.tokens=[],this.tokens.links={},this.options=e||c.defaults,this.rules=u.normal,this.options.gfm&&(this.options.tables?this.rules=u.tables:this.rules=u.gfm)}function t(e,t){if(this.options=t||c.defaults,this.links=e,this.rules=d.normal,this.renderer=this.options.renderer||new n,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.gfm?this.options.breaks?this.rules=d.breaks:this.rules=d.gfm:this.options.pedantic&&(this.rules=d.pedantic)}function n(e){this.options=e||{}}function i(e){this.tokens=[],this.token=null,this.options=e||c.defaults,this.options.renderer=this.options.renderer||new n,this.renderer=this.options.renderer,this.renderer.options=this.options}function r(e,t){return e.replace(t?/&/g:/&(?!#?\w+;)/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function o(e){return e.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/g,function(e,t){return t=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}function s(e,t){return e=e.source,t=t||"",function n(i,r){return i?(r=r.source||r,r=r.replace(/(^|[^\[])\^/g,"$1"),e=e.replace(i,r),n):new RegExp(e,t)}}function a(){}function l(e){for(var t,n,i=1;iAn error occured:

    "+r(e.message+"",!0)+"
    ";throw e}}var u={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:a,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:a,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:a,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};u.bullet=/(?:[*+-]|\d+\.)/,u.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,u.item=s(u.item,"gm")(/bull/g,u.bullet)(),u.list=s(u.list)(/bull/g,u.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+u.def.source+")")(),u.blockquote=s(u.blockquote)("def",u.def)(),u._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",u.html=s(u.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,u._tag)(),u.paragraph=s(u.paragraph)("hr",u.hr)("heading",u.heading)("lheading",u.lheading)("blockquote",u.blockquote)("tag","<"+u._tag)("def",u.def)(),u.normal=l({},u),u.gfm=l({},u.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),u.gfm.paragraph=s(u.paragraph)("(?!","(?!"+u.gfm.fences.source.replace("\\1","\\2")+"|"+u.list.source.replace("\\1","\\3")+"|")(),u.tables=l({},u.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),e.rules=u,e.lex=function(t,n){var i=new e(n);return i.lex(t)},e.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},e.prototype.token=function(e,t,n){for(var i,r,o,s,a,l,c,d,h,e=e.replace(/^ +$/gm,"");e;)if((o=this.rules.newline.exec(e))&&(e=e.substring(o[0].length),o[0].length>1&&this.tokens.push({type:"space"})),o=this.rules.code.exec(e))e=e.substring(o[0].length),o=o[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?o:o.replace(/\n+$/,"")});else if(o=this.rules.fences.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"code",lang:o[2],text:o[3]||""});else if(o=this.rules.heading.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"heading",depth:o[1].length,text:o[2]});else if(t&&(o=this.rules.nptable.exec(e))){for(e=e.substring(o[0].length),l={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/\n$/,"").split("\n")},d=0;d ?/gm,""),this.token(o,t,!0),this.tokens.push({type:"blockquote_end"});else if(o=this.rules.list.exec(e)){for(e=e.substring(o[0].length),s=o[2],this.tokens.push({type:"list_start",ordered:s.length>1}),o=o[0].match(this.rules.item),i=!1,h=o.length,d=0;d1&&a.length>1||(e=o.slice(d+1).join("\n")+e,d=h-1)),r=i||/\n\n(?!\s*$)/.test(l),d!==h-1&&(i="\n"===l.charAt(l.length-1),r||(r=i)),this.tokens.push({type:r?"loose_item_start":"list_item_start"}),this.token(l,!1,n),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(o=this.rules.html.exec(e))e=e.substring(o[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===o[1]||"script"===o[1]||"style"===o[1]),text:o[0]});else if(!n&&t&&(o=this.rules.def.exec(e)))e=e.substring(o[0].length),this.tokens.links[o[1].toLowerCase()]={href:o[2],title:o[3]};else if(t&&(o=this.rules.table.exec(e))){for(e=e.substring(o[0].length),l={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/(?: *\| *)?\n$/,"").split("\n")},d=0;d])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:a,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:a,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/,d.link=s(d.link)("inside",d._inside)("href",d._href)(),d.reflink=s(d.reflink)("inside",d._inside)(),d.normal=l({},d),d.pedantic=l({},d.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),d.gfm=l({},d.normal,{escape:s(d.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:s(d.text)("]|","~]|")("|","|https?://|")()}),d.breaks=l({},d.gfm,{br:s(d.br)("{2,}","*")(),text:s(d.gfm.text)("{2,}","*")()}),t.rules=d,t.output=function(e,n,i){var r=new t(n,i);return r.output(e)},t.prototype.output=function(e){for(var t,n,i,o,s="";e;)if(o=this.rules.escape.exec(e))e=e.substring(o[0].length),s+=o[1];else if(o=this.rules.autolink.exec(e))e=e.substring(o[0].length),"@"===o[2]?(n=":"===o[1].charAt(6)?this.mangle(o[1].substring(7)):this.mangle(o[1]),i=this.mangle("mailto:")+n):(n=r(o[1]),i=n),s+=this.renderer.link(i,null,n);else if(this.inLink||!(o=this.rules.url.exec(e))){if(o=this.rules.tag.exec(e))!this.inLink&&/^
    /i.test(o[0])&&(this.inLink=!1),e=e.substring(o[0].length),s+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(o[0]):r(o[0]):o[0];else if(o=this.rules.link.exec(e))e=e.substring(o[0].length),this.inLink=!0,s+=this.outputLink(o,{href:o[2],title:o[3]}),this.inLink=!1;else if((o=this.rules.reflink.exec(e))||(o=this.rules.nolink.exec(e))){if(e=e.substring(o[0].length),t=(o[2]||o[1]).replace(/\s+/g," "),t=this.links[t.toLowerCase()],!t||!t.href){s+=o[0].charAt(0),e=o[0].substring(1)+e;continue}this.inLink=!0,s+=this.outputLink(o,t),this.inLink=!1}else if(o=this.rules.strong.exec(e))e=e.substring(o[0].length),s+=this.renderer.strong(this.output(o[2]||o[1]));else if(o=this.rules.em.exec(e))e=e.substring(o[0].length),s+=this.renderer.em(this.output(o[2]||o[1]));else if(o=this.rules.code.exec(e))e=e.substring(o[0].length),s+=this.renderer.codespan(r(o[2],!0));else if(o=this.rules.br.exec(e))e=e.substring(o[0].length),s+=this.renderer.br();else if(o=this.rules.del.exec(e))e=e.substring(o[0].length),s+=this.renderer.del(this.output(o[1]));else if(o=this.rules.text.exec(e))e=e.substring(o[0].length),s+=this.renderer.text(r(this.smartypants(o[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else e=e.substring(o[0].length),n=r(o[1]),i=n,s+=this.renderer.link(i,null,n);return s},t.prototype.outputLink=function(e,t){var n=r(t.href),i=t.title?r(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,i,this.output(e[1])):this.renderer.image(n,i,r(e[1]))},t.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014\/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014\/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},t.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",i=e.length,r=0;r.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},n.prototype.code=function(e,t,n){if(this.options.highlight){var i=this.options.highlight(e,t);null!=i&&i!==e&&(n=!0,e=i)}return t?'
    '+(n?e:r(e,!0))+"\n
    \n":"
    "+(n?e:r(e,!0))+"\n
    "},n.prototype.blockquote=function(e){return"
    \n"+e+"
    \n"},n.prototype.html=function(e){return e},n.prototype.heading=function(e,t,n){return"'+e+"\n"},n.prototype.hr=function(){return this.options.xhtml?"
    \n":"
    \n"},n.prototype.list=function(e,t){var n=t?"ol":"ul";return"<"+n+">\n"+e+"\n"},n.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},n.prototype.paragraph=function(e){return"

    "+e+"

    \n"},n.prototype.table=function(e,t){return"\n\n"+e+"\n\n"+t+"\n
    \n"},n.prototype.tablerow=function(e){return"\n"+e+"\n"},n.prototype.tablecell=function(e,t){var n=t.header?"th":"td",i=t.align?"<"+n+' style="text-align:'+t.align+'">':"<"+n+">";return i+e+"\n"},n.prototype.strong=function(e){return""+e+""},n.prototype.em=function(e){return""+e+""},n.prototype.codespan=function(e){return""+e+""},n.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},n.prototype.del=function(e){return""+e+""},n.prototype.link=function(e,t,n){if(this.options.sanitize){try{var i=decodeURIComponent(o(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(0===i.indexOf("javascript:")||0===i.indexOf("vbscript:"))return""}var r='
    "},n.prototype.image=function(e,t,n){var i=''+n+'":">"},n.prototype.text=function(e){return e},i.parse=function(e,t,n){var r=new i(t,n);return r.parse(e)},i.prototype.parse=function(e){this.inline=new t(e.links,this.options,this.renderer),this.tokens=e.reverse();for(var n="";this.next();)n+=this.tok();return n},i.prototype.next=function(){return this.token=this.tokens.pop()},i.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},i.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},i.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,i,r,o="",s="";for(n="",e=0;e-1},get:function(n){return t[e.indexOf(n)]},set:function(n,i){e.indexOf(n)===-1&&(e.push(n),t.push(i))},delete:function(n){var i=e.indexOf(n);i>-1&&(e.splice(i,1),t.splice(i,1))}}}(),s=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){s=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}var a=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?(a=function(e){return e},a.destroy=function(e){return e},a.update=function(e){return e}):(a=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],function(e){return n(e,t)}),e},a.destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],i),e},a.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],r),e}),t.exports=a}),function(e,t){"undefined"!=typeof module?module.exports=t():"function"==typeof define&&"object"==typeof define.amd?define("clipboard-js",t):this[e]=t()}("clipboard",function(){if("undefined"==typeof document||!document.addEventListener)return null;var e={};return e.copy=function(){function e(){n=!1,i=null,r&&window.getSelection().removeAllRanges(),r=!1}function t(){var e=document.getSelection();if(!document.queryCommandEnabled("copy")&&e.isCollapsed){var t=document.createRange();t.selectNodeContents(document.body),e.addRange(t),r=!0}}var n=!1,i=null,r=!1;return document.addEventListener("copy",function(e){if(n){for(var t in i)e.clipboardData.setData(t,i[t]);e.preventDefault()}}),function(r){return new Promise(function(o,s){n=!0,i="string"==typeof r?{"text/plain":r}:r instanceof Node?{"text/html":(new XMLSerializer).serializeToString(r)}:r;try{if(t(),!document.execCommand("copy"))throw new Error("Unable to copy. Perhaps it's not available in your browser?");e(),o()}catch(t){e(),s(t)}})}}(),e.paste=function(){var e,t,n=!1;return document.addEventListener("paste",function(i){if(n){n=!1,i.preventDefault();var r=e;e=null,r(i.clipboardData.getData(t))}}),function(i){return new Promise(function(r,o){n=!0,e=r,t=i||"text/plain";try{document.execCommand("paste")||(n=!1,o(new Error("Unable to paste. Pasting only works in Internet Explorer at the moment.")))}catch(e){n=!1,o(new Error(e))}})}}(),"undefined"==typeof ClipboardEvent&&"undefined"!=typeof window.clipboardData&&"undefined"!=typeof window.clipboardData.setData&&(!function(e){function t(e,t){return function(){e.apply(t,arguments)}}function n(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],l(e,t(r,this),t(o,this))}function i(e){var t=this;return null===this._state?void this._deferreds.push(e):void c(function(){var n=t._state?e.onFulfilled:e.onRejected;if(null===n)return void(t._state?e.resolve:e.reject)(t._value);var i;try{i=n(t._value)}catch(t){return void e.reject(t)}e.resolve(i)})}function r(e){try{if(e===this)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if("function"==typeof n)return void l(t(n,e),t(r,this),t(o,this))}this._state=!0,this._value=e,s.call(this)}catch(e){o.call(this,e)}}function o(e){this._state=!1,this._value=e,s.call(this)}function s(){for(var e=0,t=this._deferreds.length;t>e;e++)i.call(this,this._deferreds[e]);this._deferreds=null}function a(e,t,n,i){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=i}function l(e,t,n){var i=!1;try{e(function(e){i||(i=!0,t(e))},function(e){i||(i=!0,n(e))})}catch(e){if(i)return;i=!0,n(e)}}var c=n.immediateFn||"function"==typeof setImmediate&&setImmediate||function(e){setTimeout(e,1)},u=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};n.prototype.catch=function(e){return this.then(null,e)},n.prototype.then=function(e,t){var r=this;return new n(function(n,o){i.call(r,new a(e,t,n,o))})},n.all=function(){var e=Array.prototype.slice.call(1===arguments.length&&u(arguments[0])?arguments[0]:arguments);return new n(function(t,n){function i(o,s){try{if(s&&("object"==typeof s||"function"==typeof s)){var a=s.then;if("function"==typeof a)return void a.call(s,function(e){i(o,e)},n)}e[o]=s,0===--r&&t(e)}catch(e){n(e)}}if(0===e.length)return t([]);for(var r=e.length,o=0;oi;i++)e[i].then(t,n)})},"undefined"!=typeof module&&module.exports?module.exports=n:e.Promise||(e.Promise=n)}(this),e.copy=function(e){return new Promise(function(t,n){if("string"!=typeof e&&!("text/plain"in e))throw new Error("You must provide a text/plain type.");var i="string"==typeof e?e:e["text/plain"],r=window.clipboardData.setData("Text",i);r?t():n(new Error("Copying was rejected."))})},e.paste=function(){return new Promise(function(e,t){var n=window.clipboardData.getData("Text");n?e(n):t(new Error("Pasting was rejected."))})}),e}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define("moment",t):e.moment=t()}(this,function(){"use strict";function e(){return gi.apply(null,arguments)}function t(e){gi=e}function n(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function r(e){var t;for(t in e)return!1;return!0}function o(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function s(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function a(e,t){var n,i=[];for(n=0;n0)for(n in yi)i=yi[n],r=t[i],g(r)||(e[i]=r);return e}function v(t){m(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),bi===!1&&(bi=!0,e.updateOffset(this),bi=!1)}function y(e){return e instanceof v||null!=e&&null!=e._isAMomentObject}function b(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function w(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=b(t)),n}function x(e,t,n){var i,r=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),s=0;for(i=0;i0?"future":"past"];return T(n)?n(t):n.replace(/%s/i,t)}function R(e,t){var n=e.toLowerCase();Mi[n]=Mi[n+"s"]=Mi[t]=e}function I(e){return"string"==typeof e?Mi[e]||Mi[e.toLowerCase()]:void 0}function O(e){var t,n,i={};for(n in e)l(e,n)&&(t=I(n),t&&(i[t]=e[n]));return i}function F(e,t){Hi[e]=t}function P(e){var t=[];for(var n in e)t.push({unit:n,priority:Hi[n]});return t.sort(function(e,t){return e.priority-t.priority}),t}function W(t,n){return function(i){return null!=i?(j(this,t,i),e.updateOffset(this,n),this):B(this,t)}}function B(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function j(e,t,n){e.isValid()&&e._d["set"+(e._isUTC?"UTC":"")+t](n)}function Y(e){return e=I(e),T(this[e])?this[e]():this}function U(e,t){if("object"==typeof e){e=O(e);for(var n=P(e),i=0;i=0;return(o?n?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+i}function G(e,t,n,i){var r=i;"string"==typeof i&&(r=function(){return this[i]()}),e&&(Ri[e]=r),t&&(Ri[t[0]]=function(){return q(r.apply(this,arguments),t[1],t[2])}),n&&(Ri[n]=function(){return this.localeData().ordinal(r.apply(this,arguments),e)})}function V(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function $(e){var t,n,i=e.match(Ni);for(t=0,n=i.length;t=0&&Ai.test(e);)e=e.replace(Ai,n),Ai.lastIndex=0,i-=1;return e}function Q(e,t,n){Ji[e]=T(t)?t:function(e,i){return e&&n?n:t}}function K(e,t){return l(Ji,e)?Ji[e](t._strict,t._locale):new RegExp(J(e))}function J(e){return ee(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,i,r){return t||n||i||r}))}function ee(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function te(e,t){var n,i=t;for("string"==typeof e&&(e=[e]),o(t)&&(i=function(e,n){n[t]=w(e)}),n=0;n=0&&isFinite(a.getFullYear())&&a.setFullYear(e),a}function be(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&e>=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function we(e,t,n){var i=7+t-n,r=(7+be(e,0,i).getUTCDay()-t)%7;return-r+i-1}function xe(e,t,n,i,r){var o,s,a=(7+n-i)%7,l=we(e,i,r),c=1+7*(t-1)+a+l;return c<=0?(o=e-1,s=ge(o)+c):c>ge(e)?(o=e+1,s=c-ge(e)):(o=e,s=c),{year:o,dayOfYear:s}}function ke(e,t,n){var i,r,o=we(e.year(),t,n),s=Math.floor((e.dayOfYear()-o-1)/7)+1;return s<1?(r=e.year()-1,i=s+Se(r,t,n)):s>Se(e.year(),t,n)?(i=s-Se(e.year(),t,n),r=e.year()+1):(r=e.year(),i=s),{week:i,year:r}}function Se(e,t,n){var i=we(e,t,n),r=we(e+1,t,n);return(ge(e)-i+r)/7}function Ce(e){return ke(e,this._week.dow,this._week.doy).week}function Te(){return this._week.dow}function Ee(){return this._week.doy}function _e(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Le(e){var t=ke(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function De(e,t){return"string"!=typeof e?e:isNaN(e)?(e=t.weekdaysParse(e),"number"==typeof e?e:null):parseInt(e,10)}function Me(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function He(e,t){return e?n(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:this._weekdays}function Ne(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Ae(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin}function ze(e,t,n){var i,r,o,s=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)o=u([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===t?(r=ur.call(this._weekdaysParse,s),r!==-1?r:null):"ddd"===t?(r=ur.call(this._shortWeekdaysParse,s),r!==-1?r:null):(r=ur.call(this._minWeekdaysParse,s),r!==-1?r:null):"dddd"===t?(r=ur.call(this._weekdaysParse,s),r!==-1?r:(r=ur.call(this._shortWeekdaysParse,s),r!==-1?r:(r=ur.call(this._minWeekdaysParse,s),r!==-1?r:null))):"ddd"===t?(r=ur.call(this._shortWeekdaysParse,s),r!==-1?r:(r=ur.call(this._weekdaysParse,s),r!==-1?r:(r=ur.call(this._minWeekdaysParse,s),r!==-1?r:null))):(r=ur.call(this._minWeekdaysParse,s),r!==-1?r:(r=ur.call(this._weekdaysParse,s),r!==-1?r:(r=ur.call(this._shortWeekdaysParse,s),r!==-1?r:null)))}function Re(e,t,n){var i,r,o;if(this._weekdaysParseExact)return ze.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(r=u([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(r,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(r,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(r,"").replace(".",".?")+"$","i")),this._weekdaysParse[i]||(o="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[i]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[i].test(e))return i;if(n&&"ddd"===t&&this._shortWeekdaysParse[i].test(e))return i;if(n&&"dd"===t&&this._minWeekdaysParse[i].test(e))return i;if(!n&&this._weekdaysParse[i].test(e))return i}}function Ie(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=De(e,this.localeData()),this.add(e-t,"d")):t}function Oe(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Fe(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Me(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Pe(e){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||je.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(l(this,"_weekdaysRegex")||(this._weekdaysRegex=xr),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function We(e){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||je.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(l(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=kr),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Be(e){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||je.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(l(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Sr),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function je(){function e(e,t){return t.length-e.length}var t,n,i,r,o,s=[],a=[],l=[],c=[];for(t=0;t<7;t++)n=u([2e3,1]).day(t),i=this.weekdaysMin(n,""),r=this.weekdaysShort(n,""),o=this.weekdays(n,""),s.push(i),a.push(r),l.push(o),c.push(i),c.push(r),c.push(o);for(s.sort(e),a.sort(e),l.sort(e),c.sort(e),t=0;t<7;t++)a[t]=ee(a[t]),l[t]=ee(l[t]),c[t]=ee(c[t]);this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Ye(){return this.hours()%12||12}function Ue(){return this.hours()||24}function qe(e,t){G(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function Ge(e,t){return t._meridiemParse}function Ve(e){return"p"===(e+"").toLowerCase().charAt(0)}function $e(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}function Ze(e){return e?e.toLowerCase().replace("_","-"):e}function Xe(e){for(var t,n,i,r,o=0;o0;){if(i=Qe(r.slice(0,t).join("-")))return i;if(n&&n.length>=t&&x(r,n,!0)>=t-1)break;t--}o++}return null}function Qe(e){var t=null;if(!Lr[e]&&"undefined"!=typeof module&&module&&module.exports)try{t=Cr._abbr,require("./locale/"+e),Ke(t)}catch(e){}return Lr[e]}function Ke(e,t){var n;return e&&(n=g(t)?tt(e):Je(e,t),n&&(Cr=n)),Cr._abbr}function Je(e,t){if(null!==t){var n=_r;if(t.abbr=e,null!=Lr[e])C("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=Lr[e]._config;else if(null!=t.parentLocale){if(null==Lr[t.parentLocale])return Dr[t.parentLocale]||(Dr[t.parentLocale]=[]),Dr[t.parentLocale].push({name:e,config:t}),null;n=Lr[t.parentLocale]._config}return Lr[e]=new L(_(n,t)),Dr[e]&&Dr[e].forEach(function(e){Je(e.name,e.config)}),Ke(e),Lr[e]}return delete Lr[e],null}function et(e,t){if(null!=t){var n,i=_r;null!=Lr[e]&&(i=Lr[e]._config),t=_(i,t),n=new L(t),n.parentLocale=Lr[e],Lr[e]=n,Ke(e)}else null!=Lr[e]&&(null!=Lr[e].parentLocale?Lr[e]=Lr[e].parentLocale:null!=Lr[e]&&delete Lr[e]);return Lr[e]}function tt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Cr;if(!n(e)){if(t=Qe(e))return t;e=[e]}return Xe(e)}function nt(){return Si(Lr)}function it(e){var t,n=e._a;return n&&h(e).overflow===-2&&(t=n[nr]<0||n[nr]>11?nr:n[ir]<1||n[ir]>re(n[tr],n[nr])?ir:n[rr]<0||n[rr]>24||24===n[rr]&&(0!==n[or]||0!==n[sr]||0!==n[ar])?rr:n[or]<0||n[or]>59?or:n[sr]<0||n[sr]>59?sr:n[ar]<0||n[ar]>999?ar:-1,h(e)._overflowDayOfYear&&(tir)&&(t=ir),h(e)._overflowWeeks&&t===-1&&(t=lr),h(e)._overflowWeekday&&t===-1&&(t=cr),h(e).overflow=t),e}function rt(e){var t,n,i,r,o,s,a=e._i,l=Mr.exec(a)||Hr.exec(a);if(l){for(h(e).iso=!0,t=0,n=Ar.length;tge(r)&&(h(e)._overflowDayOfYear=!0),n=be(r,0,e._dayOfYear),e._a[nr]=n.getUTCMonth(),e._a[ir]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=o[t]=i[t];for(;t<7;t++)e._a[t]=o[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[rr]&&0===e._a[or]&&0===e._a[sr]&&0===e._a[ar]&&(e._nextDay=!0,e._a[rr]=0),e._d=(e._useUTC?be:ye).apply(null,o),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[rr]=24)}}function ct(e){var t,n,i,r,o,s,a,l;if(t=e._w,null!=t.GG||null!=t.W||null!=t.E)o=1,s=4,n=st(t.GG,e._a[tr],ke(yt(),1,4).year),i=st(t.W,1),r=st(t.E,1),(r<1||r>7)&&(l=!0);else{o=e._locale._week.dow,s=e._locale._week.doy;var c=ke(yt(),o,s);n=st(t.gg,e._a[tr],c.year),i=st(t.w,c.week),null!=t.d?(r=t.d,(r<0||r>6)&&(l=!0)):null!=t.e?(r=t.e+o,(t.e<0||t.e>6)&&(l=!0)):r=o}i<1||i>Se(n,o,s)?h(e)._overflowWeeks=!0:null!=l?h(e)._overflowWeekday=!0:(a=xe(n,i,r,o,s),e._a[tr]=a.year,e._dayOfYear=a.dayOfYear)}function ut(t){if(t._f===e.ISO_8601)return void rt(t);t._a=[],h(t).empty=!0;var n,i,r,o,s,a=""+t._i,l=a.length,c=0;for(r=X(t._f,t._locale).match(Ni)||[],n=0;n0&&h(t).unusedInput.push(s),a=a.slice(a.indexOf(i)+i.length),c+=i.length),Ri[o]?(i?h(t).empty=!1:h(t).unusedTokens.push(o),ie(o,i,t)):t._strict&&!i&&h(t).unusedTokens.push(o);h(t).charsLeftOver=l-c,a.length>0&&h(t).unusedInput.push(a),t._a[rr]<=12&&h(t).bigHour===!0&&t._a[rr]>0&&(h(t).bigHour=void 0),h(t).parsedDateParts=t._a.slice(0),h(t).meridiem=t._meridiem,t._a[rr]=dt(t._locale,t._a[rr],t._meridiem),lt(t),it(t)}function dt(e,t,n){var i;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?(i=e.isPM(n),i&&t<12&&(t+=12),i||12!==t||(t=0),t):t}function ht(e){var t,n,i,r,o;if(0===e._f.length)return h(e).invalidFormat=!0,void(e._d=new Date(NaN));for(r=0;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function It(){if(!g(this._isDSTShifted))return this._isDSTShifted;var e={};if(m(e,this),e=gt(e),e._a){var t=e._isUTC?u(e._a):yt(e._a);this._isDSTShifted=this.isValid()&&x(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Ot(){return!!this.isValid()&&!this._isUTC}function Ft(){return!!this.isValid()&&this._isUTC}function Pt(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function Wt(e,t){var n,i,r,s=e,a=null;return St(e)?s={ms:e._milliseconds,d:e._days,M:e._months}:o(e)?(s={},t?s[t]=e:s.milliseconds=e):(a=Wr.exec(e))?(n="-"===a[1]?-1:1,s={y:0,d:w(a[ir])*n,h:w(a[rr])*n,m:w(a[or])*n,s:w(a[sr])*n,ms:w(Ct(1e3*a[ar]))*n}):(a=Br.exec(e))?(n="-"===a[1]?-1:1,s={y:Bt(a[2],n),M:Bt(a[3],n),w:Bt(a[4],n),d:Bt(a[5],n),h:Bt(a[6],n),m:Bt(a[7],n),s:Bt(a[8],n)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(r=Yt(yt(s.from),yt(s.to)),s={},s.ms=r.milliseconds,s.M=r.months),i=new kt(s),St(e)&&l(e,"_locale")&&(i._locale=e._locale),i}function Bt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function jt(e,t){var n={milliseconds:0,months:0};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Yt(e,t){var n;return e.isValid()&&t.isValid()?(t=_t(t,e),e.isBefore(t)?n=jt(e,t):(n=jt(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Ut(e,t){return function(n,i){var r,o;return null===i||isNaN(+i)||(C(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=n,n=i,i=o),n="string"==typeof n?+n:n,r=Wt(n,i),qt(this,r,e),this}}function qt(t,n,i,r){var o=n._milliseconds,s=Ct(n._days),a=Ct(n._months);t.isValid()&&(r=null==r||r,o&&t._d.setTime(t._d.valueOf()+o*i),s&&j(t,"Date",B(t,"Date")+s*i),a&&ce(t,B(t,"Month")+a*i),r&&e.updateOffset(t,s||a))}function Gt(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function Vt(t,n){var i=t||yt(),r=_t(i,this).startOf("day"),o=e.calendarFormat(this,r)||"sameElse",s=n&&(T(n[o])?n[o].call(this,i):n[o]);return this.format(s||this.localeData().calendar(o,this,yt(i)))}function $t(){return new v(this)}function Zt(e,t){var n=y(e)?e:yt(e);return!(!this.isValid()||!n.isValid())&&(t=I(g(t)?"millisecond":t),"millisecond"===t?this.valueOf()>n.valueOf():n.valueOf()o&&(t=o),Nn.call(this,e,t,n,i,r))}function Nn(e,t,n,i,r){var o=xe(e,t,n,i,r),s=be(o.year,0,o.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}function An(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}function zn(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}function Rn(e,t){t[ar]=w(1e3*("0."+e))}function In(){return this._isUTC?"UTC":""}function On(){return this._isUTC?"Coordinated Universal Time":""}function Fn(e){return yt(1e3*e)}function Pn(){return yt.apply(null,arguments).parseZone()}function Wn(e){return e}function Bn(e,t,n,i){var r=tt(),o=u().set(i,t);return r[n](o,e)}function jn(e,t,n){if(o(e)&&(t=e,e=void 0),e=e||"",null!=t)return Bn(e,t,n,"month");var i,r=[];for(i=0;i<12;i++)r[i]=Bn(e,i,n,"month");return r}function Yn(e,t,n,i){"boolean"==typeof e?(o(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,o(t)&&(n=t,t=void 0),t=t||"");var r=tt(),s=e?r._week.dow:0;if(null!=n)return Bn(t,(n+s)%7,i,"day");var a,l=[];for(a=0;a<7;a++)l[a]=Bn(t,(a+s)%7,i,"day");return l}function Un(e,t){return jn(e,t,"months")}function qn(e,t){return jn(e,t,"monthsShort")}function Gn(e,t,n){return Yn(e,t,n,"weekdays")}function Vn(e,t,n){return Yn(e,t,n,"weekdaysShort")}function $n(e,t,n){return Yn(e,t,n,"weekdaysMin")}function Zn(){var e=this._data;return this._milliseconds=Kr(this._milliseconds),this._days=Kr(this._days),this._months=Kr(this._months),e.milliseconds=Kr(e.milliseconds),e.seconds=Kr(e.seconds),e.minutes=Kr(e.minutes),e.hours=Kr(e.hours),e.months=Kr(e.months),e.years=Kr(e.years),this}function Xn(e,t,n,i){var r=Wt(t,n);return e._milliseconds+=i*r._milliseconds,e._days+=i*r._days,e._months+=i*r._months,e._bubble()}function Qn(e,t){return Xn(this,e,t,1)}function Kn(e,t){return Xn(this,e,t,-1)}function Jn(e){return e<0?Math.floor(e):Math.ceil(e)}function ei(){var e,t,n,i,r,o=this._milliseconds,s=this._days,a=this._months,l=this._data;return o>=0&&s>=0&&a>=0||o<=0&&s<=0&&a<=0||(o+=864e5*Jn(ni(a)+s),s=0,a=0),l.milliseconds=o%1e3,e=b(o/1e3),l.seconds=e%60,t=b(e/60),l.minutes=t%60,n=b(t/60),l.hours=n%24,s+=b(n/24),r=b(ti(s)),a+=r,s-=Jn(ni(r)),i=b(a/12),a%=12,l.days=s,l.months=a,l.years=i,this}function ti(e){return 4800*e/146097}function ni(e){return 146097*e/4800}function ii(e){var t,n,i=this._milliseconds;if(e=I(e),"month"===e||"year"===e)return t=this._days+i/864e5,n=this._months+ti(t),"month"===e?n:n/12;switch(t=this._days+Math.round(ni(this._months)),e){case"week":return t/7+i/6048e5;case"day":return t+i/864e5;case"hour":return 24*t+i/36e5;case"minute":return 1440*t+i/6e4;case"second":return 86400*t+i/1e3;case"millisecond":return Math.floor(864e5*t)+i;default:throw new Error("Unknown unit "+e)}}function ri(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*w(this._months/12)}function oi(e){return function(){return this.as(e)}}function si(e){return e=I(e),this[e+"s"]()}function ai(e){return function(){return this._data[e]}}function li(){return b(this.days()/7)}function ci(e,t,n,i,r){return r.relativeTime(t||1,!!n,e,i)}function ui(e,t,n){var i=Wt(e).abs(),r=go(i.as("s")),o=go(i.as("m")),s=go(i.as("h")),a=go(i.as("d")),l=go(i.as("M")),c=go(i.as("y")),u=r0,u[4]=n,ci.apply(null,u)}function di(e){return void 0===e?go:"function"==typeof e&&(go=e,!0)}function hi(e,t){return void 0!==mo[e]&&(void 0===t?mo[e]:(mo[e]=t,!0))}function fi(e){var t=this.localeData(),n=ui(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)}function pi(){var e,t,n,i=vo(this._milliseconds)/1e3,r=vo(this._days),o=vo(this._months);e=b(i/60),t=b(e/60),i%=60,e%=60,n=b(o/12),o%=12;var s=n,a=o,l=r,c=t,u=e,d=i,h=this.asSeconds();return h?(h<0?"-":"")+"P"+(s?s+"Y":"")+(a?a+"M":"")+(l?l+"D":"")+(c||u||d?"T":"")+(c?c+"H":"")+(u?u+"M":"")+(d?d+"S":""):"P0D"}var gi,mi;mi=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,i=0;i68?1900:2e3)};var mr=W("FullYear",!0);G("w",["ww",2],"wo","week"),G("W",["WW",2],"Wo","isoWeek"),R("week","w"),R("isoWeek","W"),F("week",5),F("isoWeek",5),Q("w",Bi),Q("ww",Bi,Oi),Q("W",Bi),Q("WW",Bi,Oi),ne(["w","ww","W","WW"],function(e,t,n,i){t[i.substr(0,1)]=w(e)});var vr={dow:0,doy:6};G("d",0,"do","day"),G("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),G("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),G("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),G("e",0,0,"weekday"),G("E",0,0,"isoWeekday"),R("day","d"),R("weekday","e"),R("isoWeekday","E"),F("day",11),F("weekday",11),F("isoWeekday",11),Q("d",Bi),Q("e",Bi),Q("E",Bi),Q("dd",function(e,t){return t.weekdaysMinRegex(e)}),Q("ddd",function(e,t){return t.weekdaysShortRegex(e)}),Q("dddd",function(e,t){return t.weekdaysRegex(e)}),ne(["dd","ddd","dddd"],function(e,t,n,i){var r=n._locale.weekdaysParse(e,i,n._strict);null!=r?t.d=r:h(n).invalidWeekday=e}),ne(["d","e","E"],function(e,t,n,i){t[i]=w(e)});var yr="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),br="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),wr="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),xr=Ki,kr=Ki,Sr=Ki;G("H",["HH",2],0,"hour"),G("h",["hh",2],0,Ye),G("k",["kk",2],0,Ue),G("hmm",0,0,function(){return""+Ye.apply(this)+q(this.minutes(),2)}),G("hmmss",0,0,function(){return""+Ye.apply(this)+q(this.minutes(),2)+q(this.seconds(),2)}),G("Hmm",0,0,function(){return""+this.hours()+q(this.minutes(),2)}),G("Hmmss",0,0,function(){return""+this.hours()+q(this.minutes(),2)+q(this.seconds(),2)}),qe("a",!0),qe("A",!1),R("hour","h"),F("hour",13),Q("a",Ge),Q("A",Ge),Q("H",Bi),Q("h",Bi),Q("HH",Bi,Oi),Q("hh",Bi,Oi),Q("hmm",ji),Q("hmmss",Yi),Q("Hmm",ji),Q("Hmmss",Yi),te(["H","HH"],rr),te(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),te(["h","hh"],function(e,t,n){t[rr]=w(e),h(n).bigHour=!0}),te("hmm",function(e,t,n){var i=e.length-2;t[rr]=w(e.substr(0,i)),t[or]=w(e.substr(i)),h(n).bigHour=!0}),te("hmmss",function(e,t,n){var i=e.length-4,r=e.length-2;t[rr]=w(e.substr(0,i)),t[or]=w(e.substr(i,2)), -t[sr]=w(e.substr(r)),h(n).bigHour=!0}),te("Hmm",function(e,t,n){var i=e.length-2;t[rr]=w(e.substr(0,i)),t[or]=w(e.substr(i))}),te("Hmmss",function(e,t,n){var i=e.length-4,r=e.length-2;t[rr]=w(e.substr(0,i)),t[or]=w(e.substr(i,2)),t[sr]=w(e.substr(r))});var Cr,Tr=/[ap]\.?m?\.?/i,Er=W("Hours",!0),_r={calendar:Ci,longDateFormat:Ti,invalidDate:Ei,ordinal:_i,ordinalParse:Li,relativeTime:Di,months:hr,monthsShort:fr,week:vr,weekdays:yr,weekdaysMin:wr,weekdaysShort:br,meridiemParse:Tr},Lr={},Dr={},Mr=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Hr=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Nr=/Z|[+-]\d\d(?::?\d\d)?/,Ar=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],zr=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Rr=/^\/?Date\((\-?\d+)/i;e.createFromInputFallback=S("value provided is not in a recognized ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),e.ISO_8601=function(){};var Ir=S("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=yt.apply(null,arguments);return this.isValid()&&e.isValid()?ethis?this:e:p()}),Fr=function(){return Date.now?Date.now():+new Date};Tt("Z",":"),Tt("ZZ",""),Q("Z",Xi),Q("ZZ",Xi),te(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Et(Xi,e)});var Pr=/([\+\-]|\d\d)/gi;e.updateOffset=function(){};var Wr=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Br=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;Wt.fn=kt.prototype;var jr=Ut(1,"add"),Yr=Ut(-1,"subtract");e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",e.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Ur=S("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});G(0,["gg",2],0,function(){return this.weekYear()%100}),G(0,["GG",2],0,function(){return this.isoWeekYear()%100}),En("gggg","weekYear"),En("ggggg","weekYear"),En("GGGG","isoWeekYear"),En("GGGGG","isoWeekYear"),R("weekYear","gg"),R("isoWeekYear","GG"),F("weekYear",1),F("isoWeekYear",1),Q("G",$i),Q("g",$i),Q("GG",Bi,Oi),Q("gg",Bi,Oi),Q("GGGG",qi,Pi),Q("gggg",qi,Pi),Q("GGGGG",Gi,Wi),Q("ggggg",Gi,Wi),ne(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,i){t[i.substr(0,2)]=w(e)}),ne(["gg","GG"],function(t,n,i,r){n[r]=e.parseTwoDigitYear(t)}),G("Q",0,"Qo","quarter"),R("quarter","Q"),F("quarter",7),Q("Q",Ii),te("Q",function(e,t){t[nr]=3*(w(e)-1)}),G("D",["DD",2],"Do","date"),R("date","D"),F("date",9),Q("D",Bi),Q("DD",Bi,Oi),Q("Do",function(e,t){return e?t._ordinalParse:t._ordinalParseLenient}),te(["D","DD"],ir),te("Do",function(e,t){t[ir]=w(e.match(Bi)[0],10)});var qr=W("Date",!0);G("DDD",["DDDD",3],"DDDo","dayOfYear"),R("dayOfYear","DDD"),F("dayOfYear",4),Q("DDD",Ui),Q("DDDD",Fi),te(["DDD","DDDD"],function(e,t,n){n._dayOfYear=w(e)}),G("m",["mm",2],0,"minute"),R("minute","m"),F("minute",14),Q("m",Bi),Q("mm",Bi,Oi),te(["m","mm"],or);var Gr=W("Minutes",!1);G("s",["ss",2],0,"second"),R("second","s"),F("second",15),Q("s",Bi),Q("ss",Bi,Oi),te(["s","ss"],sr);var Vr=W("Seconds",!1);G("S",0,0,function(){return~~(this.millisecond()/100)}),G(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),G(0,["SSS",3],0,"millisecond"),G(0,["SSSS",4],0,function(){return 10*this.millisecond()}),G(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),G(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),G(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),G(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),G(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),R("millisecond","ms"),F("millisecond",16),Q("S",Ui,Ii),Q("SS",Ui,Oi),Q("SSS",Ui,Fi);var $r;for($r="SSSS";$r.length<=9;$r+="S")Q($r,Vi);for($r="S";$r.length<=9;$r+="S")te($r,Rn);var Zr=W("Milliseconds",!1);G("z",0,0,"zoneAbbr"),G("zz",0,0,"zoneName");var Xr=v.prototype;Xr.add=jr,Xr.calendar=Vt,Xr.clone=$t,Xr.diff=tn,Xr.endOf=gn,Xr.format=an,Xr.from=ln,Xr.fromNow=cn,Xr.to=un,Xr.toNow=dn,Xr.get=Y,Xr.invalidAt=Cn,Xr.isAfter=Zt,Xr.isBefore=Xt,Xr.isBetween=Qt,Xr.isSame=Kt,Xr.isSameOrAfter=Jt,Xr.isSameOrBefore=en,Xr.isValid=kn,Xr.lang=Ur,Xr.locale=hn,Xr.localeData=fn,Xr.max=Or,Xr.min=Ir,Xr.parsingFlags=Sn,Xr.set=U,Xr.startOf=pn,Xr.subtract=Yr,Xr.toArray=bn,Xr.toObject=wn,Xr.toDate=yn,Xr.toISOString=on,Xr.inspect=sn,Xr.toJSON=xn,Xr.toString=rn,Xr.unix=vn,Xr.valueOf=mn,Xr.creationData=Tn,Xr.year=mr,Xr.isLeapYear=ve,Xr.weekYear=_n,Xr.isoWeekYear=Ln,Xr.quarter=Xr.quarters=An,Xr.month=ue,Xr.daysInMonth=de,Xr.week=Xr.weeks=_e,Xr.isoWeek=Xr.isoWeeks=Le,Xr.weeksInYear=Mn,Xr.isoWeeksInYear=Dn,Xr.date=qr,Xr.day=Xr.days=Ie,Xr.weekday=Oe,Xr.isoWeekday=Fe,Xr.dayOfYear=zn,Xr.hour=Xr.hours=Er,Xr.minute=Xr.minutes=Gr,Xr.second=Xr.seconds=Vr,Xr.millisecond=Xr.milliseconds=Zr,Xr.utcOffset=Dt,Xr.utc=Ht,Xr.local=Nt,Xr.parseZone=At,Xr.hasAlignedHourOffset=zt,Xr.isDST=Rt,Xr.isLocal=Ot,Xr.isUtcOffset=Ft,Xr.isUtc=Pt,Xr.isUTC=Pt,Xr.zoneAbbr=In,Xr.zoneName=On,Xr.dates=S("dates accessor is deprecated. Use date instead.",qr),Xr.months=S("months accessor is deprecated. Use month instead",ue),Xr.years=S("years accessor is deprecated. Use year instead",mr),Xr.zone=S("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Mt),Xr.isDSTShifted=S("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",It);var Qr=L.prototype;Qr.calendar=D,Qr.longDateFormat=M,Qr.invalidDate=H,Qr.ordinal=N,Qr.preparse=Wn,Qr.postformat=Wn,Qr.relativeTime=A,Qr.pastFuture=z,Qr.set=E,Qr.months=oe,Qr.monthsShort=se,Qr.monthsParse=le,Qr.monthsRegex=fe,Qr.monthsShortRegex=he,Qr.week=Ce,Qr.firstDayOfYear=Ee,Qr.firstDayOfWeek=Te,Qr.weekdays=He,Qr.weekdaysMin=Ae,Qr.weekdaysShort=Ne,Qr.weekdaysParse=Re,Qr.weekdaysRegex=Pe,Qr.weekdaysShortRegex=We,Qr.weekdaysMinRegex=Be,Qr.isPM=Ve,Qr.meridiem=$e,Ke("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=1===w(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n}}),e.lang=S("moment.lang is deprecated. Use moment.locale instead.",Ke),e.langData=S("moment.langData is deprecated. Use moment.localeData instead.",tt);var Kr=Math.abs,Jr=oi("ms"),eo=oi("s"),to=oi("m"),no=oi("h"),io=oi("d"),ro=oi("w"),oo=oi("M"),so=oi("y"),ao=ai("milliseconds"),lo=ai("seconds"),co=ai("minutes"),uo=ai("hours"),ho=ai("days"),fo=ai("months"),po=ai("years"),go=Math.round,mo={s:45,m:45,h:22,d:26,M:11},vo=Math.abs,yo=kt.prototype;return yo.abs=Zn,yo.add=Qn,yo.subtract=Kn,yo.as=ii,yo.asMilliseconds=Jr,yo.asSeconds=eo,yo.asMinutes=to,yo.asHours=no,yo.asDays=io,yo.asWeeks=ro,yo.asMonths=oo,yo.asYears=so,yo.valueOf=ri,yo._bubble=ei,yo.get=si,yo.milliseconds=ao,yo.seconds=lo,yo.minutes=co,yo.hours=uo,yo.days=ho,yo.weeks=li,yo.months=fo,yo.years=po,yo.humanize=fi,yo.toISOString=pi,yo.toString=pi,yo.toJSON=pi,yo.locale=hn,yo.localeData=fn,yo.toIsoString=S("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",pi),yo.lang=Ur,G("X",0,0,"unix"),G("x",0,0,"valueOf"),Q("x",$i),Q("X",Qi),te("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),te("x",function(e,t,n){n._d=new Date(w(e))}),e.version="2.17.1",t(yt),e.fn=Xr,e.min=wt,e.max=xt,e.now=Fr,e.utc=u,e.unix=Fn,e.months=Un,e.isDate=s,e.locale=Ke,e.invalid=p,e.duration=Wt,e.isMoment=y,e.weekdays=Gn,e.parseZone=Pn,e.localeData=tt,e.isDuration=St,e.monthsShort=qn,e.weekdaysMin=$n,e.defineLocale=Je,e.updateLocale=et,e.locales=nt,e.weekdaysShort=Vn,e.normalizeUnits=I,e.relativeTimeRounding=di,e.relativeTimeThreshold=hi,e.calendarFormat=Gt,e.prototype=Xr,e}),!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define("color-hash/dist/color-hash",[],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.ColorHash=e()}}(function(){return function e(t,n,i){function r(s,a){if(!n[s]){if(!t[s]){var l="function"==typeof require&&require;if(!a&&l)return l(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[s]={exports:{}};t[s][0].call(u.exports,function(e){var n=t[s][1][e];return r(n?n:e)},u,u.exports,e,t,n,i)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;sr&&(i=parseInt(i/n)),i=i*t+e.charCodeAt(o);return i};t.exports=i},{}],2:[function(e,t,n){var i=e("./bkdr-hash"),r=function(e){var t="#";return e.forEach(function(e){e<16&&(t+=0),t+=e.toString(16)}),t},o=function(e,t,n){e/=360;var i=n<.5?n*(1+t):n+t-n*t,r=2*n-i;return[e+1/3,e,e-1/3].map(function(e){return e<0&&e++,e>1&&e--,e=e<1/6?r+6*(i-r)*e:e<.5?i:e<2/3?r+6*(i-r)*(2/3-e):r,Math.round(255*e)})},s=function(e){e=e||{};var t=[e.lightness,e.saturation].map(function(e){return e=e||[.35,.5,.65],"[object Array]"===Object.prototype.toString.call(e)?e.concat():[e]});this.L=t[0],this.S=t[1],this.hash=e.hash||i};s.prototype.hsl=function(e){var t,n,i,r=this.hash(e);return t=r%359,r=parseInt(r/360),n=this.S[r%this.S.length],r=parseInt(r/this.S.length),i=this.L[r%this.L.length],[t,n,i]},s.prototype.rgb=function(e){var t=this.hsl(e);return o.apply(this,t)},s.prototype.hex=function(e){var t=this.rgb(e);return r(t)},t.exports=s},{"./bkdr-hash":1}]},{},[2])(2)}),define("color-hash",["color-hash/dist/color-hash"],function(e){return e}),function(e,t){"use strict";"function"==typeof define&&define.amd?define("push/push.min",[],function(){return new(t(e,e.document))}):"undefined"!=typeof module&&module.exports?module.exports=new(t(e,e.document)):e.Push=new(t(e,e.document))}("undefined"!=typeof window?window:this,function(e,t){var n=function(){var t=this,n=function(e){return void 0===e},i=function(e){return String(e)===e},r=function(e){return e&&"[object Function]"==={}.toString.call(e)},o=0,s="PushError: push.js is incompatible with browser.",a=!1,l={},c=function(t){var n=!1,i=l[t];if("undefined"!=typeof i){if(i.close)i.close();else if(i.cancel)i.cancel();else{if(!e.external||!e.external.msIsSiteMode)throw n=!0,new Error("Unable to close notification: unknown interface");e.external.msSiteModeClearIconOverlay()}if(!n)return d(t)}return!1},u=function(e){var t=o;return l[t]=e,o++,t},d=function(e){var t,n={},i=!1;for(t in l)l.hasOwnProperty(t)&&(t!=e?n[t]=l[t]:i=!0);return l=n,i},h=function(o,s){var a,l,h,f;if(s=s||{},t.lastWorkerPath=s.serviceWorker||"sw.js",e.Notification)try{a=new e.Notification(o,{icon:i(s.icon)||n(s.icon)?s.icon:s.icon.x32,body:s.body,tag:s.tag,requireInteraction:s.requireInteraction})}catch(t){e.navigator&&(e.navigator.serviceWorker.register(s.serviceWorker||"sw.js"),e.navigator.serviceWorker.ready.then(function(e){e.showNotification(o,{body:s.body,vibrate:s.vibrate,tag:s.tag,requireInteraction:s.requireInteraction})}))}else if(e.webkitNotifications)a=e.webkitNotifications.createNotification(s.icon,o,s.body),a.show();else if(navigator.mozNotification)a=navigator.mozNotification.createNotification(o,s.body,s.icon),a.show();else{if(!e.external||!e.external.msIsSiteMode())throw new Error("Unable to create notification: unknown interface");e.external.msSiteModeClearIconOverlay(),e.external.msSiteModeSetIconOverlay(i(s.icon)||n(s.icon)?s.icon:s.icon.x16,o),e.external.msSiteModeActivate(),a={}}return h=u(a),l={get:function(){return a},close:function(){c(h)}},s.timeout&&setTimeout(function(){l.close()},s.timeout),r(s.onShow)&&a.addEventListener("show",s.onShow),r(s.onError)&&a.addEventListener("error",s.onError),r(s.onClick)&&a.addEventListener("click",s.onClick),f=function(){d(h),r(s.onClose)&&s.onClose.call(this)},a.addEventListener("close",f),a.addEventListener("cancel",f),l},f={DEFAULT:"default",GRANTED:"granted",DENIED:"denied"},p=[f.GRANTED,f.DEFAULT,f.DENIED];t.Permission=f,t.Permission.request=function(n,i){if(!t.isSupported)throw new Error(s);if(callback=function(e){switch(e){case t.Permission.GRANTED:a=!0,n&&n();break;case t.Permission.DENIED:a=!1,i&&i()}},e.Notification&&e.Notification.requestPermission)Notification.requestPermission(callback);else{if(!e.webkitNotifications||!e.webkitNotifications.checkPermission)throw new Error(s);e.webkitNotifications.requestPermission(callback)}},t.Permission.has=function(){return a},t.Permission.get=function(){var n;if(!t.isSupported)throw new Error(s);if(e.Notification&&e.Notification.permissionLevel)n=e.Notification.permissionLevel;else if(e.webkitNotifications&&e.webkitNotifications.checkPermission)n=p[e.webkitNotifications.checkPermission()];else if(e.Notification&&e.Notification.permission)n=e.Notification.permission;else if(navigator.mozNotification)n=p.GRANTED;else{if(!e.external||void 0===e.external.msIsSiteMode())throw new Error(s);n=e.external.msIsSiteMode()?f.GRANTED:f.DEFAULT}return n},t.isSupported=function(){var t=!1;try{t=!!(e.Notification||e.webkitNotifications||navigator.mozNotification||e.external&&void 0!==e.external.msIsSiteMode())}catch(e){}return t}(),t.create=function(e,n){if(!t.isSupported)throw new Error(s);if(!i(e))throw new Error("PushError: Title of notification must be a string");return t.Permission.has()?new Promise(function(t,i){try{t(h(e,n))}catch(e){i(e)}}):new Promise(function(i,r){t.Permission.request(function(){try{i(h(e,n))}catch(e){r(e)}},function(){r("Permission request declined")})})},t.count=function(){var e,t=0;for(e in l)t++;return t},t.__lastWorkerPath=function(){return t.lastWorkerPath},t.close=function(e){var t;for(t in l)if(notification=l[t],notification.tag===e)return c(t)},t.clear=function(){var e=!0;for(key in l){var t=c(key);e=e&&t}return e}};return n}),define("push",["push/push.min"],function(e){return e}),!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define("clipboard/dist/clipboard.min",[],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.Clipboard=e()}}(function(){var e;return function e(t,n,i){function r(s,a){if(!n[s]){if(!t[s]){var l="function"==typeof require&&require;if(!a&&l)return l(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[s]={exports:{}};t[s][0].call(u.exports,function(e){var n=t[s][1][e];return r(n?n:e)},u,u.exports,e,t,n,i)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;s0&&void 0!==arguments[0]?arguments[0]:{};this.action=e.action,this.emitter=e.emitter,this.target=e.target,this.text=e.text,this.trigger=e.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var e=this,t="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return e.removeFake()},this.fakeHandler=document.body.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[t?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.addEventListener("focus",window.scrollTo(0,n)),this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,document.body.appendChild(this.fakeElem),this.selectedText=(0,r.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(document.body.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(document.body.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,r.default)(this.target),this.copyText()}},{key:"copyText",value:function(){var e=void 0;try{e=document.execCommand(this.action)}catch(t){e=!1}this.handleResult(e)}},{key:"handleResult",value:function(e){this.emitter.emit(e?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.target&&this.target.blur(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=e,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(e){if(void 0!==e){if(!e||"object"!==("undefined"==typeof e?"undefined":o(e))||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=e}},get:function(){return this._target}}]),e}();e.exports=a})},{select:5}],8:[function(t,n,i){!function(r,o){if("function"==typeof e&&e.amd)e(["module","./clipboard-action","tiny-emitter","good-listener"],o);else if("undefined"!=typeof i)o(n,t("./clipboard-action"),t("tiny-emitter"),t("good-listener"));else{var s={exports:{}};o(s,r.clipboardAction,r.tinyEmitter,r.goodListener),r.clipboard=s.exports}}(this,function(e,t,n,i){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e,t){var n="data-clipboard-"+e;if(t.hasAttribute(n))return t.getAttribute(n)}var c=r(t),u=r(n),d=r(i),h=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText}},{key:"listenClick",value:function(e){var t=this;this.listener=(0,d.default)(e,"click",function(e){return t.onClick(e)})}},{key:"onClick",value:function(e){var t=e.delegateTarget||e.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new c.default({action:this.action(t),target:this.target(t),text:this.text(t),trigger:t,emitter:this})}},{key:"defaultAction",value:function(e){return l("action",e)}},{key:"defaultTarget",value:function(e){var t=l("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return l("text",e)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}]),t}(u.default);e.exports=f})},{"./clipboard-action":7,"good-listener":4,"tiny-emitter":6}]},{},[8])(8)}),define("clipboard",["clipboard/dist/clipboard.min"],function(e){return e}),!function(e,t){"object"==typeof module&&module.exports?module.exports=t(e):e.timeago=t(e)}("undefined"!=typeof window?window:this,function(){function e(e){return e instanceof Date?e:isNaN(e)?/^\d+$/.test(e)?new Date(t(e)):(e=(e||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/T/," ").replace(/Z/," UTC").replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2"),new Date(e)):new Date(t(e))}function t(e){return parseInt(e)}function n(e,n,i){n=d[n]?n:d[i]?i:"en";var r=0,o=e<0?1:0;for(e=Math.abs(e);e>=h[r]&&r(0===r?9:1)&&(r+=1),d[n](e,r)[o].replace("%s",e)}function i(t,n){return n=n?e(n):new Date,(n-e(t))/1e3}function r(e){for(var t=1,n=0,i=Math.abs(e);e>=h[n]&&n1&&(n+="s"),[e+" "+n+" ago","in "+e+" "+n]},zh_CN:function(e,t){if(0===t)return["刚刚","片刻后"];var n=u[parseInt(t/2)];return[e+n+"前",e+n+"后"]}},h=[60,60,24,7,365/7/12,12],f=6,p="datetime";return a.register=function(e,t){d[e]=t},a}),define("timeago/dist/timeago.min",[],function(){}),define("timeago",["timeago/dist/timeago.min"],function(e){return e}),define("dropzone/dist/dropzone",["require","exports","module"],function(e,t,n){(function(){var e,t,i,r,o,s,a,l,c=[].slice,u={}.hasOwnProperty,d=function(e,t){function n(){this.constructor=e}for(var i in t)u.call(t,i)&&(e[i]=t[i]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e};a=function(){},t=function(){function e(){}return e.prototype.addEventListener=e.prototype.on,e.prototype.on=function(e,t){return this._callbacks=this._callbacks||{},this._callbacks[e]||(this._callbacks[e]=[]),this._callbacks[e].push(t),this},e.prototype.emit=function(){var e,t,n,i,r,o;if(i=arguments[0],e=2<=arguments.length?c.call(arguments,1):[],this._callbacks=this._callbacks||{},n=this._callbacks[i])for(r=0,o=n.length;r
    '),this.element.appendChild(t)), -i=t.getElementsByTagName("span")[0],i&&(null!=i.textContent?i.textContent=this.options.dictFallbackMessage:null!=i.innerText&&(i.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(e){var t,n,i;return t={srcX:0,srcY:0,srcWidth:e.width,srcHeight:e.height},n=e.width/e.height,t.optWidth=this.options.thumbnailWidth,t.optHeight=this.options.thumbnailHeight,null==t.optWidth&&null==t.optHeight?(t.optWidth=t.srcWidth,t.optHeight=t.srcHeight):null==t.optWidth?t.optWidth=n*t.optHeight:null==t.optHeight&&(t.optHeight=1/n*t.optWidth),i=t.optWidth/t.optHeight,e.heighti?(t.srcHeight=e.height,t.srcWidth=t.srcHeight*i):(t.srcWidth=e.width,t.srcHeight=t.srcWidth/i),t.srcX=(e.width-t.srcWidth)/2,t.srcY=(e.height-t.srcHeight)/2,t},drop:function(e){return this.element.classList.remove("dz-drag-hover")},dragstart:a,dragend:function(e){return this.element.classList.remove("dz-drag-hover")},dragenter:function(e){return this.element.classList.add("dz-drag-hover")},dragover:function(e){return this.element.classList.add("dz-drag-hover")},dragleave:function(e){return this.element.classList.remove("dz-drag-hover")},paste:a,reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(e){var t,i,r,o,s,a,l,c,u,d,h,f,p;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){for(e.previewElement=n.createElement(this.options.previewTemplate.trim()),e.previewTemplate=e.previewElement,this.previewsContainer.appendChild(e.previewElement),d=e.previewElement.querySelectorAll("[data-dz-name]"),o=0,l=d.length;o'+this.options.dictRemoveFile+""),e.previewElement.appendChild(e._removeLink)),i=function(t){return function(i){return i.preventDefault(),i.stopPropagation(),e.status===n.UPLOADING?n.confirm(t.options.dictCancelUploadConfirmation,function(){return t.removeFile(e)}):t.options.dictRemoveFileConfirmation?n.confirm(t.options.dictRemoveFileConfirmation,function(){return t.removeFile(e)}):t.removeFile(e)}}(this),f=e.previewElement.querySelectorAll("[data-dz-remove]"),p=[],a=0,u=f.length;a\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n Check\n \n \n \n \n \n
    \n
    \n \n Error\n \n \n \n \n \n \n \n
    \n
    '},i=function(){var e,t,n,i,r,o,s;for(i=arguments[0],n=2<=arguments.length?c.call(arguments,1):[],o=0,s=n.length;o'+this.options.dictDefaultMessage+"
    ")),this.clickableElements.length&&(i=function(e){return function(){return e.hiddenFileInput&&e.hiddenFileInput.parentNode.removeChild(e.hiddenFileInput),e.hiddenFileInput=document.createElement("input"),e.hiddenFileInput.setAttribute("type","file"),(null==e.options.maxFiles||e.options.maxFiles>1)&&e.hiddenFileInput.setAttribute("multiple","multiple"),e.hiddenFileInput.className="dz-hidden-input",null!=e.options.acceptedFiles&&e.hiddenFileInput.setAttribute("accept",e.options.acceptedFiles),null!=e.options.capture&&e.hiddenFileInput.setAttribute("capture",e.options.capture),e.hiddenFileInput.style.visibility="hidden",e.hiddenFileInput.style.position="absolute",e.hiddenFileInput.style.top="0",e.hiddenFileInput.style.left="0",e.hiddenFileInput.style.height="0",e.hiddenFileInput.style.width="0",document.querySelector(e.options.hiddenInputContainer).appendChild(e.hiddenFileInput),e.hiddenFileInput.addEventListener("change",function(){var t,n,r,o;if(n=e.hiddenFileInput.files,n.length)for(r=0,o=n.length;r',this.options.dictFallbackText&&(i+="

    "+this.options.dictFallbackText+"

    "),i+='
    ',t=n.createElement(i),"FORM"!==this.element.tagName?(r=n.createElement('
    '),r.appendChild(t)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=r?r:t)},n.prototype.getExistingFallback=function(){var e,t,n,i,r,o;for(t=function(e){var t,n,i;for(n=0,i=e.length;n0){for(s=["TB","GB","MB","KB","b"],n=a=0,l=s.length;a=t){i=e/Math.pow(this.options.filesizeBase,4-n),r=o;break}i=Math.round(10*i)/10}return""+i+" "+r},n.prototype._updateMaxFilesReachedClass=function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")},n.prototype.drop=function(e){var t,n;e.dataTransfer&&(this.emit("drop",e),t=e.dataTransfer.files,this.emit("addedfiles",t),t.length&&(n=e.dataTransfer.items,n&&n.length&&null!=n[0].webkitGetAsEntry?this._addFilesFromItems(n):this.handleFiles(t)))},n.prototype.paste=function(e){var t,n;if(null!=(null!=e&&null!=(n=e.clipboardData)?n.items:void 0))return this.emit("paste",e),t=e.clipboardData.items,t.length?this._addFilesFromItems(t):void 0},n.prototype.handleFiles=function(e){var t,n,i,r;for(r=[],n=0,i=e.length;n0){for(o=0,s=n.length;o1024*this.options.maxFilesize*1024?t(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(e.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):n.isValidFile(e,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(t(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",e)):this.options.accept.call(this,e,t):t(this.options.dictInvalidFileType)},n.prototype.addFile=function(e){return e.upload={progress:0,total:e.size,bytesSent:0},this.files.push(e),e.status=n.ADDED,this.emit("addedfile",e),this._enqueueThumbnail(e),this.accept(e,function(t){return function(n){return n?(e.accepted=!1,t._errorProcessing([e],n)):(e.accepted=!0,t.options.autoQueue&&t.enqueueFile(e)),t._updateMaxFilesReachedClass()}}(this))},n.prototype.enqueueFiles=function(e){var t,n,i;for(n=0,i=e.length;n=t)&&(i=this.getQueuedFiles(),i.length>0)){if(this.options.uploadMultiple)return this.processFiles(i.slice(0,t-n));for(;e=O;u=0<=O?++H:--H)o.append(this._getParamName(u),e[u],this._renameFilename(e[u].name));return this.submitRequest(k,o,e)},n.prototype.submitRequest=function(e,t,n){return e.send(t)},n.prototype._finished=function(e,t,i){var r,o,s;for(o=0,s=e.length;ou;)t=r[4*(l-1)+3],0===t?o=l:u=l,l=o+u>>1;return c=l/s,0===c?1:c},s=function(e,t,n,i,r,s,a,l,c,u){var d;return d=o(t),e.drawImage(t,n,i,r,s,a,l,c,u/d)},r=function(e,t){var n,i,r,o,s,a,l,c,u;if(r=!1,u=!0,i=e.document,c=i.documentElement,n=i.addEventListener?"addEventListener":"attachEvent",l=i.addEventListener?"removeEventListener":"detachEvent",a=i.addEventListener?"":"on",o=function(n){if("readystatechange"!==n.type||"complete"===i.readyState)return("load"===n.type?e:i)[l](a+n.type,o,!1),!r&&(r=!0)?t.call(e,n.type||n):void 0},s=function(){var e;try{c.doScroll("left")}catch(t){return e=t,void setTimeout(s,50)}return o("poll")},"complete"!==i.readyState){if(i.createEventObject&&c.doScroll){try{u=!e.frameElement}catch(e){}u&&s()}return i[n](a+"DOMContentLoaded",o,!1),i[n](a+"readystatechange",o,!1),e[n](a+"load",o,!1)}},e._autoDiscoverFunction=function(){if(e.autoDiscover)return e.discover()},r(window,e._autoDiscoverFunction)}).call(this)}),define("dropzone",["dropzone/dist/dropzone"],function(e){return e}),define("text!dropzone/dist/basic.css",["module"],function(e){e.exports="/*\n * The MIT License\n * Copyright (c) 2012 Matias Meno \n */\n.dropzone, .dropzone * {\n box-sizing: border-box; }\n\n.dropzone {\n position: relative; }\n .dropzone .dz-preview {\n position: relative;\n display: inline-block;\n width: 120px;\n margin: 0.5em; }\n .dropzone .dz-preview .dz-progress {\n display: block;\n height: 15px;\n border: 1px solid #aaa; }\n .dropzone .dz-preview .dz-progress .dz-upload {\n display: block;\n height: 100%;\n width: 0;\n background: green; }\n .dropzone .dz-preview .dz-error-message {\n color: red;\n display: none; }\n .dropzone .dz-preview.dz-error .dz-error-message, .dropzone .dz-preview.dz-error .dz-error-mark {\n display: block; }\n .dropzone .dz-preview.dz-success .dz-success-mark {\n display: block; }\n .dropzone .dz-preview .dz-error-mark, .dropzone .dz-preview .dz-success-mark {\n position: absolute;\n display: none;\n left: 30px;\n top: 30px;\n width: 54px;\n height: 58px;\n left: 50%;\n margin-left: -27px; }\n"}),!function(e,t,n,i){n.swipebox=function(r,o){var s,a,l={useCSS:!0,useSVG:!0,initialIndexOnArray:0,removeBarsOnMobile:!0,hideCloseButtonOnMobile:!1,hideBarsDelay:3e3,videoMaxWidth:1140,vimeoColor:"cccccc",beforeOpen:null,afterOpen:null,afterClose:null,afterMedia:null,nextSlide:null,prevSlide:null,loopAtEnd:!1,autoplayVideos:!1,queryStringData:{},toggleClassOnLoad:""},c=this,u=[],d=r.selector,h=navigator.userAgent.match(/(iPad)|(iPhone)|(iPod)|(Android)|(PlayBook)|(BB10)|(BlackBerry)|(Opera Mini)|(IEMobile)|(webOS)|(MeeGo)/i),f=null!==h||t.createTouch!==i||"ontouchstart"in e||"onmsgesturechange"in e||navigator.msMaxTouchPoints,p=!!t.createElementNS&&!!t.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,g=e.innerWidth?e.innerWidth:n(e).width(),m=e.innerHeight?e.innerHeight:n(e).height(),v=0,y='
    \t\t\t\t\t
    \t\t\t\t\t\t
    \t\t\t\t\t\t
    \t\t\t\t\t\t\t
    \t\t\t\t\t\t
    \t\t\t\t\t\t
    \t\t\t\t\t\t\t
    \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
    \t\t\t\t\t\t
    \t\t\t\t\t\t\t\t\t\t\t
    \t\t\t
    ';c.settings={},n.swipebox.close=function(){s.closeSlide()},n.swipebox.destroy=function(){n(t).off("click.swipebox")},n.swipebox.extend=function(){return s},c.init=function(){c.settings=n.extend({},l,o),n.isArray(r)?(u=r,s.target=n(e),s.init(c.settings.initialIndexOnArray)):n(t).on("click.swipebox",d,function(e){if("slide current"===e.target.parentNode.className)return!1;n.isArray(r)||(s.destroy(),a=n(d),s.actions()),u=[];var t,i,o;o||(i="data-rel",o=n(this).attr(i)),o||(i="rel",o=n(this).attr(i)),a=o&&""!==o&&"nofollow"!==o?n(d).filter("["+i+'="'+o+'"]'):n(d),a.each(function(){var e=null,t=null;n(this).attr("title")&&(e=n(this).attr("title")),n(this).attr("href")&&(t=n(this).attr("href")), -u.push({href:t,title:e})}),t=a.index(n(this)),e.preventDefault(),e.stopPropagation(),s.target=n(e.target),s.init(t)})},s={init:function(e){c.settings.beforeOpen&&c.settings.beforeOpen(),this.target.trigger("swipebox-start"),n.swipebox.isOpen=!0,this.build(),this.openSlide(e),this.openMedia(e),this.preloadMedia(e+1),this.preloadMedia(e-1),c.settings.afterOpen&&c.settings.afterOpen(e)},build:function(){var e,t=this;n("body").append(y),p&&c.settings.useSVG===!0&&(e=n("#swipebox-close").css("background-image"),e=e.replace("png","svg"),n("#swipebox-prev, #swipebox-next, #swipebox-close").css({"background-image":e})),h&&c.settings.removeBarsOnMobile&&n("#swipebox-bottom-bar, #swipebox-top-bar").remove(),n.each(u,function(){n("#swipebox-slider").append('
    ')}),t.setDim(),t.actions(),f&&t.gesture(),t.keyboard(),t.animBars(),t.resize()},setDim:function(){var t,i,r={};"onorientationchange"in e?e.addEventListener("orientationchange",function(){0===e.orientation?(t=g,i=m):90!==e.orientation&&-90!==e.orientation||(t=m,i=g)},!1):(t=e.innerWidth?e.innerWidth:n(e).width(),i=e.innerHeight?e.innerHeight:n(e).height()),r={width:t,height:i},n("#swipebox-overlay").css(r)},resize:function(){var t=this;n(e).resize(function(){t.setDim()}).resize()},supportTransition:function(){var e,n="transition WebkitTransition MozTransition OTransition msTransition KhtmlTransition".split(" ");for(e=0;e=h||l)){var m=.75-Math.abs(i)/y.height();y.css({top:i+"px"}),y.css({opacity:m}),l=!0}r=t,t=p.pageX-f.pageX,s=100*t/g,!c&&!l&&Math.abs(t)>=d&&(n("#swipebox-slider").css({"-webkit-transition":"",transition:""}),c=!0),c&&(t>0?0===e?n("#swipebox-overlay").addClass("leftSpringTouch"):(n("#swipebox-overlay").removeClass("leftSpringTouch").removeClass("rightSpringTouch"),n("#swipebox-slider").css({"-webkit-transform":"translate3d("+(v+s)+"%, 0, 0)",transform:"translate3d("+(v+s)+"%, 0, 0)"})):0>t&&(u.length===e+1?n("#swipebox-overlay").addClass("rightSpringTouch"):(n("#swipebox-overlay").removeClass("leftSpringTouch").removeClass("rightSpringTouch"),n("#swipebox-slider").css({"-webkit-transform":"translate3d("+(v+s)+"%, 0, 0)",transform:"translate3d("+(v+s)+"%, 0, 0)"}))))}),!1}).bind("touchend",function(e){if(e.preventDefault(),e.stopPropagation(),n("#swipebox-slider").css({"-webkit-transition":"-webkit-transform 0.4s ease",transition:"transform 0.4s ease"}),i=p.pageY-f.pageY,t=p.pageX-f.pageX,s=100*t/g,l)if(l=!1,Math.abs(i)>=2*h&&Math.abs(i)>Math.abs(o)){var u=i>0?y.height():-y.height();y.animate({top:u+"px",opacity:0},300,function(){a.closeSlide()})}else y.animate({top:0,opacity:1},300);else c?(c=!1,t>=d&&t>=r?a.getPrev():-d>=t&&r>=t&&a.getNext()):m.hasClass("visible-bars")?(a.clearTimeout(),a.hideBars()):(a.showBars(),a.setTimeout());n("#swipebox-slider").css({"-webkit-transform":"translate3d("+v+"%, 0, 0)",transform:"translate3d("+v+"%, 0, 0)"}),n("#swipebox-overlay").removeClass("leftSpringTouch").removeClass("rightSpringTouch"),n(".touching").off("touchmove").removeClass("touching")})},setTimeout:function(){if(c.settings.hideBarsDelay>0){var t=this;t.clearTimeout(),t.timeout=e.setTimeout(function(){t.hideBars()},c.settings.hideBarsDelay)}},clearTimeout:function(){e.clearTimeout(this.timeout),this.timeout=null},showBars:function(){var e=n("#swipebox-top-bar, #swipebox-bottom-bar");this.doCssTrans()?e.addClass("visible-bars"):(n("#swipebox-top-bar").animate({top:0},500),n("#swipebox-bottom-bar").animate({bottom:0},500),setTimeout(function(){e.addClass("visible-bars")},1e3))},hideBars:function(){var e=n("#swipebox-top-bar, #swipebox-bottom-bar");this.doCssTrans()?e.removeClass("visible-bars"):(n("#swipebox-top-bar").animate({top:"-50px"},500),n("#swipebox-bottom-bar").animate({bottom:"-50px"},500),setTimeout(function(){e.removeClass("visible-bars")},1e3))},animBars:function(){var e=this,t=n("#swipebox-top-bar, #swipebox-bottom-bar");t.addClass("visible-bars"),e.setTimeout(),n("#swipebox-slider").click(function(){t.hasClass("visible-bars")||(e.showBars(),e.setTimeout())}),n("#swipebox-bottom-bar").hover(function(){e.showBars(),t.addClass("visible-bars"),e.clearTimeout()},function(){c.settings.hideBarsDelay>0&&(t.removeClass("visible-bars"),e.setTimeout())})},keyboard:function(){var t=this;n(e).bind("keyup",function(e){e.preventDefault(),e.stopPropagation(),37===e.keyCode?t.getPrev():39===e.keyCode?t.getNext():27===e.keyCode&&t.closeSlide()})},actions:function(){var e=this,t="touchend click";u.length<2?(n("#swipebox-bottom-bar").hide(),i===u[1]&&n("#swipebox-top-bar").hide()):(n("#swipebox-prev").bind(t,function(t){t.preventDefault(),t.stopPropagation(),e.getPrev(),e.setTimeout()}),n("#swipebox-next").bind(t,function(t){t.preventDefault(),t.stopPropagation(),e.getNext(),e.setTimeout()})),n("#swipebox-close").bind(t,function(){e.closeSlide()})},setSlide:function(e,t){t=t||!1;var i=n("#swipebox-slider");v=100*-e,this.doCssTrans()?i.css({"-webkit-transform":"translate3d("+100*-e+"%, 0, 0)",transform:"translate3d("+100*-e+"%, 0, 0)"}):i.animate({left:100*-e+"%"}),n("#swipebox-slider .slide").removeClass("current"),n("#swipebox-slider .slide").eq(e).addClass("current"),this.setTitle(e),t&&i.fadeIn(),n("#swipebox-prev, #swipebox-next").removeClass("disabled"),0===e?n("#swipebox-prev").addClass("disabled"):e===u.length-1&&c.settings.loopAtEnd!==!0&&n("#swipebox-next").addClass("disabled")},openSlide:function(t){n("html").addClass("swipebox-html"),f?(n("html").addClass("swipebox-touch"),c.settings.hideCloseButtonOnMobile&&n("html").addClass("swipebox-no-close-button")):n("html").addClass("swipebox-no-touch"),n(e).trigger("resize"),this.setSlide(t,!0)},preloadMedia:function(e){var t=this,n=null;u[e]!==i&&(n=u[e].href),t.isVideo(n)?t.openMedia(e):setTimeout(function(){t.openMedia(e)},1e3)},openMedia:function(e){var t,r,o=this;return u[e]!==i&&(t=u[e].href),!(0>e||e>=u.length)&&(r=n("#swipebox-slider .slide").eq(e),void(o.isVideo(t)?(r.html(o.getVideo(t)),c.settings.afterMedia&&c.settings.afterMedia(e)):(r.addClass("slide-loading"),o.loadMedia(t,function(){r.removeClass("slide-loading"),r.html(this),c.settings.afterMedia&&c.settings.afterMedia(e)}))))},setTitle:function(e){var t=null;n("#swipebox-title").empty(),u[e]!==i&&(t=u[e].title),t?(n("#swipebox-top-bar").show(),n("#swipebox-title").append(t)):n("#swipebox-top-bar").hide()},isVideo:function(e){if(e){if(e.match(/(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/)||e.match(/vimeo\.com\/([0-9]*)/)||e.match(/youtu\.be\/([a-zA-Z0-9\-_]+)/))return!0;if(e.toLowerCase().indexOf("swipeboxvideo=1")>=0)return!0}},parseUri:function(e,i){var r=t.createElement("a"),o={};return r.href=decodeURIComponent(e),r.search&&(o=JSON.parse('{"'+r.search.toLowerCase().replace("?","").replace(/&/g,'","').replace(/=/g,'":"')+'"}')),n.isPlainObject(i)&&(o=n.extend(o,i,c.settings.queryStringData)),n.map(o,function(e,t){return e&&e>""?encodeURIComponent(t)+"="+encodeURIComponent(e):void 0}).join("&")},getVideo:function(e){var t="",n=e.match(/((?:www\.)?youtube\.com|(?:www\.)?youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/),i=e.match(/(?:www\.)?youtu\.be\/([a-zA-Z0-9\-_]+)/),r=e.match(/(?:www\.)?vimeo\.com\/([0-9]*)/),o="";return n||i?(i&&(n=i),o=s.parseUri(e,{autoplay:c.settings.autoplayVideos?"1":"0",v:""}),t=''):r?(o=s.parseUri(e,{autoplay:c.settings.autoplayVideos?"1":"0",byline:"0",portrait:"0",color:c.settings.vimeoColor}),t=''):t='','
    '+t+"
    "},loadMedia:function(e,t){if(0===e.trim().indexOf("#"))t.call(n("
    ",{class:"swipebox-inline-container"}).append(n(e).clone().toggleClass(c.settings.toggleClassOnLoad)));else if(!this.isVideo(e)){var i=n("").on("load",function(){t.call(i)});i.attr("src",e)}},getNext:function(){var e,t=this,i=n("#swipebox-slider .slide").index(n("#swipebox-slider .slide.current"));i+10?(e=n("#swipebox-slider .slide").eq(t).contents().find("iframe").attr("src"),n("#swipebox-slider .slide").eq(t).contents().find("iframe").attr("src",e),t--,this.setSlide(t),this.preloadMedia(t-1),c.settings.prevSlide&&c.settings.prevSlide(t)):(n("#swipebox-overlay").addClass("leftSpring"),setTimeout(function(){n("#swipebox-overlay").removeClass("leftSpring")},500))},nextSlide:function(e){},prevSlide:function(e){},closeSlide:function(){n("html").removeClass("swipebox-html"),n("html").removeClass("swipebox-touch"),n(e).trigger("resize"),this.destroy()},destroy:function(){n(e).unbind("keyup"),n("body").unbind("touchstart"),n("body").unbind("touchmove"),n("body").unbind("touchend"),n("#swipebox-slider").unbind(),n("#swipebox-overlay").remove(),n.isArray(r)||r.removeData("_swipebox"),this.target&&this.target.trigger("swipebox-destroy"),n.swipebox.isOpen=!1,c.settings.afterClose&&c.settings.afterClose()}},c.init()},n.fn.swipebox=function(e){if(!n.data(this,"_swipebox")){var t=new n.swipebox(this,e);this.data("_swipebox",t)}return this.data("_swipebox")}}(window,document,jQuery),define("swipebox/src/js/jquery.swipebox.min",["jquery"],function(){}),define("swipebox",["swipebox/src/js/jquery.swipebox.min"],function(e){return e}),define("text!swipebox/src/css/swipebox.min.css",["module"],function(e){e.exports="/*! Swipebox v1.3.0 | Constantin Saguin csag.co | MIT License | github.com/brutaldesign/swipebox */html.swipebox-html.swipebox-touch{overflow:hidden!important}#swipebox-overlay img{border:none!important}#swipebox-overlay{width:100%;height:100%;position:fixed;top:0;left:0;z-index:99999!important;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#swipebox-container{position:relative;width:100%;height:100%}#swipebox-slider{-webkit-transition:-webkit-transform .4s ease;transition:transform .4s ease;height:100%;left:0;top:0;width:100%;white-space:nowrap;position:absolute;display:none;cursor:pointer}#swipebox-slider .slide{height:100%;width:100%;line-height:1px;text-align:center;display:inline-block}#swipebox-slider .slide:before{content:\"\";display:inline-block;height:50%;width:1px;margin-right:-1px}#swipebox-slider .slide .swipebox-inline-container,#swipebox-slider .slide .swipebox-video-container,#swipebox-slider .slide img{display:inline-block;max-height:100%;max-width:100%;margin:0;padding:0;width:auto;height:auto;vertical-align:middle}#swipebox-slider .slide .swipebox-video-container{background:0 0;max-width:1140px;max-height:100%;width:100%;padding:5%;-webkit-box-sizing:border-box;box-sizing:border-box}#swipebox-slider .slide .swipebox-video-container .swipebox-video{width:100%;height:0;padding-bottom:56.25%;overflow:hidden;position:relative}#swipebox-slider .slide .swipebox-video-container .swipebox-video iframe{width:100%!important;height:100%!important;position:absolute;top:0;left:0}#swipebox-slider .slide-loading{background:url(../img/loader.gif) center center no-repeat}#swipebox-bottom-bar,#swipebox-top-bar{-webkit-transition:.5s;transition:.5s;position:absolute;left:0;z-index:999;height:50px;width:100%}#swipebox-bottom-bar{bottom:-50px}#swipebox-bottom-bar.visible-bars{-webkit-transform:translate3d(0,-50px,0);transform:translate3d(0,-50px,0)}#swipebox-top-bar{top:-50px}#swipebox-top-bar.visible-bars{-webkit-transform:translate3d(0,50px,0);transform:translate3d(0,50px,0)}#swipebox-title{display:block;width:100%;text-align:center}#swipebox-close,#swipebox-next,#swipebox-prev{background-image:url(../img/icons.png);background-repeat:no-repeat;border:none!important;text-decoration:none!important;cursor:pointer;width:50px;height:50px;top:0}#swipebox-arrows{display:block;margin:0 auto;width:100%;height:50px}#swipebox-prev{background-position:-32px 13px;float:left}#swipebox-next{background-position:-78px 13px;float:right}#swipebox-close{top:0;right:0;position:absolute;z-index:9999;background-position:15px 12px}.swipebox-no-close-button #swipebox-close{display:none}#swipebox-next.disabled,#swipebox-prev.disabled{opacity:.3}.swipebox-no-touch #swipebox-overlay.rightSpring #swipebox-slider{-webkit-animation:rightSpring .3s;animation:rightSpring .3s}.swipebox-no-touch #swipebox-overlay.leftSpring #swipebox-slider{-webkit-animation:leftSpring .3s;animation:leftSpring .3s}.swipebox-touch #swipebox-container:after,.swipebox-touch #swipebox-container:before{-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transition:all .3s ease;transition:all .3s ease;content:' ';position:absolute;z-index:999;top:0;height:100%;width:20px;opacity:0}.swipebox-touch #swipebox-container:before{left:0;-webkit-box-shadow:inset 10px 0 10px -8px #656565;box-shadow:inset 10px 0 10px -8px #656565}.swipebox-touch #swipebox-container:after{right:0;-webkit-box-shadow:inset -10px 0 10px -8px #656565;box-shadow:inset -10px 0 10px -8px #656565}.swipebox-touch #swipebox-overlay.leftSpringTouch #swipebox-container:before,.swipebox-touch #swipebox-overlay.rightSpringTouch #swipebox-container:after{opacity:1}@-webkit-keyframes rightSpring{0%{left:0}50%{left:-30px}100%{left:0}}@keyframes rightSpring{0%{left:0}50%{left:-30px}100%{left:0}}@-webkit-keyframes leftSpring{0%{left:0}50%{left:30px}100%{left:0}}@keyframes leftSpring{0%{left:0}50%{left:30px}100%{left:0}}@media screen and (min-width:800px){#swipebox-close{right:10px}#swipebox-arrows{width:92%;max-width:800px}}#swipebox-overlay{background:#0d0d0d}#swipebox-bottom-bar,#swipebox-top-bar{text-shadow:1px 1px 1px #000;background:#000;opacity:.95}#swipebox-top-bar{color:#fff!important;font-size:15px;line-height:43px;font-family:Helvetica,Arial,sans-serif}"}),!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define("simplemde/dist/simplemde.min",[],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.SimpleMDE=e()}}(function(){var e;return function e(t,n,i){function r(s,a){if(!n[s]){if(!t[s]){var l="function"==typeof require&&require;if(!a&&l)return l(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[s]={exports:{}};t[s][0].call(u.exports,function(e){var n=t[s][1][e];return r(n?n:e)},u,u.exports,e,t,n,i)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;st;++t)l[t]=e[t],c[e.charCodeAt(t)]=t;c["-".charCodeAt(0)]=62,c["_".charCodeAt(0)]=63}function r(e){var t,n,i,r,o,s,a=e.length;if(a%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===e[a-2]?2:"="===e[a-1]?1:0,s=new u(3*a/4-o),i=o>0?a-4:a;var l=0;for(t=0,n=0;i>t;t+=4,n+=3)r=c[e.charCodeAt(t)]<<18|c[e.charCodeAt(t+1)]<<12|c[e.charCodeAt(t+2)]<<6|c[e.charCodeAt(t+3)],s[l++]=r>>16&255,s[l++]=r>>8&255,s[l++]=255&r;return 2===o?(r=c[e.charCodeAt(t)]<<2|c[e.charCodeAt(t+1)]>>4,s[l++]=255&r):1===o&&(r=c[e.charCodeAt(t)]<<10|c[e.charCodeAt(t+1)]<<4|c[e.charCodeAt(t+2)]>>2,s[l++]=r>>8&255,s[l++]=255&r),s}function o(e){return l[e>>18&63]+l[e>>12&63]+l[e>>6&63]+l[63&e]}function s(e,t,n){for(var i,r=[],s=t;n>s;s+=3)i=(e[s]<<16)+(e[s+1]<<8)+e[s+2],r.push(o(i));return r.join("")}function a(e){for(var t,n=e.length,i=n%3,r="",o=[],a=16383,c=0,u=n-i;u>c;c+=a)o.push(s(e,c,c+a>u?u:c+a));return 1===i?(t=e[n-1],r+=l[t>>2],r+=l[t<<4&63],r+="=="):2===i&&(t=(e[n-2]<<8)+e[n-1],r+=l[t>>10],r+=l[t>>4&63],r+=l[t<<2&63],r+="="),o.push(r),o.join("")}n.toByteArray=r,n.fromByteArray=a;var l=[],c=[],u="undefined"!=typeof Uint8Array?Uint8Array:Array;i()},{}],2:[function(e,t,n){},{}],3:[function(e,t,n){(function(t){"use strict";function i(){try{var e=new Uint8Array(1);return e.foo=function(){return 42},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}function r(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e,t){if(r()=t?o(e,t):void 0!==n?"string"==typeof i?o(e,t).fill(n,i):o(e,t).fill(n):o(e,t)}function u(e,t){if(l(t),e=o(e,0>t?0:0|g(t)),!s.TYPED_ARRAY_SUPPORT)for(var n=0;t>n;n++)e[n]=0;return e}function d(e,t,n){if("string"==typeof n&&""!==n||(n="utf8"),!s.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var i=0|v(t,n);return e=o(e,i),e.write(t,n),e}function h(e,t){var n=0|g(t.length);e=o(e,n);for(var i=0;n>i;i+=1)e[i]=255&t[i];return e}function f(e,t,n,i){if(t.byteLength,0>n||t.byteLength=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|e}function m(e){return+e!=e&&(e=0),s.alloc(+e)}function v(e,t){if(s.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"binary":case"raw":case"raws":return n;case"utf8":case"utf-8":case void 0:return U(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return V(e).length;default:if(i)return U(e).length;t=(""+t).toLowerCase(),i=!0}}function y(e,t,n){var i=!1;if((void 0===t||0>t)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),0>=n)return"";if(n>>>=0,t>>>=0,t>=n)return"";for(e||(e="utf8");;)switch(e){case"hex":return N(this,t,n);case"utf8":case"utf-8":return L(this,t,n);case"ascii":return M(this,t,n);case"binary":return H(this,t,n);case"base64":return _(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,n);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function b(e,t,n){var i=e[t];e[t]=e[n],e[n]=i}function w(e,t,n,i){function r(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}var o=1,s=e.length,a=t.length;if(void 0!==i&&(i=String(i).toLowerCase(),"ucs2"===i||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;o=2,s/=2,a/=2,n/=2}for(var l=-1,c=0;s>n+c;c++)if(r(e,n+c)===r(t,-1===l?0:c-l)){if(-1===l&&(l=c),c-l+1===a)return(n+l)*o}else-1!==l&&(c-=c-l),l=-1;return-1}function x(e,t,n,i){n=Number(n)||0;var r=e.length-n;i?(i=Number(i),i>r&&(i=r)):i=r;var o=t.length;if(o%2!==0)throw new Error("Invalid hex string");i>o/2&&(i=o/2);for(var s=0;i>s;s++){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[n+s]=a}return s}function k(e,t,n,i){return $(U(t,e.length-n),e,n,i)}function S(e,t,n,i){return $(q(t),e,n,i)}function C(e,t,n,i){return S(e,t,n,i)}function T(e,t,n,i){return $(V(t),e,n,i)}function E(e,t,n,i){return $(G(t,e.length-n),e,n,i)}function _(e,t,n){return 0===t&&n===e.length?X.fromByteArray(e):X.fromByteArray(e.slice(t,n))}function L(e,t,n){n=Math.min(e.length,n);for(var i=[],r=t;n>r;){var o=e[r],s=null,a=o>239?4:o>223?3:o>191?2:1;if(n>=r+a){var l,c,u,d;switch(a){case 1:128>o&&(s=o);break;case 2:l=e[r+1],128===(192&l)&&(d=(31&o)<<6|63&l,d>127&&(s=d));break;case 3:l=e[r+1],c=e[r+2],128===(192&l)&&128===(192&c)&&(d=(15&o)<<12|(63&l)<<6|63&c,d>2047&&(55296>d||d>57343)&&(s=d));break;case 4:l=e[r+1],c=e[r+2],u=e[r+3],128===(192&l)&&128===(192&c)&&128===(192&u)&&(d=(15&o)<<18|(63&l)<<12|(63&c)<<6|63&u,d>65535&&1114112>d&&(s=d))}}null===s?(s=65533,a=1):s>65535&&(s-=65536,i.push(s>>>10&1023|55296),s=56320|1023&s),i.push(s),r+=a}return D(i)}function D(e){var t=e.length;if(J>=t)return String.fromCharCode.apply(String,e);for(var n="",i=0;t>i;)n+=String.fromCharCode.apply(String,e.slice(i,i+=J));return n}function M(e,t,n){var i="";n=Math.min(e.length,n);for(var r=t;n>r;r++)i+=String.fromCharCode(127&e[r]);return i}function H(e,t,n){var i="";n=Math.min(e.length,n);for(var r=t;n>r;r++)i+=String.fromCharCode(e[r]);return i}function N(e,t,n){var i=e.length;(!t||0>t)&&(t=0),(!n||0>n||n>i)&&(n=i);for(var r="",o=t;n>o;o++)r+=Y(e[o]);return r}function A(e,t,n){for(var i=e.slice(t,n),r="",o=0;oe)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,n,i,r,o){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||o>t)throw new RangeError('"value" argument is out of bounds');if(n+i>e.length)throw new RangeError("Index out of range")}function I(e,t,n,i){0>t&&(t=65535+t+1);for(var r=0,o=Math.min(e.length-n,2);o>r;r++)e[n+r]=(t&255<<8*(i?r:1-r))>>>8*(i?r:1-r)}function O(e,t,n,i){0>t&&(t=4294967295+t+1);for(var r=0,o=Math.min(e.length-n,4);o>r;r++)e[n+r]=t>>>8*(i?r:3-r)&255}function F(e,t,n,i,r,o){if(n+i>e.length)throw new RangeError("Index out of range");if(0>n)throw new RangeError("Index out of range")}function P(e,t,n,i,r){return r||F(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),Q.write(e,t,n,i,23,4),n+4}function W(e,t,n,i,r){return r||F(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),Q.write(e,t,n,i,52,8),n+8}function B(e){if(e=j(e).replace(ee,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function j(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function Y(e){return 16>e?"0"+e.toString(16):e.toString(16)}function U(e,t){t=t||1/0;for(var n,i=e.length,r=null,o=[],s=0;i>s;s++){if(n=e.charCodeAt(s),n>55295&&57344>n){if(!r){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===i){(t-=3)>-1&&o.push(239,191,189);continue}r=n;continue}if(56320>n){(t-=3)>-1&&o.push(239,191,189),r=n;continue}n=(r-55296<<10|n-56320)+65536}else r&&(t-=3)>-1&&o.push(239,191,189);if(r=null,128>n){if((t-=1)<0)break;o.push(n)}else if(2048>n){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(65536>n){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(1114112>n))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function q(e){for(var t=[],n=0;n>8,r=n%256,o.push(r),o.push(i);return o}function V(e){return X.toByteArray(B(e))}function $(e,t,n,i){for(var r=0;i>r&&!(r+n>=t.length||r>=e.length);r++)t[r+n]=e[r];return r}function Z(e){return e!==e}var X=e("base64-js"),Q=e("ieee754"),K=e("isarray");n.Buffer=s,n.SlowBuffer=m,n.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:i(),n.kMaxLength=r(),s.poolSize=8192,s._augment=function(e){return e.__proto__=s.prototype,e},s.from=function(e,t,n){return a(null,e,t,n)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(e,t,n){return c(null,e,t,n)},s.allocUnsafe=function(e){return u(null,e)},s.allocUnsafeSlow=function(e){return u(null,e)},s.isBuffer=function(e){return!(null==e||!e._isBuffer)},s.compare=function(e,t){if(!s.isBuffer(e)||!s.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,i=t.length,r=0,o=Math.min(n,i);o>r;++r)if(e[r]!==t[r]){n=e[r],i=t[r];break}return i>n?-1:n>i?1:0},s.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(e,t){if(!K(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);var n;if(void 0===t)for(t=0,n=0;nt;t+=2)b(this,t,t+1);return this},s.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;e>t;t+=4)b(this,t,t+3),b(this,t+1,t+2);return this},s.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?L(this,0,e):y.apply(this,arguments)},s.prototype.equals=function(e){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){var e="",t=n.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},s.prototype.compare=function(e,t,n,i,r){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===r&&(r=this.length),0>t||n>e.length||0>i||r>this.length)throw new RangeError("out of range index");if(i>=r&&t>=n)return 0;if(i>=r)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,i>>>=0,r>>>=0,this===e)return 0;for(var o=r-i,a=n-t,l=Math.min(o,a),c=this.slice(i,r),u=e.slice(t,n),d=0;l>d;++d)if(c[d]!==u[d]){o=c[d],a=u[d];break}return a>o?-1:o>a?1:0},s.prototype.indexOf=function(e,t,n){if("string"==typeof t?(n=t,t=0):t>2147483647?t=2147483647:-2147483648>t&&(t=-2147483648),t>>=0,0===this.length)return-1;if(t>=this.length)return-1;if(0>t&&(t=Math.max(this.length+t,0)),"string"==typeof e&&(e=s.from(e,n)),s.isBuffer(e))return 0===e.length?-1:w(this,e,t,n);if("number"==typeof e)return s.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,e,t):w(this,[e],t,n);throw new TypeError("val must be string, number or Buffer")},s.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},s.prototype.write=function(e,t,n,i){if(void 0===t)i="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)i=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===i&&(i="utf8")):(i=n,n=void 0)}var r=this.length-t;if((void 0===n||n>r)&&(n=r),e.length>0&&(0>n||0>t)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return x(this,e,t,n);case"utf8":case"utf-8":return k(this,e,t,n);case"ascii":return S(this,e,t,n);case"binary":return C(this,e,t,n);case"base64":return T(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var J=4096;s.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),0>t?(t+=n,0>t&&(t=0)):t>n&&(t=n),e>t&&(t=e);var i;if(s.TYPED_ARRAY_SUPPORT)i=this.subarray(e,t),i.__proto__=s.prototype;else{var r=t-e;i=new s(r,void 0);for(var o=0;r>o;o++)i[o]=this[o+e]}return i},s.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||z(e,t,this.length);for(var i=this[e],r=1,o=0;++o0&&(r*=256);)i+=this[e+--t]*r;return i},s.prototype.readUInt8=function(e,t){return t||z(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return t||z(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return t||z(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return t||z(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return t||z(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||z(e,t,this.length);for(var i=this[e],r=1,o=0;++o=r&&(i-=Math.pow(2,8*t)),i},s.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||z(e,t,this.length);for(var i=t,r=1,o=this[e+--i];i>0&&(r*=256);)o+=this[e+--i]*r;return r*=128,o>=r&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return t||z(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){t||z(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(e,t){t||z(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(e,t){return t||z(e,4,this.length), -this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return t||z(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return t||z(e,4,this.length),Q.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return t||z(e,4,this.length),Q.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return t||z(e,8,this.length),Q.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return t||z(e,8,this.length),Q.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,n,i){if(e=+e,t|=0,n|=0,!i){var r=Math.pow(2,8*n)-1;R(this,e,t,n,r,0)}var o=1,s=0;for(this[t]=255&e;++s=0&&(s*=256);)this[t+o]=e/s&255;return t+n},s.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,1,255,0),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):I(this,e,t,!0),t+2},s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):I(this,e,t,!1),t+2},s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):O(this,e,t,!0),t+4},s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):O(this,e,t,!1),t+4},s.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t|=0,!i){var r=Math.pow(2,8*n-1);R(this,e,t,n,r-1,-r)}var o=0,s=1,a=0;for(this[t]=255&e;++oe&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},s.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t|=0,!i){var r=Math.pow(2,8*n-1);R(this,e,t,n,r-1,-r)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)0>e&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,1,127,-128),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):I(this,e,t,!0),t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):I(this,e,t,!1),t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):O(this,e,t,!0),t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,2147483647,-2147483648),0>e&&(e=4294967295+e+1),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):O(this,e,t,!1),t+4},s.prototype.writeFloatLE=function(e,t,n){return P(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return P(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return W(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return W(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,i){if(n||(n=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&n>i&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(0>t)throw new RangeError("targetStart out of bounds");if(0>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>i)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-tn&&i>t)for(r=o-1;r>=0;r--)e[r+t]=this[r+n];else if(1e3>o||!s.TYPED_ARRAY_SUPPORT)for(r=0;o>r;r++)e[r+t]=this[r+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},s.prototype.fill=function(e,t,n,i){if("string"==typeof e){if("string"==typeof t?(i=t,t=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),1===e.length){var r=e.charCodeAt(0);256>r&&(e=r)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!s.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof e&&(e&=255);if(0>t||this.length=n)return this;t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var o;if("number"==typeof e)for(o=t;n>o;o++)this[o]=e;else{var a=s.isBuffer(e)?e:U(new s(e,i).toString()),l=a.length;for(o=0;n-t>o;o++)this[o+t]=a[o%l]}return this};var ee=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":1,ieee754:15,isarray:16}],4:[function(e,t,n){"use strict";function i(e){return e=e||{},"function"!=typeof e.codeMirrorInstance||"function"!=typeof e.codeMirrorInstance.defineMode?void console.log("CodeMirror Spell Checker: You must provide an instance of CodeMirror via the option `codeMirrorInstance`"):(String.prototype.includes||(String.prototype.includes=function(){return-1!==String.prototype.indexOf.apply(this,arguments)}),void e.codeMirrorInstance.defineMode("spell-checker",function(t){if(!i.aff_loading){i.aff_loading=!0;var n=new XMLHttpRequest;n.open("GET","https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.aff",!0),n.onload=function(){4===n.readyState&&200===n.status&&(i.aff_data=n.responseText,i.num_loaded++,2==i.num_loaded&&(i.typo=new r("en_US",i.aff_data,i.dic_data,{platform:"any"})))},n.send(null)}if(!i.dic_loading){i.dic_loading=!0;var o=new XMLHttpRequest;o.open("GET","https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.dic",!0),o.onload=function(){4===o.readyState&&200===o.status&&(i.dic_data=o.responseText,i.num_loaded++,2==i.num_loaded&&(i.typo=new r("en_US",i.aff_data,i.dic_data,{platform:"any"})))},o.send(null)}var s='!"#$%&()*+,-./:;<=>?@[\\]^_`{|}~ ',a={token:function(e){var t=e.peek(),n="";if(s.includes(t))return e.next(),null;for(;null!=(t=e.peek())&&!s.includes(t);)n+=t,e.next();return i.typo&&!i.typo.check(n)?"spell-error":null}},l=e.codeMirrorInstance.getMode(t,t.backdrop||"text/plain");return e.codeMirrorInstance.overlayMode(l,a,!0)}))}var r=e("typo-js");i.num_loaded=0,i.aff_loading=!1,i.dic_loading=!1,i.aff_data="",i.dic_data="",i.typo,t.exports=i},{"typo-js":18}],5:[function(t,n,i){!function(r){"object"==typeof i&&"object"==typeof n?r(t("../../lib/codemirror")):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],r):r(CodeMirror)}(function(e){"use strict";function t(e){var t=e.getWrapperElement();e.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:t.style.width,height:t.style.height},t.style.width="",t.style.height="auto",t.className+=" CodeMirror-fullscreen",document.documentElement.style.overflow="hidden",e.refresh()}function n(e){var t=e.getWrapperElement();t.className=t.className.replace(/\s*CodeMirror-fullscreen\b/,""),document.documentElement.style.overflow="";var n=e.state.fullScreenRestore;t.style.width=n.width,t.style.height=n.height,window.scrollTo(n.scrollLeft,n.scrollTop),e.refresh()}e.defineOption("fullScreen",!1,function(i,r,o){o==e.Init&&(o=!1),!o!=!r&&(r?t(i):n(i))})})},{"../../lib/codemirror":10}],6:[function(t,n,i){!function(r){"object"==typeof i&&"object"==typeof n?r(t("../../lib/codemirror")):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],r):r(CodeMirror)}(function(e){function t(e){e.state.placeholder&&(e.state.placeholder.parentNode.removeChild(e.state.placeholder),e.state.placeholder=null)}function n(e){t(e);var n=e.state.placeholder=document.createElement("pre");n.style.cssText="height: 0; overflow: visible",n.className="CodeMirror-placeholder";var i=e.getOption("placeholder");"string"==typeof i&&(i=document.createTextNode(i)),n.appendChild(i),e.display.lineSpace.insertBefore(n,e.display.lineSpace.firstChild)}function i(e){o(e)&&n(e)}function r(e){var i=e.getWrapperElement(),r=o(e);i.className=i.className.replace(" CodeMirror-empty","")+(r?" CodeMirror-empty":""),r?n(e):t(e)}function o(e){return 1===e.lineCount()&&""===e.getLine(0)}e.defineOption("placeholder","",function(n,o,s){var a=s&&s!=e.Init;if(o&&!a)n.on("blur",i),n.on("change",r),n.on("swapDoc",r),r(n);else if(!o&&a){n.off("blur",i),n.off("change",r),n.off("swapDoc",r),t(n);var l=n.getWrapperElement();l.className=l.className.replace(" CodeMirror-empty","")}o&&!n.hasFocus()&&i(n)})})},{"../../lib/codemirror":10}],7:[function(t,n,i){!function(r){"object"==typeof i&&"object"==typeof n?r(t("../../lib/codemirror")):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],r):r(CodeMirror)}(function(e){"use strict";var t=/^(\s*)(>[> ]*|[*+-]\s|(\d+)([.)]))(\s*)/,n=/^(\s*)(>[> ]*|[*+-]|(\d+)[.)])(\s*)$/,i=/[*+-]\s/;e.commands.newlineAndIndentContinueMarkdownList=function(r){if(r.getOption("disableInput"))return e.Pass;for(var o=r.listSelections(),s=[],a=0;a")>=0?f[2]:parseInt(f[3],10)+1+f[4];s[a]="\n"+p+m+g}}r.replaceSelections(s)}})},{"../../lib/codemirror":10}],8:[function(t,n,i){!function(r){"object"==typeof i&&"object"==typeof n?r(t("../../lib/codemirror")):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],r):r(CodeMirror)}(function(e){"use strict";e.overlayMode=function(t,n,i){return{startState:function(){return{base:e.startState(t),overlay:e.startState(n),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(i){return{base:e.copyState(t,i.base),overlay:e.copyState(n,i.overlay),basePos:i.basePos,baseCur:null,overlayPos:i.overlayPos,overlayCur:null}},token:function(e,r){return(e!=r.streamSeen||Math.min(r.basePos,r.overlayPos)=n.line,f=h?n:l(d,0),p=e.markText(u,f,{className:o});if(null==i?r.push(p):r.splice(i++,0,p),h)break;s=d}}function r(e){for(var t=e.state.markedSelection,n=0;n1)return o(e);var t=e.getCursor("start"),n=e.getCursor("end"),s=e.state.markedSelection;if(!s.length)return i(e,t,n);var l=s[0].find(),u=s[s.length-1].find();if(!l||!u||n.line-t.line=0||c(n,l.from)<=0)return o(e);for(;c(t,l.from)>0;)s.shift().clear(),l=s[0].find();for(c(t,l.from)<0&&(l.to.line-t.line0&&(n.line-u.from.linewo&&setTimeout(function(){l.display.input.reset(!0)},20),jt(this),Zr(),wt(this),this.curOp.forceUpdate=!0,Xi(this,r),i.autofocus&&!Do||l.hasFocus()?setTimeout(Fr(vn,this),20):yn(this);for(var u in ts)ts.hasOwnProperty(u)&&ts[u](this,i[u],ns);k(this),i.finishInit&&i.finishInit(this);for(var d=0;dwo&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),xo||mo&&Do||(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,n.init(i)}function n(t){t.doc.mode=e.getMode(t.options,t.doc.modeOption),i(t)}function i(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.frontier=e.doc.first,Pe(e,100),e.state.modeGen++,e.curOp&&Rt(e)}function r(e){e.options.lineWrapping?(Ks(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Qs(e.display.wrapper,"CodeMirror-wrap"),h(e)),s(e),Rt(e),at(e),setTimeout(function(){y(e)},100)}function o(e){var t=yt(e.display),n=e.options.lineWrapping,i=n&&Math.max(5,e.display.scroller.clientWidth/bt(e.display)-3);return function(r){if(ki(e.doc,r))return 0;var o=0;if(r.widgets)for(var s=0;st.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}function f(e){var t=Ar(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function p(e){var t=e.display,n=t.gutters.offsetWidth,i=Math.round(e.doc.height+Ue(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:i,scrollHeight:i+Ge(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function g(e,t,n){this.cm=n;var i=this.vert=jr("div",[jr("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),r=this.horiz=jr("div",[jr("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(i),e(r),Ms(i,"scroll",function(){i.clientHeight&&t(i.scrollTop,"vertical")}),Ms(r,"scroll",function(){r.clientWidth&&t(r.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,bo&&8>wo&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function m(){}function v(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&Qs(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new e.scrollbarModel[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),Ms(e,"mousedown",function(){t.state.focused&&setTimeout(function(){t.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,n){"horizontal"==n?on(t,e):rn(t,e)},t),t.display.scrollbars.addClass&&Ks(t.display.wrapper,t.display.scrollbars.addClass)}function y(e,t){t||(t=p(e));var n=e.display.barWidth,i=e.display.barHeight;b(e,t);for(var r=0;4>r&&n!=e.display.barWidth||i!=e.display.barHeight;r++)n!=e.display.barWidth&&e.options.lineWrapping&&H(e),b(e,p(e)),n=e.display.barWidth,i=e.display.barHeight}function b(e,t){var n=e.display,i=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=i.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=i.bottom)+"px",n.heightForcer.style.borderBottom=i.bottom+"px solid transparent",i.right&&i.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=i.bottom+"px",n.scrollbarFiller.style.width=i.right+"px"):n.scrollbarFiller.style.display="",i.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=i.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}function w(e,t,n){var i=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;i=Math.floor(i-Ye(e));var r=n&&null!=n.bottom?n.bottom:i+e.wrapper.clientHeight,o=nr(t,i),s=nr(t,r);if(n&&n.ensure){var a=n.ensure.from.line,l=n.ensure.to.line;o>a?(o=a,s=nr(t,ir(Qi(t,a))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=s&&(o=nr(t,ir(Qi(t,l))-e.wrapper.clientHeight),s=l)}return{from:o,to:Math.max(s,o+1)}}function x(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var i=C(t)-t.scroller.scrollLeft+e.doc.scrollLeft,r=t.gutters.offsetWidth,o=i+"px",s=0;s=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Bt(e))return!1;k(e)&&(Ot(e),t.dims=A(e));var r=i.first+i.size,o=Math.max(t.visible.from-e.options.viewportMargin,i.first),s=Math.min(r,t.visible.to+e.options.viewportMargin);n.viewFroms&&n.viewTo-s<20&&(s=Math.min(r,n.viewTo)),Oo&&(o=wi(e.doc,o),s=xi(e.doc,s));var a=o!=n.viewFrom||s!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Wt(e,o,s),n.viewOffset=ir(Qi(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var l=Bt(e);if(!a&&0==l&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=qr();return l>4&&(n.lineDiv.style.display="none"),z(e,n.updateLineNumbers,t.dims),l>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,c&&qr()!=c&&c.offsetHeight&&c.focus(),Yr(n.cursorDiv),Yr(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,a&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Pe(e,400)),n.updateLineNumbers=null,!0}function L(e,t){for(var n=t.viewport,i=!0;(i&&e.options.lineWrapping&&t.oldDisplayWidth!=Ve(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Ue(e.display)-$e(e),n.top)}),t.visible=w(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&_(e,t);i=!1){H(e);var r=p(e);ze(e),y(e,r),M(e,r)}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function D(e,t){var n=new T(e,t);if(_(e,n)){H(e),L(e,n);var i=p(e);ze(e),y(e,i),M(e,i),n.finish()}}function M(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Ge(e)+"px"}function H(e){for(var t=e.display,n=t.lineDiv.offsetTop,i=0;iwo){var s=o.node.offsetTop+o.node.offsetHeight;r=s-n,n=s}else{var a=o.node.getBoundingClientRect();r=a.bottom-a.top}var l=o.line.height-r;if(2>r&&(r=yt(t)),(l>.001||-.001>l)&&(er(o.line,r),N(o.line),o.rest))for(var c=0;c=t&&d.lineNumber;d.changes&&(Ar(d.changes,"gutter")>-1&&(h=!1),R(e,d,c,n)),h&&(Yr(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(S(e.options,c)))),a=d.node.nextSibling}else{var f=Y(e,d,c,n);s.insertBefore(f,a)}c+=d.size}for(;a;)a=i(a)}function R(e,t,n,i){for(var r=0;rwo&&(e.node.style.zIndex=2)),e.node}function O(e){var t=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(t&&(t+=" CodeMirror-linebackground"),e.background)t?e.background.className=t:(e.background.parentNode.removeChild(e.background),e.background=null);else if(t){var n=I(e);e.background=n.insertBefore(jr("div",null,t),n.firstChild)}}function F(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):Fi(e,t)}function P(e,t){var n=t.text.className,i=F(e,t);t.text==t.node&&(t.node=i.pre),t.text.parentNode.replaceChild(i.pre,t.text),t.text=i.pre,i.bgClass!=t.bgClass||i.textClass!=t.textClass?(t.bgClass=i.bgClass,t.textClass=i.textClass,W(t)):n&&(t.text.className=n)}function W(e){O(e),e.line.wrapClass?I(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var t=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=t||""}function B(e,t,n,i){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var r=I(t);t.gutterBackground=jr("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px; width: "+i.gutterTotalWidth+"px"),r.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var r=I(t),s=t.gutter=jr("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px");if(e.display.input.setUneditable(s),r.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(jr("div",S(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+i.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var a=0;a1)if(Wo&&Wo.text.join("\n")==t){if(i.ranges.length%Wo.text.length==0){l=[];for(var c=0;c=0;c--){var u=i.ranges[c],d=u.from(),h=u.to();u.empty()&&(n&&n>0?d=Fo(d.line,d.ch-n):e.state.overwrite&&!s?h=Fo(h.line,Math.min(Qi(o,h.line).text.length,h.ch+Nr(a).length)):Wo&&Wo.lineWise&&Wo.text.join("\n")==t&&(d=h=Fo(d.line,0)));var f=e.curOp.updateInput,p={from:d,to:h,text:l?l[c%l.length]:a,origin:r||(s?"paste":e.state.cutIncoming?"cut":"+input")};En(e.doc,p),Cr(e,"inputRead",e,p)}t&&!s&&J(e,t),Fn(e),e.curOp.updateInput=f,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function K(e,t){var n=e.clipboardData&&e.clipboardData.getData("text/plain");return n?(e.preventDefault(),t.isReadOnly()||t.options.disableInput||Dt(t,function(){Q(t,n,0,null,"paste")}),!0):void 0}function J(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,i=n.ranges.length-1;i>=0;i--){var r=n.ranges[i];if(!(r.head.ch>100||i&&n.ranges[i-1].head.line==r.head.line)){var o=e.getModeAt(r.head),s=!1;if(o.electricChars){for(var a=0;a-1){s=Wn(e,r.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Qi(e.doc,r.head.line).text.slice(0,r.head.ch))&&(s=Wn(e,r.head.line,"smart"));s&&Cr(e,"electricInput",e,r.head.line)}}}function ee(e){for(var t=[],n=[],i=0;ir?c.map:u[r],s=0;sr?e.line:e.rest[r]),d=o[s]+i;return(0>i||a!=t)&&(d=o[s+(i?1:0)]),Fo(l,d)}}}var r=e.text.firstChild,o=!1;if(!t||!$s(r,t))return se(Fo(tr(e.line),0),!0);if(t==r&&(o=!0,t=r.childNodes[n],n=0,!t)){var s=e.rest?Nr(e.rest):e.line;return se(Fo(tr(s),s.text.length),o)}var a=3==t.nodeType?t:null,l=t;for(a||1!=t.childNodes.length||3!=t.firstChild.nodeType||(a=t.firstChild,n&&(n=a.nodeValue.length));l.parentNode!=r;)l=l.parentNode;var c=e.measure,u=c.maps,d=i(a,l,n);if(d)return se(d,o);for(var h=l.nextSibling,f=a?a.nodeValue.length-n:0;h;h=h.nextSibling){if(d=i(h,h.firstChild,0))return se(Fo(d.line,d.ch-f),o);f+=h.textContent.length}for(var p=l.previousSibling,f=n;p;p=p.previousSibling){if(d=i(p,p.firstChild,-1))return se(Fo(d.line,d.ch+f),o);f+=h.textContent.length}}function ce(e,t,n,i,r){function o(e){return function(t){return t.id==e}}function s(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(null!=n)return""==n&&(n=t.textContent.replace(/\u200b/g,"")),void(a+=n);var u,d=t.getAttribute("cm-marker");if(d){var h=e.findMarks(Fo(i,0),Fo(r+1,0),o(+d));return void(h.length&&(u=h[0].find())&&(a+=Ki(e.doc,u.from,u.to).join(c)))}if("false"==t.getAttribute("contenteditable"))return;for(var f=0;f=0){var s=Z(o.from(),r.from()),a=$(o.to(),r.to()),l=o.empty()?r.from()==r.head:o.from()==o.head;t>=i&&--t,e.splice(--i,2,new de(l?a:s,l?s:a))}}return new ue(e,t)}function fe(e,t){return new ue([new de(e,t||e)],0)}function pe(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function ge(e,t){if(t.linen?Fo(n,Qi(e,n).text.length):me(t,Qi(e,t.line).text.length)}function me(e,t){var n=e.ch;return null==n||n>t?Fo(e.line,t):0>n?Fo(e.line,0):e}function ve(e,t){return t>=e.first&&t=t.ch:a.to>t.ch))){if(r&&(As(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--s;continue}break}if(!l.atomic)continue;if(n){var c,u=l.find(0>i?1:-1);if((0>i?l.inclusiveRight:l.inclusiveLeft)&&(u=Ae(e,u,-i,u&&u.line==t.line?o:null)),u&&u.line==t.line&&(c=Po(u,n))&&(0>i?0>c:c>0))return He(e,u,t,i,r)}var d=l.find(0>i?-1:1);return(0>i?l.inclusiveLeft:l.inclusiveRight)&&(d=Ae(e,d,i,d.line==t.line?o:null)),d?He(e,d,t,i,r):null}}return t}function Ne(e,t,n,i,r){var o=i||1,s=He(e,t,n,o,r)||!r&&He(e,t,n,o,!0)||He(e,t,n,-o,r)||!r&&He(e,t,n,-o,!0);return s?s:(e.cantEdit=!0,Fo(e.first,0))}function Ae(e,t,n,i){return 0>n&&0==t.ch?t.line>e.first?ge(e,Fo(t.line-1)):null:n>0&&t.ch==(i||Qi(e,t.line)).text.length?t.line=e.display.viewTo||a.to().linet&&(t=0),t=Math.round(t),i=Math.round(i),a.appendChild(jr("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px; top: "+t+"px; width: "+(null==n?u-e:n)+"px; height: "+(i-t)+"px"))}function r(t,n,r){function o(n,i){return ht(e,Fo(t,n),"div",d,i)}var a,l,d=Qi(s,t),h=d.text.length;return eo(rr(d),n||0,null==r?h:r,function(e,t,s){var d,f,p,g=o(e,"left");if(e==t)d=g,f=p=g.left;else{if(d=o(t-1,"right"),"rtl"==s){var m=g;g=d,d=m}f=g.left,p=d.right}null==n&&0==e&&(f=c),d.top-g.top>3&&(i(f,g.top,null,g.bottom),f=c,g.bottoml.bottom||d.bottom==l.bottom&&d.right>l.right)&&(l=d),c+1>f&&(f=c),i(f,d.top,p-f,d.bottom)}),{start:a,end:l}}var o=e.display,s=e.doc,a=document.createDocumentFragment(),l=qe(e.display),c=l.left,u=Math.max(o.sizerWidth,Ve(e)-o.sizer.offsetLeft)-l.right,d=t.from(),h=t.to();if(d.line==h.line)r(d.line,d.ch,h.ch);else{var f=Qi(s,d.line),p=Qi(s,h.line),g=yi(f)==yi(p),m=r(d.line,d.ch,g?f.text.length+1:null).end,v=r(h.line,g?0:null,h.ch).start;g&&(m.top0?t.blinker=setInterval(function(){t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Pe(e,t){e.doc.mode.startState&&e.doc.frontier=e.display.viewTo)){var n=+new Date+e.options.workTime,i=ls(t.mode,je(e,t.frontier)),r=[];t.iter(t.frontier,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(t.frontier>=e.display.viewFrom){var s=o.styles,a=o.text.length>e.options.maxHighlightLength,l=zi(e,o,a?ls(t.mode,i):i,!0);o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var d=!s||s.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),h=0;!d&&hn?(Pe(e,e.options.workDelay),!0):void 0}),r.length&&Dt(e,function(){for(var t=0;ts;--a){if(a<=o.first)return o.first;var l=Qi(o,a-1);if(l.stateAfter&&(!n||a<=o.frontier))return a;var c=Ws(l.text,null,e.options.tabSize);(null==r||i>c)&&(r=a-1,i=c)}return r}function je(e,t,n){var i=e.doc,r=e.display;if(!i.mode.startState)return!0;var o=Be(e,t,n),s=o>i.first&&Qi(i,o-1).stateAfter;return s=s?ls(i.mode,s):cs(i.mode),i.iter(o,t,function(n){Ii(e,n.text,s);var a=o==t-1||o%5==0||o>=r.viewFrom&&o2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Xe(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var i=0;in)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Qe(e,t){t=yi(t);var n=tr(t),i=e.display.externalMeasured=new At(e.doc,t,n);i.lineN=n;var r=i.built=Fi(e,i);return i.text=r.pre,Ur(e.display.lineMeasure,r.pre),i}function Ke(e,t,n,i){return tt(e,et(e,t),n,i)}function Je(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt?(r=0,o=1,s="left"):c>t?(r=t-l,o=r+1):(a==e.length-3||t==c&&e[a+3]>t)&&(o=c-l,r=o-1,t>=c&&(s="right")),null!=r){if(i=e[a+2],l==c&&n==(i.insertLeft?"left":"right")&&(s=n),"left"==n&&0==r)for(;a&&e[a-2]==e[a-3]&&e[a-1].insertLeft;)i=e[(a-=3)+2],s="left";if("right"==n&&r==c-l)for(;au;u++){for(;a&&Br(t.line.text.charAt(o.coverStart+a));)--a;for(;o.coverStart+lwo&&0==a&&l==o.coverEnd-o.coverStart)r=s.parentNode.getBoundingClientRect();else if(bo&&e.options.lineWrapping){var d=Us(s,a,l).getClientRects();r=d.length?d["right"==i?d.length-1:0]:Uo}else r=Us(s,a,l).getBoundingClientRect()||Uo;if(r.left||r.right||0==a)break;l=a,a-=1,c="right"}bo&&11>wo&&(r=rt(e.display.measure,r))}else{a>0&&(c=i="right");var d;r=e.options.lineWrapping&&(d=s.getClientRects()).length>1?d["right"==i?d.length-1:0]:s.getBoundingClientRect()}if(bo&&9>wo&&!a&&(!r||!r.left&&!r.right)){var h=s.parentNode.getClientRects()[0];r=h?{left:h.left,right:h.left+bt(e.display),top:h.top,bottom:h.bottom}:Uo}for(var f=r.top-t.rect.top,p=r.bottom-t.rect.top,g=(f+p)/2,m=t.view.measure.heights,u=0;un.from?s(e-1):s(e,i)}i=i||Qi(e.doc,t.line),r||(r=et(e,i));var l=rr(i),c=t.ch;if(!l)return s(c);var u=co(l,c),d=a(c,u);return null!=sa&&(d.other=a(c,sa)),d}function pt(e,t){var n=0,t=ge(e.doc,t);e.options.lineWrapping||(n=bt(e.display)*t.ch);var i=Qi(e.doc,t.line),r=ir(i)+Ye(e.display);return{left:n,right:n,top:r,bottom:r+i.height}}function gt(e,t,n,i){var r=Fo(e,t);return r.xRel=i,n&&(r.outside=!0),r}function mt(e,t,n){var i=e.doc;if(n+=e.display.viewOffset,0>n)return gt(i.first,0,!0,-1);var r=nr(i,n),o=i.first+i.size-1;if(r>o)return gt(i.first+i.size-1,Qi(i,o).text.length,!0,1);0>t&&(t=0);for(var s=Qi(i,r);;){var a=vt(e,s,r,t,n),l=mi(s),c=l&&l.find(0,!0);if(!l||!(a.ch>c.from.ch||a.ch==c.from.ch&&a.xRel>0))return a;r=tr(s=c.to.line)}}function vt(e,t,n,i,r){function o(i){var r=ft(e,Fo(n,i),"line",t,c);return a=!0,s>r.bottom?r.left-l:sm)return gt(n,f,v,1);for(;;){if(u?f==h||f==ho(t,h,1):1>=f-h){for(var y=p>i||m-i>=i-p?h:f,b=i-(y==h?p:m);Br(t.text.charAt(y));)++y;var w=gt(n,y,y==h?g:v,-1>b?-1:b>1?1:0);return w}var x=Math.ceil(d/2),k=h+x;if(u){k=h;for(var S=0;x>S;++S)k=ho(t,k,1)}var C=o(k);C>i?(f=k,m=C,(v=a)&&(m+=1e3),d=x):(h=k,p=C,g=a,d-=x)}}function yt(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Bo){Bo=jr("pre");for(var t=0;49>t;++t)Bo.appendChild(document.createTextNode("x")),Bo.appendChild(jr("br"));Bo.appendChild(document.createTextNode("x"))}Ur(e.measure,Bo);var n=Bo.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),Yr(e.measure),n||1}function bt(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=jr("span","xxxxxxxxxx"),n=jr("pre",[t]);Ur(e.measure,n);var i=t.getBoundingClientRect(),r=(i.right-i.left)/10;return r>2&&(e.cachedCharWidth=r),r||10}function wt(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Go},qo?qo.ops.push(e.curOp):e.curOp.ownsGroup=qo={ops:[e.curOp],delayedCallbacks:[]}}function xt(e){var t=e.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new T(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Tt(e){e.updatedDisplay=e.mustUpdate&&_(e.cm,e.update)}function Et(e){var t=e.cm,n=t.display;e.updatedDisplay&&H(t),e.barMeasure=p(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ke(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Ge(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Ve(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection(e.focus))}function _t(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLefto;o=i){var s=new At(e.doc,Qi(e.doc,o),o);i=o+s.size,r.push(s)}return r}function Rt(e,t,n,i){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),i||(i=0);var r=e.display;if(i&&nt)&&(r.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=r.viewTo)Oo&&wi(e.doc,t)r.viewFrom?Ot(e):(r.viewFrom+=i,r.viewTo+=i);else if(t<=r.viewFrom&&n>=r.viewTo)Ot(e);else if(t<=r.viewFrom){var o=Pt(e,n,n+i,1);o?(r.view=r.view.slice(o.index),r.viewFrom=o.lineN,r.viewTo+=i):Ot(e)}else if(n>=r.viewTo){var o=Pt(e,t,t,-1);o?(r.view=r.view.slice(0,o.index),r.viewTo=o.lineN):Ot(e)}else{var s=Pt(e,t,t,-1),a=Pt(e,n,n+i,1);s&&a?(r.view=r.view.slice(0,s.index).concat(zt(e,s.lineN,a.lineN)).concat(r.view.slice(a.index)),r.viewTo+=i):Ot(e)}var l=r.externalMeasured;l&&(n=r.lineN&&t=i.viewTo)){var o=i.view[Ft(e,t)];if(null!=o.node){var s=o.changes||(o.changes=[]);-1==Ar(s,n)&&s.push(n)}}}function Ot(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Ft(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,0>t)return null;for(var n=e.display.view,i=0;it)return i}function Pt(e,t,n,i){var r,o=Ft(e,t),s=e.display.view;if(!Oo||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var a=0,l=e.display.viewFrom;o>a;a++)l+=s[a].size;if(l!=t){if(i>0){if(o==s.length-1)return null;r=l+s[o].size-t,o++}else r=l-t;t+=r,n+=r}for(;wi(e.doc,n)!=n;){if(o==(0>i?0:s.length-1))return null;n+=i*s[o-(0>i?1:0)].size,o+=i}return{index:o,lineN:n}}function Wt(e,t,n){var i=e.display,r=i.view;0==r.length||t>=i.viewTo||n<=i.viewFrom?(i.view=zt(e,t,n),i.viewFrom=t):(i.viewFrom>t?i.view=zt(e,t,i.viewFrom).concat(i.view):i.viewFromn&&(i.view=i.view.slice(0,Ft(e,n)))),i.viewTo=n}function Bt(e){for(var t=e.display.view,n=0,i=0;i400}var r=e.display;Ms(r.scroller,"mousedown",Mt(e,Vt)),bo&&11>wo?Ms(r.scroller,"dblclick",Mt(e,function(t){if(!Er(e,t)){var n=Gt(e,t);if(n&&!Kt(e,t)&&!qt(e.display,t)){_s(t);var i=e.findWordAt(n);we(e.doc,i.anchor,i.head)}}})):Ms(r.scroller,"dblclick",function(t){Er(e,t)||_s(t)}),Ro||Ms(r.scroller,"contextmenu",function(t){bn(e,t)});var o,s={end:0};Ms(r.scroller,"touchstart",function(t){if(!Er(e,t)&&!n(t)){clearTimeout(o);var i=+new Date;r.activeTouch={start:i,moved:!1,prev:i-s.end<=300?s:null},1==t.touches.length&&(r.activeTouch.left=t.touches[0].pageX,r.activeTouch.top=t.touches[0].pageY)}}),Ms(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),Ms(r.scroller,"touchend",function(n){var o=r.activeTouch;if(o&&!qt(r,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var s,a=e.coordsChar(r.activeTouch,"page");s=!o.prev||i(o,o.prev)?new de(a,a):!o.prev.prev||i(o,o.prev.prev)?e.findWordAt(a):new de(Fo(a.line,0),ge(e.doc,Fo(a.line+1,0))),e.setSelection(s.anchor,s.head),e.focus(),_s(n)}t()}),Ms(r.scroller,"touchcancel",t),Ms(r.scroller,"scroll",function(){r.scroller.clientHeight&&(rn(e,r.scroller.scrollTop),on(e,r.scroller.scrollLeft,!0),As(e,"scroll",e))}),Ms(r.scroller,"mousewheel",function(t){sn(e,t)}),Ms(r.scroller,"DOMMouseScroll",function(t){sn(e,t)}),Ms(r.wrapper,"scroll",function(){r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(t){Er(e,t)||Ds(t)},over:function(t){Er(e,t)||(tn(e,t),Ds(t))},start:function(t){en(e,t)},drop:Mt(e,Jt),leave:function(t){Er(e,t)||nn(e)}};var a=r.input.getField();Ms(a,"keyup",function(t){pn.call(e,t)}),Ms(a,"keydown",Mt(e,hn)),Ms(a,"keypress",Mt(e,gn)),Ms(a,"focus",Fr(vn,e)),Ms(a,"blur",Fr(yn,e))}function Yt(t,n,i){var r=i&&i!=e.Init;if(!n!=!r){var o=t.display.dragFunctions,s=n?Ms:Ns;s(t.display.scroller,"dragstart",o.start),s(t.display.scroller,"dragenter",o.enter),s(t.display.scroller,"dragover",o.over),s(t.display.scroller,"dragleave",o.leave),s(t.display.scroller,"drop",o.drop)}}function Ut(e){var t=e.display;t.lastWrapHeight==t.wrapper.clientHeight&&t.lastWrapWidth==t.wrapper.clientWidth||(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}function qt(e,t){for(var n=xr(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function Gt(e,t,n,i){var r=e.display;if(!n&&"true"==xr(t).getAttribute("cm-not-content"))return null;var o,s,a=r.lineSpace.getBoundingClientRect();try{o=t.clientX-a.left,s=t.clientY-a.top}catch(e){return null}var l,c=mt(e,o,s);if(i&&1==c.xRel&&(l=Qi(e.doc,c.line).text).length==c.ch){var u=Ws(l,l.length,e.options.tabSize)-l.length;c=Fo(c.line,Math.max(0,Math.round((o-qe(e.display).left)/bt(e.display))-u))}return c}function Vt(e){var t=this,n=t.display;if(!(Er(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.shift=e.shiftKey,qt(n,e))return void(xo||(n.scroller.draggable=!1,setTimeout(function(){n.scroller.draggable=!0},100)));if(!Kt(t,e)){var i=Gt(t,e);switch(window.focus(),kr(e)){case 1:t.state.selectingText?t.state.selectingText(e):i?$t(t,e,i):xr(e)==n.scroller&&_s(e);break;case 2:xo&&(t.state.lastMiddleDown=+new Date),i&&we(t.doc,i),setTimeout(function(){n.input.focus()},20),_s(e);break;case 3:Ro?bn(t,e):mn(t)}}}}function $t(e,t,n){bo?setTimeout(Fr(X,e),0):e.curOp.focus=qr();var i,r=+new Date;Yo&&Yo.time>r-400&&0==Po(Yo.pos,n)?i="triple":jo&&jo.time>r-400&&0==Po(jo.pos,n)?(i="double",Yo={time:r,pos:n}):(i="single",jo={time:r,pos:n});var o,s=e.doc.sel,a=Mo?t.metaKey:t.ctrlKey;e.options.dragDrop&&ea&&!e.isReadOnly()&&"single"==i&&(o=s.contains(n))>-1&&(Po((o=s.ranges[o]).from(),n)<0||n.xRel>0)&&(Po(o.to(),n)>0||n.xRel<0)?Zt(e,t,n,a):Xt(e,t,n,i,a)}function Zt(e,t,n,i){var r=e.display,o=+new Date,s=Mt(e,function(a){xo&&(r.scroller.draggable=!1),e.state.draggingText=!1,Ns(document,"mouseup",s),Ns(r.scroller,"drop",s),Math.abs(t.clientX-a.clientX)+Math.abs(t.clientY-a.clientY)<10&&(_s(a),!i&&+new Date-200=p;p++){var v=Qi(c,p).text,y=Bs(v,l,o);l==f?r.push(new de(Fo(p,y),Fo(p,y))):v.length>y&&r.push(new de(Fo(p,y),Fo(p,Bs(v,f,o))))}r.length||r.push(new de(n,n)),Ee(c,he(h.ranges.slice(0,d).concat(r),d),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b=u,w=b.anchor,x=t;if("single"!=i){if("double"==i)var k=e.findWordAt(t);else var k=new de(Fo(t.line,0),ge(c,Fo(t.line+1,0)));Po(k.anchor,w)>0?(x=k.head,w=Z(b.from(),k.anchor)):(x=k.anchor,w=$(b.to(),k.head))}var r=h.ranges.slice(0);r[d]=new de(ge(c,w),x),Ee(c,he(r,d),Fs)}}function s(t){var n=++y,r=Gt(e,t,!0,"rect"==i);if(r)if(0!=Po(r,m)){e.curOp.focus=qr(),o(r);var a=w(l,c);(r.line>=a.to||r.linev.bottom?20:0;u&&setTimeout(Mt(e,function(){y==n&&(l.scroller.scrollTop+=u,s(t))}),50)}}function a(t){e.state.selectingText=!1,y=1/0,_s(t),l.input.focus(),Ns(document,"mousemove",b),Ns(document,"mouseup",x),c.history.lastSelOrigin=null}var l=e.display,c=e.doc;_s(t);var u,d,h=c.sel,f=h.ranges;if(r&&!t.shiftKey?(d=c.sel.contains(n),u=d>-1?f[d]:new de(n,n)):(u=c.sel.primary(),d=c.sel.primIndex),Ho?t.shiftKey&&t.metaKey:t.altKey)i="rect",r||(u=new de(n,n)),n=Gt(e,t,!0,!0),d=-1;else if("double"==i){var p=e.findWordAt(n);u=e.display.shift||c.extend?be(c,u,p.anchor,p.head):p}else if("triple"==i){var g=new de(Fo(n.line,0),ge(c,Fo(n.line+1,0)));u=e.display.shift||c.extend?be(c,u,g.anchor,g.head):g}else u=be(c,u,n);r?-1==d?(d=f.length,Ee(c,he(f.concat([u]),d),{scroll:!1,origin:"*mouse"})):f.length>1&&f[d].empty()&&"single"==i&&!t.shiftKey?(Ee(c,he(f.slice(0,d).concat(f.slice(d+1)),0),{scroll:!1,origin:"*mouse"}),h=c.sel):ke(c,d,u,Fs):(d=0,Ee(c,new ue([u],0),Fs),h=c.sel);var m=n,v=l.wrapper.getBoundingClientRect(),y=0,b=Mt(e,function(e){kr(e)?s(e):a(e)}),x=Mt(e,a);e.state.selectingText=x,Ms(document,"mousemove",b),Ms(document,"mouseup",x)}function Qt(e,t,n,i){try{var r=t.clientX,o=t.clientY}catch(e){return!1}if(r>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;i&&_s(t);var s=e.display,a=s.lineDiv.getBoundingClientRect();if(o>a.bottom||!Lr(e,n))return wr(t);o-=a.top-s.viewOffset;for(var l=0;l=r){var u=nr(e.doc,o),d=e.options.gutters[l];return As(e,n,e,u,d,t),wr(t)}}}function Kt(e,t){return Qt(e,t,"gutterClick",!0)}function Jt(e){var t=this;if(nn(t),!Er(t,e)&&!qt(t.display,e)){_s(e),bo&&(Vo=+new Date);var n=Gt(t,e,!0),i=e.dataTransfer.files; -if(n&&!t.isReadOnly())if(i&&i.length&&window.FileReader&&window.File)for(var r=i.length,o=Array(r),s=0,a=function(e,i){if(!t.options.allowDropFileTypes||-1!=Ar(t.options.allowDropFileTypes,e.type)){var a=new FileReader;a.onload=Mt(t,function(){var e=a.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),o[i]=e,++s==r){n=ge(t.doc,n);var l={from:n,to:n,text:t.doc.splitLines(o.join(t.doc.lineSeparator())),origin:"paste"};En(t.doc,l),Te(t.doc,fe(n,Jo(l)))}}),a.readAsText(e)}},l=0;r>l;++l)a(i[l],l);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout(function(){t.display.input.focus()},20);try{var o=e.dataTransfer.getData("Text");if(o){if(t.state.draggingText&&!(Mo?e.altKey:e.ctrlKey))var c=t.listSelections();if(_e(t.doc,fe(n,n)),c)for(var l=0;ls.clientWidth,l=s.scrollHeight>s.clientHeight;if(i&&a||r&&l){if(r&&Mo&&xo)e:for(var c=t.target,u=o.view;c!=s;c=c.parentNode)for(var d=0;dh?f=Math.max(0,f+h-50):p=Math.min(e.doc.height,p+h+50),D(e,{top:f,bottom:p})}20>$o&&(null==o.wheelStartX?(o.wheelStartX=s.scrollLeft,o.wheelStartY=s.scrollTop,o.wheelDX=i,o.wheelDY=r,setTimeout(function(){if(null!=o.wheelStartX){var e=s.scrollLeft-o.wheelStartX,t=s.scrollTop-o.wheelStartY,n=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null,n&&(Zo=(Zo*$o+n)/($o+1),++$o)}},200)):(o.wheelDX+=i,o.wheelDY+=r))}}function an(e,t,n){if("string"==typeof t&&(t=us[t],!t))return!1;e.display.input.ensurePolled();var i=e.display.shift,r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),r=t(e)!=Is}finally{e.display.shift=i,e.state.suppressEdits=!1}return r}function ln(e,t,n){for(var i=0;iwo&&27==e.keyCode&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=16==n||e.shiftKey;var i=un(t,e);Co&&(Ko=i?n:null,!i&&88==n&&!ia&&(Mo?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=n||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||fn(t)}}function fn(e){function t(e){18!=e.keyCode&&e.altKey||(Qs(n,"CodeMirror-crosshair"),Ns(document,"keyup",t),Ns(document,"mouseover",t))}var n=e.display.lineDiv;Ks(n,"CodeMirror-crosshair"),Ms(document,"keyup",t),Ms(document,"mouseover",t)}function pn(e){16==e.keyCode&&(this.doc.sel.shift=!1),Er(this,e)}function gn(e){var t=this;if(!(qt(t.display,e)||Er(t,e)||e.ctrlKey&&!e.altKey||Mo&&e.metaKey)){var n=e.keyCode,i=e.charCode;if(Co&&n==Ko)return Ko=null,void _s(e);if(!Co||e.which&&!(e.which<10)||!un(t,e)){var r=String.fromCharCode(null==i?n:i);dn(t,e,r)||t.display.input.onKeyPress(e)}}}function mn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,yn(e))},100)}function vn(e){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(As(e,"focus",e),e.state.focused=!0,Ks(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),xo&&setTimeout(function(){e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Fe(e))}function yn(e){e.state.delayingBlurEvent||(e.state.focused&&(As(e,"blur",e),e.state.focused=!1,Qs(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function bn(e,t){qt(e.display,t)||wn(e,t)||Er(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function wn(e,t){return!!Lr(e,"gutterContextMenu")&&Qt(e,t,"gutterContextMenu",!1)}function xn(e,t){if(Po(e,t.from)<0)return e;if(Po(e,t.to)<=0)return Jo(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,i=e.ch;return e.line==t.to.line&&(i+=Jo(t).ch-t.to.ch),Fo(n,i)}function kn(e,t){for(var n=[],i=0;i=0;--r)_n(e,{from:i[r].from,to:i[r].to,text:r?[""]:t.text});else _n(e,t)}}function _n(e,t){if(1!=t.text.length||""!=t.text[0]||0!=Po(t.from,t.to)){var n=kn(e,t);cr(e,t,n,e.cm?e.cm.curOp.id:NaN),Mn(e,t,n,oi(e,t));var i=[];Zi(e,function(e,n){n||-1!=Ar(i,e.history)||(br(e.history,t),i.push(e.history)),Mn(e,t,null,oi(e,t))})}}function Ln(e,t,n){if(!e.cm||!e.cm.state.suppressEdits){for(var i,r=e.history,o=e.sel,s="undo"==t?r.done:r.undone,a="undo"==t?r.undone:r.done,l=0;l=0;--l){var d=i.changes[l];if(d.origin=t,u&&!Tn(e,d,!1))return void(s.length=0);c.push(sr(e,d));var h=l?kn(e,d):Nr(s);Mn(e,d,h,ai(e,d)),!l&&e.cm&&e.cm.scrollIntoView({from:d.from,to:Jo(d)});var f=[];Zi(e,function(e,t){t||-1!=Ar(f,e.history)||(br(e.history,d),f.push(e.history)),Mn(e,d,null,ai(e,d))})}}}}function Dn(e,t){if(0!=t&&(e.first+=t,e.sel=new ue(zr(e.sel.ranges,function(e){return new de(Fo(e.anchor.line+t,e.anchor.ch),Fo(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Rt(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,i=n.viewFrom;ie.lastLine())){if(t.from.lineo&&(t={from:t.from,to:Fo(o,Qi(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ki(e,t.from,t.to),n||(n=kn(e,t)),e.cm?Hn(e.cm,t,i):Gi(e,t,i),_e(e,n,Os)}}function Hn(e,t,n){var i=e.doc,r=e.display,s=t.from,a=t.to,l=!1,c=s.line;e.options.lineWrapping||(c=tr(yi(Qi(i,s.line))),i.iter(c,a.line+1,function(e){return e==r.maxLine?(l=!0,!0):void 0})),i.sel.contains(t.from,t.to)>-1&&_r(e),Gi(i,t,n,o(e)),e.options.lineWrapping||(i.iter(c,s.line+t.text.length,function(e){var t=d(e);t>r.maxLineLength&&(r.maxLine=e,r.maxLineLength=t,r.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),i.frontier=Math.min(i.frontier,s.line),Pe(e,400);var u=t.text.length-(a.line-s.line)-1;t.full?Rt(e):s.line!=a.line||1!=t.text.length||qi(e.doc,t)?Rt(e,s.line,a.line+1,u):It(e,s.line,"text");var h=Lr(e,"changes"),f=Lr(e,"change");if(f||h){var p={from:s,to:a,text:t.text,removed:t.removed,origin:t.origin};f&&Cr(e,"change",e,p),h&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(p)}e.display.selForContextMenu=null}function Nn(e,t,n,i,r){if(i||(i=n),Po(i,n)<0){var o=i;i=n,n=o}"string"==typeof t&&(t=e.splitLines(t)),En(e,{from:n,to:i,text:t,origin:r})}function An(e,t){if(!Er(e,"scrollCursorIntoView")){var n=e.display,i=n.sizer.getBoundingClientRect(),r=null;if(t.top+i.top<0?r=!0:t.bottom+i.top>(window.innerHeight||document.documentElement.clientHeight)&&(r=!1),null!=r&&!_o){var o=jr("div","​",null,"position: absolute; top: "+(t.top-n.viewOffset-Ye(e.display))+"px; height: "+(t.bottom-t.top+Ge(e)+n.barHeight)+"px; left: "+t.left+"px; width: 2px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(r),e.display.lineSpace.removeChild(o)}}}function zn(e,t,n,i){null==i&&(i=0);for(var r=0;5>r;r++){var o=!1,s=ft(e,t),a=n&&n!=t?ft(e,n):s,l=In(e,Math.min(s.left,a.left),Math.min(s.top,a.top)-i,Math.max(s.left,a.left),Math.max(s.bottom,a.bottom)+i),c=e.doc.scrollTop,u=e.doc.scrollLeft;if(null!=l.scrollTop&&(rn(e,l.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(o=!0)),null!=l.scrollLeft&&(on(e,l.scrollLeft),Math.abs(e.doc.scrollLeft-u)>1&&(o=!0)),!o)break}return s}function Rn(e,t,n,i,r){var o=In(e,t,n,i,r);null!=o.scrollTop&&rn(e,o.scrollTop),null!=o.scrollLeft&&on(e,o.scrollLeft)}function In(e,t,n,i,r){var o=e.display,s=yt(e.display);0>n&&(n=0);var a=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:o.scroller.scrollTop,l=$e(e),c={};r-n>l&&(r=n+l);var u=e.doc.height+Ue(o),d=s>n,h=r>u-s;if(a>n)c.scrollTop=d?0:n;else if(r>a+l){var f=Math.min(n,(h?u:r)-l);f!=a&&(c.scrollTop=f)}var p=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:o.scroller.scrollLeft,g=Ve(e)-(e.options.fixedGutter?o.gutters.offsetWidth:0),m=i-t>g;return m&&(i=t+g),10>t?c.scrollLeft=0:p>t?c.scrollLeft=Math.max(0,t-(m?0:10)):i>g+p-3&&(c.scrollLeft=i+(m?0:10)-g),c}function On(e,t,n){null==t&&null==n||Pn(e),null!=t&&(e.curOp.scrollLeft=(null==e.curOp.scrollLeft?e.doc.scrollLeft:e.curOp.scrollLeft)+t),null!=n&&(e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+n)}function Fn(e){Pn(e);var t=e.getCursor(),n=t,i=t;e.options.lineWrapping||(n=t.ch?Fo(t.line,t.ch-1):t,i=Fo(t.line,t.ch+1)),e.curOp.scrollToPos={from:n,to:i,margin:e.options.cursorScrollMargin,isCursor:!0}}function Pn(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=pt(e,t.from),i=pt(e,t.to),r=In(e,Math.min(n.left,i.left),Math.min(n.top,i.top)-t.margin,Math.max(n.right,i.right),Math.max(n.bottom,i.bottom)+t.margin);e.scrollTo(r.scrollLeft,r.scrollTop)}}function Wn(e,t,n,i){var r,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?r=je(e,t):n="prev");var s=e.options.tabSize,a=Qi(o,t),l=Ws(a.text,null,s);a.stateAfter&&(a.stateAfter=null);var c,u=a.text.match(/^\s*/)[0];if(i||/\S/.test(a.text)){if("smart"==n&&(c=o.mode.indent(r,a.text.slice(u.length),a.text),c==Is||c>150)){if(!i)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>o.first?Ws(Qi(o,t-1).text,null,s):0:"add"==n?c=l+e.options.indentUnit:"subtract"==n?c=l-e.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var d="",h=0;if(e.options.indentWithTabs)for(var f=Math.floor(c/s);f;--f)h+=s,d+="\t";if(c>h&&(d+=Hr(c-h)),d!=u)return Nn(o,d,Fo(t,0),Fo(t,u.length),"+input"),a.stateAfter=null,!0;for(var f=0;f=0;t--)Nn(e.doc,"",i[t].from,i[t].to,"+delete");Fn(e)})}function Yn(e,t,n,i,r){function o(){var t=a+n;return!(t=e.first+e.size)&&(a=t,u=Qi(e,t))}function s(e){var t=(r?ho:fo)(u,l,n,!0);if(null==t){if(e||!o())return!1;l=r?(0>n?ro:io)(u):0>n?u.text.length:0}else l=t;return!0}var a=t.line,l=t.ch,c=n,u=Qi(e,a);if("char"==i)s();else if("column"==i)s(!0);else if("word"==i||"group"==i)for(var d=null,h="group"==i,f=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(0>n)||s(!p);p=!1){var g=u.text.charAt(l)||"\n",m=Pr(g,f)?"w":h&&"\n"==g?"n":!h||/\s/.test(g)?null:"p";if(!h||p||m||(m="s"),d&&d!=m){0>n&&(n=1,s());break}if(m&&(d=m),n>0&&!s(!p))break}var v=Ne(e,Fo(a,l),t,c,!0);return Po(t,v)||(v.hitSide=!0),v}function Un(e,t,n,i){var r,o=e.doc,s=t.left;if("page"==i){var a=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);r=t.top+n*(a-(0>n?1.5:.5)*yt(e.display))}else"line"==i&&(r=n>0?t.bottom+3:t.top-3);for(;;){var l=mt(e,s,r);if(!l.outside)break;if(0>n?0>=r:r>=o.height){l.hitSide=!0;break}r+=5*n}return l}function qn(t,n,i,r){e.defaults[t]=n,i&&(ts[t]=r?function(e,t,n){n!=ns&&i(e,t,n)}:i)}function Gn(e){for(var t,n,i,r,o=e.split(/-(?!$)/),e=o[o.length-1],s=0;s0||0==s&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=jr("span",[o.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(vi(e,t.line,t,n,o)||t.line!=n.line&&vi(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Oo=!0}o.addToHistory&&cr(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var a,l=t.line,c=e.cm;if(e.iter(l,n.line+1,function(e){c&&o.collapsed&&!c.options.lineWrapping&&yi(e)==c.display.maxLine&&(a=!0),o.collapsed&&l!=t.line&&er(e,0),ni(e,new Jn(o,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l}),o.collapsed&&e.iter(t.line,n.line+1,function(t){ki(e,t)&&er(t,0)}),o.clearOnEnter&&Ms(o,"beforeCursorEnter",function(){o.clear()}),o.readOnly&&(Io=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++ms,o.atomic=!0),c){if(a&&(c.curOp.updateMaxLine=!0),o.collapsed)Rt(c,t.line,n.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var u=t.line;u<=n.line;u++)It(c,u,"text");o.atomic&&De(c.doc),Cr(c,"markerAdded",c,o)}return o}function Zn(e,t,n,i,r){i=Or(i),i.shared=!1;var o=[$n(e,t,n,i,r)],s=o[0],a=i.widgetNode;return Zi(e,function(e){a&&(i.widgetNode=a.cloneNode(!0)),o.push($n(e,ge(e,t),ge(e,n),i,r));for(var l=0;l=t:o.to>t);(i||(i=[])).push(new Jn(s,o.from,l?null:o.to))}}return i}function ri(e,t,n){if(e)for(var i,r=0;r=t:o.to>t);if(a||o.from==t&&"bookmark"==s.type&&(!n||o.marker.insertLeft)){var l=null==o.from||(s.inclusiveLeft?o.from<=t:o.from0&&a)for(var d=0;dd;++d)p.push(g);p.push(l)}return p}function si(e){for(var t=0;t0)){var u=[l,1],d=Po(c.from,a.from),h=Po(c.to,a.to);(0>d||!s.inclusiveLeft&&!d)&&u.push({from:c.from,to:a.from}),(h>0||!s.inclusiveRight&&!h)&&u.push({from:a.to,to:c.to}),r.splice.apply(r,u),l+=u.length-1}}return r}function ci(e){var t=e.markedSpans;if(t){for(var n=0;n=0&&0>=d||0>=u&&d>=0)&&(0>=u&&(l.marker.inclusiveRight&&r.inclusiveLeft?Po(c.to,n)>=0:Po(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?Po(c.from,i)<=0:Po(c.from,i)<0)))return!0}}}function yi(e){for(var t;t=gi(e);)e=t.find(-1,!0).line;return e}function bi(e){for(var t,n;t=mi(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function wi(e,t){var n=Qi(e,t),i=yi(n);return n==i?t:tr(i)}function xi(e,t){if(t>e.lastLine())return t;var n,i=Qi(e,t);if(!ki(e,i))return t;for(;n=mi(i);)i=n.find(1,!0).line;return tr(i)+1}function ki(e,t){var n=Oo&&t.markedSpans;if(n)for(var i,r=0;ro;o++){r&&(r[0]=e.innerMode(t,i).mode);var s=t.token(n,i);if(n.pos>n.start)return s}throw new Error("Mode "+t.name+" failed to advance stream.")}function Ni(e,t,n,i){function r(e){return{start:d.start,end:d.pos,string:d.current(),type:o||null,state:e?ls(s.mode,u):u}}var o,s=e.doc,a=s.mode;t=ge(s,t);var l,c=Qi(s,t.line),u=je(e,t.line,n),d=new gs(c.text,e.options.tabSize);for(i&&(l=[]);(i||d.pose.options.maxHighlightLength?(a=!1,s&&Ii(e,t,i,d.pos),d.pos=t.length,l=null):l=Di(Hi(n,d,i,h),o),h){var f=h[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!a||u!=l){for(;cc;){var i=r[l];i>e&&r.splice(l,1,e,r[l+1],i),l+=2,c=Math.min(e,i)}if(t)if(a.opaque)r.splice(n,l-n,e,"cm-overlay "+t),l=n+2;else for(;l>n;n+=2){var o=r[n+1];r[n+1]=(o?o+" ":"")+"cm-overlay "+t}},o)}return{styles:r,classes:o.bgClass||o.textClass?o:null}}function Ri(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var i=je(e,tr(t)),r=zi(e,t,t.text.length>e.options.maxHighlightLength?ls(e.doc.mode,i):i);t.stateAfter=i,t.styles=r.styles,r.classes?t.styleClasses=r.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.frontier&&e.doc.frontier++}return t.styles}function Ii(e,t,n,i){var r=e.doc.mode,o=new gs(t,e.options.tabSize);for(o.start=o.pos=i||0,""==t&&Mi(r,n);!o.eol();)Hi(r,o,n),o.start=o.pos}function Oi(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?ks:xs;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Fi(e,t){var n=jr("span",null,null,xo?"padding-right: .1px":null),i={pre:jr("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,splitSpaces:(bo||xo)&&e.getOption("lineWrapping")};t.measure={};for(var r=0;r<=(t.rest?t.rest.length:0);r++){var o,s=r?t.rest[r-1]:t.line;i.pos=0,i.addToken=Wi,Kr(e.display.measure)&&(o=rr(s))&&(i.addToken=ji(i.addToken,o)),i.map=[];var a=t!=e.display.externalMeasured&&tr(s);Ui(s,i,Ri(e,s,a)),s.styleClasses&&(s.styleClasses.bgClass&&(i.bgClass=Vr(s.styleClasses.bgClass,i.bgClass||"")),s.styleClasses.textClass&&(i.textClass=Vr(s.styleClasses.textClass,i.textClass||""))),0==i.map.length&&i.map.push(0,0,i.content.appendChild(Qr(e.display.measure))),0==r?(t.measure.map=i.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(i.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(xo){var l=i.content.lastChild;(/\bcm-tab\b/.test(l.className)||l.querySelector&&l.querySelector(".cm-tab"))&&(i.content.className="cm-tab-wrap-hack")}return As(e,"renderLine",e,t.line,i.pre),i.pre.className&&(i.textClass=Vr(i.pre.className,i.textClass||"")),i}function Pi(e){var t=jr("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Wi(e,t,n,i,r,o,s){if(t){var a=e.splitSpaces?t.replace(/ {3,}/g,Bi):t,l=e.cm.state.specialChars,c=!1;if(l.test(t))for(var u=document.createDocumentFragment(),d=0;;){l.lastIndex=d;var h=l.exec(t),f=h?h.index-d:t.length-d;if(f){var p=document.createTextNode(a.slice(d,d+f));bo&&9>wo?u.appendChild(jr("span",[p])):u.appendChild(p),e.map.push(e.pos,e.pos+f,p),e.col+=f,e.pos+=f}if(!h)break;if(d+=f+1,"\t"==h[0]){var g=e.cm.options.tabSize,m=g-e.col%g,p=u.appendChild(jr("span",Hr(m),"cm-tab"));p.setAttribute("role","presentation"),p.setAttribute("cm-text","\t"),e.col+=m}else if("\r"==h[0]||"\n"==h[0]){var p=u.appendChild(jr("span","\r"==h[0]?"␍":"␤","cm-invalidchar"));p.setAttribute("cm-text",h[0]),e.col+=1}else{var p=e.cm.options.specialCharPlaceholder(h[0]);p.setAttribute("cm-text",h[0]),bo&&9>wo?u.appendChild(jr("span",[p])):u.appendChild(p),e.col+=1}e.map.push(e.pos,e.pos+1,p),e.pos++}else{e.col+=t.length;var u=document.createTextNode(a);e.map.push(e.pos,e.pos+t.length,u),bo&&9>wo&&(c=!0),e.pos+=t.length}if(n||i||r||c||s){var v=n||"";i&&(v+=i),r&&(v+=r);var y=jr("span",[u],v,s);return o&&(y.title=o),e.content.appendChild(y)}e.content.appendChild(u)}}function Bi(e){for(var t=" ",n=0;nc&&h.from<=c)break}if(h.to>=u)return e(n,i,r,o,s,a,l);e(n,i.slice(0,h.to-c),r,o,null,a,l),o=null,i=i.slice(h.to-c),c=h.to}}}function Yi(e,t,n,i){var r=!i&&n.widgetNode;r&&e.map.push(e.pos,e.pos+t,r),!i&&e.cm.display.input.needsContentAttribute&&(r||(r=e.content.appendChild(document.createElement("span"))),r.setAttribute("cm-marker",n.id)),r&&(e.cm.display.input.setUneditable(r),e.content.appendChild(r)),e.pos+=t}function Ui(e,t,n){var i=e.markedSpans,r=e.text,o=0;if(i)for(var s,a,l,c,u,d,h,f=r.length,p=0,g=1,m="",v=0;;){if(v==p){l=c=u=d=a="",h=null,v=1/0;for(var y,b=[],w=0;wp||k.collapsed&&x.to==p&&x.from==p)?(null!=x.to&&x.to!=p&&v>x.to&&(v=x.to,c=""),k.className&&(l+=" "+k.className),k.css&&(a=(a?a+";":"")+k.css),k.startStyle&&x.from==p&&(u+=" "+k.startStyle),k.endStyle&&x.to==v&&(y||(y=[])).push(k.endStyle,x.to),k.title&&!d&&(d=k.title),k.collapsed&&(!h||fi(h.marker,k)<0)&&(h=x)):x.from>p&&v>x.from&&(v=x.from)}if(y)for(var w=0;w=f)break;for(var S=Math.min(f,v);;){if(m){var C=p+m.length;if(!h){var T=C>S?m.slice(0,S-p):m;t.addToken(t,T,s?s+l:l,u,p+T.length==v?c:"",d,a)}if(C>=S){m=m.slice(S-p),p=S;break}p=C,u=""}m=r.slice(o,o=n[g++]),s=Oi(n[g++],t.cm.options)}}else for(var g=1;gn;++n)o.push(new ws(c[n],r(n),i));return o}var a=t.from,l=t.to,c=t.text,u=Qi(e,a.line),d=Qi(e,l.line),h=Nr(c),f=r(c.length-1),p=l.line-a.line;if(t.full)e.insert(0,s(0,c.length)),e.remove(c.length,e.size-c.length);else if(qi(e,t)){var g=s(0,c.length-1);o(d,d.text,f),p&&e.remove(a.line,p),g.length&&e.insert(a.line,g)}else if(u==d)if(1==c.length)o(u,u.text.slice(0,a.ch)+h+u.text.slice(l.ch),f);else{var g=s(1,c.length-1);g.push(new ws(h+u.text.slice(l.ch),f,i)),o(u,u.text.slice(0,a.ch)+c[0],r(0)),e.insert(a.line+1,g)}else if(1==c.length)o(u,u.text.slice(0,a.ch)+c[0]+d.text.slice(l.ch),r(0)),e.remove(a.line+1,p);else{o(u,u.text.slice(0,a.ch)+c[0],r(0)),o(d,h+d.text.slice(l.ch),f);var g=s(1,c.length-1);p>1&&e.remove(a.line+1,p-1),e.insert(a.line+1,g)}Cr(e,"change",e,t)}function Vi(e){this.lines=e,this.parent=null;for(var t=0,n=0;tt||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var i=0;;++i){var r=n.children[i],o=r.chunkSize();if(o>t){n=r;break}t-=o}return n.lines[t]}function Ki(e,t,n){var i=[],r=t.line;return e.iter(t.line,n.line+1,function(e){var o=e.text;r==n.line&&(o=o.slice(0,n.ch)),r==t.line&&(o=o.slice(t.ch)),i.push(o),++r}),i}function Ji(e,t,n){var i=[];return e.iter(t,n,function(e){i.push(e.text)}),i}function er(e,t){var n=t-e.height;if(n)for(var i=e;i;i=i.parent)i.height+=n}function tr(e){if(null==e.parent)return null;for(var t=e.parent,n=Ar(t.lines,e),i=t.parent;i;t=i,i=i.parent)for(var r=0;i.children[r]!=t;++r)n+=i.children[r].chunkSize();return n+t.first}function nr(e,t){var n=e.first;e:do{for(var i=0;it){e=r;continue e}t-=o,n+=r.chunkSize()}return n}while(!e.lines);for(var i=0;it)break;t-=a}return n+i}function ir(e){e=yi(e);for(var t=0,n=e.parent,i=0;i1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Nr(e.done)):void 0}function cr(e,t,n,i){var r=e.history;r.undone.length=0;var o,s=+new Date;if((r.lastOp==i||r.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&r.lastModTime>s-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=lr(r,r.lastOp==i))){var a=Nr(o.changes);0==Po(t.from,t.to)&&0==Po(t.from,a.to)?a.to=Jo(t):o.changes.push(sr(e,t))}else{var l=Nr(r.done);for(l&&l.ranges||hr(e.sel,r.done),o={changes:[sr(e,t)],generation:r.generation},r.done.push(o);r.done.length>r.undoDepth;)r.done.shift(),r.done[0].ranges||r.done.shift()}r.done.push(n),r.generation=++r.maxGeneration,r.lastModTime=r.lastSelTime=s,r.lastOp=r.lastSelOp=i,r.lastOrigin=r.lastSelOrigin=t.origin,a||As(e,"historyAdded")}function ur(e,t,n,i){var r=t.charAt(0);return"*"==r||"+"==r&&n.ranges.length==i.ranges.length&&n.somethingSelected()==i.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function dr(e,t,n,i){var r=e.history,o=i&&i.origin;n==r.lastSelOp||o&&r.lastSelOrigin==o&&(r.lastModTime==r.lastSelTime&&r.lastOrigin==o||ur(e,o,Nr(r.done),t))?r.done[r.done.length-1]=t:hr(t,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=o,r.lastSelOp=n,i&&i.clearRedo!==!1&&ar(r.undone)}function hr(e,t){var n=Nr(t);n&&n.ranges&&n.equals(e)||t.push(e)}function fr(e,t,n,i){var r=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,i),function(n){n.markedSpans&&((r||(r=t["spans_"+e.id]={}))[o]=n.markedSpans),++o})}function pr(e){if(!e)return null;for(var t,n=0;n-1&&(Nr(a)[d]=u[d],delete u[d])}}}return r}function vr(e,t,n,i){n0?i.slice():Hs:i||Hs}function Cr(e,t){function n(e){return function(){e.apply(null,o)}}var i=Sr(e,t,!1);if(i.length){var r,o=Array.prototype.slice.call(arguments,2);qo?r=qo.delayedCallbacks:zs?r=zs:(r=zs=[],setTimeout(Tr,0));for(var s=0;s0}function Dr(e){e.prototype.on=function(e,t){Ms(this,e,t)},e.prototype.off=function(e,t){Ns(this,e,t)}}function Mr(){this.id=null}function Hr(e){for(;js.length<=e;)js.push(Nr(js)+" ");return js[e]}function Nr(e){return e[e.length-1]}function Ar(e,t){for(var n=0;n-1&&Gs(e))||t.test(e):Gs(e)}function Wr(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function Br(e){return e.charCodeAt(0)>=768&&Vs.test(e)}function jr(e,t,n,i){var r=document.createElement(e);if(n&&(r.className=n),i&&(r.style.cssText=i),"string"==typeof t)r.appendChild(document.createTextNode(t));else if(t)for(var o=0;o0;--t)e.removeChild(e.firstChild);return e}function Ur(e,t){return Yr(e).appendChild(t)}function qr(){for(var e=document.activeElement;e&&e.root&&e.root.activeElement;)e=e.root.activeElement;return e}function Gr(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function Vr(e,t){for(var n=e.split(" "),i=0;i2&&!(bo&&8>wo))}var n=Zs?jr("span","​"):jr("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Kr(e){if(null!=Xs)return Xs;var t=Ur(e,document.createTextNode("AخA")),n=Us(t,0,1).getBoundingClientRect();if(!n||n.left==n.right)return!1;var i=Us(t,1,2).getBoundingClientRect();return Xs=i.right-n.right<3}function Jr(e){if(null!=ra)return ra;var t=Ur(e,jr("span","x")),n=t.getBoundingClientRect(),i=Us(t,0,1).getBoundingClientRect();return ra=Math.abs(n.left-i.left)>1}function eo(e,t,n,i){if(!e)return i(t,n,"ltr");for(var r=!1,o=0;ot||t==n&&s.to==t)&&(i(Math.max(s.from,t),Math.min(s.to,n),1==s.level?"rtl":"ltr"),r=!0)}r||i(t,n,"ltr")}function to(e){return e.level%2?e.to:e.from}function no(e){return e.level%2?e.from:e.to}function io(e){var t=rr(e);return t?to(t[0]):0}function ro(e){var t=rr(e);return t?no(Nr(t)):e.text.length}function oo(e,t){var n=Qi(e.doc,t),i=yi(n);i!=n&&(t=tr(i));var r=rr(i),o=r?r[0].level%2?ro(i):io(i):0;return Fo(t,o)}function so(e,t){for(var n,i=Qi(e.doc,t);n=mi(i);)i=n.find(1,!0).line,t=null;var r=rr(i),o=r?r[0].level%2?io(i):ro(i):i.text.length;return Fo(null==t?tr(i):t,o)}function ao(e,t){var n=oo(e,t.line),i=Qi(e.doc,n.line),r=rr(i);if(!r||0==r[0].level){var o=Math.max(0,i.text.search(/\S/)),s=t.line==n.line&&t.ch<=o&&t.ch;return Fo(n.line,s?0:o)}return n}function lo(e,t,n){var i=e[0].level;return t==i||n!=i&&n>t}function co(e,t){sa=null;for(var n,i=0;it)return i;if(r.from==t||r.to==t){if(null!=n)return lo(e,r.level,e[n].level)?(r.from!=r.to&&(sa=n),i):(r.from!=r.to&&(sa=i),n);n=i}}return n}function uo(e,t,n,i){if(!i)return t+n;do t+=n;while(t>0&&Br(e.text.charAt(t)));return t}function ho(e,t,n,i){var r=rr(e);if(!r)return fo(e,t,n,i);for(var o=co(r,t),s=r[o],a=uo(e,t,s.level%2?-n:n,i);;){if(a>s.from&&a0==s.level%2?s.to:s.from);if(s=r[o+=n],!s)return null;a=n>0==s.level%2?uo(e,s.to,-1,i):uo(e,s.from,1,i)}}function fo(e,t,n,i){var r=t+n;if(i)for(;r>0&&Br(e.text.charAt(r));)r+=n;return 0>r||r>e.text.length?null:r}var po=navigator.userAgent,go=navigator.platform,mo=/gecko\/\d/i.test(po),vo=/MSIE \d/.test(po),yo=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(po),bo=vo||yo,wo=bo&&(vo?document.documentMode||6:yo[1]),xo=/WebKit\//.test(po),ko=xo&&/Qt\/\d+\.\d+/.test(po),So=/Chrome\//.test(po),Co=/Opera\//.test(po),To=/Apple Computer/.test(navigator.vendor),Eo=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(po),_o=/PhantomJS/.test(po),Lo=/AppleWebKit/.test(po)&&/Mobile\/\w+/.test(po),Do=Lo||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(po),Mo=Lo||/Mac/.test(go),Ho=/\bCrOS\b/.test(po),No=/win/i.test(go),Ao=Co&&po.match(/Version\/(\d*\.\d*)/);Ao&&(Ao=Number(Ao[1])),Ao&&Ao>=15&&(Co=!1,xo=!0);var zo=Mo&&(ko||Co&&(null==Ao||12.11>Ao)),Ro=mo||bo&&wo>=9,Io=!1,Oo=!1;g.prototype=Or({update:function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,i=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?i+"px":"0";var r=e.viewHeight-(t?i:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+r)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?i+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?i:0);this.horiz.firstChild.style.width=e.scrollWidth-e.clientWidth+o+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==i&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?i:0,bottom:t?i:0}},setScrollLeft:function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz)},setScrollTop:function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert)},zeroWidthHack:function(){var e=Mo&&!Eo?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Mr,this.disableVert=new Mr},enableZeroWidthBar:function(e,t){function n(){var i=e.getBoundingClientRect(),r=document.elementFromPoint(i.left+1,i.bottom-1);r!=e?e.style.pointerEvents="none":t.set(1e3,n)}e.style.pointerEvents="auto",t.set(1e3,n)},clear:function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)}},g.prototype),m.prototype=Or({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},m.prototype),e.scrollbarModel={native:g,null:m},T.prototype.signal=function(e,t){Lr(e,t)&&this.events.push(arguments)},T.prototype.finish=function(){for(var e=0;e=9&&n.hasSelection&&(n.hasSelection=null),n.poll()}),Ms(o,"paste",function(e){Er(i,e)||K(e,i)||(i.state.pasteIncoming=!0,n.fastPoll())}),Ms(o,"cut",t),Ms(o,"copy",t),Ms(e.scroller,"paste",function(t){qt(e,t)||Er(i,t)||(i.state.pasteIncoming=!0,n.focus())}),Ms(e.lineSpace,"selectstart",function(t){qt(e,t)||_s(t)}),Ms(o,"compositionstart",function(){var e=i.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:i.markText(e,i.getCursor("to"),{className:"CodeMirror-composing"})}}),Ms(o,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},prepareSelection:function(){var e=this.cm,t=e.display,n=e.doc,i=Re(e);if(e.options.moveInputWithCursor){var r=ft(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),s=t.lineDiv.getBoundingClientRect();i.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,r.top+s.top-o.top)),i.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,r.left+s.left-o.left))}return i},showSelection:function(e){var t=this.cm,n=t.display;Ur(n.cursorDiv,e.cursors),Ur(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},reset:function(e){if(!this.contextMenuPending){var t,n,i=this.cm,r=i.doc;if(i.somethingSelected()){this.prevInput="";var o=r.sel.primary();t=ia&&(o.to().line-o.from().line>100||(n=i.getSelection()).length>1e3);var s=t?"-":n||i.getSelection();this.textarea.value=s,i.state.focused&&Ys(this.textarea),bo&&wo>=9&&(this.hasSelection=s)}else e||(this.prevInput=this.textarea.value="",bo&&wo>=9&&(this.hasSelection=null));this.inaccurateSelection=t}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!Do||qr()!=this.textarea))try{this.textarea.focus()}catch(e){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var e=this;e.pollingFast||e.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},fastPoll:function(){function e(){var i=n.poll();i||t?(n.pollingFast=!1,n.slowPoll()):(t=!0,n.polling.set(60,e))}var t=!1,n=this;n.pollingFast=!0,n.polling.set(20,e)},poll:function(){var e=this.cm,t=this.textarea,n=this.prevInput;if(this.contextMenuPending||!e.state.focused||na(t)&&!n&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var i=t.value;if(i==n&&!e.somethingSelected())return!1;if(bo&&wo>=9&&this.hasSelection===i||Mo&&/[\uf700-\uf7ff]/.test(i))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var r=i.charCodeAt(0);if(8203!=r||n||(n="​"),8666==r)return this.reset(),this.cm.execCommand("undo")}for(var o=0,s=Math.min(n.length,i.length);s>o&&n.charCodeAt(o)==i.charCodeAt(o);)++o;var a=this;return Dt(e,function(){Q(e,i.slice(o),n.length-o,null,a.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?t.value=a.prevInput="":a.prevInput=i,a.composing&&(a.composing.range.clear(),a.composing.range=e.markText(a.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){bo&&wo>=9&&(this.hasSelection=null),this.fastPoll()},onContextMenu:function(e){function t(){if(null!=s.selectionStart){var e=r.somethingSelected(),t="​"+(e?s.value:"");s.value="⇚",s.value=t,i.prevInput=e?"":"​",s.selectionStart=1,s.selectionEnd=t.length,o.selForContextMenu=r.doc.sel}}function n(){if(i.contextMenuPending=!1,i.wrapper.style.cssText=d,s.style.cssText=u,bo&&9>wo&&o.scrollbars.setScrollTop(o.scroller.scrollTop=l),null!=s.selectionStart){(!bo||bo&&9>wo)&&t();var e=0,n=function(){o.selForContextMenu==r.doc.sel&&0==s.selectionStart&&s.selectionEnd>0&&"​"==i.prevInput?Mt(r,us.selectAll)(r):e++<10?o.detectingSelectAll=setTimeout(n,500):o.input.reset()};o.detectingSelectAll=setTimeout(n,200)}}var i=this,r=i.cm,o=r.display,s=i.textarea,a=Gt(r,e),l=o.scroller.scrollTop;if(a&&!Co){var c=r.options.resetSelectionOnContextMenu;c&&-1==r.doc.sel.contains(a)&&Mt(r,Ee)(r.doc,fe(a),Os);var u=s.style.cssText,d=i.wrapper.style.cssText;i.wrapper.style.cssText="position: absolute";var h=i.wrapper.getBoundingClientRect();if(s.style.cssText="position: absolute; width: 30px; height: 30px; top: "+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+"px; z-index: 1000; background: "+(bo?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",xo)var f=window.scrollY;if(o.input.focus(),xo&&window.scrollTo(null,f),o.input.reset(),r.somethingSelected()||(s.value=i.prevInput=" "),i.contextMenuPending=!0,o.selForContextMenu=r.doc.sel,clearTimeout(o.detectingSelectAll),bo&&wo>=9&&t(),Ro){Ds(e);var p=function(){Ns(window,"mouseup",p),setTimeout(n,20)};Ms(window,"mouseup",p)}else setTimeout(n,50)}},readOnlyChanged:function(e){e||this.reset()},setUneditable:Rr,needsContentAttribute:!1},ne.prototype),re.prototype=Or({init:function(e){function t(e){if(!Er(i,e)){if(i.somethingSelected())Wo={lineWise:!1,text:i.getSelections()},"cut"==e.type&&i.replaceSelection("",null,"cut");else{if(!i.options.lineWiseCopyCut)return;var t=ee(i);Wo={lineWise:!0,text:t.text},"cut"==e.type&&i.operation(function(){i.setSelections(t.ranges,0,Os),i.replaceSelection("",null,"cut")})}if(e.clipboardData&&!Lo)e.preventDefault(),e.clipboardData.clearData(),e.clipboardData.setData("text/plain",Wo.text.join("\n"));else{var n=ie(),r=n.firstChild;i.display.lineSpace.insertBefore(n,i.display.lineSpace.firstChild),r.value=Wo.text.join("\n");var o=document.activeElement;Ys(r),setTimeout(function(){i.display.lineSpace.removeChild(n),o.focus()},50)}}}var n=this,i=n.cm,r=n.div=e.lineDiv;te(r),Ms(r,"paste",function(e){Er(i,e)||K(e,i)}),Ms(r,"compositionstart",function(e){var t=e.data;if(n.composing={sel:i.doc.sel,data:t,startData:t},t){var r=i.doc.sel.primary(),o=i.getLine(r.head.line),s=o.indexOf(t,Math.max(0,r.head.ch-t.length));s>-1&&s<=r.head.ch&&(n.composing.sel=fe(Fo(r.head.line,s),Fo(r.head.line,s+t.length)))}}),Ms(r,"compositionupdate",function(e){n.composing.data=e.data}),Ms(r,"compositionend",function(e){var t=n.composing;t&&(e.data==t.startData||/\u200b/.test(e.data)||(t.data=e.data),setTimeout(function(){t.handled||n.applyComposition(t),n.composing==t&&(n.composing=null)},50))}),Ms(r,"touchstart",function(){n.forceCompositionEnd()}),Ms(r,"input",function(){n.composing||!i.isReadOnly()&&n.pollContent()||Dt(n.cm,function(){Rt(i)})}),Ms(r,"copy",t),Ms(r,"cut",t)},prepareSelection:function(){var e=Re(this.cm,!1);return e.focus=this.cm.state.focused,e},showSelection:function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},showPrimarySelection:function(){var e=window.getSelection(),t=this.cm.doc.sel.primary(),n=ae(this.cm,e.anchorNode,e.anchorOffset),i=ae(this.cm,e.focusNode,e.focusOffset);if(!n||n.bad||!i||i.bad||0!=Po(Z(n,i),t.from())||0!=Po($(n,i),t.to())){var r=oe(this.cm,t.from()),o=oe(this.cm,t.to());if(r||o){var s=this.cm.display.view,a=e.rangeCount&&e.getRangeAt(0);if(r){if(!o){var l=s[s.length-1].measure,c=l.maps?l.maps[l.maps.length-1]:l.map;o={node:c[c.length-1],offset:c[c.length-2]-c[c.length-3]}}}else r={node:s[0].measure.map[2],offset:0};try{var u=Us(r.node,r.offset,o.offset,o.node)}catch(e){}u&&(!mo&&this.cm.state.focused?(e.collapse(r.node,r.offset),u.collapsed||e.addRange(u)):(e.removeAllRanges(),e.addRange(u)),a&&null==e.anchorNode?e.addRange(a):mo&&this.startGracePeriod()),this.rememberSelection()}}},startGracePeriod:function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){e.cm.curOp.selectionChanged=!0})},20)},showMultipleSelections:function(e){Ur(this.cm.display.cursorDiv,e.cursors),Ur(this.cm.display.selectionDiv,e.selection)},rememberSelection:function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},selectionInEditor:function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return $s(this.div,t)},focus:function(){"nocursor"!=this.cm.options.readOnly&&this.div.focus()},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return!0},receivedFocus:function(){function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}var t=this;this.selectionInEditor()?this.pollSelection():Dt(this.cm,function(){t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,e)},selectionChanged:function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;this.rememberSelection();var n=ae(t,e.anchorNode,e.anchorOffset),i=ae(t,e.focusNode,e.focusOffset);n&&i&&Dt(t,function(){Ee(t.doc,fe(n,i),Os),(n.bad||i.bad)&&(t.curOp.selectionChanged=!0)})}},pollContent:function(){var e=this.cm,t=e.display,n=e.doc.sel.primary(),i=n.from(),r=n.to();if(i.linet.viewTo-1)return!1;var o;if(i.line==t.viewFrom||0==(o=Ft(e,i.line)))var s=tr(t.view[0].line),a=t.view[0].node;else var s=tr(t.view[o].line),a=t.view[o-1].node.nextSibling;var l=Ft(e,r.line);if(l==t.view.length-1)var c=t.viewTo-1,u=t.lineDiv.lastChild;else var c=tr(t.view[l+1].line)-1,u=t.view[l+1].node.previousSibling;for(var d=e.doc.splitLines(ce(e,a,u,s,c)),h=Ki(e.doc,Fo(s,0),Fo(c,Qi(e.doc,c).text.length));d.length>1&&h.length>1;)if(Nr(d)==Nr(h))d.pop(),h.pop(),c--;else{if(d[0]!=h[0])break;d.shift(),h.shift(),s++}for(var f=0,p=0,g=d[0],m=h[0],v=Math.min(g.length,m.length);v>f&&g.charCodeAt(f)==m.charCodeAt(f);)++f;for(var y=Nr(d),b=Nr(h),w=Math.min(y.length-(1==d.length?f:0),b.length-(1==h.length?f:0));w>p&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)++p;d[d.length-1]=y.slice(0,y.length-p),d[0]=d[0].slice(f);var x=Fo(s,f),k=Fo(c,h.length?Nr(h).length-p:0);return d.length>1||d[0]||Po(x,k)?(Nn(e.doc,d,x,k,"+input"),!0):void 0},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){this.composing&&!this.composing.handled&&(this.applyComposition(this.composing),this.composing.handled=!0,this.div.blur(),this.div.focus())},applyComposition:function(e){this.cm.isReadOnly()?Mt(this.cm,Rt)(this.cm):e.data&&e.data!=e.startData&&Mt(this.cm,Q)(this.cm,e.data,0,e.sel)},setUneditable:function(e){e.contentEditable="false"},onKeyPress:function(e){e.preventDefault(),this.cm.isReadOnly()||Mt(this.cm,Q)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0)},readOnlyChanged:function(e){this.div.contentEditable=String("nocursor"!=e)},onContextMenu:Rr,resetPosition:Rr,needsContentAttribute:!0},re.prototype),e.inputStyles={textarea:ne,contenteditable:re},ue.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t=0&&Po(e,i.to())<=0)return n}return-1}},de.prototype={from:function(){return Z(this.anchor,this.head)},to:function(){return $(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var Bo,jo,Yo,Uo={left:0,right:0,top:0,bottom:0},qo=null,Go=0,Vo=0,$o=0,Zo=null;bo?Zo=-.53:mo?Zo=15:So?Zo=-.7:To&&(Zo=-1/3);var Xo=function(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}};e.wheelEventPixels=function(e){var t=Xo(e);return t.x*=Zo,t.y*=Zo,t};var Qo=new Mr,Ko=null,Jo=e.changeEnd=function(e){return e.text?Fo(e.from.line+e.text.length-1,Nr(e.text).length+(1==e.text.length?e.from.ch:0)):e.to};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,t){var n=this.options,i=n[e];n[e]==t&&"mode"!=e||(n[e]=t,ts.hasOwnProperty(e)&&Mt(this,ts[e])(this,t,i))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Vn(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nn&&(Wn(this,r.head.line,e,!0),n=r.head.line,i==this.doc.sel.primIndex&&Fn(this));else{var o=r.from(),s=r.to(),a=Math.max(n,o.line);n=Math.min(this.lastLine(),s.line-(s.ch?0:1))+1;for(var l=a;n>l;++l)Wn(this,l,e);var c=this.doc.sel.ranges;0==o.ch&&t.length==c.length&&c[i].from().ch>0&&ke(this.doc,i,new de(o,c[i].to()),Os)}}}),getTokenAt:function(e,t){return Ni(this,e,t)},getLineTokens:function(e,t){return Ni(this,Fo(e),t,!0)},getTokenTypeAt:function(e){e=ge(this.doc,e);var t,n=Ri(this,Qi(this.doc,e.line)),i=0,r=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var s=i+r>>1;if((s?n[2*s-1]:0)>=o)r=s;else{if(!(n[2*s+1]a?t:0==a?null:t.slice(0,a-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!as.hasOwnProperty(t))return n;var i=as[t],r=this.getModeAt(e);if("string"==typeof r[t])i[r[t]]&&n.push(i[r[t]]);else if(r[t])for(var o=0;or&&(e=r,i=!0),n=Qi(this.doc,e)}else n=e;return ut(this,n,{top:0,left:0},t||"page").top+(i?this.doc.height-ir(n):0)},defaultTextHeight:function(){return yt(this.display)},defaultCharWidth:function(){return bt(this.display)},setGutterMarker:Ht(function(e,t,n){return Bn(this.doc,e,"gutter",function(e){var i=e.gutterMarkers||(e.gutterMarkers={});return i[t]=n,!n&&Wr(i)&&(e.gutterMarkers=null),!0})}),clearGutter:Ht(function(e){var t=this,n=t.doc,i=n.first;n.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&(n.gutterMarkers[e]=null,It(t,i,"gutter"),Wr(n.gutterMarkers)&&(n.gutterMarkers=null)),++i})}),lineInfo:function(e){if("number"==typeof e){if(!ve(this.doc,e))return null;var t=e;if(e=Qi(this.doc,e),!e)return null}else{var t=tr(e);if(null==t)return null}return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,i,r){var o=this.display;e=ft(this,ge(this.doc,e));var s=e.bottom,a=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==i)s=e.top;else if("above"==i||"near"==i){var l=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==i||e.bottom+t.offsetHeight>l)&&e.top>t.offsetHeight?s=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=l&&(s=e.bottom),a+t.offsetWidth>c&&(a=c-t.offsetWidth)}t.style.top=s+"px",t.style.left=t.style.right="","right"==r?(a=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==r?a=0:"middle"==r&&(a=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=a+"px"),n&&Rn(this,a,s,a+t.offsetWidth,s+t.offsetHeight)},triggerOnKeyDown:Ht(hn),triggerOnKeyPress:Ht(gn),triggerOnKeyUp:pn,execCommand:function(e){return us.hasOwnProperty(e)?us[e].call(null,this):void 0},triggerElectric:Ht(function(e){J(this,e)}),findPosH:function(e,t,n,i){var r=1;0>t&&(r=-1,t=-t);for(var o=0,s=ge(this.doc,e);t>o&&(s=Yn(this.doc,s,r,n,i),!s.hitSide);++o);return s},moveH:Ht(function(e,t){var n=this;n.extendSelectionsBy(function(i){return n.display.shift||n.doc.extend||i.empty()?Yn(n.doc,i.head,e,t,n.options.rtlMoveVisually):0>e?i.from():i.to()},Ps)}),deleteH:Ht(function(e,t){var n=this.doc.sel,i=this.doc;n.somethingSelected()?i.replaceSelection("",null,"+delete"):jn(this,function(n){ -var r=Yn(i,n.head,e,t,!1);return 0>e?{from:r,to:n.head}:{from:n.head,to:r}})}),findPosV:function(e,t,n,i){var r=1,o=i;0>t&&(r=-1,t=-t);for(var s=0,a=ge(this.doc,e);t>s;++s){var l=ft(this,a,"div");if(null==o?o=l.left:l.left=o,a=Un(this,l,r,n),a.hitSide)break}return a},moveV:Ht(function(e,t){var n=this,i=this.doc,r=[],o=!n.display.shift&&!i.extend&&i.sel.somethingSelected();if(i.extendSelectionsBy(function(s){if(o)return 0>e?s.from():s.to();var a=ft(n,s.head,"div");null!=s.goalColumn&&(a.left=s.goalColumn),r.push(a.left);var l=Un(n,a,e,t);return"page"==t&&s==i.sel.primary()&&On(n,null,ht(n,l,"div").top-a.top),l},Ps),r.length)for(var s=0;s0&&a(n.charAt(i-1));)--i;for(;r.5)&&s(this),As(this,"refresh",this)}),swapDoc:Ht(function(e){var t=this.doc;return t.cm=null,Xi(this,e),at(this),this.display.input.reset(),this.scrollTo(e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Cr(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Dr(e);var es=e.defaults={},ts=e.optionHandlers={},ns=e.Init={toString:function(){return"CodeMirror.Init"}};qn("value","",function(e,t){e.setValue(t)},!0),qn("mode",null,function(e,t){e.doc.modeOption=t,n(e)},!0),qn("indentUnit",2,n,!0),qn("indentWithTabs",!1),qn("smartIndent",!0),qn("tabSize",4,function(e){i(e),at(e),Rt(e)},!0),qn("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var n=[],i=e.doc.first;e.doc.iter(function(e){for(var r=0;;){var o=e.text.indexOf(t,r);if(-1==o)break;r=o+t.length,n.push(Fo(i,o))}i++});for(var r=n.length-1;r>=0;r--)Nn(e.doc,t,n[r],Fo(n[r].line,n[r].ch+t.length))}}),qn("specialChars",/[\u0000-\u001f\u007f\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(t,n,i){t.state.specialChars=new RegExp(n.source+(n.test("\t")?"":"|\t"),"g"),i!=e.Init&&t.refresh()}),qn("specialCharPlaceholder",Pi,function(e){e.refresh()},!0),qn("electricChars",!0),qn("inputStyle",Do?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),qn("rtlMoveVisually",!No),qn("wholeLineUpdateBefore",!0),qn("theme","default",function(e){a(e),l(e)},!0),qn("keyMap","default",function(t,n,i){var r=Vn(n),o=i!=e.Init&&Vn(i);o&&o.detach&&o.detach(t,r),r.attach&&r.attach(t,o||null)}),qn("extraKeys",null),qn("lineWrapping",!1,r,!0),qn("gutters",[],function(e){f(e.options),l(e)},!0),qn("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?C(e.display)+"px":"0",e.refresh()},!0),qn("coverGutterNextToScrollbar",!1,function(e){y(e)},!0),qn("scrollbarStyle","native",function(e){v(e),y(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),qn("lineNumbers",!1,function(e){f(e.options),l(e)},!0),qn("firstLineNumber",1,l,!0),qn("lineNumberFormatter",function(e){return e},l,!0),qn("showCursorWhenSelecting",!1,ze,!0),qn("resetSelectionOnContextMenu",!0),qn("lineWiseCopyCut",!0),qn("readOnly",!1,function(e,t){"nocursor"==t?(yn(e),e.display.input.blur(),e.display.disabled=!0):e.display.disabled=!1,e.display.input.readOnlyChanged(t)}),qn("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),qn("dragDrop",!0,Yt),qn("allowDropFileTypes",null),qn("cursorBlinkRate",530),qn("cursorScrollMargin",0),qn("cursorHeight",1,ze,!0),qn("singleCursorHeightPerLine",!0,ze,!0),qn("workTime",100),qn("workDelay",100),qn("flattenSpans",!0,i,!0),qn("addModeClass",!1,i,!0),qn("pollInterval",100),qn("undoDepth",200,function(e,t){e.doc.history.undoDepth=t}),qn("historyEventDelay",1250),qn("viewportMargin",10,function(e){e.refresh()},!0),qn("maxHighlightLength",1e4,i,!0),qn("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),qn("tabindex",null,function(e,t){e.display.input.getField().tabIndex=t||""}),qn("autofocus",null);var is=e.modes={},rs=e.mimeModes={};e.defineMode=function(t,n){e.defaults.mode||"null"==t||(e.defaults.mode=t),arguments.length>2&&(n.dependencies=Array.prototype.slice.call(arguments,2)),is[t]=n},e.defineMIME=function(e,t){rs[e]=t},e.resolveMode=function(t){if("string"==typeof t&&rs.hasOwnProperty(t))t=rs[t];else if(t&&"string"==typeof t.name&&rs.hasOwnProperty(t.name)){var n=rs[t.name];"string"==typeof n&&(n={name:n}),t=Ir(n,t),t.name=n.name}else if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return e.resolveMode("application/xml");return"string"==typeof t?{name:t}:t||{name:"null"}},e.getMode=function(t,n){var n=e.resolveMode(n),i=is[n.name];if(!i)return e.getMode(t,"text/plain");var r=i(t,n);if(os.hasOwnProperty(n.name)){var o=os[n.name];for(var s in o)o.hasOwnProperty(s)&&(r.hasOwnProperty(s)&&(r["_"+s]=r[s]),r[s]=o[s])}if(r.name=n.name,n.helperType&&(r.helperType=n.helperType),n.modeProps)for(var s in n.modeProps)r[s]=n.modeProps[s];return r},e.defineMode("null",function(){return{token:function(e){e.skipToEnd()}}}),e.defineMIME("text/plain","null");var os=e.modeExtensions={};e.extendMode=function(e,t){var n=os.hasOwnProperty(e)?os[e]:os[e]={};Or(t,n)},e.defineExtension=function(t,n){e.prototype[t]=n},e.defineDocExtension=function(e,t){Cs.prototype[e]=t},e.defineOption=qn;var ss=[];e.defineInitHook=function(e){ss.push(e)};var as=e.helpers={};e.registerHelper=function(t,n,i){as.hasOwnProperty(t)||(as[t]=e[t]={_global:[]}),as[t][n]=i},e.registerGlobalHelper=function(t,n,i,r){e.registerHelper(t,n,r),as[t]._global.push({pred:i,val:r})};var ls=e.copyState=function(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var i in t){var r=t[i];r instanceof Array&&(r=r.concat([])),n[i]=r}return n},cs=e.startState=function(e,t,n){return!e.startState||e.startState(t,n)};e.innerMode=function(e,t){for(;e.innerMode;){var n=e.innerMode(t);if(!n||n.mode==e)break;t=n.state,e=n.mode}return n||{mode:e,state:t}};var us=e.commands={selectAll:function(e){e.setSelection(Fo(e.firstLine(),0),Fo(e.lastLine()),Os)},singleSelection:function(e){e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Os)},killLine:function(e){jn(e,function(t){if(t.empty()){var n=Qi(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)r=new Fo(r.line,r.ch+1),e.replaceRange(o.charAt(r.ch-1)+o.charAt(r.ch-2),Fo(r.line,r.ch-2),r,"+transpose");else if(r.line>e.doc.first){var s=Qi(e.doc,r.line-1).text;s&&e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+s.charAt(s.length-1),Fo(r.line-1,s.length-1),Fo(r.line,1),"+transpose")}n.push(new de(r,r))}e.setSelections(n)})},newlineAndIndent:function(e){Dt(e,function(){for(var t=e.listSelections().length,n=0;t>n;n++){var i=e.listSelections()[n];e.replaceRange(e.doc.lineSeparator(),i.anchor,i.head,"+input"),e.indentLine(i.from().line+1,null,!0)}Fn(e)})},openLine:function(e){e.replaceSelection("\n","start")},toggleOverwrite:function(e){e.toggleOverwrite()}},ds=e.keyMap={};ds.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},ds.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},ds.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},ds.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},ds.default=Mo?ds.macDefault:ds.pcDefault,e.normalizeKeyMap=function(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==i){delete e[n];continue}for(var r=zr(n.split(" "),Gn),o=0;o=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){return this.post},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);return t>-1?(this.pos=t,!0):void 0},backUp:function(e){this.pos-=e},column:function(){return this.lastColumnPos0?null:(i&&t!==!1&&(this.pos+=i[0].length),i)}var r=function(e){return n?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);return r(o)==r(e)?(t!==!1&&(this.pos+=e.length),!0):void 0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}};var ms=0,vs=e.TextMarker=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ms};Dr(vs),vs.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&wt(e),Lr(this,"clear")){var n=this.find();n&&Cr(this,"clear",n.from,n.to)}for(var i=null,r=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=l,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=i&&e&&this.collapsed&&Rt(e,i,r+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&De(e.doc)),e&&Cr(e,"markerCleared",e,this),t&&kt(e),this.parent&&this.parent.clear()}},vs.prototype.find=function(e,t){null==e&&"bookmark"==this.type&&(e=1);for(var n,i,r=0;rn;++n){var r=this.lines[n];this.height-=r.height,Li(r),Cr(r,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var i=0;ie;++e)if(n(this.lines[e]))return!0}},$i.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;ne){var o=Math.min(t,r-e),s=i.height;if(i.removeInner(e,o),this.height-=s-i.height,r==o&&(this.children.splice(n--,1),i.parent=null),0==(t-=o))break;e=0}else e-=r}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Vi))){var a=[];this.collapse(a),this.children=[new Vi(a)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t=e){if(r.insertInner(e,t,n),r.lines&&r.lines.length>50){for(var s=r.lines.length%25+25,a=s;a10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var i=0;ie){var s=Math.min(t,o-e);if(r.iterN(e,s,n))return!0;if(0==(t-=s))break;e=0}else e-=o}}};var Ss=0,Cs=e.Doc=function(e,t,n,i){if(!(this instanceof Cs))return new Cs(e,t,n,i);null==n&&(n=0),$i.call(this,[new Vi([new ws("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=n;var r=Fo(n,0);this.sel=fe(r),this.history=new or(null),this.id=++Ss,this.modeOption=t,this.lineSep=i,this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Gi(this,{from:r,to:r,text:e}),Ee(this,fe(r),Os)};Cs.prototype=Ir($i.prototype,{constructor:Cs,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,i=0;i=0;o--)En(this,i[o]);a?Te(this,a):this.cm&&Fn(this.cm)}),undo:Nt(function(){Ln(this,"undo")}),redo:Nt(function(){Ln(this,"redo")}),undoSelection:Nt(function(){Ln(this,"undo",!0)}),redoSelection:Nt(function(){Ln(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,i=0;i=e.ch)&&t.push(r.marker.parent||r.marker)}return t},findMarks:function(e,t,n){e=ge(this,e),t=ge(this,t);var i=[],r=e.line;return this.iter(e.line,t.line+1,function(o){var s=o.markedSpans;if(s)for(var a=0;a=l.to||null==l.from&&r!=e.line||null!=l.from&&r==t.line&&l.from>=t.ch||n&&!n(l.marker)||i.push(l.marker.parent||l.marker)}++r}),i},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var i=0;ie?(t=e,!0):(e-=o,void++n)}),ge(this,Fo(n,t))},indexFromPos:function(e){e=ge(this,e);var t=e.ch;if(e.linet&&(t=e.from),null!=e.to&&e.toa||a>=t)return s+(t-o);s+=a-o,s+=n-s%n,o=a+1}},Bs=e.findColumn=function(e,t,n){for(var i=0,r=0;;){var o=e.indexOf("\t",i);-1==o&&(o=e.length);var s=o-i;if(o==e.length||r+s>=t)return i+Math.min(s,t-r);if(r+=o-i,r+=n-r%n,i=o+1,r>=t)return i}},js=[""],Ys=function(e){e.select()};Lo?Ys=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:bo&&(Ys=function(e){try{e.select()}catch(e){}});var Us,qs=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Gs=e.isWordChar=function(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||qs.test(e))},Vs=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;Us=document.createRange?function(e,t,n,i){var r=document.createRange();return r.setEnd(i||e,n),r.setStart(e,t),r}:function(e,t,n){var i=document.body.createTextRange();try{i.moveToElementText(e.parentNode)}catch(e){return i}return i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",t),i};var $s=e.contains=function(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do if(11==t.nodeType&&(t=t.host),t==e)return!0;while(t=t.parentNode)};bo&&11>wo&&(qr=function(){try{return document.activeElement}catch(e){return document.body}});var Zs,Xs,Qs=e.rmClass=function(e,t){var n=e.className,i=Gr(t).exec(n);if(i){var r=n.slice(i.index+i[0].length);e.className=n.slice(0,i.index)+(r?i[1]+r:"")}},Ks=e.addClass=function(e,t){var n=e.className;Gr(t).test(n)||(e.className+=(n?" ":"")+t)},Js=!1,ea=function(){if(bo&&9>wo)return!1;var e=jr("div");return"draggable"in e||"dragDrop"in e}(),ta=e.splitLines=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],i=e.length;i>=t;){var r=e.indexOf("\n",t);-1==r&&(r=e.length);var o=e.slice(t,"\r"==e.charAt(r-1)?r-1:r),s=o.indexOf("\r");-1!=s?(n.push(o.slice(0,s)),t+=s+1):(n.push(o),t=r+1)}return n}:function(e){return e.split(/\r\n?|\n/)},na=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){try{var t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},ia=function(){var e=jr("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),ra=null,oa=e.keyNames={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};!function(){for(var e=0;10>e;e++)oa[e+48]=oa[e+96]=String(e);for(var e=65;90>=e;e++)oa[e]=String.fromCharCode(e);for(var e=1;12>=e;e++)oa[e+111]=oa[e+63235]="F"+e}();var sa,aa=function(){function e(e){return 247>=e?n.charAt(e):e>=1424&&1524>=e?"R":e>=1536&&1773>=e?i.charAt(e-1536):e>=1774&&2220>=e?"r":e>=8192&&8203>=e?"w":8204==e?"b":"L"}function t(e,t,n){this.level=e,this.from=t,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",i="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,s=/[LRr]/,a=/[Lb1n]/,l=/[1n]/,c="L";return function(n){if(!r.test(n))return!1;for(var i,u=n.length,d=[],h=0;u>h;++h)d.push(i=e(n.charCodeAt(h)));for(var h=0,f=c;u>h;++h){var i=d[h];"m"==i?d[h]=f:f=i}for(var h=0,p=c;u>h;++h){var i=d[h];"1"==i&&"r"==p?d[h]="n":s.test(i)&&(p=i,"r"==i&&(d[h]="R"))}for(var h=1,f=d[0];u-1>h;++h){var i=d[h];"+"==i&&"1"==f&&"1"==d[h+1]?d[h]="1":","!=i||f!=d[h+1]||"1"!=f&&"n"!=f||(d[h]=f),f=i}for(var h=0;u>h;++h){var i=d[h];if(","==i)d[h]="N";else if("%"==i){for(var g=h+1;u>g&&"%"==d[g];++g);for(var m=h&&"!"==d[h-1]||u>g&&"1"==d[g]?"1":"N",v=h;g>v;++v)d[v]=m;h=g-1}}for(var h=0,p=c;u>h;++h){var i=d[h];"L"==p&&"1"==i?d[h]="L":s.test(i)&&(p=i)}for(var h=0;u>h;++h)if(o.test(d[h])){for(var g=h+1;u>g&&o.test(d[g]);++g);for(var y="L"==(h?d[h-1]:c),b="L"==(u>g?d[g]:c),m=y||b?"L":"R",v=h;g>v;++v)d[v]=m;h=g-1}for(var w,x=[],h=0;u>h;)if(a.test(d[h])){var k=h;for(++h;u>h&&a.test(d[h]);++h);x.push(new t(0,k,h))}else{var S=h,C=x.length;for(++h;u>h&&"L"!=d[h];++h);for(var v=S;h>v;)if(l.test(d[v])){v>S&&x.splice(C,0,new t(1,S,v));var T=v;for(++v;h>v&&l.test(d[v]);++v);x.splice(C,0,new t(2,T,v)),S=v}else++v;h>S&&x.splice(C,0,new t(1,S,h))}return 1==x[0].level&&(w=n.match(/^\s+/))&&(x[0].from=w[0].length,x.unshift(new t(0,0,w[0].length))),1==Nr(x).level&&(w=n.match(/\s+$/))&&(Nr(x).to-=w[0].length,x.push(new t(0,u-w[0].length,u))),2==x[0].level&&x.unshift(new t(1,x[0].to,x[0].to)),x[0].level!=Nr(x).level&&x.push(new t(x[0].level,u,u)),x}}();return e.version="5.15.2",e})},{}],11:[function(t,n,i){!function(r){"object"==typeof i&&"object"==typeof n?r(t("../../lib/codemirror"),t("../markdown/markdown"),t("../../addon/mode/overlay")):"function"==typeof e&&e.amd?e(["../../lib/codemirror","../markdown/markdown","../../addon/mode/overlay"],r):r(CodeMirror)}(function(e){"use strict";var t=/^((?:(?:aaas?|about|acap|adiumxtra|af[ps]|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|cap|chrome(?:-extension)?|cid|coap|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-(?:playcontainer|playsingle)|dns|doi|dtn|dvb|ed2k|facetime|feed|file|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|hcp|https?|iax|icap|icon|im|imap|info|ipn|ipp|irc[6s]?|iris(?:\.beep|\.lwz|\.xpc|\.xpcs)?|itms|jar|javascript|jms|keyparc|lastfm|ldaps?|magnet|mailto|maps|market|message|mid|mms|ms-help|msnim|msrps?|mtqp|mumble|mupdate|mvn|news|nfs|nih?|nntp|notes|oid|opaquelocktoken|palm|paparazzi|platform|pop|pres|proxy|psyc|query|res(?:ource)?|rmi|rsync|rtmp|rtsp|secondlife|service|session|sftp|sgn|shttp|sieve|sips?|skype|sm[bs]|snmp|soap\.beeps?|soldat|spotify|ssh|steam|svn|tag|teamspeak|tel(?:net)?|tftp|things|thismessage|tip|tn3270|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|view-source|webcal|wss?|wtai|wyciwyg|xcon(?:-userid)?|xfire|xmlrpc\.beeps?|xmpp|xri|ymsgr|z39\.50[rs]?):(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i;e.defineMode("gfm",function(n,i){function r(e){return e.code=!1,null}var o=0,s={startState:function(){return{code:!1,codeBlock:!1,ateSpace:!1}},copyState:function(e){return{code:e.code,codeBlock:e.codeBlock,ateSpace:e.ateSpace}},token:function(e,n){if(n.combineTokens=null,n.codeBlock)return e.match(/^```+/)?(n.codeBlock=!1,null):(e.skipToEnd(),null);if(e.sol()&&(n.code=!1),e.sol()&&e.match(/^```+/))return e.skipToEnd(),n.codeBlock=!0,null;if("`"===e.peek()){e.next();var r=e.pos;e.eatWhile("`");var s=1+e.pos-r;return n.code?s===o&&(n.code=!1):(o=s,n.code=!0),null}if(n.code)return e.next(),null;if(e.eatSpace())return n.ateSpace=!0,null;if((e.sol()||n.ateSpace)&&(n.ateSpace=!1,i.gitHubSpice!==!1)){if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?:[a-f0-9]{7,40}\b)/))return n.combineTokens=!0,"link";if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return n.combineTokens=!0,"link"}return e.match(t)&&"]("!=e.string.slice(e.start-2,e.start)&&(0==e.start||/\W/.test(e.string.charAt(e.start-1)))?(n.combineTokens=!0,"link"):(e.next(),null)},blankLine:r},a={underscoresBreakWords:!1,taskLists:!0,fencedCodeBlocks:"```",strikethrough:!0};for(var l in i)a[l]=i[l];return a.name="markdown",e.overlayMode(e.getMode(n,a),s)},"markdown"),e.defineMIME("text/x-gfm","gfm")})},{"../../addon/mode/overlay":8,"../../lib/codemirror":10,"../markdown/markdown":12}],12:[function(t,n,i){!function(r){"object"==typeof i&&"object"==typeof n?r(t("../../lib/codemirror"),t("../xml/xml"),t("../meta")):"function"==typeof e&&e.amd?e(["../../lib/codemirror","../xml/xml","../meta"],r):r(CodeMirror)}(function(e){"use strict";e.defineMode("markdown",function(t,n){function i(n){if(e.findModeByName){var i=e.findModeByName(n);i&&(n=i.mime||i.mimes[0])}var r=e.getMode(t,n);return"null"==r.name?null:r}function r(e,t,n){return t.f=t.inline=n,n(e,t)}function o(e,t,n){return t.f=t.block=n,n(e,t)}function s(e){return!e||!/\S/.test(e.string)}function a(e){return e.linkTitle=!1,e.em=!1,e.strong=!1,e.strikethrough=!1,e.quote=0,e.indentedCode=!1,k&&e.f==c&&(e.f=p,e.block=l),e.trailingSpace=0,e.trailingSpaceNewLine=!1,e.prevLine=e.thisLine,e.thisLine=null,null}function l(t,o){var a=t.sol(),l=o.list!==!1,c=o.indentedCode;o.indentedCode=!1,l&&(o.indentationDiff>=0?(o.indentationDiff<4&&(o.indentation-=o.indentationDiff),o.list=null):o.indentation>0?o.list=null:o.list=!1);var d=null;if(o.indentationDiff>=4)return t.skipToEnd(),c||s(o.prevLine)?(o.indentation-=4,o.indentedCode=!0,S.code):null;if(t.eatSpace())return null;if((d=t.match(D))&&d[1].length<=6)return o.header=d[1].length,n.highlightFormatting&&(o.formatting="header"),o.f=o.inline,h(o);if(!(s(o.prevLine)||o.quote||l||c)&&(d=t.match(M)))return o.header="="==d[0].charAt(0)?1:2,n.highlightFormatting&&(o.formatting="header"),o.f=o.inline,h(o);if(t.eat(">"))return o.quote=a?1:o.quote+1,n.highlightFormatting&&(o.formatting="quote"),t.eatSpace(),h(o);if("["===t.peek())return r(t,o,y);if(t.match(T,!0))return o.hr=!0,S.hr;if((s(o.prevLine)||l)&&(t.match(E,!1)||t.match(_,!1))){var f=null;for(t.match(E,!0)?f="ul":(t.match(_,!0),f="ol"),o.indentation=t.column()+t.current().length,o.list=!0;o.listStack&&t.column()")>-1)&&(n.f=p,n.block=l,n.htmlState=null)}return i}function u(e,t){return t.fencedChars&&e.match(t.fencedChars,!1)?(t.localMode=t.localState=null,t.f=t.block=d,null):t.localMode?t.localMode.token(e,t.localState):(e.skipToEnd(),S.code)}function d(e,t){e.match(t.fencedChars),t.block=l,t.f=p,t.fencedChars=null,n.highlightFormatting&&(t.formatting="code-block"),t.code=1;var i=h(t);return t.code=0,i}function h(e){var t=[];if(e.formatting){t.push(S.formatting),"string"==typeof e.formatting&&(e.formatting=[e.formatting]);for(var i=0;i=e.quote?t.push(S.formatting+"-"+e.formatting[i]+"-"+e.quote):t.push("error"))}if(e.taskOpen)return t.push("meta"),t.length?t.join(" "):null;if(e.taskClosed)return t.push("property"),t.length?t.join(" "):null;if(e.linkHref?t.push(S.linkHref,"url"):(e.strong&&t.push(S.strong),e.em&&t.push(S.em),e.strikethrough&&t.push(S.strikethrough),e.linkText&&t.push(S.linkText),e.code&&t.push(S.code)),e.header&&t.push(S.header,S.header+"-"+e.header),e.quote&&(t.push(S.quote),!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(S.quote+"-"+e.quote):t.push(S.quote+"-"+n.maxBlockquoteDepth)),e.list!==!1){var r=(e.listStack.length-1)%3;r?1===r?t.push(S.list2):t.push(S.list3):t.push(S.list1)}return e.trailingSpaceNewLine?t.push("trailing-space-new-line"):e.trailingSpace&&t.push("trailing-space-"+(e.trailingSpace%2?"a":"b")),t.length?t.join(" "):null}function f(e,t){return e.match(H,!0)?h(t):void 0}function p(t,i){var r=i.text(t,i);if("undefined"!=typeof r)return r;if(i.list)return i.list=null,h(i);if(i.taskList){var s="x"!==t.match(L,!0)[1];return s?i.taskOpen=!0:i.taskClosed=!0,n.highlightFormatting&&(i.formatting="task"),i.taskList=!1,h(i)}if(i.taskOpen=!1,i.taskClosed=!1,i.header&&t.match(/^#+$/,!0))return n.highlightFormatting&&(i.formatting="header"),h(i);var a=t.sol(),l=t.next();if(i.linkTitle){i.linkTitle=!1;var u=l;"("===l&&(u=")"),u=(u+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");var d="^\\s*(?:[^"+u+"\\\\]+|\\\\\\\\|\\\\.)"+u;if(t.match(new RegExp(d),!0))return S.linkHref}if("`"===l){var f=i.formatting;n.highlightFormatting&&(i.formatting="code"),t.eatWhile("`");var p=t.current().length;if(0==i.code)return i.code=p,h(i);if(p==i.code){var v=h(i);return i.code=0,v}return i.formatting=f,h(i)}if(i.code)return h(i);if("\\"===l&&(t.next(),n.highlightFormatting)){var y=h(i),b=S.formatting+"-escape";return y?y+" "+b:b}if("!"===l&&t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return t.match(/\[[^\]]*\]/),i.inline=i.f=m,S.image;if("["===l&&t.match(/[^\]]*\](\(.*\)| ?\[.*?\])/,!1))return i.linkText=!0,n.highlightFormatting&&(i.formatting="link"),h(i);if("]"===l&&i.linkText&&t.match(/\(.*?\)| ?\[.*?\]/,!1)){n.highlightFormatting&&(i.formatting="link");var y=h(i);return i.linkText=!1,i.inline=i.f=m,y}if("<"===l&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){i.f=i.inline=g,n.highlightFormatting&&(i.formatting="link");var y=h(i);return y?y+=" ":y="",y+S.linkInline}if("<"===l&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){i.f=i.inline=g,n.highlightFormatting&&(i.formatting="link");var y=h(i);return y?y+=" ":y="",y+S.linkEmail}if("<"===l&&t.match(/^(!--|\w)/,!1)){var w=t.string.indexOf(">",t.pos);if(-1!=w){var k=t.string.substring(t.start,w);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(k)&&(i.md_inside=!0)}return t.backUp(1),i.htmlState=e.startState(x),o(t,i,c)}if("<"===l&&t.match(/^\/\w*?>/))return i.md_inside=!1,"tag";var C=!1;if(!n.underscoresBreakWords&&"_"===l&&"_"!==t.peek()&&t.match(/(\w)/,!1)){var T=t.pos-2;if(T>=0){var E=t.string.charAt(T);"_"!==E&&E.match(/(\w)/,!1)&&(C=!0)}}if("*"===l||"_"===l&&!C)if(a&&" "===t.peek());else{if(i.strong===l&&t.eat(l)){n.highlightFormatting&&(i.formatting="strong");var v=h(i);return i.strong=!1,v}if(!i.strong&&t.eat(l))return i.strong=l,n.highlightFormatting&&(i.formatting="strong"),h(i);if(i.em===l){n.highlightFormatting&&(i.formatting="em");var v=h(i);return i.em=!1,v}if(!i.em)return i.em=l,n.highlightFormatting&&(i.formatting="em"),h(i)}else if(" "===l&&(t.eat("*")||t.eat("_"))){if(" "===t.peek())return h(i);t.backUp(1)}if(n.strikethrough)if("~"===l&&t.eatWhile(l)){if(i.strikethrough){n.highlightFormatting&&(i.formatting="strikethrough");var v=h(i);return i.strikethrough=!1,v}if(t.match(/^[^\s]/,!1))return i.strikethrough=!0,n.highlightFormatting&&(i.formatting="strikethrough"),h(i)}else if(" "===l&&t.match(/^~~/,!0)){if(" "===t.peek())return h(i);t.backUp(2)}return" "===l&&(t.match(/ +$/,!1)?i.trailingSpace++:i.trailingSpace&&(i.trailingSpaceNewLine=!0)),h(i)}function g(e,t){var i=e.next();if(">"===i){t.f=t.inline=p,n.highlightFormatting&&(t.formatting="link");var r=h(t);return r?r+=" ":r="",r+S.linkInline}return e.match(/^[^>]+/,!0),S.linkInline}function m(e,t){if(e.eatSpace())return null;var i=e.next();return"("===i||"["===i?(t.f=t.inline=v("("===i?")":"]",0),n.highlightFormatting&&(t.formatting="link-string"),t.linkHref=!0,h(t)):"error"}function v(e){return function(t,i){var r=t.next();if(r===e){i.f=i.inline=p,n.highlightFormatting&&(i.formatting="link-string");var o=h(i);return i.linkHref=!1,o}return t.match(A[e]),i.linkHref=!0,h(i)}}function y(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=b,e.next(),n.highlightFormatting&&(t.formatting="link"),t.linkText=!0,h(t)):r(e,t,p)}function b(e,t){if(e.match(/^\]:/,!0)){t.f=t.inline=w,n.highlightFormatting&&(t.formatting="link");var i=h(t);return t.linkText=!1,i}return e.match(/^([^\]\\]|\\.)+/,!0),S.linkText}function w(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),void 0===e.peek()?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),t.f=t.inline=p,S.linkHref+" url")}var x=e.getMode(t,"text/html"),k="null"==x.name;void 0===n.highlightFormatting&&(n.highlightFormatting=!1),void 0===n.maxBlockquoteDepth&&(n.maxBlockquoteDepth=0),void 0===n.underscoresBreakWords&&(n.underscoresBreakWords=!0),void 0===n.taskLists&&(n.taskLists=!1),void 0===n.strikethrough&&(n.strikethrough=!1),void 0===n.tokenTypeOverrides&&(n.tokenTypeOverrides={});var S={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"tag",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough"};for(var C in S)S.hasOwnProperty(C)&&n.tokenTypeOverrides[C]&&(S[C]=n.tokenTypeOverrides[C]);var T=/^([*\-_])(?:\s*\1){2,}\s*$/,E=/^[*\-+]\s+/,_=/^[0-9]+([.)])\s+/,L=/^\[(x| )\](?=\s)/,D=n.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,M=/^ *(?:\={1,}|-{1,})\s*$/,H=/^[^#!\[\]*_\\<>` "'(~]+/,N=new RegExp("^("+(n.fencedCodeBlocks===!0?"~~~+|```+":n.fencedCodeBlocks)+")[ \\t]*([\\w+#-]*)"),A={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\\]]|\\.)*\])*?(?=\])/},z={startState:function(){return{f:l,prevLine:null,thisLine:null,block:l,htmlState:null,indentation:0,inline:p,text:f,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,fencedChars:null}},copyState:function(t){return{f:t.f,prevLine:t.prevLine,thisLine:t.thisLine,block:t.block,htmlState:t.htmlState&&e.copyState(x,t.htmlState),indentation:t.indentation,localMode:t.localMode,localState:t.localMode?e.copyState(t.localMode,t.localState):null,inline:t.inline,text:t.text,formatting:!1,linkTitle:t.linkTitle,code:t.code,em:t.em,strong:t.strong,strikethrough:t.strikethrough,header:t.header,hr:t.hr,taskList:t.taskList,list:t.list,listStack:t.listStack.slice(0),quote:t.quote,indentedCode:t.indentedCode,trailingSpace:t.trailingSpace,trailingSpaceNewLine:t.trailingSpaceNewLine,md_inside:t.md_inside,fencedChars:t.fencedChars}},token:function(e,t){if(t.formatting=!1,e!=t.thisLine){var n=t.header||t.hr;if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0)||n){if(a(t),!n)return null;t.prevLine=null}t.prevLine=t.thisLine,t.thisLine=e,t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.f=t.block;var i=e.match(/^\s*/,!0)[0].replace(/\t/g," ").length;if(t.indentationDiff=Math.min(i-t.indentation,4),t.indentation=t.indentation+t.indentationDiff,i>0)return null}return t.f(e,t)},innerMode:function(e){return e.block==c?{state:e.htmlState,mode:x}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:z}},blankLine:a,getType:h,fold:"markdown"};return z},"xml"),e.defineMIME("text/x-markdown","markdown")})},{"../../lib/codemirror":10,"../meta":13,"../xml/xml":14}],13:[function(t,n,i){!function(r){"object"==typeof i&&"object"==typeof n?r(t("../lib/codemirror")):"function"==typeof e&&e.amd?e(["../lib/codemirror"],r):r(CodeMirror)}(function(e){"use strict";e.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["pgp"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists.txt$/},{name:"CoffeeScript",mime:"text/x-coffeescript",mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history).md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"]},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Jade",mime:"text/x-jade",mode:"jade",ext:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"null",mode:"jinja2"},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mime:"text/n-triples",mode:"ntriples",ext:["nt"]},{name:"Objective C",mime:"text/x-objectivec",mode:"clike",ext:["m","mm"],alias:["objective-c","objc"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mime:"application/x-httpd-php",mode:"php",ext:["php","php3","php4","php5","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mime:"text/x-sh",mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki ",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"], -alias:["ts"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mime:"text/x-yaml",mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]}];for(var t=0;t-1&&t.substring(r+1,t.length);return o?e.findModeByExtension(o):void 0},e.findModeByName=function(t){t=t.toLowerCase();for(var n=0;n")):null:e.match("--")?n(l("comment","-->")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(c(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=l("meta","?>"),"meta"):(E=e.eat("/")?"closeTag":"openTag",t.tokenize=s,"tag bracket");if("&"==i){var r;return r=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),r?"atom":"error"}return e.eatWhile(/[^&<]/),null}function s(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">"))return t.tokenize=o,E=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return E="equals",null;if("<"==n){t.tokenize=o,t.state=f,t.tagName=t.tagStart=null;var i=t.tokenize(e,t);return i?i+" tag error":"tag error"}return/[\'\"]/.test(n)?(t.tokenize=a(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function a(e){var t=function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=s;break}return"string"};return t.isInAttribute=!0,t}function l(e,t){return function(n,i){for(;!n.eol();){if(n.match(t)){i.tokenize=o;break}n.next()}return e}}function c(e){return function(t,n){for(var i;null!=(i=t.next());){if("<"==i)return n.tokenize=c(e+1),n.tokenize(t,n);if(">"==i){if(1==e){n.tokenize=o;break}return n.tokenize=c(e-1),n.tokenize(t,n)}}return"meta"}}function u(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(S.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function d(e){e.context&&(e.context=e.context.prev)}function h(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!S.contextGrabbers.hasOwnProperty(n)||!S.contextGrabbers[n].hasOwnProperty(t))return;d(e)}}function f(e,t,n){return"openTag"==e?(n.tagStart=t.column(),p):"closeTag"==e?g:f}function p(e,t,n){return"word"==e?(n.tagName=t.current(),_="tag",y):(_="error",p)}function g(e,t,n){if("word"==e){var i=t.current();return n.context&&n.context.tagName!=i&&S.implicitlyClosed.hasOwnProperty(n.context.tagName)&&d(n),n.context&&n.context.tagName==i||S.matchClosing===!1?(_="tag",m):(_="tag error",v)}return _="error",v}function m(e,t,n){return"endTag"!=e?(_="error",m):(d(n),f)}function v(e,t,n){return _="error",m(e,t,n)}function y(e,t,n){if("word"==e)return _="attribute",b;if("endTag"==e||"selfcloseTag"==e){var i=n.tagName,r=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||S.autoSelfClosers.hasOwnProperty(i)?h(n,i):(h(n,i),n.context=new u(n,i,r==n.indented)),f}return _="error",y}function b(e,t,n){return"equals"==e?w:(S.allowMissing||(_="error"),y(e,t,n))}function w(e,t,n){return"string"==e?x:"word"==e&&S.allowUnquoted?(_="string",y):(_="error",y(e,t,n))}function x(e,t,n){return"string"==e?x:y(e,t,n)}var k=i.indentUnit,S={},C=r.htmlMode?t:n;for(var T in C)S[T]=C[T];for(var T in r)S[T]=r[T];var E,_;return o.isInText=!0,{startState:function(e){var t={tokenize:o,state:f,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;E=null;var n=t.tokenize(e,t);return(n||E)&&"comment"!=n&&(_=null,t.state=t.state(E||n,e,t),_&&(n="error"==_?n+" error":_)),n},indent:function(t,n,i){var r=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+k;if(r&&r.noIndent)return e.Pass;if(t.tokenize!=s&&t.tokenize!=o)return i?i.match(/^(\s*)/)[0].length:0;if(t.tagName)return S.multilineTagIndentPastTag!==!1?t.tagStart+t.tagName.length+2:t.tagStart+k*(S.multilineTagIndentFactor||1);if(S.alignCDATA&&/$/,blockCommentStart:"",configuration:S.htmlMode?"html":"xml",helperType:S.htmlMode?"html":"xml",skipAttribute:function(e){e.state==w&&(e.state=y)}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})})},{"../../lib/codemirror":10}],15:[function(e,t,n){n.read=function(e,t,n,i,r){var o,s,a=8*r-i-1,l=(1<>1,u=-7,d=n?r-1:0,h=n?-1:1,f=e[t+d];for(d+=h,o=f&(1<<-u)-1,f>>=-u,u+=a;u>0;o=256*o+e[t+d],d+=h,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=i;u>0;s=256*s+e[t+d],d+=h,u-=8);if(0===o)o=1-c;else{if(o===l)return s?NaN:(f?-1:1)*(1/0);s+=Math.pow(2,i),o-=c}return(f?-1:1)*s*Math.pow(2,o-i)},n.write=function(e,t,n,i,r,o){var s,a,l,c=8*o-r-1,u=(1<>1,h=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:o-1,p=i?1:-1,g=0>t||0===t&&0>1/t?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),t+=s+d>=1?h/l:h*Math.pow(2,1-d),t*l>=2&&(s++,l/=2),s+d>=u?(a=0,s=u):s+d>=1?(a=(t*l-1)*Math.pow(2,r),s+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,r),s=0));r>=8;e[n+f]=255&a,f+=p,a/=256,r-=8);for(s=s<0;e[n+f]=255&s,f+=p,s/=256,c-=8);e[n+f-p]|=128*g}},{}],16:[function(e,t,n){var i={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==i.call(e)}},{}],17:[function(t,n,i){(function(t){(function(){function t(e){this.tokens=[],this.tokens.links={},this.options=e||h.defaults,this.rules=f.normal,this.options.gfm&&(this.options.tables?this.rules=f.tables:this.rules=f.gfm)}function r(e,t){if(this.options=t||h.defaults,this.links=e,this.rules=p.normal,this.renderer=this.options.renderer||new o,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.gfm?this.options.breaks?this.rules=p.breaks:this.rules=p.gfm:this.options.pedantic&&(this.rules=p.pedantic)}function o(e){this.options=e||{}}function s(e){this.tokens=[],this.token=null,this.options=e||h.defaults,this.options.renderer=this.options.renderer||new o,this.renderer=this.options.renderer,this.renderer.options=this.options}function a(e,t){return e.replace(t?/&/g:/&(?!#?\w+;)/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function l(e){return e.replace(/&([#\w]+);/g,function(e,t){return t=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}function c(e,t){return e=e.source,t=t||"",function n(i,r){return i?(r=r.source||r,r=r.replace(/(^|[^\[])\^/g,"$1"),e=e.replace(i,r),n):new RegExp(e,t)}}function u(){}function d(e){for(var t,n,i=1;iAn error occured:

    "+a(e.message+"",!0)+"
    ";throw e}}var f={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:u,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:u,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:u,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};f.bullet=/(?:[*+-]|\d+\.)/,f.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,f.item=c(f.item,"gm")(/bull/g,f.bullet)(),f.list=c(f.list)(/bull/g,f.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+f.def.source+")")(),f.blockquote=c(f.blockquote)("def",f.def)(),f._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",f.html=c(f.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,f._tag)(),f.paragraph=c(f.paragraph)("hr",f.hr)("heading",f.heading)("lheading",f.lheading)("blockquote",f.blockquote)("tag","<"+f._tag)("def",f.def)(),f.normal=d({},f),f.gfm=d({},f.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),f.gfm.paragraph=c(f.paragraph)("(?!","(?!"+f.gfm.fences.source.replace("\\1","\\2")+"|"+f.list.source.replace("\\1","\\3")+"|")(),f.tables=d({},f.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),t.rules=f,t.lex=function(e,n){var i=new t(n);return i.lex(e)},t.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},t.prototype.token=function(e,t,n){for(var i,r,o,s,a,l,c,u,d,e=e.replace(/^ +$/gm,"");e;)if((o=this.rules.newline.exec(e))&&(e=e.substring(o[0].length),o[0].length>1&&this.tokens.push({type:"space"})),o=this.rules.code.exec(e))e=e.substring(o[0].length),o=o[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?o:o.replace(/\n+$/,"")});else if(o=this.rules.fences.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"code",lang:o[2],text:o[3]||""});else if(o=this.rules.heading.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"heading",depth:o[1].length,text:o[2]});else if(t&&(o=this.rules.nptable.exec(e))){for(e=e.substring(o[0].length),l={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/\n$/,"").split("\n")},u=0;u ?/gm,""),this.token(o,t,!0),this.tokens.push({type:"blockquote_end"});else if(o=this.rules.list.exec(e)){for(e=e.substring(o[0].length),s=o[2],this.tokens.push({type:"list_start",ordered:s.length>1}),o=o[0].match(this.rules.item),i=!1,d=o.length,u=0;d>u;u++)l=o[u],c=l.length,l=l.replace(/^ *([*+-]|\d+\.) +/,""),~l.indexOf("\n ")&&(c-=l.length,l=this.options.pedantic?l.replace(/^ {1,4}/gm,""):l.replace(new RegExp("^ {1,"+c+"}","gm"),"")),this.options.smartLists&&u!==d-1&&(a=f.bullet.exec(o[u+1])[0],s===a||s.length>1&&a.length>1||(e=o.slice(u+1).join("\n")+e,u=d-1)),r=i||/\n\n(?!\s*$)/.test(l),u!==d-1&&(i="\n"===l.charAt(l.length-1),r||(r=i)),this.tokens.push({type:r?"loose_item_start":"list_item_start"}),this.token(l,!1,n),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(o=this.rules.html.exec(e))e=e.substring(o[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===o[1]||"script"===o[1]||"style"===o[1]),text:o[0]});else if(!n&&t&&(o=this.rules.def.exec(e)))e=e.substring(o[0].length),this.tokens.links[o[1].toLowerCase()]={href:o[2],title:o[3]};else if(t&&(o=this.rules.table.exec(e))){for(e=e.substring(o[0].length),l={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/(?: *\| *)?\n$/,"").split("\n")},u=0;u])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:u,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:u,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/,p.link=c(p.link)("inside",p._inside)("href",p._href)(),p.reflink=c(p.reflink)("inside",p._inside)(),p.normal=d({},p),p.pedantic=d({},p.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),p.gfm=d({},p.normal,{escape:c(p.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:c(p.text)("]|","~]|")("|","|https?://|")()}),p.breaks=d({},p.gfm,{br:c(p.br)("{2,}","*")(),text:c(p.gfm.text)("{2,}","*")()}),r.rules=p,r.output=function(e,t,n){var i=new r(t,n);return i.output(e)},r.prototype.output=function(e){for(var t,n,i,r,o="";e;)if(r=this.rules.escape.exec(e))e=e.substring(r[0].length),o+=r[1];else if(r=this.rules.autolink.exec(e))e=e.substring(r[0].length),"@"===r[2]?(n=":"===r[1].charAt(6)?this.mangle(r[1].substring(7)):this.mangle(r[1]),i=this.mangle("mailto:")+n):(n=a(r[1]),i=n),o+=this.renderer.link(i,null,n);else if(this.inLink||!(r=this.rules.url.exec(e))){if(r=this.rules.tag.exec(e))!this.inLink&&/^/i.test(r[0])&&(this.inLink=!1),e=e.substring(r[0].length),o+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):a(r[0]):r[0];else if(r=this.rules.link.exec(e))e=e.substring(r[0].length),this.inLink=!0,o+=this.outputLink(r,{href:r[2],title:r[3]}),this.inLink=!1;else if((r=this.rules.reflink.exec(e))||(r=this.rules.nolink.exec(e))){if(e=e.substring(r[0].length),t=(r[2]||r[1]).replace(/\s+/g," "),t=this.links[t.toLowerCase()],!t||!t.href){o+=r[0].charAt(0),e=r[0].substring(1)+e;continue}this.inLink=!0,o+=this.outputLink(r,t),this.inLink=!1}else if(r=this.rules.strong.exec(e))e=e.substring(r[0].length),o+=this.renderer.strong(this.output(r[2]||r[1]));else if(r=this.rules.em.exec(e))e=e.substring(r[0].length),o+=this.renderer.em(this.output(r[2]||r[1]));else if(r=this.rules.code.exec(e))e=e.substring(r[0].length),o+=this.renderer.codespan(a(r[2],!0));else if(r=this.rules.br.exec(e))e=e.substring(r[0].length),o+=this.renderer.br();else if(r=this.rules.del.exec(e))e=e.substring(r[0].length),o+=this.renderer.del(this.output(r[1]));else if(r=this.rules.text.exec(e))e=e.substring(r[0].length),o+=this.renderer.text(a(this.smartypants(r[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else e=e.substring(r[0].length),n=a(r[1]),i=n,o+=this.renderer.link(i,null,n);return o},r.prototype.outputLink=function(e,t){var n=a(t.href),i=t.title?a(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,i,this.output(e[1])):this.renderer.image(n,i,a(e[1]))},r.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014\/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014\/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},r.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",i=e.length,r=0;i>r;r++)t=e.charCodeAt(r),Math.random()>.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},o.prototype.code=function(e,t,n){if(this.options.highlight){var i=this.options.highlight(e,t);null!=i&&i!==e&&(n=!0,e=i)}return t?'
    '+(n?e:a(e,!0))+"\n
    \n":"
    "+(n?e:a(e,!0))+"\n
    "},o.prototype.blockquote=function(e){return"
    \n"+e+"
    \n"},o.prototype.html=function(e){return e},o.prototype.heading=function(e,t,n){return"'+e+"\n"},o.prototype.hr=function(){return this.options.xhtml?"
    \n":"
    \n"},o.prototype.list=function(e,t){var n=t?"ol":"ul";return"<"+n+">\n"+e+"\n"},o.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},o.prototype.paragraph=function(e){return"

    "+e+"

    \n"},o.prototype.table=function(e,t){return"\n\n"+e+"\n\n"+t+"\n
    \n"},o.prototype.tablerow=function(e){return"\n"+e+"\n"},o.prototype.tablecell=function(e,t){var n=t.header?"th":"td",i=t.align?"<"+n+' style="text-align:'+t.align+'">':"<"+n+">";return i+e+"\n"},o.prototype.strong=function(e){return""+e+""},o.prototype.em=function(e){return""+e+""},o.prototype.codespan=function(e){return""+e+""},o.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},o.prototype.del=function(e){return""+e+""},o.prototype.link=function(e,t,n){if(this.options.sanitize){try{var i=decodeURIComponent(l(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(0===i.indexOf("javascript:")||0===i.indexOf("vbscript:"))return""}var r='
    "},o.prototype.image=function(e,t,n){var i=''+n+'":">"},o.prototype.text=function(e){return e},s.parse=function(e,t,n){var i=new s(t,n);return i.parse(e)},s.prototype.parse=function(e){this.inline=new r(e.links,this.options,this.renderer),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},s.prototype.next=function(){return this.token=this.tokens.pop()},s.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},s.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},s.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,i,r,o="",s="";for(n="",e=0;es;s++)for(var l=this.compoundRules[s],c=0,u=l.length;u>c;c++)this.compoundRuleCodes[l[c]]=[];"ONLYINCOMPOUND"in this.flags&&(this.compoundRuleCodes[this.flags.ONLYINCOMPOUND]=[]),this.dictionaryTable=this._parseDIC(n);for(var s in this.compoundRuleCodes)0==this.compoundRuleCodes[s].length&&delete this.compoundRuleCodes[s];for(var s=0,a=this.compoundRules.length;a>s;s++){for(var d=this.compoundRules[s],h="",c=0,u=d.length;u>c;c++){var f=d[c];h+=f in this.compoundRuleCodes?"("+this.compoundRuleCodes[f].join("|")+")":f}this.compoundRules[s]=new RegExp(h,"i")}}return this};r.prototype={load:function(e){for(var t in e)this[t]=e[t];return this},_readFile:function(t,i){if(i||(i="utf8"),"undefined"!=typeof XMLHttpRequest){var r=new XMLHttpRequest;return r.open("GET",t,!1),r.overrideMimeType&&r.overrideMimeType("text/plain; charset="+i),r.send(null),r.responseText}if("undefined"!=typeof e){var o=e("fs");try{if(o.existsSync(t)){var s=o.statSync(t),a=o.openSync(t,"r"),l=new n(s.size);return o.readSync(a,l,0,l.length,null),l.toString(i,0,l.length)}console.log("Path "+t+" does not exist.")}catch(e){return console.log(e),""}}},_parseAFF:function(e){var t={};e=this._removeAffixComments(e);for(var n=e.split("\n"),i=0,r=n.length;r>i;i++){var o=n[i],s=o.split(/\s+/),a=s[0];if("PFX"==a||"SFX"==a){for(var l=s[1],c=s[2],u=parseInt(s[3],10),d=[],h=i+1,f=i+1+u;f>h;h++){var o=n[h],p=o.split(/\s+/),g=p[2],m=p[3].split("/"),v=m[0];"0"===v&&(v="");var y=this.parseRuleCodes(m[1]),b=p[4],w={};w.add=v,y.length>0&&(w.continuationClasses=y),"."!==b&&("SFX"===a?w.match=new RegExp(b+"$"):w.match=new RegExp("^"+b)),"0"!=g&&("SFX"===a?w.remove=new RegExp(g+"$"):w.remove=g),d.push(w)}t[l]={type:a,combineable:"Y"==c,entries:d},i+=u}else if("COMPOUNDRULE"===a){for(var u=parseInt(s[1],10),h=i+1,f=i+1+u;f>h;h++){var o=n[h],p=o.split(/\s+/);this.compoundRules.push(p[1])}i+=u}else if("REP"===a){var p=o.split(/\s+/);3===p.length&&this.replacementTable.push([p[1],p[2]])}else this.flags[a]=s[1]}return t},_removeAffixComments:function(e){return e=e.replace(/#.*$/gm,""),e=e.replace(/^\s\s*/m,"").replace(/\s\s*$/m,""),e=e.replace(/\n{2,}/g,"\n"),e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")},_parseDIC:function(e){function t(e,t){e in i&&"object"==typeof i[e]||(i[e]=[]),i[e].push(t)}e=this._removeDicComments(e);for(var n=e.split("\n"),i={},r=1,o=n.length;o>r;r++){var s=n[r],a=s.split("/",2),l=a[0];if(a.length>1){var c=this.parseRuleCodes(a[1]);"NEEDAFFIX"in this.flags&&-1!=c.indexOf(this.flags.NEEDAFFIX)||t(l,c);for(var u=0,d=c.length;d>u;u++){var h=c[u],f=this.rules[h];if(f)for(var p=this._applyRule(l,f),g=0,m=p.length;m>g;g++){var v=p[g];if(t(v,[]),f.combineable)for(var y=u+1;d>y;y++){var b=c[y],w=this.rules[b];if(w&&w.combineable&&f.type!=w.type)for(var x=this._applyRule(v,w),k=0,S=x.length;S>k;k++){var C=x[k];t(C,[])}}}h in this.compoundRuleCodes&&this.compoundRuleCodes[h].push(l)}}else t(l.trim(),[])}return i},_removeDicComments:function(e){return e=e.replace(/^\t.*$/gm,"")},parseRuleCodes:function(e){if(!e)return[];if(!("FLAG"in this.flags))return e.split("");if("long"===this.flags.FLAG){for(var t=[],n=0,i=e.length;i>n;n+=2)t.push(e.substr(n,2));return t}return"num"===this.flags.FLAG?textCode.split(","):void 0},_applyRule:function(e,t){for(var n=t.entries,i=[],r=0,o=n.length;o>r;r++){var s=n[r];if(!s.match||e.match(s.match)){var a=e;if(s.remove&&(a=a.replace(s.remove,"")),"SFX"===t.type?a+=s.add:a=s.add+a,i.push(a),"continuationClasses"in s)for(var l=0,c=s.continuationClasses.length;c>l;l++){var u=this.rules[s.continuationClasses[l]];u&&(i=i.concat(this._applyRule(a,u)))}}}return i},check:function(e){var t=e.replace(/^\s\s*/,"").replace(/\s\s*$/,"");if(this.checkExact(t))return!0;if(t.toUpperCase()===t){var n=t[0]+t.substring(1).toLowerCase();if(this.hasFlag(n,"KEEPCASE"))return!1;if(this.checkExact(n))return!0}var i=t.toLowerCase();if(i!==t){if(this.hasFlag(i,"KEEPCASE"))return!1;if(this.checkExact(i))return!0}return!1},checkExact:function(e){var t=this.dictionaryTable[e];if("undefined"==typeof t){if("COMPOUNDMIN"in this.flags&&e.length>=this.flags.COMPOUNDMIN)for(var n=0,i=this.compoundRules.length;i>n;n++)if(e.match(this.compoundRules[n]))return!0;return!1}if("object"==typeof t){for(var n=0,i=t.length;i>n;n++)if(!this.hasFlag(e,"ONLYINCOMPOUND",t[n]))return!0;return!1}},hasFlag:function(e,t,n){if(t in this.flags){if("undefined"==typeof n)var n=Array.prototype.concat.apply([],this.dictionaryTable[e]);if(n&&-1!==n.indexOf(this.flags[t]))return!0}return!1},alphabet:"",suggest:function(e,t){function n(e){for(var t=[],n=0,i=e.length;i>n;n++){for(var r=e[n],o=[],s=0,a=r.length+1;a>s;s++)o.push([r.substring(0,s),r.substring(s,r.length)]);for(var l=[],s=0,a=o.length;a>s;s++){var u=o[s];u[1]&&l.push(u[0]+u[1].substring(1))}for(var d=[],s=0,a=o.length;a>s;s++){var u=o[s];u[1].length>1&&d.push(u[0]+u[1][1]+u[1][0]+u[1].substring(2))}for(var h=[],s=0,a=o.length;a>s;s++){var u=o[s];if(u[1])for(var f=0,p=c.alphabet.length;p>f;f++)h.push(u[0]+c.alphabet[f]+u[1].substring(1))}for(var g=[],s=0,a=o.length;a>s;s++){var u=o[s];if(u[1])for(var f=0,p=c.alphabet.length;p>f;f++)h.push(u[0]+c.alphabet[f]+u[1])}t=t.concat(l),t=t.concat(d),t=t.concat(h),t=t.concat(g)}return t}function i(e){for(var t=[],n=0;nu;u++)a[u]in l?l[a[u]]+=1:l[a[u]]=1;var h=[];for(var u in l)h.push([u,l[u]]);h.sort(r).reverse();for(var f=[],u=0,d=Math.min(t,h.length);d>u;u++)c.hasFlag(h[u][0],"NOSUGGEST")||f.push(h[u][0]);return f}if(t||(t=5),this.check(e))return[];for(var o=0,s=this.replacementTable.length;s>o;o++){var a=this.replacementTable[o];if(-1!==e.indexOf(a[0])){var l=e.replace(a[0],a[1]);if(this.check(l))return[l]}}var c=this;return c.alphabet="abcdefghijklmnopqrstuvwxyz",r(e)}},"undefined"!=typeof t&&(t.exports=r)}).call(this,e("buffer").Buffer,"/node_modules/typo-js")},{buffer:3,fs:2}],19:[function(e,t,n){var i=e("codemirror");i.commands.tabAndIndentMarkdownList=function(e){var t=e.listSelections(),n=t[0].head,i=e.getStateAfter(n.line),r=i.list!==!1;if(r)return void e.execCommand("indentMore");if(e.options.indentWithTabs)e.execCommand("insertTab");else{var o=Array(e.options.tabSize+1).join(" ");e.replaceSelection(o)}},i.commands.shiftTabAndUnindentMarkdownList=function(e){ -var t=e.listSelections(),n=t[0].head,i=e.getStateAfter(n.line),r=i.list!==!1;if(r)return void e.execCommand("indentLess");if(e.options.indentWithTabs)e.execCommand("insertTab");else{var o=Array(e.options.tabSize+1).join(" ");e.replaceSelection(o)}}},{codemirror:10}],20:[function(e,t,n){"use strict";function i(e){return e=Y?e.replace("Ctrl","Cmd"):e.replace("Cmd","Ctrl")}function r(e,t,n){e=e||{};var i=document.createElement("a");return t=void 0==t||t,e.title&&t&&(i.title=s(e.title,e.action,n),Y&&(i.title=i.title.replace("Ctrl","⌘"),i.title=i.title.replace("Alt","⌥"))),i.tabIndex=-1,i.className=e.className,i}function o(){var e=document.createElement("i");return e.className="separator",e.innerHTML="|",e}function s(e,t,n){var r,o=e;return t&&(r=G(t),n[r]&&(o+=" ("+i(n[r])+")")),o}function a(e,t){t=t||e.getCursor("start");var n=e.getTokenAt(t);if(!n.type)return{};for(var i,r,o=n.type.split(" "),s={},a=0;a=0&&(f=c.getLineHandle(o),!t(f));o--);var v,y,b,w,x=c.getTokenAt({line:o,ch:1}),k=n(x).fencedChars;t(c.getLineHandle(u.line))?(v="",y=u.line):t(c.getLineHandle(u.line-1))?(v="",y=u.line-1):(v=k+"\n",y=u.line),t(c.getLineHandle(d.line))?(b="",w=d.line,0===d.ch&&(w+=1)):0!==d.ch&&t(c.getLineHandle(d.line+1))?(b="",w=d.line+1):(b=k+"\n",w=d.line+1),0===d.ch&&(w-=1),c.operation(function(){c.replaceRange(b,{line:w,ch:0},{line:w+(b?0:1),ch:0}),c.replaceRange(v,{line:y,ch:0},{line:y+(v?0:1),ch:0})}),c.setSelection({line:y+(v?1:0),ch:0},{line:w+(v?1:-1),ch:0}),c.focus()}else{var S=u.line;if(t(c.getLineHandle(u.line))&&("fenced"===i(c,u.line+1)?(o=u.line,S=u.line+1):(s=u.line,S=u.line-1)),void 0===o)for(o=S;o>=0&&(f=c.getLineHandle(o),!t(f));o--);if(void 0===s)for(a=c.lineCount(),s=S;a>s&&(f=c.getLineHandle(s),!t(f));s++);c.operation(function(){c.replaceRange("",{line:o,ch:0},{line:o+1,ch:0}),c.replaceRange("",{line:s-1,ch:0},{line:s,ch:0})}),c.focus()}else if("indented"===p){if(u.line!==d.line||u.ch!==d.ch)o=u.line,s=d.line,0===d.ch&&s--;else{for(o=u.line;o>=0;o--)if(f=c.getLineHandle(o),!f.text.match(/^\s*$/)&&"indented"!==i(c,o,f)){o+=1;break}for(a=c.lineCount(),s=u.line;a>s;s++)if(f=c.getLineHandle(s),!f.text.match(/^\s*$/)&&"indented"!==i(c,s,f)){s-=1;break}}var C=c.getLineHandle(s+1),T=C&&c.getTokenAt({line:s+1,ch:C.text.length-1}),E=T&&n(T).indentedCode;E&&c.replaceRange("\n",{line:s+1,ch:0});for(var _=o;s>=_;_++)c.indentLine(_,"subtract");c.focus()}else{var L=u.line===d.line&&u.ch===d.ch&&0===u.ch,D=u.line!==d.line;L||D?r(c,u,d,l):M(c,!1,["`","`"])}}function f(e){var t=e.codemirror;N(t,"quote")}function p(e){var t=e.codemirror;H(t,"smaller")}function g(e){var t=e.codemirror;H(t,"bigger")}function m(e){var t=e.codemirror;H(t,void 0,1)}function v(e){var t=e.codemirror;H(t,void 0,2)}function y(e){var t=e.codemirror;H(t,void 0,3)}function b(e){var t=e.codemirror;N(t,"unordered-list")}function w(e){var t=e.codemirror;N(t,"ordered-list")}function x(e){var t=e.codemirror;z(t)}function k(e){var t=e.codemirror,n=a(t),i=e.options,r="http://";return!(i.promptURLs&&(r=prompt(i.promptTexts.link),!r))&&void M(t,n.link,i.insertTexts.link,r)}function S(e){var t=e.codemirror,n=a(t),i=e.options,r="http://";return!(i.promptURLs&&(r=prompt(i.promptTexts.image),!r))&&void M(t,n.image,i.insertTexts.image,r)}function C(e){var t=e.codemirror,n=a(t),i=e.options;M(t,n.table,i.insertTexts.table)}function T(e){var t=e.codemirror,n=a(t),i=e.options;M(t,n.image,i.insertTexts.horizontalRule)}function E(e){var t=e.codemirror;t.undo(),t.focus()}function _(e){var t=e.codemirror;t.redo(),t.focus()}function L(e){var t=e.codemirror,n=t.getWrapperElement(),i=n.nextSibling,r=e.toolbarElements["side-by-side"],o=!1;/editor-preview-active-side/.test(i.className)?(i.className=i.className.replace(/\s*editor-preview-active-side\s*/g,""),r.className=r.className.replace(/\s*active\s*/g,""),n.className=n.className.replace(/\s*CodeMirror-sided\s*/g," ")):(setTimeout(function(){t.getOption("fullScreen")||l(e),i.className+=" editor-preview-active-side"},1),r.className+=" active",n.className+=" CodeMirror-sided",o=!0);var s=n.lastChild;if(/editor-preview-active/.test(s.className)){s.className=s.className.replace(/\s*editor-preview-active\s*/g,"");var a=e.toolbarElements.preview,c=n.previousSibling;a.className=a.className.replace(/\s*active\s*/g,""),c.className=c.className.replace(/\s*disabled-for-preview*/g,"")}var u=function(){i.innerHTML=e.options.previewRender(e.value(),i)};t.sideBySideRenderingFunction||(t.sideBySideRenderingFunction=u),o?(i.innerHTML=e.options.previewRender(e.value(),i),t.on("update",t.sideBySideRenderingFunction)):t.off("update",t.sideBySideRenderingFunction),t.refresh()}function D(e){var t=e.codemirror,n=t.getWrapperElement(),i=n.previousSibling,r=!!e.options.toolbar&&e.toolbarElements.preview,o=n.lastChild;o&&/editor-preview/.test(o.className)||(o=document.createElement("div"),o.className="editor-preview",n.appendChild(o)),/editor-preview-active/.test(o.className)?(o.className=o.className.replace(/\s*editor-preview-active\s*/g,""),r&&(r.className=r.className.replace(/\s*active\s*/g,""),i.className=i.className.replace(/\s*disabled-for-preview*/g,""))):(setTimeout(function(){o.className+=" editor-preview-active"},1),r&&(r.className+=" active",i.className+=" disabled-for-preview")),o.innerHTML=e.options.previewRender(e.value(),o);var s=t.getWrapperElement().nextSibling;/editor-preview-active-side/.test(s.className)&&L(e)}function M(e,t,n,i){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){var r,o=n[0],s=n[1],a=e.getCursor("start"),l=e.getCursor("end");i&&(s=s.replace("#url#",i)),t?(r=e.getLine(a.line),o=r.slice(0,a.ch),s=r.slice(a.ch),e.replaceRange(o+s,{line:a.line,ch:0})):(r=e.getSelection(),e.replaceSelection(o+r+s),a.ch+=o.length,a!==l&&(l.ch+=o.length)),e.setSelection(a,l),e.focus()}}function H(e,t,n){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){for(var i=e.getCursor("start"),r=e.getCursor("end"),o=i.line;o<=r.line;o++)!function(i){var r=e.getLine(i),o=r.search(/[^#]/);r=void 0!==t?0>=o?"bigger"==t?"###### "+r:"# "+r:6==o&&"smaller"==t?r.substr(7):1==o&&"bigger"==t?r.substr(2):"bigger"==t?r.substr(1):"#"+r:1==n?0>=o?"# "+r:o==n?r.substr(o+1):"# "+r.substr(o+1):2==n?0>=o?"## "+r:o==n?r.substr(o+1):"## "+r.substr(o+1):0>=o?"### "+r:o==n?r.substr(o+1):"### "+r.substr(o+1),e.replaceRange(r,{line:i,ch:0},{line:i,ch:99999999999999})}(o);e.focus()}}function N(e,t){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){for(var n=a(e),i=e.getCursor("start"),r=e.getCursor("end"),o={quote:/^(\s*)\>\s+/,"unordered-list":/^(\s*)(\*|\-|\+)\s+/,"ordered-list":/^(\s*)\d+\.\s+/},s={quote:"> ","unordered-list":"* ","ordered-list":"1. "},l=i.line;l<=r.line;l++)!function(i){var r=e.getLine(i);r=n[t]?r.replace(o[t],"$1"):s[t]+r,e.replaceRange(r,{line:i,ch:0},{line:i,ch:99999999999999})}(l);e.focus()}}function A(e,t,n,i){if(!/editor-preview-active/.test(e.codemirror.getWrapperElement().lastChild.className)){i="undefined"==typeof i?n:i;var r,o=e.codemirror,s=a(o),l=n,c=i,u=o.getCursor("start"),d=o.getCursor("end");s[t]?(r=o.getLine(u.line),l=r.slice(0,u.ch),c=r.slice(u.ch),"bold"==t?(l=l.replace(/(\*\*|__)(?![\s\S]*(\*\*|__))/,""),c=c.replace(/(\*\*|__)/,"")):"italic"==t?(l=l.replace(/(\*|_)(?![\s\S]*(\*|_))/,""),c=c.replace(/(\*|_)/,"")):"strikethrough"==t&&(l=l.replace(/(\*\*|~~)(?![\s\S]*(\*\*|~~))/,""),c=c.replace(/(\*\*|~~)/,"")),o.replaceRange(l+c,{line:u.line,ch:0},{line:u.line,ch:99999999999999}),"bold"==t||"strikethrough"==t?(u.ch-=2,u!==d&&(d.ch-=2)):"italic"==t&&(u.ch-=1,u!==d&&(d.ch-=1))):(r=o.getSelection(),"bold"==t?(r=r.split("**").join(""),r=r.split("__").join("")):"italic"==t?(r=r.split("*").join(""),r=r.split("_").join("")):"strikethrough"==t&&(r=r.split("~~").join("")),o.replaceSelection(l+r+c),u.ch+=n.length,d.ch=u.ch+r.length),o.setSelection(u,d),o.focus()}}function z(e){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className))for(var t,n=e.getCursor("start"),i=e.getCursor("end"),r=n.line;r<=i.line;r++)t=e.getLine(r),t=t.replace(/^[ ]*([# ]+|\*|\-|[> ]+|[0-9]+(.|\)))[ ]*/,""),e.replaceRange(t,{line:r,ch:0},{line:r,ch:99999999999999})}function R(e,t){for(var n in t)t.hasOwnProperty(n)&&(t[n]instanceof Array?e[n]=t[n].concat(e[n]instanceof Array?e[n]:[]):null!==t[n]&&"object"==typeof t[n]&&t[n].constructor===Object?e[n]=R(e[n]||{},t[n]):e[n]=t[n]);return e}function I(e){for(var t=1;t=19968?n[r].length:1;return i}function F(e){e=e||{},e.parent=this;var t=!0;if(e.autoDownloadFontAwesome===!1&&(t=!1),e.autoDownloadFontAwesome!==!0)for(var n=document.styleSheets,i=0;i-1&&(t=!1);if(t){var r=document.createElement("link");r.rel="stylesheet",r.href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css",document.getElementsByTagName("head")[0].appendChild(r)}if(e.element)this.element=e.element;else if(null===e.element)return void console.log("SimpleMDE: Error. No element was found.");if(void 0===e.toolbar){e.toolbar=[];for(var o in Z)Z.hasOwnProperty(o)&&(-1!=o.indexOf("separator-")&&e.toolbar.push("|"),(Z[o].default===!0||e.showIcons&&e.showIcons.constructor===Array&&-1!=e.showIcons.indexOf(o))&&e.toolbar.push(o))}e.hasOwnProperty("status")||(e.status=["autosave","lines","words","cursor"]),e.previewRender||(e.previewRender=function(e){return this.parent.markdown(e)}),e.parsingConfig=I({highlightFormatting:!0},e.parsingConfig||{}),e.insertTexts=I({},X,e.insertTexts||{}),e.promptTexts=Q,e.blockStyles=I({},K,e.blockStyles||{}),e.shortcuts=I({},q,e.shortcuts||{}),void 0!=e.autosave&&void 0!=e.autosave.unique_id&&""!=e.autosave.unique_id&&(e.autosave.uniqueId=e.autosave.unique_id),this.options=e,this.render(),!e.initialValue||this.options.autosave&&this.options.autosave.foundSavedValue===!0||this.value(e.initialValue)}function P(){if("object"!=typeof localStorage)return!1;try{localStorage.setItem("smde_localStorage",1),localStorage.removeItem("smde_localStorage")}catch(e){return!1}return!0}var W=e("codemirror");e("codemirror/addon/edit/continuelist.js"),e("./codemirror/tablist"),e("codemirror/addon/display/fullscreen.js"),e("codemirror/mode/markdown/markdown.js"),e("codemirror/addon/mode/overlay.js"),e("codemirror/addon/display/placeholder.js"),e("codemirror/addon/selection/mark-selection.js"),e("codemirror/mode/gfm/gfm.js"),e("codemirror/mode/xml/xml.js");var B=e("codemirror-spell-checker"),j=e("marked"),Y=/Mac/.test(navigator.platform),U={toggleBold:c,toggleItalic:u,drawLink:k,toggleHeadingSmaller:p,toggleHeadingBigger:g,drawImage:S,toggleBlockquote:f,toggleOrderedList:w,toggleUnorderedList:b,toggleCodeBlock:h,togglePreview:D,toggleStrikethrough:d,toggleHeading1:m,toggleHeading2:v,toggleHeading3:y,cleanBlock:x,drawTable:C,drawHorizontalRule:T,undo:E,redo:_,toggleSideBySide:L,toggleFullScreen:l},q={toggleBold:"Cmd-B",toggleItalic:"Cmd-I",drawLink:"Cmd-K",toggleHeadingSmaller:"Cmd-H",toggleHeadingBigger:"Shift-Cmd-H",cleanBlock:"Cmd-E",drawImage:"Cmd-Alt-I",toggleBlockquote:"Cmd-'",toggleOrderedList:"Cmd-Alt-L",toggleUnorderedList:"Cmd-L",toggleCodeBlock:"Cmd-Alt-C",togglePreview:"Cmd-P",toggleSideBySide:"F9",toggleFullScreen:"F11"},G=function(e){for(var t in U)if(U[t]===e)return t;return null},V=function(){var e=!1;return function(t){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(e=!0)}(navigator.userAgent||navigator.vendor||window.opera),e},$="",Z={bold:{name:"bold",action:c,className:"fa fa-bold",title:"Bold",default:!0},italic:{name:"italic",action:u,className:"fa fa-italic",title:"Italic",default:!0},strikethrough:{name:"strikethrough",action:d,className:"fa fa-strikethrough",title:"Strikethrough"},heading:{name:"heading",action:p,className:"fa fa-header",title:"Heading",default:!0},"heading-smaller":{name:"heading-smaller",action:p,className:"fa fa-header fa-header-x fa-header-smaller",title:"Smaller Heading"},"heading-bigger":{name:"heading-bigger",action:g,className:"fa fa-header fa-header-x fa-header-bigger",title:"Bigger Heading"},"heading-1":{name:"heading-1",action:m,className:"fa fa-header fa-header-x fa-header-1",title:"Big Heading"},"heading-2":{name:"heading-2",action:v,className:"fa fa-header fa-header-x fa-header-2",title:"Medium Heading"},"heading-3":{name:"heading-3",action:y,className:"fa fa-header fa-header-x fa-header-3",title:"Small Heading"},"separator-1":{name:"separator-1"},code:{name:"code",action:h,className:"fa fa-code",title:"Code"},quote:{name:"quote",action:f,className:"fa fa-quote-left",title:"Quote",default:!0},"unordered-list":{name:"unordered-list",action:b,className:"fa fa-list-ul",title:"Generic List",default:!0},"ordered-list":{name:"ordered-list",action:w,className:"fa fa-list-ol",title:"Numbered List",default:!0},"clean-block":{name:"clean-block",action:x,className:"fa fa-eraser fa-clean-block",title:"Clean block"},"separator-2":{name:"separator-2"},link:{name:"link",action:k,className:"fa fa-link",title:"Create Link",default:!0},image:{name:"image",action:S,className:"fa fa-picture-o",title:"Insert Image",default:!0},table:{name:"table",action:C,className:"fa fa-table",title:"Insert Table"},"horizontal-rule":{name:"horizontal-rule",action:T,className:"fa fa-minus",title:"Insert Horizontal Line"},"separator-3":{name:"separator-3"},preview:{name:"preview",action:D,className:"fa fa-eye no-disable",title:"Toggle Preview",default:!0},"side-by-side":{name:"side-by-side",action:L,className:"fa fa-columns no-disable no-mobile",title:"Toggle Side by Side",default:!0},fullscreen:{name:"fullscreen",action:l,className:"fa fa-arrows-alt no-disable no-mobile",title:"Toggle Fullscreen",default:!0},"separator-4":{name:"separator-4"},guide:{name:"guide",action:"https://simplemde.com/markdown-guide",className:"fa fa-question-circle",title:"Markdown Guide",default:!0},"separator-5":{name:"separator-5"},undo:{name:"undo",action:E,className:"fa fa-undo no-disable",title:"Undo"},redo:{name:"redo",action:_,className:"fa fa-repeat no-disable",title:"Redo"}},X={link:["[","](#url#)"],image:["![](","#url#)"],table:["","\n\n| Column 1 | Column 2 | Column 3 |\n| -------- | -------- | -------- |\n| Text | Text | Text |\n\n"],horizontalRule:["","\n\n-----\n\n"]},Q={link:"URL for the link:",image:"URL of the image:"},K={bold:"**",code:"```",italic:"*"};F.prototype.markdown=function(e){if(j){var t={};return this.options&&this.options.renderingConfig&&this.options.renderingConfig.singleLineBreaks===!1?t.breaks=!1:t.breaks=!0,this.options&&this.options.renderingConfig&&this.options.renderingConfig.codeSyntaxHighlighting===!0&&window.hljs&&(t.highlight=function(e){return window.hljs.highlightAuto(e).value}),j.setOptions(t),j(e)}},F.prototype.render=function(e){if(e||(e=this.element||document.getElementsByTagName("textarea")[0]),!this._rendered||this._rendered!==e){this.element=e;var t=this.options,n=this,r={};for(var o in t.shortcuts)null!==t.shortcuts[o]&&null!==U[o]&&!function(e){r[i(t.shortcuts[e])]=function(){U[e](n)}}(o);r.Enter="newlineAndIndentContinueMarkdownList",r.Tab="tabAndIndentMarkdownList",r["Shift-Tab"]="shiftTabAndUnindentMarkdownList",r.Esc=function(e){e.getOption("fullScreen")&&l(n)},document.addEventListener("keydown",function(e){e=e||window.event,27==e.keyCode&&n.codemirror.getOption("fullScreen")&&l(n)},!1);var s,a;if(t.spellChecker!==!1?(s="spell-checker",a=t.parsingConfig,a.name="gfm",a.gitHubSpice=!1,B({codeMirrorInstance:W})):(s=t.parsingConfig,s.name="gfm",s.gitHubSpice=!1),this.codemirror=W.fromTextArea(e,{mode:s,backdrop:a,theme:"paper",tabSize:void 0!=t.tabSize?t.tabSize:2,indentUnit:void 0!=t.tabSize?t.tabSize:2,indentWithTabs:t.indentWithTabs!==!1,lineNumbers:!1,autofocus:t.autofocus===!0,extraKeys:r,lineWrapping:t.lineWrapping!==!1,allowDropFileTypes:["text/plain"],placeholder:t.placeholder||e.getAttribute("placeholder")||"",styleSelectedText:void 0==t.styleSelectedText||t.styleSelectedText}),t.forceSync===!0){var c=this.codemirror;c.on("change",function(){c.save()})}this.gui={},t.toolbar!==!1&&(this.gui.toolbar=this.createToolbar()),t.status!==!1&&(this.gui.statusbar=this.createStatusbar()),void 0!=t.autosave&&t.autosave.enabled===!0&&this.autosave(),this.gui.sideBySide=this.createSideBySide(),this._rendered=this.element;var u=this.codemirror;setTimeout(function(){u.refresh()}.bind(u),0)}},F.prototype.autosave=function(){if(P()){var e=this;if(void 0==this.options.autosave.uniqueId||""==this.options.autosave.uniqueId)return void console.log("SimpleMDE: You must set a uniqueId to use the autosave feature");null!=e.element.form&&void 0!=e.element.form&&e.element.form.addEventListener("submit",function(){localStorage.removeItem("smde_"+e.options.autosave.uniqueId)}),this.options.autosave.loaded!==!0&&("string"==typeof localStorage.getItem("smde_"+this.options.autosave.uniqueId)&&""!=localStorage.getItem("smde_"+this.options.autosave.uniqueId)&&(this.codemirror.setValue(localStorage.getItem("smde_"+this.options.autosave.uniqueId)),this.options.autosave.foundSavedValue=!0),this.options.autosave.loaded=!0),localStorage.setItem("smde_"+this.options.autosave.uniqueId,e.value());var t=document.getElementById("autosaved");if(null!=t&&void 0!=t&&""!=t){var n=new Date,i=n.getHours(),r=n.getMinutes(),o="am",s=i;s>=12&&(s=i-12,o="pm"),0==s&&(s=12),r=10>r?"0"+r:r,t.innerHTML="Autosaved: "+s+":"+r+" "+o}this.autosaveTimeoutId=setTimeout(function(){e.autosave()},this.options.autosave.delay||1e4)}else console.log("SimpleMDE: localStorage not available, cannot autosave")},F.prototype.clearAutosavedValue=function(){if(P()){if(void 0==this.options.autosave||void 0==this.options.autosave.uniqueId||""==this.options.autosave.uniqueId)return void console.log("SimpleMDE: You must set a uniqueId to clear the autosave value");localStorage.removeItem("smde_"+this.options.autosave.uniqueId)}else console.log("SimpleMDE: localStorage not available, cannot autosave")},F.prototype.createSideBySide=function(){var e=this.codemirror,t=e.getWrapperElement(),n=t.nextSibling;n&&/editor-preview-side/.test(n.className)||(n=document.createElement("div"),n.className="editor-preview-side",t.parentNode.insertBefore(n,t.nextSibling));var i=!1,r=!1;return e.on("scroll",function(e){if(i)return void(i=!1);r=!0;var t=e.getScrollInfo().height-e.getScrollInfo().clientHeight,o=parseFloat(e.getScrollInfo().top)/t,s=(n.scrollHeight-n.clientHeight)*o;n.scrollTop=s}),n.onscroll=function(){if(r)return void(r=!1);i=!0;var t=n.scrollHeight-n.clientHeight,o=parseFloat(n.scrollTop)/t,s=(e.getScrollInfo().height-e.getScrollInfo().clientHeight)*o;e.scrollTo(0,s)},n},F.prototype.createToolbar=function(e){if(e=e||this.options.toolbar,e&&0!==e.length){var t;for(t=0;tp,.editor-preview>p{margin-top:0}.editor-preview pre,.editor-preview-side pre{background:#eee;margin-bottom:10px}.editor-preview table td,.editor-preview table th,.editor-preview-side table td,.editor-preview-side table th{border:1px solid #ddd;padding:5px}.CodeMirror .CodeMirror-code .cm-tag{color:#63a35c}.CodeMirror .CodeMirror-code .cm-attribute{color:#795da3}.CodeMirror .CodeMirror-code .cm-string{color:#183691}.CodeMirror .CodeMirror-selected{background:#d9d9d9}.CodeMirror .CodeMirror-code .cm-header-1{font-size:200%;line-height:200%}.CodeMirror .CodeMirror-code .cm-header-2{font-size:160%;line-height:160%}.CodeMirror .CodeMirror-code .cm-header-3{font-size:125%;line-height:125%}.CodeMirror .CodeMirror-code .cm-header-4{font-size:110%;line-height:110%}.CodeMirror .CodeMirror-code .cm-comment{background:rgba(0,0,0,.05);border-radius:2px}.CodeMirror .CodeMirror-code .cm-link{color:#7f8c8d}.CodeMirror .CodeMirror-code .cm-url{color:#aab2b3}.CodeMirror .CodeMirror-code .cm-strikethrough{text-decoration:line-through}.CodeMirror .CodeMirror-placeholder{opacity:.5}.CodeMirror .cm-spell-error:not(.cm-url):not(.cm-comment):not(.cm-tag):not(.cm-word){background:rgba(255,0,0,.15)}'; -}),define("highlight/lib/index",["require","exports","module","./highlight","./languages/1c","./languages/abnf","./languages/accesslog","./languages/actionscript","./languages/ada","./languages/apache","./languages/applescript","./languages/cpp","./languages/arduino","./languages/armasm","./languages/xml","./languages/asciidoc","./languages/aspectj","./languages/autohotkey","./languages/autoit","./languages/avrasm","./languages/awk","./languages/axapta","./languages/bash","./languages/basic","./languages/bnf","./languages/brainfuck","./languages/cal","./languages/capnproto","./languages/ceylon","./languages/clean","./languages/clojure","./languages/clojure-repl","./languages/cmake","./languages/coffeescript","./languages/coq","./languages/cos","./languages/crmsh","./languages/crystal","./languages/cs","./languages/csp","./languages/css","./languages/d","./languages/markdown","./languages/dart","./languages/delphi","./languages/diff","./languages/django","./languages/dns","./languages/dockerfile","./languages/dos","./languages/dsconfig","./languages/dts","./languages/dust","./languages/ebnf","./languages/elixir","./languages/elm","./languages/ruby","./languages/erb","./languages/erlang-repl","./languages/erlang","./languages/excel","./languages/fix","./languages/flix","./languages/fortran","./languages/fsharp","./languages/gams","./languages/gauss","./languages/gcode","./languages/gherkin","./languages/glsl","./languages/go","./languages/golo","./languages/gradle","./languages/groovy","./languages/haml","./languages/handlebars","./languages/haskell","./languages/haxe","./languages/hsp","./languages/htmlbars","./languages/http","./languages/inform7","./languages/ini","./languages/irpf90","./languages/java","./languages/javascript","./languages/json","./languages/julia","./languages/kotlin","./languages/lasso","./languages/ldif","./languages/less","./languages/lisp","./languages/livecodeserver","./languages/livescript","./languages/lsl","./languages/lua","./languages/makefile","./languages/mathematica","./languages/matlab","./languages/maxima","./languages/mel","./languages/mercury","./languages/mipsasm","./languages/mizar","./languages/perl","./languages/mojolicious","./languages/monkey","./languages/moonscript","./languages/nginx","./languages/nimrod","./languages/nix","./languages/nsis","./languages/objectivec","./languages/ocaml","./languages/openscad","./languages/oxygene","./languages/parser3","./languages/pf","./languages/php","./languages/pony","./languages/powershell","./languages/processing","./languages/profile","./languages/prolog","./languages/protobuf","./languages/puppet","./languages/purebasic","./languages/python","./languages/q","./languages/qml","./languages/r","./languages/rib","./languages/roboconf","./languages/rsl","./languages/ruleslanguage","./languages/rust","./languages/scala","./languages/scheme","./languages/scilab","./languages/scss","./languages/smali","./languages/smalltalk","./languages/sml","./languages/sqf","./languages/sql","./languages/stan","./languages/stata","./languages/step21","./languages/stylus","./languages/subunit","./languages/swift","./languages/taggerscript","./languages/yaml","./languages/tap","./languages/tcl","./languages/tex","./languages/thrift","./languages/tp","./languages/twig","./languages/typescript","./languages/vala","./languages/vbnet","./languages/vbscript","./languages/vbscript-html","./languages/verilog","./languages/vhdl","./languages/vim","./languages/x86asm","./languages/xl","./languages/xquery","./languages/zephir"],function(e,t,n){var i=e("./highlight");i.registerLanguage("1c",e("./languages/1c")),i.registerLanguage("abnf",e("./languages/abnf")),i.registerLanguage("accesslog",e("./languages/accesslog")),i.registerLanguage("actionscript",e("./languages/actionscript")),i.registerLanguage("ada",e("./languages/ada")),i.registerLanguage("apache",e("./languages/apache")),i.registerLanguage("applescript",e("./languages/applescript")),i.registerLanguage("cpp",e("./languages/cpp")),i.registerLanguage("arduino",e("./languages/arduino")),i.registerLanguage("armasm",e("./languages/armasm")),i.registerLanguage("xml",e("./languages/xml")),i.registerLanguage("asciidoc",e("./languages/asciidoc")),i.registerLanguage("aspectj",e("./languages/aspectj")),i.registerLanguage("autohotkey",e("./languages/autohotkey")),i.registerLanguage("autoit",e("./languages/autoit")),i.registerLanguage("avrasm",e("./languages/avrasm")),i.registerLanguage("awk",e("./languages/awk")),i.registerLanguage("axapta",e("./languages/axapta")),i.registerLanguage("bash",e("./languages/bash")),i.registerLanguage("basic",e("./languages/basic")),i.registerLanguage("bnf",e("./languages/bnf")),i.registerLanguage("brainfuck",e("./languages/brainfuck")),i.registerLanguage("cal",e("./languages/cal")),i.registerLanguage("capnproto",e("./languages/capnproto")),i.registerLanguage("ceylon",e("./languages/ceylon")),i.registerLanguage("clean",e("./languages/clean")),i.registerLanguage("clojure",e("./languages/clojure")),i.registerLanguage("clojure-repl",e("./languages/clojure-repl")),i.registerLanguage("cmake",e("./languages/cmake")),i.registerLanguage("coffeescript",e("./languages/coffeescript")),i.registerLanguage("coq",e("./languages/coq")),i.registerLanguage("cos",e("./languages/cos")),i.registerLanguage("crmsh",e("./languages/crmsh")),i.registerLanguage("crystal",e("./languages/crystal")),i.registerLanguage("cs",e("./languages/cs")),i.registerLanguage("csp",e("./languages/csp")),i.registerLanguage("css",e("./languages/css")),i.registerLanguage("d",e("./languages/d")),i.registerLanguage("markdown",e("./languages/markdown")),i.registerLanguage("dart",e("./languages/dart")),i.registerLanguage("delphi",e("./languages/delphi")),i.registerLanguage("diff",e("./languages/diff")),i.registerLanguage("django",e("./languages/django")),i.registerLanguage("dns",e("./languages/dns")),i.registerLanguage("dockerfile",e("./languages/dockerfile")),i.registerLanguage("dos",e("./languages/dos")),i.registerLanguage("dsconfig",e("./languages/dsconfig")),i.registerLanguage("dts",e("./languages/dts")),i.registerLanguage("dust",e("./languages/dust")),i.registerLanguage("ebnf",e("./languages/ebnf")),i.registerLanguage("elixir",e("./languages/elixir")),i.registerLanguage("elm",e("./languages/elm")),i.registerLanguage("ruby",e("./languages/ruby")),i.registerLanguage("erb",e("./languages/erb")),i.registerLanguage("erlang-repl",e("./languages/erlang-repl")),i.registerLanguage("erlang",e("./languages/erlang")),i.registerLanguage("excel",e("./languages/excel")),i.registerLanguage("fix",e("./languages/fix")),i.registerLanguage("flix",e("./languages/flix")),i.registerLanguage("fortran",e("./languages/fortran")),i.registerLanguage("fsharp",e("./languages/fsharp")),i.registerLanguage("gams",e("./languages/gams")),i.registerLanguage("gauss",e("./languages/gauss")),i.registerLanguage("gcode",e("./languages/gcode")),i.registerLanguage("gherkin",e("./languages/gherkin")),i.registerLanguage("glsl",e("./languages/glsl")),i.registerLanguage("go",e("./languages/go")),i.registerLanguage("golo",e("./languages/golo")),i.registerLanguage("gradle",e("./languages/gradle")),i.registerLanguage("groovy",e("./languages/groovy")),i.registerLanguage("haml",e("./languages/haml")),i.registerLanguage("handlebars",e("./languages/handlebars")),i.registerLanguage("haskell",e("./languages/haskell")),i.registerLanguage("haxe",e("./languages/haxe")),i.registerLanguage("hsp",e("./languages/hsp")),i.registerLanguage("htmlbars",e("./languages/htmlbars")),i.registerLanguage("http",e("./languages/http")),i.registerLanguage("inform7",e("./languages/inform7")),i.registerLanguage("ini",e("./languages/ini")),i.registerLanguage("irpf90",e("./languages/irpf90")),i.registerLanguage("java",e("./languages/java")),i.registerLanguage("javascript",e("./languages/javascript")),i.registerLanguage("json",e("./languages/json")),i.registerLanguage("julia",e("./languages/julia")),i.registerLanguage("kotlin",e("./languages/kotlin")),i.registerLanguage("lasso",e("./languages/lasso")),i.registerLanguage("ldif",e("./languages/ldif")),i.registerLanguage("less",e("./languages/less")),i.registerLanguage("lisp",e("./languages/lisp")),i.registerLanguage("livecodeserver",e("./languages/livecodeserver")),i.registerLanguage("livescript",e("./languages/livescript")),i.registerLanguage("lsl",e("./languages/lsl")),i.registerLanguage("lua",e("./languages/lua")),i.registerLanguage("makefile",e("./languages/makefile")),i.registerLanguage("mathematica",e("./languages/mathematica")),i.registerLanguage("matlab",e("./languages/matlab")),i.registerLanguage("maxima",e("./languages/maxima")),i.registerLanguage("mel",e("./languages/mel")),i.registerLanguage("mercury",e("./languages/mercury")),i.registerLanguage("mipsasm",e("./languages/mipsasm")),i.registerLanguage("mizar",e("./languages/mizar")),i.registerLanguage("perl",e("./languages/perl")),i.registerLanguage("mojolicious",e("./languages/mojolicious")),i.registerLanguage("monkey",e("./languages/monkey")),i.registerLanguage("moonscript",e("./languages/moonscript")),i.registerLanguage("nginx",e("./languages/nginx")),i.registerLanguage("nimrod",e("./languages/nimrod")),i.registerLanguage("nix",e("./languages/nix")),i.registerLanguage("nsis",e("./languages/nsis")),i.registerLanguage("objectivec",e("./languages/objectivec")),i.registerLanguage("ocaml",e("./languages/ocaml")),i.registerLanguage("openscad",e("./languages/openscad")),i.registerLanguage("oxygene",e("./languages/oxygene")),i.registerLanguage("parser3",e("./languages/parser3")),i.registerLanguage("pf",e("./languages/pf")),i.registerLanguage("php",e("./languages/php")),i.registerLanguage("pony",e("./languages/pony")),i.registerLanguage("powershell",e("./languages/powershell")),i.registerLanguage("processing",e("./languages/processing")),i.registerLanguage("profile",e("./languages/profile")),i.registerLanguage("prolog",e("./languages/prolog")),i.registerLanguage("protobuf",e("./languages/protobuf")),i.registerLanguage("puppet",e("./languages/puppet")),i.registerLanguage("purebasic",e("./languages/purebasic")),i.registerLanguage("python",e("./languages/python")),i.registerLanguage("q",e("./languages/q")),i.registerLanguage("qml",e("./languages/qml")),i.registerLanguage("r",e("./languages/r")),i.registerLanguage("rib",e("./languages/rib")),i.registerLanguage("roboconf",e("./languages/roboconf")),i.registerLanguage("rsl",e("./languages/rsl")),i.registerLanguage("ruleslanguage",e("./languages/ruleslanguage")),i.registerLanguage("rust",e("./languages/rust")),i.registerLanguage("scala",e("./languages/scala")),i.registerLanguage("scheme",e("./languages/scheme")),i.registerLanguage("scilab",e("./languages/scilab")),i.registerLanguage("scss",e("./languages/scss")),i.registerLanguage("smali",e("./languages/smali")),i.registerLanguage("smalltalk",e("./languages/smalltalk")),i.registerLanguage("sml",e("./languages/sml")),i.registerLanguage("sqf",e("./languages/sqf")),i.registerLanguage("sql",e("./languages/sql")),i.registerLanguage("stan",e("./languages/stan")),i.registerLanguage("stata",e("./languages/stata")),i.registerLanguage("step21",e("./languages/step21")),i.registerLanguage("stylus",e("./languages/stylus")),i.registerLanguage("subunit",e("./languages/subunit")),i.registerLanguage("swift",e("./languages/swift")),i.registerLanguage("taggerscript",e("./languages/taggerscript")),i.registerLanguage("yaml",e("./languages/yaml")),i.registerLanguage("tap",e("./languages/tap")),i.registerLanguage("tcl",e("./languages/tcl")),i.registerLanguage("tex",e("./languages/tex")),i.registerLanguage("thrift",e("./languages/thrift")),i.registerLanguage("tp",e("./languages/tp")),i.registerLanguage("twig",e("./languages/twig")),i.registerLanguage("typescript",e("./languages/typescript")),i.registerLanguage("vala",e("./languages/vala")),i.registerLanguage("vbnet",e("./languages/vbnet")),i.registerLanguage("vbscript",e("./languages/vbscript")),i.registerLanguage("vbscript-html",e("./languages/vbscript-html")),i.registerLanguage("verilog",e("./languages/verilog")),i.registerLanguage("vhdl",e("./languages/vhdl")),i.registerLanguage("vim",e("./languages/vim")),i.registerLanguage("x86asm",e("./languages/x86asm")),i.registerLanguage("xl",e("./languages/xl")),i.registerLanguage("xquery",e("./languages/xquery")),i.registerLanguage("zephir",e("./languages/zephir")),n.exports=i}),define("highlight",["highlight/lib/index"],function(e){return e}),define("text!highlight/styles/github.css",["module"],function(e){e.exports="/*\n\ngithub.com style (c) Vasily Polovnyov \n\n*/\n\n.hljs {\n display: block;\n overflow-x: auto;\n padding: 0.5em;\n color: #333;\n background: #f8f8f8;\n}\n\n.hljs-comment,\n.hljs-quote {\n color: #998;\n font-style: italic;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-subst {\n color: #333;\n font-weight: bold;\n}\n\n.hljs-number,\n.hljs-literal,\n.hljs-variable,\n.hljs-template-variable,\n.hljs-tag .hljs-attr {\n color: #008080;\n}\n\n.hljs-string,\n.hljs-doctag {\n color: #d14;\n}\n\n.hljs-title,\n.hljs-section,\n.hljs-selector-id {\n color: #900;\n font-weight: bold;\n}\n\n.hljs-subst {\n font-weight: normal;\n}\n\n.hljs-type,\n.hljs-class .hljs-title {\n color: #458;\n font-weight: bold;\n}\n\n.hljs-tag,\n.hljs-name,\n.hljs-attribute {\n color: #000080;\n font-weight: normal;\n}\n\n.hljs-regexp,\n.hljs-link {\n color: #009926;\n}\n\n.hljs-symbol,\n.hljs-bullet {\n color: #990073;\n}\n\n.hljs-built_in,\n.hljs-builtin-name {\n color: #0086b3;\n}\n\n.hljs-meta {\n color: #999;\n font-weight: bold;\n}\n\n.hljs-deletion {\n background: #fdd;\n}\n\n.hljs-addition {\n background: #dfd;\n}\n\n.hljs-emphasis {\n font-style: italic;\n}\n\n.hljs-strong {\n font-weight: bold;\n}\n"}),function(e){function t(t){if("string"==typeof t.data&&(t.data={keys:t.data}),t.data&&t.data.keys&&"string"==typeof t.data.keys){var n=t.handler,i=t.data.keys.toLowerCase().split(" ");t.handler=function(t){if(this===t.target||!(e.hotkeys.options.filterInputAcceptingElements&&e.hotkeys.textInputTypes.test(t.target.nodeName)||e.hotkeys.options.filterContentEditable&&e(t.target).attr("contenteditable")||e.hotkeys.options.filterTextInputs&&e.inArray(t.target.type,e.hotkeys.textAcceptingInputTypes)>-1)){var r="keypress"!==t.type&&e.hotkeys.specialKeys[t.which],o=String.fromCharCode(t.which).toLowerCase(),s="",a={};e.each(["alt","ctrl","shift"],function(e,n){t[n+"Key"]&&r!==n&&(s+=n+"+")}),t.metaKey&&!t.ctrlKey&&"meta"!==r&&(s+="meta+"),t.metaKey&&"meta"!==r&&s.indexOf("alt+ctrl+shift+")>-1&&(s=s.replace("alt+ctrl+shift+","hyper+")),r?a[s+r]=!0:(a[s+o]=!0,a[s+e.hotkeys.shiftNums[o]]=!0,"shift+"===s&&(a[e.hotkeys.shiftNums[o]]=!0));for(var l=0,c=i.length;l","/":"?","\\":"|"},textAcceptingInputTypes:["text","password","number","email","url","range","date","month","week","time","datetime","datetime-local","search","color","tel"],textInputTypes:/textarea|input|select/i,options:{filterInputAcceptingElements:!0,filterTextInputs:!0,filterContentEditable:!0}},e.each(["keydown","keyup","keypress"],function(){e.event.special[this]={add:t}})}(jQuery||this.jQuery||window.jQuery),define("hotkeys/jquery.hotkeys",["jquery"],function(){}),define("hotkeys",["hotkeys/jquery.hotkeys"],function(e){return e}),function(e){e.tablesort=function(t,n){var i=this;this.$table=t,this.$thead=this.$table.find("thead"),this.settings=e.extend({},e.tablesort.defaults,n),this.$sortCells=this.$thead.length>0?this.$thead.find("th:not(.no-sort)"):this.$table.find("th:not(.no-sort)"),this.$sortCells.on("click.tablesort",function(){i.sort(e(this))}),this.index=null,this.$th=null,this.direction=null},e.tablesort.prototype={sort:function(t,n){var i=new Date,r=this,o=this.$table,s=o.find("tbody").length>0?o.find("tbody"):o,a=s.find("tr").has("td, th"),l=a.find(":nth-child("+(t.index()+1)+")").filter("td, th"),c=t.data().sortBy,u=[],d=l.map(function(n,i){return c?"function"==typeof c?c(e(t),e(i),r):c:null!=e(this).data().sortValue?e(this).data().sortValue:e(this).text()});0!==d.length&&(this.index!==t.index()?(this.direction="asc",this.index=t.index()):"asc"!==n&&"desc"!==n?this.direction="asc"===this.direction?"desc":"asc":this.direction=n,n="asc"==this.direction?1:-1,r.$table.trigger("tablesort:start",[r]),r.log("Sorting by "+this.index+" "+this.direction),r.$table.css("display"),setTimeout(function(){r.$sortCells.removeClass(r.settings.asc+" "+r.settings.desc);for(var o=0,c=d.length;o2e3?200:10))},log:function(t){(e.tablesort.DEBUG||this.settings.debug)&&console&&console.log&&console.log("[tablesort] "+t)},destroy:function(){return this.$sortCells.off("click.tablesort"),this.$table.data("tablesort",null),null}},e.tablesort.DEBUG=!1,e.tablesort.defaults={debug:e.tablesort.DEBUG,asc:"sorted ascending",desc:"sorted descending",compare:function(e,t){return e>t?1:e'+i.options.close_text+"","none"===i.options.animation&&(i.options.animation_speed=0,i.options.after_callback_delay=0),e(n).on("click.Modaal",function(e){e.preventDefault();var t;if(i.lastFocus=document.activeElement,i.options.should_open!==!1&&("function"!=typeof i.options.should_open||i.options.should_open()!==!1)){switch(i.options.before_open.call(i,e),i.options.type){case"inline":i.create_basic();break;case"ajax":t=i.options.source(i.$elem,i.$elem.attr("href")),i.fetch_ajax(t);break;case"confirm":i.options.is_locked=!0,i.create_confirm();break;case"image":i.create_image();break;case"iframe":t=i.options.source(i.$elem,i.$elem.attr("href")),i.create_iframe(t);break;case"video":i.create_video(i.$elem.attr("href"));break;case"instagram":i.create_instagram()}i.watch_events()}}),i.options.start_open===!0&&e(n).click()},watch_events:function(){var t=this;t.dom.off("click.Modaal keyup.Modaal keydown.Modaal"),t.dom.on("keydown.Modaal",function(n){var i=n.keyCode,r=n.target;9==i&&t.scope.is_open&&(e.contains(document.getElementById(t.scope.id),r)||e("#"+t.scope.id).find('*[tabindex="0"]').focus())}),t.dom.on("keyup.Modaal",function(n){var i=n.keyCode,r=n.target;return n.shiftKey&&9==n.keyCode&&t.scope.is_open&&(e.contains(document.getElementById(t.scope.id),r)||e("#"+t.scope.id).find(".modaal-close").focus()),!t.options.is_locked&&27==i&&t.scope.is_open?!e(document.activeElement).is("input:not(:checkbox):not(:radio)")&&void t.modaal_close():"image"==t.options.type?(37==i&&t.scope.is_open&&!e("#"+t.scope.id+" .modaal-gallery-prev").hasClass("is_hidden")&&t.gallery_update("prev"),void(39==i&&t.scope.is_open&&!e("#"+t.scope.id+" .modaal-gallery-next").hasClass("is_hidden")&&t.gallery_update("next"))):void 0}),t.dom.on("click.Modaal",function(n){var i=e(n.target);if(!t.options.is_locked&&(t.options.overlay_close&&i.is(".modaal-inner-wrapper")||i.is(".modaal-close")||i.closest(".modaal-close").length))return void t.modaal_close();if(i.is(".modaal-confirm-btn"))return i.is(".modaal-ok")&&t.options.confirm_callback.call(t,t.lastFocus),i.is(".modaal-cancel")&&t.options.confirm_cancel_callback.call(t,t.lastFocus),void t.modaal_close();if(i.is(".modaal-gallery-control")){if(i.hasClass("is_hidden"))return;return i.is(".modaal-gallery-prev")&&t.gallery_update("prev"),void(i.is(".modaal-gallery-next")&&t.gallery_update("next"))}})},build_modal:function(e){var t=this,n="";"instagram"==t.options.type&&(n=" modaal-instagram");var i,r="video"==t.options.type?"modaal-video-wrap":"modaal-content";switch(t.options.animation){case"fade":i=" modaal-start_fade";break;case"slide-down":i=" modaal-start_slidedown";break;default:i=" modaal-start_none"}var o="";t.options.fullscreen&&(o=" modaal-fullscreen"),""===t.options.custom_class&&"undefined"==typeof t.options.custom_class||(t.options.custom_class=" "+t.options.custom_class);var s="";t.options.width&&t.options.height&&"number"==typeof t.options.width&&"number"==typeof t.options.height?s=' style="max-width:'+t.options.width+"px;height:"+t.options.height+'px;overflow:auto;"':t.options.width&&"number"==typeof t.options.width?s=' style="max-width:'+t.options.width+'px;"':t.options.height&&"number"==typeof t.options.height&&(s=' style="height:'+t.options.height+'px;overflow:auto;"'),("image"==t.options.type||"video"==t.options.type||"instagram"==t.options.type||t.options.fullscreen)&&(s="");var a='
    ';"video"!=t.options.type&&(a+='
    "),a+='"+t.scope.close_btn,"video"!=t.options.type&&(a+="
    "),a+="
    ",t.dom.append(a),"inline"==t.options.type&&e.appendTo("#"+t.scope.id+" .modaal-content-container"),t.modaal_overlay("show")},create_basic:function(){var t=this,n=t.$elem.is("[href]")?e(t.$elem.attr("href")):t.$elem,i="";n.length?(i=n.contents().clone(!0,!0),n.empty()):i="Content could not be loaded. Please check the source and try again.",t.build_modal(i)},create_instagram:function(){var t=this,n=t.options.instagram_id,i="",r="Instagram photo couldn't be loaded, please check the embed code and try again.";if(t.build_modal('
    '+t.options.loading_content+"
    "),""!=n&&null!==n&&void 0!==n){var o="https://api.instagram.com/oembed?url=http://instagr.am/p/"+n+"/";e.ajax({url:o,dataType:"jsonp",cache:!1,success:function(n){i=n.html;var r=e("#"+t.scope.id+" .modaal-content-container");r.length>0&&(r.removeClass(t.options.loading_class),r.html(i),window.instgrm.Embeds.process())},error:function(){i=r;var n=e("#"+t.scope.id+" .modaal-content-container");n.length>0&&(n.removeClass(t.options.loading_class).addClass(t.options.ajax_error_class),n.html(i))}})}else i=r;return!1},fetch_ajax:function(t){var n=this;null==n.options.accessible_title&&(n.options.accessible_title="Dialog Window"),null!==n.xhr&&(n.xhr.abort(),n.xhr=null),n.build_modal('
    '+n.options.loading_content+"
    "),n.xhr=e.ajax(t,{success:function(t){var i=e("#"+n.scope.id).find(".modaal-content-container");i.length>0&&(i.removeClass(n.options.loading_class),i.html(t),n.options.ajax_success.call(n,i))},error:function(t){if("abort"!=t.statusText){var i=e("#"+n.scope.id+" .modaal-content-container");i.length>0&&(i.removeClass(n.options.loading_class).addClass(n.options.ajax_error_class),i.html("Content could not be loaded. Please check the source and try again."))}}})},create_confirm:function(){var e,t=this;e='

    '+t.options.confirm_title+'

    '+t.options.confirm_content+'
    ",t.build_modal(e)},create_image:function(){var t,n,i=this,r="",o='',s='';if(i.$elem.is("[rel]")){var a=i.$elem.attr("rel"),l=e('[rel="'+a+'"]');l.removeAttr("data-gallery-active","is_active"),i.$elem.attr("data-gallery-active","is_active"),n=l.length-1;var c=[];r='"}r+="
    "+o+s}else{var f=i.$elem.attr("href"),p="",g="",h="";i.$elem.attr("data-modaal-desc")?(h=i.$elem.attr("data-modaal-desc"),p=i.$elem.attr("data-modaal-desc"),g='"):h="Image with no description",r='"}t=r,i.build_modal(t),e(".modaal-gallery-item.is_active").is(".gallery-item-0")&&e(".modaal-gallery-prev").hide(),e(".modaal-gallery-item.is_active").is(".gallery-item-"+n)&&e(".modaal-gallery-next").hide()},gallery_update:function(t){var n=this,i=e("#"+n.scope.id),r=i.find(".modaal-gallery-item"),o=r.length-1;if(0==o)return!1;var s=i.find(".modaal-gallery-prev"),a=i.find(".modaal-gallery-next"),l=250,c=0,u=0,d=i.find(".modaal-gallery-item."+n.private_options.active_class),h="next"==t?d.next(".modaal-gallery-item"):d.prev(".modaal-gallery-item");return n.options.before_image_change.call(n,d,h),("prev"!=t||!i.find(".gallery-item-0").hasClass("is_active"))&&(("next"!=t||!i.find(".gallery-item-"+o).hasClass("is_active"))&&void d.stop().animate({opacity:0},l,function(){h.addClass("is_next").css({position:"absolute",display:"block",opacity:0});var t=e(document).width(),r=t>1140?280:50;c=i.find(".modaal-gallery-item.is_next").width(),u=i.find(".modaal-gallery-item.is_next").height();var f=i.find(".modaal-gallery-item.is_next img").prop("naturalWidth"),p=i.find(".modaal-gallery-item.is_next img").prop("naturalHeight");f>t-r?(c=t-r,i.find(".modaal-gallery-item.is_next").css({width:c}),i.find(".modaal-gallery-item.is_next img").css({width:c}),u=i.find(".modaal-gallery-item.is_next").find("img").height()):(c=f,u=p),i.find(".modaal-gallery-item-wrap").stop().animate({width:c,height:u},l,function(){d.removeClass(n.private_options.active_class+" "+n.options.gallery_active_class).removeAttr("style"),d.find("img").removeAttr("style"),h.addClass(n.private_options.active_class+" "+n.options.gallery_active_class).removeClass("is_next").css("position",""),h.stop().animate({opacity:1},l,function(){e(this).removeAttr("style").css({width:"100%"}),e(this).find("img").css("width","100%"),i.find(".modaal-gallery-item-wrap").removeAttr("style"),n.options.after_image_change.call(n,h)}),i.find(".modaal-gallery-item").removeAttr("tabindex"),i.find(".modaal-gallery-item."+n.private_options.active_class).attr("tabindex","0").focus(),i.find(".modaal-gallery-item."+n.private_options.active_class).is(".gallery-item-0")?s.stop().animate({opacity:0},150,function(){e(this).hide()}):s.stop().css({display:"block",opacity:s.css("opacity")}).animate({opacity:1},150),i.find(".modaal-gallery-item."+n.private_options.active_class).is(".gallery-item-"+o)?a.stop().animate({opacity:0},150,function(){e(this).hide()}):a.stop().css({display:"block",opacity:s.css("opacity")}).animate({opacity:1},150)})}))},create_video:function(e){var t,n=this;t='',n.build_modal('
    '+t+"
    ")},create_iframe:function(e){var t,n=this;t=null!==n.options.width||void 0!==n.options.width||null!==n.options.height||void 0!==n.options.height?'':'
    Please specify a width and height for your iframe
    ',n.build_modal(t)},modaal_open:function(){var t=this,n=e("#"+t.scope.id),i=t.options.animation;"none"===i&&(n.removeClass("modaal-start_none"),t.options.after_open.call(t,n)),"fade"===i&&n.removeClass("modaal-start_fade"),"slide-down"===i&&n.removeClass("modaal-start_slide_down");var r=n;e(".modaal-wrapper *[tabindex=0]").removeAttr("tabindex"),r="image"==t.options.type?e("#"+t.scope.id).find(".modaal-gallery-item."+t.private_options.active_class):n.find(".modaal-iframe-elem").length?n.find(".modaal-iframe-elem"):n.find(".modaal-video-wrap").length?n.find(".modaal-video-wrap"):n.find(".modaal-focus"),r.attr("tabindex","0").focus(),"none"!==i&&setTimeout(function(){t.options.after_open.call(t,n)},t.options.after_callback_delay)},modaal_close:function(){var t=this,n=e("#"+t.scope.id);t.options.before_close.call(t,n),null!==t.xhr&&(t.xhr.abort(),t.xhr=null),"none"===t.options.animation&&n.addClass("modaal-start_none"),"fade"===t.options.animation&&n.addClass("modaal-start_fade"),"slide-down"===t.options.animation&&n.addClass("modaal-start_slide_down"),setTimeout(function(){"inline"==t.options.type&&e("#"+t.scope.id+" .modaal-content-container").contents().clone(!0,!0).appendTo(t.$elem.attr("href")),n.remove(),t.options.after_close.call(t),t.scope.is_open=!1},t.options.after_callback_delay),t.modaal_overlay("hide"),null!=t.lastFocus&&t.lastFocus.focus()},modaal_overlay:function(t){var n=this;"show"==t?(n.scope.is_open=!0,n.options.background_scroll||n.dom.addClass("modaal-noscroll"),n.dom.append('
    '), -e("#"+n.scope.id+"_overlay").css("background",n.options.background).stop().animate({opacity:n.options.overlay_opacity},n.options.animation_speed,function(){n.modaal_open()})):"hide"==t&&(n.dom.removeClass("modaal-noscroll"),e("#"+n.scope.id+"_overlay").stop().animate({opacity:0},n.options.animation_speed,function(){e(this).remove()}))}};e.fn.modaal=function(t){return this.each(function(){var i=e(this).data("modaal");if(i){if("string"==typeof t)switch(t){case"close":i.modaal_close()}}else{var r=Object.create(n);r.init(t,this),e.data(this,"modaal",r)}})},e.fn.modaal.options={type:"inline",animation:"fade",animation_speed:300,after_callback_delay:350,is_locked:!1,hide_close:!1,background:"#000",overlay_opacity:"0.8",overlay_close:!0,accessible_title:"Dialog Window",start_open:!1,fullscreen:!1,custom_class:"",background_scroll:!1,should_open:!0,close_text:"Close",close_aria_label:"Close (Press escape to close)",width:null,height:null,before_open:function(){},after_open:function(){},before_close:function(){},after_close:function(){},source:function(e,t){return t},confirm_button_text:"Confirm",confirm_cancel_button_text:"Cancel",confirm_title:"Confirm Title",confirm_content:"

    This is the default confirm dialog content. Replace me through the options

    ",confirm_callback:function(){},confirm_cancel_callback:function(){},gallery_active_class:"gallery_active_item",before_image_change:function(e,t){},after_image_change:function(e){},loading_content:t,loading_class:"is_loading",ajax_error_class:"modaal-error",ajax_success:function(){},instagram_id:null},e(function(){var t=e(".modaal");t.length&&t.each(function(){var t=e(this),n={},i=!1;t.attr("data-modaal-type")&&(i=!0,n.type=t.attr("data-modaal-type")),t.attr("data-modaal-animation")&&(i=!0,n.animation=t.attr("data-modaal-animation")),t.attr("data-modaal-animation-speed")&&(i=!0,n.animation_speed=t.attr("data-modaal-animation-speed")),t.attr("data-modaal-after-callback-delay")&&(i=!0,n.after_callback_delay=t.attr("data-modaal-after-callback-delay")),t.attr("data-modaal-is-locked")&&(i=!0,n.is_locked="true"===t.attr("data-modaal-is-locked")),t.attr("data-modaal-hide-close")&&(i=!0,n.hide_close="true"===t.attr("data-modaal-hide-close")),t.attr("data-modaal-background")&&(i=!0,n.background=t.attr("data-modaal-background")),t.attr("data-modaal-overlay-opacity")&&(i=!0,n.overlay_opacity=t.attr("data-modaal-overlay-opacity")),t.attr("data-modaal-overlay-close")&&(i=!0,n.overlay_close="false"!==t.attr("data-modaal-overlay-close")),t.attr("data-modaal-accessible-title")&&(i=!0,n.accessible_title=t.attr("data-modaal-accessible-title")),t.attr("data-modaal-start-open")&&(i=!0,n.start_open="true"===t.attr("data-modaal-start-open")),t.attr("data-modaal-fullscreen")&&(i=!0,n.fullscreen="true"===t.attr("data-modaal-fullscreen")),t.attr("data-modaal-custom-class")&&(i=!0,n.custom_class=t.attr("data-modaal-custom-class")),t.attr("data-modaal-close-text")&&(i=!0,n.close_text=t.attr("data-modaal-close-text")),t.attr("data-modaal-close-aria-label")&&(i=!0,n.close_aria_label=t.attr("data-modaal-close-aria-label")),t.attr("data-modaal-background-scroll")&&(i=!0,n.background_scroll="true"===t.attr("data-modaal-background-scroll")),t.attr("data-modaal-width")&&(i=!0,n.width=parseInt(t.attr("data-modaal-width"))),t.attr("data-modaal-height")&&(i=!0,n.height=parseInt(t.attr("data-modaal-height"))),t.attr("data-modaal-confirm-button-text")&&(i=!0,n.confirm_button_text=t.attr("data-modaal-confirm-button-text")),t.attr("data-modaal-confirm-cancel-button-text")&&(i=!0,n.confirm_cancel_button_text=t.attr("data-modaal-confirm-cancel-button-text")),t.attr("data-modaal-confirm-title")&&(i=!0,n.confirm_title=t.attr("data-modaal-confirm-title")),t.attr("data-modaal-confirm-content")&&(i=!0,n.confirm_content=t.attr("data-modaal-confirm-content")),t.attr("data-modaal-gallery-active-class")&&(i=!0,n.gallery_active_class=t.attr("data-modaal-gallery-active-class")),t.attr("data-modaal-loading-content")&&(i=!0,n.loading_content=t.attr("data-modaal-loading-content")),t.attr("data-modaal-loading-class")&&(i=!0,n.loading_class=t.attr("data-modaal-loading-class")),t.attr("data-modaal-ajax-error-class")&&(i=!0,n.ajax_error_class=t.attr("data-modaal-ajax-error-class")),t.attr("data-modaal-instagram-id")&&(i=!0,n.instagram_id=t.attr("data-modaal-instagram-id")),i&&t.modaal(n)})})}(jQuery,window,document),define("modaal/dist/js/modaal.min",["jquery"],function(){}),define("modaal",["modaal/dist/js/modaal.min"],function(e){return e}),define("text!modaal/dist/css/modaal.min.css",["module"],function(e){e.exports='/*!\n\tModaal - accessible modals - v0.3.1\n\tby Humaan, for all humans.\n\thttp://humaan.com\n */\n.modaal-noscroll{overflow:hidden}.modaal-accessible-hide,.modaal-close span,.modaal-gallery-control span{position:absolute!important;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px);padding:0!important;border:0!important;height:1px!important;width:1px!important;overflow:hidden}.modaal-overlay,.modaal-wrapper{position:fixed;top:0;left:0;width:100%;height:100%;z-index:999;opacity:0}.modaal-wrapper{display:block;z-index:9999;overflow:auto;opacity:1;box-sizing:border-box;-webkit-overflow-scrolling:touch;transition:all .3s ease-in-out}.modaal-wrapper *{box-sizing:border-box;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-backface-visibility:hidden}.modaal-wrapper .modaal-close{border:none;background:0 0;padding:0;-webkit-appearance:none}.modaal-wrapper.modaal-start_none{display:none;opacity:1}.modaal-wrapper.modaal-start_fade{opacity:0}.modaal-wrapper [tabindex="0"]{outline:none!important}.modaal-wrapper.modaal-fullscreen{overflow:hidden}.modaal-outer-wrapper{display:table;position:relative;width:100%;height:100%}.modaal-fullscreen .modaal-outer-wrapper,.modaal-gallery-item img{display:block}.modaal-inner-wrapper{display:table-cell;width:100%;height:100%;position:relative;vertical-align:middle;text-align:center;padding:80px 25px}.modaal-fullscreen .modaal-inner-wrapper{padding:0;display:block;vertical-align:top}.modaal-container{position:relative;display:inline-block;width:100%;margin:auto;text-align:left;color:#000;max-width:1000px;border-radius:0;background:#fff;box-shadow:0 4px 15px rgba(0,0,0,.2);cursor:auto}.modaal-container.is_loading{height:100px;width:100px;overflow:hidden}.modaal-fullscreen .modaal-container{max-width:none;height:100%;overflow:auto}.modaal-close{position:fixed;right:20px;top:20px;color:#fff;cursor:pointer;opacity:1;width:50px;height:50px;background:0 0;border-radius:100%;transition:all .2s ease-in-out}.modaal-close:focus,.modaal-close:hover{outline:none;background:#fff}.modaal-close:focus:after,.modaal-close:focus:before,.modaal-close:hover:after,.modaal-close:hover:before{background:#b93d0c}.modaal-close:after,.modaal-close:before{display:block;content:" ";position:absolute;top:14px;left:23px;width:4px;height:22px;border-radius:4px;background:#fff;transition:background .2s ease-in-out}.modaal-close:before{-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg)}.modaal-close:after{-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.modaal-fullscreen .modaal-close{background:#afb7bc;right:10px;top:10px}.modaal-content-container{padding:30px}.modaal-confirm-wrap{padding:30px 0 0;text-align:center;font-size:0}.modaal-confirm-btn{font-size:14px;display:inline-block;margin:0 10px;vertical-align:middle;cursor:pointer;border:none;background:0 0}.modaal-confirm-btn.modaal-ok{padding:10px 15px;color:#fff;background:#555;border-radius:3px;transition:background .2s ease-in-out}.modaal-confirm-btn.modaal-ok:hover{background:#2f2f2f}.modaal-confirm-btn.modaal-cancel{text-decoration:underline}.modaal-confirm-btn.modaal-cancel:hover{text-decoration:none;color:#2f2f2f}@keyframes instaReveal{0%{opacity:0}to{opacity:1}}@-webkit-keyframes instaReveal{0%{opacity:0}to{opacity:1}}.modaal-instagram .modaal-container{width:auto;background:0 0;box-shadow:none!important}.modaal-instagram .modaal-content-container{padding:0;background:0 0}.modaal-instagram .modaal-content-container>blockquote{width:1px!important;height:1px!important;opacity:0!important}.modaal-instagram iframe{opacity:0;margin:-6px!important;border-radius:0!important;width:1000px!important;max-width:800px!important;box-shadow:none!important;-webkit-animation:instaReveal 1s linear forwards;animation:instaReveal 1s linear forwards}.modaal-image .modaal-inner-wrapper{padding-left:140px;padding-right:140px}.modaal-image .modaal-container{width:auto;max-width:100%}.modaal-gallery-wrap{position:relative;color:#fff}.modaal-gallery-item{display:none}.modaal-gallery-item.is_active{display:block}.modaal-gallery-label{position:absolute;left:0;width:100%;margin:20px 0 0;font-size:18px;text-align:center;color:#fff}.modaal-gallery-label:focus{outline:none}.modaal-gallery-control{position:absolute;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);opacity:1;cursor:pointer;color:#fff;width:50px;height:50px;background:0 0;border:none;border-radius:100%;transition:all .2s ease-in-out}.modaal-gallery-control.is_hidden{opacity:0;cursor:default}.modaal-gallery-control:focus,.modaal-gallery-control:hover{outline:none;background:#fff}.modaal-gallery-control:focus:after,.modaal-gallery-control:focus:before,.modaal-gallery-control:hover:after,.modaal-gallery-control:hover:before{background:#afb7bc}.modaal-gallery-control:after,.modaal-gallery-control:before{display:block;content:" ";position:absolute;top:16px;left:25px;width:4px;height:18px;border-radius:4px;background:#fff;transition:background .2s ease-in-out}.modaal-gallery-control:before{margin:-5px 0 0;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg)}.modaal-gallery-control:after{margin:5px 0 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.modaal-gallery-next{left:100%;margin-left:40px}.modaal-gallery-prev{right:100%;margin-right:40px}.modaal-gallery-prev:after,.modaal-gallery-prev:before{left:22px}.modaal-gallery-prev:before{margin:5px 0 0;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg)}.modaal-gallery-prev:after{margin:-5px 0 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.modaal-video-wrap{margin:auto 50px;position:relative}.modaal-video-container{position:relative;padding-bottom:56.25%;height:0;overflow:hidden;box-shadow:0 0 10px rgba(0,0,0,.3);background:#000;max-width:1300px;margin-left:auto;margin-right:auto}.modaal-video-container embed,.modaal-video-container iframe,.modaal-video-container object{position:absolute;top:0;left:0;width:100%;height:100%}.modaal-iframe .modaal-content,.modaal-iframe-elem{width:100%;height:100%}.modaal-iframe-elem{display:block}@media only screen and (min-width:1400px){.modaal-video-container{padding-bottom:0;height:731px}}@media only screen and (max-width:1140px){.modaal-image .modaal-inner-wrapper{padding-left:25px;padding-right:25px}.modaal-gallery-control{top:auto;bottom:20px;-webkit-transform:none;-ms-transform:none;transform:none;background:rgba(0,0,0,.7)}.modaal-gallery-control:after,.modaal-gallery-control:before{background:#fff}.modaal-gallery-next{left:auto;right:20px}.modaal-gallery-prev{left:20px;right:auto}}@media screen and (max-width:900px){.modaal-instagram iframe{width:500px!important}}@media screen and (max-height:1100px){.modaal-instagram iframe{width:700px!important}}@media screen and (max-height:1000px){.modaal-inner-wrapper{padding-top:60px;padding-bottom:60px}.modaal-instagram iframe{width:600px!important}}@media screen and (max-height:900px){.modaal-instagram iframe{width:500px!important}.modaal-video-container{max-width:900px;max-height:510px}}@media only screen and (max-width:600px){.modaal-instagram iframe{width:280px!important}}@media only screen and (max-height:820px){.modaal-gallery-label{display:none}}.modaal-loading-spinner{background:0 0;position:absolute;width:200px;height:200px;top:50%;left:50%;margin:-100px 0 0 -100px;-webkit-transform:scale(.25);-ms-transform:scale(.25);transform:scale(.25)}@-webkit-keyframes modaal-loading-spinner{0%{opacity:1;-ms-transform:scale(1.5);-webkit-transform:scale(1.5);transform:scale(1.5)}to{opacity:.1;-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1)}}@keyframes modaal-loading-spinner{0%{opacity:1;-ms-transform:scale(1.5);-webkit-transform:scale(1.5);transform:scale(1.5)}to{opacity:.1;-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1)}}.modaal-loading-spinner>div{width:24px;height:24px;margin-left:4px;margin-top:4px;position:absolute}.modaal-loading-spinner>div>div{width:100%;height:100%;border-radius:15px;background:#fff}.modaal-loading-spinner>div:nth-of-type(1)>div{-webkit-animation:modaal-loading-spinner 1s linear infinite;animation:modaal-loading-spinner 1s linear infinite;-webkit-animation-delay:0s;animation-delay:0s}.modaal-loading-spinner>div:nth-of-type(2)>div,.modaal-loading-spinner>div:nth-of-type(3)>div{-ms-animation:modaal-loading-spinner 1s linear infinite;-moz-animation:modaal-loading-spinner 1s linear infinite;-o-animation:modaal-loading-spinner 1s linear infinite}.modaal-loading-spinner>div:nth-of-type(1){-ms-transform:translate(84px,84px) rotate(45deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(45deg) translate(70px,0);transform:translate(84px,84px) rotate(45deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(2)>div{-webkit-animation:modaal-loading-spinner 1s linear infinite;animation:modaal-loading-spinner 1s linear infinite;-webkit-animation-delay:.12s;animation-delay:.12s}.modaal-loading-spinner>div:nth-of-type(2){-ms-transform:translate(84px,84px) rotate(90deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(90deg) translate(70px,0);transform:translate(84px,84px) rotate(90deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(3)>div,.modaal-loading-spinner>div:nth-of-type(4)>div,.modaal-loading-spinner>div:nth-of-type(5)>div{-webkit-animation:modaal-loading-spinner 1s linear infinite;animation:modaal-loading-spinner 1s linear infinite;-webkit-animation-delay:.25s;animation-delay:.25s}.modaal-loading-spinner>div:nth-of-type(4)>div,.modaal-loading-spinner>div:nth-of-type(5)>div{-ms-animation:modaal-loading-spinner 1s linear infinite;-moz-animation:modaal-loading-spinner 1s linear infinite;-o-animation:modaal-loading-spinner 1s linear infinite;-webkit-animation-delay:.37s;animation-delay:.37s}.modaal-loading-spinner>div:nth-of-type(3){-ms-transform:translate(84px,84px) rotate(135deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(135deg) translate(70px,0);transform:translate(84px,84px) rotate(135deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(4){-ms-transform:translate(84px,84px) rotate(180deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(180deg) translate(70px,0);transform:translate(84px,84px) rotate(180deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(5)>div{-webkit-animation-delay:.5s;animation-delay:.5s}.modaal-loading-spinner>div:nth-of-type(6)>div,.modaal-loading-spinner>div:nth-of-type(7)>div{-ms-animation:modaal-loading-spinner 1s linear infinite;-moz-animation:modaal-loading-spinner 1s linear infinite;-o-animation:modaal-loading-spinner 1s linear infinite}.modaal-loading-spinner>div:nth-of-type(5){-ms-transform:translate(84px,84px) rotate(225deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(225deg) translate(70px,0);transform:translate(84px,84px) rotate(225deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(6)>div,.modaal-loading-spinner>div:nth-of-type(7)>div,.modaal-loading-spinner>div:nth-of-type(8)>div{-webkit-animation:modaal-loading-spinner 1s linear infinite;animation:modaal-loading-spinner 1s linear infinite;-webkit-animation-delay:.62s;animation-delay:.62s}.modaal-loading-spinner>div:nth-of-type(6){-ms-transform:translate(84px,84px) rotate(270deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(270deg) translate(70px,0);transform:translate(84px,84px) rotate(270deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(7)>div,.modaal-loading-spinner>div:nth-of-type(8)>div{-webkit-animation-delay:.75s;animation-delay:.75s}.modaal-loading-spinner>div:nth-of-type(7){-ms-transform:translate(84px,84px) rotate(315deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(315deg) translate(70px,0);transform:translate(84px,84px) rotate(315deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(8)>div{-webkit-animation-delay:.87s;animation-delay:.87s}.modaal-loading-spinner>div:nth-of-type(8){-ms-transform:translate(84px,84px) rotate(360deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(360deg) translate(70px,0);transform:translate(84px,84px) rotate(360deg) translate(70px,0)}'}),!function(e){"function"==typeof define&&define.amd?define("fullcalendar/dist/fullcalendar.min",["jquery","moment"],e):"object"==typeof exports?module.exports=e(require("jquery"),require("moment")):e(jQuery,moment)}(function(e,t){function n(e){return V(e,We)}function i(e,t){t.left&&e.css({"border-left-width":1,"margin-left":t.left-1}),t.right&&e.css({"border-right-width":1,"margin-right":t.right-1})}function r(e){e.css({"margin-left":"","margin-right":"","border-left-width":"","border-right-width":""})}function o(){e("body").addClass("fc-not-allowed")}function s(){e("body").removeClass("fc-not-allowed")}function a(t,n,i){var r=Math.floor(n/t.length),o=Math.floor(n-r*(t.length-1)),s=[],a=[],c=[],u=0;l(t),t.each(function(n,i){var l=n===t.length-1?o:r,d=e(i).outerHeight(!0);d *").each(function(t,i){var r=e(i).outerWidth();r>n&&(n=r)}),n++,t.width(n),n}function u(e,t){var n,i=e.add(t);return i.css({position:"relative",left:-1}),n=e.outerHeight()-t.outerHeight(),i.css({position:"",left:""}),n}function d(t){var n=t.css("position"),i=t.parents().filter(function(){var t=e(this);return/(auto|scroll)/.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==n&&i.length?i:e(t[0].ownerDocument||document)}function h(e,t){var n=e.offset(),i=n.left-(t?t.left:0),r=n.top-(t?t.top:0);return{left:i,right:i+e.outerWidth(),top:r,bottom:r+e.outerHeight()}}function f(e,t){var n=e.offset(),i=g(e),r=n.left+b(e,"border-left-width")+i.left-(t?t.left:0),o=n.top+b(e,"border-top-width")+i.top-(t?t.top:0);return{left:r,right:r+e[0].clientWidth,top:o,bottom:o+e[0].clientHeight}}function p(e,t){var n=e.offset(),i=n.left+b(e,"border-left-width")+b(e,"padding-left")-(t?t.left:0),r=n.top+b(e,"border-top-width")+b(e,"padding-top")-(t?t.top:0);return{left:i,right:i+e.width(),top:r,bottom:r+e.height()}}function g(e){var t,n=e.innerWidth()-e[0].clientWidth,i=e.innerHeight()-e[0].clientHeight;return n=m(n),i=m(i),t={left:0,right:0,top:0,bottom:i},v()&&"rtl"==e.css("direction")?t.left=n:t.right=n,t}function m(e){return e=Math.max(0,e),e=Math.round(e)}function v(){return null===Be&&(Be=y()),Be}function y(){var t=e("
    ").css({position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}).appendTo("body"),n=t.children(),i=n.offset().left>t.offset().left;return t.remove(),i}function b(e,t){return parseFloat(e.css(t))||0}function w(e){return 1==e.which&&!e.ctrlKey}function x(e){var t=e.originalEvent.touches;return t&&t.length?t[0].pageX:e.pageX}function k(e){var t=e.originalEvent.touches;return t&&t.length?t[0].pageY:e.pageY}function S(e){return/^touch/.test(e.type)}function C(e){e.addClass("fc-unselectable").on("selectstart",E)}function T(e){e.removeClass("fc-unselectable").off("selectstart",E)}function E(e){e.preventDefault()}function _(e,t){var n={left:Math.max(e.left,t.left),right:Math.min(e.right,t.right),top:Math.max(e.top,t.top),bottom:Math.min(e.bottom,t.bottom)};return n.leftl&&s=l?(n=s.clone(),r=!0):(n=l.clone(),r=!1),a<=c?(i=a.clone(),o=!0):(i=c.clone(),o=!1),{start:n,end:i,isStart:r,isEnd:o}}function I(e,n){return t.duration({days:e.clone().stripTime().diff(n.clone().stripTime(),"days"),ms:e.time()-n.time()})}function O(e,n){return t.duration({days:e.clone().stripTime().diff(n.clone().stripTime(),"days")})}function F(e,n,i){return t.duration(Math.round(e.diff(n,i,!0)),i)}function P(e,t){var n,i,r;for(n=0;n=1&&se(r)));n++);return i}function W(e,n,i){return null!=i?i.diff(n,e,!0):t.isDuration(n)?n.as(e):n.end.diff(n.start,e,!0)}function B(e,t,n){var i;return U(n)?(t-e)/n:(i=n.asMonths(),Math.abs(i)>=1&&se(i)?t.diff(e,"months",!0)/i:t.diff(e,"days",!0)/n.asDays())}function j(e,t){var n,i;return U(e)||U(t)?e/t:(n=e.asMonths(),i=t.asMonths(),Math.abs(n)>=1&&se(n)&&Math.abs(i)>=1&&se(i)?n/i:e.asDays()/t.asDays())}function Y(e,n){var i;return U(e)?t.duration(e*n):(i=e.asMonths(),Math.abs(i)>=1&&se(i)?t.duration({months:i*n}):t.duration({days:e.asDays()*n}))}function U(e){return Boolean(e.hours()||e.minutes()||e.seconds()||e.milliseconds())}function q(e){return"[object Date]"===Object.prototype.toString.call(e)||e instanceof Date}function G(e){return/^\d+\:\d+(?:\:\d+\.?(?:\d{3})?)?$/.test(e)}function V(e,t){var n,i,r,o,s,a,l={};if(t)for(n=0;n=0;o--)if(s=e[o][i],"object"==typeof s)r.unshift(s);else if(void 0!==s){l[i]=s;break}r.length&&(l[i]=V(r))}for(n=e.length-1;n>=0;n--){a=e[n];for(i in a)i in l||(l[i]=a[i])}return l}function $(e){var t=function(){};return t.prototype=e,new t}function Z(e,t){for(var n in e)X(e,n)&&(t[n]=e[n])}function X(e,t){return Ue.call(e,t)}function Q(t){return/undefined|null|boolean|number|string/.test(e.type(t))}function K(t,n,i){if(e.isFunction(t)&&(t=[t]),t){var r,o;for(r=0;r/g,">").replace(/'/g,"'").replace(/"/g,""").replace(/\n/g,"
    ")}function te(e){return e.replace(/&.*?;/g,"")}function ne(t){var n=[];return e.each(t,function(e,t){null!=t&&n.push(e+":"+t)}),n.join(";")}function ie(t){var n=[];return e.each(t,function(e,t){null!=t&&n.push(e+'="'+ee(t)+'"')}),n.join(" ")}function re(e){return e.charAt(0).toUpperCase()+e.slice(1)}function oe(e,t){return e-t}function se(e){return e%1===0}function ae(e,t){var n=e[t];return function(){return n.apply(e,arguments)}}function le(e,t,n){var i,r,o,s,a,l=function(){var c=+new Date-s;c=e.leftCol)return!0;return!1}function Te(e,t){return e.leftCol-t.leftCol}function Ee(e){var t,n,i,r=[];for(t=0;tt.top&&e.top"),p.append(s("left")).append(s("right")).append(s("center")).append('
    ')):o()}function o(){p&&(p.remove(),p=f.el=null)}function s(i){var r=e('
    '),o=n.layout[i];return o&&e.each(o.split(" "),function(n){var i,o=e(),s=!0;e.each(this.split(","),function(n,i){var r,a,l,c,u,d,h,f,p,v;"title"==i?(o=o.add(e("

     

    ")),s=!1):((r=(t.options.customButtons||{})[i])?(l=function(e){r.click&&r.click.call(v[0],e)},c="",u=r.text):(a=t.getViewSpec(i))?(l=function(){t.changeView(i)},m.push(i),c=a.buttonTextOverride,u=a.buttonTextDefault):t[i]&&(l=function(){t[i]()},c=(t.overrides.buttonText||{})[i],u=t.options.buttonText[i]),l&&(d=r?r.themeIcon:t.options.themeButtonIcons[i],h=r?r.icon:t.options.buttonIcons[i],f=c?ee(c):d&&t.options.theme?"":h&&!t.options.theme?"":ee(u),p=["fc-"+i+"-button",g+"-button",g+"-state-default"],v=e('").click(function(e){v.hasClass(g+"-state-disabled")||(l(e),(v.hasClass(g+"-state-active")||v.hasClass(g+"-state-disabled"))&&v.removeClass(g+"-state-hover"))}).mousedown(function(){v.not("."+g+"-state-active").not("."+g+"-state-disabled").addClass(g+"-state-down")}).mouseup(function(){v.removeClass(g+"-state-down")}).hover(function(){v.not("."+g+"-state-active").not("."+g+"-state-disabled").addClass(g+"-state-hover")},function(){v.removeClass(g+"-state-hover").removeClass(g+"-state-down")}),o=o.add(v)))}),s&&o.first().addClass(g+"-corner-left").end().last().addClass(g+"-corner-right").end(),o.length>1?(i=e("
    "),s&&i.addClass("fc-button-group"),i.append(o),r.append(i)):r.append(o)}),r}function a(e){p&&p.find("h2").text(e)}function l(e){p&&p.find(".fc-"+e+"-button").addClass(g+"-state-active")}function c(e){p&&p.find(".fc-"+e+"-button").removeClass(g+"-state-active")}function u(e){p&&p.find(".fc-"+e+"-button").prop("disabled",!0).addClass(g+"-state-disabled")}function d(e){p&&p.find(".fc-"+e+"-button").prop("disabled",!1).removeClass(g+"-state-disabled")}function h(){return m}var f=this;f.setToolbarOptions=i,f.render=r,f.removeElement=o,f.updateTitle=a,f.activateButton=l,f.deactivateButton=c,f.disableButton=u,f.enableButton=d,f.getViewsWithButtons=h,f.el=null;var p,g,m=[]}function Ae(n,i){function r(e){e._locale=Y}function o(){V?l()&&(f(),c()):s()}function s(){n.addClass("fc"),n.on("click.fc","a[data-goto]",function(t){var n=e(this),i=n.data("goto"),r=j.moment(i.date),o=i.type,s=X.opt("navLink"+re(o)+"Click");"function"==typeof s?s(r,t):("string"==typeof s&&(o=s),A(r,o))}),j.bindOption("theme",function(e){Z=e?"ui":"fc",n.toggleClass("ui-widget",e),n.toggleClass("fc-unthemed",!e)}),j.bindOptions(["isRTL","locale"],function(e){n.toggleClass("fc-ltr",!e),n.toggleClass("fc-rtl",e)}),V=e("
    ").prependTo(n);var t=y();U=new He(t),q=j.header=t[0],G=j.footer=t[1],x(),k(),c(j.options.defaultView),j.options.handleWindowResize&&(K=le(m,j.options.windowResizeDelay),e(window).resize(K))}function a(){X&&X.removeElement(),U.proxyCall("removeElement"),V.remove(),n.removeClass("fc fc-ltr fc-rtl fc-unthemed ui-widget"),n.off(".fc"),K&&e(window).unbind("resize",K),ot.unneeded()}function l(){return n.is(":visible")}function c(t,n){ne++;var i=X&&t&&X.type!==t;i&&(R(),u()),!X&&t&&(X=j.view=te[t]||(te[t]=j.instantiateView(t)),X.setElement(e("
    ").appendTo(V)),U.proxyCall("activateButton",t)),X&&(J=X.massageCurrentDate(J),X.isDateSet&&J>=X.intervalStart&&J=X.intervalStart&&eV&&i.push(n);return i}function o(e,t){return!V||e$}function s(e,t){return V=e,$=t,a()}function a(){return c(ee,"reset")}function l(e){return c(x(e))}function c(e,t){var n,i;for("reset"===t?ne=[]:"add"!==t&&(ne=T(ne,e)),n=0;no&&(!l[s]||c.isSame(u,l[s]))&&(s-1!==o||"."!==f[s]);s--)m=f[s]+m;for(a=o;a<=s;a++)v+=f[a],y+=p[a];return(v||y)&&(b=r?y+i+v:v+i+y),h(g+b+m)}function r(e){return w[e]||(w[e]=o(e))}function o(e){var t=s(e);return{fakeFormatString:l(t),sameUnits:c(t)}}function s(e){for(var t,n=[],i=/\[([^\]]*)\]|\(([^\)]*)\)|(LTS|LT|(\w)\4*o?)|([^\w\[\(]+)/g;t=i.exec(e);)t[1]?n.push.apply(n,a(t[1])):t[2]?n.push({maybe:s(t[2])}):t[3]?n.push({token:t[3]}):t[5]&&n.push.apply(n,a(t[5]));return n}function a(e){return". "===e?["."," "]:[e]}function l(e){var t,n,i=[];for(t=0;tr.value)&&(r=i));return r?r.unit:null}Fe.formatDate=e,Fe.formatRange=n,Fe.oldMomentFormat=t,Fe.queryMostGranularFormatUnit=f;var p="\v",g="",m="",v=new RegExp(m+"([^"+m+"]*)"+m,"g"),y={t:function(e){return t(e,"a").charAt(0)},T:function(e){return t(e,"A").charAt(0)}},b={Y:{value:1,unit:"year"},M:{value:2,unit:"month"},W:{value:3,unit:"week"},w:{value:3,unit:"week"},D:{value:4,unit:"day"},d:{value:4,unit:"day"}},w={}}();var Xe=Fe.formatDate,Qe=Fe.formatRange,Ke=Fe.oldMomentFormat;Fe.Class=ue,ue.extend=function(){var e,t,n=arguments.length;for(e=0;e').addClass(n.className||"").css({top:0,left:0}).append(n.content).appendTo(n.parentEl),this.el.on("click",".fc-close",function(){t.hide()}),n.autoHide&&this.listenTo(e(document),"mousedown",this.documentMousedown)},documentMousedown:function(t){this.el&&!e(t.target).closest(this.el).length&&this.hide()},removeElement:function(){this.hide(),this.el&&(this.el.remove(),this.el=null),this.stopListeningTo(e(document),"mousedown")},position:function(){var t,n,i,r,o,s=this.options,a=this.el.offsetParent().offset(),l=this.el.outerWidth(),c=this.el.outerHeight(),u=e(window),h=d(this.el);r=s.top||0,o=void 0!==s.left?s.left:void 0!==s.right?s.right-l:0,h.is(window)||h.is(document)?(h=u,t=0,n=0):(i=h.offset(),t=i.top,n=i.left),t+=u.scrollTop(),n+=u.scrollLeft(),s.viewportConstrain!==!1&&(r=Math.min(r,t+h.outerHeight()-c-this.margin),r=Math.max(r,t+this.margin),o=Math.min(o,n+h.outerWidth()-l-this.margin),o=Math.max(o,n+this.margin)),this.el.css({top:r-a.top,left:o-a.left})},trigger:function(e){this.options[e]&&this.options[e].apply(this,Array.prototype.slice.call(arguments,1))}}),nt=Fe.CoordCache=ue.extend({els:null,forcedOffsetParentEl:null,origin:null,boundingRect:null,isHorizontal:!1,isVertical:!1,lefts:null,rights:null,tops:null,bottoms:null,constructor:function(t){this.els=e(t.els),this.isHorizontal=t.isHorizontal,this.isVertical=t.isVertical,this.forcedOffsetParentEl=t.offsetParent?e(t.offsetParent):null},build:function(){var e=this.forcedOffsetParentEl;!e&&this.els.length>0&&(e=this.els.eq(0).offsetParent()),this.origin=e?e.offset():null,this.boundingRect=this.queryBoundingRect(),this.isHorizontal&&this.buildElHorizontals(),this.isVertical&&this.buildElVerticals()},clear:function(){this.origin=null,this.boundingRect=null,this.lefts=null,this.rights=null,this.tops=null,this.bottoms=null},ensureBuilt:function(){this.origin||this.build()},buildElHorizontals:function(){var t=[],n=[];this.els.each(function(i,r){var o=e(r),s=o.offset().left,a=o.outerWidth();t.push(s),n.push(s+a)}),this.lefts=t,this.rights=n},buildElVerticals:function(){var t=[],n=[];this.els.each(function(i,r){var o=e(r),s=o.offset().top,a=o.outerHeight();t.push(s),n.push(s+a)}),this.tops=t,this.bottoms=n},getHorizontalIndex:function(e){this.ensureBuilt();var t,n=this.lefts,i=this.rights,r=n.length;for(t=0;t=n[t]&&e=n[t]&&e0&&(e=d(this.els.eq(0)),!e.is(document))?f(e):null},isPointInBounds:function(e,t){return this.isLeftInBounds(e)&&this.isTopInBounds(t)},isLeftInBounds:function(e){return!this.boundingRect||e>=this.boundingRect.left&&e=this.boundingRect.top&&e=r*r&&this.handleDistanceSurpassed(e)),this.isDragging&&this.handleDrag(n,i,e)},handleDrag:function(e,t,n){this.trigger("drag",e,t,n),this.updateAutoScroll(n)},endDrag:function(e){this.isDragging&&(this.isDragging=!1,this.handleDragEnd(e))},handleDragEnd:function(e){this.trigger("dragEnd",e)},startDelay:function(e){var t=this;this.delay?this.delayTimeoutId=setTimeout(function(){t.handleDelayEnd(e)},this.delay):this.handleDelayEnd(e)},handleDelayEnd:function(e){this.isDelayEnded=!0,this.isDistanceSurpassed&&this.startDrag(e)},handleDistanceSurpassed:function(e){this.isDistanceSurpassed=!0,this.isDelayEnded&&this.startDrag(e)},handleTouchMove:function(e){this.isDragging&&this.shouldCancelTouchScroll&&e.preventDefault(),this.handleMove(e)},handleMouseMove:function(e){this.handleMove(e)},handleTouchScroll:function(e){this.isDragging&&!this.scrollAlwaysKills||this.endInteraction(e,!0)},trigger:function(e){this.options[e]&&this.options[e].apply(this,Array.prototype.slice.call(arguments,1)),this["_"+e]&&this["_"+e].apply(this,Array.prototype.slice.call(arguments,1))}});it.mixin({isAutoScroll:!1,scrollBounds:null,scrollTopVel:null,scrollLeftVel:null,scrollIntervalId:null,scrollSensitivity:30,scrollSpeed:200,scrollIntervalMs:50,initAutoScroll:function(){var e=this.scrollEl;this.isAutoScroll=this.options.scroll&&e&&!e.is(window)&&!e.is(document),this.isAutoScroll&&this.listenTo(e,"scroll",le(this.handleDebouncedScroll,100))},destroyAutoScroll:function(){this.endAutoScroll(),this.isAutoScroll&&this.stopListeningTo(this.scrollEl,"scroll")},computeScrollBounds:function(){this.isAutoScroll&&(this.scrollBounds=h(this.scrollEl))},updateAutoScroll:function(e){var t,n,i,r,o=this.scrollSensitivity,s=this.scrollBounds,a=0,l=0;s&&(t=(o-(k(e)-s.top))/o,n=(o-(s.bottom-k(e)))/o,i=(o-(x(e)-s.left))/o,r=(o-(s.right-x(e)))/o,t>=0&&t<=1?a=t*this.scrollSpeed*-1:n>=0&&n<=1&&(a=n*this.scrollSpeed),i>=0&&i<=1?l=i*this.scrollSpeed*-1:r>=0&&r<=1&&(l=r*this.scrollSpeed)),this.setScrollVel(a,l)},setScrollVel:function(e,t){this.scrollTopVel=e,this.scrollLeftVel=t,this.constrainScrollVel(),!this.scrollTopVel&&!this.scrollLeftVel||this.scrollIntervalId||(this.scrollIntervalId=setInterval(ae(this,"scrollIntervalFunc"),this.scrollIntervalMs))},constrainScrollVel:function(){var e=this.scrollEl;this.scrollTopVel<0?e.scrollTop()<=0&&(this.scrollTopVel=0):this.scrollTopVel>0&&e.scrollTop()+e[0].clientHeight>=e[0].scrollHeight&&(this.scrollTopVel=0),this.scrollLeftVel<0?e.scrollLeft()<=0&&(this.scrollLeftVel=0):this.scrollLeftVel>0&&e.scrollLeft()+e[0].clientWidth>=e[0].scrollWidth&&(this.scrollLeftVel=0)},scrollIntervalFunc:function(){var e=this.scrollEl,t=this.scrollIntervalMs/1e3;this.scrollTopVel&&e.scrollTop(e.scrollTop()+this.scrollTopVel*t),this.scrollLeftVel&&e.scrollLeft(e.scrollLeft()+this.scrollLeftVel*t),this.constrainScrollVel(),this.scrollTopVel||this.scrollLeftVel||this.endAutoScroll()},endAutoScroll:function(){this.scrollIntervalId&&(clearInterval(this.scrollIntervalId),this.scrollIntervalId=null,this.handleScrollEnd())},handleDebouncedScroll:function(){this.scrollIntervalId||this.handleScrollEnd()},handleScrollEnd:function(){}});var rt=it.extend({component:null,origHit:null,hit:null,coordAdjust:null,constructor:function(e,t){it.call(this,t),this.component=e},handleInteractionStart:function(e){var t,n,i,r=this.subjectEl;this.component.hitsNeeded(),this.computeScrollBounds(),e?(n={left:x(e),top:k(e)},i=n,r&&(t=h(r),i=L(i,t)),this.origHit=this.queryHit(i.left,i.top),r&&this.options.subjectCenter&&(this.origHit&&(t=_(this.origHit,t)||t),i=D(t)),this.coordAdjust=M(i,n)):(this.origHit=null,this.coordAdjust=null),it.prototype.handleInteractionStart.apply(this,arguments)},handleDragStart:function(e){var t;it.prototype.handleDragStart.apply(this,arguments),t=this.queryHit(x(e),k(e)),t&&this.handleHitOver(t)},handleDrag:function(e,t,n){var i;it.prototype.handleDrag.apply(this,arguments),i=this.queryHit(x(n),k(n)),ge(i,this.hit)||(this.hit&&this.handleHitOut(),i&&this.handleHitOver(i))},handleDragEnd:function(){this.handleHitDone(),it.prototype.handleDragEnd.apply(this,arguments)},handleHitOver:function(e){var t=ge(e,this.origHit);this.hit=e,this.trigger("hitOver",this.hit,t,this.origHit)},handleHitOut:function(){this.hit&&(this.trigger("hitOut",this.hit),this.handleHitDone(),this.hit=null)},handleHitDone:function(){this.hit&&this.trigger("hitDone",this.hit)},handleInteractionEnd:function(){it.prototype.handleInteractionEnd.apply(this,arguments),this.origHit=null,this.hit=null,this.component.hitsNotNeeded()},handleScrollEnd:function(){it.prototype.handleScrollEnd.apply(this,arguments),this.isDragging&&(this.component.releaseHits(),this.component.prepareHits())},queryHit:function(e,t){return this.coordAdjust&&(e+=this.coordAdjust.left,t+=this.coordAdjust.top),this.component.queryHit(e,t)}});Fe.touchMouseIgnoreWait=500;var ot=ue.extend(et,Je,{isTouching:!1,mouseIgnoreDepth:0,handleScrollProxy:null,bind:function(){var t=this;this.listenTo(e(document),{touchstart:this.handleTouchStart,touchcancel:this.handleTouchCancel,touchend:this.handleTouchEnd,mousedown:this.handleMouseDown,mousemove:this.handleMouseMove,mouseup:this.handleMouseUp,click:this.handleClick,selectstart:this.handleSelectStart,contextmenu:this.handleContextMenu}),window.addEventListener("touchmove",this.handleTouchMoveProxy=function(n){t.handleTouchMove(e.Event(n))},{passive:!1}),window.addEventListener("scroll",this.handleScrollProxy=function(n){t.handleScroll(e.Event(n))},!0)},unbind:function(){this.stopListeningTo(e(document)),window.removeEventListener("touchmove",this.handleTouchMoveProxy),window.removeEventListener("scroll",this.handleScrollProxy,!0)},handleTouchStart:function(e){this.stopTouch(e,!0),this.isTouching=!0,this.trigger("touchstart",e)},handleTouchMove:function(e){this.isTouching&&this.trigger("touchmove",e)},handleTouchCancel:function(e){this.isTouching&&(this.trigger("touchcancel",e),this.stopTouch(e))},handleTouchEnd:function(e){this.stopTouch(e)},handleMouseDown:function(e){this.shouldIgnoreMouse()||this.trigger("mousedown",e)},handleMouseMove:function(e){this.shouldIgnoreMouse()||this.trigger("mousemove",e)},handleMouseUp:function(e){this.shouldIgnoreMouse()||this.trigger("mouseup",e)},handleClick:function(e){this.shouldIgnoreMouse()||this.trigger("click",e)},handleSelectStart:function(e){this.trigger("selectstart",e)},handleContextMenu:function(e){this.trigger("contextmenu",e); -},handleScroll:function(e){this.trigger("scroll",e)},stopTouch:function(e,t){this.isTouching&&(this.isTouching=!1,this.trigger("touchend",e),t||this.startTouchMouseIgnore())},startTouchMouseIgnore:function(){var e=this,t=Fe.touchMouseIgnoreWait;t&&(this.mouseIgnoreDepth++,setTimeout(function(){e.mouseIgnoreDepth--},t))},shouldIgnoreMouse:function(){return this.isTouching||Boolean(this.mouseIgnoreDepth)}});!function(){var e=null,t=0;ot.get=function(){return e||(e=new ot,e.bind()),e},ot.needed=function(){ot.get(),t++},ot.unneeded=function(){t--,t||(e.unbind(),e=null)}}();var st=ue.extend(et,{options:null,sourceEl:null,el:null,parentEl:null,top0:null,left0:null,y0:null,x0:null,topDelta:null,leftDelta:null,isFollowing:!1,isHidden:!1,isAnimating:!1,constructor:function(t,n){this.options=n=n||{},this.sourceEl=t,this.parentEl=n.parentEl?e(n.parentEl):t.parent()},start:function(t){this.isFollowing||(this.isFollowing=!0,this.y0=k(t),this.x0=x(t),this.topDelta=0,this.leftDelta=0,this.isHidden||this.updatePosition(),S(t)?this.listenTo(e(document),"touchmove",this.handleMove):this.listenTo(e(document),"mousemove",this.handleMove))},stop:function(t,n){function i(){r.isAnimating=!1,r.removeElement(),r.top0=r.left0=null,n&&n()}var r=this,o=this.options.revertDuration;this.isFollowing&&!this.isAnimating&&(this.isFollowing=!1,this.stopListeningTo(e(document)),t&&o&&!this.isHidden?(this.isAnimating=!0,this.el.animate({top:this.top0,left:this.left0},{duration:o,complete:i})):i())},getEl:function(){var e=this.el;return e||(e=this.el=this.sourceEl.clone().addClass(this.options.additionalClass||"").css({position:"absolute",visibility:"",display:this.isHidden?"none":"",margin:0,right:"auto",bottom:"auto",width:this.sourceEl.width(),height:this.sourceEl.height(),opacity:this.options.opacity||"",zIndex:this.options.zIndex}),e.addClass("fc-unselectable"),e.appendTo(this.parentEl)),e},removeElement:function(){this.el&&(this.el.remove(),this.el=null)},updatePosition:function(){var e,t;this.getEl(),null===this.top0&&(e=this.sourceEl.offset(),t=this.el.offsetParent().offset(),this.top0=e.top-t.top,this.left0=e.left-t.left),this.el.css({top:this.top0+this.topDelta,left:this.left0+this.leftDelta})},handleMove:function(e){this.topDelta=k(e)-this.y0,this.leftDelta=x(e)-this.x0,this.isHidden||this.updatePosition()},hide:function(){this.isHidden||(this.isHidden=!0,this.el&&this.el.hide())},show:function(){this.isHidden&&(this.isHidden=!1,this.updatePosition(),this.getEl().show())}}),at=Fe.Grid=ue.extend(et,{hasDayInteractions:!0,view:null,isRTL:null,start:null,end:null,el:null,elsByFill:null,eventTimeFormat:null,displayEventTime:null,displayEventEnd:null,minResizeDuration:null,largeUnit:null,dayClickListener:null,daySelectListener:null,segDragListener:null,segResizeListener:null,externalDragListener:null,constructor:function(e){this.view=e,this.isRTL=e.opt("isRTL"),this.elsByFill={},this.dayClickListener=this.buildDayClickListener(),this.daySelectListener=this.buildDaySelectListener()},computeEventTimeFormat:function(){return this.view.opt("smallTimeFormat")},computeDisplayEventTime:function(){return!0},computeDisplayEventEnd:function(){return!0},setRange:function(e){this.start=e.start.clone(),this.end=e.end.clone(),this.rangeUpdated(),this.processRangeOptions()},rangeUpdated:function(){},processRangeOptions:function(){var e,t,n=this.view;this.eventTimeFormat=n.opt("eventTimeFormat")||n.opt("timeFormat")||this.computeEventTimeFormat(),e=n.opt("displayEventTime"),null==e&&(e=this.computeDisplayEventTime()),t=n.opt("displayEventEnd"),null==t&&(t=this.computeDisplayEventEnd()),this.displayEventTime=e,this.displayEventEnd=t},spanToSegs:function(e){},diffDates:function(e,t){return this.largeUnit?F(e,t,this.largeUnit):I(e,t)},hitsNeededDepth:0,hitsNeeded:function(){this.hitsNeededDepth++||this.prepareHits()},hitsNotNeeded:function(){this.hitsNeededDepth&&!--this.hitsNeededDepth&&this.releaseHits()},prepareHits:function(){},releaseHits:function(){},queryHit:function(e,t){},getHitSpan:function(e){},getHitEl:function(e){},setElement:function(e){this.el=e,this.hasDayInteractions&&(C(e),this.bindDayHandler("touchstart",this.dayTouchStart),this.bindDayHandler("mousedown",this.dayMousedown)),this.bindSegHandlers(),this.bindGlobalHandlers()},bindDayHandler:function(t,n){var i=this;this.el.on(t,function(t){if(!e(t.target).is(i.segSelector+","+i.segSelector+" *,.fc-more,a[data-goto]"))return n.call(i,t)})},removeElement:function(){this.unbindGlobalHandlers(),this.clearDragListeners(),this.el.remove()},renderSkeleton:function(){},renderDates:function(){},unrenderDates:function(){},bindGlobalHandlers:function(){this.listenTo(e(document),{dragstart:this.externalDragStart,sortstart:this.externalDragStart})},unbindGlobalHandlers:function(){this.stopListeningTo(e(document))},dayMousedown:function(e){var t=this.view;t.isSelected||t.selectedEvent||(this.dayClickListener.startInteraction(e),t.opt("selectable")&&this.daySelectListener.startInteraction(e,{distance:t.opt("selectMinDistance")}))},dayTouchStart:function(e){var t,n=this.view;n.isSelected||n.selectedEvent||(t=n.opt("selectLongPressDelay"),null==t&&(t=n.opt("longPressDelay")),this.dayClickListener.startInteraction(e),n.opt("selectable")&&this.daySelectListener.startInteraction(e,{delay:t}))},buildDayClickListener:function(){var e,t=this,n=this.view,i=new rt(this,{scroll:n.opt("dragScroll"),interactionStart:function(){e=i.origHit},hitOver:function(t,n,i){n||(e=null)},hitOut:function(){e=null},interactionEnd:function(i,r){!r&&e&&n.triggerDayClick(t.getHitSpan(e),t.getHitEl(e),i)}});return i.shouldCancelTouchScroll=!1,i.scrollAlwaysKills=!0,i},buildDaySelectListener:function(){var e,t=this,n=this.view,i=new rt(this,{scroll:n.opt("dragScroll"),interactionStart:function(){e=null},dragStart:function(){n.unselect()},hitOver:function(n,i,r){r&&(e=t.computeSelection(t.getHitSpan(r),t.getHitSpan(n)),e?t.renderSelection(e):e===!1&&o())},hitOut:function(){e=null,t.unrenderSelection()},hitDone:function(){s()},interactionEnd:function(t,i){!i&&e&&n.reportSelection(e,t)}});return i},clearDragListeners:function(){this.dayClickListener.endInteraction(),this.daySelectListener.endInteraction(),this.segDragListener&&this.segDragListener.endInteraction(),this.segResizeListener&&this.segResizeListener.endInteraction(),this.externalDragListener&&this.externalDragListener.endInteraction()},renderEventLocationHelper:function(e,t){var n=this.fabricateHelperEvent(e,t);return this.renderHelper(n,t)},fabricateHelperEvent:function(e,t){var n=t?$(t.event):{};return n.start=e.start.clone(),n.end=e.end?e.end.clone():null,n.allDay=null,this.view.calendar.normalizeEventDates(n),n.className=(n.className||[]).concat("fc-helper"),t||(n.editable=!1),n},renderHelper:function(e,t){},unrenderHelper:function(){},renderSelection:function(e){this.renderHighlight(e)},unrenderSelection:function(){this.unrenderHighlight()},computeSelection:function(e,t){var n=this.computeSelectionSpan(e,t);return!(n&&!this.view.calendar.isSelectionSpanAllowed(n))&&n},computeSelectionSpan:function(e,t){var n=[e.start,e.end,t.start,t.end];return n.sort(oe),{start:n[0].clone(),end:n[3].clone()}},renderHighlight:function(e){this.renderFill("highlight",this.spanToSegs(e))},unrenderHighlight:function(){this.unrenderFill("highlight")},highlightSegClasses:function(){return["fc-highlight"]},renderBusinessHours:function(){},unrenderBusinessHours:function(){},getNowIndicatorUnit:function(){},renderNowIndicator:function(e){},unrenderNowIndicator:function(){},renderFill:function(e,t){},unrenderFill:function(e){var t=this.elsByFill[e];t&&(t.remove(),delete this.elsByFill[e])},renderFillSegEls:function(t,n){var i,r=this,o=this[t+"SegEl"],s="",a=[];if(n.length){for(i=0;i"},getDayClasses:function(e,t){var n=this.view,i=n.calendar.getNow(),r=["fc-"+je[e.day()]];return 1==n.intervalDuration.as("months")&&e.month()!=n.intervalStart.month()&&r.push("fc-other-month"),e.isSame(i,"day")?(r.push("fc-today"),t!==!0&&r.push(n.highlightStateClass)):e *",mousedOverSeg:null,isDraggingSeg:!1,isResizingSeg:!1,isDraggingExternal:!1,segs:null,renderEvents:function(e){var t,n=[],i=[];for(t=0;ta&&s.push({start:a,end:n.start}),a=n.end;return a=t.length?t[t.length-1]+1:t[n]},computeColHeadFormat:function(){return this.rowCnt>1||this.colCnt>10?"ddd":this.colCnt>1?this.view.opt("dayOfMonthFormat"):"dddd"},sliceRangeByRow:function(e){var t,n,i,r,o,s=this.daysPerRow,a=this.view.computeDayRange(e),l=this.getDateDayIndex(a.start),c=this.getDateDayIndex(a.end.clone().subtract(1,"days")),u=[];for(t=0;t'+this.renderHeadTrHtml()+"
    "},renderHeadIntroHtml:function(){return this.renderIntroHtml()},renderHeadTrHtml:function(){return""+(this.isRTL?"":this.renderHeadIntroHtml())+this.renderHeadDateCellsHtml()+(this.isRTL?this.renderHeadIntroHtml():"")+""},renderHeadDateCellsHtml:function(){var e,t,n=[];for(e=0;e1?' colspan="'+t+'"':"")+(n?" "+n:"")+">"+i.buildGotoAnchorHtml({date:e,forceOff:this.rowCnt>1||1===this.colCnt},ee(e.format(this.colHeadFormat)))+""},renderBgTrHtml:function(e){return""+(this.isRTL?"":this.renderBgIntroHtml(e))+this.renderBgCellsHtml(e)+(this.isRTL?this.renderBgIntroHtml(e):"")+""},renderBgIntroHtml:function(e){return this.renderIntroHtml()},renderBgCellsHtml:function(e){var t,n,i=[];for(t=0;t"},renderIntroHtml:function(){},bookendCells:function(e){var t=this.renderIntroHtml();t&&(this.isRTL?e.append(t):e.prepend(t))}},ct=Fe.DayGrid=at.extend(lt,{numbersVisible:!1,bottomCoordPadding:0,rowEls:null,cellEls:null,helperEls:null,rowCoordCache:null,colCoordCache:null,renderDates:function(e){var t,n,i=this.view,r=this.rowCnt,o=this.colCnt,s="";for(t=0;t
    '+this.renderBgTrHtml(e)+'
    '+(this.numbersVisible?""+this.renderNumberTrHtml(e)+"":"")+"
    "},renderNumberTrHtml:function(e){return""+(this.isRTL?"":this.renderNumberIntroHtml(e))+this.renderNumberCellsHtml(e)+(this.isRTL?this.renderNumberIntroHtml(e):"")+""},renderNumberIntroHtml:function(e){return this.renderIntroHtml()},renderNumberCellsHtml:function(e){var t,n,i=[];for(t=0;t',this.view.cellWeekNumbersVisible&&e.day()==n&&(i+=this.view.buildGotoAnchorHtml({date:e,type:"week"},{class:"fc-week-number"},e.format("w"))),this.view.dayNumbersVisible&&(i+=this.view.buildGotoAnchorHtml(e,{class:"fc-day-number"},e.date())),i+=""):""},computeEventTimeFormat:function(){return this.view.opt("extraSmallTimeFormat")},computeDisplayEventEnd:function(){return 1==this.colCnt},rangeUpdated:function(){this.updateDayTable()},spanToSegs:function(e){var t,n,i=this.sliceRangeByRow(e);for(t=0;t');s=n&&n.row===t?n.el.position().top:a.find(".fc-content-skeleton tbody").position().top,l.css("top",s).find("table").append(i[t].tbodyEl),a.append(l),r.push(l[0])}),this.helperEls=e(r)},unrenderHelper:function(){this.helperEls&&(this.helperEls.remove(),this.helperEls=null)},fillSegTag:"td",renderFill:function(t,n,i){var r,o,s,a=[];for(n=this.renderFillSegEls(t,n),r=0;r
    '),o=r.find("tr"),a>0&&o.append(''),o.append(n.el.attr("colspan",l-a)),l'),this.bookendCells(o),r}});ct.mixin({rowStructs:null,unrenderEvents:function(){this.removeSegPopover(),at.prototype.unrenderEvents.apply(this,arguments)},getEventSegs:function(){return at.prototype.getEventSegs.call(this).concat(this.popoverSegs||[])},renderBgSegs:function(t){var n=e.grep(t,function(e){return e.event.allDay});return at.prototype.renderBgSegs.call(this,n)},renderFgSegs:function(t){var n;return t=this.renderFgSegEls(t),n=this.rowStructs=this.renderSegRows(t),this.rowEls.each(function(t,i){e(i).find(".fc-content-skeleton > table").append(n[t].tbodyEl)}),t},unrenderFgSegs:function(){for(var e,t=this.rowStructs||[];e=t.pop();)e.tbodyEl.remove();this.rowStructs=null},renderSegRows:function(e){var t,n,i=[];for(t=this.groupSegRows(e),n=0;n'+ee(n)+"")),i=''+(ee(o.title||"")||" ")+"",'
    '+(this.isRTL?i+" "+d:d+" "+i)+"
    "+(a?'
    ':"")+(l?'
    ':"")+""},renderSegRow:function(t,n){function i(t){for(;s"),a.append(u)),m[r][s]=u,v[r][s]=u,s++}var r,o,s,a,l,c,u,d=this.colCnt,h=this.buildSegLevels(n),f=Math.max(1,h.length),p=e(""),g=[],m=[],v=[];for(r=0;r"),g.push([]),m.push([]),v.push([]),o)for(l=0;l').append(c.el),c.leftCol!=c.rightCol?u.attr("colspan",c.rightCol-c.leftCol+1):v[r][s]=u;s<=c.rightCol;)m[r][s]=u,g[r][s]=c,s++;a.append(u)}i(d),this.bookendCells(a),p.append(a)}return{row:t,tbodyEl:p,cellMatrix:m,segMatrix:g,segLevels:h,segs:n}},buildSegLevels:function(e){var t,n,i,r=[];for(this.sortEventSegs(e),t=0;t td > :first-child").each(n),r.position().top+o>a)return i;return!1},limitRow:function(t,n){function i(i){for(;k").append(y),h.append(v),x.push(v[0])),k++}var r,o,s,a,l,c,u,d,h,f,p,g,m,v,y,b=this,w=this.rowStructs[t],x=[],k=0;if(n&&n').attr("rowspan",f),c=d[g],y=this.renderMoreLink(t,l.leftCol+g,[l].concat(c)),v=e("
    ").append(y),m.append(v),p.push(m[0]),x.push(m[0]);h.addClass("fc-limited").after(e(p)),s.push(h[0])}}i(this.colCnt),w.moreEls=e(x),w.limitedEls=e(s)}},unlimitRow:function(e){var t=this.rowStructs[e];t.moreEls&&(t.moreEls.remove(),t.moreEls=null),t.limitedEls&&(t.limitedEls.removeClass("fc-limited"),t.limitedEls=null)},renderMoreLink:function(t,n,i){var r=this,o=this.view;return e('').text(this.getMoreLinkText(i.length)).on("click",function(s){var a=o.opt("eventLimitClick"),l=r.getCellDate(t,n),c=e(this),u=r.getCellEl(t,n),d=r.getCellSegs(t,n),h=r.resliceDaySegs(d,l),f=r.resliceDaySegs(i,l);"function"==typeof a&&(a=o.publiclyTrigger("eventLimitClick",null,{date:l,dayEl:u,moreEl:c,segs:h,hiddenSegs:f},s)),"popover"===a?r.showSegPopover(t,n,c,h):"string"==typeof a&&o.calendar.zoomTo(l,a)})},showSegPopover:function(e,t,n,i){var r,o,s=this,a=this.view,l=n.parent();r=1==this.rowCnt?a.el:this.rowEls.eq(e),o={className:"fc-more-popover",content:this.renderSegPopoverContent(e,t,i),parentEl:this.view.el,top:r.offset().top,autoHide:!0,viewportConstrain:a.opt("popoverViewportConstrain"),hide:function(){if(s.popoverSegs)for(var e,t=0;t'+ee(a)+'
    '),c=l.find(".fc-event-container");for(i=this.renderFgSegEls(i,!0),this.popoverSegs=i,r=0;r'+this.renderBgTrHtml(0)+'
    "},renderSlatRowHtml:function(){for(var e,n,i,r=this.view,o=this.isRTL,s="",a=t.duration(+this.minTime);a"+(n?""+ee(e.format(this.labelFormat))+"":"")+"",s+='"+(o?"":i)+''+(o?i:"")+"",a.add(this.slotDuration);return s},processOptions:function(){var n,i=this.view,r=i.opt("slotDuration"),o=i.opt("snapDuration");r=t.duration(r),o=o?t.duration(o):r,this.slotDuration=r,this.snapDuration=o,this.snapsPerSlot=r/o,this.minResizeDuration=o,this.minTime=t.duration(i.opt("minTime")),this.maxTime=t.duration(i.opt("maxTime")),n=i.opt("slotLabelFormat"),e.isArray(n)&&(n=n[n.length-1]),this.labelFormat=n||i.opt("smallTimeFormat"),n=i.opt("slotLabelInterval"),this.labelInterval=n?t.duration(n):this.computeLabelInterval(r)},computeLabelInterval:function(e){var n,i,r;for(n=Lt.length-1;n>=0;n--)if(i=t.duration(Lt[n]),r=j(i,e),se(r)&&r>1)return i;return t.duration(e)},computeEventTimeFormat:function(){return this.view.opt("noMeridiemTimeFormat")},computeDisplayEventEnd:function(){return!0},prepareHits:function(){this.colCoordCache.build(),this.slatCoordCache.build()},releaseHits:function(){this.colCoordCache.clear()},queryHit:function(e,t){var n=this.snapsPerSlot,i=this.colCoordCache,r=this.slatCoordCache;if(i.isLeftInBounds(e)&&r.isTopInBounds(t)){var o=i.getHorizontalIndex(e),s=r.getVerticalIndex(t);if(null!=o&&null!=s){var a=r.getTopOffset(s),l=r.getHeight(s),c=(t-a)/l,u=Math.floor(c*n),d=s*n+u,h=a+u/n*l,f=a+(u+1)/n*l;return{col:o,snap:d,component:this,left:i.getLeftOffset(o),right:i.getRightOffset(o),top:h,bottom:f}}}},getHitSpan:function(e){var t,n=this.getCellDate(0,e.col),i=this.computeSnapTime(e.snap);return n.time(i),t=n.clone().add(this.snapDuration),{start:n,end:t}},getHitEl:function(e){return this.colEls.eq(e.col)},rangeUpdated:function(){this.updateDayTable()},computeSnapTime:function(e){return t.duration(this.minTime+this.snapDuration*e)},spanToSegs:function(e){var t,n=this.sliceRangeByTimes(e);for(t=0;t
    ').css("top",r).appendTo(this.colContainerEls.eq(i[n].col))[0]);i.length>0&&o.push(e('
    ').css("top",r).appendTo(this.el.find(".fc-content-skeleton"))[0]),this.nowIndicatorEls=e(o)},unrenderNowIndicator:function(){this.nowIndicatorEls&&(this.nowIndicatorEls.remove(),this.nowIndicatorEls=null)},renderSelection:function(e){this.view.opt("selectHelper")?this.renderEventLocationHelper(e):this.renderHighlight(e)},unrenderSelection:function(){this.unrenderHelper(),this.unrenderHighlight()},renderHighlight:function(e){this.renderHighlightSegs(this.spanToSegs(e))},unrenderHighlight:function(){this.unrenderHighlightSegs()}});ut.mixin({colContainerEls:null,fgContainerEls:null,bgContainerEls:null,helperContainerEls:null,highlightContainerEls:null,businessContainerEls:null,fgSegs:null,bgSegs:null,helperSegs:null,highlightSegs:null,businessSegs:null,renderContentSkeleton:function(){var t,n,i="";for(t=0;t
    ';n=e('
    '+i+"
    "),this.colContainerEls=n.find(".fc-content-col"),this.helperContainerEls=n.find(".fc-helper-container"),this.fgContainerEls=n.find(".fc-event-container:not(.fc-helper-container)"),this.bgContainerEls=n.find(".fc-bgevent-container"),this.highlightContainerEls=n.find(".fc-highlight-container"),this.businessContainerEls=n.find(".fc-business-container"),this.bookendCells(n.find("tr")),this.el.append(n)},renderFgSegs:function(e){return e=this.renderFgSegsIntoContainers(e,this.fgContainerEls),this.fgSegs=e,e},unrenderFgSegs:function(){this.unrenderNamedSegs("fgSegs")},renderHelperSegs:function(t,n){var i,r,o,s=[];for(t=this.renderFgSegsIntoContainers(t,this.helperContainerEls),i=0;i
    '+(n?'
    '+ee(n)+"
    ":"")+(s.title?'
    '+ee(s.title)+"
    ":"")+'
    '+(c?'
    ':"")+""},updateSegVerticals:function(e){this.computeSegVerticals(e),this.assignSegVerticals(e)},computeSegVerticals:function(e){var t,n;for(t=0;t1?"ll":"LL"},formatRange:function(e,t,n){var i=e.end;return i.hasTime()||(i=i.clone().subtract(1)),Qe(e.start,i,t,n,this.opt("isRTL"))},getAllDayHtml:function(){return this.opt("allDayHtml")||ee(this.opt("allDayText"))},buildGotoAnchorHtml:function(t,n,i){var r,o,s,a;return e.isPlainObject(t)?(r=t.date,o=t.type,s=t.forceOff):r=t,r=Fe.moment(r),a={date:r.format("YYYY-MM-DD"),type:o||"day"},"string"==typeof n&&(i=n,n=null),n=n?" "+ie(n):"",i=i||"",!s&&this.opt("navLinks")?"'+i+"":""+i+""},setElement:function(e){this.el=e,this.bindGlobalHandlers(),this.renderSkeleton()},removeElement:function(){this.unsetDate(),this.unrenderSkeleton(),this.unbindGlobalHandlers(),this.el.remove()},renderSkeleton:function(){},unrenderSkeleton:function(){},setDate:function(e){var t=this.isDateSet;this.isDateSet=!0,this.handleDate(e,t),this.trigger(t?"dateReset":"dateSet",e)},unsetDate:function(){this.isDateSet&&(this.isDateSet=!1,this.handleDateUnset(),this.trigger("dateUnset"))},handleDate:function(e,t){var n=this;this.unbindEvents(),this.requestDateRender(e).then(function(){n.bindEvents()})},handleDateUnset:function(){this.unbindEvents(),this.requestDateUnrender()},requestDateRender:function(e){var t=this;return this.dateRenderQueue.add(function(){return t.executeDateRender(e)})},requestDateUnrender:function(){var e=this;return this.dateRenderQueue.add(function(){return e.executeDateUnrender()})},executeDateRender:function(e){var t=this;return e?this.captureInitialScroll():this.captureScroll(),this.freezeHeight(),this.executeDateUnrender().then(function(){e&&t.setRange(t.computeRange(e)),t.render&&t.render(),t.renderDates(),t.updateSize(),t.renderBusinessHours(),t.startNowIndicator(),t.thawHeight(),t.releaseScroll(),t.isDateRendered=!0,t.onDateRender(),t.trigger("dateRender")})},executeDateUnrender:function(){var e=this;return e.isDateRendered?this.requestEventsUnrender().then(function(){e.unselect(),e.stopNowIndicator(),e.triggerUnrender(),e.unrenderBusinessHours(),e.unrenderDates(),e.destroy&&e.destroy(),e.isDateRendered=!1,e.trigger("dateUnrender")}):fe.resolve()},onDateRender:function(){this.triggerRender()},renderDates:function(){},unrenderDates:function(){},triggerRender:function(){this.publiclyTrigger("viewRender",this,this,this.el)},triggerUnrender:function(){this.publiclyTrigger("viewDestroy",this,this,this.el)},bindGlobalHandlers:function(){this.listenTo(ot.get(),{touchstart:this.processUnselect,mousedown:this.handleDocumentMousedown})},unbindGlobalHandlers:function(){this.stopListeningTo(ot.get())},initThemingProps:function(){var e=this.opt("theme")?"ui":"fc";this.widgetHeaderClass=e+"-widget-header",this.widgetContentClass=e+"-widget-content",this.highlightStateClass=e+"-state-highlight"},renderBusinessHours:function(){},unrenderBusinessHours:function(){},startNowIndicator:function(){var e,n,i,r=this;this.opt("nowIndicator")&&(e=this.getNowIndicatorUnit(),e&&(n=ae(this,"updateNowIndicator"),this.initialNowDate=this.calendar.getNow(),this.initialNowQueriedMs=+new Date,this.renderNowIndicator(this.initialNowDate),this.isNowIndicatorRendered=!0,i=this.initialNowDate.clone().startOf(e).add(1,e)-this.initialNowDate,this.nowIndicatorTimeoutID=setTimeout(function(){r.nowIndicatorTimeoutID=null,n(),i=+t.duration(1,e),i=Math.max(100,i),r.nowIndicatorIntervalID=setInterval(n,i)},i)))},updateNowIndicator:function(){this.isNowIndicatorRendered&&(this.unrenderNowIndicator(),this.renderNowIndicator(this.initialNowDate.clone().add(new Date-this.initialNowQueriedMs)))},stopNowIndicator:function(){this.isNowIndicatorRendered&&(this.nowIndicatorTimeoutID&&(clearTimeout(this.nowIndicatorTimeoutID),this.nowIndicatorTimeoutID=null),this.nowIndicatorIntervalID&&(clearTimeout(this.nowIndicatorIntervalID),this.nowIndicatorIntervalID=null),this.unrenderNowIndicator(),this.isNowIndicatorRendered=!1)},getNowIndicatorUnit:function(){},renderNowIndicator:function(e){},unrenderNowIndicator:function(){},updateSize:function(e){e&&this.captureScroll(),this.updateHeight(e),this.updateWidth(e),this.updateNowIndicator(),e&&this.releaseScroll()},updateWidth:function(e){},updateHeight:function(e){var t=this.calendar;this.setHeight(t.getSuggestedViewHeight(),t.isHeightAuto())},setHeight:function(e,t){},capturedScroll:null,capturedScrollDepth:0,captureScroll:function(){return!this.capturedScrollDepth++&&(this.capturedScroll=this.isDateRendered?this.queryScroll():{},!0)},captureInitialScroll:function(t){this.captureScroll()&&(this.capturedScroll.isInitial=!0,t?e.extend(this.capturedScroll,t):this.capturedScroll.isComputed=!0)},releaseScroll:function(){var t=this.capturedScroll,n=this.discardScroll();t.isComputed&&(n?e.extend(t,this.computeInitialScroll()):t=null),t&&(t.isInitial?this.hardSetScroll(t):this.setScroll(t))},discardScroll:function(){return!--this.capturedScrollDepth&&(this.capturedScroll=null,!0)},computeInitialScroll:function(){return{}},queryScroll:function(){return{}},hardSetScroll:function(e){var t=this,n=function(){t.setScroll(e)};n(),setTimeout(n,0)},setScroll:function(e){},freezeHeight:function(){this.calendar.freezeContentHeight()},thawHeight:function(){this.calendar.thawContentHeight()},bindEvents:function(){var e=this;this.isEventsBound||(this.isEventsBound=!0,this.rejectOn("eventsUnbind",this.requestEvents()).then(function(t){e.listenTo(e.calendar,"eventsReset",e.setEvents),e.setEvents(t)}))},unbindEvents:function(){this.isEventsBound&&(this.isEventsBound=!1,this.stopListeningTo(this.calendar,"eventsReset"),this.unsetEvents(),this.trigger("eventsUnbind"))},setEvents:function(e){var t=this.isEventSet;this.isEventsSet=!0,this.handleEvents(e,t),this.trigger(t?"eventsReset":"eventsSet",e)},unsetEvents:function(){this.isEventsSet&&(this.isEventsSet=!1,this.handleEventsUnset(),this.trigger("eventsUnset"))},whenEventsSet:function(){var e=this;return this.isEventsSet?fe.resolve(this.getCurrentEvents()):new fe(function(t){e.one("eventsSet",t)})},handleEvents:function(e,t){this.requestEventsRender(e)},handleEventsUnset:function(){this.requestEventsUnrender()},requestEventsRender:function(e){var t=this;return this.eventRenderQueue.add(function(){return t.executeEventsRender(e)})},requestEventsUnrender:function(){var e=this;return this.isEventsRendered?this.eventRenderQueue.addQuickly(function(){return e.executeEventsUnrender()}):fe.resolve()},requestCurrentEventsRender:function(){return this.isEventsSet?void this.requestEventsRender(this.getCurrentEvents()):fe.reject()},executeEventsRender:function(e){var t=this;return this.captureScroll(),this.freezeHeight(),this.executeEventsUnrender().then(function(){t.renderEvents(e),t.thawHeight(),t.releaseScroll(),t.isEventsRendered=!0,t.onEventsRender(),t.trigger("eventsRender")})},executeEventsUnrender:function(){return this.isEventsRendered&&(this.onBeforeEventsUnrender(),this.captureScroll(),this.freezeHeight(),this.destroyEvents&&this.destroyEvents(),this.unrenderEvents(),this.thawHeight(),this.releaseScroll(),this.isEventsRendered=!1,this.trigger("eventsUnrender")),fe.resolve()},onEventsRender:function(){this.renderedEventSegEach(function(e){this.publiclyTrigger("eventAfterRender",e.event,e.event,e.el)}),this.publiclyTrigger("eventAfterAllRender")},onBeforeEventsUnrender:function(){this.renderedEventSegEach(function(e){this.publiclyTrigger("eventDestroy",e.event,e.event,e.el)})},renderEvents:function(e){},unrenderEvents:function(){},requestEvents:function(){return this.calendar.requestEvents(this.start,this.end)},getCurrentEvents:function(){return this.calendar.getPrunedEventCache()},resolveEventEl:function(t,n){var i=this.publiclyTrigger("eventRender",t,t,n);return i===!1?n=null:i&&i!==!0&&(n=e(i)),n},showEvent:function(e){this.renderedEventSegEach(function(e){e.el.css("visibility","")},e)},hideEvent:function(e){this.renderedEventSegEach(function(e){e.el.css("visibility","hidden")},e)},renderedEventSegEach:function(e,t){var n,i=this.getEventSegs();for(n=0;n=this.nextDayThreshold&&r.add(1,"days")),(!i||r<=n)&&(r=n.clone().add(1,"days")),{start:n,end:r}},isMultiDayEvent:function(e){var t=this.computeDayRange(e);return t.end.diff(t.start,"days")>1}}),ht=Fe.Scroller=ue.extend({el:null,scrollEl:null,overflowX:null,overflowY:null,constructor:function(e){e=e||{},this.overflowX=e.overflowX||e.overflow||"auto",this.overflowY=e.overflowY||e.overflow||"auto"},render:function(){this.el=this.renderEl(),this.applyOverflow()},renderEl:function(){return this.scrollEl=e('
    ')},clear:function(){this.setHeight("auto"),this.applyOverflow()},destroy:function(){this.el.remove()},applyOverflow:function(){this.scrollEl.css({"overflow-x":this.overflowX,"overflow-y":this.overflowY})},lockOverflow:function(e){var t=this.overflowX,n=this.overflowY;e=e||this.getScrollbarWidths(),"auto"===t&&(t=e.top||e.bottom||this.scrollEl[0].scrollWidth-1>this.scrollEl[0].clientWidth?"scroll":"hidden"),"auto"===n&&(n=e.left||e.right||this.scrollEl[0].scrollHeight-1>this.scrollEl[0].clientHeight?"scroll":"hidden"),this.scrollEl.css({"overflow-x":t,"overflow-y":n})},setHeight:function(e){this.scrollEl.height(e)},getScrollTop:function(){return this.scrollEl.scrollTop()},setScrollTop:function(e){this.scrollEl.scrollTop(e)},getClientWidth:function(){return this.scrollEl[0].clientWidth},getClientHeight:function(){return this.scrollEl[0].clientHeight},getScrollbarWidths:function(){return g(this.scrollEl)}});He.prototype.proxyCall=function(e){var t=Array.prototype.slice.call(arguments,1),n=[];return this.items.forEach(function(i){n.push(i[e].apply(i,t))}),n};var ft=Fe.Calendar=ue.extend({dirDefaults:null,localeDefaults:null,overrides:null,dynamicOverrides:null,options:null,viewSpecCache:null,view:null,header:null,footer:null,loadingLevel:0,constructor:Ae,initialize:function(){},populateOptionsHash:function(){var e,t,i,r;e=J(this.dynamicOverrides.locale,this.overrides.locale),t=pt[e],t||(e=ft.defaults.locale,t=pt[e]||{}),i=J(this.dynamicOverrides.isRTL,this.overrides.isRTL,t.isRTL,ft.defaults.isRTL),r=i?ft.rtlDefaults:{},this.dirDefaults=r,this.localeDefaults=t,this.options=n([ft.defaults,r,t,this.overrides,this.dynamicOverrides]),ze(this.options)},getViewSpec:function(e){var t=this.viewSpecCache;return t[e]||(t[e]=this.buildViewSpec(e))},getUnitViewSpec:function(t){var n,i,r;if(e.inArray(t,Ye)!=-1)for(n=this.header.getViewsWithButtons(),e.each(Fe.views,function(e){n.push(e)}),i=0;i=n&&t.end<=i},ft.prototype.getPeerEvents=function(e,t){var n,i,r=this.getEventCache(),o=[];for(n=0;nn};var wt={id:"_fcBusinessHours",start:"09:00",end:"17:00",dow:[1,2,3,4,5],rendering:"inverse-background"};ft.prototype.getCurrentBusinessHourEvents=function(e){return this.computeBusinessHourEvents(e,this.options.businessHours)},ft.prototype.computeBusinessHourEvents=function(t,n){return n===!0?this.expandBusinessHourEvents(t,[{}]):e.isPlainObject(n)?this.expandBusinessHourEvents(t,[n]):e.isArray(n)?this.expandBusinessHourEvents(t,n,!0):[]},ft.prototype.expandBusinessHourEvents=function(t,n,i){var r,o,s=this.getView(),a=[];for(r=0;r1,this.opt("weekNumbers")&&(this.opt("weekNumbersWithinDays")?(this.cellWeekNumbersVisible=!0,this.colWeekNumbersVisible=!1):(this.cellWeekNumbersVisible=!1,this.colWeekNumbersVisible=!0)),this.dayGrid.numbersVisible=this.dayNumbersVisible||this.cellWeekNumbersVisible||this.colWeekNumbersVisible,this.el.addClass("fc-basic-view").html(this.renderSkeletonHtml()),this.renderHead(),this.scroller.render();var t=this.scroller.el.addClass("fc-day-grid-container"),n=e('
    ').appendTo(t);this.el.find(".fc-body > tr > td").append(t),this.dayGrid.setElement(n),this.dayGrid.renderDates(this.hasRigidRows())},renderHead:function(){this.headContainerEl=this.el.find(".fc-head-container").html(this.dayGrid.renderHeadHtml()),this.headRowEl=this.headContainerEl.find(".fc-row")},unrenderDates:function(){this.dayGrid.unrenderDates(),this.dayGrid.removeElement(),this.scroller.destroy()},renderBusinessHours:function(){this.dayGrid.renderBusinessHours()},unrenderBusinessHours:function(){this.dayGrid.unrenderBusinessHours()},renderSkeletonHtml:function(){return'
    '},weekNumberStyleAttr:function(){return null!==this.weekNumberWidth?'style="width:'+this.weekNumberWidth+'px"':""},hasRigidRows:function(){var e=this.opt("eventLimit");return e&&"number"!=typeof e},updateWidth:function(){this.colWeekNumbersVisible&&(this.weekNumberWidth=c(this.el.find(".fc-week-number")))},setHeight:function(e,t){var n,o,s=this.opt("eventLimit");this.scroller.clear(),r(this.headRowEl),this.dayGrid.removeSegPopover(),s&&"number"==typeof s&&this.dayGrid.limitRows(s),n=this.computeScrollerHeight(e),this.setGridHeight(n,t),s&&"number"!=typeof s&&this.dayGrid.limitRows(s),t||(this.scroller.setHeight(n),o=this.scroller.getScrollbarWidths(),(o.left||o.right)&&(i(this.headRowEl,o),n=this.computeScrollerHeight(e),this.scroller.setHeight(n)),this.scroller.lockOverflow(o))},computeScrollerHeight:function(e){return e-u(this.el,this.scroller.el)},setGridHeight:function(e,t){t?l(this.dayGrid.rowEls):a(this.dayGrid.rowEls,e,!0)},computeInitialScroll:function(){return{top:0}},queryScroll:function(){return{top:this.scroller.getScrollTop()}},setScroll:function(e){this.scroller.setScrollTop(e.top)},hitsNeeded:function(){this.dayGrid.hitsNeeded()},hitsNotNeeded:function(){this.dayGrid.hitsNotNeeded()},prepareHits:function(){this.dayGrid.prepareHits()},releaseHits:function(){this.dayGrid.releaseHits()},queryHit:function(e,t){return this.dayGrid.queryHit(e,t)},getHitSpan:function(e){return this.dayGrid.getHitSpan(e)},getHitEl:function(e){return this.dayGrid.getHitEl(e)},renderEvents:function(e){this.dayGrid.renderEvents(e),this.updateHeight()},getEventSegs:function(){return this.dayGrid.getEventSegs()},unrenderEvents:function(){this.dayGrid.unrenderEvents()},renderDrag:function(e,t){return this.dayGrid.renderDrag(e,t)},unrenderDrag:function(){this.dayGrid.unrenderDrag()},renderSelection:function(e){this.dayGrid.renderSelection(e)},unrenderSelection:function(){this.dayGrid.unrenderSelection()}}),kt={renderHeadIntroHtml:function(){var e=this.view;return e.colWeekNumbersVisible?'"+ee(e.opt("weekNumberTitle"))+"":""},renderNumberIntroHtml:function(e){var t=this.view,n=this.getCellDate(e,0);return t.colWeekNumbersVisible?'"+t.buildGotoAnchorHtml({date:n,type:"week",forceOff:1===this.colCnt},n.format("w"))+"":""},renderBgIntroHtml:function(){var e=this.view;return e.colWeekNumbersVisible?'":""},renderIntroHtml:function(){var e=this.view;return e.colWeekNumbersVisible?'":""}},St=Fe.MonthView=xt.extend({computeRange:function(e){var t,n=xt.prototype.computeRange.call(this,e);return this.isFixedWeeks()&&(t=Math.ceil(n.end.diff(n.start,"weeks",!0)),n.end.add(6-t,"weeks")),n},setGridHeight:function(e,t){t&&(e*=this.rowCnt/6),a(this.dayGrid.rowEls,e,!t)},isFixedWeeks:function(){return this.opt("fixedWeekCount")}});Pe.basic={class:xt},Pe.basicDay={type:"basic",duration:{days:1}},Pe.basicWeek={type:"basic",duration:{weeks:1}},Pe.month={class:St,duration:{months:1},defaults:{fixedWeekCount:!0}};var Ct=Fe.AgendaView=dt.extend({scroller:null,timeGridClass:ut,timeGrid:null,dayGridClass:ct,dayGrid:null,axisWidth:null,headContainerEl:null,noScrollRowEls:null,bottomRuleEl:null,initialize:function(){this.timeGrid=this.instantiateTimeGrid(),this.opt("allDaySlot")&&(this.dayGrid=this.instantiateDayGrid()),this.scroller=new ht({overflowX:"hidden",overflowY:"auto"})},instantiateTimeGrid:function(){var e=this.timeGridClass.extend(Tt);return new e(this)},instantiateDayGrid:function(){var e=this.dayGridClass.extend(Et);return new e(this)},setRange:function(e){dt.prototype.setRange.call(this,e),this.timeGrid.setRange(e),this.dayGrid&&this.dayGrid.setRange(e)},renderDates:function(){this.el.addClass("fc-agenda-view").html(this.renderSkeletonHtml()),this.renderHead(),this.scroller.render();var t=this.scroller.el.addClass("fc-time-grid-container"),n=e('
    ').appendTo(t);this.el.find(".fc-body > tr > td").append(t),this.timeGrid.setElement(n),this.timeGrid.renderDates(),this.bottomRuleEl=e('
    ').appendTo(this.timeGrid.el),this.dayGrid&&(this.dayGrid.setElement(this.el.find(".fc-day-grid")),this.dayGrid.renderDates(),this.dayGrid.bottomCoordPadding=this.dayGrid.el.next("hr").outerHeight()),this.noScrollRowEls=this.el.find(".fc-row:not(.fc-scroller *)")},renderHead:function(){this.headContainerEl=this.el.find(".fc-head-container").html(this.timeGrid.renderHeadHtml())},unrenderDates:function(){this.timeGrid.unrenderDates(),this.timeGrid.removeElement(),this.dayGrid&&(this.dayGrid.unrenderDates(),this.dayGrid.removeElement()),this.scroller.destroy()},renderSkeletonHtml:function(){return'
    '+(this.dayGrid?'

    ':"")+"
    "},axisStyleAttr:function(){return null!==this.axisWidth?'style="width:'+this.axisWidth+'px"':""},renderBusinessHours:function(){this.timeGrid.renderBusinessHours(),this.dayGrid&&this.dayGrid.renderBusinessHours()},unrenderBusinessHours:function(){this.timeGrid.unrenderBusinessHours(),this.dayGrid&&this.dayGrid.unrenderBusinessHours()},getNowIndicatorUnit:function(){return this.timeGrid.getNowIndicatorUnit()},renderNowIndicator:function(e){this.timeGrid.renderNowIndicator(e)},unrenderNowIndicator:function(){this.timeGrid.unrenderNowIndicator()},updateSize:function(e){this.timeGrid.updateSize(e),dt.prototype.updateSize.call(this,e)},updateWidth:function(){this.axisWidth=c(this.el.find(".fc-axis"))},setHeight:function(e,t){var n,o,s;this.bottomRuleEl.hide(),this.scroller.clear(),r(this.noScrollRowEls),this.dayGrid&&(this.dayGrid.removeSegPopover(),n=this.opt("eventLimit"),n&&"number"!=typeof n&&(n=_t),n&&this.dayGrid.limitRows(n)),t||(o=this.computeScrollerHeight(e),this.scroller.setHeight(o),s=this.scroller.getScrollbarWidths(),(s.left||s.right)&&(i(this.noScrollRowEls,s),o=this.computeScrollerHeight(e),this.scroller.setHeight(o)),this.scroller.lockOverflow(s),this.timeGrid.getTotalSlatHeight()"+t.buildGotoAnchorHtml({date:this.start,type:"week",forceOff:this.colCnt>1},ee(e))+""):'"},renderBgIntroHtml:function(){var e=this.view;return'"},renderIntroHtml:function(){var e=this.view;return'"}},Et={renderBgIntroHtml:function(){var e=this.view;return'"+e.getAllDayHtml()+""},renderIntroHtml:function(){var e=this.view;return'"}},_t=5,Lt=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}];Pe.agenda={class:Ct,defaults:{allDaySlot:!0,slotDuration:"00:30:00",minTime:"00:00:00",maxTime:"24:00:00",slotEventOverlap:!0}},Pe.agendaDay={type:"agenda",duration:{days:1}},Pe.agendaWeek={type:"agenda",duration:{weeks:1}};var Dt=dt.extend({grid:null,scroller:null,initialize:function(){this.grid=new Mt(this),this.scroller=new ht({overflowX:"hidden",overflowY:"auto"})},setRange:function(e){dt.prototype.setRange.call(this,e),this.grid.setRange(e)},renderSkeleton:function(){this.el.addClass("fc-list-view "+this.widgetContentClass),this.scroller.render(),this.scroller.el.appendTo(this.el),this.grid.setElement(this.scroller.scrollEl)},unrenderSkeleton:function(){this.scroller.destroy()},setHeight:function(e,t){this.scroller.setHeight(this.computeScrollerHeight(e))},computeScrollerHeight:function(e){return e-u(this.el,this.scroller.el)},renderEvents:function(e){this.grid.renderEvents(e)},unrenderEvents:function(){this.grid.unrenderEvents()},isEventResizable:function(e){return!1},isEventDraggable:function(e){return!1}}),Mt=at.extend({segSelector:".fc-list-item",hasDayInteractions:!1,spanToSegs:function(e){for(var t,n=this.view,i=n.start.clone().time(0),r=0,o=[];i
    '+ee(this.view.opt("noEventsMessage"))+"
    ")},renderSegList:function(t){var n,i,r,o=this.groupSegsByDay(t),s=e('
    '),a=s.find("tbody");for(n=0;n'+(n?t.buildGotoAnchorHtml(e,{class:"fc-list-heading-main"},ee(e.format(n))):"")+(i?t.buildGotoAnchorHtml(e,{class:"fc-list-heading-alt"},ee(e.format(i))):"")+""},fgSegHtml:function(e){var t,n=this.view,i=["fc-list-item"].concat(this.getSegCustomClasses(e)),r=this.getSegBackgroundColor(e),o=e.event,s=o.url;return t=o.allDay?n.getAllDayHtml():n.isMultiDayEvent(o)?e.isStart||e.isEnd?ee(this.getEventTimeText(e)):n.getAllDayHtml():ee(this.getEventTimeText(o)),s&&i.push("fc-has-url"),''+(this.displayEventTime?''+(t||"")+"":"")+'"+ee(e.event.title||"")+""}});return Pe.list={class:Dt,buttonTextKey:"list",defaults:{buttonText:"list",listDayFormat:"LL",noEventsMessage:"No events to display"}},Pe.listDay={type:"list",duration:{days:1},defaults:{listDayFormat:"dddd"}},Pe.listWeek={type:"list",duration:{weeks:1},defaults:{listDayFormat:"dddd",listDayAltFormat:"LL"}},Pe.listMonth={type:"list",duration:{month:1},defaults:{listDayAltFormat:"dddd"}},Pe.listYear={type:"list",duration:{year:1},defaults:{listDayAltFormat:"dddd"}},Fe}),define("fullcalendar",["fullcalendar/dist/fullcalendar.min"],function(e){return e}),define("text!fullcalendar/dist/fullcalendar.min.css",["module"],function(e){e.exports='/*!\n * FullCalendar v3.2.0 Stylesheet\n * Docs & License: https://fullcalendar.io/\n * (c) 2017 Adam Shaw\n */.fc-icon,body .fc{font-size:1em}.fc-button-group,.fc-icon{display:inline-block}.fc-bg,.fc-row .fc-bgevent-skeleton,.fc-row .fc-highlight-skeleton{bottom:0}.fc-icon,.fc-unselectable{-khtml-user-select:none;-webkit-touch-callout:none}.fc{direction:ltr;text-align:left}.fc-rtl{text-align:right}.fc th,.fc-basic-view td.fc-week-number,.fc-icon,.fc-toolbar{text-align:center}.fc-unthemed .fc-content,.fc-unthemed .fc-divider,.fc-unthemed .fc-list-heading td,.fc-unthemed .fc-list-view,.fc-unthemed .fc-popover,.fc-unthemed .fc-row,.fc-unthemed tbody,.fc-unthemed td,.fc-unthemed th,.fc-unthemed thead{border-color:#ddd}.fc-unthemed .fc-popover{background-color:#fff}.fc-unthemed .fc-divider,.fc-unthemed .fc-list-heading td,.fc-unthemed .fc-popover .fc-header{background:#eee}.fc-unthemed .fc-popover .fc-header .fc-close{color:#666}.fc-unthemed td.fc-today{background:#fcf8e3}.fc-highlight{background:#bce8f1;opacity:.3}.fc-bgevent{background:#8fdf82;opacity:.3}.fc-nonbusiness{background:#d7d7d7}.fc-icon{height:1em;line-height:1em;overflow:hidden;font-family:"Courier New",Courier,monospace;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fc-icon:after{position:relative}.fc-icon-left-single-arrow:after{content:"\\02039";font-weight:700;font-size:200%;top:-7%}.fc-icon-right-single-arrow:after{content:"\\0203A";font-weight:700;font-size:200%;top:-7%}.fc-icon-left-double-arrow:after{content:"\\000AB";font-size:160%;top:-7%}.fc-icon-right-double-arrow:after{content:"\\000BB";font-size:160%;top:-7%}.fc-icon-left-triangle:after{content:"\\25C4";font-size:125%;top:3%}.fc-icon-right-triangle:after{content:"\\25BA";font-size:125%;top:3%}.fc-icon-down-triangle:after{content:"\\25BC";font-size:125%;top:2%}.fc-icon-x:after{content:"\\000D7";font-size:200%;top:6%}.fc button{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;height:2.1em;padding:0 .6em;font-size:1em;white-space:nowrap;cursor:pointer}.fc button::-moz-focus-inner{margin:0;padding:0}.fc-state-default{border:1px solid;background-color:#f5f5f5;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);color:#333;text-shadow:0 1px 1px rgba(255,255,255,.75);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05)}.fc-state-default.fc-corner-left{border-top-left-radius:4px;border-bottom-left-radius:4px}.fc-state-default.fc-corner-right{border-top-right-radius:4px;border-bottom-right-radius:4px}.fc button .fc-icon{position:relative;top:-.05em;margin:0 .2em;vertical-align:middle}.fc-state-active,.fc-state-disabled,.fc-state-down,.fc-state-hover{color:#333;background-color:#e6e6e6}.fc-state-hover{color:#333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.fc-state-active,.fc-state-down{background-color:#ccc;background-image:none;box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}.fc-state-disabled{cursor:default;background-image:none;opacity:.65;box-shadow:none}.fc-event.fc-draggable,.fc-event[href],.fc-popover .fc-header .fc-close,a[data-goto]{cursor:pointer}.fc .fc-button-group>*{float:left;margin:0 0 0 -1px}.fc .fc-button-group>:first-child{margin-left:0}.fc-popover{position:absolute;box-shadow:0 2px 6px rgba(0,0,0,.15)}.fc-popover .fc-header{padding:2px 4px}.fc-popover .fc-header .fc-title{margin:0 2px}.fc-ltr .fc-popover .fc-header .fc-title,.fc-rtl .fc-popover .fc-header .fc-close{float:left}.fc-ltr .fc-popover .fc-header .fc-close,.fc-rtl .fc-popover .fc-header .fc-title{float:right}.fc-unthemed .fc-popover{border-width:1px;border-style:solid}.fc-unthemed .fc-popover .fc-header .fc-close{font-size:.9em;margin-top:2px}.fc-popover>.ui-widget-header+.ui-widget-content{border-top:0}.fc-divider{border-style:solid;border-width:1px}hr.fc-divider{height:0;margin:0;padding:0 0 2px;border-width:1px 0}.fc-bg table,.fc-row .fc-bgevent-skeleton table,.fc-row .fc-highlight-skeleton table{height:100%}.fc-clear{clear:both}.fc-bg,.fc-bgevent-skeleton,.fc-helper-skeleton,.fc-highlight-skeleton{position:absolute;top:0;left:0;right:0}.fc table{width:100%;box-sizing:border-box;table-layout:fixed;border-collapse:collapse;border-spacing:0;font-size:1em}.fc td,.fc th{border-style:solid;border-width:1px;padding:0;vertical-align:top}.fc td.fc-today{border-style:double}a[data-goto]:hover{text-decoration:underline}.fc .fc-row{border-style:solid;border-width:0}.fc-row table{border-left:0 hidden transparent;border-right:0 hidden transparent;border-bottom:0 hidden transparent}.fc-row:first-child table{border-top:0 hidden transparent}.fc-row{position:relative}.fc-row .fc-bg{z-index:1}.fc-row .fc-bgevent-skeleton td,.fc-row .fc-highlight-skeleton td{border-color:transparent}.fc-row .fc-bgevent-skeleton{z-index:2}.fc-row .fc-highlight-skeleton{z-index:3}.fc-row .fc-content-skeleton{position:relative;z-index:4;padding-bottom:2px}.fc-row .fc-helper-skeleton{z-index:5}.fc-row .fc-content-skeleton td,.fc-row .fc-helper-skeleton td{background:0 0;border-color:transparent;border-bottom:0}.fc-row .fc-content-skeleton tbody td,.fc-row .fc-helper-skeleton tbody td{border-top:0}.fc-scroller{-webkit-overflow-scrolling:touch}.fc-row.fc-rigid,.fc-time-grid-event{overflow:hidden}.fc-scroller>.fc-day-grid,.fc-scroller>.fc-time-grid{position:relative;width:100%}.fc-event{position:relative;display:block;font-size:.85em;line-height:1.3;border-radius:3px;border:1px solid #3a87ad;font-weight:400}.fc-event,.fc-event-dot{background-color:#3a87ad}.fc-event,.fc-event:hover,.ui-widget .fc-event{color:#fff;text-decoration:none}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc-event .fc-bg{z-index:1;background:#fff;opacity:.25}.fc-event .fc-content{position:relative;z-index:2}.fc-event .fc-resizer{position:absolute;z-index:4;display:none}.fc-event.fc-allow-mouse-resize .fc-resizer,.fc-event.fc-selected .fc-resizer{display:block}.fc-event.fc-selected .fc-resizer:before{content:"";position:absolute;z-index:9999;top:50%;left:50%;width:40px;height:40px;margin-left:-20px;margin-top:-20px}.fc-event.fc-selected{z-index:9999!important;box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event.fc-selected.fc-dragging{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-h-event.fc-selected:before{content:"";position:absolute;z-index:3;top:-10px;bottom:-10px;left:0;right:0}.fc-ltr .fc-h-event.fc-not-start,.fc-rtl .fc-h-event.fc-not-end{margin-left:0;border-left-width:0;padding-left:1px;border-top-left-radius:0;border-bottom-left-radius:0}.fc-ltr .fc-h-event.fc-not-end,.fc-rtl .fc-h-event.fc-not-start{margin-right:0;border-right-width:0;padding-right:1px;border-top-right-radius:0;border-bottom-right-radius:0}.fc-ltr .fc-h-event .fc-start-resizer,.fc-rtl .fc-h-event .fc-end-resizer{cursor:w-resize;left:-1px}.fc-ltr .fc-h-event .fc-end-resizer,.fc-rtl .fc-h-event .fc-start-resizer{cursor:e-resize;right:-1px}.fc-h-event.fc-allow-mouse-resize .fc-resizer{width:7px;top:-1px;bottom:-1px}.fc-h-event.fc-selected .fc-resizer{border-radius:4px;border-width:1px;width:6px;height:6px;border-style:solid;border-color:inherit;background:#fff;top:50%;margin-top:-4px}.fc-ltr .fc-h-event.fc-selected .fc-start-resizer,.fc-rtl .fc-h-event.fc-selected .fc-end-resizer{margin-left:-4px}.fc-ltr .fc-h-event.fc-selected .fc-end-resizer,.fc-rtl .fc-h-event.fc-selected .fc-start-resizer{margin-right:-4px}.fc-day-grid-event{margin:1px 2px 0;padding:0 1px}tr:first-child>td>.fc-day-grid-event{margin-top:2px}.fc-day-grid-event.fc-selected:after{content:"";position:absolute;z-index:1;top:-1px;right:-1px;bottom:-1px;left:-1px;background:#000;opacity:.25}.fc-day-grid-event .fc-content{white-space:nowrap;overflow:hidden}.fc-day-grid-event .fc-time{font-weight:700}.fc-ltr .fc-day-grid-event.fc-allow-mouse-resize .fc-start-resizer,.fc-rtl .fc-day-grid-event.fc-allow-mouse-resize .fc-end-resizer{margin-left:-2px}.fc-ltr .fc-day-grid-event.fc-allow-mouse-resize .fc-end-resizer,.fc-rtl .fc-day-grid-event.fc-allow-mouse-resize .fc-start-resizer{margin-right:-2px}a.fc-more{margin:1px 3px;font-size:.85em;cursor:pointer;text-decoration:none}a.fc-more:hover{text-decoration:underline}.fc-limited{display:none}.fc-day-grid .fc-row{z-index:1}.fc-more-popover{z-index:2;width:220px}.fc-more-popover .fc-event-container{padding:10px}.fc-now-indicator{position:absolute;border:0 solid red}.fc-unselectable{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.fc-toolbar.fc-header-toolbar{margin-bottom:1em}.fc-toolbar.fc-footer-toolbar{margin-top:1em}.fc-toolbar .fc-left{float:left}.fc-toolbar .fc-right{float:right}.fc-toolbar .fc-center{display:inline-block}.fc .fc-toolbar>*>*{float:left;margin-left:.75em}.fc .fc-toolbar>*>:first-child{margin-left:0}.fc-toolbar h2{margin:0}.fc-toolbar button{position:relative}.fc-toolbar .fc-state-hover,.fc-toolbar .ui-state-hover{z-index:2}.fc-toolbar .fc-state-down{z-index:3}.fc-toolbar .fc-state-active,.fc-toolbar .ui-state-active{z-index:4}.fc-toolbar button:focus{z-index:5}.fc-view-container *,.fc-view-container :after,.fc-view-container :before{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.fc-view,.fc-view>table{position:relative;z-index:1}.fc-basicDay-view .fc-content-skeleton,.fc-basicWeek-view .fc-content-skeleton{padding-bottom:1em}.fc-basic-view .fc-body .fc-row{min-height:4em}.fc-row.fc-rigid .fc-content-skeleton{position:absolute;top:0;left:0;right:0}.fc-day-top.fc-other-month{opacity:.3}.fc-basic-view .fc-day-number,.fc-basic-view .fc-week-number{padding:2px}.fc-basic-view th.fc-day-number,.fc-basic-view th.fc-week-number{padding:0 2px}.fc-ltr .fc-basic-view .fc-day-top .fc-day-number{float:right}.fc-rtl .fc-basic-view .fc-day-top .fc-day-number{float:left}.fc-ltr .fc-basic-view .fc-day-top .fc-week-number{float:left;border-radius:0 0 3px}.fc-rtl .fc-basic-view .fc-day-top .fc-week-number{float:right;border-radius:0 0 0 3px}.fc-basic-view .fc-day-top .fc-week-number{min-width:1.5em;text-align:center;background-color:#f2f2f2;color:grey}.fc-basic-view td.fc-week-number>*{display:inline-block;min-width:1.25em}.fc-agenda-view .fc-day-grid{position:relative;z-index:2}.fc-agenda-view .fc-day-grid .fc-row{min-height:3em}.fc-agenda-view .fc-day-grid .fc-row .fc-content-skeleton{padding-bottom:1em}.fc .fc-axis{vertical-align:middle;padding:0 4px;white-space:nowrap}.fc-ltr .fc-axis{text-align:right}.fc-rtl .fc-axis{text-align:left}.ui-widget td.fc-axis{font-weight:400}.fc-time-grid,.fc-time-grid-container{position:relative;z-index:1}.fc-time-grid{min-height:100%}.fc-time-grid table{border:0 hidden transparent}.fc-time-grid>.fc-bg{z-index:1}.fc-time-grid .fc-slats,.fc-time-grid>hr{position:relative;z-index:2}.fc-time-grid .fc-content-col{position:relative}.fc-time-grid .fc-content-skeleton{position:absolute;z-index:3;top:0;left:0;right:0}.fc-time-grid .fc-business-container{position:relative;z-index:1}.fc-time-grid .fc-bgevent-container{position:relative;z-index:2}.fc-time-grid .fc-highlight-container{z-index:3;position:relative}.fc-time-grid .fc-event-container{position:relative;z-index:4}.fc-time-grid .fc-now-indicator-line{z-index:5}.fc-time-grid .fc-helper-container{position:relative;z-index:6}.fc-time-grid .fc-slats td{height:1.5em;border-bottom:0}.fc-time-grid .fc-slats .fc-minor td{border-top-style:dotted}.fc-time-grid .fc-slats .ui-widget-content{background:0 0}.fc-time-grid .fc-highlight{position:absolute;left:0;right:0}.fc-ltr .fc-time-grid .fc-event-container{margin:0 2.5% 0 2px}.fc-rtl .fc-time-grid .fc-event-container{margin:0 2px 0 2.5%}.fc-time-grid .fc-bgevent,.fc-time-grid .fc-event{position:absolute;z-index:1}.fc-time-grid .fc-bgevent{left:0;right:0}.fc-v-event.fc-not-start{border-top-width:0;padding-top:1px;border-top-left-radius:0;border-top-right-radius:0}.fc-v-event.fc-not-end{border-bottom-width:0;padding-bottom:1px;border-bottom-left-radius:0;border-bottom-right-radius:0}.fc-time-grid-event.fc-selected{overflow:visible}.fc-time-grid-event.fc-selected .fc-bg{display:none}.fc-time-grid-event .fc-content{overflow:hidden}.fc-time-grid-event .fc-time,.fc-time-grid-event .fc-title{padding:0 1px}.fc-time-grid-event .fc-time{font-size:.85em;white-space:nowrap}.fc-time-grid-event.fc-short .fc-content{white-space:nowrap}.fc-time-grid-event.fc-short .fc-time,.fc-time-grid-event.fc-short .fc-title{display:inline-block;vertical-align:top}.fc-time-grid-event.fc-short .fc-time span{display:none}.fc-time-grid-event.fc-short .fc-time:before{content:attr(data-start)}.fc-time-grid-event.fc-short .fc-time:after{content:"\\000A0-\\000A0"}.fc-time-grid-event.fc-short .fc-title{font-size:.85em;padding:0}.fc-time-grid-event.fc-allow-mouse-resize .fc-resizer{left:0;right:0;bottom:0;height:8px;overflow:hidden;line-height:8px;font-size:11px;font-family:monospace;text-align:center;cursor:s-resize}.fc-time-grid-event.fc-allow-mouse-resize .fc-resizer:after{content:"="}.fc-time-grid-event.fc-selected .fc-resizer{border-radius:5px;border-width:1px;width:8px;height:8px;border-style:solid;border-color:inherit;background:#fff;left:50%;margin-left:-5px;bottom:-5px}.fc-time-grid .fc-now-indicator-line{border-top-width:1px;left:0;right:0}.fc-time-grid .fc-now-indicator-arrow{margin-top:-5px}.fc-ltr .fc-time-grid .fc-now-indicator-arrow{left:0;border-width:5px 0 5px 6px;border-top-color:transparent;border-bottom-color:transparent}.fc-rtl .fc-time-grid .fc-now-indicator-arrow{right:0;border-width:5px 6px 5px 0;border-top-color:transparent;border-bottom-color:transparent}.fc-event-dot{display:inline-block;width:10px;height:10px;border-radius:5px}.fc-rtl .fc-list-view{direction:rtl}.fc-list-view{border-width:1px;border-style:solid}.fc .fc-list-table{table-layout:auto}.fc-list-table td{border-width:1px 0 0;padding:8px 14px}.fc-list-table tr:first-child td{border-top-width:0}.fc-list-heading{border-bottom-width:1px}.fc-list-heading td{font-weight:700}.fc-ltr .fc-list-heading-main{float:left}.fc-ltr .fc-list-heading-alt,.fc-rtl .fc-list-heading-main{float:right}.fc-rtl .fc-list-heading-alt{float:left}.fc-list-item.fc-has-url{cursor:pointer}.fc-list-item:hover td{background-color:#f5f5f5}.fc-list-item-marker,.fc-list-item-time{white-space:nowrap;width:1px}.fc-ltr .fc-list-item-marker{padding-right:0}.fc-rtl .fc-list-item-marker{padding-left:0}.fc-list-item-title a{text-decoration:none;color:inherit}.fc-list-item-title a[href]:hover{text-decoration:underline}.fc-list-empty-wrap2{position:absolute;top:0;left:0;right:0;bottom:0}.fc-list-empty-wrap1{width:100%;height:100%;display:table}.fc-list-empty{display:table-cell;vertical-align:middle;text-align:center}.fc-unthemed .fc-list-empty{background-color:#eee}'; -}),!function(e){"function"==typeof define&&define.amd?define("fullcalendar/dist/locale/zh-cn",["jquery","moment"],e):"object"==typeof exports?module.exports=e(require("jquery"),require("moment")):e(jQuery,moment)}(function(e,t){!function(){var e=t.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"Ah点mm分",LTS:"Ah点m分s秒",L:"YYYY-MM-DD",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日Ah点mm分",LLLL:"YYYY年MMMD日ddddAh点mm分",l:"YYYY-MM-DD",ll:"YYYY年MMMD日",lll:"YYYY年MMMD日Ah点mm分",llll:"YYYY年MMMD日ddddAh点mm分"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"下午"===t||"晚上"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,n){var i=100*e+t;return i<600?"凌晨":i<900?"早上":i<1130?"上午":i<1230?"中午":i<1800?"下午":"晚上"},calendar:{sameDay:function(){return 0===this.minutes()?"[今天]Ah[点整]":"[今天]LT"},nextDay:function(){return 0===this.minutes()?"[明天]Ah[点整]":"[明天]LT"},lastDay:function(){return 0===this.minutes()?"[昨天]Ah[点整]":"[昨天]LT"},nextWeek:function(){var e,n;return e=t().startOf("week"),n=this.diff(e,"days")>=7?"[下]":"[本]",0===this.minutes()?n+"dddAh点整":n+"dddAh点mm"},lastWeek:function(){var e,n;return e=t().startOf("week"),n=this.unix()/g,">").replace(/"/g,""").replace(/'/g,"'")}function o(e){return e.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/g,function(e,t){return t=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}function s(e,t){return e=e.source,t=t||"",function n(i,r){return i?(r=r.source||r,r=r.replace(/(^|[^\[])\^/g,"$1"),e=e.replace(i,r),n):new RegExp(e,t)}}function a(){}function l(e){for(var t,n,i=1;iAn error occured:

    "+r(e.message+"",!0)+"
    ";throw e}}var u={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:a,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:a,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:a,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};u.bullet=/(?:[*+-]|\d+\.)/,u.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,u.item=s(u.item,"gm")(/bull/g,u.bullet)(),u.list=s(u.list)(/bull/g,u.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+u.def.source+")")(),u.blockquote=s(u.blockquote)("def",u.def)(),u._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",u.html=s(u.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,u._tag)(),u.paragraph=s(u.paragraph)("hr",u.hr)("heading",u.heading)("lheading",u.lheading)("blockquote",u.blockquote)("tag","<"+u._tag)("def",u.def)(),u.normal=l({},u),u.gfm=l({},u.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),u.gfm.paragraph=s(u.paragraph)("(?!","(?!"+u.gfm.fences.source.replace("\\1","\\2")+"|"+u.list.source.replace("\\1","\\3")+"|")(),u.tables=l({},u.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),e.rules=u,e.lex=function(t,n){var i=new e(n);return i.lex(t)},e.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},e.prototype.token=function(e,t,n){for(var i,r,o,s,a,l,c,d,h,e=e.replace(/^ +$/gm,"");e;)if((o=this.rules.newline.exec(e))&&(e=e.substring(o[0].length),o[0].length>1&&this.tokens.push({type:"space"})),o=this.rules.code.exec(e))e=e.substring(o[0].length),o=o[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?o:o.replace(/\n+$/,"")});else if(o=this.rules.fences.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"code",lang:o[2],text:o[3]||""});else if(o=this.rules.heading.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"heading",depth:o[1].length,text:o[2]});else if(t&&(o=this.rules.nptable.exec(e))){for(e=e.substring(o[0].length),l={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/\n$/,"").split("\n")},d=0;d ?/gm,""),this.token(o,t,!0),this.tokens.push({type:"blockquote_end"});else if(o=this.rules.list.exec(e)){for(e=e.substring(o[0].length),s=o[2],this.tokens.push({type:"list_start",ordered:s.length>1}),o=o[0].match(this.rules.item),i=!1,h=o.length,d=0;d1&&a.length>1||(e=o.slice(d+1).join("\n")+e,d=h-1)),r=i||/\n\n(?!\s*$)/.test(l),d!==h-1&&(i="\n"===l.charAt(l.length-1),r||(r=i)),this.tokens.push({type:r?"loose_item_start":"list_item_start"}),this.token(l,!1,n),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(o=this.rules.html.exec(e))e=e.substring(o[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===o[1]||"script"===o[1]||"style"===o[1]),text:o[0]});else if(!n&&t&&(o=this.rules.def.exec(e)))e=e.substring(o[0].length),this.tokens.links[o[1].toLowerCase()]={href:o[2],title:o[3]};else if(t&&(o=this.rules.table.exec(e))){for(e=e.substring(o[0].length),l={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/(?: *\| *)?\n$/,"").split("\n")},d=0;d])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:a,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:a,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/,d.link=s(d.link)("inside",d._inside)("href",d._href)(),d.reflink=s(d.reflink)("inside",d._inside)(),d.normal=l({},d),d.pedantic=l({},d.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),d.gfm=l({},d.normal,{escape:s(d.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:s(d.text)("]|","~]|")("|","|https?://|")()}),d.breaks=l({},d.gfm,{br:s(d.br)("{2,}","*")(),text:s(d.gfm.text)("{2,}","*")()}),t.rules=d,t.output=function(e,n,i){var r=new t(n,i);return r.output(e)},t.prototype.output=function(e){for(var t,n,i,o,s="";e;)if(o=this.rules.escape.exec(e))e=e.substring(o[0].length),s+=o[1];else if(o=this.rules.autolink.exec(e))e=e.substring(o[0].length),"@"===o[2]?(n=":"===o[1].charAt(6)?this.mangle(o[1].substring(7)):this.mangle(o[1]),i=this.mangle("mailto:")+n):(n=r(o[1]),i=n),s+=this.renderer.link(i,null,n);else if(this.inLink||!(o=this.rules.url.exec(e))){if(o=this.rules.tag.exec(e))!this.inLink&&/^/i.test(o[0])&&(this.inLink=!1),e=e.substring(o[0].length),s+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(o[0]):r(o[0]):o[0];else if(o=this.rules.link.exec(e))e=e.substring(o[0].length),this.inLink=!0,s+=this.outputLink(o,{href:o[2],title:o[3]}),this.inLink=!1;else if((o=this.rules.reflink.exec(e))||(o=this.rules.nolink.exec(e))){if(e=e.substring(o[0].length),t=(o[2]||o[1]).replace(/\s+/g," "),t=this.links[t.toLowerCase()],!t||!t.href){s+=o[0].charAt(0),e=o[0].substring(1)+e;continue}this.inLink=!0,s+=this.outputLink(o,t),this.inLink=!1}else if(o=this.rules.strong.exec(e))e=e.substring(o[0].length),s+=this.renderer.strong(this.output(o[2]||o[1]));else if(o=this.rules.em.exec(e))e=e.substring(o[0].length),s+=this.renderer.em(this.output(o[2]||o[1]));else if(o=this.rules.code.exec(e))e=e.substring(o[0].length),s+=this.renderer.codespan(r(o[2],!0));else if(o=this.rules.br.exec(e))e=e.substring(o[0].length),s+=this.renderer.br();else if(o=this.rules.del.exec(e))e=e.substring(o[0].length),s+=this.renderer.del(this.output(o[1]));else if(o=this.rules.text.exec(e))e=e.substring(o[0].length),s+=this.renderer.text(r(this.smartypants(o[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else e=e.substring(o[0].length),n=r(o[1]),i=n,s+=this.renderer.link(i,null,n);return s},t.prototype.outputLink=function(e,t){var n=r(t.href),i=t.title?r(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,i,this.output(e[1])):this.renderer.image(n,i,r(e[1]))},t.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014\/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014\/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},t.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",i=e.length,r=0;r.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},n.prototype.code=function(e,t,n){if(this.options.highlight){var i=this.options.highlight(e,t);null!=i&&i!==e&&(n=!0,e=i)}return t?'
    '+(n?e:r(e,!0))+"\n
    \n":"
    "+(n?e:r(e,!0))+"\n
    "},n.prototype.blockquote=function(e){return"
    \n"+e+"
    \n"},n.prototype.html=function(e){return e},n.prototype.heading=function(e,t,n){return"'+e+"\n"},n.prototype.hr=function(){return this.options.xhtml?"
    \n":"
    \n"},n.prototype.list=function(e,t){var n=t?"ol":"ul";return"<"+n+">\n"+e+"\n"},n.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},n.prototype.paragraph=function(e){return"

    "+e+"

    \n"},n.prototype.table=function(e,t){return"\n\n"+e+"\n\n"+t+"\n
    \n"},n.prototype.tablerow=function(e){return"\n"+e+"\n"},n.prototype.tablecell=function(e,t){var n=t.header?"th":"td",i=t.align?"<"+n+' style="text-align:'+t.align+'">':"<"+n+">";return i+e+"\n"},n.prototype.strong=function(e){return""+e+""},n.prototype.em=function(e){return""+e+""},n.prototype.codespan=function(e){return""+e+""},n.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},n.prototype.del=function(e){return""+e+""},n.prototype.link=function(e,t,n){if(this.options.sanitize){try{var i=decodeURIComponent(o(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(0===i.indexOf("javascript:")||0===i.indexOf("vbscript:"))return""}var r='
    "},n.prototype.image=function(e,t,n){var i=''+n+'":">"},n.prototype.text=function(e){return e},i.parse=function(e,t,n){var r=new i(t,n);return r.parse(e)},i.prototype.parse=function(e){this.inline=new t(e.links,this.options,this.renderer),this.tokens=e.reverse();for(var n="";this.next();)n+=this.tok();return n},i.prototype.next=function(){return this.token=this.tokens.pop()},i.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},i.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},i.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,i,r,o="",s="";for(n="",e=0;e-1)},add:function(t){e.push(t)},delete:function(t){e.splice(e.indexOf(t),1)}}}(),s=function(e){return new Event(e)};try{new Event("test")}catch(e){s=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}var a=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?(a=function(e){return e},a.destroy=function(e){return e},a.update=function(e){return e}):(a=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],function(e){return n(e,t)}),e},a.destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],i),e},a.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],r),e}),t.exports=a}),function(e,t){"undefined"!=typeof module?module.exports=t():"function"==typeof define&&"object"==typeof define.amd?define("clipboard-js",t):this[e]=t()}("clipboard",function(){if("undefined"==typeof document||!document.addEventListener)return null;var e={};return e.copy=function(){function e(){n=!1,i=null,r&&window.getSelection().removeAllRanges(),r=!1}function t(){var e=document.getSelection();if(!document.queryCommandEnabled("copy")&&e.isCollapsed){var t=document.createRange();t.selectNodeContents(document.body),e.addRange(t),r=!0}}var n=!1,i=null,r=!1;return document.addEventListener("copy",function(e){if(n){for(var t in i)e.clipboardData.setData(t,i[t]);e.preventDefault()}}),function(r){return new Promise(function(o,s){n=!0,i="string"==typeof r?{"text/plain":r}:r instanceof Node?{"text/html":(new XMLSerializer).serializeToString(r)}:r;try{if(t(),!document.execCommand("copy"))throw new Error("Unable to copy. Perhaps it's not available in your browser?");e(),o()}catch(t){e(),s(t)}})}}(),e.paste=function(){var e,t,n=!1;return document.addEventListener("paste",function(i){if(n){n=!1,i.preventDefault();var r=e;e=null,r(i.clipboardData.getData(t))}}),function(i){return new Promise(function(r,o){n=!0,e=r,t=i||"text/plain";try{document.execCommand("paste")||(n=!1,o(new Error("Unable to paste. Pasting only works in Internet Explorer at the moment.")))}catch(e){n=!1,o(new Error(e))}})}}(),"undefined"==typeof ClipboardEvent&&"undefined"!=typeof window.clipboardData&&"undefined"!=typeof window.clipboardData.setData&&(!function(e){function t(e,t){return function(){e.apply(t,arguments)}}function n(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],l(e,t(r,this),t(o,this))}function i(e){var t=this;return null===this._state?void this._deferreds.push(e):void c(function(){var n=t._state?e.onFulfilled:e.onRejected;if(null===n)return void(t._state?e.resolve:e.reject)(t._value);var i;try{i=n(t._value)}catch(t){return void e.reject(t)}e.resolve(i)})}function r(e){try{if(e===this)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if("function"==typeof n)return void l(t(n,e),t(r,this),t(o,this))}this._state=!0,this._value=e,s.call(this)}catch(e){o.call(this,e)}}function o(e){this._state=!1,this._value=e,s.call(this)}function s(){for(var e=0,t=this._deferreds.length;t>e;e++)i.call(this,this._deferreds[e]);this._deferreds=null}function a(e,t,n,i){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=i}function l(e,t,n){var i=!1;try{e(function(e){i||(i=!0,t(e))},function(e){i||(i=!0,n(e))})}catch(e){if(i)return;i=!0,n(e)}}var c=n.immediateFn||"function"==typeof setImmediate&&setImmediate||function(e){setTimeout(e,1)},u=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};n.prototype.catch=function(e){return this.then(null,e)},n.prototype.then=function(e,t){var r=this;return new n(function(n,o){i.call(r,new a(e,t,n,o))})},n.all=function(){var e=Array.prototype.slice.call(1===arguments.length&&u(arguments[0])?arguments[0]:arguments);return new n(function(t,n){function i(o,s){try{if(s&&("object"==typeof s||"function"==typeof s)){var a=s.then;if("function"==typeof a)return void a.call(s,function(e){i(o,e)},n)}e[o]=s,0===--r&&t(e)}catch(e){n(e)}}if(0===e.length)return t([]);for(var r=e.length,o=0;oi;i++)e[i].then(t,n)})},"undefined"!=typeof module&&module.exports?module.exports=n:e.Promise||(e.Promise=n)}(this),e.copy=function(e){return new Promise(function(t,n){if("string"!=typeof e&&!("text/plain"in e))throw new Error("You must provide a text/plain type.");var i="string"==typeof e?e:e["text/plain"],r=window.clipboardData.setData("Text",i);r?t():n(new Error("Copying was rejected."))})},e.paste=function(){return new Promise(function(e,t){var n=window.clipboardData.getData("Text");n?e(n):t(new Error("Pasting was rejected."))})}),e}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define("moment",t):e.moment=t()}(this,function(){"use strict";function e(){return gi.apply(null,arguments)}function t(e){gi=e}function n(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function r(e){var t;for(t in e)return!1;return!0}function o(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function s(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function a(e,t){var n,i=[];for(n=0;n0)for(n in yi)i=yi[n],r=t[i],g(r)||(e[i]=r);return e}function v(t){m(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),bi===!1&&(bi=!0,e.updateOffset(this),bi=!1)}function y(e){return e instanceof v||null!=e&&null!=e._isAMomentObject}function b(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function w(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=b(t)),n}function x(e,t,n){var i,r=Math.min(e.length,t.length),o=Math.abs(e.length-t.length),s=0;for(i=0;i0?"future":"past"];return T(n)?n(t):n.replace(/%s/i,t)}function R(e,t){var n=e.toLowerCase();Mi[n]=Mi[n+"s"]=Mi[t]=e}function I(e){return"string"==typeof e?Mi[e]||Mi[e.toLowerCase()]:void 0}function O(e){var t,n,i={};for(n in e)l(e,n)&&(t=I(n),t&&(i[t]=e[n]));return i}function F(e,t){Hi[e]=t}function P(e){var t=[];for(var n in e)t.push({unit:n,priority:Hi[n]});return t.sort(function(e,t){return e.priority-t.priority}),t}function W(t,n){return function(i){return null!=i?(j(this,t,i),e.updateOffset(this,n),this):B(this,t)}}function B(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function j(e,t,n){e.isValid()&&e._d["set"+(e._isUTC?"UTC":"")+t](n)}function Y(e){return e=I(e),T(this[e])?this[e]():this}function U(e,t){if("object"==typeof e){e=O(e);for(var n=P(e),i=0;i=0;return(o?n?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+i}function G(e,t,n,i){var r=i;"string"==typeof i&&(r=function(){return this[i]()}),e&&(Ri[e]=r),t&&(Ri[t[0]]=function(){return q(r.apply(this,arguments),t[1],t[2])}),n&&(Ri[n]=function(){return this.localeData().ordinal(r.apply(this,arguments),e)})}function V(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function $(e){var t,n,i=e.match(Ni);for(t=0,n=i.length;t=0&&Ai.test(e);)e=e.replace(Ai,n),Ai.lastIndex=0,i-=1;return e}function Q(e,t,n){Ji[e]=T(t)?t:function(e,i){return e&&n?n:t}}function K(e,t){return l(Ji,e)?Ji[e](t._strict,t._locale):new RegExp(J(e))}function J(e){return ee(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,i,r){return t||n||i||r}))}function ee(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function te(e,t){var n,i=t;for("string"==typeof e&&(e=[e]),o(t)&&(i=function(e,n){n[t]=w(e)}),n=0;n=0&&isFinite(a.getFullYear())&&a.setFullYear(e),a}function be(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&e>=0&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function we(e,t,n){var i=7+t-n,r=(7+be(e,0,i).getUTCDay()-t)%7;return-r+i-1}function xe(e,t,n,i,r){var o,s,a=(7+n-i)%7,l=we(e,i,r),c=1+7*(t-1)+a+l;return c<=0?(o=e-1,s=ge(o)+c):c>ge(e)?(o=e+1,s=c-ge(e)):(o=e,s=c),{year:o,dayOfYear:s}}function ke(e,t,n){var i,r,o=we(e.year(),t,n),s=Math.floor((e.dayOfYear()-o-1)/7)+1;return s<1?(r=e.year()-1,i=s+Se(r,t,n)):s>Se(e.year(),t,n)?(i=s-Se(e.year(),t,n),r=e.year()+1):(r=e.year(),i=s),{week:i,year:r}}function Se(e,t,n){var i=we(e,t,n),r=we(e+1,t,n);return(ge(e)-i+r)/7}function Ce(e){return ke(e,this._week.dow,this._week.doy).week}function Te(){return this._week.dow}function Ee(){return this._week.doy}function _e(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Le(e){var t=ke(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function De(e,t){return"string"!=typeof e?e:isNaN(e)?(e=t.weekdaysParse(e),"number"==typeof e?e:null):parseInt(e,10)}function Me(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function He(e,t){return e?n(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]:this._weekdays}function Ne(e){return e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Ae(e){return e?this._weekdaysMin[e.day()]:this._weekdaysMin}function ze(e,t,n){var i,r,o,s=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)o=u([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===t?(r=ur.call(this._weekdaysParse,s),r!==-1?r:null):"ddd"===t?(r=ur.call(this._shortWeekdaysParse,s),r!==-1?r:null):(r=ur.call(this._minWeekdaysParse,s),r!==-1?r:null):"dddd"===t?(r=ur.call(this._weekdaysParse,s),r!==-1?r:(r=ur.call(this._shortWeekdaysParse,s),r!==-1?r:(r=ur.call(this._minWeekdaysParse,s),r!==-1?r:null))):"ddd"===t?(r=ur.call(this._shortWeekdaysParse,s),r!==-1?r:(r=ur.call(this._weekdaysParse,s),r!==-1?r:(r=ur.call(this._minWeekdaysParse,s),r!==-1?r:null))):(r=ur.call(this._minWeekdaysParse,s),r!==-1?r:(r=ur.call(this._weekdaysParse,s),r!==-1?r:(r=ur.call(this._shortWeekdaysParse,s),r!==-1?r:null)))}function Re(e,t,n){var i,r,o;if(this._weekdaysParseExact)return ze.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(r=u([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(r,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(r,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(r,"").replace(".",".?")+"$","i")),this._weekdaysParse[i]||(o="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[i]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[i].test(e))return i;if(n&&"ddd"===t&&this._shortWeekdaysParse[i].test(e))return i;if(n&&"dd"===t&&this._minWeekdaysParse[i].test(e))return i;if(!n&&this._weekdaysParse[i].test(e))return i}}function Ie(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=De(e,this.localeData()),this.add(e-t,"d")):t}function Oe(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Fe(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Me(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Pe(e){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||je.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(l(this,"_weekdaysRegex")||(this._weekdaysRegex=xr),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function We(e){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||je.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(l(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=kr),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Be(e){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||je.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(l(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Sr),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function je(){function e(e,t){return t.length-e.length}var t,n,i,r,o,s=[],a=[],l=[],c=[];for(t=0;t<7;t++)n=u([2e3,1]).day(t),i=this.weekdaysMin(n,""),r=this.weekdaysShort(n,""),o=this.weekdays(n,""),s.push(i),a.push(r),l.push(o),c.push(i),c.push(r),c.push(o);for(s.sort(e),a.sort(e),l.sort(e),c.sort(e),t=0;t<7;t++)a[t]=ee(a[t]),l[t]=ee(l[t]),c[t]=ee(c[t]);this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Ye(){return this.hours()%12||12}function Ue(){return this.hours()||24}function qe(e,t){G(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function Ge(e,t){return t._meridiemParse}function Ve(e){return"p"===(e+"").toLowerCase().charAt(0)}function $e(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}function Ze(e){return e?e.toLowerCase().replace("_","-"):e}function Xe(e){for(var t,n,i,r,o=0;o0;){if(i=Qe(r.slice(0,t).join("-")))return i;if(n&&n.length>=t&&x(r,n,!0)>=t-1)break;t--}o++}return null}function Qe(e){var t=null;if(!Lr[e]&&"undefined"!=typeof module&&module&&module.exports)try{t=Cr._abbr,require("./locale/"+e),Ke(t)}catch(e){}return Lr[e]}function Ke(e,t){var n;return e&&(n=g(t)?tt(e):Je(e,t),n&&(Cr=n)),Cr._abbr}function Je(e,t){if(null!==t){var n=_r;if(t.abbr=e,null!=Lr[e])C("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=Lr[e]._config;else if(null!=t.parentLocale){if(null==Lr[t.parentLocale])return Dr[t.parentLocale]||(Dr[t.parentLocale]=[]),Dr[t.parentLocale].push({name:e,config:t}),null;n=Lr[t.parentLocale]._config}return Lr[e]=new L(_(n,t)),Dr[e]&&Dr[e].forEach(function(e){Je(e.name,e.config)}),Ke(e),Lr[e]}return delete Lr[e],null}function et(e,t){if(null!=t){var n,i=_r;null!=Lr[e]&&(i=Lr[e]._config),t=_(i,t),n=new L(t),n.parentLocale=Lr[e],Lr[e]=n,Ke(e)}else null!=Lr[e]&&(null!=Lr[e].parentLocale?Lr[e]=Lr[e].parentLocale:null!=Lr[e]&&delete Lr[e]);return Lr[e]}function tt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Cr;if(!n(e)){if(t=Qe(e))return t;e=[e]}return Xe(e)}function nt(){return Si(Lr)}function it(e){var t,n=e._a;return n&&h(e).overflow===-2&&(t=n[nr]<0||n[nr]>11?nr:n[ir]<1||n[ir]>re(n[tr],n[nr])?ir:n[rr]<0||n[rr]>24||24===n[rr]&&(0!==n[or]||0!==n[sr]||0!==n[ar])?rr:n[or]<0||n[or]>59?or:n[sr]<0||n[sr]>59?sr:n[ar]<0||n[ar]>999?ar:-1,h(e)._overflowDayOfYear&&(tir)&&(t=ir),h(e)._overflowWeeks&&t===-1&&(t=lr),h(e)._overflowWeekday&&t===-1&&(t=cr),h(e).overflow=t),e}function rt(e){var t,n,i,r,o,s,a=e._i,l=Mr.exec(a)||Hr.exec(a);if(l){for(h(e).iso=!0,t=0,n=Ar.length;tge(r)&&(h(e)._overflowDayOfYear=!0),n=be(r,0,e._dayOfYear),e._a[nr]=n.getUTCMonth(),e._a[ir]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=o[t]=i[t];for(;t<7;t++)e._a[t]=o[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[rr]&&0===e._a[or]&&0===e._a[sr]&&0===e._a[ar]&&(e._nextDay=!0,e._a[rr]=0),e._d=(e._useUTC?be:ye).apply(null,o),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[rr]=24)}}function ct(e){var t,n,i,r,o,s,a,l;if(t=e._w,null!=t.GG||null!=t.W||null!=t.E)o=1,s=4,n=st(t.GG,e._a[tr],ke(yt(),1,4).year),i=st(t.W,1),r=st(t.E,1),(r<1||r>7)&&(l=!0);else{o=e._locale._week.dow,s=e._locale._week.doy;var c=ke(yt(),o,s);n=st(t.gg,e._a[tr],c.year),i=st(t.w,c.week),null!=t.d?(r=t.d,(r<0||r>6)&&(l=!0)):null!=t.e?(r=t.e+o,(t.e<0||t.e>6)&&(l=!0)):r=o}i<1||i>Se(n,o,s)?h(e)._overflowWeeks=!0:null!=l?h(e)._overflowWeekday=!0:(a=xe(n,i,r,o,s),e._a[tr]=a.year,e._dayOfYear=a.dayOfYear)}function ut(t){if(t._f===e.ISO_8601)return void rt(t);t._a=[],h(t).empty=!0;var n,i,r,o,s,a=""+t._i,l=a.length,c=0;for(r=X(t._f,t._locale).match(Ni)||[],n=0;n0&&h(t).unusedInput.push(s),a=a.slice(a.indexOf(i)+i.length),c+=i.length),Ri[o]?(i?h(t).empty=!1:h(t).unusedTokens.push(o),ie(o,i,t)):t._strict&&!i&&h(t).unusedTokens.push(o);h(t).charsLeftOver=l-c,a.length>0&&h(t).unusedInput.push(a),t._a[rr]<=12&&h(t).bigHour===!0&&t._a[rr]>0&&(h(t).bigHour=void 0),h(t).parsedDateParts=t._a.slice(0),h(t).meridiem=t._meridiem,t._a[rr]=dt(t._locale,t._a[rr],t._meridiem),lt(t),it(t)}function dt(e,t,n){var i;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?(i=e.isPM(n),i&&t<12&&(t+=12),i||12!==t||(t=0),t):t}function ht(e){var t,n,i,r,o;if(0===e._f.length)return h(e).invalidFormat=!0,void(e._d=new Date(NaN));for(r=0;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function It(){if(!g(this._isDSTShifted))return this._isDSTShifted;var e={};if(m(e,this),e=gt(e),e._a){var t=e._isUTC?u(e._a):yt(e._a);this._isDSTShifted=this.isValid()&&x(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Ot(){return!!this.isValid()&&!this._isUTC}function Ft(){return!!this.isValid()&&this._isUTC}function Pt(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}function Wt(e,t){var n,i,r,s=e,a=null;return St(e)?s={ms:e._milliseconds,d:e._days,M:e._months}:o(e)?(s={},t?s[t]=e:s.milliseconds=e):(a=Wr.exec(e))?(n="-"===a[1]?-1:1,s={y:0,d:w(a[ir])*n,h:w(a[rr])*n,m:w(a[or])*n,s:w(a[sr])*n,ms:w(Ct(1e3*a[ar]))*n}):(a=Br.exec(e))?(n="-"===a[1]?-1:1,s={y:Bt(a[2],n),M:Bt(a[3],n),w:Bt(a[4],n),d:Bt(a[5],n),h:Bt(a[6],n),m:Bt(a[7],n),s:Bt(a[8],n)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(r=Yt(yt(s.from),yt(s.to)),s={},s.ms=r.milliseconds,s.M=r.months),i=new kt(s),St(e)&&l(e,"_locale")&&(i._locale=e._locale),i}function Bt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function jt(e,t){var n={milliseconds:0,months:0};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Yt(e,t){var n;return e.isValid()&&t.isValid()?(t=_t(t,e),e.isBefore(t)?n=jt(e,t):(n=jt(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Ut(e,t){return function(n,i){var r,o;return null===i||isNaN(+i)||(C(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=n,n=i,i=o),n="string"==typeof n?+n:n,r=Wt(n,i),qt(this,r,e),this}}function qt(t,n,i,r){var o=n._milliseconds,s=Ct(n._days),a=Ct(n._months);t.isValid()&&(r=null==r||r,o&&t._d.setTime(t._d.valueOf()+o*i),s&&j(t,"Date",B(t,"Date")+s*i),a&&ce(t,B(t,"Month")+a*i),r&&e.updateOffset(t,s||a))}function Gt(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function Vt(t,n){var i=t||yt(),r=_t(i,this).startOf("day"),o=e.calendarFormat(this,r)||"sameElse",s=n&&(T(n[o])?n[o].call(this,i):n[o]);return this.format(s||this.localeData().calendar(o,this,yt(i)))}function $t(){return new v(this)}function Zt(e,t){var n=y(e)?e:yt(e);return!(!this.isValid()||!n.isValid())&&(t=I(g(t)?"millisecond":t),"millisecond"===t?this.valueOf()>n.valueOf():n.valueOf()o&&(t=o),Nn.call(this,e,t,n,i,r))}function Nn(e,t,n,i,r){var o=xe(e,t,n,i,r),s=be(o.year,0,o.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}function An(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}function zn(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}function Rn(e,t){t[ar]=w(1e3*("0."+e))}function In(){return this._isUTC?"UTC":""}function On(){return this._isUTC?"Coordinated Universal Time":""}function Fn(e){return yt(1e3*e)}function Pn(){return yt.apply(null,arguments).parseZone()}function Wn(e){return e}function Bn(e,t,n,i){var r=tt(),o=u().set(i,t);return r[n](o,e)}function jn(e,t,n){if(o(e)&&(t=e,e=void 0),e=e||"",null!=t)return Bn(e,t,n,"month");var i,r=[];for(i=0;i<12;i++)r[i]=Bn(e,i,n,"month");return r}function Yn(e,t,n,i){"boolean"==typeof e?(o(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,o(t)&&(n=t,t=void 0),t=t||"");var r=tt(),s=e?r._week.dow:0;if(null!=n)return Bn(t,(n+s)%7,i,"day");var a,l=[];for(a=0;a<7;a++)l[a]=Bn(t,(a+s)%7,i,"day");return l}function Un(e,t){return jn(e,t,"months")}function qn(e,t){return jn(e,t,"monthsShort")}function Gn(e,t,n){return Yn(e,t,n,"weekdays")}function Vn(e,t,n){return Yn(e,t,n,"weekdaysShort")}function $n(e,t,n){return Yn(e,t,n,"weekdaysMin")}function Zn(){var e=this._data;return this._milliseconds=Kr(this._milliseconds),this._days=Kr(this._days),this._months=Kr(this._months),e.milliseconds=Kr(e.milliseconds),e.seconds=Kr(e.seconds),e.minutes=Kr(e.minutes),e.hours=Kr(e.hours),e.months=Kr(e.months),e.years=Kr(e.years),this}function Xn(e,t,n,i){var r=Wt(t,n);return e._milliseconds+=i*r._milliseconds,e._days+=i*r._days,e._months+=i*r._months,e._bubble()}function Qn(e,t){return Xn(this,e,t,1)}function Kn(e,t){return Xn(this,e,t,-1)}function Jn(e){return e<0?Math.floor(e):Math.ceil(e)}function ei(){var e,t,n,i,r,o=this._milliseconds,s=this._days,a=this._months,l=this._data;return o>=0&&s>=0&&a>=0||o<=0&&s<=0&&a<=0||(o+=864e5*Jn(ni(a)+s),s=0,a=0),l.milliseconds=o%1e3,e=b(o/1e3),l.seconds=e%60,t=b(e/60),l.minutes=t%60,n=b(t/60),l.hours=n%24,s+=b(n/24),r=b(ti(s)),a+=r,s-=Jn(ni(r)),i=b(a/12),a%=12,l.days=s,l.months=a,l.years=i,this}function ti(e){return 4800*e/146097}function ni(e){return 146097*e/4800}function ii(e){var t,n,i=this._milliseconds;if(e=I(e),"month"===e||"year"===e)return t=this._days+i/864e5,n=this._months+ti(t),"month"===e?n:n/12;switch(t=this._days+Math.round(ni(this._months)),e){case"week":return t/7+i/6048e5;case"day":return t+i/864e5;case"hour":return 24*t+i/36e5;case"minute":return 1440*t+i/6e4;case"second":return 86400*t+i/1e3;case"millisecond":return Math.floor(864e5*t)+i;default:throw new Error("Unknown unit "+e)}}function ri(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*w(this._months/12)}function oi(e){return function(){return this.as(e)}}function si(e){return e=I(e),this[e+"s"]()}function ai(e){return function(){return this._data[e]}}function li(){return b(this.days()/7)}function ci(e,t,n,i,r){return r.relativeTime(t||1,!!n,e,i)}function ui(e,t,n){var i=Wt(e).abs(),r=go(i.as("s")),o=go(i.as("m")),s=go(i.as("h")),a=go(i.as("d")),l=go(i.as("M")),c=go(i.as("y")),u=r0,u[4]=n,ci.apply(null,u)}function di(e){return void 0===e?go:"function"==typeof e&&(go=e,!0)}function hi(e,t){return void 0!==mo[e]&&(void 0===t?mo[e]:(mo[e]=t,!0))}function fi(e){var t=this.localeData(),n=ui(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)}function pi(){var e,t,n,i=vo(this._milliseconds)/1e3,r=vo(this._days),o=vo(this._months);e=b(i/60),t=b(e/60),i%=60,e%=60,n=b(o/12),o%=12;var s=n,a=o,l=r,c=t,u=e,d=i,h=this.asSeconds();return h?(h<0?"-":"")+"P"+(s?s+"Y":"")+(a?a+"M":"")+(l?l+"D":"")+(c||u||d?"T":"")+(c?c+"H":"")+(u?u+"M":"")+(d?d+"S":""):"P0D"}var gi,mi;mi=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,i=0;i68?1900:2e3)};var mr=W("FullYear",!0);G("w",["ww",2],"wo","week"),G("W",["WW",2],"Wo","isoWeek"),R("week","w"),R("isoWeek","W"),F("week",5),F("isoWeek",5),Q("w",Bi),Q("ww",Bi,Oi),Q("W",Bi),Q("WW",Bi,Oi),ne(["w","ww","W","WW"],function(e,t,n,i){t[i.substr(0,1)]=w(e)});var vr={dow:0,doy:6};G("d",0,"do","day"),G("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),G("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),G("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),G("e",0,0,"weekday"),G("E",0,0,"isoWeekday"),R("day","d"),R("weekday","e"),R("isoWeekday","E"),F("day",11),F("weekday",11),F("isoWeekday",11),Q("d",Bi),Q("e",Bi),Q("E",Bi),Q("dd",function(e,t){return t.weekdaysMinRegex(e)}),Q("ddd",function(e,t){return t.weekdaysShortRegex(e)}),Q("dddd",function(e,t){return t.weekdaysRegex(e)}),ne(["dd","ddd","dddd"],function(e,t,n,i){var r=n._locale.weekdaysParse(e,i,n._strict);null!=r?t.d=r:h(n).invalidWeekday=e}),ne(["d","e","E"],function(e,t,n,i){t[i]=w(e)});var yr="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),br="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),wr="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),xr=Ki,kr=Ki,Sr=Ki;G("H",["HH",2],0,"hour"),G("h",["hh",2],0,Ye),G("k",["kk",2],0,Ue),G("hmm",0,0,function(){return""+Ye.apply(this)+q(this.minutes(),2)}),G("hmmss",0,0,function(){return""+Ye.apply(this)+q(this.minutes(),2)+q(this.seconds(),2)}),G("Hmm",0,0,function(){return""+this.hours()+q(this.minutes(),2)}),G("Hmmss",0,0,function(){return""+this.hours()+q(this.minutes(),2)+q(this.seconds(),2)}),qe("a",!0),qe("A",!1),R("hour","h"),F("hour",13),Q("a",Ge),Q("A",Ge),Q("H",Bi),Q("h",Bi),Q("HH",Bi,Oi),Q("hh",Bi,Oi),Q("hmm",ji),Q("hmmss",Yi),Q("Hmm",ji),Q("Hmmss",Yi),te(["H","HH"],rr),te(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),te(["h","hh"],function(e,t,n){t[rr]=w(e),h(n).bigHour=!0}),te("hmm",function(e,t,n){var i=e.length-2;t[rr]=w(e.substr(0,i)),t[or]=w(e.substr(i)),h(n).bigHour=!0}),te("hmmss",function(e,t,n){var i=e.length-4,r=e.length-2;t[rr]=w(e.substr(0,i)),t[or]=w(e.substr(i,2)),t[sr]=w(e.substr(r)),h(n).bigHour=!0}),te("Hmm",function(e,t,n){var i=e.length-2; -t[rr]=w(e.substr(0,i)),t[or]=w(e.substr(i))}),te("Hmmss",function(e,t,n){var i=e.length-4,r=e.length-2;t[rr]=w(e.substr(0,i)),t[or]=w(e.substr(i,2)),t[sr]=w(e.substr(r))});var Cr,Tr=/[ap]\.?m?\.?/i,Er=W("Hours",!0),_r={calendar:Ci,longDateFormat:Ti,invalidDate:Ei,ordinal:_i,ordinalParse:Li,relativeTime:Di,months:hr,monthsShort:fr,week:vr,weekdays:yr,weekdaysMin:wr,weekdaysShort:br,meridiemParse:Tr},Lr={},Dr={},Mr=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Hr=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Nr=/Z|[+-]\d\d(?::?\d\d)?/,Ar=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],zr=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Rr=/^\/?Date\((\-?\d+)/i;e.createFromInputFallback=S("value provided is not in a recognized ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),e.ISO_8601=function(){};var Ir=S("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=yt.apply(null,arguments);return this.isValid()&&e.isValid()?ethis?this:e:p()}),Fr=function(){return Date.now?Date.now():+new Date};Tt("Z",":"),Tt("ZZ",""),Q("Z",Xi),Q("ZZ",Xi),te(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=Et(Xi,e)});var Pr=/([\+\-]|\d\d)/gi;e.updateOffset=function(){};var Wr=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Br=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;Wt.fn=kt.prototype;var jr=Ut(1,"add"),Yr=Ut(-1,"subtract");e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",e.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Ur=S("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});G(0,["gg",2],0,function(){return this.weekYear()%100}),G(0,["GG",2],0,function(){return this.isoWeekYear()%100}),En("gggg","weekYear"),En("ggggg","weekYear"),En("GGGG","isoWeekYear"),En("GGGGG","isoWeekYear"),R("weekYear","gg"),R("isoWeekYear","GG"),F("weekYear",1),F("isoWeekYear",1),Q("G",$i),Q("g",$i),Q("GG",Bi,Oi),Q("gg",Bi,Oi),Q("GGGG",qi,Pi),Q("gggg",qi,Pi),Q("GGGGG",Gi,Wi),Q("ggggg",Gi,Wi),ne(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,i){t[i.substr(0,2)]=w(e)}),ne(["gg","GG"],function(t,n,i,r){n[r]=e.parseTwoDigitYear(t)}),G("Q",0,"Qo","quarter"),R("quarter","Q"),F("quarter",7),Q("Q",Ii),te("Q",function(e,t){t[nr]=3*(w(e)-1)}),G("D",["DD",2],"Do","date"),R("date","D"),F("date",9),Q("D",Bi),Q("DD",Bi,Oi),Q("Do",function(e,t){return e?t._ordinalParse:t._ordinalParseLenient}),te(["D","DD"],ir),te("Do",function(e,t){t[ir]=w(e.match(Bi)[0],10)});var qr=W("Date",!0);G("DDD",["DDDD",3],"DDDo","dayOfYear"),R("dayOfYear","DDD"),F("dayOfYear",4),Q("DDD",Ui),Q("DDDD",Fi),te(["DDD","DDDD"],function(e,t,n){n._dayOfYear=w(e)}),G("m",["mm",2],0,"minute"),R("minute","m"),F("minute",14),Q("m",Bi),Q("mm",Bi,Oi),te(["m","mm"],or);var Gr=W("Minutes",!1);G("s",["ss",2],0,"second"),R("second","s"),F("second",15),Q("s",Bi),Q("ss",Bi,Oi),te(["s","ss"],sr);var Vr=W("Seconds",!1);G("S",0,0,function(){return~~(this.millisecond()/100)}),G(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),G(0,["SSS",3],0,"millisecond"),G(0,["SSSS",4],0,function(){return 10*this.millisecond()}),G(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),G(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),G(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),G(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),G(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),R("millisecond","ms"),F("millisecond",16),Q("S",Ui,Ii),Q("SS",Ui,Oi),Q("SSS",Ui,Fi);var $r;for($r="SSSS";$r.length<=9;$r+="S")Q($r,Vi);for($r="S";$r.length<=9;$r+="S")te($r,Rn);var Zr=W("Milliseconds",!1);G("z",0,0,"zoneAbbr"),G("zz",0,0,"zoneName");var Xr=v.prototype;Xr.add=jr,Xr.calendar=Vt,Xr.clone=$t,Xr.diff=tn,Xr.endOf=gn,Xr.format=an,Xr.from=ln,Xr.fromNow=cn,Xr.to=un,Xr.toNow=dn,Xr.get=Y,Xr.invalidAt=Cn,Xr.isAfter=Zt,Xr.isBefore=Xt,Xr.isBetween=Qt,Xr.isSame=Kt,Xr.isSameOrAfter=Jt,Xr.isSameOrBefore=en,Xr.isValid=kn,Xr.lang=Ur,Xr.locale=hn,Xr.localeData=fn,Xr.max=Or,Xr.min=Ir,Xr.parsingFlags=Sn,Xr.set=U,Xr.startOf=pn,Xr.subtract=Yr,Xr.toArray=bn,Xr.toObject=wn,Xr.toDate=yn,Xr.toISOString=on,Xr.inspect=sn,Xr.toJSON=xn,Xr.toString=rn,Xr.unix=vn,Xr.valueOf=mn,Xr.creationData=Tn,Xr.year=mr,Xr.isLeapYear=ve,Xr.weekYear=_n,Xr.isoWeekYear=Ln,Xr.quarter=Xr.quarters=An,Xr.month=ue,Xr.daysInMonth=de,Xr.week=Xr.weeks=_e,Xr.isoWeek=Xr.isoWeeks=Le,Xr.weeksInYear=Mn,Xr.isoWeeksInYear=Dn,Xr.date=qr,Xr.day=Xr.days=Ie,Xr.weekday=Oe,Xr.isoWeekday=Fe,Xr.dayOfYear=zn,Xr.hour=Xr.hours=Er,Xr.minute=Xr.minutes=Gr,Xr.second=Xr.seconds=Vr,Xr.millisecond=Xr.milliseconds=Zr,Xr.utcOffset=Dt,Xr.utc=Ht,Xr.local=Nt,Xr.parseZone=At,Xr.hasAlignedHourOffset=zt,Xr.isDST=Rt,Xr.isLocal=Ot,Xr.isUtcOffset=Ft,Xr.isUtc=Pt,Xr.isUTC=Pt,Xr.zoneAbbr=In,Xr.zoneName=On,Xr.dates=S("dates accessor is deprecated. Use date instead.",qr),Xr.months=S("months accessor is deprecated. Use month instead",ue),Xr.years=S("years accessor is deprecated. Use year instead",mr),Xr.zone=S("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Mt),Xr.isDSTShifted=S("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",It);var Qr=L.prototype;Qr.calendar=D,Qr.longDateFormat=M,Qr.invalidDate=H,Qr.ordinal=N,Qr.preparse=Wn,Qr.postformat=Wn,Qr.relativeTime=A,Qr.pastFuture=z,Qr.set=E,Qr.months=oe,Qr.monthsShort=se,Qr.monthsParse=le,Qr.monthsRegex=fe,Qr.monthsShortRegex=he,Qr.week=Ce,Qr.firstDayOfYear=Ee,Qr.firstDayOfWeek=Te,Qr.weekdays=He,Qr.weekdaysMin=Ae,Qr.weekdaysShort=Ne,Qr.weekdaysParse=Re,Qr.weekdaysRegex=Pe,Qr.weekdaysShortRegex=We,Qr.weekdaysMinRegex=Be,Qr.isPM=Ve,Qr.meridiem=$e,Ke("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=1===w(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n}}),e.lang=S("moment.lang is deprecated. Use moment.locale instead.",Ke),e.langData=S("moment.langData is deprecated. Use moment.localeData instead.",tt);var Kr=Math.abs,Jr=oi("ms"),eo=oi("s"),to=oi("m"),no=oi("h"),io=oi("d"),ro=oi("w"),oo=oi("M"),so=oi("y"),ao=ai("milliseconds"),lo=ai("seconds"),co=ai("minutes"),uo=ai("hours"),ho=ai("days"),fo=ai("months"),po=ai("years"),go=Math.round,mo={s:45,m:45,h:22,d:26,M:11},vo=Math.abs,yo=kt.prototype;return yo.abs=Zn,yo.add=Qn,yo.subtract=Kn,yo.as=ii,yo.asMilliseconds=Jr,yo.asSeconds=eo,yo.asMinutes=to,yo.asHours=no,yo.asDays=io,yo.asWeeks=ro,yo.asMonths=oo,yo.asYears=so,yo.valueOf=ri,yo._bubble=ei,yo.get=si,yo.milliseconds=ao,yo.seconds=lo,yo.minutes=co,yo.hours=uo,yo.days=ho,yo.weeks=li,yo.months=fo,yo.years=po,yo.humanize=fi,yo.toISOString=pi,yo.toString=pi,yo.toJSON=pi,yo.locale=hn,yo.localeData=fn,yo.toIsoString=S("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",pi),yo.lang=Ur,G("X",0,0,"unix"),G("x",0,0,"valueOf"),Q("x",$i),Q("X",Qi),te("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),te("x",function(e,t,n){n._d=new Date(w(e))}),e.version="2.17.1",t(yt),e.fn=Xr,e.min=wt,e.max=xt,e.now=Fr,e.utc=u,e.unix=Fn,e.months=Un,e.isDate=s,e.locale=Ke,e.invalid=p,e.duration=Wt,e.isMoment=y,e.weekdays=Gn,e.parseZone=Pn,e.localeData=tt,e.isDuration=St,e.monthsShort=qn,e.weekdaysMin=$n,e.defineLocale=Je,e.updateLocale=et,e.locales=nt,e.weekdaysShort=Vn,e.normalizeUnits=I,e.relativeTimeRounding=di,e.relativeTimeThreshold=hi,e.calendarFormat=Gt,e.prototype=Xr,e}),!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define("color-hash/dist/color-hash",[],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.ColorHash=e()}}(function(){return function e(t,n,i){function r(s,a){if(!n[s]){if(!t[s]){var l="function"==typeof require&&require;if(!a&&l)return l(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[s]={exports:{}};t[s][0].call(u.exports,function(e){var n=t[s][1][e];return r(n?n:e)},u,u.exports,e,t,n,i)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;sr&&(i=parseInt(i/n)),i=i*t+e.charCodeAt(o);return i};t.exports=i},{}],2:[function(e,t,n){var i=e("./bkdr-hash"),r=function(e){var t="#";return e.forEach(function(e){e<16&&(t+=0),t+=e.toString(16)}),t},o=function(e,t,n){e/=360;var i=n<.5?n*(1+t):n+t-n*t,r=2*n-i;return[e+1/3,e,e-1/3].map(function(e){return e<0&&e++,e>1&&e--,e=e<1/6?r+6*(i-r)*e:e<.5?i:e<2/3?r+6*(i-r)*(2/3-e):r,Math.round(255*e)})},s=function(e){e=e||{};var t=[e.lightness,e.saturation].map(function(e){return e=e||[.35,.5,.65],"[object Array]"===Object.prototype.toString.call(e)?e.concat():[e]});this.L=t[0],this.S=t[1],this.hash=e.hash||i};s.prototype.hsl=function(e){var t,n,i,r=this.hash(e);return t=r%359,r=parseInt(r/360),n=this.S[r%this.S.length],r=parseInt(r/this.S.length),i=this.L[r%this.L.length],[t,n,i]},s.prototype.rgb=function(e){var t=this.hsl(e);return o.apply(this,t)},s.prototype.hex=function(e){var t=this.rgb(e);return r(t)},t.exports=s},{"./bkdr-hash":1}]},{},[2])(2)}),define("color-hash",["color-hash/dist/color-hash"],function(e){return e}),function(e,t){"use strict";"function"==typeof define&&define.amd?define("push/push.min",[],function(){return new(t(e,e.document))}):"undefined"!=typeof module&&module.exports?module.exports=new(t(e,e.document)):e.Push=new(t(e,e.document))}("undefined"!=typeof window?window:this,function(e,t){var n=function(){var t=this,n=function(e){return void 0===e},i=function(e){return String(e)===e},r=function(e){return e&&"[object Function]"==={}.toString.call(e)},o=0,s="PushError: push.js is incompatible with browser.",a=!1,l={},c=function(t){var n=!1,i=l[t];if("undefined"!=typeof i){if(i.close)i.close();else if(i.cancel)i.cancel();else{if(!e.external||!e.external.msIsSiteMode)throw n=!0,new Error("Unable to close notification: unknown interface");e.external.msSiteModeClearIconOverlay()}if(!n)return d(t)}return!1},u=function(e){var t=o;return l[t]=e,o++,t},d=function(e){var t,n={},i=!1;for(t in l)l.hasOwnProperty(t)&&(t!=e?n[t]=l[t]:i=!0);return l=n,i},h=function(o,s){var a,l,h,f;if(s=s||{},t.lastWorkerPath=s.serviceWorker||"sw.js",e.Notification)try{a=new e.Notification(o,{icon:i(s.icon)||n(s.icon)?s.icon:s.icon.x32,body:s.body,tag:s.tag,requireInteraction:s.requireInteraction})}catch(t){e.navigator&&(e.navigator.serviceWorker.register(s.serviceWorker||"sw.js"),e.navigator.serviceWorker.ready.then(function(e){e.showNotification(o,{body:s.body,vibrate:s.vibrate,tag:s.tag,requireInteraction:s.requireInteraction})}))}else if(e.webkitNotifications)a=e.webkitNotifications.createNotification(s.icon,o,s.body),a.show();else if(navigator.mozNotification)a=navigator.mozNotification.createNotification(o,s.body,s.icon),a.show();else{if(!e.external||!e.external.msIsSiteMode())throw new Error("Unable to create notification: unknown interface");e.external.msSiteModeClearIconOverlay(),e.external.msSiteModeSetIconOverlay(i(s.icon)||n(s.icon)?s.icon:s.icon.x16,o),e.external.msSiteModeActivate(),a={}}return h=u(a),l={get:function(){return a},close:function(){c(h)}},s.timeout&&setTimeout(function(){l.close()},s.timeout),r(s.onShow)&&a.addEventListener("show",s.onShow),r(s.onError)&&a.addEventListener("error",s.onError),r(s.onClick)&&a.addEventListener("click",s.onClick),f=function(){d(h),r(s.onClose)&&s.onClose.call(this)},a.addEventListener("close",f),a.addEventListener("cancel",f),l},f={DEFAULT:"default",GRANTED:"granted",DENIED:"denied"},p=[f.GRANTED,f.DEFAULT,f.DENIED];t.Permission=f,t.Permission.request=function(n,i){if(!t.isSupported)throw new Error(s);if(callback=function(e){switch(e){case t.Permission.GRANTED:a=!0,n&&n();break;case t.Permission.DENIED:a=!1,i&&i()}},e.Notification&&e.Notification.requestPermission)Notification.requestPermission(callback);else{if(!e.webkitNotifications||!e.webkitNotifications.checkPermission)throw new Error(s);e.webkitNotifications.requestPermission(callback)}},t.Permission.has=function(){return a},t.Permission.get=function(){var n;if(!t.isSupported)throw new Error(s);if(e.Notification&&e.Notification.permissionLevel)n=e.Notification.permissionLevel;else if(e.webkitNotifications&&e.webkitNotifications.checkPermission)n=p[e.webkitNotifications.checkPermission()];else if(e.Notification&&e.Notification.permission)n=e.Notification.permission;else if(navigator.mozNotification)n=p.GRANTED;else{if(!e.external||void 0===e.external.msIsSiteMode())throw new Error(s);n=e.external.msIsSiteMode()?f.GRANTED:f.DEFAULT}return n},t.isSupported=function(){var t=!1;try{t=!!(e.Notification||e.webkitNotifications||navigator.mozNotification||e.external&&void 0!==e.external.msIsSiteMode())}catch(e){}return t}(),t.create=function(e,n){if(!t.isSupported)throw new Error(s);if(!i(e))throw new Error("PushError: Title of notification must be a string");return t.Permission.has()?new Promise(function(t,i){try{t(h(e,n))}catch(e){i(e)}}):new Promise(function(i,r){t.Permission.request(function(){try{i(h(e,n))}catch(e){r(e)}},function(){r("Permission request declined")})})},t.count=function(){var e,t=0;for(e in l)t++;return t},t.__lastWorkerPath=function(){return t.lastWorkerPath},t.close=function(e){var t;for(t in l)if(notification=l[t],notification.tag===e)return c(t)},t.clear=function(){var e=!0;for(key in l){var t=c(key);e=e&&t}return e}};return n}),define("push",["push/push.min"],function(e){return e}),!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define("clipboard/dist/clipboard.min",[],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.Clipboard=e()}}(function(){var e;return function e(t,n,i){function r(s,a){if(!n[s]){if(!t[s]){var l="function"==typeof require&&require;if(!a&&l)return l(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[s]={exports:{}};t[s][0].call(u.exports,function(e){var n=t[s][1][e];return r(n?n:e)},u,u.exports,e,t,n,i)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;si;i++)n[i].fn.apply(n[i].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),i=n[e],r=[];if(i&&t)for(var o=0,s=i.length;s>o;o++)i[o].fn!==t&&i[o].fn._!==t&&r.push(i[o]);return r.length?n[e]=r:delete n[e],this}},t.exports=i},{}],8:[function(t,n,i){!function(r,o){if("function"==typeof e&&e.amd)e(["module","select"],o);else if("undefined"!=typeof i)o(n,t("select"));else{var s={exports:{}};o(s,r.select),r.clipboardAction=s.exports}}(this,function(e,t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=n(t),o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},s=function(){function e(e,t){for(var n=0;n=h[r]&&r(0===r?9:1)&&(r+=1),d[n](e,r)[agoin].replace("%s",e)}function i(t,n){return n=n?e(n):new Date,(n-e(t))/1e3}function r(e){for(var t=1,n=0,i=Math.abs(e);e>=h[n]&&n1&&(n+="s"),[e+" "+n+" ago","in "+e+" "+n]},zh_CN:function(e,t){if(0===t)return["刚刚","片刻后"];var n=u[parseInt(t/2)];return[e+n+"前",e+n+"后"]}},h=[60,60,24,7,365/7/12,12],f=6,p="datetime";return a.register=function(e,t){d[e]=t},a}),define("timeago/dist/timeago.min",[],function(){}),define("timeago",["timeago/dist/timeago.min"],function(e){return e}),define("dropzone/dist/dropzone",["require","exports","module"],function(e,t,n){(function(){var e,t,i,r,o,s,a,l,c=[].slice,u={}.hasOwnProperty,d=function(e,t){function n(){this.constructor=e}for(var i in t)u.call(t,i)&&(e[i]=t[i]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e};a=function(){},t=function(){function e(){}return e.prototype.addEventListener=e.prototype.on,e.prototype.on=function(e,t){return this._callbacks=this._callbacks||{},this._callbacks[e]||(this._callbacks[e]=[]),this._callbacks[e].push(t),this},e.prototype.emit=function(){var e,t,n,i,r,o;if(i=arguments[0],e=2<=arguments.length?c.call(arguments,1):[],this._callbacks=this._callbacks||{},n=this._callbacks[i])for(r=0,o=n.length;r
    '),this.element.appendChild(t)),i=t.getElementsByTagName("span")[0],i&&(null!=i.textContent?i.textContent=this.options.dictFallbackMessage:null!=i.innerText&&(i.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(e){var t,n,i; -return t={srcX:0,srcY:0,srcWidth:e.width,srcHeight:e.height},n=e.width/e.height,t.optWidth=this.options.thumbnailWidth,t.optHeight=this.options.thumbnailHeight,null==t.optWidth&&null==t.optHeight?(t.optWidth=t.srcWidth,t.optHeight=t.srcHeight):null==t.optWidth?t.optWidth=n*t.optHeight:null==t.optHeight&&(t.optHeight=1/n*t.optWidth),i=t.optWidth/t.optHeight,e.heighti?(t.srcHeight=e.height,t.srcWidth=t.srcHeight*i):(t.srcWidth=e.width,t.srcHeight=t.srcWidth/i),t.srcX=(e.width-t.srcWidth)/2,t.srcY=(e.height-t.srcHeight)/2,t},drop:function(e){return this.element.classList.remove("dz-drag-hover")},dragstart:a,dragend:function(e){return this.element.classList.remove("dz-drag-hover")},dragenter:function(e){return this.element.classList.add("dz-drag-hover")},dragover:function(e){return this.element.classList.add("dz-drag-hover")},dragleave:function(e){return this.element.classList.remove("dz-drag-hover")},paste:a,reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(e){var t,i,r,o,s,a,l,c,u,d,h,f,p;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){for(e.previewElement=n.createElement(this.options.previewTemplate.trim()),e.previewTemplate=e.previewElement,this.previewsContainer.appendChild(e.previewElement),d=e.previewElement.querySelectorAll("[data-dz-name]"),o=0,l=d.length;o'+this.options.dictRemoveFile+""),e.previewElement.appendChild(e._removeLink)),i=function(t){return function(i){return i.preventDefault(),i.stopPropagation(),e.status===n.UPLOADING?n.confirm(t.options.dictCancelUploadConfirmation,function(){return t.removeFile(e)}):t.options.dictRemoveFileConfirmation?n.confirm(t.options.dictRemoveFileConfirmation,function(){return t.removeFile(e)}):t.removeFile(e)}}(this),f=e.previewElement.querySelectorAll("[data-dz-remove]"),p=[],a=0,u=f.length;a\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n Check\n \n \n \n \n \n
    \n
    \n \n Error\n \n \n \n \n \n \n \n
    \n
    '},i=function(){var e,t,n,i,r,o,s;for(i=arguments[0],n=2<=arguments.length?c.call(arguments,1):[],o=0,s=n.length;o'+this.options.dictDefaultMessage+"
    ")),this.clickableElements.length&&(i=function(e){return function(){return e.hiddenFileInput&&e.hiddenFileInput.parentNode.removeChild(e.hiddenFileInput),e.hiddenFileInput=document.createElement("input"),e.hiddenFileInput.setAttribute("type","file"),(null==e.options.maxFiles||e.options.maxFiles>1)&&e.hiddenFileInput.setAttribute("multiple","multiple"),e.hiddenFileInput.className="dz-hidden-input",null!=e.options.acceptedFiles&&e.hiddenFileInput.setAttribute("accept",e.options.acceptedFiles),null!=e.options.capture&&e.hiddenFileInput.setAttribute("capture",e.options.capture),e.hiddenFileInput.style.visibility="hidden",e.hiddenFileInput.style.position="absolute",e.hiddenFileInput.style.top="0",e.hiddenFileInput.style.left="0",e.hiddenFileInput.style.height="0",e.hiddenFileInput.style.width="0",document.querySelector(e.options.hiddenInputContainer).appendChild(e.hiddenFileInput),e.hiddenFileInput.addEventListener("change",function(){var t,n,r,o;if(n=e.hiddenFileInput.files,n.length)for(r=0,o=n.length;r',this.options.dictFallbackText&&(i+="

    "+this.options.dictFallbackText+"

    "),i+='
    ',t=n.createElement(i),"FORM"!==this.element.tagName?(r=n.createElement('
    '),r.appendChild(t)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=r?r:t)},n.prototype.getExistingFallback=function(){var e,t,n,i,r,o;for(t=function(e){var t,n,i;for(n=0,i=e.length;n0){for(s=["TB","GB","MB","KB","b"],n=a=0,l=s.length;a=t){i=e/Math.pow(this.options.filesizeBase,4-n),r=o;break}i=Math.round(10*i)/10}return""+i+" "+r},n.prototype._updateMaxFilesReachedClass=function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")},n.prototype.drop=function(e){var t,n;e.dataTransfer&&(this.emit("drop",e),t=e.dataTransfer.files,this.emit("addedfiles",t),t.length&&(n=e.dataTransfer.items,n&&n.length&&null!=n[0].webkitGetAsEntry?this._addFilesFromItems(n):this.handleFiles(t)))},n.prototype.paste=function(e){var t,n;if(null!=(null!=e&&null!=(n=e.clipboardData)?n.items:void 0))return this.emit("paste",e),t=e.clipboardData.items,t.length?this._addFilesFromItems(t):void 0},n.prototype.handleFiles=function(e){var t,n,i,r;for(r=[],n=0,i=e.length;n0){for(o=0,s=n.length;o1024*this.options.maxFilesize*1024?t(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(e.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):n.isValidFile(e,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(t(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",e)):this.options.accept.call(this,e,t):t(this.options.dictInvalidFileType)},n.prototype.addFile=function(e){return e.upload={progress:0,total:e.size,bytesSent:0},this.files.push(e),e.status=n.ADDED,this.emit("addedfile",e),this._enqueueThumbnail(e),this.accept(e,function(t){return function(n){return n?(e.accepted=!1,t._errorProcessing([e],n)):(e.accepted=!0,t.options.autoQueue&&t.enqueueFile(e)),t._updateMaxFilesReachedClass()}}(this))},n.prototype.enqueueFiles=function(e){var t,n,i;for(n=0,i=e.length;n=t)&&(i=this.getQueuedFiles(),i.length>0)){if(this.options.uploadMultiple)return this.processFiles(i.slice(0,t-n));for(;e=O;u=0<=O?++H:--H)o.append(this._getParamName(u),e[u],this._renameFilename(e[u].name));return this.submitRequest(k,o,e)},n.prototype.submitRequest=function(e,t,n){return e.send(t)},n.prototype._finished=function(e,t,i){var r,o,s;for(o=0,s=e.length;ou;)t=r[4*(l-1)+3],0===t?o=l:u=l,l=o+u>>1;return c=l/s,0===c?1:c},s=function(e,t,n,i,r,s,a,l,c,u){var d;return d=o(t),e.drawImage(t,n,i,r,s,a,l,c,u/d)},r=function(e,t){var n,i,r,o,s,a,l,c,u;if(r=!1,u=!0,i=e.document,c=i.documentElement,n=i.addEventListener?"addEventListener":"attachEvent",l=i.addEventListener?"removeEventListener":"detachEvent",a=i.addEventListener?"":"on",o=function(n){if("readystatechange"!==n.type||"complete"===i.readyState)return("load"===n.type?e:i)[l](a+n.type,o,!1),!r&&(r=!0)?t.call(e,n.type||n):void 0},s=function(){var e;try{c.doScroll("left")}catch(t){return e=t,void setTimeout(s,50)}return o("poll")},"complete"!==i.readyState){if(i.createEventObject&&c.doScroll){try{u=!e.frameElement}catch(e){}u&&s()}return i[n](a+"DOMContentLoaded",o,!1),i[n](a+"readystatechange",o,!1),e[n](a+"load",o,!1)}},e._autoDiscoverFunction=function(){if(e.autoDiscover)return e.discover()},r(window,e._autoDiscoverFunction)}).call(this)}),define("dropzone",["dropzone/dist/dropzone"],function(e){return e}),define("text!dropzone/dist/basic.css",["module"],function(e){e.exports="/*\n * The MIT License\n * Copyright (c) 2012 Matias Meno \n */\n.dropzone, .dropzone * {\n box-sizing: border-box; }\n\n.dropzone {\n position: relative; }\n .dropzone .dz-preview {\n position: relative;\n display: inline-block;\n width: 120px;\n margin: 0.5em; }\n .dropzone .dz-preview .dz-progress {\n display: block;\n height: 15px;\n border: 1px solid #aaa; }\n .dropzone .dz-preview .dz-progress .dz-upload {\n display: block;\n height: 100%;\n width: 0;\n background: green; }\n .dropzone .dz-preview .dz-error-message {\n color: red;\n display: none; }\n .dropzone .dz-preview.dz-error .dz-error-message, .dropzone .dz-preview.dz-error .dz-error-mark {\n display: block; }\n .dropzone .dz-preview.dz-success .dz-success-mark {\n display: block; }\n .dropzone .dz-preview .dz-error-mark, .dropzone .dz-preview .dz-success-mark {\n position: absolute;\n display: none;\n left: 30px;\n top: 30px;\n width: 54px;\n height: 58px;\n left: 50%;\n margin-left: -27px; }\n"}),!function(e,t,n,i){n.swipebox=function(r,o){var s,a,l={useCSS:!0,useSVG:!0,initialIndexOnArray:0,removeBarsOnMobile:!0,hideCloseButtonOnMobile:!1,hideBarsDelay:3e3,videoMaxWidth:1140,vimeoColor:"cccccc",beforeOpen:null,afterOpen:null,afterClose:null,afterMedia:null,nextSlide:null,prevSlide:null,loopAtEnd:!1,autoplayVideos:!1,queryStringData:{},toggleClassOnLoad:""},c=this,u=[],d=r.selector,h=navigator.userAgent.match(/(iPad)|(iPhone)|(iPod)|(Android)|(PlayBook)|(BB10)|(BlackBerry)|(Opera Mini)|(IEMobile)|(webOS)|(MeeGo)/i),f=null!==h||t.createTouch!==i||"ontouchstart"in e||"onmsgesturechange"in e||navigator.msMaxTouchPoints,p=!!t.createElementNS&&!!t.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,g=e.innerWidth?e.innerWidth:n(e).width(),m=e.innerHeight?e.innerHeight:n(e).height(),v=0,y='
    \t\t\t\t\t
    \t\t\t\t\t\t
    \t\t\t\t\t\t
    \t\t\t\t\t\t\t
    \t\t\t\t\t\t
    \t\t\t\t\t\t
    \t\t\t\t\t\t\t
    \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
    \t\t\t\t\t\t
    \t\t\t\t\t\t\t\t\t\t\t
    \t\t\t
    ';c.settings={},n.swipebox.close=function(){s.closeSlide()},n.swipebox.destroy=function(){n(t).off("click.swipebox")},n.swipebox.extend=function(){return s},c.init=function(){c.settings=n.extend({},l,o),n.isArray(r)?(u=r,s.target=n(e),s.init(c.settings.initialIndexOnArray)):n(t).on("click.swipebox",d,function(e){if("slide current"===e.target.parentNode.className)return!1;n.isArray(r)||(s.destroy(),a=n(d),s.actions()),u=[];var t,i,o;o||(i="data-rel",o=n(this).attr(i)),o||(i="rel",o=n(this).attr(i)),a=o&&""!==o&&"nofollow"!==o?n(d).filter("["+i+'="'+o+'"]'):n(d),a.each(function(){var e=null,t=null;n(this).attr("title")&&(e=n(this).attr("title")),n(this).attr("href")&&(t=n(this).attr("href")),u.push({href:t,title:e})}),t=a.index(n(this)),e.preventDefault(),e.stopPropagation(),s.target=n(e.target),s.init(t)})},s={init:function(e){c.settings.beforeOpen&&c.settings.beforeOpen(),this.target.trigger("swipebox-start"), -n.swipebox.isOpen=!0,this.build(),this.openSlide(e),this.openMedia(e),this.preloadMedia(e+1),this.preloadMedia(e-1),c.settings.afterOpen&&c.settings.afterOpen(e)},build:function(){var e,t=this;n("body").append(y),p&&c.settings.useSVG===!0&&(e=n("#swipebox-close").css("background-image"),e=e.replace("png","svg"),n("#swipebox-prev, #swipebox-next, #swipebox-close").css({"background-image":e})),h&&c.settings.removeBarsOnMobile&&n("#swipebox-bottom-bar, #swipebox-top-bar").remove(),n.each(u,function(){n("#swipebox-slider").append('
    ')}),t.setDim(),t.actions(),f&&t.gesture(),t.keyboard(),t.animBars(),t.resize()},setDim:function(){var t,i,r={};"onorientationchange"in e?e.addEventListener("orientationchange",function(){0===e.orientation?(t=g,i=m):90!==e.orientation&&-90!==e.orientation||(t=m,i=g)},!1):(t=e.innerWidth?e.innerWidth:n(e).width(),i=e.innerHeight?e.innerHeight:n(e).height()),r={width:t,height:i},n("#swipebox-overlay").css(r)},resize:function(){var t=this;n(e).resize(function(){t.setDim()}).resize()},supportTransition:function(){var e,n="transition WebkitTransition MozTransition OTransition msTransition KhtmlTransition".split(" ");for(e=0;e=h||l)){var m=.75-Math.abs(i)/y.height();y.css({top:i+"px"}),y.css({opacity:m}),l=!0}r=t,t=p.pageX-f.pageX,s=100*t/g,!c&&!l&&Math.abs(t)>=d&&(n("#swipebox-slider").css({"-webkit-transition":"",transition:""}),c=!0),c&&(t>0?0===e?n("#swipebox-overlay").addClass("leftSpringTouch"):(n("#swipebox-overlay").removeClass("leftSpringTouch").removeClass("rightSpringTouch"),n("#swipebox-slider").css({"-webkit-transform":"translate3d("+(v+s)+"%, 0, 0)",transform:"translate3d("+(v+s)+"%, 0, 0)"})):0>t&&(u.length===e+1?n("#swipebox-overlay").addClass("rightSpringTouch"):(n("#swipebox-overlay").removeClass("leftSpringTouch").removeClass("rightSpringTouch"),n("#swipebox-slider").css({"-webkit-transform":"translate3d("+(v+s)+"%, 0, 0)",transform:"translate3d("+(v+s)+"%, 0, 0)"}))))}),!1}).bind("touchend",function(e){if(e.preventDefault(),e.stopPropagation(),n("#swipebox-slider").css({"-webkit-transition":"-webkit-transform 0.4s ease",transition:"transform 0.4s ease"}),i=p.pageY-f.pageY,t=p.pageX-f.pageX,s=100*t/g,l)if(l=!1,Math.abs(i)>=2*h&&Math.abs(i)>Math.abs(o)){var u=i>0?y.height():-y.height();y.animate({top:u+"px",opacity:0},300,function(){a.closeSlide()})}else y.animate({top:0,opacity:1},300);else c?(c=!1,t>=d&&t>=r?a.getPrev():-d>=t&&r>=t&&a.getNext()):m.hasClass("visible-bars")?(a.clearTimeout(),a.hideBars()):(a.showBars(),a.setTimeout());n("#swipebox-slider").css({"-webkit-transform":"translate3d("+v+"%, 0, 0)",transform:"translate3d("+v+"%, 0, 0)"}),n("#swipebox-overlay").removeClass("leftSpringTouch").removeClass("rightSpringTouch"),n(".touching").off("touchmove").removeClass("touching")})},setTimeout:function(){if(c.settings.hideBarsDelay>0){var t=this;t.clearTimeout(),t.timeout=e.setTimeout(function(){t.hideBars()},c.settings.hideBarsDelay)}},clearTimeout:function(){e.clearTimeout(this.timeout),this.timeout=null},showBars:function(){var e=n("#swipebox-top-bar, #swipebox-bottom-bar");this.doCssTrans()?e.addClass("visible-bars"):(n("#swipebox-top-bar").animate({top:0},500),n("#swipebox-bottom-bar").animate({bottom:0},500),setTimeout(function(){e.addClass("visible-bars")},1e3))},hideBars:function(){var e=n("#swipebox-top-bar, #swipebox-bottom-bar");this.doCssTrans()?e.removeClass("visible-bars"):(n("#swipebox-top-bar").animate({top:"-50px"},500),n("#swipebox-bottom-bar").animate({bottom:"-50px"},500),setTimeout(function(){e.removeClass("visible-bars")},1e3))},animBars:function(){var e=this,t=n("#swipebox-top-bar, #swipebox-bottom-bar");t.addClass("visible-bars"),e.setTimeout(),n("#swipebox-slider").click(function(){t.hasClass("visible-bars")||(e.showBars(),e.setTimeout())}),n("#swipebox-bottom-bar").hover(function(){e.showBars(),t.addClass("visible-bars"),e.clearTimeout()},function(){c.settings.hideBarsDelay>0&&(t.removeClass("visible-bars"),e.setTimeout())})},keyboard:function(){var t=this;n(e).bind("keyup",function(e){e.preventDefault(),e.stopPropagation(),37===e.keyCode?t.getPrev():39===e.keyCode?t.getNext():27===e.keyCode&&t.closeSlide()})},actions:function(){var e=this,t="touchend click";u.length<2?(n("#swipebox-bottom-bar").hide(),i===u[1]&&n("#swipebox-top-bar").hide()):(n("#swipebox-prev").bind(t,function(t){t.preventDefault(),t.stopPropagation(),e.getPrev(),e.setTimeout()}),n("#swipebox-next").bind(t,function(t){t.preventDefault(),t.stopPropagation(),e.getNext(),e.setTimeout()})),n("#swipebox-close").bind(t,function(){e.closeSlide()})},setSlide:function(e,t){t=t||!1;var i=n("#swipebox-slider");v=100*-e,this.doCssTrans()?i.css({"-webkit-transform":"translate3d("+100*-e+"%, 0, 0)",transform:"translate3d("+100*-e+"%, 0, 0)"}):i.animate({left:100*-e+"%"}),n("#swipebox-slider .slide").removeClass("current"),n("#swipebox-slider .slide").eq(e).addClass("current"),this.setTitle(e),t&&i.fadeIn(),n("#swipebox-prev, #swipebox-next").removeClass("disabled"),0===e?n("#swipebox-prev").addClass("disabled"):e===u.length-1&&c.settings.loopAtEnd!==!0&&n("#swipebox-next").addClass("disabled")},openSlide:function(t){n("html").addClass("swipebox-html"),f?(n("html").addClass("swipebox-touch"),c.settings.hideCloseButtonOnMobile&&n("html").addClass("swipebox-no-close-button")):n("html").addClass("swipebox-no-touch"),n(e).trigger("resize"),this.setSlide(t,!0)},preloadMedia:function(e){var t=this,n=null;u[e]!==i&&(n=u[e].href),t.isVideo(n)?t.openMedia(e):setTimeout(function(){t.openMedia(e)},1e3)},openMedia:function(e){var t,r,o=this;return u[e]!==i&&(t=u[e].href),!(0>e||e>=u.length)&&(r=n("#swipebox-slider .slide").eq(e),void(o.isVideo(t)?(r.html(o.getVideo(t)),c.settings.afterMedia&&c.settings.afterMedia(e)):(r.addClass("slide-loading"),o.loadMedia(t,function(){r.removeClass("slide-loading"),r.html(this),c.settings.afterMedia&&c.settings.afterMedia(e)}))))},setTitle:function(e){var t=null;n("#swipebox-title").empty(),u[e]!==i&&(t=u[e].title),t?(n("#swipebox-top-bar").show(),n("#swipebox-title").append(t)):n("#swipebox-top-bar").hide()},isVideo:function(e){if(e){if(e.match(/(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/)||e.match(/vimeo\.com\/([0-9]*)/)||e.match(/youtu\.be\/([a-zA-Z0-9\-_]+)/))return!0;if(e.toLowerCase().indexOf("swipeboxvideo=1")>=0)return!0}},parseUri:function(e,i){var r=t.createElement("a"),o={};return r.href=decodeURIComponent(e),r.search&&(o=JSON.parse('{"'+r.search.toLowerCase().replace("?","").replace(/&/g,'","').replace(/=/g,'":"')+'"}')),n.isPlainObject(i)&&(o=n.extend(o,i,c.settings.queryStringData)),n.map(o,function(e,t){return e&&e>""?encodeURIComponent(t)+"="+encodeURIComponent(e):void 0}).join("&")},getVideo:function(e){var t="",n=e.match(/((?:www\.)?youtube\.com|(?:www\.)?youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/),i=e.match(/(?:www\.)?youtu\.be\/([a-zA-Z0-9\-_]+)/),r=e.match(/(?:www\.)?vimeo\.com\/([0-9]*)/),o="";return n||i?(i&&(n=i),o=s.parseUri(e,{autoplay:c.settings.autoplayVideos?"1":"0",v:""}),t=''):r?(o=s.parseUri(e,{autoplay:c.settings.autoplayVideos?"1":"0",byline:"0",portrait:"0",color:c.settings.vimeoColor}),t=''):t='','
    '+t+"
    "},loadMedia:function(e,t){if(0===e.trim().indexOf("#"))t.call(n("
    ",{class:"swipebox-inline-container"}).append(n(e).clone().toggleClass(c.settings.toggleClassOnLoad)));else if(!this.isVideo(e)){var i=n("").on("load",function(){t.call(i)});i.attr("src",e)}},getNext:function(){var e,t=this,i=n("#swipebox-slider .slide").index(n("#swipebox-slider .slide.current"));i+10?(e=n("#swipebox-slider .slide").eq(t).contents().find("iframe").attr("src"),n("#swipebox-slider .slide").eq(t).contents().find("iframe").attr("src",e),t--,this.setSlide(t),this.preloadMedia(t-1),c.settings.prevSlide&&c.settings.prevSlide(t)):(n("#swipebox-overlay").addClass("leftSpring"),setTimeout(function(){n("#swipebox-overlay").removeClass("leftSpring")},500))},nextSlide:function(e){},prevSlide:function(e){},closeSlide:function(){n("html").removeClass("swipebox-html"),n("html").removeClass("swipebox-touch"),n(e).trigger("resize"),this.destroy()},destroy:function(){n(e).unbind("keyup"),n("body").unbind("touchstart"),n("body").unbind("touchmove"),n("body").unbind("touchend"),n("#swipebox-slider").unbind(),n("#swipebox-overlay").remove(),n.isArray(r)||r.removeData("_swipebox"),this.target&&this.target.trigger("swipebox-destroy"),n.swipebox.isOpen=!1,c.settings.afterClose&&c.settings.afterClose()}},c.init()},n.fn.swipebox=function(e){if(!n.data(this,"_swipebox")){var t=new n.swipebox(this,e);this.data("_swipebox",t)}return this.data("_swipebox")}}(window,document,jQuery),define("swipebox/src/js/jquery.swipebox.min",["jquery"],function(){}),define("swipebox",["swipebox/src/js/jquery.swipebox.min"],function(e){return e}),define("text!swipebox/src/css/swipebox.min.css",["module"],function(e){e.exports="/*! Swipebox v1.3.0 | Constantin Saguin csag.co | MIT License | github.com/brutaldesign/swipebox */html.swipebox-html.swipebox-touch{overflow:hidden!important}#swipebox-overlay img{border:none!important}#swipebox-overlay{width:100%;height:100%;position:fixed;top:0;left:0;z-index:99999!important;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#swipebox-container{position:relative;width:100%;height:100%}#swipebox-slider{-webkit-transition:-webkit-transform .4s ease;transition:transform .4s ease;height:100%;left:0;top:0;width:100%;white-space:nowrap;position:absolute;display:none;cursor:pointer}#swipebox-slider .slide{height:100%;width:100%;line-height:1px;text-align:center;display:inline-block}#swipebox-slider .slide:before{content:\"\";display:inline-block;height:50%;width:1px;margin-right:-1px}#swipebox-slider .slide .swipebox-inline-container,#swipebox-slider .slide .swipebox-video-container,#swipebox-slider .slide img{display:inline-block;max-height:100%;max-width:100%;margin:0;padding:0;width:auto;height:auto;vertical-align:middle}#swipebox-slider .slide .swipebox-video-container{background:0 0;max-width:1140px;max-height:100%;width:100%;padding:5%;-webkit-box-sizing:border-box;box-sizing:border-box}#swipebox-slider .slide .swipebox-video-container .swipebox-video{width:100%;height:0;padding-bottom:56.25%;overflow:hidden;position:relative}#swipebox-slider .slide .swipebox-video-container .swipebox-video iframe{width:100%!important;height:100%!important;position:absolute;top:0;left:0}#swipebox-slider .slide-loading{background:url(../img/loader.gif) center center no-repeat}#swipebox-bottom-bar,#swipebox-top-bar{-webkit-transition:.5s;transition:.5s;position:absolute;left:0;z-index:999;height:50px;width:100%}#swipebox-bottom-bar{bottom:-50px}#swipebox-bottom-bar.visible-bars{-webkit-transform:translate3d(0,-50px,0);transform:translate3d(0,-50px,0)}#swipebox-top-bar{top:-50px}#swipebox-top-bar.visible-bars{-webkit-transform:translate3d(0,50px,0);transform:translate3d(0,50px,0)}#swipebox-title{display:block;width:100%;text-align:center}#swipebox-close,#swipebox-next,#swipebox-prev{background-image:url(../img/icons.png);background-repeat:no-repeat;border:none!important;text-decoration:none!important;cursor:pointer;width:50px;height:50px;top:0}#swipebox-arrows{display:block;margin:0 auto;width:100%;height:50px}#swipebox-prev{background-position:-32px 13px;float:left}#swipebox-next{background-position:-78px 13px;float:right}#swipebox-close{top:0;right:0;position:absolute;z-index:9999;background-position:15px 12px}.swipebox-no-close-button #swipebox-close{display:none}#swipebox-next.disabled,#swipebox-prev.disabled{opacity:.3}.swipebox-no-touch #swipebox-overlay.rightSpring #swipebox-slider{-webkit-animation:rightSpring .3s;animation:rightSpring .3s}.swipebox-no-touch #swipebox-overlay.leftSpring #swipebox-slider{-webkit-animation:leftSpring .3s;animation:leftSpring .3s}.swipebox-touch #swipebox-container:after,.swipebox-touch #swipebox-container:before{-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transition:all .3s ease;transition:all .3s ease;content:' ';position:absolute;z-index:999;top:0;height:100%;width:20px;opacity:0}.swipebox-touch #swipebox-container:before{left:0;-webkit-box-shadow:inset 10px 0 10px -8px #656565;box-shadow:inset 10px 0 10px -8px #656565}.swipebox-touch #swipebox-container:after{right:0;-webkit-box-shadow:inset -10px 0 10px -8px #656565;box-shadow:inset -10px 0 10px -8px #656565}.swipebox-touch #swipebox-overlay.leftSpringTouch #swipebox-container:before,.swipebox-touch #swipebox-overlay.rightSpringTouch #swipebox-container:after{opacity:1}@-webkit-keyframes rightSpring{0%{left:0}50%{left:-30px}100%{left:0}}@keyframes rightSpring{0%{left:0}50%{left:-30px}100%{left:0}}@-webkit-keyframes leftSpring{0%{left:0}50%{left:30px}100%{left:0}}@keyframes leftSpring{0%{left:0}50%{left:30px}100%{left:0}}@media screen and (min-width:800px){#swipebox-close{right:10px}#swipebox-arrows{width:92%;max-width:800px}}#swipebox-overlay{background:#0d0d0d}#swipebox-bottom-bar,#swipebox-top-bar{text-shadow:1px 1px 1px #000;background:#000;opacity:.95}#swipebox-top-bar{color:#fff!important;font-size:15px;line-height:43px;font-family:Helvetica,Arial,sans-serif}"}),!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define("simplemde/dist/simplemde.min",[],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.SimpleMDE=e()}}(function(){var e;return function e(t,n,i){function r(s,a){if(!n[s]){if(!t[s]){var l="function"==typeof require&&require;if(!a&&l)return l(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[s]={exports:{}};t[s][0].call(u.exports,function(e){var n=t[s][1][e];return r(n?n:e)},u,u.exports,e,t,n,i)}return n[s].exports}for(var o="function"==typeof require&&require,s=0;st;++t)l[t]=e[t],c[e.charCodeAt(t)]=t;c["-".charCodeAt(0)]=62,c["_".charCodeAt(0)]=63}function r(e){var t,n,i,r,o,s,a=e.length;if(a%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===e[a-2]?2:"="===e[a-1]?1:0,s=new u(3*a/4-o),i=o>0?a-4:a;var l=0;for(t=0,n=0;i>t;t+=4,n+=3)r=c[e.charCodeAt(t)]<<18|c[e.charCodeAt(t+1)]<<12|c[e.charCodeAt(t+2)]<<6|c[e.charCodeAt(t+3)],s[l++]=r>>16&255,s[l++]=r>>8&255,s[l++]=255&r;return 2===o?(r=c[e.charCodeAt(t)]<<2|c[e.charCodeAt(t+1)]>>4,s[l++]=255&r):1===o&&(r=c[e.charCodeAt(t)]<<10|c[e.charCodeAt(t+1)]<<4|c[e.charCodeAt(t+2)]>>2,s[l++]=r>>8&255,s[l++]=255&r),s}function o(e){return l[e>>18&63]+l[e>>12&63]+l[e>>6&63]+l[63&e]}function s(e,t,n){for(var i,r=[],s=t;n>s;s+=3)i=(e[s]<<16)+(e[s+1]<<8)+e[s+2],r.push(o(i));return r.join("")}function a(e){for(var t,n=e.length,i=n%3,r="",o=[],a=16383,c=0,u=n-i;u>c;c+=a)o.push(s(e,c,c+a>u?u:c+a));return 1===i?(t=e[n-1],r+=l[t>>2],r+=l[t<<4&63],r+="=="):2===i&&(t=(e[n-2]<<8)+e[n-1],r+=l[t>>10],r+=l[t>>4&63],r+=l[t<<2&63],r+="="),o.push(r),o.join("")}n.toByteArray=r,n.fromByteArray=a;var l=[],c=[],u="undefined"!=typeof Uint8Array?Uint8Array:Array;i()},{}],2:[function(e,t,n){},{}],3:[function(e,t,n){(function(t){"use strict";function i(){try{var e=new Uint8Array(1);return e.foo=function(){return 42},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}function r(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e,t){if(r()=t?o(e,t):void 0!==n?"string"==typeof i?o(e,t).fill(n,i):o(e,t).fill(n):o(e,t)}function u(e,t){if(l(t),e=o(e,0>t?0:0|g(t)),!s.TYPED_ARRAY_SUPPORT)for(var n=0;t>n;n++)e[n]=0;return e}function d(e,t,n){if("string"==typeof n&&""!==n||(n="utf8"),!s.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var i=0|v(t,n);return e=o(e,i),e.write(t,n),e}function h(e,t){var n=0|g(t.length);e=o(e,n);for(var i=0;n>i;i+=1)e[i]=255&t[i];return e}function f(e,t,n,i){if(t.byteLength,0>n||t.byteLength=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|e}function m(e){return+e!=e&&(e=0),s.alloc(+e)}function v(e,t){if(s.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"binary":case"raw":case"raws":return n;case"utf8":case"utf-8":case void 0:return U(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return V(e).length;default:if(i)return U(e).length;t=(""+t).toLowerCase(),i=!0}}function y(e,t,n){var i=!1;if((void 0===t||0>t)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),0>=n)return"";if(n>>>=0,t>>>=0,t>=n)return"";for(e||(e="utf8");;)switch(e){case"hex":return N(this,t,n);case"utf8":case"utf-8":return L(this,t,n);case"ascii":return M(this,t,n);case"binary":return H(this,t,n);case"base64":return _(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,n);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function b(e,t,n){var i=e[t];e[t]=e[n],e[n]=i}function w(e,t,n,i){function r(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}var o=1,s=e.length,a=t.length;if(void 0!==i&&(i=String(i).toLowerCase(),"ucs2"===i||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;o=2,s/=2,a/=2,n/=2}for(var l=-1,c=0;s>n+c;c++)if(r(e,n+c)===r(t,-1===l?0:c-l)){if(-1===l&&(l=c),c-l+1===a)return(n+l)*o}else-1!==l&&(c-=c-l),l=-1;return-1}function x(e,t,n,i){n=Number(n)||0;var r=e.length-n;i?(i=Number(i),i>r&&(i=r)):i=r;var o=t.length;if(o%2!==0)throw new Error("Invalid hex string");i>o/2&&(i=o/2);for(var s=0;i>s;s++){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[n+s]=a}return s}function k(e,t,n,i){return $(U(t,e.length-n),e,n,i)}function S(e,t,n,i){return $(q(t),e,n,i)}function C(e,t,n,i){return S(e,t,n,i)}function T(e,t,n,i){return $(V(t),e,n,i)}function E(e,t,n,i){return $(G(t,e.length-n),e,n,i)}function _(e,t,n){return 0===t&&n===e.length?X.fromByteArray(e):X.fromByteArray(e.slice(t,n))}function L(e,t,n){n=Math.min(e.length,n);for(var i=[],r=t;n>r;){var o=e[r],s=null,a=o>239?4:o>223?3:o>191?2:1;if(n>=r+a){var l,c,u,d;switch(a){case 1:128>o&&(s=o);break;case 2:l=e[r+1],128===(192&l)&&(d=(31&o)<<6|63&l,d>127&&(s=d));break;case 3:l=e[r+1],c=e[r+2],128===(192&l)&&128===(192&c)&&(d=(15&o)<<12|(63&l)<<6|63&c,d>2047&&(55296>d||d>57343)&&(s=d));break;case 4:l=e[r+1],c=e[r+2],u=e[r+3],128===(192&l)&&128===(192&c)&&128===(192&u)&&(d=(15&o)<<18|(63&l)<<12|(63&c)<<6|63&u,d>65535&&1114112>d&&(s=d))}}null===s?(s=65533,a=1):s>65535&&(s-=65536,i.push(s>>>10&1023|55296),s=56320|1023&s),i.push(s),r+=a}return D(i)}function D(e){var t=e.length;if(J>=t)return String.fromCharCode.apply(String,e);for(var n="",i=0;t>i;)n+=String.fromCharCode.apply(String,e.slice(i,i+=J));return n}function M(e,t,n){var i="";n=Math.min(e.length,n);for(var r=t;n>r;r++)i+=String.fromCharCode(127&e[r]);return i}function H(e,t,n){var i="";n=Math.min(e.length,n);for(var r=t;n>r;r++)i+=String.fromCharCode(e[r]);return i}function N(e,t,n){var i=e.length;(!t||0>t)&&(t=0),(!n||0>n||n>i)&&(n=i);for(var r="",o=t;n>o;o++)r+=Y(e[o]);return r}function A(e,t,n){for(var i=e.slice(t,n),r="",o=0;oe)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,n,i,r,o){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||o>t)throw new RangeError('"value" argument is out of bounds');if(n+i>e.length)throw new RangeError("Index out of range")}function I(e,t,n,i){0>t&&(t=65535+t+1);for(var r=0,o=Math.min(e.length-n,2);o>r;r++)e[n+r]=(t&255<<8*(i?r:1-r))>>>8*(i?r:1-r)}function O(e,t,n,i){0>t&&(t=4294967295+t+1);for(var r=0,o=Math.min(e.length-n,4);o>r;r++)e[n+r]=t>>>8*(i?r:3-r)&255}function F(e,t,n,i,r,o){if(n+i>e.length)throw new RangeError("Index out of range");if(0>n)throw new RangeError("Index out of range")}function P(e,t,n,i,r){return r||F(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),Q.write(e,t,n,i,23,4),n+4}function W(e,t,n,i,r){return r||F(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),Q.write(e,t,n,i,52,8),n+8}function B(e){if(e=j(e).replace(ee,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function j(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function Y(e){return 16>e?"0"+e.toString(16):e.toString(16)}function U(e,t){t=t||1/0;for(var n,i=e.length,r=null,o=[],s=0;i>s;s++){if(n=e.charCodeAt(s),n>55295&&57344>n){if(!r){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===i){(t-=3)>-1&&o.push(239,191,189);continue}r=n;continue}if(56320>n){(t-=3)>-1&&o.push(239,191,189),r=n;continue}n=(r-55296<<10|n-56320)+65536}else r&&(t-=3)>-1&&o.push(239,191,189);if(r=null,128>n){if((t-=1)<0)break;o.push(n)}else if(2048>n){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(65536>n){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(1114112>n))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function q(e){for(var t=[],n=0;n>8,r=n%256,o.push(r),o.push(i);return o}function V(e){return X.toByteArray(B(e))}function $(e,t,n,i){for(var r=0;i>r&&!(r+n>=t.length||r>=e.length);r++)t[r+n]=e[r];return r}function Z(e){return e!==e}var X=e("base64-js"),Q=e("ieee754"),K=e("isarray");n.Buffer=s,n.SlowBuffer=m,n.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:i(),n.kMaxLength=r(),s.poolSize=8192,s._augment=function(e){return e.__proto__=s.prototype,e},s.from=function(e,t,n){return a(null,e,t,n)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(e,t,n){return c(null,e,t,n)},s.allocUnsafe=function(e){return u(null,e)},s.allocUnsafeSlow=function(e){return u(null,e)},s.isBuffer=function(e){return!(null==e||!e._isBuffer)},s.compare=function(e,t){if(!s.isBuffer(e)||!s.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,i=t.length,r=0,o=Math.min(n,i);o>r;++r)if(e[r]!==t[r]){n=e[r],i=t[r];break}return i>n?-1:n>i?1:0},s.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(e,t){if(!K(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return s.alloc(0);var n;if(void 0===t)for(t=0,n=0;nt;t+=2)b(this,t,t+1);return this},s.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;e>t;t+=4)b(this,t,t+3),b(this,t+1,t+2);return this},s.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?L(this,0,e):y.apply(this,arguments)},s.prototype.equals=function(e){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===s.compare(this,e)},s.prototype.inspect=function(){var e="",t=n.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},s.prototype.compare=function(e,t,n,i,r){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===r&&(r=this.length),0>t||n>e.length||0>i||r>this.length)throw new RangeError("out of range index");if(i>=r&&t>=n)return 0;if(i>=r)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,i>>>=0,r>>>=0,this===e)return 0;for(var o=r-i,a=n-t,l=Math.min(o,a),c=this.slice(i,r),u=e.slice(t,n),d=0;l>d;++d)if(c[d]!==u[d]){o=c[d],a=u[d];break}return a>o?-1:o>a?1:0},s.prototype.indexOf=function(e,t,n){if("string"==typeof t?(n=t,t=0):t>2147483647?t=2147483647:-2147483648>t&&(t=-2147483648),t>>=0,0===this.length)return-1;if(t>=this.length)return-1;if(0>t&&(t=Math.max(this.length+t,0)),"string"==typeof e&&(e=s.from(e,n)),s.isBuffer(e))return 0===e.length?-1:w(this,e,t,n);if("number"==typeof e)return s.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,e,t):w(this,[e],t,n);throw new TypeError("val must be string, number or Buffer")},s.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},s.prototype.write=function(e,t,n,i){if(void 0===t)i="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)i=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===i&&(i="utf8")):(i=n,n=void 0)}var r=this.length-t;if((void 0===n||n>r)&&(n=r),e.length>0&&(0>n||0>t)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return x(this,e,t,n);case"utf8":case"utf-8":return k(this,e,t,n);case"ascii":return S(this,e,t,n);case"binary":return C(this,e,t,n);case"base64":return T(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var J=4096;s.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),0>t?(t+=n,0>t&&(t=0)):t>n&&(t=n),e>t&&(t=e);var i;if(s.TYPED_ARRAY_SUPPORT)i=this.subarray(e,t),i.__proto__=s.prototype;else{var r=t-e;i=new s(r,void 0);for(var o=0;r>o;o++)i[o]=this[o+e]}return i},s.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||z(e,t,this.length);for(var i=this[e],r=1,o=0;++o0&&(r*=256);)i+=this[e+--t]*r;return i},s.prototype.readUInt8=function(e,t){return t||z(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return t||z(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return t||z(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return t||z(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return t||z(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||z(e,t,this.length);for(var i=this[e],r=1,o=0;++o=r&&(i-=Math.pow(2,8*t)),i},s.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||z(e,t,this.length);for(var i=t,r=1,o=this[e+--i];i>0&&(r*=256);)o+=this[e+--i]*r;return r*=128,o>=r&&(o-=Math.pow(2,8*t)),o},s.prototype.readInt8=function(e,t){return t||z(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){t||z(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(e,t){t||z(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(e,t){return t||z(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return t||z(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){ -return t||z(e,4,this.length),Q.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return t||z(e,4,this.length),Q.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return t||z(e,8,this.length),Q.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return t||z(e,8,this.length),Q.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,n,i){if(e=+e,t|=0,n|=0,!i){var r=Math.pow(2,8*n)-1;R(this,e,t,n,r,0)}var o=1,s=0;for(this[t]=255&e;++s=0&&(s*=256);)this[t+o]=e/s&255;return t+n},s.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,1,255,0),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):I(this,e,t,!0),t+2},s.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):I(this,e,t,!1),t+2},s.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):O(this,e,t,!0),t+4},s.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):O(this,e,t,!1),t+4},s.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t|=0,!i){var r=Math.pow(2,8*n-1);R(this,e,t,n,r-1,-r)}var o=0,s=1,a=0;for(this[t]=255&e;++oe&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},s.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t|=0,!i){var r=Math.pow(2,8*n-1);R(this,e,t,n,r-1,-r)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)0>e&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},s.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,1,127,-128),s.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):I(this,e,t,!0),t+2},s.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):I(this,e,t,!1),t+2},s.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):O(this,e,t,!0),t+4},s.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,2147483647,-2147483648),0>e&&(e=4294967295+e+1),s.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):O(this,e,t,!1),t+4},s.prototype.writeFloatLE=function(e,t,n){return P(this,e,t,!0,n)},s.prototype.writeFloatBE=function(e,t,n){return P(this,e,t,!1,n)},s.prototype.writeDoubleLE=function(e,t,n){return W(this,e,t,!0,n)},s.prototype.writeDoubleBE=function(e,t,n){return W(this,e,t,!1,n)},s.prototype.copy=function(e,t,n,i){if(n||(n=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&n>i&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(0>t)throw new RangeError("targetStart out of bounds");if(0>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>i)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-tn&&i>t)for(r=o-1;r>=0;r--)e[r+t]=this[r+n];else if(1e3>o||!s.TYPED_ARRAY_SUPPORT)for(r=0;o>r;r++)e[r+t]=this[r+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},s.prototype.fill=function(e,t,n,i){if("string"==typeof e){if("string"==typeof t?(i=t,t=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),1===e.length){var r=e.charCodeAt(0);256>r&&(e=r)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!s.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof e&&(e&=255);if(0>t||this.length=n)return this;t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var o;if("number"==typeof e)for(o=t;n>o;o++)this[o]=e;else{var a=s.isBuffer(e)?e:U(new s(e,i).toString()),l=a.length;for(o=0;n-t>o;o++)this[o+t]=a[o%l]}return this};var ee=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":1,ieee754:15,isarray:16}],4:[function(e,t,n){"use strict";function i(e){return e=e||{},"function"!=typeof e.codeMirrorInstance||"function"!=typeof e.codeMirrorInstance.defineMode?void console.log("CodeMirror Spell Checker: You must provide an instance of CodeMirror via the option `codeMirrorInstance`"):(String.prototype.includes||(String.prototype.includes=function(){return-1!==String.prototype.indexOf.apply(this,arguments)}),void e.codeMirrorInstance.defineMode("spell-checker",function(t){if(!i.aff_loading){i.aff_loading=!0;var n=new XMLHttpRequest;n.open("GET","https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.aff",!0),n.onload=function(){4===n.readyState&&200===n.status&&(i.aff_data=n.responseText,i.num_loaded++,2==i.num_loaded&&(i.typo=new r("en_US",i.aff_data,i.dic_data,{platform:"any"})))},n.send(null)}if(!i.dic_loading){i.dic_loading=!0;var o=new XMLHttpRequest;o.open("GET","https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.dic",!0),o.onload=function(){4===o.readyState&&200===o.status&&(i.dic_data=o.responseText,i.num_loaded++,2==i.num_loaded&&(i.typo=new r("en_US",i.aff_data,i.dic_data,{platform:"any"})))},o.send(null)}var s='!"#$%&()*+,-./:;<=>?@[\\]^_`{|}~ ',a={token:function(e){var t=e.peek(),n="";if(s.includes(t))return e.next(),null;for(;null!=(t=e.peek())&&!s.includes(t);)n+=t,e.next();return i.typo&&!i.typo.check(n)?"spell-error":null}},l=e.codeMirrorInstance.getMode(t,t.backdrop||"text/plain");return e.codeMirrorInstance.overlayMode(l,a,!0)}))}var r=e("typo-js");i.num_loaded=0,i.aff_loading=!1,i.dic_loading=!1,i.aff_data="",i.dic_data="",i.typo,t.exports=i},{"typo-js":18}],5:[function(t,n,i){!function(r){"object"==typeof i&&"object"==typeof n?r(t("../../lib/codemirror")):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],r):r(CodeMirror)}(function(e){"use strict";function t(e){var t=e.getWrapperElement();e.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:t.style.width,height:t.style.height},t.style.width="",t.style.height="auto",t.className+=" CodeMirror-fullscreen",document.documentElement.style.overflow="hidden",e.refresh()}function n(e){var t=e.getWrapperElement();t.className=t.className.replace(/\s*CodeMirror-fullscreen\b/,""),document.documentElement.style.overflow="";var n=e.state.fullScreenRestore;t.style.width=n.width,t.style.height=n.height,window.scrollTo(n.scrollLeft,n.scrollTop),e.refresh()}e.defineOption("fullScreen",!1,function(i,r,o){o==e.Init&&(o=!1),!o!=!r&&(r?t(i):n(i))})})},{"../../lib/codemirror":10}],6:[function(t,n,i){!function(r){"object"==typeof i&&"object"==typeof n?r(t("../../lib/codemirror")):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],r):r(CodeMirror)}(function(e){function t(e){e.state.placeholder&&(e.state.placeholder.parentNode.removeChild(e.state.placeholder),e.state.placeholder=null)}function n(e){t(e);var n=e.state.placeholder=document.createElement("pre");n.style.cssText="height: 0; overflow: visible",n.className="CodeMirror-placeholder";var i=e.getOption("placeholder");"string"==typeof i&&(i=document.createTextNode(i)),n.appendChild(i),e.display.lineSpace.insertBefore(n,e.display.lineSpace.firstChild)}function i(e){o(e)&&n(e)}function r(e){var i=e.getWrapperElement(),r=o(e);i.className=i.className.replace(" CodeMirror-empty","")+(r?" CodeMirror-empty":""),r?n(e):t(e)}function o(e){return 1===e.lineCount()&&""===e.getLine(0)}e.defineOption("placeholder","",function(n,o,s){var a=s&&s!=e.Init;if(o&&!a)n.on("blur",i),n.on("change",r),n.on("swapDoc",r),r(n);else if(!o&&a){n.off("blur",i),n.off("change",r),n.off("swapDoc",r),t(n);var l=n.getWrapperElement();l.className=l.className.replace(" CodeMirror-empty","")}o&&!n.hasFocus()&&i(n)})})},{"../../lib/codemirror":10}],7:[function(t,n,i){!function(r){"object"==typeof i&&"object"==typeof n?r(t("../../lib/codemirror")):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],r):r(CodeMirror)}(function(e){"use strict";var t=/^(\s*)(>[> ]*|[*+-]\s|(\d+)([.)]))(\s*)/,n=/^(\s*)(>[> ]*|[*+-]|(\d+)[.)])(\s*)$/,i=/[*+-]\s/;e.commands.newlineAndIndentContinueMarkdownList=function(r){if(r.getOption("disableInput"))return e.Pass;for(var o=r.listSelections(),s=[],a=0;a")>=0?f[2]:parseInt(f[3],10)+1+f[4];s[a]="\n"+p+m+g}}r.replaceSelections(s)}})},{"../../lib/codemirror":10}],8:[function(t,n,i){!function(r){"object"==typeof i&&"object"==typeof n?r(t("../../lib/codemirror")):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],r):r(CodeMirror)}(function(e){"use strict";e.overlayMode=function(t,n,i){return{startState:function(){return{base:e.startState(t),overlay:e.startState(n),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(i){return{base:e.copyState(t,i.base),overlay:e.copyState(n,i.overlay),basePos:i.basePos,baseCur:null,overlayPos:i.overlayPos,overlayCur:null}},token:function(e,r){return(e!=r.streamSeen||Math.min(r.basePos,r.overlayPos)=n.line,f=h?n:l(d,0),p=e.markText(u,f,{className:o});if(null==i?r.push(p):r.splice(i++,0,p),h)break;s=d}}function r(e){for(var t=e.state.markedSelection,n=0;n1)return o(e);var t=e.getCursor("start"),n=e.getCursor("end"),s=e.state.markedSelection;if(!s.length)return i(e,t,n);var l=s[0].find(),u=s[s.length-1].find();if(!l||!u||n.line-t.line=0||c(n,l.from)<=0)return o(e);for(;c(t,l.from)>0;)s.shift().clear(),l=s[0].find();for(c(t,l.from)<0&&(l.to.line-t.line0&&(n.line-u.from.linewo&&setTimeout(function(){l.display.input.reset(!0)},20),jt(this),Zr(),wt(this),this.curOp.forceUpdate=!0,Xi(this,r),i.autofocus&&!Do||l.hasFocus()?setTimeout(Fr(vn,this),20):yn(this);for(var u in ts)ts.hasOwnProperty(u)&&ts[u](this,i[u],ns);k(this),i.finishInit&&i.finishInit(this);for(var d=0;dwo&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),xo||mo&&Do||(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,n.init(i)}function n(t){t.doc.mode=e.getMode(t.options,t.doc.modeOption),i(t)}function i(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.frontier=e.doc.first,Pe(e,100),e.state.modeGen++,e.curOp&&Rt(e)}function r(e){e.options.lineWrapping?(Ks(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Qs(e.display.wrapper,"CodeMirror-wrap"),h(e)),s(e),Rt(e),at(e),setTimeout(function(){y(e)},100)}function o(e){var t=yt(e.display),n=e.options.lineWrapping,i=n&&Math.max(5,e.display.scroller.clientWidth/bt(e.display)-3);return function(r){if(ki(e.doc,r))return 0;var o=0;if(r.widgets)for(var s=0;st.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}function f(e){var t=Ar(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function p(e){var t=e.display,n=t.gutters.offsetWidth,i=Math.round(e.doc.height+Ue(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:i,scrollHeight:i+Ge(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function g(e,t,n){this.cm=n;var i=this.vert=jr("div",[jr("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),r=this.horiz=jr("div",[jr("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(i),e(r),Ms(i,"scroll",function(){i.clientHeight&&t(i.scrollTop,"vertical")}),Ms(r,"scroll",function(){r.clientWidth&&t(r.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,bo&&8>wo&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function m(){}function v(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&Qs(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new e.scrollbarModel[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),Ms(e,"mousedown",function(){t.state.focused&&setTimeout(function(){t.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,n){"horizontal"==n?on(t,e):rn(t,e)},t),t.display.scrollbars.addClass&&Ks(t.display.wrapper,t.display.scrollbars.addClass)}function y(e,t){t||(t=p(e));var n=e.display.barWidth,i=e.display.barHeight;b(e,t);for(var r=0;4>r&&n!=e.display.barWidth||i!=e.display.barHeight;r++)n!=e.display.barWidth&&e.options.lineWrapping&&H(e),b(e,p(e)),n=e.display.barWidth,i=e.display.barHeight}function b(e,t){var n=e.display,i=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=i.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=i.bottom)+"px",n.heightForcer.style.borderBottom=i.bottom+"px solid transparent",i.right&&i.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=i.bottom+"px",n.scrollbarFiller.style.width=i.right+"px"):n.scrollbarFiller.style.display="",i.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=i.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}function w(e,t,n){var i=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;i=Math.floor(i-Ye(e));var r=n&&null!=n.bottom?n.bottom:i+e.wrapper.clientHeight,o=nr(t,i),s=nr(t,r);if(n&&n.ensure){var a=n.ensure.from.line,l=n.ensure.to.line;o>a?(o=a,s=nr(t,ir(Qi(t,a))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=s&&(o=nr(t,ir(Qi(t,l))-e.wrapper.clientHeight),s=l)}return{from:o,to:Math.max(s,o+1)}}function x(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var i=C(t)-t.scroller.scrollLeft+e.doc.scrollLeft,r=t.gutters.offsetWidth,o=i+"px",s=0;s=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Bt(e))return!1;k(e)&&(Ot(e),t.dims=A(e));var r=i.first+i.size,o=Math.max(t.visible.from-e.options.viewportMargin,i.first),s=Math.min(r,t.visible.to+e.options.viewportMargin);n.viewFroms&&n.viewTo-s<20&&(s=Math.min(r,n.viewTo)),Oo&&(o=wi(e.doc,o),s=xi(e.doc,s));var a=o!=n.viewFrom||s!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Wt(e,o,s),n.viewOffset=ir(Qi(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var l=Bt(e);if(!a&&0==l&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=qr();return l>4&&(n.lineDiv.style.display="none"),z(e,n.updateLineNumbers,t.dims),l>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,c&&qr()!=c&&c.offsetHeight&&c.focus(),Yr(n.cursorDiv),Yr(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,a&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Pe(e,400)),n.updateLineNumbers=null,!0}function L(e,t){for(var n=t.viewport,i=!0;(i&&e.options.lineWrapping&&t.oldDisplayWidth!=Ve(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Ue(e.display)-$e(e),n.top)}),t.visible=w(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&_(e,t);i=!1){H(e);var r=p(e);ze(e),y(e,r),M(e,r)}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function D(e,t){var n=new T(e,t);if(_(e,n)){H(e),L(e,n);var i=p(e);ze(e),y(e,i),M(e,i),n.finish()}}function M(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Ge(e)+"px"}function H(e){for(var t=e.display,n=t.lineDiv.offsetTop,i=0;iwo){var s=o.node.offsetTop+o.node.offsetHeight;r=s-n,n=s}else{var a=o.node.getBoundingClientRect();r=a.bottom-a.top}var l=o.line.height-r;if(2>r&&(r=yt(t)),(l>.001||-.001>l)&&(er(o.line,r),N(o.line),o.rest))for(var c=0;c=t&&d.lineNumber;d.changes&&(Ar(d.changes,"gutter")>-1&&(h=!1),R(e,d,c,n)),h&&(Yr(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(S(e.options,c)))),a=d.node.nextSibling}else{var f=Y(e,d,c,n);s.insertBefore(f,a)}c+=d.size}for(;a;)a=i(a)}function R(e,t,n,i){for(var r=0;rwo&&(e.node.style.zIndex=2)),e.node}function O(e){var t=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(t&&(t+=" CodeMirror-linebackground"),e.background)t?e.background.className=t:(e.background.parentNode.removeChild(e.background),e.background=null);else if(t){var n=I(e);e.background=n.insertBefore(jr("div",null,t),n.firstChild)}}function F(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):Fi(e,t)}function P(e,t){var n=t.text.className,i=F(e,t);t.text==t.node&&(t.node=i.pre),t.text.parentNode.replaceChild(i.pre,t.text),t.text=i.pre,i.bgClass!=t.bgClass||i.textClass!=t.textClass?(t.bgClass=i.bgClass,t.textClass=i.textClass,W(t)):n&&(t.text.className=n)}function W(e){O(e),e.line.wrapClass?I(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var t=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=t||""}function B(e,t,n,i){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var r=I(t);t.gutterBackground=jr("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px; width: "+i.gutterTotalWidth+"px"),r.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var r=I(t),s=t.gutter=jr("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px");if(e.display.input.setUneditable(s),r.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(jr("div",S(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+i.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var a=0;a1)if(Wo&&Wo.text.join("\n")==t){if(i.ranges.length%Wo.text.length==0){l=[];for(var c=0;c=0;c--){var u=i.ranges[c],d=u.from(),h=u.to();u.empty()&&(n&&n>0?d=Fo(d.line,d.ch-n):e.state.overwrite&&!s?h=Fo(h.line,Math.min(Qi(o,h.line).text.length,h.ch+Nr(a).length)):Wo&&Wo.lineWise&&Wo.text.join("\n")==t&&(d=h=Fo(d.line,0)));var f=e.curOp.updateInput,p={from:d,to:h,text:l?l[c%l.length]:a,origin:r||(s?"paste":e.state.cutIncoming?"cut":"+input")};En(e.doc,p),Cr(e,"inputRead",e,p)}t&&!s&&J(e,t),Fn(e),e.curOp.updateInput=f,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function K(e,t){var n=e.clipboardData&&e.clipboardData.getData("text/plain");return n?(e.preventDefault(),t.isReadOnly()||t.options.disableInput||Dt(t,function(){Q(t,n,0,null,"paste")}),!0):void 0}function J(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,i=n.ranges.length-1;i>=0;i--){var r=n.ranges[i];if(!(r.head.ch>100||i&&n.ranges[i-1].head.line==r.head.line)){var o=e.getModeAt(r.head),s=!1;if(o.electricChars){for(var a=0;a-1){s=Wn(e,r.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Qi(e.doc,r.head.line).text.slice(0,r.head.ch))&&(s=Wn(e,r.head.line,"smart"));s&&Cr(e,"electricInput",e,r.head.line)}}}function ee(e){for(var t=[],n=[],i=0;ir?c.map:u[r],s=0;sr?e.line:e.rest[r]),d=o[s]+i;return(0>i||a!=t)&&(d=o[s+(i?1:0)]),Fo(l,d)}}}var r=e.text.firstChild,o=!1;if(!t||!$s(r,t))return se(Fo(tr(e.line),0),!0);if(t==r&&(o=!0,t=r.childNodes[n],n=0,!t)){var s=e.rest?Nr(e.rest):e.line;return se(Fo(tr(s),s.text.length),o)}var a=3==t.nodeType?t:null,l=t;for(a||1!=t.childNodes.length||3!=t.firstChild.nodeType||(a=t.firstChild,n&&(n=a.nodeValue.length));l.parentNode!=r;)l=l.parentNode;var c=e.measure,u=c.maps,d=i(a,l,n);if(d)return se(d,o);for(var h=l.nextSibling,f=a?a.nodeValue.length-n:0;h;h=h.nextSibling){if(d=i(h,h.firstChild,0))return se(Fo(d.line,d.ch-f),o);f+=h.textContent.length}for(var p=l.previousSibling,f=n;p;p=p.previousSibling){if(d=i(p,p.firstChild,-1))return se(Fo(d.line,d.ch+f),o);f+=h.textContent.length}}function ce(e,t,n,i,r){function o(e){return function(t){return t.id==e}}function s(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(null!=n)return""==n&&(n=t.textContent.replace(/\u200b/g,"")),void(a+=n);var u,d=t.getAttribute("cm-marker");if(d){var h=e.findMarks(Fo(i,0),Fo(r+1,0),o(+d));return void(h.length&&(u=h[0].find())&&(a+=Ki(e.doc,u.from,u.to).join(c)))}if("false"==t.getAttribute("contenteditable"))return;for(var f=0;f=0){var s=Z(o.from(),r.from()),a=$(o.to(),r.to()),l=o.empty()?r.from()==r.head:o.from()==o.head;t>=i&&--t,e.splice(--i,2,new de(l?a:s,l?s:a))}}return new ue(e,t)}function fe(e,t){return new ue([new de(e,t||e)],0)}function pe(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function ge(e,t){if(t.linen?Fo(n,Qi(e,n).text.length):me(t,Qi(e,t.line).text.length)}function me(e,t){var n=e.ch;return null==n||n>t?Fo(e.line,t):0>n?Fo(e.line,0):e}function ve(e,t){return t>=e.first&&t=t.ch:a.to>t.ch))){if(r&&(As(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--s;continue}break}if(!l.atomic)continue;if(n){var c,u=l.find(0>i?1:-1);if((0>i?l.inclusiveRight:l.inclusiveLeft)&&(u=Ae(e,u,-i,u&&u.line==t.line?o:null)),u&&u.line==t.line&&(c=Po(u,n))&&(0>i?0>c:c>0))return He(e,u,t,i,r)}var d=l.find(0>i?-1:1);return(0>i?l.inclusiveLeft:l.inclusiveRight)&&(d=Ae(e,d,i,d.line==t.line?o:null)),d?He(e,d,t,i,r):null}}return t}function Ne(e,t,n,i,r){var o=i||1,s=He(e,t,n,o,r)||!r&&He(e,t,n,o,!0)||He(e,t,n,-o,r)||!r&&He(e,t,n,-o,!0);return s?s:(e.cantEdit=!0,Fo(e.first,0))}function Ae(e,t,n,i){return 0>n&&0==t.ch?t.line>e.first?ge(e,Fo(t.line-1)):null:n>0&&t.ch==(i||Qi(e,t.line)).text.length?t.line=e.display.viewTo||a.to().linet&&(t=0),t=Math.round(t),i=Math.round(i),a.appendChild(jr("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px; top: "+t+"px; width: "+(null==n?u-e:n)+"px; height: "+(i-t)+"px"))}function r(t,n,r){function o(n,i){return ht(e,Fo(t,n),"div",d,i)}var a,l,d=Qi(s,t),h=d.text.length;return eo(rr(d),n||0,null==r?h:r,function(e,t,s){var d,f,p,g=o(e,"left");if(e==t)d=g,f=p=g.left;else{if(d=o(t-1,"right"),"rtl"==s){var m=g;g=d,d=m}f=g.left,p=d.right}null==n&&0==e&&(f=c),d.top-g.top>3&&(i(f,g.top,null,g.bottom),f=c,g.bottoml.bottom||d.bottom==l.bottom&&d.right>l.right)&&(l=d),c+1>f&&(f=c),i(f,d.top,p-f,d.bottom)}),{start:a,end:l}}var o=e.display,s=e.doc,a=document.createDocumentFragment(),l=qe(e.display),c=l.left,u=Math.max(o.sizerWidth,Ve(e)-o.sizer.offsetLeft)-l.right,d=t.from(),h=t.to();if(d.line==h.line)r(d.line,d.ch,h.ch);else{var f=Qi(s,d.line),p=Qi(s,h.line),g=yi(f)==yi(p),m=r(d.line,d.ch,g?f.text.length+1:null).end,v=r(h.line,g?0:null,h.ch).start;g&&(m.top0?t.blinker=setInterval(function(){t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Pe(e,t){e.doc.mode.startState&&e.doc.frontier=e.display.viewTo)){var n=+new Date+e.options.workTime,i=ls(t.mode,je(e,t.frontier)),r=[];t.iter(t.frontier,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(t.frontier>=e.display.viewFrom){var s=o.styles,a=o.text.length>e.options.maxHighlightLength,l=zi(e,o,a?ls(t.mode,i):i,!0);o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var d=!s||s.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),h=0;!d&&hn?(Pe(e,e.options.workDelay),!0):void 0}),r.length&&Dt(e,function(){for(var t=0;ts;--a){if(a<=o.first)return o.first;var l=Qi(o,a-1);if(l.stateAfter&&(!n||a<=o.frontier))return a;var c=Ws(l.text,null,e.options.tabSize);(null==r||i>c)&&(r=a-1,i=c)}return r}function je(e,t,n){var i=e.doc,r=e.display;if(!i.mode.startState)return!0;var o=Be(e,t,n),s=o>i.first&&Qi(i,o-1).stateAfter;return s=s?ls(i.mode,s):cs(i.mode),i.iter(o,t,function(n){Ii(e,n.text,s);var a=o==t-1||o%5==0||o>=r.viewFrom&&o2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Xe(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var i=0;in)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Qe(e,t){t=yi(t);var n=tr(t),i=e.display.externalMeasured=new At(e.doc,t,n);i.lineN=n;var r=i.built=Fi(e,i);return i.text=r.pre,Ur(e.display.lineMeasure,r.pre),i}function Ke(e,t,n,i){return tt(e,et(e,t),n,i)}function Je(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt?(r=0,o=1,s="left"):c>t?(r=t-l,o=r+1):(a==e.length-3||t==c&&e[a+3]>t)&&(o=c-l,r=o-1,t>=c&&(s="right")),null!=r){if(i=e[a+2],l==c&&n==(i.insertLeft?"left":"right")&&(s=n),"left"==n&&0==r)for(;a&&e[a-2]==e[a-3]&&e[a-1].insertLeft;)i=e[(a-=3)+2],s="left";if("right"==n&&r==c-l)for(;au;u++){for(;a&&Br(t.line.text.charAt(o.coverStart+a));)--a;for(;o.coverStart+lwo&&0==a&&l==o.coverEnd-o.coverStart)r=s.parentNode.getBoundingClientRect();else if(bo&&e.options.lineWrapping){var d=Us(s,a,l).getClientRects();r=d.length?d["right"==i?d.length-1:0]:Uo}else r=Us(s,a,l).getBoundingClientRect()||Uo;if(r.left||r.right||0==a)break;l=a,a-=1,c="right"}bo&&11>wo&&(r=rt(e.display.measure,r))}else{a>0&&(c=i="right");var d;r=e.options.lineWrapping&&(d=s.getClientRects()).length>1?d["right"==i?d.length-1:0]:s.getBoundingClientRect()}if(bo&&9>wo&&!a&&(!r||!r.left&&!r.right)){var h=s.parentNode.getClientRects()[0];r=h?{left:h.left,right:h.left+bt(e.display),top:h.top,bottom:h.bottom}:Uo}for(var f=r.top-t.rect.top,p=r.bottom-t.rect.top,g=(f+p)/2,m=t.view.measure.heights,u=0;un.from?s(e-1):s(e,i)}i=i||Qi(e.doc,t.line),r||(r=et(e,i));var l=rr(i),c=t.ch;if(!l)return s(c);var u=co(l,c),d=a(c,u);return null!=sa&&(d.other=a(c,sa)),d}function pt(e,t){var n=0,t=ge(e.doc,t);e.options.lineWrapping||(n=bt(e.display)*t.ch);var i=Qi(e.doc,t.line),r=ir(i)+Ye(e.display);return{left:n,right:n,top:r,bottom:r+i.height}}function gt(e,t,n,i){var r=Fo(e,t);return r.xRel=i,n&&(r.outside=!0),r}function mt(e,t,n){var i=e.doc;if(n+=e.display.viewOffset,0>n)return gt(i.first,0,!0,-1);var r=nr(i,n),o=i.first+i.size-1;if(r>o)return gt(i.first+i.size-1,Qi(i,o).text.length,!0,1);0>t&&(t=0);for(var s=Qi(i,r);;){var a=vt(e,s,r,t,n),l=mi(s),c=l&&l.find(0,!0);if(!l||!(a.ch>c.from.ch||a.ch==c.from.ch&&a.xRel>0))return a;r=tr(s=c.to.line)}}function vt(e,t,n,i,r){function o(i){var r=ft(e,Fo(n,i),"line",t,c);return a=!0,s>r.bottom?r.left-l:sm)return gt(n,f,v,1);for(;;){if(u?f==h||f==ho(t,h,1):1>=f-h){for(var y=p>i||m-i>=i-p?h:f,b=i-(y==h?p:m);Br(t.text.charAt(y));)++y;var w=gt(n,y,y==h?g:v,-1>b?-1:b>1?1:0);return w}var x=Math.ceil(d/2),k=h+x;if(u){k=h;for(var S=0;x>S;++S)k=ho(t,k,1)}var C=o(k);C>i?(f=k,m=C,(v=a)&&(m+=1e3),d=x):(h=k,p=C,g=a,d-=x)}}function yt(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Bo){Bo=jr("pre");for(var t=0;49>t;++t)Bo.appendChild(document.createTextNode("x")),Bo.appendChild(jr("br"));Bo.appendChild(document.createTextNode("x"))}Ur(e.measure,Bo);var n=Bo.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),Yr(e.measure),n||1}function bt(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=jr("span","xxxxxxxxxx"),n=jr("pre",[t]);Ur(e.measure,n);var i=t.getBoundingClientRect(),r=(i.right-i.left)/10;return r>2&&(e.cachedCharWidth=r),r||10}function wt(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Go},qo?qo.ops.push(e.curOp):e.curOp.ownsGroup=qo={ops:[e.curOp],delayedCallbacks:[]}}function xt(e){var t=e.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new T(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Tt(e){e.updatedDisplay=e.mustUpdate&&_(e.cm,e.update)}function Et(e){var t=e.cm,n=t.display;e.updatedDisplay&&H(t),e.barMeasure=p(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ke(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Ge(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Ve(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection(e.focus))}function _t(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLefto;o=i){var s=new At(e.doc,Qi(e.doc,o),o);i=o+s.size,r.push(s)}return r}function Rt(e,t,n,i){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),i||(i=0);var r=e.display;if(i&&nt)&&(r.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=r.viewTo)Oo&&wi(e.doc,t)r.viewFrom?Ot(e):(r.viewFrom+=i,r.viewTo+=i);else if(t<=r.viewFrom&&n>=r.viewTo)Ot(e);else if(t<=r.viewFrom){var o=Pt(e,n,n+i,1);o?(r.view=r.view.slice(o.index),r.viewFrom=o.lineN,r.viewTo+=i):Ot(e)}else if(n>=r.viewTo){var o=Pt(e,t,t,-1);o?(r.view=r.view.slice(0,o.index),r.viewTo=o.lineN):Ot(e)}else{var s=Pt(e,t,t,-1),a=Pt(e,n,n+i,1);s&&a?(r.view=r.view.slice(0,s.index).concat(zt(e,s.lineN,a.lineN)).concat(r.view.slice(a.index)),r.viewTo+=i):Ot(e)}var l=r.externalMeasured;l&&(n=r.lineN&&t=i.viewTo)){var o=i.view[Ft(e,t)];if(null!=o.node){var s=o.changes||(o.changes=[]);-1==Ar(s,n)&&s.push(n)}}}function Ot(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Ft(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,0>t)return null;for(var n=e.display.view,i=0;it)return i}function Pt(e,t,n,i){var r,o=Ft(e,t),s=e.display.view;if(!Oo||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var a=0,l=e.display.viewFrom;o>a;a++)l+=s[a].size;if(l!=t){if(i>0){if(o==s.length-1)return null;r=l+s[o].size-t,o++}else r=l-t;t+=r,n+=r}for(;wi(e.doc,n)!=n;){if(o==(0>i?0:s.length-1))return null;n+=i*s[o-(0>i?1:0)].size,o+=i}return{index:o,lineN:n}}function Wt(e,t,n){var i=e.display,r=i.view;0==r.length||t>=i.viewTo||n<=i.viewFrom?(i.view=zt(e,t,n),i.viewFrom=t):(i.viewFrom>t?i.view=zt(e,t,i.viewFrom).concat(i.view):i.viewFromn&&(i.view=i.view.slice(0,Ft(e,n)))),i.viewTo=n}function Bt(e){for(var t=e.display.view,n=0,i=0;i400}var r=e.display;Ms(r.scroller,"mousedown",Mt(e,Vt)),bo&&11>wo?Ms(r.scroller,"dblclick",Mt(e,function(t){if(!Er(e,t)){var n=Gt(e,t);if(n&&!Kt(e,t)&&!qt(e.display,t)){_s(t);var i=e.findWordAt(n);we(e.doc,i.anchor,i.head)}}})):Ms(r.scroller,"dblclick",function(t){Er(e,t)||_s(t)}),Ro||Ms(r.scroller,"contextmenu",function(t){bn(e,t)});var o,s={end:0};Ms(r.scroller,"touchstart",function(t){if(!Er(e,t)&&!n(t)){clearTimeout(o);var i=+new Date;r.activeTouch={start:i,moved:!1,prev:i-s.end<=300?s:null},1==t.touches.length&&(r.activeTouch.left=t.touches[0].pageX,r.activeTouch.top=t.touches[0].pageY)}}),Ms(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),Ms(r.scroller,"touchend",function(n){var o=r.activeTouch;if(o&&!qt(r,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var s,a=e.coordsChar(r.activeTouch,"page");s=!o.prev||i(o,o.prev)?new de(a,a):!o.prev.prev||i(o,o.prev.prev)?e.findWordAt(a):new de(Fo(a.line,0),ge(e.doc,Fo(a.line+1,0))),e.setSelection(s.anchor,s.head),e.focus(),_s(n)}t()}),Ms(r.scroller,"touchcancel",t),Ms(r.scroller,"scroll",function(){r.scroller.clientHeight&&(rn(e,r.scroller.scrollTop),on(e,r.scroller.scrollLeft,!0),As(e,"scroll",e))}),Ms(r.scroller,"mousewheel",function(t){sn(e,t)}),Ms(r.scroller,"DOMMouseScroll",function(t){sn(e,t)}),Ms(r.wrapper,"scroll",function(){r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(t){Er(e,t)||Ds(t)},over:function(t){Er(e,t)||(tn(e,t),Ds(t))},start:function(t){en(e,t)},drop:Mt(e,Jt),leave:function(t){Er(e,t)||nn(e)}};var a=r.input.getField();Ms(a,"keyup",function(t){pn.call(e,t)}),Ms(a,"keydown",Mt(e,hn)),Ms(a,"keypress",Mt(e,gn)),Ms(a,"focus",Fr(vn,e)),Ms(a,"blur",Fr(yn,e))}function Yt(t,n,i){var r=i&&i!=e.Init;if(!n!=!r){var o=t.display.dragFunctions,s=n?Ms:Ns;s(t.display.scroller,"dragstart",o.start),s(t.display.scroller,"dragenter",o.enter),s(t.display.scroller,"dragover",o.over),s(t.display.scroller,"dragleave",o.leave),s(t.display.scroller,"drop",o.drop)}}function Ut(e){var t=e.display;t.lastWrapHeight==t.wrapper.clientHeight&&t.lastWrapWidth==t.wrapper.clientWidth||(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}function qt(e,t){for(var n=xr(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function Gt(e,t,n,i){var r=e.display;if(!n&&"true"==xr(t).getAttribute("cm-not-content"))return null;var o,s,a=r.lineSpace.getBoundingClientRect();try{o=t.clientX-a.left,s=t.clientY-a.top}catch(e){return null}var l,c=mt(e,o,s);if(i&&1==c.xRel&&(l=Qi(e.doc,c.line).text).length==c.ch){var u=Ws(l,l.length,e.options.tabSize)-l.length;c=Fo(c.line,Math.max(0,Math.round((o-qe(e.display).left)/bt(e.display))-u))}return c}function Vt(e){var t=this,n=t.display;if(!(Er(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.shift=e.shiftKey,qt(n,e))return void(xo||(n.scroller.draggable=!1,setTimeout(function(){n.scroller.draggable=!0},100)));if(!Kt(t,e)){var i=Gt(t,e);switch(window.focus(),kr(e)){case 1:t.state.selectingText?t.state.selectingText(e):i?$t(t,e,i):xr(e)==n.scroller&&_s(e);break;case 2:xo&&(t.state.lastMiddleDown=+new Date),i&&we(t.doc,i),setTimeout(function(){n.input.focus()},20),_s(e);break;case 3:Ro?bn(t,e):mn(t)}}}}function $t(e,t,n){bo?setTimeout(Fr(X,e),0):e.curOp.focus=qr();var i,r=+new Date;Yo&&Yo.time>r-400&&0==Po(Yo.pos,n)?i="triple":jo&&jo.time>r-400&&0==Po(jo.pos,n)?(i="double",Yo={time:r,pos:n}):(i="single",jo={time:r,pos:n});var o,s=e.doc.sel,a=Mo?t.metaKey:t.ctrlKey;e.options.dragDrop&&ea&&!e.isReadOnly()&&"single"==i&&(o=s.contains(n))>-1&&(Po((o=s.ranges[o]).from(),n)<0||n.xRel>0)&&(Po(o.to(),n)>0||n.xRel<0)?Zt(e,t,n,a):Xt(e,t,n,i,a)}function Zt(e,t,n,i){var r=e.display,o=+new Date,s=Mt(e,function(a){xo&&(r.scroller.draggable=!1),e.state.draggingText=!1,Ns(document,"mouseup",s),Ns(r.scroller,"drop",s),Math.abs(t.clientX-a.clientX)+Math.abs(t.clientY-a.clientY)<10&&(_s(a),!i&&+new Date-200=p;p++){var v=Qi(c,p).text,y=Bs(v,l,o);l==f?r.push(new de(Fo(p,y),Fo(p,y))):v.length>y&&r.push(new de(Fo(p,y),Fo(p,Bs(v,f,o))))}r.length||r.push(new de(n,n)),Ee(c,he(h.ranges.slice(0,d).concat(r),d),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b=u,w=b.anchor,x=t;if("single"!=i){if("double"==i)var k=e.findWordAt(t);else var k=new de(Fo(t.line,0),ge(c,Fo(t.line+1,0)));Po(k.anchor,w)>0?(x=k.head,w=Z(b.from(),k.anchor)):(x=k.anchor,w=$(b.to(),k.head))}var r=h.ranges.slice(0);r[d]=new de(ge(c,w),x),Ee(c,he(r,d),Fs)}}function s(t){var n=++y,r=Gt(e,t,!0,"rect"==i);if(r)if(0!=Po(r,m)){e.curOp.focus=qr(),o(r);var a=w(l,c);(r.line>=a.to||r.linev.bottom?20:0;u&&setTimeout(Mt(e,function(){y==n&&(l.scroller.scrollTop+=u,s(t))}),50)}}function a(t){e.state.selectingText=!1,y=1/0,_s(t),l.input.focus(),Ns(document,"mousemove",b),Ns(document,"mouseup",x),c.history.lastSelOrigin=null}var l=e.display,c=e.doc;_s(t);var u,d,h=c.sel,f=h.ranges;if(r&&!t.shiftKey?(d=c.sel.contains(n),u=d>-1?f[d]:new de(n,n)):(u=c.sel.primary(),d=c.sel.primIndex),Ho?t.shiftKey&&t.metaKey:t.altKey)i="rect",r||(u=new de(n,n)),n=Gt(e,t,!0,!0),d=-1;else if("double"==i){var p=e.findWordAt(n);u=e.display.shift||c.extend?be(c,u,p.anchor,p.head):p}else if("triple"==i){var g=new de(Fo(n.line,0),ge(c,Fo(n.line+1,0)));u=e.display.shift||c.extend?be(c,u,g.anchor,g.head):g}else u=be(c,u,n);r?-1==d?(d=f.length,Ee(c,he(f.concat([u]),d),{scroll:!1,origin:"*mouse"})):f.length>1&&f[d].empty()&&"single"==i&&!t.shiftKey?(Ee(c,he(f.slice(0,d).concat(f.slice(d+1)),0),{scroll:!1,origin:"*mouse"}),h=c.sel):ke(c,d,u,Fs):(d=0,Ee(c,new ue([u],0),Fs),h=c.sel);var m=n,v=l.wrapper.getBoundingClientRect(),y=0,b=Mt(e,function(e){kr(e)?s(e):a(e)}),x=Mt(e,a);e.state.selectingText=x,Ms(document,"mousemove",b),Ms(document,"mouseup",x)}function Qt(e,t,n,i){try{var r=t.clientX,o=t.clientY}catch(e){return!1}if(r>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;i&&_s(t);var s=e.display,a=s.lineDiv.getBoundingClientRect();if(o>a.bottom||!Lr(e,n))return wr(t);o-=a.top-s.viewOffset;for(var l=0;l=r){var u=nr(e.doc,o),d=e.options.gutters[l];return As(e,n,e,u,d,t),wr(t)}}}function Kt(e,t){return Qt(e,t,"gutterClick",!0)}function Jt(e){var t=this;if(nn(t),!Er(t,e)&&!qt(t.display,e)){_s(e),bo&&(Vo=+new Date);var n=Gt(t,e,!0),i=e.dataTransfer.files;if(n&&!t.isReadOnly())if(i&&i.length&&window.FileReader&&window.File)for(var r=i.length,o=Array(r),s=0,a=function(e,i){if(!t.options.allowDropFileTypes||-1!=Ar(t.options.allowDropFileTypes,e.type)){ -var a=new FileReader;a.onload=Mt(t,function(){var e=a.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),o[i]=e,++s==r){n=ge(t.doc,n);var l={from:n,to:n,text:t.doc.splitLines(o.join(t.doc.lineSeparator())),origin:"paste"};En(t.doc,l),Te(t.doc,fe(n,Jo(l)))}}),a.readAsText(e)}},l=0;r>l;++l)a(i[l],l);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout(function(){t.display.input.focus()},20);try{var o=e.dataTransfer.getData("Text");if(o){if(t.state.draggingText&&!(Mo?e.altKey:e.ctrlKey))var c=t.listSelections();if(_e(t.doc,fe(n,n)),c)for(var l=0;ls.clientWidth,l=s.scrollHeight>s.clientHeight;if(i&&a||r&&l){if(r&&Mo&&xo)e:for(var c=t.target,u=o.view;c!=s;c=c.parentNode)for(var d=0;dh?f=Math.max(0,f+h-50):p=Math.min(e.doc.height,p+h+50),D(e,{top:f,bottom:p})}20>$o&&(null==o.wheelStartX?(o.wheelStartX=s.scrollLeft,o.wheelStartY=s.scrollTop,o.wheelDX=i,o.wheelDY=r,setTimeout(function(){if(null!=o.wheelStartX){var e=s.scrollLeft-o.wheelStartX,t=s.scrollTop-o.wheelStartY,n=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null,n&&(Zo=(Zo*$o+n)/($o+1),++$o)}},200)):(o.wheelDX+=i,o.wheelDY+=r))}}function an(e,t,n){if("string"==typeof t&&(t=us[t],!t))return!1;e.display.input.ensurePolled();var i=e.display.shift,r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),r=t(e)!=Is}finally{e.display.shift=i,e.state.suppressEdits=!1}return r}function ln(e,t,n){for(var i=0;iwo&&27==e.keyCode&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=16==n||e.shiftKey;var i=un(t,e);Co&&(Ko=i?n:null,!i&&88==n&&!ia&&(Mo?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=n||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||fn(t)}}function fn(e){function t(e){18!=e.keyCode&&e.altKey||(Qs(n,"CodeMirror-crosshair"),Ns(document,"keyup",t),Ns(document,"mouseover",t))}var n=e.display.lineDiv;Ks(n,"CodeMirror-crosshair"),Ms(document,"keyup",t),Ms(document,"mouseover",t)}function pn(e){16==e.keyCode&&(this.doc.sel.shift=!1),Er(this,e)}function gn(e){var t=this;if(!(qt(t.display,e)||Er(t,e)||e.ctrlKey&&!e.altKey||Mo&&e.metaKey)){var n=e.keyCode,i=e.charCode;if(Co&&n==Ko)return Ko=null,void _s(e);if(!Co||e.which&&!(e.which<10)||!un(t,e)){var r=String.fromCharCode(null==i?n:i);dn(t,e,r)||t.display.input.onKeyPress(e)}}}function mn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,yn(e))},100)}function vn(e){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(As(e,"focus",e),e.state.focused=!0,Ks(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),xo&&setTimeout(function(){e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Fe(e))}function yn(e){e.state.delayingBlurEvent||(e.state.focused&&(As(e,"blur",e),e.state.focused=!1,Qs(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function bn(e,t){qt(e.display,t)||wn(e,t)||Er(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function wn(e,t){return!!Lr(e,"gutterContextMenu")&&Qt(e,t,"gutterContextMenu",!1)}function xn(e,t){if(Po(e,t.from)<0)return e;if(Po(e,t.to)<=0)return Jo(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,i=e.ch;return e.line==t.to.line&&(i+=Jo(t).ch-t.to.ch),Fo(n,i)}function kn(e,t){for(var n=[],i=0;i=0;--r)_n(e,{from:i[r].from,to:i[r].to,text:r?[""]:t.text});else _n(e,t)}}function _n(e,t){if(1!=t.text.length||""!=t.text[0]||0!=Po(t.from,t.to)){var n=kn(e,t);cr(e,t,n,e.cm?e.cm.curOp.id:NaN),Mn(e,t,n,oi(e,t));var i=[];Zi(e,function(e,n){n||-1!=Ar(i,e.history)||(br(e.history,t),i.push(e.history)),Mn(e,t,null,oi(e,t))})}}function Ln(e,t,n){if(!e.cm||!e.cm.state.suppressEdits){for(var i,r=e.history,o=e.sel,s="undo"==t?r.done:r.undone,a="undo"==t?r.undone:r.done,l=0;l=0;--l){var d=i.changes[l];if(d.origin=t,u&&!Tn(e,d,!1))return void(s.length=0);c.push(sr(e,d));var h=l?kn(e,d):Nr(s);Mn(e,d,h,ai(e,d)),!l&&e.cm&&e.cm.scrollIntoView({from:d.from,to:Jo(d)});var f=[];Zi(e,function(e,t){t||-1!=Ar(f,e.history)||(br(e.history,d),f.push(e.history)),Mn(e,d,null,ai(e,d))})}}}}function Dn(e,t){if(0!=t&&(e.first+=t,e.sel=new ue(zr(e.sel.ranges,function(e){return new de(Fo(e.anchor.line+t,e.anchor.ch),Fo(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Rt(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,i=n.viewFrom;ie.lastLine())){if(t.from.lineo&&(t={from:t.from,to:Fo(o,Qi(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ki(e,t.from,t.to),n||(n=kn(e,t)),e.cm?Hn(e.cm,t,i):Gi(e,t,i),_e(e,n,Os)}}function Hn(e,t,n){var i=e.doc,r=e.display,s=t.from,a=t.to,l=!1,c=s.line;e.options.lineWrapping||(c=tr(yi(Qi(i,s.line))),i.iter(c,a.line+1,function(e){return e==r.maxLine?(l=!0,!0):void 0})),i.sel.contains(t.from,t.to)>-1&&_r(e),Gi(i,t,n,o(e)),e.options.lineWrapping||(i.iter(c,s.line+t.text.length,function(e){var t=d(e);t>r.maxLineLength&&(r.maxLine=e,r.maxLineLength=t,r.maxLineChanged=!0,l=!1)}),l&&(e.curOp.updateMaxLine=!0)),i.frontier=Math.min(i.frontier,s.line),Pe(e,400);var u=t.text.length-(a.line-s.line)-1;t.full?Rt(e):s.line!=a.line||1!=t.text.length||qi(e.doc,t)?Rt(e,s.line,a.line+1,u):It(e,s.line,"text");var h=Lr(e,"changes"),f=Lr(e,"change");if(f||h){var p={from:s,to:a,text:t.text,removed:t.removed,origin:t.origin};f&&Cr(e,"change",e,p),h&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(p)}e.display.selForContextMenu=null}function Nn(e,t,n,i,r){if(i||(i=n),Po(i,n)<0){var o=i;i=n,n=o}"string"==typeof t&&(t=e.splitLines(t)),En(e,{from:n,to:i,text:t,origin:r})}function An(e,t){if(!Er(e,"scrollCursorIntoView")){var n=e.display,i=n.sizer.getBoundingClientRect(),r=null;if(t.top+i.top<0?r=!0:t.bottom+i.top>(window.innerHeight||document.documentElement.clientHeight)&&(r=!1),null!=r&&!_o){var o=jr("div","​",null,"position: absolute; top: "+(t.top-n.viewOffset-Ye(e.display))+"px; height: "+(t.bottom-t.top+Ge(e)+n.barHeight)+"px; left: "+t.left+"px; width: 2px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(r),e.display.lineSpace.removeChild(o)}}}function zn(e,t,n,i){null==i&&(i=0);for(var r=0;5>r;r++){var o=!1,s=ft(e,t),a=n&&n!=t?ft(e,n):s,l=In(e,Math.min(s.left,a.left),Math.min(s.top,a.top)-i,Math.max(s.left,a.left),Math.max(s.bottom,a.bottom)+i),c=e.doc.scrollTop,u=e.doc.scrollLeft;if(null!=l.scrollTop&&(rn(e,l.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(o=!0)),null!=l.scrollLeft&&(on(e,l.scrollLeft),Math.abs(e.doc.scrollLeft-u)>1&&(o=!0)),!o)break}return s}function Rn(e,t,n,i,r){var o=In(e,t,n,i,r);null!=o.scrollTop&&rn(e,o.scrollTop),null!=o.scrollLeft&&on(e,o.scrollLeft)}function In(e,t,n,i,r){var o=e.display,s=yt(e.display);0>n&&(n=0);var a=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:o.scroller.scrollTop,l=$e(e),c={};r-n>l&&(r=n+l);var u=e.doc.height+Ue(o),d=s>n,h=r>u-s;if(a>n)c.scrollTop=d?0:n;else if(r>a+l){var f=Math.min(n,(h?u:r)-l);f!=a&&(c.scrollTop=f)}var p=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:o.scroller.scrollLeft,g=Ve(e)-(e.options.fixedGutter?o.gutters.offsetWidth:0),m=i-t>g;return m&&(i=t+g),10>t?c.scrollLeft=0:p>t?c.scrollLeft=Math.max(0,t-(m?0:10)):i>g+p-3&&(c.scrollLeft=i+(m?0:10)-g),c}function On(e,t,n){null==t&&null==n||Pn(e),null!=t&&(e.curOp.scrollLeft=(null==e.curOp.scrollLeft?e.doc.scrollLeft:e.curOp.scrollLeft)+t),null!=n&&(e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+n)}function Fn(e){Pn(e);var t=e.getCursor(),n=t,i=t;e.options.lineWrapping||(n=t.ch?Fo(t.line,t.ch-1):t,i=Fo(t.line,t.ch+1)),e.curOp.scrollToPos={from:n,to:i,margin:e.options.cursorScrollMargin,isCursor:!0}}function Pn(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=pt(e,t.from),i=pt(e,t.to),r=In(e,Math.min(n.left,i.left),Math.min(n.top,i.top)-t.margin,Math.max(n.right,i.right),Math.max(n.bottom,i.bottom)+t.margin);e.scrollTo(r.scrollLeft,r.scrollTop)}}function Wn(e,t,n,i){var r,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?r=je(e,t):n="prev");var s=e.options.tabSize,a=Qi(o,t),l=Ws(a.text,null,s);a.stateAfter&&(a.stateAfter=null);var c,u=a.text.match(/^\s*/)[0];if(i||/\S/.test(a.text)){if("smart"==n&&(c=o.mode.indent(r,a.text.slice(u.length),a.text),c==Is||c>150)){if(!i)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>o.first?Ws(Qi(o,t-1).text,null,s):0:"add"==n?c=l+e.options.indentUnit:"subtract"==n?c=l-e.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var d="",h=0;if(e.options.indentWithTabs)for(var f=Math.floor(c/s);f;--f)h+=s,d+="\t";if(c>h&&(d+=Hr(c-h)),d!=u)return Nn(o,d,Fo(t,0),Fo(t,u.length),"+input"),a.stateAfter=null,!0;for(var f=0;f=0;t--)Nn(e.doc,"",i[t].from,i[t].to,"+delete");Fn(e)})}function Yn(e,t,n,i,r){function o(){var t=a+n;return!(t=e.first+e.size)&&(a=t,u=Qi(e,t))}function s(e){var t=(r?ho:fo)(u,l,n,!0);if(null==t){if(e||!o())return!1;l=r?(0>n?ro:io)(u):0>n?u.text.length:0}else l=t;return!0}var a=t.line,l=t.ch,c=n,u=Qi(e,a);if("char"==i)s();else if("column"==i)s(!0);else if("word"==i||"group"==i)for(var d=null,h="group"==i,f=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(0>n)||s(!p);p=!1){var g=u.text.charAt(l)||"\n",m=Pr(g,f)?"w":h&&"\n"==g?"n":!h||/\s/.test(g)?null:"p";if(!h||p||m||(m="s"),d&&d!=m){0>n&&(n=1,s());break}if(m&&(d=m),n>0&&!s(!p))break}var v=Ne(e,Fo(a,l),t,c,!0);return Po(t,v)||(v.hitSide=!0),v}function Un(e,t,n,i){var r,o=e.doc,s=t.left;if("page"==i){var a=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);r=t.top+n*(a-(0>n?1.5:.5)*yt(e.display))}else"line"==i&&(r=n>0?t.bottom+3:t.top-3);for(;;){var l=mt(e,s,r);if(!l.outside)break;if(0>n?0>=r:r>=o.height){l.hitSide=!0;break}r+=5*n}return l}function qn(t,n,i,r){e.defaults[t]=n,i&&(ts[t]=r?function(e,t,n){n!=ns&&i(e,t,n)}:i)}function Gn(e){for(var t,n,i,r,o=e.split(/-(?!$)/),e=o[o.length-1],s=0;s0||0==s&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=jr("span",[o.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(vi(e,t.line,t,n,o)||t.line!=n.line&&vi(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Oo=!0}o.addToHistory&&cr(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var a,l=t.line,c=e.cm;if(e.iter(l,n.line+1,function(e){c&&o.collapsed&&!c.options.lineWrapping&&yi(e)==c.display.maxLine&&(a=!0),o.collapsed&&l!=t.line&&er(e,0),ni(e,new Jn(o,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l}),o.collapsed&&e.iter(t.line,n.line+1,function(t){ki(e,t)&&er(t,0)}),o.clearOnEnter&&Ms(o,"beforeCursorEnter",function(){o.clear()}),o.readOnly&&(Io=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++ms,o.atomic=!0),c){if(a&&(c.curOp.updateMaxLine=!0),o.collapsed)Rt(c,t.line,n.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var u=t.line;u<=n.line;u++)It(c,u,"text");o.atomic&&De(c.doc),Cr(c,"markerAdded",c,o)}return o}function Zn(e,t,n,i,r){i=Or(i),i.shared=!1;var o=[$n(e,t,n,i,r)],s=o[0],a=i.widgetNode;return Zi(e,function(e){a&&(i.widgetNode=a.cloneNode(!0)),o.push($n(e,ge(e,t),ge(e,n),i,r));for(var l=0;l=t:o.to>t);(i||(i=[])).push(new Jn(s,o.from,l?null:o.to))}}return i}function ri(e,t,n){if(e)for(var i,r=0;r=t:o.to>t);if(a||o.from==t&&"bookmark"==s.type&&(!n||o.marker.insertLeft)){var l=null==o.from||(s.inclusiveLeft?o.from<=t:o.from0&&a)for(var d=0;dd;++d)p.push(g);p.push(l)}return p}function si(e){for(var t=0;t0)){var u=[l,1],d=Po(c.from,a.from),h=Po(c.to,a.to);(0>d||!s.inclusiveLeft&&!d)&&u.push({from:c.from,to:a.from}),(h>0||!s.inclusiveRight&&!h)&&u.push({from:a.to,to:c.to}),r.splice.apply(r,u),l+=u.length-1}}return r}function ci(e){var t=e.markedSpans;if(t){for(var n=0;n=0&&0>=d||0>=u&&d>=0)&&(0>=u&&(l.marker.inclusiveRight&&r.inclusiveLeft?Po(c.to,n)>=0:Po(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?Po(c.from,i)<=0:Po(c.from,i)<0)))return!0}}}function yi(e){for(var t;t=gi(e);)e=t.find(-1,!0).line;return e}function bi(e){for(var t,n;t=mi(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function wi(e,t){var n=Qi(e,t),i=yi(n);return n==i?t:tr(i)}function xi(e,t){if(t>e.lastLine())return t;var n,i=Qi(e,t);if(!ki(e,i))return t;for(;n=mi(i);)i=n.find(1,!0).line;return tr(i)+1}function ki(e,t){var n=Oo&&t.markedSpans;if(n)for(var i,r=0;ro;o++){r&&(r[0]=e.innerMode(t,i).mode);var s=t.token(n,i);if(n.pos>n.start)return s}throw new Error("Mode "+t.name+" failed to advance stream.")}function Ni(e,t,n,i){function r(e){return{start:d.start,end:d.pos,string:d.current(),type:o||null,state:e?ls(s.mode,u):u}}var o,s=e.doc,a=s.mode;t=ge(s,t);var l,c=Qi(s,t.line),u=je(e,t.line,n),d=new gs(c.text,e.options.tabSize);for(i&&(l=[]);(i||d.pose.options.maxHighlightLength?(a=!1,s&&Ii(e,t,i,d.pos),d.pos=t.length,l=null):l=Di(Hi(n,d,i,h),o),h){var f=h[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!a||u!=l){for(;cc;){var i=r[l];i>e&&r.splice(l,1,e,r[l+1],i),l+=2,c=Math.min(e,i)}if(t)if(a.opaque)r.splice(n,l-n,e,"cm-overlay "+t),l=n+2;else for(;l>n;n+=2){var o=r[n+1];r[n+1]=(o?o+" ":"")+"cm-overlay "+t}},o)}return{styles:r,classes:o.bgClass||o.textClass?o:null}}function Ri(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var i=je(e,tr(t)),r=zi(e,t,t.text.length>e.options.maxHighlightLength?ls(e.doc.mode,i):i);t.stateAfter=i,t.styles=r.styles,r.classes?t.styleClasses=r.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.frontier&&e.doc.frontier++}return t.styles}function Ii(e,t,n,i){var r=e.doc.mode,o=new gs(t,e.options.tabSize);for(o.start=o.pos=i||0,""==t&&Mi(r,n);!o.eol();)Hi(r,o,n),o.start=o.pos}function Oi(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?ks:xs;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Fi(e,t){var n=jr("span",null,null,xo?"padding-right: .1px":null),i={pre:jr("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,splitSpaces:(bo||xo)&&e.getOption("lineWrapping")};t.measure={};for(var r=0;r<=(t.rest?t.rest.length:0);r++){var o,s=r?t.rest[r-1]:t.line;i.pos=0,i.addToken=Wi,Kr(e.display.measure)&&(o=rr(s))&&(i.addToken=ji(i.addToken,o)),i.map=[];var a=t!=e.display.externalMeasured&&tr(s);Ui(s,i,Ri(e,s,a)),s.styleClasses&&(s.styleClasses.bgClass&&(i.bgClass=Vr(s.styleClasses.bgClass,i.bgClass||"")),s.styleClasses.textClass&&(i.textClass=Vr(s.styleClasses.textClass,i.textClass||""))),0==i.map.length&&i.map.push(0,0,i.content.appendChild(Qr(e.display.measure))),0==r?(t.measure.map=i.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(i.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(xo){var l=i.content.lastChild;(/\bcm-tab\b/.test(l.className)||l.querySelector&&l.querySelector(".cm-tab"))&&(i.content.className="cm-tab-wrap-hack")}return As(e,"renderLine",e,t.line,i.pre),i.pre.className&&(i.textClass=Vr(i.pre.className,i.textClass||"")),i}function Pi(e){var t=jr("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Wi(e,t,n,i,r,o,s){if(t){var a=e.splitSpaces?t.replace(/ {3,}/g,Bi):t,l=e.cm.state.specialChars,c=!1;if(l.test(t))for(var u=document.createDocumentFragment(),d=0;;){l.lastIndex=d;var h=l.exec(t),f=h?h.index-d:t.length-d;if(f){var p=document.createTextNode(a.slice(d,d+f));bo&&9>wo?u.appendChild(jr("span",[p])):u.appendChild(p),e.map.push(e.pos,e.pos+f,p),e.col+=f,e.pos+=f}if(!h)break;if(d+=f+1,"\t"==h[0]){var g=e.cm.options.tabSize,m=g-e.col%g,p=u.appendChild(jr("span",Hr(m),"cm-tab"));p.setAttribute("role","presentation"),p.setAttribute("cm-text","\t"),e.col+=m}else if("\r"==h[0]||"\n"==h[0]){var p=u.appendChild(jr("span","\r"==h[0]?"␍":"␤","cm-invalidchar"));p.setAttribute("cm-text",h[0]),e.col+=1}else{var p=e.cm.options.specialCharPlaceholder(h[0]);p.setAttribute("cm-text",h[0]),bo&&9>wo?u.appendChild(jr("span",[p])):u.appendChild(p),e.col+=1}e.map.push(e.pos,e.pos+1,p),e.pos++}else{e.col+=t.length;var u=document.createTextNode(a);e.map.push(e.pos,e.pos+t.length,u),bo&&9>wo&&(c=!0),e.pos+=t.length}if(n||i||r||c||s){var v=n||"";i&&(v+=i),r&&(v+=r);var y=jr("span",[u],v,s);return o&&(y.title=o),e.content.appendChild(y)}e.content.appendChild(u)}}function Bi(e){for(var t=" ",n=0;nc&&h.from<=c)break}if(h.to>=u)return e(n,i,r,o,s,a,l);e(n,i.slice(0,h.to-c),r,o,null,a,l),o=null,i=i.slice(h.to-c),c=h.to}}}function Yi(e,t,n,i){var r=!i&&n.widgetNode;r&&e.map.push(e.pos,e.pos+t,r),!i&&e.cm.display.input.needsContentAttribute&&(r||(r=e.content.appendChild(document.createElement("span"))),r.setAttribute("cm-marker",n.id)),r&&(e.cm.display.input.setUneditable(r),e.content.appendChild(r)),e.pos+=t}function Ui(e,t,n){var i=e.markedSpans,r=e.text,o=0;if(i)for(var s,a,l,c,u,d,h,f=r.length,p=0,g=1,m="",v=0;;){if(v==p){l=c=u=d=a="",h=null,v=1/0;for(var y,b=[],w=0;wp||k.collapsed&&x.to==p&&x.from==p)?(null!=x.to&&x.to!=p&&v>x.to&&(v=x.to,c=""),k.className&&(l+=" "+k.className),k.css&&(a=(a?a+";":"")+k.css),k.startStyle&&x.from==p&&(u+=" "+k.startStyle),k.endStyle&&x.to==v&&(y||(y=[])).push(k.endStyle,x.to),k.title&&!d&&(d=k.title),k.collapsed&&(!h||fi(h.marker,k)<0)&&(h=x)):x.from>p&&v>x.from&&(v=x.from)}if(y)for(var w=0;w=f)break;for(var S=Math.min(f,v);;){if(m){var C=p+m.length;if(!h){var T=C>S?m.slice(0,S-p):m;t.addToken(t,T,s?s+l:l,u,p+T.length==v?c:"",d,a)}if(C>=S){m=m.slice(S-p),p=S;break}p=C,u=""}m=r.slice(o,o=n[g++]),s=Oi(n[g++],t.cm.options)}}else for(var g=1;gn;++n)o.push(new ws(c[n],r(n),i));return o}var a=t.from,l=t.to,c=t.text,u=Qi(e,a.line),d=Qi(e,l.line),h=Nr(c),f=r(c.length-1),p=l.line-a.line;if(t.full)e.insert(0,s(0,c.length)),e.remove(c.length,e.size-c.length);else if(qi(e,t)){var g=s(0,c.length-1);o(d,d.text,f),p&&e.remove(a.line,p),g.length&&e.insert(a.line,g)}else if(u==d)if(1==c.length)o(u,u.text.slice(0,a.ch)+h+u.text.slice(l.ch),f);else{var g=s(1,c.length-1);g.push(new ws(h+u.text.slice(l.ch),f,i)),o(u,u.text.slice(0,a.ch)+c[0],r(0)),e.insert(a.line+1,g)}else if(1==c.length)o(u,u.text.slice(0,a.ch)+c[0]+d.text.slice(l.ch),r(0)),e.remove(a.line+1,p);else{o(u,u.text.slice(0,a.ch)+c[0],r(0)),o(d,h+d.text.slice(l.ch),f);var g=s(1,c.length-1);p>1&&e.remove(a.line+1,p-1),e.insert(a.line+1,g)}Cr(e,"change",e,t)}function Vi(e){this.lines=e,this.parent=null;for(var t=0,n=0;tt||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var i=0;;++i){var r=n.children[i],o=r.chunkSize();if(o>t){n=r;break}t-=o}return n.lines[t]}function Ki(e,t,n){var i=[],r=t.line;return e.iter(t.line,n.line+1,function(e){var o=e.text;r==n.line&&(o=o.slice(0,n.ch)),r==t.line&&(o=o.slice(t.ch)),i.push(o),++r}),i}function Ji(e,t,n){var i=[];return e.iter(t,n,function(e){i.push(e.text)}),i}function er(e,t){var n=t-e.height;if(n)for(var i=e;i;i=i.parent)i.height+=n}function tr(e){if(null==e.parent)return null;for(var t=e.parent,n=Ar(t.lines,e),i=t.parent;i;t=i,i=i.parent)for(var r=0;i.children[r]!=t;++r)n+=i.children[r].chunkSize();return n+t.first}function nr(e,t){var n=e.first;e:do{for(var i=0;it){e=r;continue e}t-=o,n+=r.chunkSize()}return n}while(!e.lines);for(var i=0;it)break;t-=a}return n+i}function ir(e){e=yi(e);for(var t=0,n=e.parent,i=0;i1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Nr(e.done)):void 0}function cr(e,t,n,i){var r=e.history;r.undone.length=0;var o,s=+new Date;if((r.lastOp==i||r.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&r.lastModTime>s-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=lr(r,r.lastOp==i))){var a=Nr(o.changes);0==Po(t.from,t.to)&&0==Po(t.from,a.to)?a.to=Jo(t):o.changes.push(sr(e,t))}else{var l=Nr(r.done);for(l&&l.ranges||hr(e.sel,r.done),o={changes:[sr(e,t)],generation:r.generation},r.done.push(o);r.done.length>r.undoDepth;)r.done.shift(),r.done[0].ranges||r.done.shift()}r.done.push(n),r.generation=++r.maxGeneration,r.lastModTime=r.lastSelTime=s,r.lastOp=r.lastSelOp=i,r.lastOrigin=r.lastSelOrigin=t.origin,a||As(e,"historyAdded")}function ur(e,t,n,i){var r=t.charAt(0);return"*"==r||"+"==r&&n.ranges.length==i.ranges.length&&n.somethingSelected()==i.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function dr(e,t,n,i){var r=e.history,o=i&&i.origin;n==r.lastSelOp||o&&r.lastSelOrigin==o&&(r.lastModTime==r.lastSelTime&&r.lastOrigin==o||ur(e,o,Nr(r.done),t))?r.done[r.done.length-1]=t:hr(t,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=o,r.lastSelOp=n,i&&i.clearRedo!==!1&&ar(r.undone)}function hr(e,t){var n=Nr(t);n&&n.ranges&&n.equals(e)||t.push(e)}function fr(e,t,n,i){var r=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,i),function(n){n.markedSpans&&((r||(r=t["spans_"+e.id]={}))[o]=n.markedSpans),++o})}function pr(e){if(!e)return null;for(var t,n=0;n-1&&(Nr(a)[d]=u[d],delete u[d])}}}return r}function vr(e,t,n,i){n0?i.slice():Hs:i||Hs}function Cr(e,t){function n(e){return function(){e.apply(null,o)}}var i=Sr(e,t,!1);if(i.length){var r,o=Array.prototype.slice.call(arguments,2);qo?r=qo.delayedCallbacks:zs?r=zs:(r=zs=[],setTimeout(Tr,0));for(var s=0;s0}function Dr(e){e.prototype.on=function(e,t){Ms(this,e,t)},e.prototype.off=function(e,t){Ns(this,e,t)}}function Mr(){this.id=null}function Hr(e){for(;js.length<=e;)js.push(Nr(js)+" ");return js[e]}function Nr(e){return e[e.length-1]}function Ar(e,t){for(var n=0;n-1&&Gs(e))||t.test(e):Gs(e)}function Wr(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function Br(e){return e.charCodeAt(0)>=768&&Vs.test(e)}function jr(e,t,n,i){var r=document.createElement(e);if(n&&(r.className=n),i&&(r.style.cssText=i),"string"==typeof t)r.appendChild(document.createTextNode(t));else if(t)for(var o=0;o0;--t)e.removeChild(e.firstChild);return e}function Ur(e,t){return Yr(e).appendChild(t)}function qr(){for(var e=document.activeElement;e&&e.root&&e.root.activeElement;)e=e.root.activeElement;return e}function Gr(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function Vr(e,t){for(var n=e.split(" "),i=0;i2&&!(bo&&8>wo))}var n=Zs?jr("span","​"):jr("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Kr(e){if(null!=Xs)return Xs;var t=Ur(e,document.createTextNode("AخA")),n=Us(t,0,1).getBoundingClientRect();if(!n||n.left==n.right)return!1;var i=Us(t,1,2).getBoundingClientRect();return Xs=i.right-n.right<3}function Jr(e){if(null!=ra)return ra;var t=Ur(e,jr("span","x")),n=t.getBoundingClientRect(),i=Us(t,0,1).getBoundingClientRect();return ra=Math.abs(n.left-i.left)>1}function eo(e,t,n,i){if(!e)return i(t,n,"ltr");for(var r=!1,o=0;ot||t==n&&s.to==t)&&(i(Math.max(s.from,t),Math.min(s.to,n),1==s.level?"rtl":"ltr"),r=!0)}r||i(t,n,"ltr")}function to(e){return e.level%2?e.to:e.from}function no(e){return e.level%2?e.from:e.to}function io(e){var t=rr(e);return t?to(t[0]):0}function ro(e){var t=rr(e);return t?no(Nr(t)):e.text.length}function oo(e,t){var n=Qi(e.doc,t),i=yi(n);i!=n&&(t=tr(i));var r=rr(i),o=r?r[0].level%2?ro(i):io(i):0;return Fo(t,o)}function so(e,t){for(var n,i=Qi(e.doc,t);n=mi(i);)i=n.find(1,!0).line,t=null;var r=rr(i),o=r?r[0].level%2?io(i):ro(i):i.text.length;return Fo(null==t?tr(i):t,o)}function ao(e,t){var n=oo(e,t.line),i=Qi(e.doc,n.line),r=rr(i);if(!r||0==r[0].level){var o=Math.max(0,i.text.search(/\S/)),s=t.line==n.line&&t.ch<=o&&t.ch;return Fo(n.line,s?0:o)}return n}function lo(e,t,n){var i=e[0].level;return t==i||n!=i&&n>t}function co(e,t){sa=null;for(var n,i=0;it)return i;if(r.from==t||r.to==t){if(null!=n)return lo(e,r.level,e[n].level)?(r.from!=r.to&&(sa=n),i):(r.from!=r.to&&(sa=i),n);n=i}}return n}function uo(e,t,n,i){if(!i)return t+n;do t+=n;while(t>0&&Br(e.text.charAt(t)));return t}function ho(e,t,n,i){var r=rr(e);if(!r)return fo(e,t,n,i);for(var o=co(r,t),s=r[o],a=uo(e,t,s.level%2?-n:n,i);;){if(a>s.from&&a0==s.level%2?s.to:s.from);if(s=r[o+=n],!s)return null;a=n>0==s.level%2?uo(e,s.to,-1,i):uo(e,s.from,1,i)}}function fo(e,t,n,i){var r=t+n;if(i)for(;r>0&&Br(e.text.charAt(r));)r+=n;return 0>r||r>e.text.length?null:r}var po=navigator.userAgent,go=navigator.platform,mo=/gecko\/\d/i.test(po),vo=/MSIE \d/.test(po),yo=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(po),bo=vo||yo,wo=bo&&(vo?document.documentMode||6:yo[1]),xo=/WebKit\//.test(po),ko=xo&&/Qt\/\d+\.\d+/.test(po),So=/Chrome\//.test(po),Co=/Opera\//.test(po),To=/Apple Computer/.test(navigator.vendor),Eo=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(po),_o=/PhantomJS/.test(po),Lo=/AppleWebKit/.test(po)&&/Mobile\/\w+/.test(po),Do=Lo||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(po),Mo=Lo||/Mac/.test(go),Ho=/\bCrOS\b/.test(po),No=/win/i.test(go),Ao=Co&&po.match(/Version\/(\d*\.\d*)/);Ao&&(Ao=Number(Ao[1])),Ao&&Ao>=15&&(Co=!1,xo=!0);var zo=Mo&&(ko||Co&&(null==Ao||12.11>Ao)),Ro=mo||bo&&wo>=9,Io=!1,Oo=!1;g.prototype=Or({update:function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,i=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?i+"px":"0";var r=e.viewHeight-(t?i:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+r)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?i+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?i:0);this.horiz.firstChild.style.width=e.scrollWidth-e.clientWidth+o+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==i&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?i:0,bottom:t?i:0}},setScrollLeft:function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz)},setScrollTop:function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert)},zeroWidthHack:function(){var e=Mo&&!Eo?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Mr,this.disableVert=new Mr},enableZeroWidthBar:function(e,t){function n(){var i=e.getBoundingClientRect(),r=document.elementFromPoint(i.left+1,i.bottom-1);r!=e?e.style.pointerEvents="none":t.set(1e3,n)}e.style.pointerEvents="auto",t.set(1e3,n)},clear:function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)}},g.prototype),m.prototype=Or({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},m.prototype),e.scrollbarModel={native:g,null:m},T.prototype.signal=function(e,t){Lr(e,t)&&this.events.push(arguments)},T.prototype.finish=function(){for(var e=0;e=9&&n.hasSelection&&(n.hasSelection=null),n.poll()}),Ms(o,"paste",function(e){Er(i,e)||K(e,i)||(i.state.pasteIncoming=!0,n.fastPoll())}),Ms(o,"cut",t),Ms(o,"copy",t),Ms(e.scroller,"paste",function(t){qt(e,t)||Er(i,t)||(i.state.pasteIncoming=!0,n.focus())}),Ms(e.lineSpace,"selectstart",function(t){qt(e,t)||_s(t)}),Ms(o,"compositionstart",function(){var e=i.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:i.markText(e,i.getCursor("to"),{className:"CodeMirror-composing"})}}),Ms(o,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},prepareSelection:function(){var e=this.cm,t=e.display,n=e.doc,i=Re(e);if(e.options.moveInputWithCursor){var r=ft(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),s=t.lineDiv.getBoundingClientRect();i.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,r.top+s.top-o.top)),i.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,r.left+s.left-o.left))}return i},showSelection:function(e){var t=this.cm,n=t.display;Ur(n.cursorDiv,e.cursors),Ur(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},reset:function(e){if(!this.contextMenuPending){var t,n,i=this.cm,r=i.doc;if(i.somethingSelected()){this.prevInput="";var o=r.sel.primary();t=ia&&(o.to().line-o.from().line>100||(n=i.getSelection()).length>1e3);var s=t?"-":n||i.getSelection();this.textarea.value=s,i.state.focused&&Ys(this.textarea),bo&&wo>=9&&(this.hasSelection=s)}else e||(this.prevInput=this.textarea.value="",bo&&wo>=9&&(this.hasSelection=null));this.inaccurateSelection=t}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!Do||qr()!=this.textarea))try{this.textarea.focus()}catch(e){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var e=this;e.pollingFast||e.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},fastPoll:function(){function e(){var i=n.poll();i||t?(n.pollingFast=!1,n.slowPoll()):(t=!0,n.polling.set(60,e))}var t=!1,n=this;n.pollingFast=!0,n.polling.set(20,e)},poll:function(){var e=this.cm,t=this.textarea,n=this.prevInput;if(this.contextMenuPending||!e.state.focused||na(t)&&!n&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var i=t.value;if(i==n&&!e.somethingSelected())return!1;if(bo&&wo>=9&&this.hasSelection===i||Mo&&/[\uf700-\uf7ff]/.test(i))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var r=i.charCodeAt(0);if(8203!=r||n||(n="​"),8666==r)return this.reset(),this.cm.execCommand("undo")}for(var o=0,s=Math.min(n.length,i.length);s>o&&n.charCodeAt(o)==i.charCodeAt(o);)++o;var a=this;return Dt(e,function(){Q(e,i.slice(o),n.length-o,null,a.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?t.value=a.prevInput="":a.prevInput=i,a.composing&&(a.composing.range.clear(),a.composing.range=e.markText(a.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){bo&&wo>=9&&(this.hasSelection=null),this.fastPoll()},onContextMenu:function(e){function t(){if(null!=s.selectionStart){var e=r.somethingSelected(),t="​"+(e?s.value:"");s.value="⇚",s.value=t,i.prevInput=e?"":"​",s.selectionStart=1,s.selectionEnd=t.length,o.selForContextMenu=r.doc.sel}}function n(){if(i.contextMenuPending=!1,i.wrapper.style.cssText=d,s.style.cssText=u,bo&&9>wo&&o.scrollbars.setScrollTop(o.scroller.scrollTop=l),null!=s.selectionStart){(!bo||bo&&9>wo)&&t();var e=0,n=function(){o.selForContextMenu==r.doc.sel&&0==s.selectionStart&&s.selectionEnd>0&&"​"==i.prevInput?Mt(r,us.selectAll)(r):e++<10?o.detectingSelectAll=setTimeout(n,500):o.input.reset()};o.detectingSelectAll=setTimeout(n,200)}}var i=this,r=i.cm,o=r.display,s=i.textarea,a=Gt(r,e),l=o.scroller.scrollTop;if(a&&!Co){var c=r.options.resetSelectionOnContextMenu;c&&-1==r.doc.sel.contains(a)&&Mt(r,Ee)(r.doc,fe(a),Os);var u=s.style.cssText,d=i.wrapper.style.cssText;i.wrapper.style.cssText="position: absolute";var h=i.wrapper.getBoundingClientRect();if(s.style.cssText="position: absolute; width: 30px; height: 30px; top: "+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+"px; z-index: 1000; background: "+(bo?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",xo)var f=window.scrollY;if(o.input.focus(),xo&&window.scrollTo(null,f),o.input.reset(),r.somethingSelected()||(s.value=i.prevInput=" "),i.contextMenuPending=!0,o.selForContextMenu=r.doc.sel,clearTimeout(o.detectingSelectAll),bo&&wo>=9&&t(),Ro){Ds(e);var p=function(){Ns(window,"mouseup",p),setTimeout(n,20)};Ms(window,"mouseup",p)}else setTimeout(n,50)}},readOnlyChanged:function(e){e||this.reset()},setUneditable:Rr,needsContentAttribute:!1},ne.prototype),re.prototype=Or({init:function(e){function t(e){if(!Er(i,e)){if(i.somethingSelected())Wo={lineWise:!1,text:i.getSelections()},"cut"==e.type&&i.replaceSelection("",null,"cut");else{if(!i.options.lineWiseCopyCut)return;var t=ee(i);Wo={lineWise:!0,text:t.text},"cut"==e.type&&i.operation(function(){i.setSelections(t.ranges,0,Os),i.replaceSelection("",null,"cut")})}if(e.clipboardData&&!Lo)e.preventDefault(),e.clipboardData.clearData(),e.clipboardData.setData("text/plain",Wo.text.join("\n"));else{var n=ie(),r=n.firstChild;i.display.lineSpace.insertBefore(n,i.display.lineSpace.firstChild),r.value=Wo.text.join("\n");var o=document.activeElement;Ys(r),setTimeout(function(){i.display.lineSpace.removeChild(n),o.focus()},50)}}}var n=this,i=n.cm,r=n.div=e.lineDiv;te(r),Ms(r,"paste",function(e){Er(i,e)||K(e,i)}),Ms(r,"compositionstart",function(e){var t=e.data;if(n.composing={sel:i.doc.sel,data:t,startData:t},t){var r=i.doc.sel.primary(),o=i.getLine(r.head.line),s=o.indexOf(t,Math.max(0,r.head.ch-t.length));s>-1&&s<=r.head.ch&&(n.composing.sel=fe(Fo(r.head.line,s),Fo(r.head.line,s+t.length)))}}),Ms(r,"compositionupdate",function(e){n.composing.data=e.data}),Ms(r,"compositionend",function(e){var t=n.composing;t&&(e.data==t.startData||/\u200b/.test(e.data)||(t.data=e.data),setTimeout(function(){t.handled||n.applyComposition(t),n.composing==t&&(n.composing=null)},50))}),Ms(r,"touchstart",function(){n.forceCompositionEnd()}),Ms(r,"input",function(){n.composing||!i.isReadOnly()&&n.pollContent()||Dt(n.cm,function(){Rt(i)})}),Ms(r,"copy",t),Ms(r,"cut",t)},prepareSelection:function(){var e=Re(this.cm,!1);return e.focus=this.cm.state.focused,e},showSelection:function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},showPrimarySelection:function(){var e=window.getSelection(),t=this.cm.doc.sel.primary(),n=ae(this.cm,e.anchorNode,e.anchorOffset),i=ae(this.cm,e.focusNode,e.focusOffset);if(!n||n.bad||!i||i.bad||0!=Po(Z(n,i),t.from())||0!=Po($(n,i),t.to())){var r=oe(this.cm,t.from()),o=oe(this.cm,t.to());if(r||o){var s=this.cm.display.view,a=e.rangeCount&&e.getRangeAt(0);if(r){if(!o){var l=s[s.length-1].measure,c=l.maps?l.maps[l.maps.length-1]:l.map;o={node:c[c.length-1],offset:c[c.length-2]-c[c.length-3]}}}else r={node:s[0].measure.map[2],offset:0};try{var u=Us(r.node,r.offset,o.offset,o.node)}catch(e){}u&&(!mo&&this.cm.state.focused?(e.collapse(r.node,r.offset),u.collapsed||e.addRange(u)):(e.removeAllRanges(),e.addRange(u)),a&&null==e.anchorNode?e.addRange(a):mo&&this.startGracePeriod()),this.rememberSelection()}}},startGracePeriod:function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){e.cm.curOp.selectionChanged=!0})},20)},showMultipleSelections:function(e){Ur(this.cm.display.cursorDiv,e.cursors),Ur(this.cm.display.selectionDiv,e.selection)},rememberSelection:function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},selectionInEditor:function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return $s(this.div,t)},focus:function(){"nocursor"!=this.cm.options.readOnly&&this.div.focus()},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return!0},receivedFocus:function(){function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}var t=this;this.selectionInEditor()?this.pollSelection():Dt(this.cm,function(){t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,e)},selectionChanged:function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;this.rememberSelection();var n=ae(t,e.anchorNode,e.anchorOffset),i=ae(t,e.focusNode,e.focusOffset);n&&i&&Dt(t,function(){Ee(t.doc,fe(n,i),Os),(n.bad||i.bad)&&(t.curOp.selectionChanged=!0)})}},pollContent:function(){var e=this.cm,t=e.display,n=e.doc.sel.primary(),i=n.from(),r=n.to();if(i.linet.viewTo-1)return!1;var o;if(i.line==t.viewFrom||0==(o=Ft(e,i.line)))var s=tr(t.view[0].line),a=t.view[0].node;else var s=tr(t.view[o].line),a=t.view[o-1].node.nextSibling;var l=Ft(e,r.line);if(l==t.view.length-1)var c=t.viewTo-1,u=t.lineDiv.lastChild;else var c=tr(t.view[l+1].line)-1,u=t.view[l+1].node.previousSibling;for(var d=e.doc.splitLines(ce(e,a,u,s,c)),h=Ki(e.doc,Fo(s,0),Fo(c,Qi(e.doc,c).text.length));d.length>1&&h.length>1;)if(Nr(d)==Nr(h))d.pop(),h.pop(),c--;else{if(d[0]!=h[0])break;d.shift(),h.shift(),s++}for(var f=0,p=0,g=d[0],m=h[0],v=Math.min(g.length,m.length);v>f&&g.charCodeAt(f)==m.charCodeAt(f);)++f;for(var y=Nr(d),b=Nr(h),w=Math.min(y.length-(1==d.length?f:0),b.length-(1==h.length?f:0));w>p&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)++p;d[d.length-1]=y.slice(0,y.length-p),d[0]=d[0].slice(f);var x=Fo(s,f),k=Fo(c,h.length?Nr(h).length-p:0);return d.length>1||d[0]||Po(x,k)?(Nn(e.doc,d,x,k,"+input"),!0):void 0},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){this.composing&&!this.composing.handled&&(this.applyComposition(this.composing),this.composing.handled=!0,this.div.blur(),this.div.focus())},applyComposition:function(e){this.cm.isReadOnly()?Mt(this.cm,Rt)(this.cm):e.data&&e.data!=e.startData&&Mt(this.cm,Q)(this.cm,e.data,0,e.sel)},setUneditable:function(e){e.contentEditable="false"},onKeyPress:function(e){e.preventDefault(),this.cm.isReadOnly()||Mt(this.cm,Q)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0)},readOnlyChanged:function(e){this.div.contentEditable=String("nocursor"!=e)},onContextMenu:Rr,resetPosition:Rr,needsContentAttribute:!0},re.prototype),e.inputStyles={textarea:ne,contenteditable:re},ue.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t=0&&Po(e,i.to())<=0)return n}return-1}},de.prototype={from:function(){return Z(this.anchor,this.head)},to:function(){return $(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var Bo,jo,Yo,Uo={left:0,right:0,top:0,bottom:0},qo=null,Go=0,Vo=0,$o=0,Zo=null;bo?Zo=-.53:mo?Zo=15:So?Zo=-.7:To&&(Zo=-1/3);var Xo=function(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}};e.wheelEventPixels=function(e){var t=Xo(e);return t.x*=Zo,t.y*=Zo,t};var Qo=new Mr,Ko=null,Jo=e.changeEnd=function(e){return e.text?Fo(e.from.line+e.text.length-1,Nr(e.text).length+(1==e.text.length?e.from.ch:0)):e.to};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,t){var n=this.options,i=n[e];n[e]==t&&"mode"!=e||(n[e]=t,ts.hasOwnProperty(e)&&Mt(this,ts[e])(this,t,i))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Vn(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nn&&(Wn(this,r.head.line,e,!0),n=r.head.line,i==this.doc.sel.primIndex&&Fn(this));else{var o=r.from(),s=r.to(),a=Math.max(n,o.line);n=Math.min(this.lastLine(),s.line-(s.ch?0:1))+1;for(var l=a;n>l;++l)Wn(this,l,e);var c=this.doc.sel.ranges;0==o.ch&&t.length==c.length&&c[i].from().ch>0&&ke(this.doc,i,new de(o,c[i].to()),Os)}}}),getTokenAt:function(e,t){return Ni(this,e,t)},getLineTokens:function(e,t){return Ni(this,Fo(e),t,!0)},getTokenTypeAt:function(e){e=ge(this.doc,e);var t,n=Ri(this,Qi(this.doc,e.line)),i=0,r=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var s=i+r>>1;if((s?n[2*s-1]:0)>=o)r=s;else{if(!(n[2*s+1]a?t:0==a?null:t.slice(0,a-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!as.hasOwnProperty(t))return n;var i=as[t],r=this.getModeAt(e);if("string"==typeof r[t])i[r[t]]&&n.push(i[r[t]]);else if(r[t])for(var o=0;or&&(e=r,i=!0),n=Qi(this.doc,e)}else n=e;return ut(this,n,{top:0,left:0},t||"page").top+(i?this.doc.height-ir(n):0)},defaultTextHeight:function(){return yt(this.display)},defaultCharWidth:function(){return bt(this.display)},setGutterMarker:Ht(function(e,t,n){return Bn(this.doc,e,"gutter",function(e){var i=e.gutterMarkers||(e.gutterMarkers={});return i[t]=n,!n&&Wr(i)&&(e.gutterMarkers=null),!0})}),clearGutter:Ht(function(e){var t=this,n=t.doc,i=n.first;n.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&(n.gutterMarkers[e]=null,It(t,i,"gutter"),Wr(n.gutterMarkers)&&(n.gutterMarkers=null)),++i})}),lineInfo:function(e){if("number"==typeof e){if(!ve(this.doc,e))return null;var t=e;if(e=Qi(this.doc,e),!e)return null}else{var t=tr(e);if(null==t)return null}return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,i,r){var o=this.display;e=ft(this,ge(this.doc,e));var s=e.bottom,a=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==i)s=e.top;else if("above"==i||"near"==i){var l=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==i||e.bottom+t.offsetHeight>l)&&e.top>t.offsetHeight?s=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=l&&(s=e.bottom),a+t.offsetWidth>c&&(a=c-t.offsetWidth)}t.style.top=s+"px",t.style.left=t.style.right="","right"==r?(a=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==r?a=0:"middle"==r&&(a=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=a+"px"),n&&Rn(this,a,s,a+t.offsetWidth,s+t.offsetHeight)},triggerOnKeyDown:Ht(hn),triggerOnKeyPress:Ht(gn),triggerOnKeyUp:pn,execCommand:function(e){return us.hasOwnProperty(e)?us[e].call(null,this):void 0},triggerElectric:Ht(function(e){J(this,e)}),findPosH:function(e,t,n,i){var r=1;0>t&&(r=-1,t=-t);for(var o=0,s=ge(this.doc,e);t>o&&(s=Yn(this.doc,s,r,n,i),!s.hitSide);++o);return s},moveH:Ht(function(e,t){var n=this;n.extendSelectionsBy(function(i){return n.display.shift||n.doc.extend||i.empty()?Yn(n.doc,i.head,e,t,n.options.rtlMoveVisually):0>e?i.from():i.to()},Ps)}),deleteH:Ht(function(e,t){var n=this.doc.sel,i=this.doc;n.somethingSelected()?i.replaceSelection("",null,"+delete"):jn(this,function(n){var r=Yn(i,n.head,e,t,!1);return 0>e?{from:r,to:n.head}:{from:n.head,to:r}})}),findPosV:function(e,t,n,i){var r=1,o=i;0>t&&(r=-1,t=-t);for(var s=0,a=ge(this.doc,e);t>s;++s){var l=ft(this,a,"div"); -if(null==o?o=l.left:l.left=o,a=Un(this,l,r,n),a.hitSide)break}return a},moveV:Ht(function(e,t){var n=this,i=this.doc,r=[],o=!n.display.shift&&!i.extend&&i.sel.somethingSelected();if(i.extendSelectionsBy(function(s){if(o)return 0>e?s.from():s.to();var a=ft(n,s.head,"div");null!=s.goalColumn&&(a.left=s.goalColumn),r.push(a.left);var l=Un(n,a,e,t);return"page"==t&&s==i.sel.primary()&&On(n,null,ht(n,l,"div").top-a.top),l},Ps),r.length)for(var s=0;s0&&a(n.charAt(i-1));)--i;for(;r.5)&&s(this),As(this,"refresh",this)}),swapDoc:Ht(function(e){var t=this.doc;return t.cm=null,Xi(this,e),at(this),this.display.input.reset(),this.scrollTo(e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Cr(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Dr(e);var es=e.defaults={},ts=e.optionHandlers={},ns=e.Init={toString:function(){return"CodeMirror.Init"}};qn("value","",function(e,t){e.setValue(t)},!0),qn("mode",null,function(e,t){e.doc.modeOption=t,n(e)},!0),qn("indentUnit",2,n,!0),qn("indentWithTabs",!1),qn("smartIndent",!0),qn("tabSize",4,function(e){i(e),at(e),Rt(e)},!0),qn("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var n=[],i=e.doc.first;e.doc.iter(function(e){for(var r=0;;){var o=e.text.indexOf(t,r);if(-1==o)break;r=o+t.length,n.push(Fo(i,o))}i++});for(var r=n.length-1;r>=0;r--)Nn(e.doc,t,n[r],Fo(n[r].line,n[r].ch+t.length))}}),qn("specialChars",/[\u0000-\u001f\u007f\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(t,n,i){t.state.specialChars=new RegExp(n.source+(n.test("\t")?"":"|\t"),"g"),i!=e.Init&&t.refresh()}),qn("specialCharPlaceholder",Pi,function(e){e.refresh()},!0),qn("electricChars",!0),qn("inputStyle",Do?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),qn("rtlMoveVisually",!No),qn("wholeLineUpdateBefore",!0),qn("theme","default",function(e){a(e),l(e)},!0),qn("keyMap","default",function(t,n,i){var r=Vn(n),o=i!=e.Init&&Vn(i);o&&o.detach&&o.detach(t,r),r.attach&&r.attach(t,o||null)}),qn("extraKeys",null),qn("lineWrapping",!1,r,!0),qn("gutters",[],function(e){f(e.options),l(e)},!0),qn("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?C(e.display)+"px":"0",e.refresh()},!0),qn("coverGutterNextToScrollbar",!1,function(e){y(e)},!0),qn("scrollbarStyle","native",function(e){v(e),y(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),qn("lineNumbers",!1,function(e){f(e.options),l(e)},!0),qn("firstLineNumber",1,l,!0),qn("lineNumberFormatter",function(e){return e},l,!0),qn("showCursorWhenSelecting",!1,ze,!0),qn("resetSelectionOnContextMenu",!0),qn("lineWiseCopyCut",!0),qn("readOnly",!1,function(e,t){"nocursor"==t?(yn(e),e.display.input.blur(),e.display.disabled=!0):e.display.disabled=!1,e.display.input.readOnlyChanged(t)}),qn("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),qn("dragDrop",!0,Yt),qn("allowDropFileTypes",null),qn("cursorBlinkRate",530),qn("cursorScrollMargin",0),qn("cursorHeight",1,ze,!0),qn("singleCursorHeightPerLine",!0,ze,!0),qn("workTime",100),qn("workDelay",100),qn("flattenSpans",!0,i,!0),qn("addModeClass",!1,i,!0),qn("pollInterval",100),qn("undoDepth",200,function(e,t){e.doc.history.undoDepth=t}),qn("historyEventDelay",1250),qn("viewportMargin",10,function(e){e.refresh()},!0),qn("maxHighlightLength",1e4,i,!0),qn("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),qn("tabindex",null,function(e,t){e.display.input.getField().tabIndex=t||""}),qn("autofocus",null);var is=e.modes={},rs=e.mimeModes={};e.defineMode=function(t,n){e.defaults.mode||"null"==t||(e.defaults.mode=t),arguments.length>2&&(n.dependencies=Array.prototype.slice.call(arguments,2)),is[t]=n},e.defineMIME=function(e,t){rs[e]=t},e.resolveMode=function(t){if("string"==typeof t&&rs.hasOwnProperty(t))t=rs[t];else if(t&&"string"==typeof t.name&&rs.hasOwnProperty(t.name)){var n=rs[t.name];"string"==typeof n&&(n={name:n}),t=Ir(n,t),t.name=n.name}else if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return e.resolveMode("application/xml");return"string"==typeof t?{name:t}:t||{name:"null"}},e.getMode=function(t,n){var n=e.resolveMode(n),i=is[n.name];if(!i)return e.getMode(t,"text/plain");var r=i(t,n);if(os.hasOwnProperty(n.name)){var o=os[n.name];for(var s in o)o.hasOwnProperty(s)&&(r.hasOwnProperty(s)&&(r["_"+s]=r[s]),r[s]=o[s])}if(r.name=n.name,n.helperType&&(r.helperType=n.helperType),n.modeProps)for(var s in n.modeProps)r[s]=n.modeProps[s];return r},e.defineMode("null",function(){return{token:function(e){e.skipToEnd()}}}),e.defineMIME("text/plain","null");var os=e.modeExtensions={};e.extendMode=function(e,t){var n=os.hasOwnProperty(e)?os[e]:os[e]={};Or(t,n)},e.defineExtension=function(t,n){e.prototype[t]=n},e.defineDocExtension=function(e,t){Cs.prototype[e]=t},e.defineOption=qn;var ss=[];e.defineInitHook=function(e){ss.push(e)};var as=e.helpers={};e.registerHelper=function(t,n,i){as.hasOwnProperty(t)||(as[t]=e[t]={_global:[]}),as[t][n]=i},e.registerGlobalHelper=function(t,n,i,r){e.registerHelper(t,n,r),as[t]._global.push({pred:i,val:r})};var ls=e.copyState=function(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var i in t){var r=t[i];r instanceof Array&&(r=r.concat([])),n[i]=r}return n},cs=e.startState=function(e,t,n){return!e.startState||e.startState(t,n)};e.innerMode=function(e,t){for(;e.innerMode;){var n=e.innerMode(t);if(!n||n.mode==e)break;t=n.state,e=n.mode}return n||{mode:e,state:t}};var us=e.commands={selectAll:function(e){e.setSelection(Fo(e.firstLine(),0),Fo(e.lastLine()),Os)},singleSelection:function(e){e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Os)},killLine:function(e){jn(e,function(t){if(t.empty()){var n=Qi(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)r=new Fo(r.line,r.ch+1),e.replaceRange(o.charAt(r.ch-1)+o.charAt(r.ch-2),Fo(r.line,r.ch-2),r,"+transpose");else if(r.line>e.doc.first){var s=Qi(e.doc,r.line-1).text;s&&e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+s.charAt(s.length-1),Fo(r.line-1,s.length-1),Fo(r.line,1),"+transpose")}n.push(new de(r,r))}e.setSelections(n)})},newlineAndIndent:function(e){Dt(e,function(){for(var t=e.listSelections().length,n=0;t>n;n++){var i=e.listSelections()[n];e.replaceRange(e.doc.lineSeparator(),i.anchor,i.head,"+input"),e.indentLine(i.from().line+1,null,!0)}Fn(e)})},openLine:function(e){e.replaceSelection("\n","start")},toggleOverwrite:function(e){e.toggleOverwrite()}},ds=e.keyMap={};ds.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},ds.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},ds.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},ds.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},ds.default=Mo?ds.macDefault:ds.pcDefault,e.normalizeKeyMap=function(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==i){delete e[n];continue}for(var r=zr(n.split(" "),Gn),o=0;o=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){return this.post},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);return t>-1?(this.pos=t,!0):void 0},backUp:function(e){this.pos-=e},column:function(){return this.lastColumnPos0?null:(i&&t!==!1&&(this.pos+=i[0].length),i)}var r=function(e){return n?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);return r(o)==r(e)?(t!==!1&&(this.pos+=e.length),!0):void 0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}};var ms=0,vs=e.TextMarker=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ms};Dr(vs),vs.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&wt(e),Lr(this,"clear")){var n=this.find();n&&Cr(this,"clear",n.from,n.to)}for(var i=null,r=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=l,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=i&&e&&this.collapsed&&Rt(e,i,r+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&De(e.doc)),e&&Cr(e,"markerCleared",e,this),t&&kt(e),this.parent&&this.parent.clear()}},vs.prototype.find=function(e,t){null==e&&"bookmark"==this.type&&(e=1);for(var n,i,r=0;rn;++n){var r=this.lines[n];this.height-=r.height,Li(r),Cr(r,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var i=0;ie;++e)if(n(this.lines[e]))return!0}},$i.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;ne){var o=Math.min(t,r-e),s=i.height;if(i.removeInner(e,o),this.height-=s-i.height,r==o&&(this.children.splice(n--,1),i.parent=null),0==(t-=o))break;e=0}else e-=r}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Vi))){var a=[];this.collapse(a),this.children=[new Vi(a)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t=e){if(r.insertInner(e,t,n),r.lines&&r.lines.length>50){for(var s=r.lines.length%25+25,a=s;a10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var i=0;ie){var s=Math.min(t,o-e);if(r.iterN(e,s,n))return!0;if(0==(t-=s))break;e=0}else e-=o}}};var Ss=0,Cs=e.Doc=function(e,t,n,i){if(!(this instanceof Cs))return new Cs(e,t,n,i);null==n&&(n=0),$i.call(this,[new Vi([new ws("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=n;var r=Fo(n,0);this.sel=fe(r),this.history=new or(null),this.id=++Ss,this.modeOption=t,this.lineSep=i,this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Gi(this,{from:r,to:r,text:e}),Ee(this,fe(r),Os)};Cs.prototype=Ir($i.prototype,{constructor:Cs,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,i=0;i=0;o--)En(this,i[o]);a?Te(this,a):this.cm&&Fn(this.cm)}),undo:Nt(function(){Ln(this,"undo")}),redo:Nt(function(){Ln(this,"redo")}),undoSelection:Nt(function(){Ln(this,"undo",!0)}),redoSelection:Nt(function(){Ln(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,i=0;i=e.ch)&&t.push(r.marker.parent||r.marker)}return t},findMarks:function(e,t,n){e=ge(this,e),t=ge(this,t);var i=[],r=e.line;return this.iter(e.line,t.line+1,function(o){var s=o.markedSpans;if(s)for(var a=0;a=l.to||null==l.from&&r!=e.line||null!=l.from&&r==t.line&&l.from>=t.ch||n&&!n(l.marker)||i.push(l.marker.parent||l.marker)}++r}),i},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var i=0;ie?(t=e,!0):(e-=o,void++n)}),ge(this,Fo(n,t))},indexFromPos:function(e){e=ge(this,e);var t=e.ch;if(e.linet&&(t=e.from),null!=e.to&&e.toa||a>=t)return s+(t-o);s+=a-o,s+=n-s%n,o=a+1}},Bs=e.findColumn=function(e,t,n){for(var i=0,r=0;;){var o=e.indexOf("\t",i);-1==o&&(o=e.length);var s=o-i;if(o==e.length||r+s>=t)return i+Math.min(s,t-r);if(r+=o-i,r+=n-r%n,i=o+1,r>=t)return i}},js=[""],Ys=function(e){e.select()};Lo?Ys=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:bo&&(Ys=function(e){try{e.select()}catch(e){}});var Us,qs=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Gs=e.isWordChar=function(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||qs.test(e))},Vs=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;Us=document.createRange?function(e,t,n,i){var r=document.createRange();return r.setEnd(i||e,n),r.setStart(e,t),r}:function(e,t,n){var i=document.body.createTextRange();try{i.moveToElementText(e.parentNode)}catch(e){return i}return i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",t),i};var $s=e.contains=function(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do if(11==t.nodeType&&(t=t.host),t==e)return!0;while(t=t.parentNode)};bo&&11>wo&&(qr=function(){try{return document.activeElement}catch(e){return document.body}});var Zs,Xs,Qs=e.rmClass=function(e,t){var n=e.className,i=Gr(t).exec(n);if(i){var r=n.slice(i.index+i[0].length);e.className=n.slice(0,i.index)+(r?i[1]+r:"")}},Ks=e.addClass=function(e,t){var n=e.className;Gr(t).test(n)||(e.className+=(n?" ":"")+t)},Js=!1,ea=function(){if(bo&&9>wo)return!1;var e=jr("div");return"draggable"in e||"dragDrop"in e}(),ta=e.splitLines=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],i=e.length;i>=t;){var r=e.indexOf("\n",t);-1==r&&(r=e.length);var o=e.slice(t,"\r"==e.charAt(r-1)?r-1:r),s=o.indexOf("\r");-1!=s?(n.push(o.slice(0,s)),t+=s+1):(n.push(o),t=r+1)}return n}:function(e){return e.split(/\r\n?|\n/)},na=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){try{var t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},ia=function(){var e=jr("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),ra=null,oa=e.keyNames={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};!function(){for(var e=0;10>e;e++)oa[e+48]=oa[e+96]=String(e);for(var e=65;90>=e;e++)oa[e]=String.fromCharCode(e);for(var e=1;12>=e;e++)oa[e+111]=oa[e+63235]="F"+e}();var sa,aa=function(){function e(e){return 247>=e?n.charAt(e):e>=1424&&1524>=e?"R":e>=1536&&1773>=e?i.charAt(e-1536):e>=1774&&2220>=e?"r":e>=8192&&8203>=e?"w":8204==e?"b":"L"}function t(e,t,n){this.level=e,this.from=t,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",i="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,s=/[LRr]/,a=/[Lb1n]/,l=/[1n]/,c="L";return function(n){if(!r.test(n))return!1;for(var i,u=n.length,d=[],h=0;u>h;++h)d.push(i=e(n.charCodeAt(h)));for(var h=0,f=c;u>h;++h){var i=d[h];"m"==i?d[h]=f:f=i}for(var h=0,p=c;u>h;++h){var i=d[h];"1"==i&&"r"==p?d[h]="n":s.test(i)&&(p=i,"r"==i&&(d[h]="R"))}for(var h=1,f=d[0];u-1>h;++h){var i=d[h];"+"==i&&"1"==f&&"1"==d[h+1]?d[h]="1":","!=i||f!=d[h+1]||"1"!=f&&"n"!=f||(d[h]=f),f=i}for(var h=0;u>h;++h){var i=d[h];if(","==i)d[h]="N";else if("%"==i){for(var g=h+1;u>g&&"%"==d[g];++g);for(var m=h&&"!"==d[h-1]||u>g&&"1"==d[g]?"1":"N",v=h;g>v;++v)d[v]=m;h=g-1}}for(var h=0,p=c;u>h;++h){var i=d[h];"L"==p&&"1"==i?d[h]="L":s.test(i)&&(p=i)}for(var h=0;u>h;++h)if(o.test(d[h])){for(var g=h+1;u>g&&o.test(d[g]);++g);for(var y="L"==(h?d[h-1]:c),b="L"==(u>g?d[g]:c),m=y||b?"L":"R",v=h;g>v;++v)d[v]=m;h=g-1}for(var w,x=[],h=0;u>h;)if(a.test(d[h])){var k=h;for(++h;u>h&&a.test(d[h]);++h);x.push(new t(0,k,h))}else{var S=h,C=x.length;for(++h;u>h&&"L"!=d[h];++h);for(var v=S;h>v;)if(l.test(d[v])){v>S&&x.splice(C,0,new t(1,S,v));var T=v;for(++v;h>v&&l.test(d[v]);++v);x.splice(C,0,new t(2,T,v)),S=v}else++v;h>S&&x.splice(C,0,new t(1,S,h))}return 1==x[0].level&&(w=n.match(/^\s+/))&&(x[0].from=w[0].length,x.unshift(new t(0,0,w[0].length))),1==Nr(x).level&&(w=n.match(/\s+$/))&&(Nr(x).to-=w[0].length,x.push(new t(0,u-w[0].length,u))),2==x[0].level&&x.unshift(new t(1,x[0].to,x[0].to)),x[0].level!=Nr(x).level&&x.push(new t(x[0].level,u,u)),x}}();return e.version="5.15.2",e})},{}],11:[function(t,n,i){!function(r){"object"==typeof i&&"object"==typeof n?r(t("../../lib/codemirror"),t("../markdown/markdown"),t("../../addon/mode/overlay")):"function"==typeof e&&e.amd?e(["../../lib/codemirror","../markdown/markdown","../../addon/mode/overlay"],r):r(CodeMirror)}(function(e){"use strict";var t=/^((?:(?:aaas?|about|acap|adiumxtra|af[ps]|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|cap|chrome(?:-extension)?|cid|coap|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-(?:playcontainer|playsingle)|dns|doi|dtn|dvb|ed2k|facetime|feed|file|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|hcp|https?|iax|icap|icon|im|imap|info|ipn|ipp|irc[6s]?|iris(?:\.beep|\.lwz|\.xpc|\.xpcs)?|itms|jar|javascript|jms|keyparc|lastfm|ldaps?|magnet|mailto|maps|market|message|mid|mms|ms-help|msnim|msrps?|mtqp|mumble|mupdate|mvn|news|nfs|nih?|nntp|notes|oid|opaquelocktoken|palm|paparazzi|platform|pop|pres|proxy|psyc|query|res(?:ource)?|rmi|rsync|rtmp|rtsp|secondlife|service|session|sftp|sgn|shttp|sieve|sips?|skype|sm[bs]|snmp|soap\.beeps?|soldat|spotify|ssh|steam|svn|tag|teamspeak|tel(?:net)?|tftp|things|thismessage|tip|tn3270|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|view-source|webcal|wss?|wtai|wyciwyg|xcon(?:-userid)?|xfire|xmlrpc\.beeps?|xmpp|xri|ymsgr|z39\.50[rs]?):(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i;e.defineMode("gfm",function(n,i){function r(e){return e.code=!1,null}var o=0,s={startState:function(){return{code:!1,codeBlock:!1,ateSpace:!1}},copyState:function(e){return{code:e.code,codeBlock:e.codeBlock,ateSpace:e.ateSpace}},token:function(e,n){if(n.combineTokens=null,n.codeBlock)return e.match(/^```+/)?(n.codeBlock=!1,null):(e.skipToEnd(),null);if(e.sol()&&(n.code=!1),e.sol()&&e.match(/^```+/))return e.skipToEnd(),n.codeBlock=!0,null;if("`"===e.peek()){e.next();var r=e.pos;e.eatWhile("`");var s=1+e.pos-r;return n.code?s===o&&(n.code=!1):(o=s,n.code=!0),null}if(n.code)return e.next(),null;if(e.eatSpace())return n.ateSpace=!0,null;if((e.sol()||n.ateSpace)&&(n.ateSpace=!1,i.gitHubSpice!==!1)){if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?:[a-f0-9]{7,40}\b)/))return n.combineTokens=!0,"link";if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return n.combineTokens=!0,"link"}return e.match(t)&&"]("!=e.string.slice(e.start-2,e.start)&&(0==e.start||/\W/.test(e.string.charAt(e.start-1)))?(n.combineTokens=!0,"link"):(e.next(),null)},blankLine:r},a={underscoresBreakWords:!1,taskLists:!0,fencedCodeBlocks:"```",strikethrough:!0};for(var l in i)a[l]=i[l];return a.name="markdown",e.overlayMode(e.getMode(n,a),s)},"markdown"),e.defineMIME("text/x-gfm","gfm")})},{"../../addon/mode/overlay":8,"../../lib/codemirror":10,"../markdown/markdown":12}],12:[function(t,n,i){!function(r){"object"==typeof i&&"object"==typeof n?r(t("../../lib/codemirror"),t("../xml/xml"),t("../meta")):"function"==typeof e&&e.amd?e(["../../lib/codemirror","../xml/xml","../meta"],r):r(CodeMirror)}(function(e){"use strict";e.defineMode("markdown",function(t,n){function i(n){if(e.findModeByName){var i=e.findModeByName(n);i&&(n=i.mime||i.mimes[0])}var r=e.getMode(t,n);return"null"==r.name?null:r}function r(e,t,n){return t.f=t.inline=n,n(e,t)}function o(e,t,n){return t.f=t.block=n,n(e,t)}function s(e){return!e||!/\S/.test(e.string)}function a(e){return e.linkTitle=!1,e.em=!1,e.strong=!1,e.strikethrough=!1,e.quote=0,e.indentedCode=!1,k&&e.f==c&&(e.f=p,e.block=l),e.trailingSpace=0,e.trailingSpaceNewLine=!1,e.prevLine=e.thisLine,e.thisLine=null,null}function l(t,o){var a=t.sol(),l=o.list!==!1,c=o.indentedCode;o.indentedCode=!1,l&&(o.indentationDiff>=0?(o.indentationDiff<4&&(o.indentation-=o.indentationDiff),o.list=null):o.indentation>0?o.list=null:o.list=!1);var d=null;if(o.indentationDiff>=4)return t.skipToEnd(),c||s(o.prevLine)?(o.indentation-=4,o.indentedCode=!0,S.code):null;if(t.eatSpace())return null;if((d=t.match(D))&&d[1].length<=6)return o.header=d[1].length,n.highlightFormatting&&(o.formatting="header"),o.f=o.inline,h(o);if(!(s(o.prevLine)||o.quote||l||c)&&(d=t.match(M)))return o.header="="==d[0].charAt(0)?1:2,n.highlightFormatting&&(o.formatting="header"),o.f=o.inline,h(o);if(t.eat(">"))return o.quote=a?1:o.quote+1,n.highlightFormatting&&(o.formatting="quote"),t.eatSpace(),h(o);if("["===t.peek())return r(t,o,y);if(t.match(T,!0))return o.hr=!0,S.hr;if((s(o.prevLine)||l)&&(t.match(E,!1)||t.match(_,!1))){var f=null;for(t.match(E,!0)?f="ul":(t.match(_,!0),f="ol"),o.indentation=t.column()+t.current().length,o.list=!0;o.listStack&&t.column()")>-1)&&(n.f=p,n.block=l,n.htmlState=null)}return i}function u(e,t){return t.fencedChars&&e.match(t.fencedChars,!1)?(t.localMode=t.localState=null,t.f=t.block=d,null):t.localMode?t.localMode.token(e,t.localState):(e.skipToEnd(),S.code)}function d(e,t){e.match(t.fencedChars),t.block=l,t.f=p,t.fencedChars=null,n.highlightFormatting&&(t.formatting="code-block"),t.code=1;var i=h(t);return t.code=0,i}function h(e){var t=[];if(e.formatting){t.push(S.formatting),"string"==typeof e.formatting&&(e.formatting=[e.formatting]);for(var i=0;i=e.quote?t.push(S.formatting+"-"+e.formatting[i]+"-"+e.quote):t.push("error"))}if(e.taskOpen)return t.push("meta"),t.length?t.join(" "):null;if(e.taskClosed)return t.push("property"),t.length?t.join(" "):null;if(e.linkHref?t.push(S.linkHref,"url"):(e.strong&&t.push(S.strong),e.em&&t.push(S.em),e.strikethrough&&t.push(S.strikethrough),e.linkText&&t.push(S.linkText),e.code&&t.push(S.code)),e.header&&t.push(S.header,S.header+"-"+e.header),e.quote&&(t.push(S.quote),!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(S.quote+"-"+e.quote):t.push(S.quote+"-"+n.maxBlockquoteDepth)),e.list!==!1){var r=(e.listStack.length-1)%3;r?1===r?t.push(S.list2):t.push(S.list3):t.push(S.list1)}return e.trailingSpaceNewLine?t.push("trailing-space-new-line"):e.trailingSpace&&t.push("trailing-space-"+(e.trailingSpace%2?"a":"b")),t.length?t.join(" "):null}function f(e,t){return e.match(H,!0)?h(t):void 0}function p(t,i){var r=i.text(t,i);if("undefined"!=typeof r)return r;if(i.list)return i.list=null,h(i);if(i.taskList){var s="x"!==t.match(L,!0)[1];return s?i.taskOpen=!0:i.taskClosed=!0,n.highlightFormatting&&(i.formatting="task"),i.taskList=!1,h(i)}if(i.taskOpen=!1,i.taskClosed=!1,i.header&&t.match(/^#+$/,!0))return n.highlightFormatting&&(i.formatting="header"),h(i);var a=t.sol(),l=t.next();if(i.linkTitle){i.linkTitle=!1;var u=l;"("===l&&(u=")"),u=(u+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");var d="^\\s*(?:[^"+u+"\\\\]+|\\\\\\\\|\\\\.)"+u;if(t.match(new RegExp(d),!0))return S.linkHref}if("`"===l){var f=i.formatting;n.highlightFormatting&&(i.formatting="code"),t.eatWhile("`");var p=t.current().length;if(0==i.code)return i.code=p,h(i);if(p==i.code){var v=h(i);return i.code=0,v}return i.formatting=f,h(i)}if(i.code)return h(i);if("\\"===l&&(t.next(),n.highlightFormatting)){var y=h(i),b=S.formatting+"-escape";return y?y+" "+b:b}if("!"===l&&t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return t.match(/\[[^\]]*\]/),i.inline=i.f=m,S.image;if("["===l&&t.match(/[^\]]*\](\(.*\)| ?\[.*?\])/,!1))return i.linkText=!0,n.highlightFormatting&&(i.formatting="link"),h(i);if("]"===l&&i.linkText&&t.match(/\(.*?\)| ?\[.*?\]/,!1)){n.highlightFormatting&&(i.formatting="link");var y=h(i);return i.linkText=!1,i.inline=i.f=m,y}if("<"===l&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){i.f=i.inline=g,n.highlightFormatting&&(i.formatting="link");var y=h(i);return y?y+=" ":y="",y+S.linkInline}if("<"===l&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){i.f=i.inline=g,n.highlightFormatting&&(i.formatting="link");var y=h(i);return y?y+=" ":y="",y+S.linkEmail}if("<"===l&&t.match(/^(!--|\w)/,!1)){var w=t.string.indexOf(">",t.pos);if(-1!=w){var k=t.string.substring(t.start,w);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(k)&&(i.md_inside=!0)}return t.backUp(1),i.htmlState=e.startState(x),o(t,i,c)}if("<"===l&&t.match(/^\/\w*?>/))return i.md_inside=!1,"tag";var C=!1;if(!n.underscoresBreakWords&&"_"===l&&"_"!==t.peek()&&t.match(/(\w)/,!1)){var T=t.pos-2;if(T>=0){var E=t.string.charAt(T);"_"!==E&&E.match(/(\w)/,!1)&&(C=!0)}}if("*"===l||"_"===l&&!C)if(a&&" "===t.peek());else{if(i.strong===l&&t.eat(l)){n.highlightFormatting&&(i.formatting="strong");var v=h(i);return i.strong=!1,v}if(!i.strong&&t.eat(l))return i.strong=l,n.highlightFormatting&&(i.formatting="strong"),h(i);if(i.em===l){n.highlightFormatting&&(i.formatting="em");var v=h(i);return i.em=!1,v}if(!i.em)return i.em=l,n.highlightFormatting&&(i.formatting="em"),h(i)}else if(" "===l&&(t.eat("*")||t.eat("_"))){if(" "===t.peek())return h(i);t.backUp(1)}if(n.strikethrough)if("~"===l&&t.eatWhile(l)){if(i.strikethrough){n.highlightFormatting&&(i.formatting="strikethrough");var v=h(i);return i.strikethrough=!1,v}if(t.match(/^[^\s]/,!1))return i.strikethrough=!0,n.highlightFormatting&&(i.formatting="strikethrough"),h(i)}else if(" "===l&&t.match(/^~~/,!0)){if(" "===t.peek())return h(i);t.backUp(2)}return" "===l&&(t.match(/ +$/,!1)?i.trailingSpace++:i.trailingSpace&&(i.trailingSpaceNewLine=!0)),h(i)}function g(e,t){var i=e.next();if(">"===i){t.f=t.inline=p,n.highlightFormatting&&(t.formatting="link");var r=h(t);return r?r+=" ":r="",r+S.linkInline}return e.match(/^[^>]+/,!0),S.linkInline}function m(e,t){if(e.eatSpace())return null;var i=e.next();return"("===i||"["===i?(t.f=t.inline=v("("===i?")":"]",0),n.highlightFormatting&&(t.formatting="link-string"),t.linkHref=!0,h(t)):"error"}function v(e){return function(t,i){var r=t.next();if(r===e){i.f=i.inline=p,n.highlightFormatting&&(i.formatting="link-string");var o=h(i);return i.linkHref=!1,o}return t.match(A[e]),i.linkHref=!0,h(i)}}function y(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=b,e.next(),n.highlightFormatting&&(t.formatting="link"),t.linkText=!0,h(t)):r(e,t,p)}function b(e,t){if(e.match(/^\]:/,!0)){t.f=t.inline=w,n.highlightFormatting&&(t.formatting="link");var i=h(t);return t.linkText=!1,i}return e.match(/^([^\]\\]|\\.)+/,!0),S.linkText}function w(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),void 0===e.peek()?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),t.f=t.inline=p,S.linkHref+" url")}var x=e.getMode(t,"text/html"),k="null"==x.name;void 0===n.highlightFormatting&&(n.highlightFormatting=!1),void 0===n.maxBlockquoteDepth&&(n.maxBlockquoteDepth=0),void 0===n.underscoresBreakWords&&(n.underscoresBreakWords=!0),void 0===n.taskLists&&(n.taskLists=!1),void 0===n.strikethrough&&(n.strikethrough=!1),void 0===n.tokenTypeOverrides&&(n.tokenTypeOverrides={});var S={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"tag",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough"};for(var C in S)S.hasOwnProperty(C)&&n.tokenTypeOverrides[C]&&(S[C]=n.tokenTypeOverrides[C]);var T=/^([*\-_])(?:\s*\1){2,}\s*$/,E=/^[*\-+]\s+/,_=/^[0-9]+([.)])\s+/,L=/^\[(x| )\](?=\s)/,D=n.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,M=/^ *(?:\={1,}|-{1,})\s*$/,H=/^[^#!\[\]*_\\<>` "'(~]+/,N=new RegExp("^("+(n.fencedCodeBlocks===!0?"~~~+|```+":n.fencedCodeBlocks)+")[ \\t]*([\\w+#-]*)"),A={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\\]]|\\.)*\])*?(?=\])/},z={startState:function(){return{f:l,prevLine:null,thisLine:null,block:l,htmlState:null,indentation:0,inline:p,text:f,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,fencedChars:null}},copyState:function(t){return{f:t.f,prevLine:t.prevLine,thisLine:t.thisLine,block:t.block,htmlState:t.htmlState&&e.copyState(x,t.htmlState),indentation:t.indentation,localMode:t.localMode,localState:t.localMode?e.copyState(t.localMode,t.localState):null,inline:t.inline,text:t.text,formatting:!1,linkTitle:t.linkTitle,code:t.code,em:t.em,strong:t.strong,strikethrough:t.strikethrough,header:t.header,hr:t.hr,taskList:t.taskList,list:t.list,listStack:t.listStack.slice(0),quote:t.quote,indentedCode:t.indentedCode,trailingSpace:t.trailingSpace,trailingSpaceNewLine:t.trailingSpaceNewLine,md_inside:t.md_inside,fencedChars:t.fencedChars}},token:function(e,t){if(t.formatting=!1,e!=t.thisLine){var n=t.header||t.hr;if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0)||n){if(a(t),!n)return null;t.prevLine=null}t.prevLine=t.thisLine,t.thisLine=e,t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.f=t.block;var i=e.match(/^\s*/,!0)[0].replace(/\t/g," ").length;if(t.indentationDiff=Math.min(i-t.indentation,4),t.indentation=t.indentation+t.indentationDiff,i>0)return null}return t.f(e,t)},innerMode:function(e){return e.block==c?{state:e.htmlState,mode:x}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:z}},blankLine:a,getType:h,fold:"markdown"};return z},"xml"),e.defineMIME("text/x-markdown","markdown")})},{"../../lib/codemirror":10,"../meta":13,"../xml/xml":14}],13:[function(t,n,i){!function(r){"object"==typeof i&&"object"==typeof n?r(t("../lib/codemirror")):"function"==typeof e&&e.amd?e(["../lib/codemirror"],r):r(CodeMirror)}(function(e){"use strict";e.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["pgp"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists.txt$/},{name:"CoffeeScript",mime:"text/x-coffeescript",mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history).md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"]},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Jade",mime:"text/x-jade",mode:"jade",ext:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"null",mode:"jinja2"},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mime:"text/n-triples",mode:"ntriples",ext:["nt"]},{name:"Objective C",mime:"text/x-objectivec",mode:"clike",ext:["m","mm"],alias:["objective-c","objc"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mime:"application/x-httpd-php",mode:"php",ext:["php","php3","php4","php5","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mime:"text/x-sh",mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki ",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript", -mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mime:"text/x-yaml",mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]}];for(var t=0;t-1&&t.substring(r+1,t.length);return o?e.findModeByExtension(o):void 0},e.findModeByName=function(t){t=t.toLowerCase();for(var n=0;n")):null:e.match("--")?n(l("comment","-->")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(c(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=l("meta","?>"),"meta"):(E=e.eat("/")?"closeTag":"openTag",t.tokenize=s,"tag bracket");if("&"==i){var r;return r=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),r?"atom":"error"}return e.eatWhile(/[^&<]/),null}function s(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">"))return t.tokenize=o,E=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return E="equals",null;if("<"==n){t.tokenize=o,t.state=f,t.tagName=t.tagStart=null;var i=t.tokenize(e,t);return i?i+" tag error":"tag error"}return/[\'\"]/.test(n)?(t.tokenize=a(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function a(e){var t=function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=s;break}return"string"};return t.isInAttribute=!0,t}function l(e,t){return function(n,i){for(;!n.eol();){if(n.match(t)){i.tokenize=o;break}n.next()}return e}}function c(e){return function(t,n){for(var i;null!=(i=t.next());){if("<"==i)return n.tokenize=c(e+1),n.tokenize(t,n);if(">"==i){if(1==e){n.tokenize=o;break}return n.tokenize=c(e-1),n.tokenize(t,n)}}return"meta"}}function u(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(S.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function d(e){e.context&&(e.context=e.context.prev)}function h(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!S.contextGrabbers.hasOwnProperty(n)||!S.contextGrabbers[n].hasOwnProperty(t))return;d(e)}}function f(e,t,n){return"openTag"==e?(n.tagStart=t.column(),p):"closeTag"==e?g:f}function p(e,t,n){return"word"==e?(n.tagName=t.current(),_="tag",y):(_="error",p)}function g(e,t,n){if("word"==e){var i=t.current();return n.context&&n.context.tagName!=i&&S.implicitlyClosed.hasOwnProperty(n.context.tagName)&&d(n),n.context&&n.context.tagName==i||S.matchClosing===!1?(_="tag",m):(_="tag error",v)}return _="error",v}function m(e,t,n){return"endTag"!=e?(_="error",m):(d(n),f)}function v(e,t,n){return _="error",m(e,t,n)}function y(e,t,n){if("word"==e)return _="attribute",b;if("endTag"==e||"selfcloseTag"==e){var i=n.tagName,r=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||S.autoSelfClosers.hasOwnProperty(i)?h(n,i):(h(n,i),n.context=new u(n,i,r==n.indented)),f}return _="error",y}function b(e,t,n){return"equals"==e?w:(S.allowMissing||(_="error"),y(e,t,n))}function w(e,t,n){return"string"==e?x:"word"==e&&S.allowUnquoted?(_="string",y):(_="error",y(e,t,n))}function x(e,t,n){return"string"==e?x:y(e,t,n)}var k=i.indentUnit,S={},C=r.htmlMode?t:n;for(var T in C)S[T]=C[T];for(var T in r)S[T]=r[T];var E,_;return o.isInText=!0,{startState:function(e){var t={tokenize:o,state:f,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;E=null;var n=t.tokenize(e,t);return(n||E)&&"comment"!=n&&(_=null,t.state=t.state(E||n,e,t),_&&(n="error"==_?n+" error":_)),n},indent:function(t,n,i){var r=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+k;if(r&&r.noIndent)return e.Pass;if(t.tokenize!=s&&t.tokenize!=o)return i?i.match(/^(\s*)/)[0].length:0;if(t.tagName)return S.multilineTagIndentPastTag!==!1?t.tagStart+t.tagName.length+2:t.tagStart+k*(S.multilineTagIndentFactor||1);if(S.alignCDATA&&/$/,blockCommentStart:"",configuration:S.htmlMode?"html":"xml",helperType:S.htmlMode?"html":"xml",skipAttribute:function(e){e.state==w&&(e.state=y)}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})})},{"../../lib/codemirror":10}],15:[function(e,t,n){n.read=function(e,t,n,i,r){var o,s,a=8*r-i-1,l=(1<>1,u=-7,d=n?r-1:0,h=n?-1:1,f=e[t+d];for(d+=h,o=f&(1<<-u)-1,f>>=-u,u+=a;u>0;o=256*o+e[t+d],d+=h,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=i;u>0;s=256*s+e[t+d],d+=h,u-=8);if(0===o)o=1-c;else{if(o===l)return s?NaN:(f?-1:1)*(1/0);s+=Math.pow(2,i),o-=c}return(f?-1:1)*s*Math.pow(2,o-i)},n.write=function(e,t,n,i,r,o){var s,a,l,c=8*o-r-1,u=(1<>1,h=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:o-1,p=i?1:-1,g=0>t||0===t&&0>1/t?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),t+=s+d>=1?h/l:h*Math.pow(2,1-d),t*l>=2&&(s++,l/=2),s+d>=u?(a=0,s=u):s+d>=1?(a=(t*l-1)*Math.pow(2,r),s+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,r),s=0));r>=8;e[n+f]=255&a,f+=p,a/=256,r-=8);for(s=s<0;e[n+f]=255&s,f+=p,s/=256,c-=8);e[n+f-p]|=128*g}},{}],16:[function(e,t,n){var i={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==i.call(e)}},{}],17:[function(t,n,i){(function(t){(function(){function t(e){this.tokens=[],this.tokens.links={},this.options=e||h.defaults,this.rules=f.normal,this.options.gfm&&(this.options.tables?this.rules=f.tables:this.rules=f.gfm)}function r(e,t){if(this.options=t||h.defaults,this.links=e,this.rules=p.normal,this.renderer=this.options.renderer||new o,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.gfm?this.options.breaks?this.rules=p.breaks:this.rules=p.gfm:this.options.pedantic&&(this.rules=p.pedantic)}function o(e){this.options=e||{}}function s(e){this.tokens=[],this.token=null,this.options=e||h.defaults,this.options.renderer=this.options.renderer||new o,this.renderer=this.options.renderer,this.renderer.options=this.options}function a(e,t){return e.replace(t?/&/g:/&(?!#?\w+;)/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function l(e){return e.replace(/&([#\w]+);/g,function(e,t){return t=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}function c(e,t){return e=e.source,t=t||"",function n(i,r){return i?(r=r.source||r,r=r.replace(/(^|[^\[])\^/g,"$1"),e=e.replace(i,r),n):new RegExp(e,t)}}function u(){}function d(e){for(var t,n,i=1;iAn error occured:

    "+a(e.message+"",!0)+"
    ";throw e}}var f={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:u,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:u,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:u,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};f.bullet=/(?:[*+-]|\d+\.)/,f.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,f.item=c(f.item,"gm")(/bull/g,f.bullet)(),f.list=c(f.list)(/bull/g,f.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+f.def.source+")")(),f.blockquote=c(f.blockquote)("def",f.def)(),f._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",f.html=c(f.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,f._tag)(),f.paragraph=c(f.paragraph)("hr",f.hr)("heading",f.heading)("lheading",f.lheading)("blockquote",f.blockquote)("tag","<"+f._tag)("def",f.def)(),f.normal=d({},f),f.gfm=d({},f.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),f.gfm.paragraph=c(f.paragraph)("(?!","(?!"+f.gfm.fences.source.replace("\\1","\\2")+"|"+f.list.source.replace("\\1","\\3")+"|")(),f.tables=d({},f.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),t.rules=f,t.lex=function(e,n){var i=new t(n);return i.lex(e)},t.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},t.prototype.token=function(e,t,n){for(var i,r,o,s,a,l,c,u,d,e=e.replace(/^ +$/gm,"");e;)if((o=this.rules.newline.exec(e))&&(e=e.substring(o[0].length),o[0].length>1&&this.tokens.push({type:"space"})),o=this.rules.code.exec(e))e=e.substring(o[0].length),o=o[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?o:o.replace(/\n+$/,"")});else if(o=this.rules.fences.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"code",lang:o[2],text:o[3]||""});else if(o=this.rules.heading.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"heading",depth:o[1].length,text:o[2]});else if(t&&(o=this.rules.nptable.exec(e))){for(e=e.substring(o[0].length),l={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/\n$/,"").split("\n")},u=0;u ?/gm,""),this.token(o,t,!0),this.tokens.push({type:"blockquote_end"});else if(o=this.rules.list.exec(e)){for(e=e.substring(o[0].length),s=o[2],this.tokens.push({type:"list_start",ordered:s.length>1}),o=o[0].match(this.rules.item),i=!1,d=o.length,u=0;d>u;u++)l=o[u],c=l.length,l=l.replace(/^ *([*+-]|\d+\.) +/,""),~l.indexOf("\n ")&&(c-=l.length,l=this.options.pedantic?l.replace(/^ {1,4}/gm,""):l.replace(new RegExp("^ {1,"+c+"}","gm"),"")),this.options.smartLists&&u!==d-1&&(a=f.bullet.exec(o[u+1])[0],s===a||s.length>1&&a.length>1||(e=o.slice(u+1).join("\n")+e,u=d-1)),r=i||/\n\n(?!\s*$)/.test(l),u!==d-1&&(i="\n"===l.charAt(l.length-1),r||(r=i)),this.tokens.push({type:r?"loose_item_start":"list_item_start"}),this.token(l,!1,n),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(o=this.rules.html.exec(e))e=e.substring(o[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===o[1]||"script"===o[1]||"style"===o[1]),text:o[0]});else if(!n&&t&&(o=this.rules.def.exec(e)))e=e.substring(o[0].length),this.tokens.links[o[1].toLowerCase()]={href:o[2],title:o[3]};else if(t&&(o=this.rules.table.exec(e))){for(e=e.substring(o[0].length),l={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/(?: *\| *)?\n$/,"").split("\n")},u=0;u])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:u,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:u,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/,p.link=c(p.link)("inside",p._inside)("href",p._href)(),p.reflink=c(p.reflink)("inside",p._inside)(),p.normal=d({},p),p.pedantic=d({},p.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),p.gfm=d({},p.normal,{escape:c(p.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:c(p.text)("]|","~]|")("|","|https?://|")()}),p.breaks=d({},p.gfm,{br:c(p.br)("{2,}","*")(),text:c(p.gfm.text)("{2,}","*")()}),r.rules=p,r.output=function(e,t,n){var i=new r(t,n);return i.output(e)},r.prototype.output=function(e){for(var t,n,i,r,o="";e;)if(r=this.rules.escape.exec(e))e=e.substring(r[0].length),o+=r[1];else if(r=this.rules.autolink.exec(e))e=e.substring(r[0].length),"@"===r[2]?(n=":"===r[1].charAt(6)?this.mangle(r[1].substring(7)):this.mangle(r[1]),i=this.mangle("mailto:")+n):(n=a(r[1]),i=n),o+=this.renderer.link(i,null,n);else if(this.inLink||!(r=this.rules.url.exec(e))){if(r=this.rules.tag.exec(e))!this.inLink&&/^/i.test(r[0])&&(this.inLink=!1),e=e.substring(r[0].length),o+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):a(r[0]):r[0];else if(r=this.rules.link.exec(e))e=e.substring(r[0].length),this.inLink=!0,o+=this.outputLink(r,{href:r[2],title:r[3]}),this.inLink=!1;else if((r=this.rules.reflink.exec(e))||(r=this.rules.nolink.exec(e))){if(e=e.substring(r[0].length),t=(r[2]||r[1]).replace(/\s+/g," "),t=this.links[t.toLowerCase()],!t||!t.href){o+=r[0].charAt(0),e=r[0].substring(1)+e;continue}this.inLink=!0,o+=this.outputLink(r,t),this.inLink=!1}else if(r=this.rules.strong.exec(e))e=e.substring(r[0].length),o+=this.renderer.strong(this.output(r[2]||r[1]));else if(r=this.rules.em.exec(e))e=e.substring(r[0].length),o+=this.renderer.em(this.output(r[2]||r[1]));else if(r=this.rules.code.exec(e))e=e.substring(r[0].length),o+=this.renderer.codespan(a(r[2],!0));else if(r=this.rules.br.exec(e))e=e.substring(r[0].length),o+=this.renderer.br();else if(r=this.rules.del.exec(e))e=e.substring(r[0].length),o+=this.renderer.del(this.output(r[1]));else if(r=this.rules.text.exec(e))e=e.substring(r[0].length),o+=this.renderer.text(a(this.smartypants(r[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else e=e.substring(r[0].length),n=a(r[1]),i=n,o+=this.renderer.link(i,null,n);return o},r.prototype.outputLink=function(e,t){var n=a(t.href),i=t.title?a(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,i,this.output(e[1])):this.renderer.image(n,i,a(e[1]))},r.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014\/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014\/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},r.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",i=e.length,r=0;i>r;r++)t=e.charCodeAt(r),Math.random()>.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},o.prototype.code=function(e,t,n){if(this.options.highlight){var i=this.options.highlight(e,t);null!=i&&i!==e&&(n=!0,e=i)}return t?'
    '+(n?e:a(e,!0))+"\n
    \n":"
    "+(n?e:a(e,!0))+"\n
    "},o.prototype.blockquote=function(e){return"
    \n"+e+"
    \n"},o.prototype.html=function(e){return e},o.prototype.heading=function(e,t,n){return"'+e+"\n"},o.prototype.hr=function(){return this.options.xhtml?"
    \n":"
    \n"},o.prototype.list=function(e,t){var n=t?"ol":"ul";return"<"+n+">\n"+e+"\n"},o.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},o.prototype.paragraph=function(e){return"

    "+e+"

    \n"},o.prototype.table=function(e,t){return"\n\n"+e+"\n\n"+t+"\n
    \n"},o.prototype.tablerow=function(e){return"\n"+e+"\n"},o.prototype.tablecell=function(e,t){var n=t.header?"th":"td",i=t.align?"<"+n+' style="text-align:'+t.align+'">':"<"+n+">";return i+e+"\n"},o.prototype.strong=function(e){return""+e+""},o.prototype.em=function(e){return""+e+""},o.prototype.codespan=function(e){return""+e+""},o.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},o.prototype.del=function(e){return""+e+""},o.prototype.link=function(e,t,n){if(this.options.sanitize){try{var i=decodeURIComponent(l(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(e){return""}if(0===i.indexOf("javascript:")||0===i.indexOf("vbscript:"))return""}var r='
    "},o.prototype.image=function(e,t,n){var i=''+n+'":">"},o.prototype.text=function(e){return e},s.parse=function(e,t,n){var i=new s(t,n);return i.parse(e)},s.prototype.parse=function(e){this.inline=new r(e.links,this.options,this.renderer),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},s.prototype.next=function(){return this.token=this.tokens.pop()},s.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},s.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},s.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,i,r,o="",s="";for(n="",e=0;es;s++)for(var l=this.compoundRules[s],c=0,u=l.length;u>c;c++)this.compoundRuleCodes[l[c]]=[];"ONLYINCOMPOUND"in this.flags&&(this.compoundRuleCodes[this.flags.ONLYINCOMPOUND]=[]),this.dictionaryTable=this._parseDIC(n);for(var s in this.compoundRuleCodes)0==this.compoundRuleCodes[s].length&&delete this.compoundRuleCodes[s];for(var s=0,a=this.compoundRules.length;a>s;s++){for(var d=this.compoundRules[s],h="",c=0,u=d.length;u>c;c++){var f=d[c];h+=f in this.compoundRuleCodes?"("+this.compoundRuleCodes[f].join("|")+")":f}this.compoundRules[s]=new RegExp(h,"i")}}return this};r.prototype={load:function(e){for(var t in e)this[t]=e[t];return this},_readFile:function(t,i){if(i||(i="utf8"),"undefined"!=typeof XMLHttpRequest){var r=new XMLHttpRequest;return r.open("GET",t,!1),r.overrideMimeType&&r.overrideMimeType("text/plain; charset="+i),r.send(null),r.responseText}if("undefined"!=typeof e){var o=e("fs");try{if(o.existsSync(t)){var s=o.statSync(t),a=o.openSync(t,"r"),l=new n(s.size);return o.readSync(a,l,0,l.length,null),l.toString(i,0,l.length)}console.log("Path "+t+" does not exist.")}catch(e){return console.log(e),""}}},_parseAFF:function(e){var t={};e=this._removeAffixComments(e);for(var n=e.split("\n"),i=0,r=n.length;r>i;i++){var o=n[i],s=o.split(/\s+/),a=s[0];if("PFX"==a||"SFX"==a){for(var l=s[1],c=s[2],u=parseInt(s[3],10),d=[],h=i+1,f=i+1+u;f>h;h++){var o=n[h],p=o.split(/\s+/),g=p[2],m=p[3].split("/"),v=m[0];"0"===v&&(v="");var y=this.parseRuleCodes(m[1]),b=p[4],w={};w.add=v,y.length>0&&(w.continuationClasses=y),"."!==b&&("SFX"===a?w.match=new RegExp(b+"$"):w.match=new RegExp("^"+b)),"0"!=g&&("SFX"===a?w.remove=new RegExp(g+"$"):w.remove=g),d.push(w)}t[l]={type:a,combineable:"Y"==c,entries:d},i+=u}else if("COMPOUNDRULE"===a){for(var u=parseInt(s[1],10),h=i+1,f=i+1+u;f>h;h++){var o=n[h],p=o.split(/\s+/);this.compoundRules.push(p[1])}i+=u}else if("REP"===a){var p=o.split(/\s+/);3===p.length&&this.replacementTable.push([p[1],p[2]])}else this.flags[a]=s[1]}return t},_removeAffixComments:function(e){return e=e.replace(/#.*$/gm,""),e=e.replace(/^\s\s*/m,"").replace(/\s\s*$/m,""),e=e.replace(/\n{2,}/g,"\n"),e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")},_parseDIC:function(e){function t(e,t){e in i&&"object"==typeof i[e]||(i[e]=[]),i[e].push(t)}e=this._removeDicComments(e);for(var n=e.split("\n"),i={},r=1,o=n.length;o>r;r++){var s=n[r],a=s.split("/",2),l=a[0];if(a.length>1){var c=this.parseRuleCodes(a[1]);"NEEDAFFIX"in this.flags&&-1!=c.indexOf(this.flags.NEEDAFFIX)||t(l,c);for(var u=0,d=c.length;d>u;u++){var h=c[u],f=this.rules[h];if(f)for(var p=this._applyRule(l,f),g=0,m=p.length;m>g;g++){var v=p[g];if(t(v,[]),f.combineable)for(var y=u+1;d>y;y++){var b=c[y],w=this.rules[b];if(w&&w.combineable&&f.type!=w.type)for(var x=this._applyRule(v,w),k=0,S=x.length;S>k;k++){var C=x[k];t(C,[])}}}h in this.compoundRuleCodes&&this.compoundRuleCodes[h].push(l)}}else t(l.trim(),[])}return i},_removeDicComments:function(e){return e=e.replace(/^\t.*$/gm,"")},parseRuleCodes:function(e){if(!e)return[];if(!("FLAG"in this.flags))return e.split("");if("long"===this.flags.FLAG){for(var t=[],n=0,i=e.length;i>n;n+=2)t.push(e.substr(n,2));return t}return"num"===this.flags.FLAG?textCode.split(","):void 0},_applyRule:function(e,t){for(var n=t.entries,i=[],r=0,o=n.length;o>r;r++){var s=n[r];if(!s.match||e.match(s.match)){var a=e;if(s.remove&&(a=a.replace(s.remove,"")),"SFX"===t.type?a+=s.add:a=s.add+a,i.push(a),"continuationClasses"in s)for(var l=0,c=s.continuationClasses.length;c>l;l++){var u=this.rules[s.continuationClasses[l]];u&&(i=i.concat(this._applyRule(a,u)))}}}return i},check:function(e){var t=e.replace(/^\s\s*/,"").replace(/\s\s*$/,"");if(this.checkExact(t))return!0;if(t.toUpperCase()===t){var n=t[0]+t.substring(1).toLowerCase();if(this.hasFlag(n,"KEEPCASE"))return!1;if(this.checkExact(n))return!0}var i=t.toLowerCase();if(i!==t){if(this.hasFlag(i,"KEEPCASE"))return!1;if(this.checkExact(i))return!0}return!1},checkExact:function(e){var t=this.dictionaryTable[e];if("undefined"==typeof t){if("COMPOUNDMIN"in this.flags&&e.length>=this.flags.COMPOUNDMIN)for(var n=0,i=this.compoundRules.length;i>n;n++)if(e.match(this.compoundRules[n]))return!0;return!1}if("object"==typeof t){for(var n=0,i=t.length;i>n;n++)if(!this.hasFlag(e,"ONLYINCOMPOUND",t[n]))return!0;return!1}},hasFlag:function(e,t,n){if(t in this.flags){if("undefined"==typeof n)var n=Array.prototype.concat.apply([],this.dictionaryTable[e]);if(n&&-1!==n.indexOf(this.flags[t]))return!0}return!1},alphabet:"",suggest:function(e,t){function n(e){for(var t=[],n=0,i=e.length;i>n;n++){for(var r=e[n],o=[],s=0,a=r.length+1;a>s;s++)o.push([r.substring(0,s),r.substring(s,r.length)]);for(var l=[],s=0,a=o.length;a>s;s++){var u=o[s];u[1]&&l.push(u[0]+u[1].substring(1))}for(var d=[],s=0,a=o.length;a>s;s++){var u=o[s];u[1].length>1&&d.push(u[0]+u[1][1]+u[1][0]+u[1].substring(2))}for(var h=[],s=0,a=o.length;a>s;s++){var u=o[s];if(u[1])for(var f=0,p=c.alphabet.length;p>f;f++)h.push(u[0]+c.alphabet[f]+u[1].substring(1))}for(var g=[],s=0,a=o.length;a>s;s++){var u=o[s];if(u[1])for(var f=0,p=c.alphabet.length;p>f;f++)h.push(u[0]+c.alphabet[f]+u[1])}t=t.concat(l),t=t.concat(d),t=t.concat(h),t=t.concat(g)}return t}function i(e){for(var t=[],n=0;nu;u++)a[u]in l?l[a[u]]+=1:l[a[u]]=1;var h=[];for(var u in l)h.push([u,l[u]]);h.sort(r).reverse();for(var f=[],u=0,d=Math.min(t,h.length);d>u;u++)c.hasFlag(h[u][0],"NOSUGGEST")||f.push(h[u][0]);return f}if(t||(t=5),this.check(e))return[];for(var o=0,s=this.replacementTable.length;s>o;o++){var a=this.replacementTable[o];if(-1!==e.indexOf(a[0])){var l=e.replace(a[0],a[1]);if(this.check(l))return[l]}}var c=this;return c.alphabet="abcdefghijklmnopqrstuvwxyz",r(e)}},"undefined"!=typeof t&&(t.exports=r)}).call(this,e("buffer").Buffer,"/node_modules/typo-js")},{buffer:3,fs:2}],19:[function(e,t,n){var i=e("codemirror");i.commands.tabAndIndentMarkdownList=function(e){var t=e.listSelections(),n=t[0].head,i=e.getStateAfter(n.line),r=i.list!==!1;if(r)return void e.execCommand("indentMore");if(e.options.indentWithTabs)e.execCommand("insertTab");else{var o=Array(e.options.tabSize+1).join(" ");e.replaceSelection(o)}},i.commands.shiftTabAndUnindentMarkdownList=function(e){var t=e.listSelections(),n=t[0].head,i=e.getStateAfter(n.line),r=i.list!==!1;if(r)return void e.execCommand("indentLess");if(e.options.indentWithTabs)e.execCommand("insertTab");else{var o=Array(e.options.tabSize+1).join(" "); -e.replaceSelection(o)}}},{codemirror:10}],20:[function(e,t,n){"use strict";function i(e){return e=Y?e.replace("Ctrl","Cmd"):e.replace("Cmd","Ctrl")}function r(e,t,n){e=e||{};var i=document.createElement("a");return t=void 0==t||t,e.title&&t&&(i.title=s(e.title,e.action,n),Y&&(i.title=i.title.replace("Ctrl","⌘"),i.title=i.title.replace("Alt","⌥"))),i.tabIndex=-1,i.className=e.className,i}function o(){var e=document.createElement("i");return e.className="separator",e.innerHTML="|",e}function s(e,t,n){var r,o=e;return t&&(r=G(t),n[r]&&(o+=" ("+i(n[r])+")")),o}function a(e,t){t=t||e.getCursor("start");var n=e.getTokenAt(t);if(!n.type)return{};for(var i,r,o=n.type.split(" "),s={},a=0;a=0&&(f=c.getLineHandle(o),!t(f));o--);var v,y,b,w,x=c.getTokenAt({line:o,ch:1}),k=n(x).fencedChars;t(c.getLineHandle(u.line))?(v="",y=u.line):t(c.getLineHandle(u.line-1))?(v="",y=u.line-1):(v=k+"\n",y=u.line),t(c.getLineHandle(d.line))?(b="",w=d.line,0===d.ch&&(w+=1)):0!==d.ch&&t(c.getLineHandle(d.line+1))?(b="",w=d.line+1):(b=k+"\n",w=d.line+1),0===d.ch&&(w-=1),c.operation(function(){c.replaceRange(b,{line:w,ch:0},{line:w+(b?0:1),ch:0}),c.replaceRange(v,{line:y,ch:0},{line:y+(v?0:1),ch:0})}),c.setSelection({line:y+(v?1:0),ch:0},{line:w+(v?1:-1),ch:0}),c.focus()}else{var S=u.line;if(t(c.getLineHandle(u.line))&&("fenced"===i(c,u.line+1)?(o=u.line,S=u.line+1):(s=u.line,S=u.line-1)),void 0===o)for(o=S;o>=0&&(f=c.getLineHandle(o),!t(f));o--);if(void 0===s)for(a=c.lineCount(),s=S;a>s&&(f=c.getLineHandle(s),!t(f));s++);c.operation(function(){c.replaceRange("",{line:o,ch:0},{line:o+1,ch:0}),c.replaceRange("",{line:s-1,ch:0},{line:s,ch:0})}),c.focus()}else if("indented"===p){if(u.line!==d.line||u.ch!==d.ch)o=u.line,s=d.line,0===d.ch&&s--;else{for(o=u.line;o>=0;o--)if(f=c.getLineHandle(o),!f.text.match(/^\s*$/)&&"indented"!==i(c,o,f)){o+=1;break}for(a=c.lineCount(),s=u.line;a>s;s++)if(f=c.getLineHandle(s),!f.text.match(/^\s*$/)&&"indented"!==i(c,s,f)){s-=1;break}}var C=c.getLineHandle(s+1),T=C&&c.getTokenAt({line:s+1,ch:C.text.length-1}),E=T&&n(T).indentedCode;E&&c.replaceRange("\n",{line:s+1,ch:0});for(var _=o;s>=_;_++)c.indentLine(_,"subtract");c.focus()}else{var L=u.line===d.line&&u.ch===d.ch&&0===u.ch,D=u.line!==d.line;L||D?r(c,u,d,l):M(c,!1,["`","`"])}}function f(e){var t=e.codemirror;N(t,"quote")}function p(e){var t=e.codemirror;H(t,"smaller")}function g(e){var t=e.codemirror;H(t,"bigger")}function m(e){var t=e.codemirror;H(t,void 0,1)}function v(e){var t=e.codemirror;H(t,void 0,2)}function y(e){var t=e.codemirror;H(t,void 0,3)}function b(e){var t=e.codemirror;N(t,"unordered-list")}function w(e){var t=e.codemirror;N(t,"ordered-list")}function x(e){var t=e.codemirror;z(t)}function k(e){var t=e.codemirror,n=a(t),i=e.options,r="http://";return!(i.promptURLs&&(r=prompt(i.promptTexts.link),!r))&&void M(t,n.link,i.insertTexts.link,r)}function S(e){var t=e.codemirror,n=a(t),i=e.options,r="http://";return!(i.promptURLs&&(r=prompt(i.promptTexts.image),!r))&&void M(t,n.image,i.insertTexts.image,r)}function C(e){var t=e.codemirror,n=a(t),i=e.options;M(t,n.table,i.insertTexts.table)}function T(e){var t=e.codemirror,n=a(t),i=e.options;M(t,n.image,i.insertTexts.horizontalRule)}function E(e){var t=e.codemirror;t.undo(),t.focus()}function _(e){var t=e.codemirror;t.redo(),t.focus()}function L(e){var t=e.codemirror,n=t.getWrapperElement(),i=n.nextSibling,r=e.toolbarElements["side-by-side"],o=!1;/editor-preview-active-side/.test(i.className)?(i.className=i.className.replace(/\s*editor-preview-active-side\s*/g,""),r.className=r.className.replace(/\s*active\s*/g,""),n.className=n.className.replace(/\s*CodeMirror-sided\s*/g," ")):(setTimeout(function(){t.getOption("fullScreen")||l(e),i.className+=" editor-preview-active-side"},1),r.className+=" active",n.className+=" CodeMirror-sided",o=!0);var s=n.lastChild;if(/editor-preview-active/.test(s.className)){s.className=s.className.replace(/\s*editor-preview-active\s*/g,"");var a=e.toolbarElements.preview,c=n.previousSibling;a.className=a.className.replace(/\s*active\s*/g,""),c.className=c.className.replace(/\s*disabled-for-preview*/g,"")}var u=function(){i.innerHTML=e.options.previewRender(e.value(),i)};t.sideBySideRenderingFunction||(t.sideBySideRenderingFunction=u),o?(i.innerHTML=e.options.previewRender(e.value(),i),t.on("update",t.sideBySideRenderingFunction)):t.off("update",t.sideBySideRenderingFunction),t.refresh()}function D(e){var t=e.codemirror,n=t.getWrapperElement(),i=n.previousSibling,r=!!e.options.toolbar&&e.toolbarElements.preview,o=n.lastChild;o&&/editor-preview/.test(o.className)||(o=document.createElement("div"),o.className="editor-preview",n.appendChild(o)),/editor-preview-active/.test(o.className)?(o.className=o.className.replace(/\s*editor-preview-active\s*/g,""),r&&(r.className=r.className.replace(/\s*active\s*/g,""),i.className=i.className.replace(/\s*disabled-for-preview*/g,""))):(setTimeout(function(){o.className+=" editor-preview-active"},1),r&&(r.className+=" active",i.className+=" disabled-for-preview")),o.innerHTML=e.options.previewRender(e.value(),o);var s=t.getWrapperElement().nextSibling;/editor-preview-active-side/.test(s.className)&&L(e)}function M(e,t,n,i){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){var r,o=n[0],s=n[1],a=e.getCursor("start"),l=e.getCursor("end");i&&(s=s.replace("#url#",i)),t?(r=e.getLine(a.line),o=r.slice(0,a.ch),s=r.slice(a.ch),e.replaceRange(o+s,{line:a.line,ch:0})):(r=e.getSelection(),e.replaceSelection(o+r+s),a.ch+=o.length,a!==l&&(l.ch+=o.length)),e.setSelection(a,l),e.focus()}}function H(e,t,n){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){for(var i=e.getCursor("start"),r=e.getCursor("end"),o=i.line;o<=r.line;o++)!function(i){var r=e.getLine(i),o=r.search(/[^#]/);r=void 0!==t?0>=o?"bigger"==t?"###### "+r:"# "+r:6==o&&"smaller"==t?r.substr(7):1==o&&"bigger"==t?r.substr(2):"bigger"==t?r.substr(1):"#"+r:1==n?0>=o?"# "+r:o==n?r.substr(o+1):"# "+r.substr(o+1):2==n?0>=o?"## "+r:o==n?r.substr(o+1):"## "+r.substr(o+1):0>=o?"### "+r:o==n?r.substr(o+1):"### "+r.substr(o+1),e.replaceRange(r,{line:i,ch:0},{line:i,ch:99999999999999})}(o);e.focus()}}function N(e,t){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){for(var n=a(e),i=e.getCursor("start"),r=e.getCursor("end"),o={quote:/^(\s*)\>\s+/,"unordered-list":/^(\s*)(\*|\-|\+)\s+/,"ordered-list":/^(\s*)\d+\.\s+/},s={quote:"> ","unordered-list":"* ","ordered-list":"1. "},l=i.line;l<=r.line;l++)!function(i){var r=e.getLine(i);r=n[t]?r.replace(o[t],"$1"):s[t]+r,e.replaceRange(r,{line:i,ch:0},{line:i,ch:99999999999999})}(l);e.focus()}}function A(e,t,n,i){if(!/editor-preview-active/.test(e.codemirror.getWrapperElement().lastChild.className)){i="undefined"==typeof i?n:i;var r,o=e.codemirror,s=a(o),l=n,c=i,u=o.getCursor("start"),d=o.getCursor("end");s[t]?(r=o.getLine(u.line),l=r.slice(0,u.ch),c=r.slice(u.ch),"bold"==t?(l=l.replace(/(\*\*|__)(?![\s\S]*(\*\*|__))/,""),c=c.replace(/(\*\*|__)/,"")):"italic"==t?(l=l.replace(/(\*|_)(?![\s\S]*(\*|_))/,""),c=c.replace(/(\*|_)/,"")):"strikethrough"==t&&(l=l.replace(/(\*\*|~~)(?![\s\S]*(\*\*|~~))/,""),c=c.replace(/(\*\*|~~)/,"")),o.replaceRange(l+c,{line:u.line,ch:0},{line:u.line,ch:99999999999999}),"bold"==t||"strikethrough"==t?(u.ch-=2,u!==d&&(d.ch-=2)):"italic"==t&&(u.ch-=1,u!==d&&(d.ch-=1))):(r=o.getSelection(),"bold"==t?(r=r.split("**").join(""),r=r.split("__").join("")):"italic"==t?(r=r.split("*").join(""),r=r.split("_").join("")):"strikethrough"==t&&(r=r.split("~~").join("")),o.replaceSelection(l+r+c),u.ch+=n.length,d.ch=u.ch+r.length),o.setSelection(u,d),o.focus()}}function z(e){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className))for(var t,n=e.getCursor("start"),i=e.getCursor("end"),r=n.line;r<=i.line;r++)t=e.getLine(r),t=t.replace(/^[ ]*([# ]+|\*|\-|[> ]+|[0-9]+(.|\)))[ ]*/,""),e.replaceRange(t,{line:r,ch:0},{line:r,ch:99999999999999})}function R(e,t){for(var n in t)t.hasOwnProperty(n)&&(t[n]instanceof Array?e[n]=t[n].concat(e[n]instanceof Array?e[n]:[]):null!==t[n]&&"object"==typeof t[n]&&t[n].constructor===Object?e[n]=R(e[n]||{},t[n]):e[n]=t[n]);return e}function I(e){for(var t=1;t=19968?n[r].length:1;return i}function F(e){e=e||{},e.parent=this;var t=!0;if(e.autoDownloadFontAwesome===!1&&(t=!1),e.autoDownloadFontAwesome!==!0)for(var n=document.styleSheets,i=0;i-1&&(t=!1);if(t){var r=document.createElement("link");r.rel="stylesheet",r.href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css",document.getElementsByTagName("head")[0].appendChild(r)}if(e.element)this.element=e.element;else if(null===e.element)return void console.log("SimpleMDE: Error. No element was found.");if(void 0===e.toolbar){e.toolbar=[];for(var o in Z)Z.hasOwnProperty(o)&&(-1!=o.indexOf("separator-")&&e.toolbar.push("|"),(Z[o].default===!0||e.showIcons&&e.showIcons.constructor===Array&&-1!=e.showIcons.indexOf(o))&&e.toolbar.push(o))}e.hasOwnProperty("status")||(e.status=["autosave","lines","words","cursor"]),e.previewRender||(e.previewRender=function(e){return this.parent.markdown(e)}),e.parsingConfig=I({highlightFormatting:!0},e.parsingConfig||{}),e.insertTexts=I({},X,e.insertTexts||{}),e.promptTexts=Q,e.blockStyles=I({},K,e.blockStyles||{}),e.shortcuts=I({},q,e.shortcuts||{}),void 0!=e.autosave&&void 0!=e.autosave.unique_id&&""!=e.autosave.unique_id&&(e.autosave.uniqueId=e.autosave.unique_id),this.options=e,this.render(),!e.initialValue||this.options.autosave&&this.options.autosave.foundSavedValue===!0||this.value(e.initialValue)}function P(){if("object"!=typeof localStorage)return!1;try{localStorage.setItem("smde_localStorage",1),localStorage.removeItem("smde_localStorage")}catch(e){return!1}return!0}var W=e("codemirror");e("codemirror/addon/edit/continuelist.js"),e("./codemirror/tablist"),e("codemirror/addon/display/fullscreen.js"),e("codemirror/mode/markdown/markdown.js"),e("codemirror/addon/mode/overlay.js"),e("codemirror/addon/display/placeholder.js"),e("codemirror/addon/selection/mark-selection.js"),e("codemirror/mode/gfm/gfm.js"),e("codemirror/mode/xml/xml.js");var B=e("codemirror-spell-checker"),j=e("marked"),Y=/Mac/.test(navigator.platform),U={toggleBold:c,toggleItalic:u,drawLink:k,toggleHeadingSmaller:p,toggleHeadingBigger:g,drawImage:S,toggleBlockquote:f,toggleOrderedList:w,toggleUnorderedList:b,toggleCodeBlock:h,togglePreview:D,toggleStrikethrough:d,toggleHeading1:m,toggleHeading2:v,toggleHeading3:y,cleanBlock:x,drawTable:C,drawHorizontalRule:T,undo:E,redo:_,toggleSideBySide:L,toggleFullScreen:l},q={toggleBold:"Cmd-B",toggleItalic:"Cmd-I",drawLink:"Cmd-K",toggleHeadingSmaller:"Cmd-H",toggleHeadingBigger:"Shift-Cmd-H",cleanBlock:"Cmd-E",drawImage:"Cmd-Alt-I",toggleBlockquote:"Cmd-'",toggleOrderedList:"Cmd-Alt-L",toggleUnorderedList:"Cmd-L",toggleCodeBlock:"Cmd-Alt-C",togglePreview:"Cmd-P",toggleSideBySide:"F9",toggleFullScreen:"F11"},G=function(e){for(var t in U)if(U[t]===e)return t;return null},V=function(){var e=!1;return function(t){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(e=!0)}(navigator.userAgent||navigator.vendor||window.opera),e},$="",Z={bold:{name:"bold",action:c,className:"fa fa-bold",title:"Bold",default:!0},italic:{name:"italic",action:u,className:"fa fa-italic",title:"Italic",default:!0},strikethrough:{name:"strikethrough",action:d,className:"fa fa-strikethrough",title:"Strikethrough"},heading:{name:"heading",action:p,className:"fa fa-header",title:"Heading",default:!0},"heading-smaller":{name:"heading-smaller",action:p,className:"fa fa-header fa-header-x fa-header-smaller",title:"Smaller Heading"},"heading-bigger":{name:"heading-bigger",action:g,className:"fa fa-header fa-header-x fa-header-bigger",title:"Bigger Heading"},"heading-1":{name:"heading-1",action:m,className:"fa fa-header fa-header-x fa-header-1",title:"Big Heading"},"heading-2":{name:"heading-2",action:v,className:"fa fa-header fa-header-x fa-header-2",title:"Medium Heading"},"heading-3":{name:"heading-3",action:y,className:"fa fa-header fa-header-x fa-header-3",title:"Small Heading"},"separator-1":{name:"separator-1"},code:{name:"code",action:h,className:"fa fa-code",title:"Code"},quote:{name:"quote",action:f,className:"fa fa-quote-left",title:"Quote",default:!0},"unordered-list":{name:"unordered-list",action:b,className:"fa fa-list-ul",title:"Generic List",default:!0},"ordered-list":{name:"ordered-list",action:w,className:"fa fa-list-ol",title:"Numbered List",default:!0},"clean-block":{name:"clean-block",action:x,className:"fa fa-eraser fa-clean-block",title:"Clean block"},"separator-2":{name:"separator-2"},link:{name:"link",action:k,className:"fa fa-link",title:"Create Link",default:!0},image:{name:"image",action:S,className:"fa fa-picture-o",title:"Insert Image",default:!0},table:{name:"table",action:C,className:"fa fa-table",title:"Insert Table"},"horizontal-rule":{name:"horizontal-rule",action:T,className:"fa fa-minus",title:"Insert Horizontal Line"},"separator-3":{name:"separator-3"},preview:{name:"preview",action:D,className:"fa fa-eye no-disable",title:"Toggle Preview",default:!0},"side-by-side":{name:"side-by-side",action:L,className:"fa fa-columns no-disable no-mobile",title:"Toggle Side by Side",default:!0},fullscreen:{name:"fullscreen",action:l,className:"fa fa-arrows-alt no-disable no-mobile",title:"Toggle Fullscreen",default:!0},"separator-4":{name:"separator-4"},guide:{name:"guide",action:"https://simplemde.com/markdown-guide",className:"fa fa-question-circle",title:"Markdown Guide",default:!0},"separator-5":{name:"separator-5"},undo:{name:"undo",action:E,className:"fa fa-undo no-disable",title:"Undo"},redo:{name:"redo",action:_,className:"fa fa-repeat no-disable",title:"Redo"}},X={link:["[","](#url#)"],image:["![](","#url#)"],table:["","\n\n| Column 1 | Column 2 | Column 3 |\n| -------- | -------- | -------- |\n| Text | Text | Text |\n\n"],horizontalRule:["","\n\n-----\n\n"]},Q={link:"URL for the link:",image:"URL of the image:"},K={bold:"**",code:"```",italic:"*"};F.prototype.markdown=function(e){if(j){var t={};return this.options&&this.options.renderingConfig&&this.options.renderingConfig.singleLineBreaks===!1?t.breaks=!1:t.breaks=!0,this.options&&this.options.renderingConfig&&this.options.renderingConfig.codeSyntaxHighlighting===!0&&window.hljs&&(t.highlight=function(e){return window.hljs.highlightAuto(e).value}),j.setOptions(t),j(e)}},F.prototype.render=function(e){if(e||(e=this.element||document.getElementsByTagName("textarea")[0]),!this._rendered||this._rendered!==e){this.element=e;var t=this.options,n=this,r={};for(var o in t.shortcuts)null!==t.shortcuts[o]&&null!==U[o]&&!function(e){r[i(t.shortcuts[e])]=function(){U[e](n)}}(o);r.Enter="newlineAndIndentContinueMarkdownList",r.Tab="tabAndIndentMarkdownList",r["Shift-Tab"]="shiftTabAndUnindentMarkdownList",r.Esc=function(e){e.getOption("fullScreen")&&l(n)},document.addEventListener("keydown",function(e){e=e||window.event,27==e.keyCode&&n.codemirror.getOption("fullScreen")&&l(n)},!1);var s,a;if(t.spellChecker!==!1?(s="spell-checker",a=t.parsingConfig,a.name="gfm",a.gitHubSpice=!1,B({codeMirrorInstance:W})):(s=t.parsingConfig,s.name="gfm",s.gitHubSpice=!1),this.codemirror=W.fromTextArea(e,{mode:s,backdrop:a,theme:"paper",tabSize:void 0!=t.tabSize?t.tabSize:2,indentUnit:void 0!=t.tabSize?t.tabSize:2,indentWithTabs:t.indentWithTabs!==!1,lineNumbers:!1,autofocus:t.autofocus===!0,extraKeys:r,lineWrapping:t.lineWrapping!==!1,allowDropFileTypes:["text/plain"],placeholder:t.placeholder||e.getAttribute("placeholder")||"",styleSelectedText:void 0==t.styleSelectedText||t.styleSelectedText}),t.forceSync===!0){var c=this.codemirror;c.on("change",function(){c.save()})}this.gui={},t.toolbar!==!1&&(this.gui.toolbar=this.createToolbar()),t.status!==!1&&(this.gui.statusbar=this.createStatusbar()),void 0!=t.autosave&&t.autosave.enabled===!0&&this.autosave(),this.gui.sideBySide=this.createSideBySide(),this._rendered=this.element;var u=this.codemirror;setTimeout(function(){u.refresh()}.bind(u),0)}},F.prototype.autosave=function(){if(P()){var e=this;if(void 0==this.options.autosave.uniqueId||""==this.options.autosave.uniqueId)return void console.log("SimpleMDE: You must set a uniqueId to use the autosave feature");null!=e.element.form&&void 0!=e.element.form&&e.element.form.addEventListener("submit",function(){localStorage.removeItem("smde_"+e.options.autosave.uniqueId)}),this.options.autosave.loaded!==!0&&("string"==typeof localStorage.getItem("smde_"+this.options.autosave.uniqueId)&&""!=localStorage.getItem("smde_"+this.options.autosave.uniqueId)&&(this.codemirror.setValue(localStorage.getItem("smde_"+this.options.autosave.uniqueId)),this.options.autosave.foundSavedValue=!0),this.options.autosave.loaded=!0),localStorage.setItem("smde_"+this.options.autosave.uniqueId,e.value());var t=document.getElementById("autosaved");if(null!=t&&void 0!=t&&""!=t){var n=new Date,i=n.getHours(),r=n.getMinutes(),o="am",s=i;s>=12&&(s=i-12,o="pm"),0==s&&(s=12),r=10>r?"0"+r:r,t.innerHTML="Autosaved: "+s+":"+r+" "+o}this.autosaveTimeoutId=setTimeout(function(){e.autosave()},this.options.autosave.delay||1e4)}else console.log("SimpleMDE: localStorage not available, cannot autosave")},F.prototype.clearAutosavedValue=function(){if(P()){if(void 0==this.options.autosave||void 0==this.options.autosave.uniqueId||""==this.options.autosave.uniqueId)return void console.log("SimpleMDE: You must set a uniqueId to clear the autosave value");localStorage.removeItem("smde_"+this.options.autosave.uniqueId)}else console.log("SimpleMDE: localStorage not available, cannot autosave")},F.prototype.createSideBySide=function(){var e=this.codemirror,t=e.getWrapperElement(),n=t.nextSibling;n&&/editor-preview-side/.test(n.className)||(n=document.createElement("div"),n.className="editor-preview-side",t.parentNode.insertBefore(n,t.nextSibling));var i=!1,r=!1;return e.on("scroll",function(e){if(i)return void(i=!1);r=!0;var t=e.getScrollInfo().height-e.getScrollInfo().clientHeight,o=parseFloat(e.getScrollInfo().top)/t,s=(n.scrollHeight-n.clientHeight)*o;n.scrollTop=s}),n.onscroll=function(){if(r)return void(r=!1);i=!0;var t=n.scrollHeight-n.clientHeight,o=parseFloat(n.scrollTop)/t,s=(e.getScrollInfo().height-e.getScrollInfo().clientHeight)*o;e.scrollTo(0,s)},n},F.prototype.createToolbar=function(e){if(e=e||this.options.toolbar,e&&0!==e.length){var t;for(t=0;tp,.editor-preview>p{margin-top:0}.editor-preview pre,.editor-preview-side pre{background:#eee;margin-bottom:10px}.editor-preview table td,.editor-preview table th,.editor-preview-side table td,.editor-preview-side table th{border:1px solid #ddd;padding:5px}.CodeMirror .CodeMirror-code .cm-tag{color:#63a35c}.CodeMirror .CodeMirror-code .cm-attribute{color:#795da3}.CodeMirror .CodeMirror-code .cm-string{color:#183691}.CodeMirror .CodeMirror-selected{background:#d9d9d9}.CodeMirror .CodeMirror-code .cm-header-1{font-size:200%;line-height:200%}.CodeMirror .CodeMirror-code .cm-header-2{font-size:160%;line-height:160%}.CodeMirror .CodeMirror-code .cm-header-3{font-size:125%;line-height:125%}.CodeMirror .CodeMirror-code .cm-header-4{font-size:110%;line-height:110%}.CodeMirror .CodeMirror-code .cm-comment{background:rgba(0,0,0,.05);border-radius:2px}.CodeMirror .CodeMirror-code .cm-link{color:#7f8c8d}.CodeMirror .CodeMirror-code .cm-url{color:#aab2b3}.CodeMirror .CodeMirror-code .cm-strikethrough{text-decoration:line-through}.CodeMirror .CodeMirror-placeholder{opacity:.5}.CodeMirror .cm-spell-error:not(.cm-url):not(.cm-comment):not(.cm-tag):not(.cm-word){background:rgba(255,0,0,.15)}'; -}),define("highlight/lib/index",["require","exports","module","./highlight","./languages/1c","./languages/abnf","./languages/accesslog","./languages/actionscript","./languages/ada","./languages/apache","./languages/applescript","./languages/cpp","./languages/arduino","./languages/armasm","./languages/xml","./languages/asciidoc","./languages/aspectj","./languages/autohotkey","./languages/autoit","./languages/avrasm","./languages/awk","./languages/axapta","./languages/bash","./languages/basic","./languages/bnf","./languages/brainfuck","./languages/cal","./languages/capnproto","./languages/ceylon","./languages/clojure","./languages/clojure-repl","./languages/cmake","./languages/coffeescript","./languages/coq","./languages/cos","./languages/crmsh","./languages/crystal","./languages/cs","./languages/csp","./languages/css","./languages/d","./languages/markdown","./languages/dart","./languages/delphi","./languages/diff","./languages/django","./languages/dns","./languages/dockerfile","./languages/dos","./languages/dsconfig","./languages/dts","./languages/dust","./languages/ebnf","./languages/elixir","./languages/elm","./languages/ruby","./languages/erb","./languages/erlang-repl","./languages/erlang","./languages/excel","./languages/fix","./languages/fortran","./languages/fsharp","./languages/gams","./languages/gauss","./languages/gcode","./languages/gherkin","./languages/glsl","./languages/go","./languages/golo","./languages/gradle","./languages/groovy","./languages/haml","./languages/handlebars","./languages/haskell","./languages/haxe","./languages/hsp","./languages/htmlbars","./languages/http","./languages/inform7","./languages/ini","./languages/irpf90","./languages/java","./languages/javascript","./languages/json","./languages/julia","./languages/kotlin","./languages/lasso","./languages/ldif","./languages/less","./languages/lisp","./languages/livecodeserver","./languages/livescript","./languages/lsl","./languages/lua","./languages/makefile","./languages/mathematica","./languages/matlab","./languages/maxima","./languages/mel","./languages/mercury","./languages/mipsasm","./languages/mizar","./languages/perl","./languages/mojolicious","./languages/monkey","./languages/moonscript","./languages/nginx","./languages/nimrod","./languages/nix","./languages/nsis","./languages/objectivec","./languages/ocaml","./languages/openscad","./languages/oxygene","./languages/parser3","./languages/pf","./languages/php","./languages/pony","./languages/powershell","./languages/processing","./languages/profile","./languages/prolog","./languages/protobuf","./languages/puppet","./languages/purebasic","./languages/python","./languages/q","./languages/qml","./languages/r","./languages/rib","./languages/roboconf","./languages/rsl","./languages/ruleslanguage","./languages/rust","./languages/scala","./languages/scheme","./languages/scilab","./languages/scss","./languages/smali","./languages/smalltalk","./languages/sml","./languages/sqf","./languages/sql","./languages/stan","./languages/stata","./languages/step21","./languages/stylus","./languages/subunit","./languages/swift","./languages/taggerscript","./languages/yaml","./languages/tap","./languages/tcl","./languages/tex","./languages/thrift","./languages/tp","./languages/twig","./languages/typescript","./languages/vala","./languages/vbnet","./languages/vbscript","./languages/vbscript-html","./languages/verilog","./languages/vhdl","./languages/vim","./languages/x86asm","./languages/xl","./languages/xquery","./languages/zephir"],function(e,t,n){var i=e("./highlight");i.registerLanguage("1c",e("./languages/1c")),i.registerLanguage("abnf",e("./languages/abnf")),i.registerLanguage("accesslog",e("./languages/accesslog")),i.registerLanguage("actionscript",e("./languages/actionscript")),i.registerLanguage("ada",e("./languages/ada")),i.registerLanguage("apache",e("./languages/apache")),i.registerLanguage("applescript",e("./languages/applescript")),i.registerLanguage("cpp",e("./languages/cpp")),i.registerLanguage("arduino",e("./languages/arduino")),i.registerLanguage("armasm",e("./languages/armasm")),i.registerLanguage("xml",e("./languages/xml")),i.registerLanguage("asciidoc",e("./languages/asciidoc")),i.registerLanguage("aspectj",e("./languages/aspectj")),i.registerLanguage("autohotkey",e("./languages/autohotkey")),i.registerLanguage("autoit",e("./languages/autoit")),i.registerLanguage("avrasm",e("./languages/avrasm")),i.registerLanguage("awk",e("./languages/awk")),i.registerLanguage("axapta",e("./languages/axapta")),i.registerLanguage("bash",e("./languages/bash")),i.registerLanguage("basic",e("./languages/basic")),i.registerLanguage("bnf",e("./languages/bnf")),i.registerLanguage("brainfuck",e("./languages/brainfuck")),i.registerLanguage("cal",e("./languages/cal")),i.registerLanguage("capnproto",e("./languages/capnproto")),i.registerLanguage("ceylon",e("./languages/ceylon")),i.registerLanguage("clojure",e("./languages/clojure")),i.registerLanguage("clojure-repl",e("./languages/clojure-repl")),i.registerLanguage("cmake",e("./languages/cmake")),i.registerLanguage("coffeescript",e("./languages/coffeescript")),i.registerLanguage("coq",e("./languages/coq")),i.registerLanguage("cos",e("./languages/cos")),i.registerLanguage("crmsh",e("./languages/crmsh")),i.registerLanguage("crystal",e("./languages/crystal")),i.registerLanguage("cs",e("./languages/cs")),i.registerLanguage("csp",e("./languages/csp")),i.registerLanguage("css",e("./languages/css")),i.registerLanguage("d",e("./languages/d")),i.registerLanguage("markdown",e("./languages/markdown")),i.registerLanguage("dart",e("./languages/dart")),i.registerLanguage("delphi",e("./languages/delphi")),i.registerLanguage("diff",e("./languages/diff")),i.registerLanguage("django",e("./languages/django")),i.registerLanguage("dns",e("./languages/dns")),i.registerLanguage("dockerfile",e("./languages/dockerfile")),i.registerLanguage("dos",e("./languages/dos")),i.registerLanguage("dsconfig",e("./languages/dsconfig")),i.registerLanguage("dts",e("./languages/dts")),i.registerLanguage("dust",e("./languages/dust")),i.registerLanguage("ebnf",e("./languages/ebnf")),i.registerLanguage("elixir",e("./languages/elixir")),i.registerLanguage("elm",e("./languages/elm")),i.registerLanguage("ruby",e("./languages/ruby")),i.registerLanguage("erb",e("./languages/erb")),i.registerLanguage("erlang-repl",e("./languages/erlang-repl")),i.registerLanguage("erlang",e("./languages/erlang")),i.registerLanguage("excel",e("./languages/excel")),i.registerLanguage("fix",e("./languages/fix")),i.registerLanguage("fortran",e("./languages/fortran")),i.registerLanguage("fsharp",e("./languages/fsharp")),i.registerLanguage("gams",e("./languages/gams")),i.registerLanguage("gauss",e("./languages/gauss")),i.registerLanguage("gcode",e("./languages/gcode")),i.registerLanguage("gherkin",e("./languages/gherkin")),i.registerLanguage("glsl",e("./languages/glsl")),i.registerLanguage("go",e("./languages/go")),i.registerLanguage("golo",e("./languages/golo")),i.registerLanguage("gradle",e("./languages/gradle")),i.registerLanguage("groovy",e("./languages/groovy")),i.registerLanguage("haml",e("./languages/haml")),i.registerLanguage("handlebars",e("./languages/handlebars")),i.registerLanguage("haskell",e("./languages/haskell")),i.registerLanguage("haxe",e("./languages/haxe")),i.registerLanguage("hsp",e("./languages/hsp")),i.registerLanguage("htmlbars",e("./languages/htmlbars")),i.registerLanguage("http",e("./languages/http")),i.registerLanguage("inform7",e("./languages/inform7")),i.registerLanguage("ini",e("./languages/ini")),i.registerLanguage("irpf90",e("./languages/irpf90")),i.registerLanguage("java",e("./languages/java")),i.registerLanguage("javascript",e("./languages/javascript")),i.registerLanguage("json",e("./languages/json")),i.registerLanguage("julia",e("./languages/julia")),i.registerLanguage("kotlin",e("./languages/kotlin")),i.registerLanguage("lasso",e("./languages/lasso")),i.registerLanguage("ldif",e("./languages/ldif")),i.registerLanguage("less",e("./languages/less")),i.registerLanguage("lisp",e("./languages/lisp")),i.registerLanguage("livecodeserver",e("./languages/livecodeserver")),i.registerLanguage("livescript",e("./languages/livescript")),i.registerLanguage("lsl",e("./languages/lsl")),i.registerLanguage("lua",e("./languages/lua")),i.registerLanguage("makefile",e("./languages/makefile")),i.registerLanguage("mathematica",e("./languages/mathematica")),i.registerLanguage("matlab",e("./languages/matlab")),i.registerLanguage("maxima",e("./languages/maxima")),i.registerLanguage("mel",e("./languages/mel")),i.registerLanguage("mercury",e("./languages/mercury")),i.registerLanguage("mipsasm",e("./languages/mipsasm")),i.registerLanguage("mizar",e("./languages/mizar")),i.registerLanguage("perl",e("./languages/perl")),i.registerLanguage("mojolicious",e("./languages/mojolicious")),i.registerLanguage("monkey",e("./languages/monkey")),i.registerLanguage("moonscript",e("./languages/moonscript")),i.registerLanguage("nginx",e("./languages/nginx")),i.registerLanguage("nimrod",e("./languages/nimrod")),i.registerLanguage("nix",e("./languages/nix")),i.registerLanguage("nsis",e("./languages/nsis")),i.registerLanguage("objectivec",e("./languages/objectivec")),i.registerLanguage("ocaml",e("./languages/ocaml")),i.registerLanguage("openscad",e("./languages/openscad")),i.registerLanguage("oxygene",e("./languages/oxygene")),i.registerLanguage("parser3",e("./languages/parser3")),i.registerLanguage("pf",e("./languages/pf")),i.registerLanguage("php",e("./languages/php")),i.registerLanguage("pony",e("./languages/pony")),i.registerLanguage("powershell",e("./languages/powershell")),i.registerLanguage("processing",e("./languages/processing")),i.registerLanguage("profile",e("./languages/profile")),i.registerLanguage("prolog",e("./languages/prolog")),i.registerLanguage("protobuf",e("./languages/protobuf")),i.registerLanguage("puppet",e("./languages/puppet")),i.registerLanguage("purebasic",e("./languages/purebasic")),i.registerLanguage("python",e("./languages/python")),i.registerLanguage("q",e("./languages/q")),i.registerLanguage("qml",e("./languages/qml")),i.registerLanguage("r",e("./languages/r")),i.registerLanguage("rib",e("./languages/rib")),i.registerLanguage("roboconf",e("./languages/roboconf")),i.registerLanguage("rsl",e("./languages/rsl")),i.registerLanguage("ruleslanguage",e("./languages/ruleslanguage")),i.registerLanguage("rust",e("./languages/rust")),i.registerLanguage("scala",e("./languages/scala")),i.registerLanguage("scheme",e("./languages/scheme")),i.registerLanguage("scilab",e("./languages/scilab")),i.registerLanguage("scss",e("./languages/scss")),i.registerLanguage("smali",e("./languages/smali")),i.registerLanguage("smalltalk",e("./languages/smalltalk")),i.registerLanguage("sml",e("./languages/sml")),i.registerLanguage("sqf",e("./languages/sqf")),i.registerLanguage("sql",e("./languages/sql")),i.registerLanguage("stan",e("./languages/stan")),i.registerLanguage("stata",e("./languages/stata")),i.registerLanguage("step21",e("./languages/step21")),i.registerLanguage("stylus",e("./languages/stylus")),i.registerLanguage("subunit",e("./languages/subunit")),i.registerLanguage("swift",e("./languages/swift")),i.registerLanguage("taggerscript",e("./languages/taggerscript")),i.registerLanguage("yaml",e("./languages/yaml")),i.registerLanguage("tap",e("./languages/tap")),i.registerLanguage("tcl",e("./languages/tcl")),i.registerLanguage("tex",e("./languages/tex")),i.registerLanguage("thrift",e("./languages/thrift")),i.registerLanguage("tp",e("./languages/tp")),i.registerLanguage("twig",e("./languages/twig")),i.registerLanguage("typescript",e("./languages/typescript")),i.registerLanguage("vala",e("./languages/vala")),i.registerLanguage("vbnet",e("./languages/vbnet")),i.registerLanguage("vbscript",e("./languages/vbscript")),i.registerLanguage("vbscript-html",e("./languages/vbscript-html")),i.registerLanguage("verilog",e("./languages/verilog")),i.registerLanguage("vhdl",e("./languages/vhdl")),i.registerLanguage("vim",e("./languages/vim")),i.registerLanguage("x86asm",e("./languages/x86asm")),i.registerLanguage("xl",e("./languages/xl")),i.registerLanguage("xquery",e("./languages/xquery")),i.registerLanguage("zephir",e("./languages/zephir")),n.exports=i}),define("highlight",["highlight/lib/index"],function(e){return e}),define("text!highlight/styles/github.css",["module"],function(e){e.exports="/*\n\ngithub.com style (c) Vasily Polovnyov \n\n*/\n\n.hljs {\n display: block;\n overflow-x: auto;\n padding: 0.5em;\n color: #333;\n background: #f8f8f8;\n}\n\n.hljs-comment,\n.hljs-quote {\n color: #998;\n font-style: italic;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-subst {\n color: #333;\n font-weight: bold;\n}\n\n.hljs-number,\n.hljs-literal,\n.hljs-variable,\n.hljs-template-variable,\n.hljs-tag .hljs-attr {\n color: #008080;\n}\n\n.hljs-string,\n.hljs-doctag {\n color: #d14;\n}\n\n.hljs-title,\n.hljs-section,\n.hljs-selector-id {\n color: #900;\n font-weight: bold;\n}\n\n.hljs-subst {\n font-weight: normal;\n}\n\n.hljs-type,\n.hljs-class .hljs-title {\n color: #458;\n font-weight: bold;\n}\n\n.hljs-tag,\n.hljs-name,\n.hljs-attribute {\n color: #000080;\n font-weight: normal;\n}\n\n.hljs-regexp,\n.hljs-link {\n color: #009926;\n}\n\n.hljs-symbol,\n.hljs-bullet {\n color: #990073;\n}\n\n.hljs-built_in,\n.hljs-builtin-name {\n color: #0086b3;\n}\n\n.hljs-meta {\n color: #999;\n font-weight: bold;\n}\n\n.hljs-deletion {\n background: #fdd;\n}\n\n.hljs-addition {\n background: #dfd;\n}\n\n.hljs-emphasis {\n font-style: italic;\n}\n\n.hljs-strong {\n font-weight: bold;\n}\n"}),function(e){function t(t){if("string"==typeof t.data&&(t.data={keys:t.data}),t.data&&t.data.keys&&"string"==typeof t.data.keys){var n=t.handler,i=t.data.keys.toLowerCase().split(" ");t.handler=function(t){if(this===t.target||!(e.hotkeys.options.filterInputAcceptingElements&&e.hotkeys.textInputTypes.test(t.target.nodeName)||e.hotkeys.options.filterContentEditable&&e(t.target).attr("contenteditable")||e.hotkeys.options.filterTextInputs&&e.inArray(t.target.type,e.hotkeys.textAcceptingInputTypes)>-1)){var r="keypress"!==t.type&&e.hotkeys.specialKeys[t.which],o=String.fromCharCode(t.which).toLowerCase(),s="",a={};e.each(["alt","ctrl","shift"],function(e,n){t[n+"Key"]&&r!==n&&(s+=n+"+")}),t.metaKey&&!t.ctrlKey&&"meta"!==r&&(s+="meta+"),t.metaKey&&"meta"!==r&&s.indexOf("alt+ctrl+shift+")>-1&&(s=s.replace("alt+ctrl+shift+","hyper+")),r?a[s+r]=!0:(a[s+o]=!0,a[s+e.hotkeys.shiftNums[o]]=!0,"shift+"===s&&(a[e.hotkeys.shiftNums[o]]=!0));for(var l=0,c=i.length;l","/":"?","\\":"|"},textAcceptingInputTypes:["text","password","number","email","url","range","date","month","week","time","datetime","datetime-local","search","color","tel"],textInputTypes:/textarea|input|select/i,options:{filterInputAcceptingElements:!0,filterTextInputs:!0,filterContentEditable:!0}},e.each(["keydown","keyup","keypress"],function(){e.event.special[this]={add:t}})}(jQuery||this.jQuery||window.jQuery),define("hotkeys/jquery.hotkeys",["jquery"],function(){}),define("hotkeys",["hotkeys/jquery.hotkeys"],function(e){return e}),function(e){e.tablesort=function(t,n){var i=this;this.$table=t,this.$thead=this.$table.find("thead"),this.settings=e.extend({},e.tablesort.defaults,n),this.$sortCells=this.$thead.length>0?this.$thead.find("th:not(.no-sort)"):this.$table.find("th:not(.no-sort)"),this.$sortCells.on("click.tablesort",function(){i.sort(e(this))}),this.index=null,this.$th=null,this.direction=null},e.tablesort.prototype={sort:function(t,n){var i=new Date,r=this,o=this.$table,s=o.find("tbody").length>0?o.find("tbody"):o,a=s.find("tr").has("td, th"),l=a.find(":nth-child("+(t.index()+1)+")").filter("td, th"),c=t.data().sortBy,u=[],d=l.map(function(n,i){return c?"function"==typeof c?c(e(t),e(i),r):c:null!=e(this).data().sortValue?e(this).data().sortValue:e(this).text()});0!==d.length&&(this.index!==t.index()?(this.direction="asc",this.index=t.index()):"asc"!==n&&"desc"!==n?this.direction="asc"===this.direction?"desc":"asc":this.direction=n,n="asc"==this.direction?1:-1,r.$table.trigger("tablesort:start",[r]),r.log("Sorting by "+this.index+" "+this.direction),r.$table.css("display"),setTimeout(function(){r.$sortCells.removeClass(r.settings.asc+" "+r.settings.desc);for(var o=0,c=d.length;o2e3?200:10))},log:function(t){(e.tablesort.DEBUG||this.settings.debug)&&console&&console.log&&console.log("[tablesort] "+t)},destroy:function(){return this.$sortCells.off("click.tablesort"),this.$table.data("tablesort",null),null}},e.tablesort.DEBUG=!1,e.tablesort.defaults={debug:e.tablesort.DEBUG,asc:"sorted ascending",desc:"sorted descending",compare:function(e,t){return e>t?1:e'+i.options.close_text+"","none"===i.options.animation&&(i.options.animation_speed=0,i.options.after_callback_delay=0),e(n).on("click.Modaal",function(e){e.preventDefault();var t;if(i.lastFocus=document.activeElement,i.options.should_open!==!1&&("function"!=typeof i.options.should_open||i.options.should_open()!==!1)){switch(i.options.before_open.call(i,e),i.options.type){case"inline":i.create_basic();break;case"ajax":t=i.options.source(i.$elem,i.$elem.attr("href")),i.fetch_ajax(t);break;case"confirm":i.options.is_locked=!0,i.create_confirm();break;case"image":i.create_image();break;case"iframe":t=i.options.source(i.$elem,i.$elem.attr("href")),i.create_iframe(t);break;case"video":i.create_video(i.$elem.attr("href"));break;case"instagram":i.create_instagram()}i.watch_events()}}),i.options.start_open===!0&&e(n).click()},watch_events:function(){var t=this;t.dom.off("click.Modaal keyup.Modaal keydown.Modaal"),t.dom.on("keydown.Modaal",function(n){var i=n.keyCode,r=n.target;9==i&&t.scope.is_open&&(e.contains(document.getElementById(t.scope.id),r)||e("#"+t.scope.id).find('*[tabindex="0"]').focus())}),t.dom.on("keyup.Modaal",function(n){var i=n.keyCode,r=n.target;return n.shiftKey&&9==n.keyCode&&t.scope.is_open&&(e.contains(document.getElementById(t.scope.id),r)||e("#"+t.scope.id).find(".modaal-close").focus()),!t.options.is_locked&&27==i&&t.scope.is_open?!e(document.activeElement).is("input:not(:checkbox):not(:radio)")&&void t.modaal_close():"image"==t.options.type?(37==i&&t.scope.is_open&&!e("#"+t.scope.id+" .modaal-gallery-prev").hasClass("is_hidden")&&t.gallery_update("prev"),void(39==i&&t.scope.is_open&&!e("#"+t.scope.id+" .modaal-gallery-next").hasClass("is_hidden")&&t.gallery_update("next"))):void 0}),t.dom.on("click.Modaal",function(n){var i=e(n.target);if(!t.options.is_locked&&(t.options.overlay_close&&i.is(".modaal-inner-wrapper")||i.is(".modaal-close")||i.closest(".modaal-close").length))return void t.modaal_close();if(i.is(".modaal-confirm-btn"))return i.is(".modaal-ok")&&t.options.confirm_callback.call(t,t.lastFocus),i.is(".modaal-cancel")&&t.options.confirm_cancel_callback.call(t,t.lastFocus),void t.modaal_close();if(i.is(".modaal-gallery-control")){if(i.hasClass("is_hidden"))return;return i.is(".modaal-gallery-prev")&&t.gallery_update("prev"),void(i.is(".modaal-gallery-next")&&t.gallery_update("next"))}})},build_modal:function(e){var t=this,n="";"instagram"==t.options.type&&(n=" modaal-instagram");var i,r="video"==t.options.type?"modaal-video-wrap":"modaal-content";switch(t.options.animation){case"fade":i=" modaal-start_fade";break;case"slide-down":i=" modaal-start_slidedown";break;default:i=" modaal-start_none"}var o="";t.options.fullscreen&&(o=" modaal-fullscreen"),""===t.options.custom_class&&"undefined"==typeof t.options.custom_class||(t.options.custom_class=" "+t.options.custom_class);var s="";t.options.width&&t.options.height&&"number"==typeof t.options.width&&"number"==typeof t.options.height?s=' style="max-width:'+t.options.width+"px;height:"+t.options.height+'px;overflow:auto;"':t.options.width&&"number"==typeof t.options.width?s=' style="max-width:'+t.options.width+'px;"':t.options.height&&"number"==typeof t.options.height&&(s=' style="height:'+t.options.height+'px;overflow:auto;"'),("image"==t.options.type||"video"==t.options.type||"instagram"==t.options.type||t.options.fullscreen)&&(s="");var a='
    ';"video"!=t.options.type&&(a+='
    "),a+='"+t.scope.close_btn,"video"!=t.options.type&&(a+="
    "),a+="
    ",t.dom.append(a),"inline"==t.options.type&&e.appendTo("#"+t.scope.id+" .modaal-content-container"),t.modaal_overlay("show")},create_basic:function(){var t=this,n=t.$elem.is("[href]")?e(t.$elem.attr("href")):t.$elem,i="";n.length?(i=n.contents().clone(!0,!0),n.empty()):i="Content could not be loaded. Please check the source and try again.",t.build_modal(i)},create_instagram:function(){var t=this,n=t.options.instagram_id,i="",r="Instagram photo couldn't be loaded, please check the embed code and try again.";if(t.build_modal('
    '+t.options.loading_content+"
    "),""!=n&&null!==n&&void 0!==n){var o="https://api.instagram.com/oembed?url=http://instagr.am/p/"+n+"/";e.ajax({url:o,dataType:"jsonp",cache:!1,success:function(n){i=n.html;var r=e("#"+t.scope.id+" .modaal-content-container");r.length>0&&(r.removeClass(t.options.loading_class),r.html(i),window.instgrm.Embeds.process())},error:function(){i=r;var n=e("#"+t.scope.id+" .modaal-content-container");n.length>0&&(n.removeClass(t.options.loading_class).addClass(t.options.ajax_error_class),n.html(i))}})}else i=r;return!1},fetch_ajax:function(t){var n=this;null==n.options.accessible_title&&(n.options.accessible_title="Dialog Window"),null!==n.xhr&&(n.xhr.abort(),n.xhr=null),n.build_modal('
    '+n.options.loading_content+"
    "),n.xhr=e.ajax(t,{success:function(t){var i=e("#"+n.scope.id).find(".modaal-content-container");i.length>0&&(i.removeClass(n.options.loading_class),i.html(t),n.options.ajax_success.call(n,i))},error:function(t){if("abort"!=t.statusText){var i=e("#"+n.scope.id+" .modaal-content-container");i.length>0&&(i.removeClass(n.options.loading_class).addClass(n.options.ajax_error_class),i.html("Content could not be loaded. Please check the source and try again."))}}})},create_confirm:function(){var e,t=this;e='

    '+t.options.confirm_title+'

    '+t.options.confirm_content+'
    ",t.build_modal(e)},create_image:function(){var t,n,i=this,r="",o='',s='';if(i.$elem.is("[rel]")){var a=i.$elem.attr("rel"),l=e('[rel="'+a+'"]');l.removeAttr("data-gallery-active","is_active"),i.$elem.attr("data-gallery-active","is_active"),n=l.length-1;var c=[];r='"}r+="
    "+o+s}else{var f=i.$elem.attr("href"),p="",g="",h="";i.$elem.attr("data-modaal-desc")?(h=i.$elem.attr("data-modaal-desc"),p=i.$elem.attr("data-modaal-desc"),g='"):h="Image with no description",r='"}t=r,i.build_modal(t),e(".modaal-gallery-item.is_active").is(".gallery-item-0")&&e(".modaal-gallery-prev").hide(),e(".modaal-gallery-item.is_active").is(".gallery-item-"+n)&&e(".modaal-gallery-next").hide()},gallery_update:function(t){var n=this,i=e("#"+n.scope.id),r=i.find(".modaal-gallery-item"),o=r.length-1;if(0==o)return!1;var s=i.find(".modaal-gallery-prev"),a=i.find(".modaal-gallery-next"),l=250,c=0,u=0,d=i.find(".modaal-gallery-item."+n.private_options.active_class),h="next"==t?d.next(".modaal-gallery-item"):d.prev(".modaal-gallery-item");return n.options.before_image_change.call(n,d,h),("prev"!=t||!i.find(".gallery-item-0").hasClass("is_active"))&&(("next"!=t||!i.find(".gallery-item-"+o).hasClass("is_active"))&&void d.stop().animate({opacity:0},l,function(){h.addClass("is_next").css({position:"absolute",display:"block",opacity:0});var t=e(document).width(),r=t>1140?280:50;c=i.find(".modaal-gallery-item.is_next").width(),u=i.find(".modaal-gallery-item.is_next").height();var f=i.find(".modaal-gallery-item.is_next img").prop("naturalWidth"),p=i.find(".modaal-gallery-item.is_next img").prop("naturalHeight");f>t-r?(c=t-r,i.find(".modaal-gallery-item.is_next").css({width:c}),i.find(".modaal-gallery-item.is_next img").css({width:c}),u=i.find(".modaal-gallery-item.is_next").find("img").height()):(c=f,u=p),i.find(".modaal-gallery-item-wrap").stop().animate({width:c,height:u},l,function(){d.removeClass(n.private_options.active_class+" "+n.options.gallery_active_class).removeAttr("style"),d.find("img").removeAttr("style"),h.addClass(n.private_options.active_class+" "+n.options.gallery_active_class).removeClass("is_next").css("position",""),h.stop().animate({opacity:1},l,function(){e(this).removeAttr("style").css({width:"100%"}),e(this).find("img").css("width","100%"),i.find(".modaal-gallery-item-wrap").removeAttr("style"),n.options.after_image_change.call(n,h)}),i.find(".modaal-gallery-item").removeAttr("tabindex"),i.find(".modaal-gallery-item."+n.private_options.active_class).attr("tabindex","0").focus(),i.find(".modaal-gallery-item."+n.private_options.active_class).is(".gallery-item-0")?s.stop().animate({opacity:0},150,function(){e(this).hide()}):s.stop().css({display:"block",opacity:s.css("opacity")}).animate({opacity:1},150),i.find(".modaal-gallery-item."+n.private_options.active_class).is(".gallery-item-"+o)?a.stop().animate({opacity:0},150,function(){e(this).hide()}):a.stop().css({display:"block",opacity:s.css("opacity")}).animate({opacity:1},150)})}))},create_video:function(e){var t,n=this;t='',n.build_modal('
    '+t+"
    ")},create_iframe:function(e){var t,n=this;t=null!==n.options.width||void 0!==n.options.width||null!==n.options.height||void 0!==n.options.height?'':'
    Please specify a width and height for your iframe
    ',n.build_modal(t)},modaal_open:function(){var t=this,n=e("#"+t.scope.id),i=t.options.animation;"none"===i&&(n.removeClass("modaal-start_none"),t.options.after_open.call(t,n)),"fade"===i&&n.removeClass("modaal-start_fade"),"slide-down"===i&&n.removeClass("modaal-start_slide_down");var r=n;e(".modaal-wrapper *[tabindex=0]").removeAttr("tabindex"),r="image"==t.options.type?e("#"+t.scope.id).find(".modaal-gallery-item."+t.private_options.active_class):n.find(".modaal-iframe-elem").length?n.find(".modaal-iframe-elem"):n.find(".modaal-video-wrap").length?n.find(".modaal-video-wrap"):n.find(".modaal-focus"),r.attr("tabindex","0").focus(),"none"!==i&&setTimeout(function(){t.options.after_open.call(t,n)},t.options.after_callback_delay)},modaal_close:function(){var t=this,n=e("#"+t.scope.id);t.options.before_close.call(t,n),null!==t.xhr&&(t.xhr.abort(),t.xhr=null),"none"===t.options.animation&&n.addClass("modaal-start_none"),"fade"===t.options.animation&&n.addClass("modaal-start_fade"),"slide-down"===t.options.animation&&n.addClass("modaal-start_slide_down"),setTimeout(function(){"inline"==t.options.type&&e("#"+t.scope.id+" .modaal-content-container").contents().clone(!0,!0).appendTo(t.$elem.attr("href")),n.remove(),t.options.after_close.call(t),t.scope.is_open=!1},t.options.after_callback_delay),t.modaal_overlay("hide"),null!=t.lastFocus&&t.lastFocus.focus()},modaal_overlay:function(t){var n=this;"show"==t?(n.scope.is_open=!0,n.options.background_scroll||n.dom.addClass("modaal-noscroll"),n.dom.append('
    '),e("#"+n.scope.id+"_overlay").css("background",n.options.background).stop().animate({ -opacity:n.options.overlay_opacity},n.options.animation_speed,function(){n.modaal_open()})):"hide"==t&&(n.dom.removeClass("modaal-noscroll"),e("#"+n.scope.id+"_overlay").stop().animate({opacity:0},n.options.animation_speed,function(){e(this).remove()}))}};e.fn.modaal=function(t){return this.each(function(){var i=e(this).data("modaal");if(i){if("string"==typeof t)switch(t){case"close":i.modaal_close()}}else{var r=Object.create(n);r.init(t,this),e.data(this,"modaal",r)}})},e.fn.modaal.options={type:"inline",animation:"fade",animation_speed:300,after_callback_delay:350,is_locked:!1,hide_close:!1,background:"#000",overlay_opacity:"0.8",overlay_close:!0,accessible_title:"Dialog Window",start_open:!1,fullscreen:!1,custom_class:"",background_scroll:!1,should_open:!0,close_text:"Close",close_aria_label:"Close (Press escape to close)",width:null,height:null,before_open:function(){},after_open:function(){},before_close:function(){},after_close:function(){},source:function(e,t){return t},confirm_button_text:"Confirm",confirm_cancel_button_text:"Cancel",confirm_title:"Confirm Title",confirm_content:"

    This is the default confirm dialog content. Replace me through the options

    ",confirm_callback:function(){},confirm_cancel_callback:function(){},gallery_active_class:"gallery_active_item",before_image_change:function(e,t){},after_image_change:function(e){},loading_content:t,loading_class:"is_loading",ajax_error_class:"modaal-error",ajax_success:function(){},instagram_id:null},e(function(){var t=e(".modaal");t.length&&t.each(function(){var t=e(this),n={},i=!1;t.attr("data-modaal-type")&&(i=!0,n.type=t.attr("data-modaal-type")),t.attr("data-modaal-animation")&&(i=!0,n.animation=t.attr("data-modaal-animation")),t.attr("data-modaal-animation-speed")&&(i=!0,n.animation_speed=t.attr("data-modaal-animation-speed")),t.attr("data-modaal-after-callback-delay")&&(i=!0,n.after_callback_delay=t.attr("data-modaal-after-callback-delay")),t.attr("data-modaal-is-locked")&&(i=!0,n.is_locked="true"===t.attr("data-modaal-is-locked")),t.attr("data-modaal-hide-close")&&(i=!0,n.hide_close="true"===t.attr("data-modaal-hide-close")),t.attr("data-modaal-background")&&(i=!0,n.background=t.attr("data-modaal-background")),t.attr("data-modaal-overlay-opacity")&&(i=!0,n.overlay_opacity=t.attr("data-modaal-overlay-opacity")),t.attr("data-modaal-overlay-close")&&(i=!0,n.overlay_close="false"!==t.attr("data-modaal-overlay-close")),t.attr("data-modaal-accessible-title")&&(i=!0,n.accessible_title=t.attr("data-modaal-accessible-title")),t.attr("data-modaal-start-open")&&(i=!0,n.start_open="true"===t.attr("data-modaal-start-open")),t.attr("data-modaal-fullscreen")&&(i=!0,n.fullscreen="true"===t.attr("data-modaal-fullscreen")),t.attr("data-modaal-custom-class")&&(i=!0,n.custom_class=t.attr("data-modaal-custom-class")),t.attr("data-modaal-close-text")&&(i=!0,n.close_text=t.attr("data-modaal-close-text")),t.attr("data-modaal-close-aria-label")&&(i=!0,n.close_aria_label=t.attr("data-modaal-close-aria-label")),t.attr("data-modaal-background-scroll")&&(i=!0,n.background_scroll="true"===t.attr("data-modaal-background-scroll")),t.attr("data-modaal-width")&&(i=!0,n.width=parseInt(t.attr("data-modaal-width"))),t.attr("data-modaal-height")&&(i=!0,n.height=parseInt(t.attr("data-modaal-height"))),t.attr("data-modaal-confirm-button-text")&&(i=!0,n.confirm_button_text=t.attr("data-modaal-confirm-button-text")),t.attr("data-modaal-confirm-cancel-button-text")&&(i=!0,n.confirm_cancel_button_text=t.attr("data-modaal-confirm-cancel-button-text")),t.attr("data-modaal-confirm-title")&&(i=!0,n.confirm_title=t.attr("data-modaal-confirm-title")),t.attr("data-modaal-confirm-content")&&(i=!0,n.confirm_content=t.attr("data-modaal-confirm-content")),t.attr("data-modaal-gallery-active-class")&&(i=!0,n.gallery_active_class=t.attr("data-modaal-gallery-active-class")),t.attr("data-modaal-loading-content")&&(i=!0,n.loading_content=t.attr("data-modaal-loading-content")),t.attr("data-modaal-loading-class")&&(i=!0,n.loading_class=t.attr("data-modaal-loading-class")),t.attr("data-modaal-ajax-error-class")&&(i=!0,n.ajax_error_class=t.attr("data-modaal-ajax-error-class")),t.attr("data-modaal-instagram-id")&&(i=!0,n.instagram_id=t.attr("data-modaal-instagram-id")),i&&t.modaal(n)})})}(jQuery,window,document),define("modaal/dist/js/modaal.min",["jquery"],function(){}),define("modaal",["modaal/dist/js/modaal.min"],function(e){return e}),define("text!modaal/dist/css/modaal.min.css",["module"],function(e){e.exports='/*!\n\tModaal - accessible modals - v0.3.1\n\tby Humaan, for all humans.\n\thttp://humaan.com\n */\n.modaal-noscroll{overflow:hidden}.modaal-accessible-hide,.modaal-close span,.modaal-gallery-control span{position:absolute!important;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px);padding:0!important;border:0!important;height:1px!important;width:1px!important;overflow:hidden}.modaal-overlay,.modaal-wrapper{position:fixed;top:0;left:0;width:100%;height:100%;z-index:999;opacity:0}.modaal-wrapper{display:block;z-index:9999;overflow:auto;opacity:1;box-sizing:border-box;-webkit-overflow-scrolling:touch;transition:all .3s ease-in-out}.modaal-wrapper *{box-sizing:border-box;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-backface-visibility:hidden}.modaal-wrapper .modaal-close{border:none;background:0 0;padding:0;-webkit-appearance:none}.modaal-wrapper.modaal-start_none{display:none;opacity:1}.modaal-wrapper.modaal-start_fade{opacity:0}.modaal-wrapper [tabindex="0"]{outline:none!important}.modaal-wrapper.modaal-fullscreen{overflow:hidden}.modaal-outer-wrapper{display:table;position:relative;width:100%;height:100%}.modaal-fullscreen .modaal-outer-wrapper,.modaal-gallery-item img{display:block}.modaal-inner-wrapper{display:table-cell;width:100%;height:100%;position:relative;vertical-align:middle;text-align:center;padding:80px 25px}.modaal-fullscreen .modaal-inner-wrapper{padding:0;display:block;vertical-align:top}.modaal-container{position:relative;display:inline-block;width:100%;margin:auto;text-align:left;color:#000;max-width:1000px;border-radius:0;background:#fff;box-shadow:0 4px 15px rgba(0,0,0,.2);cursor:auto}.modaal-container.is_loading{height:100px;width:100px;overflow:hidden}.modaal-fullscreen .modaal-container{max-width:none;height:100%;overflow:auto}.modaal-close{position:fixed;right:20px;top:20px;color:#fff;cursor:pointer;opacity:1;width:50px;height:50px;background:0 0;border-radius:100%;transition:all .2s ease-in-out}.modaal-close:focus,.modaal-close:hover{outline:none;background:#fff}.modaal-close:focus:after,.modaal-close:focus:before,.modaal-close:hover:after,.modaal-close:hover:before{background:#b93d0c}.modaal-close:after,.modaal-close:before{display:block;content:" ";position:absolute;top:14px;left:23px;width:4px;height:22px;border-radius:4px;background:#fff;transition:background .2s ease-in-out}.modaal-close:before{-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg)}.modaal-close:after{-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.modaal-fullscreen .modaal-close{background:#afb7bc;right:10px;top:10px}.modaal-content-container{padding:30px}.modaal-confirm-wrap{padding:30px 0 0;text-align:center;font-size:0}.modaal-confirm-btn{font-size:14px;display:inline-block;margin:0 10px;vertical-align:middle;cursor:pointer;border:none;background:0 0}.modaal-confirm-btn.modaal-ok{padding:10px 15px;color:#fff;background:#555;border-radius:3px;transition:background .2s ease-in-out}.modaal-confirm-btn.modaal-ok:hover{background:#2f2f2f}.modaal-confirm-btn.modaal-cancel{text-decoration:underline}.modaal-confirm-btn.modaal-cancel:hover{text-decoration:none;color:#2f2f2f}@keyframes instaReveal{0%{opacity:0}to{opacity:1}}@-webkit-keyframes instaReveal{0%{opacity:0}to{opacity:1}}.modaal-instagram .modaal-container{width:auto;background:0 0;box-shadow:none!important}.modaal-instagram .modaal-content-container{padding:0;background:0 0}.modaal-instagram .modaal-content-container>blockquote{width:1px!important;height:1px!important;opacity:0!important}.modaal-instagram iframe{opacity:0;margin:-6px!important;border-radius:0!important;width:1000px!important;max-width:800px!important;box-shadow:none!important;-webkit-animation:instaReveal 1s linear forwards;animation:instaReveal 1s linear forwards}.modaal-image .modaal-inner-wrapper{padding-left:140px;padding-right:140px}.modaal-image .modaal-container{width:auto;max-width:100%}.modaal-gallery-wrap{position:relative;color:#fff}.modaal-gallery-item{display:none}.modaal-gallery-item.is_active{display:block}.modaal-gallery-label{position:absolute;left:0;width:100%;margin:20px 0 0;font-size:18px;text-align:center;color:#fff}.modaal-gallery-label:focus{outline:none}.modaal-gallery-control{position:absolute;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);opacity:1;cursor:pointer;color:#fff;width:50px;height:50px;background:0 0;border:none;border-radius:100%;transition:all .2s ease-in-out}.modaal-gallery-control.is_hidden{opacity:0;cursor:default}.modaal-gallery-control:focus,.modaal-gallery-control:hover{outline:none;background:#fff}.modaal-gallery-control:focus:after,.modaal-gallery-control:focus:before,.modaal-gallery-control:hover:after,.modaal-gallery-control:hover:before{background:#afb7bc}.modaal-gallery-control:after,.modaal-gallery-control:before{display:block;content:" ";position:absolute;top:16px;left:25px;width:4px;height:18px;border-radius:4px;background:#fff;transition:background .2s ease-in-out}.modaal-gallery-control:before{margin:-5px 0 0;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg)}.modaal-gallery-control:after{margin:5px 0 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.modaal-gallery-next{left:100%;margin-left:40px}.modaal-gallery-prev{right:100%;margin-right:40px}.modaal-gallery-prev:after,.modaal-gallery-prev:before{left:22px}.modaal-gallery-prev:before{margin:5px 0 0;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg)}.modaal-gallery-prev:after{margin:-5px 0 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.modaal-video-wrap{margin:auto 50px;position:relative}.modaal-video-container{position:relative;padding-bottom:56.25%;height:0;overflow:hidden;box-shadow:0 0 10px rgba(0,0,0,.3);background:#000;max-width:1300px;margin-left:auto;margin-right:auto}.modaal-video-container embed,.modaal-video-container iframe,.modaal-video-container object{position:absolute;top:0;left:0;width:100%;height:100%}.modaal-iframe .modaal-content,.modaal-iframe-elem{width:100%;height:100%}.modaal-iframe-elem{display:block}@media only screen and (min-width:1400px){.modaal-video-container{padding-bottom:0;height:731px}}@media only screen and (max-width:1140px){.modaal-image .modaal-inner-wrapper{padding-left:25px;padding-right:25px}.modaal-gallery-control{top:auto;bottom:20px;-webkit-transform:none;-ms-transform:none;transform:none;background:rgba(0,0,0,.7)}.modaal-gallery-control:after,.modaal-gallery-control:before{background:#fff}.modaal-gallery-next{left:auto;right:20px}.modaal-gallery-prev{left:20px;right:auto}}@media screen and (max-width:900px){.modaal-instagram iframe{width:500px!important}}@media screen and (max-height:1100px){.modaal-instagram iframe{width:700px!important}}@media screen and (max-height:1000px){.modaal-inner-wrapper{padding-top:60px;padding-bottom:60px}.modaal-instagram iframe{width:600px!important}}@media screen and (max-height:900px){.modaal-instagram iframe{width:500px!important}.modaal-video-container{max-width:900px;max-height:510px}}@media only screen and (max-width:600px){.modaal-instagram iframe{width:280px!important}}@media only screen and (max-height:820px){.modaal-gallery-label{display:none}}.modaal-loading-spinner{background:0 0;position:absolute;width:200px;height:200px;top:50%;left:50%;margin:-100px 0 0 -100px;-webkit-transform:scale(.25);-ms-transform:scale(.25);transform:scale(.25)}@-webkit-keyframes modaal-loading-spinner{0%{opacity:1;-ms-transform:scale(1.5);-webkit-transform:scale(1.5);transform:scale(1.5)}to{opacity:.1;-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1)}}@keyframes modaal-loading-spinner{0%{opacity:1;-ms-transform:scale(1.5);-webkit-transform:scale(1.5);transform:scale(1.5)}to{opacity:.1;-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1)}}.modaal-loading-spinner>div{width:24px;height:24px;margin-left:4px;margin-top:4px;position:absolute}.modaal-loading-spinner>div>div{width:100%;height:100%;border-radius:15px;background:#fff}.modaal-loading-spinner>div:nth-of-type(1)>div{-webkit-animation:modaal-loading-spinner 1s linear infinite;animation:modaal-loading-spinner 1s linear infinite;-webkit-animation-delay:0s;animation-delay:0s}.modaal-loading-spinner>div:nth-of-type(2)>div,.modaal-loading-spinner>div:nth-of-type(3)>div{-ms-animation:modaal-loading-spinner 1s linear infinite;-moz-animation:modaal-loading-spinner 1s linear infinite;-o-animation:modaal-loading-spinner 1s linear infinite}.modaal-loading-spinner>div:nth-of-type(1){-ms-transform:translate(84px,84px) rotate(45deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(45deg) translate(70px,0);transform:translate(84px,84px) rotate(45deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(2)>div{-webkit-animation:modaal-loading-spinner 1s linear infinite;animation:modaal-loading-spinner 1s linear infinite;-webkit-animation-delay:.12s;animation-delay:.12s}.modaal-loading-spinner>div:nth-of-type(2){-ms-transform:translate(84px,84px) rotate(90deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(90deg) translate(70px,0);transform:translate(84px,84px) rotate(90deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(3)>div,.modaal-loading-spinner>div:nth-of-type(4)>div,.modaal-loading-spinner>div:nth-of-type(5)>div{-webkit-animation:modaal-loading-spinner 1s linear infinite;animation:modaal-loading-spinner 1s linear infinite;-webkit-animation-delay:.25s;animation-delay:.25s}.modaal-loading-spinner>div:nth-of-type(4)>div,.modaal-loading-spinner>div:nth-of-type(5)>div{-ms-animation:modaal-loading-spinner 1s linear infinite;-moz-animation:modaal-loading-spinner 1s linear infinite;-o-animation:modaal-loading-spinner 1s linear infinite;-webkit-animation-delay:.37s;animation-delay:.37s}.modaal-loading-spinner>div:nth-of-type(3){-ms-transform:translate(84px,84px) rotate(135deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(135deg) translate(70px,0);transform:translate(84px,84px) rotate(135deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(4){-ms-transform:translate(84px,84px) rotate(180deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(180deg) translate(70px,0);transform:translate(84px,84px) rotate(180deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(5)>div{-webkit-animation-delay:.5s;animation-delay:.5s}.modaal-loading-spinner>div:nth-of-type(6)>div,.modaal-loading-spinner>div:nth-of-type(7)>div{-ms-animation:modaal-loading-spinner 1s linear infinite;-moz-animation:modaal-loading-spinner 1s linear infinite;-o-animation:modaal-loading-spinner 1s linear infinite}.modaal-loading-spinner>div:nth-of-type(5){-ms-transform:translate(84px,84px) rotate(225deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(225deg) translate(70px,0);transform:translate(84px,84px) rotate(225deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(6)>div,.modaal-loading-spinner>div:nth-of-type(7)>div,.modaal-loading-spinner>div:nth-of-type(8)>div{-webkit-animation:modaal-loading-spinner 1s linear infinite;animation:modaal-loading-spinner 1s linear infinite;-webkit-animation-delay:.62s;animation-delay:.62s}.modaal-loading-spinner>div:nth-of-type(6){-ms-transform:translate(84px,84px) rotate(270deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(270deg) translate(70px,0);transform:translate(84px,84px) rotate(270deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(7)>div,.modaal-loading-spinner>div:nth-of-type(8)>div{-webkit-animation-delay:.75s;animation-delay:.75s}.modaal-loading-spinner>div:nth-of-type(7){-ms-transform:translate(84px,84px) rotate(315deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(315deg) translate(70px,0);transform:translate(84px,84px) rotate(315deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(8)>div{-webkit-animation-delay:.87s;animation-delay:.87s}.modaal-loading-spinner>div:nth-of-type(8){-ms-transform:translate(84px,84px) rotate(360deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(360deg) translate(70px,0);transform:translate(84px,84px) rotate(360deg) translate(70px,0)}'}),!function(e){"function"==typeof define&&define.amd?define("fullcalendar/dist/fullcalendar.min",["jquery","moment"],e):"object"==typeof exports?module.exports=e(require("jquery"),require("moment")):e(jQuery,moment)}(function(e,t){function n(e){return V(e,We)}function i(e,t){t.left&&e.css({"border-left-width":1,"margin-left":t.left-1}),t.right&&e.css({"border-right-width":1,"margin-right":t.right-1})}function r(e){e.css({"margin-left":"","margin-right":"","border-left-width":"","border-right-width":""})}function o(){e("body").addClass("fc-not-allowed")}function s(){e("body").removeClass("fc-not-allowed")}function a(t,n,i){var r=Math.floor(n/t.length),o=Math.floor(n-r*(t.length-1)),s=[],a=[],c=[],u=0;l(t),t.each(function(n,i){var l=n===t.length-1?o:r,d=e(i).outerHeight(!0);d *").each(function(t,i){var r=e(i).outerWidth();r>n&&(n=r)}),n++,t.width(n),n}function u(e,t){var n,i=e.add(t);return i.css({position:"relative",left:-1}),n=e.outerHeight()-t.outerHeight(),i.css({position:"",left:""}),n}function d(t){var n=t.css("position"),i=t.parents().filter(function(){var t=e(this);return/(auto|scroll)/.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==n&&i.length?i:e(t[0].ownerDocument||document)}function h(e,t){var n=e.offset(),i=n.left-(t?t.left:0),r=n.top-(t?t.top:0);return{left:i,right:i+e.outerWidth(),top:r,bottom:r+e.outerHeight()}}function f(e,t){var n=e.offset(),i=g(e),r=n.left+b(e,"border-left-width")+i.left-(t?t.left:0),o=n.top+b(e,"border-top-width")+i.top-(t?t.top:0);return{left:r,right:r+e[0].clientWidth,top:o,bottom:o+e[0].clientHeight}}function p(e,t){var n=e.offset(),i=n.left+b(e,"border-left-width")+b(e,"padding-left")-(t?t.left:0),r=n.top+b(e,"border-top-width")+b(e,"padding-top")-(t?t.top:0);return{left:i,right:i+e.width(),top:r,bottom:r+e.height()}}function g(e){var t,n=e.innerWidth()-e[0].clientWidth,i=e.innerHeight()-e[0].clientHeight;return n=m(n),i=m(i),t={left:0,right:0,top:0,bottom:i},v()&&"rtl"==e.css("direction")?t.left=n:t.right=n,t}function m(e){return e=Math.max(0,e),e=Math.round(e)}function v(){return null===Be&&(Be=y()),Be}function y(){var t=e("
    ").css({position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}).appendTo("body"),n=t.children(),i=n.offset().left>t.offset().left;return t.remove(),i}function b(e,t){return parseFloat(e.css(t))||0}function w(e){return 1==e.which&&!e.ctrlKey}function x(e){var t=e.originalEvent.touches;return t&&t.length?t[0].pageX:e.pageX}function k(e){var t=e.originalEvent.touches;return t&&t.length?t[0].pageY:e.pageY}function S(e){return/^touch/.test(e.type)}function C(e){e.addClass("fc-unselectable").on("selectstart",E)}function T(e){e.removeClass("fc-unselectable").off("selectstart",E)}function E(e){e.preventDefault()}function _(e,t){var n={left:Math.max(e.left,t.left),right:Math.min(e.right,t.right),top:Math.max(e.top,t.top),bottom:Math.min(e.bottom,t.bottom)};return n.leftl&&s=l?(n=s.clone(),r=!0):(n=l.clone(),r=!1),a<=c?(i=a.clone(),o=!0):(i=c.clone(),o=!1),{start:n,end:i,isStart:r,isEnd:o}}function I(e,n){return t.duration({days:e.clone().stripTime().diff(n.clone().stripTime(),"days"),ms:e.time()-n.time()})}function O(e,n){return t.duration({days:e.clone().stripTime().diff(n.clone().stripTime(),"days")})}function F(e,n,i){return t.duration(Math.round(e.diff(n,i,!0)),i)}function P(e,t){var n,i,r;for(n=0;n=1&&se(r)));n++);return i}function W(e,n,i){return null!=i?i.diff(n,e,!0):t.isDuration(n)?n.as(e):n.end.diff(n.start,e,!0)}function B(e,t,n){var i;return U(n)?(t-e)/n:(i=n.asMonths(),Math.abs(i)>=1&&se(i)?t.diff(e,"months",!0)/i:t.diff(e,"days",!0)/n.asDays())}function j(e,t){var n,i;return U(e)||U(t)?e/t:(n=e.asMonths(),i=t.asMonths(),Math.abs(n)>=1&&se(n)&&Math.abs(i)>=1&&se(i)?n/i:e.asDays()/t.asDays())}function Y(e,n){var i;return U(e)?t.duration(e*n):(i=e.asMonths(),Math.abs(i)>=1&&se(i)?t.duration({months:i*n}):t.duration({days:e.asDays()*n}))}function U(e){return Boolean(e.hours()||e.minutes()||e.seconds()||e.milliseconds())}function q(e){return"[object Date]"===Object.prototype.toString.call(e)||e instanceof Date}function G(e){return/^\d+\:\d+(?:\:\d+\.?(?:\d{3})?)?$/.test(e)}function V(e,t){var n,i,r,o,s,a,l={};if(t)for(n=0;n=0;o--)if(s=e[o][i],"object"==typeof s)r.unshift(s);else if(void 0!==s){l[i]=s;break}r.length&&(l[i]=V(r))}for(n=e.length-1;n>=0;n--){a=e[n];for(i in a)i in l||(l[i]=a[i])}return l}function $(e){var t=function(){};return t.prototype=e,new t}function Z(e,t){for(var n in e)X(e,n)&&(t[n]=e[n])}function X(e,t){return Ue.call(e,t)}function Q(t){return/undefined|null|boolean|number|string/.test(e.type(t))}function K(t,n,i){if(e.isFunction(t)&&(t=[t]),t){var r,o;for(r=0;r/g,">").replace(/'/g,"'").replace(/"/g,""").replace(/\n/g,"
    ")}function te(e){return e.replace(/&.*?;/g,"")}function ne(t){var n=[];return e.each(t,function(e,t){null!=t&&n.push(e+":"+t)}),n.join(";")}function ie(t){var n=[];return e.each(t,function(e,t){null!=t&&n.push(e+'="'+ee(t)+'"')}),n.join(" ")}function re(e){return e.charAt(0).toUpperCase()+e.slice(1)}function oe(e,t){return e-t}function se(e){return e%1===0}function ae(e,t){var n=e[t];return function(){return n.apply(e,arguments)}}function le(e,t,n){var i,r,o,s,a,l=function(){var c=+new Date-s;c=e.leftCol)return!0;return!1}function Te(e,t){return e.leftCol-t.leftCol}function Ee(e){var t,n,i,r=[];for(t=0;tt.top&&e.top"),p.append(s("left")).append(s("right")).append(s("center")).append('
    ')):o()}function o(){p&&(p.remove(),p=f.el=null)}function s(i){var r=e('
    '),o=n.layout[i];return o&&e.each(o.split(" "),function(n){var i,o=e(),s=!0;e.each(this.split(","),function(n,i){var r,a,l,c,u,d,h,f,p,v;"title"==i?(o=o.add(e("

     

    ")),s=!1):((r=(t.options.customButtons||{})[i])?(l=function(e){r.click&&r.click.call(v[0],e)},c="",u=r.text):(a=t.getViewSpec(i))?(l=function(){t.changeView(i)},m.push(i),c=a.buttonTextOverride,u=a.buttonTextDefault):t[i]&&(l=function(){t[i]()},c=(t.overrides.buttonText||{})[i],u=t.options.buttonText[i]),l&&(d=r?r.themeIcon:t.options.themeButtonIcons[i],h=r?r.icon:t.options.buttonIcons[i],f=c?ee(c):d&&t.options.theme?"":h&&!t.options.theme?"":ee(u),p=["fc-"+i+"-button",g+"-button",g+"-state-default"],v=e('").click(function(e){v.hasClass(g+"-state-disabled")||(l(e),(v.hasClass(g+"-state-active")||v.hasClass(g+"-state-disabled"))&&v.removeClass(g+"-state-hover"))}).mousedown(function(){v.not("."+g+"-state-active").not("."+g+"-state-disabled").addClass(g+"-state-down")}).mouseup(function(){v.removeClass(g+"-state-down")}).hover(function(){v.not("."+g+"-state-active").not("."+g+"-state-disabled").addClass(g+"-state-hover")},function(){v.removeClass(g+"-state-hover").removeClass(g+"-state-down")}),o=o.add(v)))}),s&&o.first().addClass(g+"-corner-left").end().last().addClass(g+"-corner-right").end(),o.length>1?(i=e("
    "),s&&i.addClass("fc-button-group"),i.append(o),r.append(i)):r.append(o)}),r}function a(e){p&&p.find("h2").text(e)}function l(e){p&&p.find(".fc-"+e+"-button").addClass(g+"-state-active")}function c(e){p&&p.find(".fc-"+e+"-button").removeClass(g+"-state-active")}function u(e){p&&p.find(".fc-"+e+"-button").prop("disabled",!0).addClass(g+"-state-disabled")}function d(e){p&&p.find(".fc-"+e+"-button").prop("disabled",!1).removeClass(g+"-state-disabled")}function h(){return m}var f=this;f.setToolbarOptions=i,f.render=r,f.removeElement=o,f.updateTitle=a,f.activateButton=l,f.deactivateButton=c,f.disableButton=u,f.enableButton=d,f.getViewsWithButtons=h,f.el=null;var p,g,m=[]}function Ae(n,i){function r(e){e._locale=Y}function o(){V?l()&&(f(),c()):s()}function s(){n.addClass("fc"),n.on("click.fc","a[data-goto]",function(t){var n=e(this),i=n.data("goto"),r=j.moment(i.date),o=i.type,s=X.opt("navLink"+re(o)+"Click");"function"==typeof s?s(r,t):("string"==typeof s&&(o=s),A(r,o))}),j.bindOption("theme",function(e){Z=e?"ui":"fc",n.toggleClass("ui-widget",e),n.toggleClass("fc-unthemed",!e)}),j.bindOptions(["isRTL","locale"],function(e){n.toggleClass("fc-ltr",!e),n.toggleClass("fc-rtl",e)}),V=e("
    ").prependTo(n);var t=y();U=new He(t),q=j.header=t[0],G=j.footer=t[1],x(),k(),c(j.options.defaultView),j.options.handleWindowResize&&(K=le(m,j.options.windowResizeDelay),e(window).resize(K))}function a(){X&&X.removeElement(),U.proxyCall("removeElement"),V.remove(),n.removeClass("fc fc-ltr fc-rtl fc-unthemed ui-widget"),n.off(".fc"),K&&e(window).unbind("resize",K),ot.unneeded()}function l(){return n.is(":visible")}function c(t,n){ne++;var i=X&&t&&X.type!==t;i&&(R(),u()),!X&&t&&(X=j.view=te[t]||(te[t]=j.instantiateView(t)),X.setElement(e("
    ").appendTo(V)),U.proxyCall("activateButton",t)),X&&(J=X.massageCurrentDate(J),X.isDateSet&&J>=X.intervalStart&&J=X.intervalStart&&eV&&i.push(n);return i}function o(e,t){return!V||e$}function s(e,t){return V=e,$=t,a()}function a(){return c(ee,"reset")}function l(e){return c(x(e))}function c(e,t){var n,i;for("reset"===t?ne=[]:"add"!==t&&(ne=T(ne,e)),n=0;no&&(!l[s]||c.isSame(u,l[s]))&&(s-1!==o||"."!==f[s]);s--)m=f[s]+m;for(a=o;a<=s;a++)v+=f[a],y+=p[a];return(v||y)&&(b=r?y+i+v:v+i+y),h(g+b+m)}function r(e){return w[e]||(w[e]=o(e))}function o(e){var t=s(e);return{fakeFormatString:l(t),sameUnits:c(t)}}function s(e){for(var t,n=[],i=/\[([^\]]*)\]|\(([^\)]*)\)|(LTS|LT|(\w)\4*o?)|([^\w\[\(]+)/g;t=i.exec(e);)t[1]?n.push.apply(n,a(t[1])):t[2]?n.push({maybe:s(t[2])}):t[3]?n.push({token:t[3]}):t[5]&&n.push.apply(n,a(t[5]));return n}function a(e){return". "===e?["."," "]:[e]}function l(e){var t,n,i=[];for(t=0;tr.value)&&(r=i));return r?r.unit:null}Fe.formatDate=e,Fe.formatRange=n,Fe.oldMomentFormat=t,Fe.queryMostGranularFormatUnit=f;var p="\v",g="",m="",v=new RegExp(m+"([^"+m+"]*)"+m,"g"),y={t:function(e){return t(e,"a").charAt(0)},T:function(e){return t(e,"A").charAt(0)}},b={Y:{value:1,unit:"year"},M:{value:2,unit:"month"},W:{value:3,unit:"week"},w:{value:3,unit:"week"},D:{value:4,unit:"day"},d:{value:4,unit:"day"}},w={}}();var Xe=Fe.formatDate,Qe=Fe.formatRange,Ke=Fe.oldMomentFormat;Fe.Class=ue,ue.extend=function(){var e,t,n=arguments.length;for(e=0;e').addClass(n.className||"").css({top:0,left:0}).append(n.content).appendTo(n.parentEl),this.el.on("click",".fc-close",function(){t.hide()}),n.autoHide&&this.listenTo(e(document),"mousedown",this.documentMousedown)},documentMousedown:function(t){this.el&&!e(t.target).closest(this.el).length&&this.hide()},removeElement:function(){this.hide(),this.el&&(this.el.remove(),this.el=null),this.stopListeningTo(e(document),"mousedown")},position:function(){var t,n,i,r,o,s=this.options,a=this.el.offsetParent().offset(),l=this.el.outerWidth(),c=this.el.outerHeight(),u=e(window),h=d(this.el);r=s.top||0,o=void 0!==s.left?s.left:void 0!==s.right?s.right-l:0,h.is(window)||h.is(document)?(h=u,t=0,n=0):(i=h.offset(),t=i.top,n=i.left),t+=u.scrollTop(),n+=u.scrollLeft(),s.viewportConstrain!==!1&&(r=Math.min(r,t+h.outerHeight()-c-this.margin),r=Math.max(r,t+this.margin),o=Math.min(o,n+h.outerWidth()-l-this.margin),o=Math.max(o,n+this.margin)),this.el.css({top:r-a.top,left:o-a.left})},trigger:function(e){this.options[e]&&this.options[e].apply(this,Array.prototype.slice.call(arguments,1))}}),nt=Fe.CoordCache=ue.extend({els:null,forcedOffsetParentEl:null,origin:null,boundingRect:null,isHorizontal:!1,isVertical:!1,lefts:null,rights:null,tops:null,bottoms:null,constructor:function(t){this.els=e(t.els),this.isHorizontal=t.isHorizontal,this.isVertical=t.isVertical,this.forcedOffsetParentEl=t.offsetParent?e(t.offsetParent):null},build:function(){var e=this.forcedOffsetParentEl;!e&&this.els.length>0&&(e=this.els.eq(0).offsetParent()),this.origin=e?e.offset():null,this.boundingRect=this.queryBoundingRect(),this.isHorizontal&&this.buildElHorizontals(),this.isVertical&&this.buildElVerticals()},clear:function(){this.origin=null,this.boundingRect=null,this.lefts=null,this.rights=null,this.tops=null,this.bottoms=null},ensureBuilt:function(){this.origin||this.build()},buildElHorizontals:function(){var t=[],n=[];this.els.each(function(i,r){var o=e(r),s=o.offset().left,a=o.outerWidth();t.push(s),n.push(s+a)}),this.lefts=t,this.rights=n},buildElVerticals:function(){var t=[],n=[];this.els.each(function(i,r){var o=e(r),s=o.offset().top,a=o.outerHeight();t.push(s),n.push(s+a)}),this.tops=t,this.bottoms=n},getHorizontalIndex:function(e){this.ensureBuilt();var t,n=this.lefts,i=this.rights,r=n.length;for(t=0;t=n[t]&&e=n[t]&&e0&&(e=d(this.els.eq(0)),!e.is(document))?f(e):null},isPointInBounds:function(e,t){return this.isLeftInBounds(e)&&this.isTopInBounds(t)},isLeftInBounds:function(e){return!this.boundingRect||e>=this.boundingRect.left&&e=this.boundingRect.top&&e=r*r&&this.handleDistanceSurpassed(e)),this.isDragging&&this.handleDrag(n,i,e)},handleDrag:function(e,t,n){this.trigger("drag",e,t,n),this.updateAutoScroll(n)},endDrag:function(e){this.isDragging&&(this.isDragging=!1,this.handleDragEnd(e))},handleDragEnd:function(e){this.trigger("dragEnd",e)},startDelay:function(e){var t=this;this.delay?this.delayTimeoutId=setTimeout(function(){t.handleDelayEnd(e)},this.delay):this.handleDelayEnd(e)},handleDelayEnd:function(e){this.isDelayEnded=!0,this.isDistanceSurpassed&&this.startDrag(e)},handleDistanceSurpassed:function(e){this.isDistanceSurpassed=!0,this.isDelayEnded&&this.startDrag(e)},handleTouchMove:function(e){this.isDragging&&this.shouldCancelTouchScroll&&e.preventDefault(),this.handleMove(e)},handleMouseMove:function(e){this.handleMove(e)},handleTouchScroll:function(e){this.isDragging&&!this.scrollAlwaysKills||this.endInteraction(e,!0)},trigger:function(e){this.options[e]&&this.options[e].apply(this,Array.prototype.slice.call(arguments,1)),this["_"+e]&&this["_"+e].apply(this,Array.prototype.slice.call(arguments,1))}});it.mixin({isAutoScroll:!1,scrollBounds:null,scrollTopVel:null,scrollLeftVel:null,scrollIntervalId:null,scrollSensitivity:30,scrollSpeed:200,scrollIntervalMs:50,initAutoScroll:function(){var e=this.scrollEl;this.isAutoScroll=this.options.scroll&&e&&!e.is(window)&&!e.is(document),this.isAutoScroll&&this.listenTo(e,"scroll",le(this.handleDebouncedScroll,100))},destroyAutoScroll:function(){this.endAutoScroll(),this.isAutoScroll&&this.stopListeningTo(this.scrollEl,"scroll")},computeScrollBounds:function(){this.isAutoScroll&&(this.scrollBounds=h(this.scrollEl))},updateAutoScroll:function(e){var t,n,i,r,o=this.scrollSensitivity,s=this.scrollBounds,a=0,l=0;s&&(t=(o-(k(e)-s.top))/o,n=(o-(s.bottom-k(e)))/o,i=(o-(x(e)-s.left))/o,r=(o-(s.right-x(e)))/o,t>=0&&t<=1?a=t*this.scrollSpeed*-1:n>=0&&n<=1&&(a=n*this.scrollSpeed),i>=0&&i<=1?l=i*this.scrollSpeed*-1:r>=0&&r<=1&&(l=r*this.scrollSpeed)),this.setScrollVel(a,l)},setScrollVel:function(e,t){this.scrollTopVel=e,this.scrollLeftVel=t,this.constrainScrollVel(),!this.scrollTopVel&&!this.scrollLeftVel||this.scrollIntervalId||(this.scrollIntervalId=setInterval(ae(this,"scrollIntervalFunc"),this.scrollIntervalMs))},constrainScrollVel:function(){var e=this.scrollEl;this.scrollTopVel<0?e.scrollTop()<=0&&(this.scrollTopVel=0):this.scrollTopVel>0&&e.scrollTop()+e[0].clientHeight>=e[0].scrollHeight&&(this.scrollTopVel=0),this.scrollLeftVel<0?e.scrollLeft()<=0&&(this.scrollLeftVel=0):this.scrollLeftVel>0&&e.scrollLeft()+e[0].clientWidth>=e[0].scrollWidth&&(this.scrollLeftVel=0)},scrollIntervalFunc:function(){var e=this.scrollEl,t=this.scrollIntervalMs/1e3;this.scrollTopVel&&e.scrollTop(e.scrollTop()+this.scrollTopVel*t),this.scrollLeftVel&&e.scrollLeft(e.scrollLeft()+this.scrollLeftVel*t),this.constrainScrollVel(),this.scrollTopVel||this.scrollLeftVel||this.endAutoScroll()},endAutoScroll:function(){this.scrollIntervalId&&(clearInterval(this.scrollIntervalId),this.scrollIntervalId=null,this.handleScrollEnd())},handleDebouncedScroll:function(){this.scrollIntervalId||this.handleScrollEnd()},handleScrollEnd:function(){}});var rt=it.extend({component:null,origHit:null,hit:null,coordAdjust:null,constructor:function(e,t){it.call(this,t),this.component=e},handleInteractionStart:function(e){var t,n,i,r=this.subjectEl;this.component.hitsNeeded(),this.computeScrollBounds(),e?(n={left:x(e),top:k(e)},i=n,r&&(t=h(r),i=L(i,t)),this.origHit=this.queryHit(i.left,i.top),r&&this.options.subjectCenter&&(this.origHit&&(t=_(this.origHit,t)||t),i=D(t)),this.coordAdjust=M(i,n)):(this.origHit=null,this.coordAdjust=null),it.prototype.handleInteractionStart.apply(this,arguments)},handleDragStart:function(e){var t;it.prototype.handleDragStart.apply(this,arguments),t=this.queryHit(x(e),k(e)),t&&this.handleHitOver(t)},handleDrag:function(e,t,n){var i;it.prototype.handleDrag.apply(this,arguments),i=this.queryHit(x(n),k(n)),ge(i,this.hit)||(this.hit&&this.handleHitOut(),i&&this.handleHitOver(i))},handleDragEnd:function(){this.handleHitDone(),it.prototype.handleDragEnd.apply(this,arguments)},handleHitOver:function(e){var t=ge(e,this.origHit);this.hit=e,this.trigger("hitOver",this.hit,t,this.origHit)},handleHitOut:function(){this.hit&&(this.trigger("hitOut",this.hit),this.handleHitDone(),this.hit=null)},handleHitDone:function(){this.hit&&this.trigger("hitDone",this.hit)},handleInteractionEnd:function(){it.prototype.handleInteractionEnd.apply(this,arguments),this.origHit=null,this.hit=null,this.component.hitsNotNeeded()},handleScrollEnd:function(){it.prototype.handleScrollEnd.apply(this,arguments),this.isDragging&&(this.component.releaseHits(),this.component.prepareHits())},queryHit:function(e,t){return this.coordAdjust&&(e+=this.coordAdjust.left,t+=this.coordAdjust.top),this.component.queryHit(e,t)}});Fe.touchMouseIgnoreWait=500;var ot=ue.extend(et,Je,{isTouching:!1,mouseIgnoreDepth:0,handleScrollProxy:null,bind:function(){var t=this;this.listenTo(e(document),{touchstart:this.handleTouchStart,touchcancel:this.handleTouchCancel,touchend:this.handleTouchEnd,mousedown:this.handleMouseDown,mousemove:this.handleMouseMove,mouseup:this.handleMouseUp,click:this.handleClick,selectstart:this.handleSelectStart,contextmenu:this.handleContextMenu}),window.addEventListener("touchmove",this.handleTouchMoveProxy=function(n){t.handleTouchMove(e.Event(n))},{passive:!1}),window.addEventListener("scroll",this.handleScrollProxy=function(n){t.handleScroll(e.Event(n))},!0)},unbind:function(){this.stopListeningTo(e(document)),window.removeEventListener("touchmove",this.handleTouchMoveProxy),window.removeEventListener("scroll",this.handleScrollProxy,!0)},handleTouchStart:function(e){this.stopTouch(e,!0),this.isTouching=!0,this.trigger("touchstart",e)},handleTouchMove:function(e){this.isTouching&&this.trigger("touchmove",e)},handleTouchCancel:function(e){this.isTouching&&(this.trigger("touchcancel",e),this.stopTouch(e))},handleTouchEnd:function(e){this.stopTouch(e)},handleMouseDown:function(e){this.shouldIgnoreMouse()||this.trigger("mousedown",e)},handleMouseMove:function(e){this.shouldIgnoreMouse()||this.trigger("mousemove",e)},handleMouseUp:function(e){this.shouldIgnoreMouse()||this.trigger("mouseup",e)},handleClick:function(e){this.shouldIgnoreMouse()||this.trigger("click",e)},handleSelectStart:function(e){this.trigger("selectstart",e)},handleContextMenu:function(e){this.trigger("contextmenu",e)},handleScroll:function(e){this.trigger("scroll",e)},stopTouch:function(e,t){this.isTouching&&(this.isTouching=!1,this.trigger("touchend",e),t||this.startTouchMouseIgnore()); -},startTouchMouseIgnore:function(){var e=this,t=Fe.touchMouseIgnoreWait;t&&(this.mouseIgnoreDepth++,setTimeout(function(){e.mouseIgnoreDepth--},t))},shouldIgnoreMouse:function(){return this.isTouching||Boolean(this.mouseIgnoreDepth)}});!function(){var e=null,t=0;ot.get=function(){return e||(e=new ot,e.bind()),e},ot.needed=function(){ot.get(),t++},ot.unneeded=function(){t--,t||(e.unbind(),e=null)}}();var st=ue.extend(et,{options:null,sourceEl:null,el:null,parentEl:null,top0:null,left0:null,y0:null,x0:null,topDelta:null,leftDelta:null,isFollowing:!1,isHidden:!1,isAnimating:!1,constructor:function(t,n){this.options=n=n||{},this.sourceEl=t,this.parentEl=n.parentEl?e(n.parentEl):t.parent()},start:function(t){this.isFollowing||(this.isFollowing=!0,this.y0=k(t),this.x0=x(t),this.topDelta=0,this.leftDelta=0,this.isHidden||this.updatePosition(),S(t)?this.listenTo(e(document),"touchmove",this.handleMove):this.listenTo(e(document),"mousemove",this.handleMove))},stop:function(t,n){function i(){r.isAnimating=!1,r.removeElement(),r.top0=r.left0=null,n&&n()}var r=this,o=this.options.revertDuration;this.isFollowing&&!this.isAnimating&&(this.isFollowing=!1,this.stopListeningTo(e(document)),t&&o&&!this.isHidden?(this.isAnimating=!0,this.el.animate({top:this.top0,left:this.left0},{duration:o,complete:i})):i())},getEl:function(){var e=this.el;return e||(e=this.el=this.sourceEl.clone().addClass(this.options.additionalClass||"").css({position:"absolute",visibility:"",display:this.isHidden?"none":"",margin:0,right:"auto",bottom:"auto",width:this.sourceEl.width(),height:this.sourceEl.height(),opacity:this.options.opacity||"",zIndex:this.options.zIndex}),e.addClass("fc-unselectable"),e.appendTo(this.parentEl)),e},removeElement:function(){this.el&&(this.el.remove(),this.el=null)},updatePosition:function(){var e,t;this.getEl(),null===this.top0&&(e=this.sourceEl.offset(),t=this.el.offsetParent().offset(),this.top0=e.top-t.top,this.left0=e.left-t.left),this.el.css({top:this.top0+this.topDelta,left:this.left0+this.leftDelta})},handleMove:function(e){this.topDelta=k(e)-this.y0,this.leftDelta=x(e)-this.x0,this.isHidden||this.updatePosition()},hide:function(){this.isHidden||(this.isHidden=!0,this.el&&this.el.hide())},show:function(){this.isHidden&&(this.isHidden=!1,this.updatePosition(),this.getEl().show())}}),at=Fe.Grid=ue.extend(et,{hasDayInteractions:!0,view:null,isRTL:null,start:null,end:null,el:null,elsByFill:null,eventTimeFormat:null,displayEventTime:null,displayEventEnd:null,minResizeDuration:null,largeUnit:null,dayClickListener:null,daySelectListener:null,segDragListener:null,segResizeListener:null,externalDragListener:null,constructor:function(e){this.view=e,this.isRTL=e.opt("isRTL"),this.elsByFill={},this.dayClickListener=this.buildDayClickListener(),this.daySelectListener=this.buildDaySelectListener()},computeEventTimeFormat:function(){return this.view.opt("smallTimeFormat")},computeDisplayEventTime:function(){return!0},computeDisplayEventEnd:function(){return!0},setRange:function(e){this.start=e.start.clone(),this.end=e.end.clone(),this.rangeUpdated(),this.processRangeOptions()},rangeUpdated:function(){},processRangeOptions:function(){var e,t,n=this.view;this.eventTimeFormat=n.opt("eventTimeFormat")||n.opt("timeFormat")||this.computeEventTimeFormat(),e=n.opt("displayEventTime"),null==e&&(e=this.computeDisplayEventTime()),t=n.opt("displayEventEnd"),null==t&&(t=this.computeDisplayEventEnd()),this.displayEventTime=e,this.displayEventEnd=t},spanToSegs:function(e){},diffDates:function(e,t){return this.largeUnit?F(e,t,this.largeUnit):I(e,t)},hitsNeededDepth:0,hitsNeeded:function(){this.hitsNeededDepth++||this.prepareHits()},hitsNotNeeded:function(){this.hitsNeededDepth&&!--this.hitsNeededDepth&&this.releaseHits()},prepareHits:function(){},releaseHits:function(){},queryHit:function(e,t){},getHitSpan:function(e){},getHitEl:function(e){},setElement:function(e){this.el=e,this.hasDayInteractions&&(C(e),this.bindDayHandler("touchstart",this.dayTouchStart),this.bindDayHandler("mousedown",this.dayMousedown)),this.bindSegHandlers(),this.bindGlobalHandlers()},bindDayHandler:function(t,n){var i=this;this.el.on(t,function(t){if(!e(t.target).is(i.segSelector+","+i.segSelector+" *,.fc-more,a[data-goto]"))return n.call(i,t)})},removeElement:function(){this.unbindGlobalHandlers(),this.clearDragListeners(),this.el.remove()},renderSkeleton:function(){},renderDates:function(){},unrenderDates:function(){},bindGlobalHandlers:function(){this.listenTo(e(document),{dragstart:this.externalDragStart,sortstart:this.externalDragStart})},unbindGlobalHandlers:function(){this.stopListeningTo(e(document))},dayMousedown:function(e){var t=this.view;t.isSelected||t.selectedEvent||(this.dayClickListener.startInteraction(e),t.opt("selectable")&&this.daySelectListener.startInteraction(e,{distance:t.opt("selectMinDistance")}))},dayTouchStart:function(e){var t,n=this.view;n.isSelected||n.selectedEvent||(t=n.opt("selectLongPressDelay"),null==t&&(t=n.opt("longPressDelay")),this.dayClickListener.startInteraction(e),n.opt("selectable")&&this.daySelectListener.startInteraction(e,{delay:t}))},buildDayClickListener:function(){var e,t=this,n=this.view,i=new rt(this,{scroll:n.opt("dragScroll"),interactionStart:function(){e=i.origHit},hitOver:function(t,n,i){n||(e=null)},hitOut:function(){e=null},interactionEnd:function(i,r){!r&&e&&n.triggerDayClick(t.getHitSpan(e),t.getHitEl(e),i)}});return i.shouldCancelTouchScroll=!1,i.scrollAlwaysKills=!0,i},buildDaySelectListener:function(){var e,t=this,n=this.view,i=new rt(this,{scroll:n.opt("dragScroll"),interactionStart:function(){e=null},dragStart:function(){n.unselect()},hitOver:function(n,i,r){r&&(e=t.computeSelection(t.getHitSpan(r),t.getHitSpan(n)),e?t.renderSelection(e):e===!1&&o())},hitOut:function(){e=null,t.unrenderSelection()},hitDone:function(){s()},interactionEnd:function(t,i){!i&&e&&n.reportSelection(e,t)}});return i},clearDragListeners:function(){this.dayClickListener.endInteraction(),this.daySelectListener.endInteraction(),this.segDragListener&&this.segDragListener.endInteraction(),this.segResizeListener&&this.segResizeListener.endInteraction(),this.externalDragListener&&this.externalDragListener.endInteraction()},renderEventLocationHelper:function(e,t){var n=this.fabricateHelperEvent(e,t);return this.renderHelper(n,t)},fabricateHelperEvent:function(e,t){var n=t?$(t.event):{};return n.start=e.start.clone(),n.end=e.end?e.end.clone():null,n.allDay=null,this.view.calendar.normalizeEventDates(n),n.className=(n.className||[]).concat("fc-helper"),t||(n.editable=!1),n},renderHelper:function(e,t){},unrenderHelper:function(){},renderSelection:function(e){this.renderHighlight(e)},unrenderSelection:function(){this.unrenderHighlight()},computeSelection:function(e,t){var n=this.computeSelectionSpan(e,t);return!(n&&!this.view.calendar.isSelectionSpanAllowed(n))&&n},computeSelectionSpan:function(e,t){var n=[e.start,e.end,t.start,t.end];return n.sort(oe),{start:n[0].clone(),end:n[3].clone()}},renderHighlight:function(e){this.renderFill("highlight",this.spanToSegs(e))},unrenderHighlight:function(){this.unrenderFill("highlight")},highlightSegClasses:function(){return["fc-highlight"]},renderBusinessHours:function(){},unrenderBusinessHours:function(){},getNowIndicatorUnit:function(){},renderNowIndicator:function(e){},unrenderNowIndicator:function(){},renderFill:function(e,t){},unrenderFill:function(e){var t=this.elsByFill[e];t&&(t.remove(),delete this.elsByFill[e])},renderFillSegEls:function(t,n){var i,r=this,o=this[t+"SegEl"],s="",a=[];if(n.length){for(i=0;i"},getDayClasses:function(e,t){var n=this.view,i=n.calendar.getNow(),r=["fc-"+je[e.day()]];return 1==n.intervalDuration.as("months")&&e.month()!=n.intervalStart.month()&&r.push("fc-other-month"),e.isSame(i,"day")?(r.push("fc-today"),t!==!0&&r.push(n.highlightStateClass)):e *",mousedOverSeg:null,isDraggingSeg:!1,isResizingSeg:!1,isDraggingExternal:!1,segs:null,renderEvents:function(e){var t,n=[],i=[];for(t=0;ta&&s.push({start:a,end:n.start}),a=n.end;return a=t.length?t[t.length-1]+1:t[n]},computeColHeadFormat:function(){return this.rowCnt>1||this.colCnt>10?"ddd":this.colCnt>1?this.view.opt("dayOfMonthFormat"):"dddd"},sliceRangeByRow:function(e){var t,n,i,r,o,s=this.daysPerRow,a=this.view.computeDayRange(e),l=this.getDateDayIndex(a.start),c=this.getDateDayIndex(a.end.clone().subtract(1,"days")),u=[];for(t=0;t'+this.renderHeadTrHtml()+"
    "},renderHeadIntroHtml:function(){return this.renderIntroHtml()},renderHeadTrHtml:function(){return""+(this.isRTL?"":this.renderHeadIntroHtml())+this.renderHeadDateCellsHtml()+(this.isRTL?this.renderHeadIntroHtml():"")+""},renderHeadDateCellsHtml:function(){var e,t,n=[];for(e=0;e1?' colspan="'+t+'"':"")+(n?" "+n:"")+">"+i.buildGotoAnchorHtml({date:e,forceOff:this.rowCnt>1||1===this.colCnt},ee(e.format(this.colHeadFormat)))+""},renderBgTrHtml:function(e){return""+(this.isRTL?"":this.renderBgIntroHtml(e))+this.renderBgCellsHtml(e)+(this.isRTL?this.renderBgIntroHtml(e):"")+""},renderBgIntroHtml:function(e){return this.renderIntroHtml()},renderBgCellsHtml:function(e){var t,n,i=[];for(t=0;t"},renderIntroHtml:function(){},bookendCells:function(e){var t=this.renderIntroHtml();t&&(this.isRTL?e.append(t):e.prepend(t))}},ct=Fe.DayGrid=at.extend(lt,{numbersVisible:!1,bottomCoordPadding:0,rowEls:null,cellEls:null,helperEls:null,rowCoordCache:null,colCoordCache:null,renderDates:function(e){var t,n,i=this.view,r=this.rowCnt,o=this.colCnt,s="";for(t=0;t
    '+this.renderBgTrHtml(e)+'
    '+(this.numbersVisible?""+this.renderNumberTrHtml(e)+"":"")+"
    "},renderNumberTrHtml:function(e){return""+(this.isRTL?"":this.renderNumberIntroHtml(e))+this.renderNumberCellsHtml(e)+(this.isRTL?this.renderNumberIntroHtml(e):"")+""},renderNumberIntroHtml:function(e){return this.renderIntroHtml()},renderNumberCellsHtml:function(e){var t,n,i=[];for(t=0;t',this.view.cellWeekNumbersVisible&&e.day()==n&&(i+=this.view.buildGotoAnchorHtml({date:e,type:"week"},{class:"fc-week-number"},e.format("w"))),this.view.dayNumbersVisible&&(i+=this.view.buildGotoAnchorHtml(e,{class:"fc-day-number"},e.date())),i+=""):""},computeEventTimeFormat:function(){return this.view.opt("extraSmallTimeFormat")},computeDisplayEventEnd:function(){return 1==this.colCnt},rangeUpdated:function(){this.updateDayTable()},spanToSegs:function(e){var t,n,i=this.sliceRangeByRow(e);for(t=0;t');s=n&&n.row===t?n.el.position().top:a.find(".fc-content-skeleton tbody").position().top,l.css("top",s).find("table").append(i[t].tbodyEl),a.append(l),r.push(l[0])}),this.helperEls=e(r)},unrenderHelper:function(){this.helperEls&&(this.helperEls.remove(),this.helperEls=null)},fillSegTag:"td",renderFill:function(t,n,i){var r,o,s,a=[];for(n=this.renderFillSegEls(t,n),r=0;r
    '),o=r.find("tr"),a>0&&o.append(''),o.append(n.el.attr("colspan",l-a)),l'),this.bookendCells(o),r}});ct.mixin({rowStructs:null,unrenderEvents:function(){this.removeSegPopover(),at.prototype.unrenderEvents.apply(this,arguments)},getEventSegs:function(){return at.prototype.getEventSegs.call(this).concat(this.popoverSegs||[])},renderBgSegs:function(t){var n=e.grep(t,function(e){return e.event.allDay});return at.prototype.renderBgSegs.call(this,n)},renderFgSegs:function(t){var n;return t=this.renderFgSegEls(t),n=this.rowStructs=this.renderSegRows(t),this.rowEls.each(function(t,i){e(i).find(".fc-content-skeleton > table").append(n[t].tbodyEl)}),t},unrenderFgSegs:function(){for(var e,t=this.rowStructs||[];e=t.pop();)e.tbodyEl.remove();this.rowStructs=null},renderSegRows:function(e){var t,n,i=[];for(t=this.groupSegRows(e),n=0;n'+ee(n)+"")),i=''+(ee(o.title||"")||" ")+"",'
    '+(this.isRTL?i+" "+d:d+" "+i)+"
    "+(a?'
    ':"")+(l?'
    ':"")+""},renderSegRow:function(t,n){function i(t){for(;s"),a.append(u)),m[r][s]=u,v[r][s]=u,s++}var r,o,s,a,l,c,u,d=this.colCnt,h=this.buildSegLevels(n),f=Math.max(1,h.length),p=e(""),g=[],m=[],v=[];for(r=0;r"),g.push([]),m.push([]),v.push([]),o)for(l=0;l').append(c.el),c.leftCol!=c.rightCol?u.attr("colspan",c.rightCol-c.leftCol+1):v[r][s]=u;s<=c.rightCol;)m[r][s]=u,g[r][s]=c,s++;a.append(u)}i(d),this.bookendCells(a),p.append(a)}return{row:t,tbodyEl:p,cellMatrix:m,segMatrix:g,segLevels:h,segs:n}},buildSegLevels:function(e){var t,n,i,r=[];for(this.sortEventSegs(e),t=0;t td > :first-child").each(n),r.position().top+o>a)return i;return!1},limitRow:function(t,n){ -function i(i){for(;k").append(y),h.append(v),x.push(v[0])),k++}var r,o,s,a,l,c,u,d,h,f,p,g,m,v,y,b=this,w=this.rowStructs[t],x=[],k=0;if(n&&n').attr("rowspan",f),c=d[g],y=this.renderMoreLink(t,l.leftCol+g,[l].concat(c)),v=e("
    ").append(y),m.append(v),p.push(m[0]),x.push(m[0]);h.addClass("fc-limited").after(e(p)),s.push(h[0])}}i(this.colCnt),w.moreEls=e(x),w.limitedEls=e(s)}},unlimitRow:function(e){var t=this.rowStructs[e];t.moreEls&&(t.moreEls.remove(),t.moreEls=null),t.limitedEls&&(t.limitedEls.removeClass("fc-limited"),t.limitedEls=null)},renderMoreLink:function(t,n,i){var r=this,o=this.view;return e('').text(this.getMoreLinkText(i.length)).on("click",function(s){var a=o.opt("eventLimitClick"),l=r.getCellDate(t,n),c=e(this),u=r.getCellEl(t,n),d=r.getCellSegs(t,n),h=r.resliceDaySegs(d,l),f=r.resliceDaySegs(i,l);"function"==typeof a&&(a=o.publiclyTrigger("eventLimitClick",null,{date:l,dayEl:u,moreEl:c,segs:h,hiddenSegs:f},s)),"popover"===a?r.showSegPopover(t,n,c,h):"string"==typeof a&&o.calendar.zoomTo(l,a)})},showSegPopover:function(e,t,n,i){var r,o,s=this,a=this.view,l=n.parent();r=1==this.rowCnt?a.el:this.rowEls.eq(e),o={className:"fc-more-popover",content:this.renderSegPopoverContent(e,t,i),parentEl:this.view.el,top:r.offset().top,autoHide:!0,viewportConstrain:a.opt("popoverViewportConstrain"),hide:function(){if(s.popoverSegs)for(var e,t=0;t'+ee(a)+'
    '),c=l.find(".fc-event-container");for(i=this.renderFgSegEls(i,!0),this.popoverSegs=i,r=0;r'+this.renderBgTrHtml(0)+'
    "},renderSlatRowHtml:function(){for(var e,n,i,r=this.view,o=this.isRTL,s="",a=t.duration(+this.minTime);a"+(n?""+ee(e.format(this.labelFormat))+"":"")+"",s+='"+(o?"":i)+''+(o?i:"")+"",a.add(this.slotDuration);return s},processOptions:function(){var n,i=this.view,r=i.opt("slotDuration"),o=i.opt("snapDuration");r=t.duration(r),o=o?t.duration(o):r,this.slotDuration=r,this.snapDuration=o,this.snapsPerSlot=r/o,this.minResizeDuration=o,this.minTime=t.duration(i.opt("minTime")),this.maxTime=t.duration(i.opt("maxTime")),n=i.opt("slotLabelFormat"),e.isArray(n)&&(n=n[n.length-1]),this.labelFormat=n||i.opt("smallTimeFormat"),n=i.opt("slotLabelInterval"),this.labelInterval=n?t.duration(n):this.computeLabelInterval(r)},computeLabelInterval:function(e){var n,i,r;for(n=Lt.length-1;n>=0;n--)if(i=t.duration(Lt[n]),r=j(i,e),se(r)&&r>1)return i;return t.duration(e)},computeEventTimeFormat:function(){return this.view.opt("noMeridiemTimeFormat")},computeDisplayEventEnd:function(){return!0},prepareHits:function(){this.colCoordCache.build(),this.slatCoordCache.build()},releaseHits:function(){this.colCoordCache.clear()},queryHit:function(e,t){var n=this.snapsPerSlot,i=this.colCoordCache,r=this.slatCoordCache;if(i.isLeftInBounds(e)&&r.isTopInBounds(t)){var o=i.getHorizontalIndex(e),s=r.getVerticalIndex(t);if(null!=o&&null!=s){var a=r.getTopOffset(s),l=r.getHeight(s),c=(t-a)/l,u=Math.floor(c*n),d=s*n+u,h=a+u/n*l,f=a+(u+1)/n*l;return{col:o,snap:d,component:this,left:i.getLeftOffset(o),right:i.getRightOffset(o),top:h,bottom:f}}}},getHitSpan:function(e){var t,n=this.getCellDate(0,e.col),i=this.computeSnapTime(e.snap);return n.time(i),t=n.clone().add(this.snapDuration),{start:n,end:t}},getHitEl:function(e){return this.colEls.eq(e.col)},rangeUpdated:function(){this.updateDayTable()},computeSnapTime:function(e){return t.duration(this.minTime+this.snapDuration*e)},spanToSegs:function(e){var t,n=this.sliceRangeByTimes(e);for(t=0;t
    ').css("top",r).appendTo(this.colContainerEls.eq(i[n].col))[0]);i.length>0&&o.push(e('
    ').css("top",r).appendTo(this.el.find(".fc-content-skeleton"))[0]),this.nowIndicatorEls=e(o)},unrenderNowIndicator:function(){this.nowIndicatorEls&&(this.nowIndicatorEls.remove(),this.nowIndicatorEls=null)},renderSelection:function(e){this.view.opt("selectHelper")?this.renderEventLocationHelper(e):this.renderHighlight(e)},unrenderSelection:function(){this.unrenderHelper(),this.unrenderHighlight()},renderHighlight:function(e){this.renderHighlightSegs(this.spanToSegs(e))},unrenderHighlight:function(){this.unrenderHighlightSegs()}});ut.mixin({colContainerEls:null,fgContainerEls:null,bgContainerEls:null,helperContainerEls:null,highlightContainerEls:null,businessContainerEls:null,fgSegs:null,bgSegs:null,helperSegs:null,highlightSegs:null,businessSegs:null,renderContentSkeleton:function(){var t,n,i="";for(t=0;t
    ';n=e('
    '+i+"
    "),this.colContainerEls=n.find(".fc-content-col"),this.helperContainerEls=n.find(".fc-helper-container"),this.fgContainerEls=n.find(".fc-event-container:not(.fc-helper-container)"),this.bgContainerEls=n.find(".fc-bgevent-container"),this.highlightContainerEls=n.find(".fc-highlight-container"),this.businessContainerEls=n.find(".fc-business-container"),this.bookendCells(n.find("tr")),this.el.append(n)},renderFgSegs:function(e){return e=this.renderFgSegsIntoContainers(e,this.fgContainerEls),this.fgSegs=e,e},unrenderFgSegs:function(){this.unrenderNamedSegs("fgSegs")},renderHelperSegs:function(t,n){var i,r,o,s=[];for(t=this.renderFgSegsIntoContainers(t,this.helperContainerEls),i=0;i
    '+(n?'
    '+ee(n)+"
    ":"")+(s.title?'
    '+ee(s.title)+"
    ":"")+'
    '+(c?'
    ':"")+""},updateSegVerticals:function(e){this.computeSegVerticals(e),this.assignSegVerticals(e)},computeSegVerticals:function(e){var t,n;for(t=0;t1?"ll":"LL"},formatRange:function(e,t,n){var i=e.end;return i.hasTime()||(i=i.clone().subtract(1)),Qe(e.start,i,t,n,this.opt("isRTL"))},getAllDayHtml:function(){return this.opt("allDayHtml")||ee(this.opt("allDayText"))},buildGotoAnchorHtml:function(t,n,i){var r,o,s,a;return e.isPlainObject(t)?(r=t.date,o=t.type,s=t.forceOff):r=t,r=Fe.moment(r),a={date:r.format("YYYY-MM-DD"),type:o||"day"},"string"==typeof n&&(i=n,n=null),n=n?" "+ie(n):"",i=i||"",!s&&this.opt("navLinks")?"'+i+"":""+i+""},setElement:function(e){this.el=e,this.bindGlobalHandlers(),this.renderSkeleton()},removeElement:function(){this.unsetDate(),this.unrenderSkeleton(),this.unbindGlobalHandlers(),this.el.remove()},renderSkeleton:function(){},unrenderSkeleton:function(){},setDate:function(e){var t=this.isDateSet;this.isDateSet=!0,this.handleDate(e,t),this.trigger(t?"dateReset":"dateSet",e)},unsetDate:function(){this.isDateSet&&(this.isDateSet=!1,this.handleDateUnset(),this.trigger("dateUnset"))},handleDate:function(e,t){var n=this;this.unbindEvents(),this.requestDateRender(e).then(function(){n.bindEvents()})},handleDateUnset:function(){this.unbindEvents(),this.requestDateUnrender()},requestDateRender:function(e){var t=this;return this.dateRenderQueue.add(function(){return t.executeDateRender(e)})},requestDateUnrender:function(){var e=this;return this.dateRenderQueue.add(function(){return e.executeDateUnrender()})},executeDateRender:function(e){var t=this;return e?this.captureInitialScroll():this.captureScroll(),this.freezeHeight(),this.executeDateUnrender().then(function(){e&&t.setRange(t.computeRange(e)),t.render&&t.render(),t.renderDates(),t.updateSize(),t.renderBusinessHours(),t.startNowIndicator(),t.thawHeight(),t.releaseScroll(),t.isDateRendered=!0,t.onDateRender(),t.trigger("dateRender")})},executeDateUnrender:function(){var e=this;return e.isDateRendered?this.requestEventsUnrender().then(function(){e.unselect(),e.stopNowIndicator(),e.triggerUnrender(),e.unrenderBusinessHours(),e.unrenderDates(),e.destroy&&e.destroy(),e.isDateRendered=!1,e.trigger("dateUnrender")}):fe.resolve()},onDateRender:function(){this.triggerRender()},renderDates:function(){},unrenderDates:function(){},triggerRender:function(){this.publiclyTrigger("viewRender",this,this,this.el)},triggerUnrender:function(){this.publiclyTrigger("viewDestroy",this,this,this.el)},bindGlobalHandlers:function(){this.listenTo(ot.get(),{touchstart:this.processUnselect,mousedown:this.handleDocumentMousedown})},unbindGlobalHandlers:function(){this.stopListeningTo(ot.get())},initThemingProps:function(){var e=this.opt("theme")?"ui":"fc";this.widgetHeaderClass=e+"-widget-header",this.widgetContentClass=e+"-widget-content",this.highlightStateClass=e+"-state-highlight"},renderBusinessHours:function(){},unrenderBusinessHours:function(){},startNowIndicator:function(){var e,n,i,r=this;this.opt("nowIndicator")&&(e=this.getNowIndicatorUnit(),e&&(n=ae(this,"updateNowIndicator"),this.initialNowDate=this.calendar.getNow(),this.initialNowQueriedMs=+new Date,this.renderNowIndicator(this.initialNowDate),this.isNowIndicatorRendered=!0,i=this.initialNowDate.clone().startOf(e).add(1,e)-this.initialNowDate,this.nowIndicatorTimeoutID=setTimeout(function(){r.nowIndicatorTimeoutID=null,n(),i=+t.duration(1,e),i=Math.max(100,i),r.nowIndicatorIntervalID=setInterval(n,i)},i)))},updateNowIndicator:function(){this.isNowIndicatorRendered&&(this.unrenderNowIndicator(),this.renderNowIndicator(this.initialNowDate.clone().add(new Date-this.initialNowQueriedMs)))},stopNowIndicator:function(){this.isNowIndicatorRendered&&(this.nowIndicatorTimeoutID&&(clearTimeout(this.nowIndicatorTimeoutID),this.nowIndicatorTimeoutID=null),this.nowIndicatorIntervalID&&(clearTimeout(this.nowIndicatorIntervalID),this.nowIndicatorIntervalID=null),this.unrenderNowIndicator(),this.isNowIndicatorRendered=!1)},getNowIndicatorUnit:function(){},renderNowIndicator:function(e){},unrenderNowIndicator:function(){},updateSize:function(e){e&&this.captureScroll(),this.updateHeight(e),this.updateWidth(e),this.updateNowIndicator(),e&&this.releaseScroll()},updateWidth:function(e){},updateHeight:function(e){var t=this.calendar;this.setHeight(t.getSuggestedViewHeight(),t.isHeightAuto())},setHeight:function(e,t){},capturedScroll:null,capturedScrollDepth:0,captureScroll:function(){return!this.capturedScrollDepth++&&(this.capturedScroll=this.isDateRendered?this.queryScroll():{},!0)},captureInitialScroll:function(t){this.captureScroll()&&(this.capturedScroll.isInitial=!0,t?e.extend(this.capturedScroll,t):this.capturedScroll.isComputed=!0)},releaseScroll:function(){var t=this.capturedScroll,n=this.discardScroll();t.isComputed&&(n?e.extend(t,this.computeInitialScroll()):t=null),t&&(t.isInitial?this.hardSetScroll(t):this.setScroll(t))},discardScroll:function(){return!--this.capturedScrollDepth&&(this.capturedScroll=null,!0)},computeInitialScroll:function(){return{}},queryScroll:function(){return{}},hardSetScroll:function(e){var t=this,n=function(){t.setScroll(e)};n(),setTimeout(n,0)},setScroll:function(e){},freezeHeight:function(){this.calendar.freezeContentHeight()},thawHeight:function(){this.calendar.thawContentHeight()},bindEvents:function(){var e=this;this.isEventsBound||(this.isEventsBound=!0,this.rejectOn("eventsUnbind",this.requestEvents()).then(function(t){e.listenTo(e.calendar,"eventsReset",e.setEvents),e.setEvents(t)}))},unbindEvents:function(){this.isEventsBound&&(this.isEventsBound=!1,this.stopListeningTo(this.calendar,"eventsReset"),this.unsetEvents(),this.trigger("eventsUnbind"))},setEvents:function(e){var t=this.isEventSet;this.isEventsSet=!0,this.handleEvents(e,t),this.trigger(t?"eventsReset":"eventsSet",e)},unsetEvents:function(){this.isEventsSet&&(this.isEventsSet=!1,this.handleEventsUnset(),this.trigger("eventsUnset"))},whenEventsSet:function(){var e=this;return this.isEventsSet?fe.resolve(this.getCurrentEvents()):new fe(function(t){e.one("eventsSet",t)})},handleEvents:function(e,t){this.requestEventsRender(e)},handleEventsUnset:function(){this.requestEventsUnrender()},requestEventsRender:function(e){var t=this;return this.eventRenderQueue.add(function(){return t.executeEventsRender(e)})},requestEventsUnrender:function(){var e=this;return this.isEventsRendered?this.eventRenderQueue.addQuickly(function(){return e.executeEventsUnrender()}):fe.resolve()},requestCurrentEventsRender:function(){return this.isEventsSet?void this.requestEventsRender(this.getCurrentEvents()):fe.reject()},executeEventsRender:function(e){var t=this;return this.captureScroll(),this.freezeHeight(),this.executeEventsUnrender().then(function(){t.renderEvents(e),t.thawHeight(),t.releaseScroll(),t.isEventsRendered=!0,t.onEventsRender(),t.trigger("eventsRender")})},executeEventsUnrender:function(){return this.isEventsRendered&&(this.onBeforeEventsUnrender(),this.captureScroll(),this.freezeHeight(),this.destroyEvents&&this.destroyEvents(),this.unrenderEvents(),this.thawHeight(),this.releaseScroll(),this.isEventsRendered=!1,this.trigger("eventsUnrender")),fe.resolve()},onEventsRender:function(){this.renderedEventSegEach(function(e){this.publiclyTrigger("eventAfterRender",e.event,e.event,e.el)}),this.publiclyTrigger("eventAfterAllRender")},onBeforeEventsUnrender:function(){this.renderedEventSegEach(function(e){this.publiclyTrigger("eventDestroy",e.event,e.event,e.el)})},renderEvents:function(e){},unrenderEvents:function(){},requestEvents:function(){return this.calendar.requestEvents(this.start,this.end)},getCurrentEvents:function(){return this.calendar.getPrunedEventCache()},resolveEventEl:function(t,n){var i=this.publiclyTrigger("eventRender",t,t,n);return i===!1?n=null:i&&i!==!0&&(n=e(i)),n},showEvent:function(e){this.renderedEventSegEach(function(e){e.el.css("visibility","")},e)},hideEvent:function(e){this.renderedEventSegEach(function(e){e.el.css("visibility","hidden")},e)},renderedEventSegEach:function(e,t){var n,i=this.getEventSegs();for(n=0;n=this.nextDayThreshold&&r.add(1,"days")),(!i||r<=n)&&(r=n.clone().add(1,"days")),{start:n,end:r}},isMultiDayEvent:function(e){var t=this.computeDayRange(e);return t.end.diff(t.start,"days")>1}}),ht=Fe.Scroller=ue.extend({el:null,scrollEl:null,overflowX:null,overflowY:null,constructor:function(e){e=e||{},this.overflowX=e.overflowX||e.overflow||"auto",this.overflowY=e.overflowY||e.overflow||"auto"},render:function(){this.el=this.renderEl(),this.applyOverflow()},renderEl:function(){return this.scrollEl=e('
    ')},clear:function(){this.setHeight("auto"),this.applyOverflow()},destroy:function(){this.el.remove()},applyOverflow:function(){this.scrollEl.css({"overflow-x":this.overflowX,"overflow-y":this.overflowY})},lockOverflow:function(e){var t=this.overflowX,n=this.overflowY;e=e||this.getScrollbarWidths(),"auto"===t&&(t=e.top||e.bottom||this.scrollEl[0].scrollWidth-1>this.scrollEl[0].clientWidth?"scroll":"hidden"),"auto"===n&&(n=e.left||e.right||this.scrollEl[0].scrollHeight-1>this.scrollEl[0].clientHeight?"scroll":"hidden"),this.scrollEl.css({"overflow-x":t,"overflow-y":n})},setHeight:function(e){this.scrollEl.height(e)},getScrollTop:function(){return this.scrollEl.scrollTop()},setScrollTop:function(e){this.scrollEl.scrollTop(e)},getClientWidth:function(){return this.scrollEl[0].clientWidth},getClientHeight:function(){return this.scrollEl[0].clientHeight},getScrollbarWidths:function(){return g(this.scrollEl)}});He.prototype.proxyCall=function(e){var t=Array.prototype.slice.call(arguments,1),n=[];return this.items.forEach(function(i){n.push(i[e].apply(i,t))}),n};var ft=Fe.Calendar=ue.extend({dirDefaults:null,localeDefaults:null,overrides:null,dynamicOverrides:null,options:null,viewSpecCache:null,view:null,header:null,footer:null,loadingLevel:0,constructor:Ae,initialize:function(){},populateOptionsHash:function(){var e,t,i,r;e=J(this.dynamicOverrides.locale,this.overrides.locale),t=pt[e],t||(e=ft.defaults.locale,t=pt[e]||{}),i=J(this.dynamicOverrides.isRTL,this.overrides.isRTL,t.isRTL,ft.defaults.isRTL),r=i?ft.rtlDefaults:{},this.dirDefaults=r,this.localeDefaults=t,this.options=n([ft.defaults,r,t,this.overrides,this.dynamicOverrides]),ze(this.options)},getViewSpec:function(e){var t=this.viewSpecCache;return t[e]||(t[e]=this.buildViewSpec(e))},getUnitViewSpec:function(t){var n,i,r;if(e.inArray(t,Ye)!=-1)for(n=this.header.getViewsWithButtons(),e.each(Fe.views,function(e){n.push(e)}),i=0;i=n&&t.end<=i},ft.prototype.getPeerEvents=function(e,t){var n,i,r=this.getEventCache(),o=[];for(n=0;nn};var wt={id:"_fcBusinessHours",start:"09:00",end:"17:00",dow:[1,2,3,4,5],rendering:"inverse-background"};ft.prototype.getCurrentBusinessHourEvents=function(e){return this.computeBusinessHourEvents(e,this.options.businessHours)},ft.prototype.computeBusinessHourEvents=function(t,n){return n===!0?this.expandBusinessHourEvents(t,[{}]):e.isPlainObject(n)?this.expandBusinessHourEvents(t,[n]):e.isArray(n)?this.expandBusinessHourEvents(t,n,!0):[]},ft.prototype.expandBusinessHourEvents=function(t,n,i){var r,o,s=this.getView(),a=[];for(r=0;r1,this.opt("weekNumbers")&&(this.opt("weekNumbersWithinDays")?(this.cellWeekNumbersVisible=!0,this.colWeekNumbersVisible=!1):(this.cellWeekNumbersVisible=!1,this.colWeekNumbersVisible=!0)),this.dayGrid.numbersVisible=this.dayNumbersVisible||this.cellWeekNumbersVisible||this.colWeekNumbersVisible,this.el.addClass("fc-basic-view").html(this.renderSkeletonHtml()),this.renderHead(),this.scroller.render();var t=this.scroller.el.addClass("fc-day-grid-container"),n=e('
    ').appendTo(t);this.el.find(".fc-body > tr > td").append(t),this.dayGrid.setElement(n),this.dayGrid.renderDates(this.hasRigidRows())},renderHead:function(){this.headContainerEl=this.el.find(".fc-head-container").html(this.dayGrid.renderHeadHtml()),this.headRowEl=this.headContainerEl.find(".fc-row")},unrenderDates:function(){this.dayGrid.unrenderDates(),this.dayGrid.removeElement(),this.scroller.destroy()},renderBusinessHours:function(){this.dayGrid.renderBusinessHours()},unrenderBusinessHours:function(){this.dayGrid.unrenderBusinessHours()},renderSkeletonHtml:function(){return'
    '},weekNumberStyleAttr:function(){return null!==this.weekNumberWidth?'style="width:'+this.weekNumberWidth+'px"':""},hasRigidRows:function(){var e=this.opt("eventLimit");return e&&"number"!=typeof e},updateWidth:function(){this.colWeekNumbersVisible&&(this.weekNumberWidth=c(this.el.find(".fc-week-number")))},setHeight:function(e,t){var n,o,s=this.opt("eventLimit");this.scroller.clear(),r(this.headRowEl),this.dayGrid.removeSegPopover(),s&&"number"==typeof s&&this.dayGrid.limitRows(s),n=this.computeScrollerHeight(e),this.setGridHeight(n,t),s&&"number"!=typeof s&&this.dayGrid.limitRows(s),t||(this.scroller.setHeight(n),o=this.scroller.getScrollbarWidths(),(o.left||o.right)&&(i(this.headRowEl,o),n=this.computeScrollerHeight(e),this.scroller.setHeight(n)),this.scroller.lockOverflow(o))},computeScrollerHeight:function(e){return e-u(this.el,this.scroller.el)},setGridHeight:function(e,t){t?l(this.dayGrid.rowEls):a(this.dayGrid.rowEls,e,!0)},computeInitialScroll:function(){return{top:0}},queryScroll:function(){return{top:this.scroller.getScrollTop()}},setScroll:function(e){this.scroller.setScrollTop(e.top)},hitsNeeded:function(){this.dayGrid.hitsNeeded()},hitsNotNeeded:function(){this.dayGrid.hitsNotNeeded()},prepareHits:function(){this.dayGrid.prepareHits()},releaseHits:function(){this.dayGrid.releaseHits()},queryHit:function(e,t){return this.dayGrid.queryHit(e,t)},getHitSpan:function(e){return this.dayGrid.getHitSpan(e)},getHitEl:function(e){return this.dayGrid.getHitEl(e)},renderEvents:function(e){this.dayGrid.renderEvents(e),this.updateHeight()},getEventSegs:function(){return this.dayGrid.getEventSegs()},unrenderEvents:function(){this.dayGrid.unrenderEvents()},renderDrag:function(e,t){return this.dayGrid.renderDrag(e,t)},unrenderDrag:function(){this.dayGrid.unrenderDrag()},renderSelection:function(e){this.dayGrid.renderSelection(e)},unrenderSelection:function(){this.dayGrid.unrenderSelection()}}),kt={renderHeadIntroHtml:function(){var e=this.view;return e.colWeekNumbersVisible?'"+ee(e.opt("weekNumberTitle"))+"":""},renderNumberIntroHtml:function(e){var t=this.view,n=this.getCellDate(e,0);return t.colWeekNumbersVisible?'"+t.buildGotoAnchorHtml({date:n,type:"week",forceOff:1===this.colCnt},n.format("w"))+"":""},renderBgIntroHtml:function(){var e=this.view;return e.colWeekNumbersVisible?'":""},renderIntroHtml:function(){var e=this.view;return e.colWeekNumbersVisible?'":""}},St=Fe.MonthView=xt.extend({computeRange:function(e){var t,n=xt.prototype.computeRange.call(this,e);return this.isFixedWeeks()&&(t=Math.ceil(n.end.diff(n.start,"weeks",!0)),n.end.add(6-t,"weeks")),n},setGridHeight:function(e,t){t&&(e*=this.rowCnt/6),a(this.dayGrid.rowEls,e,!t)},isFixedWeeks:function(){return this.opt("fixedWeekCount")}});Pe.basic={class:xt},Pe.basicDay={type:"basic",duration:{days:1}},Pe.basicWeek={type:"basic",duration:{weeks:1}},Pe.month={class:St,duration:{months:1},defaults:{fixedWeekCount:!0}};var Ct=Fe.AgendaView=dt.extend({scroller:null,timeGridClass:ut,timeGrid:null,dayGridClass:ct,dayGrid:null,axisWidth:null,headContainerEl:null,noScrollRowEls:null,bottomRuleEl:null,initialize:function(){this.timeGrid=this.instantiateTimeGrid(),this.opt("allDaySlot")&&(this.dayGrid=this.instantiateDayGrid()),this.scroller=new ht({overflowX:"hidden",overflowY:"auto"})},instantiateTimeGrid:function(){var e=this.timeGridClass.extend(Tt);return new e(this)},instantiateDayGrid:function(){var e=this.dayGridClass.extend(Et);return new e(this)},setRange:function(e){dt.prototype.setRange.call(this,e),this.timeGrid.setRange(e),this.dayGrid&&this.dayGrid.setRange(e)},renderDates:function(){this.el.addClass("fc-agenda-view").html(this.renderSkeletonHtml()),this.renderHead(),this.scroller.render();var t=this.scroller.el.addClass("fc-time-grid-container"),n=e('
    ').appendTo(t);this.el.find(".fc-body > tr > td").append(t),this.timeGrid.setElement(n),this.timeGrid.renderDates(),this.bottomRuleEl=e('
    ').appendTo(this.timeGrid.el),this.dayGrid&&(this.dayGrid.setElement(this.el.find(".fc-day-grid")),this.dayGrid.renderDates(),this.dayGrid.bottomCoordPadding=this.dayGrid.el.next("hr").outerHeight()),this.noScrollRowEls=this.el.find(".fc-row:not(.fc-scroller *)")},renderHead:function(){this.headContainerEl=this.el.find(".fc-head-container").html(this.timeGrid.renderHeadHtml())},unrenderDates:function(){this.timeGrid.unrenderDates(),this.timeGrid.removeElement(),this.dayGrid&&(this.dayGrid.unrenderDates(),this.dayGrid.removeElement()),this.scroller.destroy()},renderSkeletonHtml:function(){return'
    '+(this.dayGrid?'

    ':"")+"
    "},axisStyleAttr:function(){return null!==this.axisWidth?'style="width:'+this.axisWidth+'px"':""},renderBusinessHours:function(){this.timeGrid.renderBusinessHours(),this.dayGrid&&this.dayGrid.renderBusinessHours()},unrenderBusinessHours:function(){this.timeGrid.unrenderBusinessHours(),this.dayGrid&&this.dayGrid.unrenderBusinessHours()},getNowIndicatorUnit:function(){return this.timeGrid.getNowIndicatorUnit()},renderNowIndicator:function(e){this.timeGrid.renderNowIndicator(e)},unrenderNowIndicator:function(){this.timeGrid.unrenderNowIndicator()},updateSize:function(e){this.timeGrid.updateSize(e),dt.prototype.updateSize.call(this,e)},updateWidth:function(){this.axisWidth=c(this.el.find(".fc-axis"))},setHeight:function(e,t){var n,o,s;this.bottomRuleEl.hide(),this.scroller.clear(),r(this.noScrollRowEls),this.dayGrid&&(this.dayGrid.removeSegPopover(),n=this.opt("eventLimit"),n&&"number"!=typeof n&&(n=_t),n&&this.dayGrid.limitRows(n)),t||(o=this.computeScrollerHeight(e),this.scroller.setHeight(o),s=this.scroller.getScrollbarWidths(),(s.left||s.right)&&(i(this.noScrollRowEls,s),o=this.computeScrollerHeight(e),this.scroller.setHeight(o)),this.scroller.lockOverflow(s),this.timeGrid.getTotalSlatHeight()"+t.buildGotoAnchorHtml({date:this.start,type:"week",forceOff:this.colCnt>1},ee(e))+""):'"},renderBgIntroHtml:function(){var e=this.view;return'"},renderIntroHtml:function(){var e=this.view;return'"}},Et={renderBgIntroHtml:function(){var e=this.view;return'"+e.getAllDayHtml()+""},renderIntroHtml:function(){var e=this.view;return'"}},_t=5,Lt=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}];Pe.agenda={class:Ct,defaults:{allDaySlot:!0,slotDuration:"00:30:00",minTime:"00:00:00",maxTime:"24:00:00",slotEventOverlap:!0}},Pe.agendaDay={type:"agenda",duration:{days:1}},Pe.agendaWeek={type:"agenda",duration:{weeks:1}};var Dt=dt.extend({grid:null,scroller:null,initialize:function(){this.grid=new Mt(this),this.scroller=new ht({overflowX:"hidden",overflowY:"auto"})},setRange:function(e){dt.prototype.setRange.call(this,e),this.grid.setRange(e)},renderSkeleton:function(){this.el.addClass("fc-list-view "+this.widgetContentClass),this.scroller.render(),this.scroller.el.appendTo(this.el),this.grid.setElement(this.scroller.scrollEl)},unrenderSkeleton:function(){this.scroller.destroy()},setHeight:function(e,t){this.scroller.setHeight(this.computeScrollerHeight(e))},computeScrollerHeight:function(e){return e-u(this.el,this.scroller.el)},renderEvents:function(e){this.grid.renderEvents(e)},unrenderEvents:function(){this.grid.unrenderEvents()},isEventResizable:function(e){return!1},isEventDraggable:function(e){return!1}}),Mt=at.extend({segSelector:".fc-list-item",hasDayInteractions:!1,spanToSegs:function(e){for(var t,n=this.view,i=n.start.clone().time(0),r=0,o=[];i
    '+ee(this.view.opt("noEventsMessage"))+"
    ")},renderSegList:function(t){var n,i,r,o=this.groupSegsByDay(t),s=e('
    '),a=s.find("tbody");for(n=0;n'+(n?t.buildGotoAnchorHtml(e,{class:"fc-list-heading-main"},ee(e.format(n))):"")+(i?t.buildGotoAnchorHtml(e,{class:"fc-list-heading-alt"},ee(e.format(i))):"")+""},fgSegHtml:function(e){var t,n=this.view,i=["fc-list-item"].concat(this.getSegCustomClasses(e)),r=this.getSegBackgroundColor(e),o=e.event,s=o.url;return t=o.allDay?n.getAllDayHtml():n.isMultiDayEvent(o)?e.isStart||e.isEnd?ee(this.getEventTimeText(e)):n.getAllDayHtml():ee(this.getEventTimeText(o)),s&&i.push("fc-has-url"),''+(this.displayEventTime?''+(t||"")+"":"")+'"+ee(e.event.title||"")+""}});return Pe.list={class:Dt,buttonTextKey:"list",defaults:{buttonText:"list",listDayFormat:"LL",noEventsMessage:"No events to display"}},Pe.listDay={type:"list",duration:{days:1},defaults:{listDayFormat:"dddd"}},Pe.listWeek={type:"list",duration:{weeks:1},defaults:{listDayFormat:"dddd",listDayAltFormat:"LL"}},Pe.listMonth={type:"list",duration:{month:1},defaults:{listDayAltFormat:"dddd"}},Pe.listYear={type:"list",duration:{year:1},defaults:{listDayAltFormat:"dddd"}},Fe}),define("fullcalendar",["fullcalendar/dist/fullcalendar.min"],function(e){return e}),define("text!fullcalendar/dist/fullcalendar.min.css",["module"],function(e){e.exports='/*!\n * FullCalendar v3.2.0 Stylesheet\n * Docs & License: https://fullcalendar.io/\n * (c) 2017 Adam Shaw\n */.fc-icon,body .fc{font-size:1em}.fc-button-group,.fc-icon{display:inline-block}.fc-bg,.fc-row .fc-bgevent-skeleton,.fc-row .fc-highlight-skeleton{bottom:0}.fc-icon,.fc-unselectable{-khtml-user-select:none;-webkit-touch-callout:none}.fc{direction:ltr;text-align:left}.fc-rtl{text-align:right}.fc th,.fc-basic-view td.fc-week-number,.fc-icon,.fc-toolbar{text-align:center}.fc-unthemed .fc-content,.fc-unthemed .fc-divider,.fc-unthemed .fc-list-heading td,.fc-unthemed .fc-list-view,.fc-unthemed .fc-popover,.fc-unthemed .fc-row,.fc-unthemed tbody,.fc-unthemed td,.fc-unthemed th,.fc-unthemed thead{border-color:#ddd}.fc-unthemed .fc-popover{background-color:#fff}.fc-unthemed .fc-divider,.fc-unthemed .fc-list-heading td,.fc-unthemed .fc-popover .fc-header{background:#eee}.fc-unthemed .fc-popover .fc-header .fc-close{color:#666}.fc-unthemed td.fc-today{background:#fcf8e3}.fc-highlight{background:#bce8f1;opacity:.3}.fc-bgevent{background:#8fdf82;opacity:.3}.fc-nonbusiness{background:#d7d7d7}.fc-icon{height:1em;line-height:1em;overflow:hidden;font-family:"Courier New",Courier,monospace;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fc-icon:after{position:relative}.fc-icon-left-single-arrow:after{content:"\\02039";font-weight:700;font-size:200%;top:-7%}.fc-icon-right-single-arrow:after{content:"\\0203A";font-weight:700;font-size:200%;top:-7%}.fc-icon-left-double-arrow:after{content:"\\000AB";font-size:160%;top:-7%}.fc-icon-right-double-arrow:after{content:"\\000BB";font-size:160%;top:-7%}.fc-icon-left-triangle:after{content:"\\25C4";font-size:125%;top:3%}.fc-icon-right-triangle:after{content:"\\25BA";font-size:125%;top:3%}.fc-icon-down-triangle:after{content:"\\25BC";font-size:125%;top:2%}.fc-icon-x:after{content:"\\000D7";font-size:200%;top:6%}.fc button{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;height:2.1em;padding:0 .6em;font-size:1em;white-space:nowrap;cursor:pointer}.fc button::-moz-focus-inner{margin:0;padding:0}.fc-state-default{border:1px solid;background-color:#f5f5f5;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);color:#333;text-shadow:0 1px 1px rgba(255,255,255,.75);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05)}.fc-state-default.fc-corner-left{border-top-left-radius:4px;border-bottom-left-radius:4px}.fc-state-default.fc-corner-right{border-top-right-radius:4px;border-bottom-right-radius:4px}.fc button .fc-icon{position:relative;top:-.05em;margin:0 .2em;vertical-align:middle}.fc-state-active,.fc-state-disabled,.fc-state-down,.fc-state-hover{color:#333;background-color:#e6e6e6}.fc-state-hover{color:#333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.fc-state-active,.fc-state-down{background-color:#ccc;background-image:none;box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}.fc-state-disabled{cursor:default;background-image:none;opacity:.65;box-shadow:none}.fc-event.fc-draggable,.fc-event[href],.fc-popover .fc-header .fc-close,a[data-goto]{cursor:pointer}.fc .fc-button-group>*{float:left;margin:0 0 0 -1px}.fc .fc-button-group>:first-child{margin-left:0}.fc-popover{position:absolute;box-shadow:0 2px 6px rgba(0,0,0,.15)}.fc-popover .fc-header{padding:2px 4px}.fc-popover .fc-header .fc-title{margin:0 2px}.fc-ltr .fc-popover .fc-header .fc-title,.fc-rtl .fc-popover .fc-header .fc-close{float:left}.fc-ltr .fc-popover .fc-header .fc-close,.fc-rtl .fc-popover .fc-header .fc-title{float:right}.fc-unthemed .fc-popover{border-width:1px;border-style:solid}.fc-unthemed .fc-popover .fc-header .fc-close{font-size:.9em;margin-top:2px}.fc-popover>.ui-widget-header+.ui-widget-content{border-top:0}.fc-divider{border-style:solid;border-width:1px}hr.fc-divider{height:0;margin:0;padding:0 0 2px;border-width:1px 0}.fc-bg table,.fc-row .fc-bgevent-skeleton table,.fc-row .fc-highlight-skeleton table{height:100%}.fc-clear{clear:both}.fc-bg,.fc-bgevent-skeleton,.fc-helper-skeleton,.fc-highlight-skeleton{position:absolute;top:0;left:0;right:0}.fc table{width:100%;box-sizing:border-box;table-layout:fixed;border-collapse:collapse;border-spacing:0;font-size:1em}.fc td,.fc th{border-style:solid;border-width:1px;padding:0;vertical-align:top}.fc td.fc-today{border-style:double}a[data-goto]:hover{text-decoration:underline}.fc .fc-row{border-style:solid;border-width:0}.fc-row table{border-left:0 hidden transparent;border-right:0 hidden transparent;border-bottom:0 hidden transparent}.fc-row:first-child table{border-top:0 hidden transparent}.fc-row{position:relative}.fc-row .fc-bg{z-index:1}.fc-row .fc-bgevent-skeleton td,.fc-row .fc-highlight-skeleton td{border-color:transparent}.fc-row .fc-bgevent-skeleton{z-index:2}.fc-row .fc-highlight-skeleton{z-index:3}.fc-row .fc-content-skeleton{position:relative;z-index:4;padding-bottom:2px}.fc-row .fc-helper-skeleton{z-index:5}.fc-row .fc-content-skeleton td,.fc-row .fc-helper-skeleton td{background:0 0;border-color:transparent;border-bottom:0}.fc-row .fc-content-skeleton tbody td,.fc-row .fc-helper-skeleton tbody td{border-top:0}.fc-scroller{-webkit-overflow-scrolling:touch}.fc-row.fc-rigid,.fc-time-grid-event{overflow:hidden}.fc-scroller>.fc-day-grid,.fc-scroller>.fc-time-grid{position:relative;width:100%}.fc-event{position:relative;display:block;font-size:.85em;line-height:1.3;border-radius:3px;border:1px solid #3a87ad;font-weight:400}.fc-event,.fc-event-dot{background-color:#3a87ad}.fc-event,.fc-event:hover,.ui-widget .fc-event{color:#fff;text-decoration:none}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc-event .fc-bg{z-index:1;background:#fff;opacity:.25}.fc-event .fc-content{position:relative;z-index:2}.fc-event .fc-resizer{position:absolute;z-index:4;display:none}.fc-event.fc-allow-mouse-resize .fc-resizer,.fc-event.fc-selected .fc-resizer{display:block}.fc-event.fc-selected .fc-resizer:before{content:"";position:absolute;z-index:9999;top:50%;left:50%;width:40px;height:40px;margin-left:-20px;margin-top:-20px}.fc-event.fc-selected{z-index:9999!important;box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event.fc-selected.fc-dragging{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-h-event.fc-selected:before{content:"";position:absolute;z-index:3;top:-10px;bottom:-10px;left:0;right:0}.fc-ltr .fc-h-event.fc-not-start,.fc-rtl .fc-h-event.fc-not-end{margin-left:0;border-left-width:0;padding-left:1px;border-top-left-radius:0;border-bottom-left-radius:0}.fc-ltr .fc-h-event.fc-not-end,.fc-rtl .fc-h-event.fc-not-start{margin-right:0;border-right-width:0;padding-right:1px;border-top-right-radius:0;border-bottom-right-radius:0}.fc-ltr .fc-h-event .fc-start-resizer,.fc-rtl .fc-h-event .fc-end-resizer{cursor:w-resize;left:-1px}.fc-ltr .fc-h-event .fc-end-resizer,.fc-rtl .fc-h-event .fc-start-resizer{cursor:e-resize;right:-1px}.fc-h-event.fc-allow-mouse-resize .fc-resizer{width:7px;top:-1px;bottom:-1px}.fc-h-event.fc-selected .fc-resizer{border-radius:4px;border-width:1px;width:6px;height:6px;border-style:solid;border-color:inherit;background:#fff;top:50%;margin-top:-4px}.fc-ltr .fc-h-event.fc-selected .fc-start-resizer,.fc-rtl .fc-h-event.fc-selected .fc-end-resizer{margin-left:-4px}.fc-ltr .fc-h-event.fc-selected .fc-end-resizer,.fc-rtl .fc-h-event.fc-selected .fc-start-resizer{margin-right:-4px}.fc-day-grid-event{margin:1px 2px 0;padding:0 1px}tr:first-child>td>.fc-day-grid-event{margin-top:2px}.fc-day-grid-event.fc-selected:after{content:"";position:absolute;z-index:1;top:-1px;right:-1px;bottom:-1px;left:-1px;background:#000;opacity:.25}.fc-day-grid-event .fc-content{white-space:nowrap;overflow:hidden}.fc-day-grid-event .fc-time{font-weight:700}.fc-ltr .fc-day-grid-event.fc-allow-mouse-resize .fc-start-resizer,.fc-rtl .fc-day-grid-event.fc-allow-mouse-resize .fc-end-resizer{margin-left:-2px}.fc-ltr .fc-day-grid-event.fc-allow-mouse-resize .fc-end-resizer,.fc-rtl .fc-day-grid-event.fc-allow-mouse-resize .fc-start-resizer{margin-right:-2px}a.fc-more{margin:1px 3px;font-size:.85em;cursor:pointer;text-decoration:none}a.fc-more:hover{text-decoration:underline}.fc-limited{display:none}.fc-day-grid .fc-row{z-index:1}.fc-more-popover{z-index:2;width:220px}.fc-more-popover .fc-event-container{padding:10px}.fc-now-indicator{position:absolute;border:0 solid red}.fc-unselectable{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.fc-toolbar.fc-header-toolbar{margin-bottom:1em}.fc-toolbar.fc-footer-toolbar{margin-top:1em}.fc-toolbar .fc-left{float:left}.fc-toolbar .fc-right{float:right}.fc-toolbar .fc-center{display:inline-block}.fc .fc-toolbar>*>*{float:left;margin-left:.75em}.fc .fc-toolbar>*>:first-child{margin-left:0}.fc-toolbar h2{margin:0}.fc-toolbar button{position:relative}.fc-toolbar .fc-state-hover,.fc-toolbar .ui-state-hover{z-index:2}.fc-toolbar .fc-state-down{z-index:3}.fc-toolbar .fc-state-active,.fc-toolbar .ui-state-active{z-index:4}.fc-toolbar button:focus{z-index:5}.fc-view-container *,.fc-view-container :after,.fc-view-container :before{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.fc-view,.fc-view>table{position:relative;z-index:1}.fc-basicDay-view .fc-content-skeleton,.fc-basicWeek-view .fc-content-skeleton{padding-bottom:1em}.fc-basic-view .fc-body .fc-row{min-height:4em}.fc-row.fc-rigid .fc-content-skeleton{position:absolute;top:0;left:0;right:0}.fc-day-top.fc-other-month{opacity:.3}.fc-basic-view .fc-day-number,.fc-basic-view .fc-week-number{padding:2px}.fc-basic-view th.fc-day-number,.fc-basic-view th.fc-week-number{padding:0 2px}.fc-ltr .fc-basic-view .fc-day-top .fc-day-number{float:right}.fc-rtl .fc-basic-view .fc-day-top .fc-day-number{float:left}.fc-ltr .fc-basic-view .fc-day-top .fc-week-number{float:left;border-radius:0 0 3px}.fc-rtl .fc-basic-view .fc-day-top .fc-week-number{float:right;border-radius:0 0 0 3px}.fc-basic-view .fc-day-top .fc-week-number{min-width:1.5em;text-align:center;background-color:#f2f2f2;color:grey}.fc-basic-view td.fc-week-number>*{display:inline-block;min-width:1.25em}.fc-agenda-view .fc-day-grid{position:relative;z-index:2}.fc-agenda-view .fc-day-grid .fc-row{min-height:3em}.fc-agenda-view .fc-day-grid .fc-row .fc-content-skeleton{padding-bottom:1em}.fc .fc-axis{vertical-align:middle;padding:0 4px;white-space:nowrap}.fc-ltr .fc-axis{text-align:right}.fc-rtl .fc-axis{text-align:left}.ui-widget td.fc-axis{font-weight:400}.fc-time-grid,.fc-time-grid-container{position:relative;z-index:1}.fc-time-grid{min-height:100%}.fc-time-grid table{border:0 hidden transparent}.fc-time-grid>.fc-bg{z-index:1}.fc-time-grid .fc-slats,.fc-time-grid>hr{position:relative;z-index:2}.fc-time-grid .fc-content-col{position:relative}.fc-time-grid .fc-content-skeleton{position:absolute;z-index:3;top:0;left:0;right:0}.fc-time-grid .fc-business-container{position:relative;z-index:1}.fc-time-grid .fc-bgevent-container{position:relative;z-index:2}.fc-time-grid .fc-highlight-container{z-index:3;position:relative}.fc-time-grid .fc-event-container{position:relative;z-index:4}.fc-time-grid .fc-now-indicator-line{z-index:5}.fc-time-grid .fc-helper-container{position:relative;z-index:6}.fc-time-grid .fc-slats td{height:1.5em;border-bottom:0}.fc-time-grid .fc-slats .fc-minor td{border-top-style:dotted}.fc-time-grid .fc-slats .ui-widget-content{background:0 0}.fc-time-grid .fc-highlight{position:absolute;left:0;right:0}.fc-ltr .fc-time-grid .fc-event-container{margin:0 2.5% 0 2px}.fc-rtl .fc-time-grid .fc-event-container{margin:0 2px 0 2.5%}.fc-time-grid .fc-bgevent,.fc-time-grid .fc-event{position:absolute;z-index:1}.fc-time-grid .fc-bgevent{left:0;right:0}.fc-v-event.fc-not-start{border-top-width:0;padding-top:1px;border-top-left-radius:0;border-top-right-radius:0}.fc-v-event.fc-not-end{border-bottom-width:0;padding-bottom:1px;border-bottom-left-radius:0;border-bottom-right-radius:0}.fc-time-grid-event.fc-selected{overflow:visible}.fc-time-grid-event.fc-selected .fc-bg{display:none}.fc-time-grid-event .fc-content{overflow:hidden}.fc-time-grid-event .fc-time,.fc-time-grid-event .fc-title{padding:0 1px}.fc-time-grid-event .fc-time{font-size:.85em;white-space:nowrap}.fc-time-grid-event.fc-short .fc-content{white-space:nowrap}.fc-time-grid-event.fc-short .fc-time,.fc-time-grid-event.fc-short .fc-title{display:inline-block;vertical-align:top}.fc-time-grid-event.fc-short .fc-time span{display:none}.fc-time-grid-event.fc-short .fc-time:before{content:attr(data-start)}.fc-time-grid-event.fc-short .fc-time:after{content:"\\000A0-\\000A0"}.fc-time-grid-event.fc-short .fc-title{font-size:.85em;padding:0}.fc-time-grid-event.fc-allow-mouse-resize .fc-resizer{left:0;right:0;bottom:0;height:8px;overflow:hidden;line-height:8px;font-size:11px;font-family:monospace;text-align:center;cursor:s-resize}.fc-time-grid-event.fc-allow-mouse-resize .fc-resizer:after{content:"="}.fc-time-grid-event.fc-selected .fc-resizer{border-radius:5px;border-width:1px;width:8px;height:8px;border-style:solid;border-color:inherit;background:#fff;left:50%;margin-left:-5px;bottom:-5px}.fc-time-grid .fc-now-indicator-line{border-top-width:1px;left:0;right:0}.fc-time-grid .fc-now-indicator-arrow{margin-top:-5px}.fc-ltr .fc-time-grid .fc-now-indicator-arrow{left:0;border-width:5px 0 5px 6px;border-top-color:transparent;border-bottom-color:transparent}.fc-rtl .fc-time-grid .fc-now-indicator-arrow{right:0;border-width:5px 6px 5px 0;border-top-color:transparent;border-bottom-color:transparent}.fc-event-dot{display:inline-block;width:10px;height:10px;border-radius:5px}.fc-rtl .fc-list-view{direction:rtl}.fc-list-view{border-width:1px;border-style:solid}.fc .fc-list-table{table-layout:auto}.fc-list-table td{border-width:1px 0 0;padding:8px 14px}.fc-list-table tr:first-child td{border-top-width:0}.fc-list-heading{border-bottom-width:1px}.fc-list-heading td{font-weight:700}.fc-ltr .fc-list-heading-main{float:left}.fc-ltr .fc-list-heading-alt,.fc-rtl .fc-list-heading-main{float:right}.fc-rtl .fc-list-heading-alt{float:left}.fc-list-item.fc-has-url{cursor:pointer}.fc-list-item:hover td{background-color:#f5f5f5}.fc-list-item-marker,.fc-list-item-time{white-space:nowrap;width:1px}.fc-ltr .fc-list-item-marker{padding-right:0}.fc-rtl .fc-list-item-marker{padding-left:0}.fc-list-item-title a{text-decoration:none;color:inherit}.fc-list-item-title a[href]:hover{text-decoration:underline}.fc-list-empty-wrap2{position:absolute;top:0;left:0;right:0;bottom:0}.fc-list-empty-wrap1{width:100%;height:100%;display:table}.fc-list-empty{display:table-cell;vertical-align:middle;text-align:center}.fc-unthemed .fc-list-empty{background-color:#eee}'; -}),!function(e){"function"==typeof define&&define.amd?define("fullcalendar/dist/locale/zh-cn",["jquery","moment"],e):"object"==typeof exports?module.exports=e(require("jquery"),require("moment")):e(jQuery,moment)}(function(e,t){!function(){var e=t.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"Ah点mm分",LTS:"Ah点m分s秒",L:"YYYY-MM-DD",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日Ah点mm分",LLLL:"YYYY年MMMD日ddddAh点mm分",l:"YYYY-MM-DD",ll:"YYYY年MMMD日",lll:"YYYY年MMMD日Ah点mm分",llll:"YYYY年MMMD日ddddAh点mm分"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"下午"===t||"晚上"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,n){var i=100*e+t;return i<600?"凌晨":i<900?"早上":i<1130?"上午":i<1230?"中午":i<1800?"下午":"晚上"},calendar:{sameDay:function(){return 0===this.minutes()?"[今天]Ah[点整]":"[今天]LT"},nextDay:function(){return 0===this.minutes()?"[明天]Ah[点整]":"[明天]LT"},lastDay:function(){return 0===this.minutes()?"[昨天]Ah[点整]":"[昨天]LT"},nextWeek:function(){var e,n;return e=t().startOf("week"),n=this.diff(e,"days")>=7?"[下]":"[本]",0===this.minutes()?n+"dddAh点整":n+"dddAh点mm"},lastWeek:function(){var e,n;return e=t().startOf("week"),n=this.unix()[^\n]+(\n(?!def)[^\n]+)*\n*)+/, - list: /^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/, - html: /^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/, - def: /^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/, - table: noop, - paragraph: /^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/, - text: /^[^\n]+/ -}; - -block.bullet = /(?:[*+-]|\d+\.)/; -block.item = /^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/; -block.item = replace(block.item, 'gm') - (/bull/g, block.bullet) - (); - -block.list = replace(block.list) - (/bull/g, block.bullet) - ('hr', '\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))') - ('def', '\\n+(?=' + block.def.source + ')') - (); - -block.blockquote = replace(block.blockquote) - ('def', block.def) - (); - -block._tag = '(?!(?:' - + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code' - + '|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo' - + '|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b'; - -block.html = replace(block.html) - ('comment', //) - ('closed', /<(tag)[\s\S]+?<\/\1>/) - ('closing', /])*?>/) - (/tag/g, block._tag) - (); - -block.paragraph = replace(block.paragraph) - ('hr', block.hr) - ('heading', block.heading) - ('lheading', block.lheading) - ('blockquote', block.blockquote) - ('tag', '<' + block._tag) - ('def', block.def) - (); - -/** - * Normal Block Grammar - */ - -block.normal = merge({}, block); - -/** - * GFM Block Grammar - */ - -block.gfm = merge({}, block.normal, { - fences: /^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/, - paragraph: /^/, - heading: /^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/ -}); - -block.gfm.paragraph = replace(block.paragraph) - ('(?!', '(?!' - + block.gfm.fences.source.replace('\\1', '\\2') + '|' - + block.list.source.replace('\\1', '\\3') + '|') - (); - -/** - * GFM + Tables Block Grammar - */ - -block.tables = merge({}, block.gfm, { - nptable: /^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/, - table: /^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/ -}); - -/** - * Block Lexer - */ - -function Lexer(options) { - this.tokens = []; - this.tokens.links = {}; - this.options = options || marked.defaults; - this.rules = block.normal; - - if (this.options.gfm) { - if (this.options.tables) { - this.rules = block.tables; - } else { - this.rules = block.gfm; - } - } -} - -/** - * Expose Block Rules - */ - -Lexer.rules = block; - -/** - * Static Lex Method - */ - -Lexer.lex = function(src, options) { - var lexer = new Lexer(options); - return lexer.lex(src); -}; - -/** - * Preprocessing - */ - -Lexer.prototype.lex = function(src) { - src = src - .replace(/\r\n|\r/g, '\n') - .replace(/\t/g, ' ') - .replace(/\u00a0/g, ' ') - .replace(/\u2424/g, '\n'); - - return this.token(src, true); -}; - -/** - * Lexing - */ - -Lexer.prototype.token = function(src, top, bq) { - var src = src.replace(/^ +$/gm, '') - , next - , loose - , cap - , bull - , b - , item - , space - , i - , l; - - while (src) { - // newline - if (cap = this.rules.newline.exec(src)) { - src = src.substring(cap[0].length); - if (cap[0].length > 1) { - this.tokens.push({ - type: 'space' - }); - } - } - - // code - if (cap = this.rules.code.exec(src)) { - src = src.substring(cap[0].length); - cap = cap[0].replace(/^ {4}/gm, ''); - this.tokens.push({ - type: 'code', - text: !this.options.pedantic - ? cap.replace(/\n+$/, '') - : cap - }); - continue; - } - - // fences (gfm) - if (cap = this.rules.fences.exec(src)) { - src = src.substring(cap[0].length); - this.tokens.push({ - type: 'code', - lang: cap[2], - text: cap[3] || '' - }); - continue; - } - - // heading - if (cap = this.rules.heading.exec(src)) { - src = src.substring(cap[0].length); - this.tokens.push({ - type: 'heading', - depth: cap[1].length, - text: cap[2] - }); - continue; - } - - // table no leading pipe (gfm) - if (top && (cap = this.rules.nptable.exec(src))) { - src = src.substring(cap[0].length); - - item = { - type: 'table', - header: cap[1].replace(/^ *| *\| *$/g, '').split(/ *\| */), - align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */), - cells: cap[3].replace(/\n$/, '').split('\n') - }; - - for (i = 0; i < item.align.length; i++) { - if (/^ *-+: *$/.test(item.align[i])) { - item.align[i] = 'right'; - } else if (/^ *:-+: *$/.test(item.align[i])) { - item.align[i] = 'center'; - } else if (/^ *:-+ *$/.test(item.align[i])) { - item.align[i] = 'left'; - } else { - item.align[i] = null; - } - } - - for (i = 0; i < item.cells.length; i++) { - item.cells[i] = item.cells[i].split(/ *\| */); - } - - this.tokens.push(item); - - continue; - } - - // lheading - if (cap = this.rules.lheading.exec(src)) { - src = src.substring(cap[0].length); - this.tokens.push({ - type: 'heading', - depth: cap[2] === '=' ? 1 : 2, - text: cap[1] - }); - continue; - } - - // hr - if (cap = this.rules.hr.exec(src)) { - src = src.substring(cap[0].length); - this.tokens.push({ - type: 'hr' - }); - continue; - } - - // blockquote - if (cap = this.rules.blockquote.exec(src)) { - src = src.substring(cap[0].length); - - this.tokens.push({ - type: 'blockquote_start' - }); - - cap = cap[0].replace(/^ *> ?/gm, ''); - - // Pass `top` to keep the current - // "toplevel" state. This is exactly - // how markdown.pl works. - this.token(cap, top, true); - - this.tokens.push({ - type: 'blockquote_end' - }); - - continue; - } - - // list - if (cap = this.rules.list.exec(src)) { - src = src.substring(cap[0].length); - bull = cap[2]; - - this.tokens.push({ - type: 'list_start', - ordered: bull.length > 1 - }); - - // Get each top-level item. - cap = cap[0].match(this.rules.item); - - next = false; - l = cap.length; - i = 0; - - for (; i < l; i++) { - item = cap[i]; - - // Remove the list item's bullet - // so it is seen as the next token. - space = item.length; - item = item.replace(/^ *([*+-]|\d+\.) +/, ''); - - // Outdent whatever the - // list item contains. Hacky. - if (~item.indexOf('\n ')) { - space -= item.length; - item = !this.options.pedantic - ? item.replace(new RegExp('^ {1,' + space + '}', 'gm'), '') - : item.replace(/^ {1,4}/gm, ''); - } - - // Determine whether the next list item belongs here. - // Backpedal if it does not belong in this list. - if (this.options.smartLists && i !== l - 1) { - b = block.bullet.exec(cap[i + 1])[0]; - if (bull !== b && !(bull.length > 1 && b.length > 1)) { - src = cap.slice(i + 1).join('\n') + src; - i = l - 1; - } - } - - // Determine whether item is loose or not. - // Use: /(^|\n)(?! )[^\n]+\n\n(?!\s*$)/ - // for discount behavior. - loose = next || /\n\n(?!\s*$)/.test(item); - if (i !== l - 1) { - next = item.charAt(item.length - 1) === '\n'; - if (!loose) loose = next; - } - - this.tokens.push({ - type: loose - ? 'loose_item_start' - : 'list_item_start' - }); - - // Recurse. - this.token(item, false, bq); - - this.tokens.push({ - type: 'list_item_end' - }); - } - - this.tokens.push({ - type: 'list_end' - }); - - continue; - } - - // html - if (cap = this.rules.html.exec(src)) { - src = src.substring(cap[0].length); - this.tokens.push({ - type: this.options.sanitize - ? 'paragraph' - : 'html', - pre: !this.options.sanitizer - && (cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style'), - text: cap[0] - }); - continue; - } - - // def - if ((!bq && top) && (cap = this.rules.def.exec(src))) { - src = src.substring(cap[0].length); - this.tokens.links[cap[1].toLowerCase()] = { - href: cap[2], - title: cap[3] - }; - continue; - } - - // table (gfm) - if (top && (cap = this.rules.table.exec(src))) { - src = src.substring(cap[0].length); - - item = { - type: 'table', - header: cap[1].replace(/^ *| *\| *$/g, '').split(/ *\| */), - align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */), - cells: cap[3].replace(/(?: *\| *)?\n$/, '').split('\n') - }; - - for (i = 0; i < item.align.length; i++) { - if (/^ *-+: *$/.test(item.align[i])) { - item.align[i] = 'right'; - } else if (/^ *:-+: *$/.test(item.align[i])) { - item.align[i] = 'center'; - } else if (/^ *:-+ *$/.test(item.align[i])) { - item.align[i] = 'left'; - } else { - item.align[i] = null; - } - } - - for (i = 0; i < item.cells.length; i++) { - item.cells[i] = item.cells[i] - .replace(/^ *\| *| *\| *$/g, '') - .split(/ *\| */); - } - - this.tokens.push(item); - - continue; - } - - // top-level paragraph - if (top && (cap = this.rules.paragraph.exec(src))) { - src = src.substring(cap[0].length); - this.tokens.push({ - type: 'paragraph', - text: cap[1].charAt(cap[1].length - 1) === '\n' - ? cap[1].slice(0, -1) - : cap[1] - }); - continue; - } - - // text - if (cap = this.rules.text.exec(src)) { - // Top-level should never reach here. - src = src.substring(cap[0].length); - this.tokens.push({ - type: 'text', - text: cap[0] - }); - continue; - } - - if (src) { - throw new - Error('Infinite loop on byte: ' + src.charCodeAt(0)); - } - } - - return this.tokens; -}; - -/** - * Inline-Level Grammar - */ - -var inline = { - escape: /^\\([\\`*{}\[\]()#+\-.!_>])/, - autolink: /^<([^ >]+(@|:\/)[^ >]+)>/, - url: noop, - tag: /^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/, - link: /^!?\[(inside)\]\(href\)/, - reflink: /^!?\[(inside)\]\s*\[([^\]]*)\]/, - nolink: /^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/, - strong: /^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/, - em: /^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/, - code: /^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/, - br: /^ {2,}\n(?!\s*$)/, - del: noop, - text: /^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/; - -inline.link = replace(inline.link) - ('inside', inline._inside) - ('href', inline._href) - (); - -inline.reflink = replace(inline.reflink) - ('inside', inline._inside) - (); - -/** - * Normal Inline Grammar - */ - -inline.normal = merge({}, inline); - -/** - * Pedantic Inline Grammar - */ - -inline.pedantic = merge({}, inline.normal, { - strong: /^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/, - em: /^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/ -}); - -/** - * GFM Inline Grammar - */ - -inline.gfm = merge({}, inline.normal, { - escape: replace(inline.escape)('])', '~|])')(), - url: /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/, - del: /^~~(?=\S)([\s\S]*?\S)~~/, - text: replace(inline.text) - (']|', '~]|') - ('|', '|https?://|') - () -}); - -/** - * GFM + Line Breaks Inline Grammar - */ - -inline.breaks = merge({}, inline.gfm, { - br: replace(inline.br)('{2,}', '*')(), - text: replace(inline.gfm.text)('{2,}', '*')() -}); - -/** - * Inline Lexer & Compiler - */ - -function InlineLexer(links, options) { - this.options = options || marked.defaults; - this.links = links; - this.rules = inline.normal; - this.renderer = this.options.renderer || new Renderer; - this.renderer.options = this.options; - - if (!this.links) { - throw new - Error('Tokens array requires a `links` property.'); - } - - if (this.options.gfm) { - if (this.options.breaks) { - this.rules = inline.breaks; - } else { - this.rules = inline.gfm; - } - } else if (this.options.pedantic) { - this.rules = inline.pedantic; - } -} - -/** - * Expose Inline Rules - */ - -InlineLexer.rules = inline; - -/** - * Static Lexing/Compiling Method - */ - -InlineLexer.output = function(src, links, options) { - var inline = new InlineLexer(links, options); - return inline.output(src); -}; - -/** - * Lexing/Compiling - */ - -InlineLexer.prototype.output = function(src) { - var out = '' - , link - , text - , href - , cap; - - while (src) { - // escape - if (cap = this.rules.escape.exec(src)) { - src = src.substring(cap[0].length); - out += cap[1]; - continue; - } - - // autolink - if (cap = this.rules.autolink.exec(src)) { - src = src.substring(cap[0].length); - if (cap[2] === '@') { - text = cap[1].charAt(6) === ':' - ? this.mangle(cap[1].substring(7)) - : this.mangle(cap[1]); - href = this.mangle('mailto:') + text; - } else { - text = escape(cap[1]); - href = text; - } - out += this.renderer.link(href, null, text); - continue; - } - - // url (gfm) - if (!this.inLink && (cap = this.rules.url.exec(src))) { - src = src.substring(cap[0].length); - text = escape(cap[1]); - href = text; - out += this.renderer.link(href, null, text); - continue; - } - - // tag - if (cap = this.rules.tag.exec(src)) { - if (!this.inLink && /^/i.test(cap[0])) { - this.inLink = false; - } - src = src.substring(cap[0].length); - out += this.options.sanitize - ? this.options.sanitizer - ? this.options.sanitizer(cap[0]) - : escape(cap[0]) - : cap[0] - continue; - } - - // link - if (cap = this.rules.link.exec(src)) { - src = src.substring(cap[0].length); - this.inLink = true; - out += this.outputLink(cap, { - href: cap[2], - title: cap[3] - }); - this.inLink = false; - continue; - } - - // reflink, nolink - if ((cap = this.rules.reflink.exec(src)) - || (cap = this.rules.nolink.exec(src))) { - src = src.substring(cap[0].length); - link = (cap[2] || cap[1]).replace(/\s+/g, ' '); - link = this.links[link.toLowerCase()]; - if (!link || !link.href) { - out += cap[0].charAt(0); - src = cap[0].substring(1) + src; - continue; - } - this.inLink = true; - out += this.outputLink(cap, link); - this.inLink = false; - continue; - } - - // strong - if (cap = this.rules.strong.exec(src)) { - src = src.substring(cap[0].length); - out += this.renderer.strong(this.output(cap[2] || cap[1])); - continue; - } - - // em - if (cap = this.rules.em.exec(src)) { - src = src.substring(cap[0].length); - out += this.renderer.em(this.output(cap[2] || cap[1])); - continue; - } - - // code - if (cap = this.rules.code.exec(src)) { - src = src.substring(cap[0].length); - out += this.renderer.codespan(escape(cap[2], true)); - continue; - } - - // br - if (cap = this.rules.br.exec(src)) { - src = src.substring(cap[0].length); - out += this.renderer.br(); - continue; - } - - // del (gfm) - if (cap = this.rules.del.exec(src)) { - src = src.substring(cap[0].length); - out += this.renderer.del(this.output(cap[1])); - continue; - } - - // text - if (cap = this.rules.text.exec(src)) { - src = src.substring(cap[0].length); - out += this.renderer.text(escape(this.smartypants(cap[0]))); - continue; - } - - if (src) { - throw new - Error('Infinite loop on byte: ' + src.charCodeAt(0)); - } - } - - return out; -}; - -/** - * Compile Link - */ - -InlineLexer.prototype.outputLink = function(cap, link) { - var href = escape(link.href) - , title = link.title ? escape(link.title) : null; - - return cap[0].charAt(0) !== '!' - ? this.renderer.link(href, title, this.output(cap[1])) - : this.renderer.image(href, title, escape(cap[1])); -}; - -/** - * Smartypants Transformations - */ - -InlineLexer.prototype.smartypants = function(text) { - if (!this.options.smartypants) return text; - return text - // em-dashes - .replace(/---/g, '\u2014') - // en-dashes - .replace(/--/g, '\u2013') - // opening singles - .replace(/(^|[-\u2014/(\[{"\s])'/g, '$1\u2018') - // closing singles & apostrophes - .replace(/'/g, '\u2019') - // opening doubles - .replace(/(^|[-\u2014/(\[{\u2018\s])"/g, '$1\u201c') - // closing doubles - .replace(/"/g, '\u201d') - // ellipses - .replace(/\.{3}/g, '\u2026'); -}; - -/** - * Mangle Links - */ - -InlineLexer.prototype.mangle = function(text) { - if (!this.options.mangle) return text; - var out = '' - , l = text.length - , i = 0 - , ch; - - for (; i < l; i++) { - ch = text.charCodeAt(i); - if (Math.random() > 0.5) { - ch = 'x' + ch.toString(16); - } - out += '&#' + ch + ';'; - } - - return out; -}; - -/** - * Renderer - */ - -function Renderer(options) { - this.options = options || {}; -} - -Renderer.prototype.code = function(code, lang, escaped) { - if (this.options.highlight) { - var out = this.options.highlight(code, lang); - if (out != null && out !== code) { - escaped = true; - code = out; - } - } - - if (!lang) { - return '
    '
    -      + (escaped ? code : escape(code, true))
    -      + '\n
    '; - } - - return '
    '
    -    + (escaped ? code : escape(code, true))
    -    + '\n
    \n'; -}; - -Renderer.prototype.blockquote = function(quote) { - return '
    \n' + quote + '
    \n'; -}; - -Renderer.prototype.html = function(html) { - return html; -}; - -Renderer.prototype.heading = function(text, level, raw) { - return '' - + text - + '\n'; -}; - -Renderer.prototype.hr = function() { - return this.options.xhtml ? '
    \n' : '
    \n'; -}; - -Renderer.prototype.list = function(body, ordered) { - var type = ordered ? 'ol' : 'ul'; - return '<' + type + '>\n' + body + '\n'; -}; - -Renderer.prototype.listitem = function(text) { - return '
  • ' + text + '
  • \n'; -}; - -Renderer.prototype.paragraph = function(text) { - return '

    ' + text + '

    \n'; -}; - -Renderer.prototype.table = function(header, body) { - return '\n' - + '\n' - + header - + '\n' - + '\n' - + body - + '\n' - + '
    \n'; -}; - -Renderer.prototype.tablerow = function(content) { - return '\n' + content + '\n'; -}; - -Renderer.prototype.tablecell = function(content, flags) { - var type = flags.header ? 'th' : 'td'; - var tag = flags.align - ? '<' + type + ' style="text-align:' + flags.align + '">' - : '<' + type + '>'; - return tag + content + '\n'; -}; - -// span level renderer -Renderer.prototype.strong = function(text) { - return '' + text + ''; -}; - -Renderer.prototype.em = function(text) { - return '' + text + ''; -}; - -Renderer.prototype.codespan = function(text) { - return '' + text + ''; -}; - -Renderer.prototype.br = function() { - return this.options.xhtml ? '
    ' : '
    '; -}; - -Renderer.prototype.del = function(text) { - return '' + text + ''; -}; - -Renderer.prototype.link = function(href, title, text) { - if (this.options.sanitize) { - try { - var prot = decodeURIComponent(unescape(href)) - .replace(/[^\w:]/g, '') - .toLowerCase(); - } catch (e) { - return ''; - } - if (prot.indexOf('javascript:') === 0 || prot.indexOf('vbscript:') === 0) { - return ''; - } - } - var out = '
    '; - return out; -}; - -Renderer.prototype.image = function(href, title, text) { - var out = '' + text + '' : '>'; - return out; -}; - -Renderer.prototype.text = function(text) { - return text; -}; - -/** - * Parsing & Compiling - */ - -function Parser(options) { - this.tokens = []; - this.token = null; - this.options = options || marked.defaults; - this.options.renderer = this.options.renderer || new Renderer; - this.renderer = this.options.renderer; - this.renderer.options = this.options; -} - -/** - * Static Parse Method - */ - -Parser.parse = function(src, options, renderer) { - var parser = new Parser(options, renderer); - return parser.parse(src); -}; - -/** - * Parse Loop - */ - -Parser.prototype.parse = function(src) { - this.inline = new InlineLexer(src.links, this.options, this.renderer); - this.tokens = src.reverse(); - - var out = ''; - while (this.next()) { - out += this.tok(); - } - - return out; -}; - -/** - * Next Token - */ - -Parser.prototype.next = function() { - return this.token = this.tokens.pop(); -}; - -/** - * Preview Next Token - */ - -Parser.prototype.peek = function() { - return this.tokens[this.tokens.length - 1] || 0; -}; - -/** - * Parse Text Tokens - */ - -Parser.prototype.parseText = function() { - var body = this.token.text; - - while (this.peek().type === 'text') { - body += '\n' + this.next().text; - } - - return this.inline.output(body); -}; - -/** - * Parse Current Token - */ - -Parser.prototype.tok = function() { - switch (this.token.type) { - case 'space': { - return ''; - } - case 'hr': { - return this.renderer.hr(); - } - case 'heading': { - return this.renderer.heading( - this.inline.output(this.token.text), - this.token.depth, - this.token.text); - } - case 'code': { - return this.renderer.code(this.token.text, - this.token.lang, - this.token.escaped); - } - case 'table': { - var header = '' - , body = '' - , i - , row - , cell - , flags - , j; - - // header - cell = ''; - for (i = 0; i < this.token.header.length; i++) { - flags = { header: true, align: this.token.align[i] }; - cell += this.renderer.tablecell( - this.inline.output(this.token.header[i]), - { header: true, align: this.token.align[i] } - ); - } - header += this.renderer.tablerow(cell); - - for (i = 0; i < this.token.cells.length; i++) { - row = this.token.cells[i]; - - cell = ''; - for (j = 0; j < row.length; j++) { - cell += this.renderer.tablecell( - this.inline.output(row[j]), - { header: false, align: this.token.align[j] } - ); - } - - body += this.renderer.tablerow(cell); - } - return this.renderer.table(header, body); - } - case 'blockquote_start': { - var body = ''; - - while (this.next().type !== 'blockquote_end') { - body += this.tok(); - } - - return this.renderer.blockquote(body); - } - case 'list_start': { - var body = '' - , ordered = this.token.ordered; - - while (this.next().type !== 'list_end') { - body += this.tok(); - } - - return this.renderer.list(body, ordered); - } - case 'list_item_start': { - var body = ''; - - while (this.next().type !== 'list_item_end') { - body += this.token.type === 'text' - ? this.parseText() - : this.tok(); - } - - return this.renderer.listitem(body); - } - case 'loose_item_start': { - var body = ''; - - while (this.next().type !== 'list_item_end') { - body += this.tok(); - } - - return this.renderer.listitem(body); - } - case 'html': { - var html = !this.token.pre && !this.options.pedantic - ? this.inline.output(this.token.text) - : this.token.text; - return this.renderer.html(html); - } - case 'paragraph': { - return this.renderer.paragraph(this.inline.output(this.token.text)); - } - case 'text': { - return this.renderer.paragraph(this.parseText()); - } - } -}; - -/** - * Helpers - */ - -function escape(html, encode) { - return html - .replace(!encode ? /&(?!#?\w+;)/g : /&/g, '&') - .replace(//g, '>') - .replace(/"/g, '"') - .replace(/'/g, '''); -} - -function unescape(html) { - // explicitly match decimal, hex, and named HTML entities - return html.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/g, function(_, n) { - n = n.toLowerCase(); - if (n === 'colon') return ':'; - if (n.charAt(0) === '#') { - return n.charAt(1) === 'x' - ? String.fromCharCode(parseInt(n.substring(2), 16)) - : String.fromCharCode(+n.substring(1)); - } - return ''; - }); -} - -function replace(regex, opt) { - regex = regex.source; - opt = opt || ''; - return function self(name, val) { - if (!name) return new RegExp(regex, opt); - val = val.source || val; - val = val.replace(/(^|[^\[])\^/g, '$1'); - regex = regex.replace(name, val); - return self; - }; -} - -function noop() {} -noop.exec = noop; - -function merge(obj) { - var i = 1 - , target - , key; - - for (; i < arguments.length; i++) { - target = arguments[i]; - for (key in target) { - if (Object.prototype.hasOwnProperty.call(target, key)) { - obj[key] = target[key]; - } - } - } - - return obj; -} - - -/** - * Marked - */ - -function marked(src, opt, callback) { - if (callback || typeof opt === 'function') { - if (!callback) { - callback = opt; - opt = null; - } - - opt = merge({}, marked.defaults, opt || {}); - - var highlight = opt.highlight - , tokens - , pending - , i = 0; - - try { - tokens = Lexer.lex(src, opt) - } catch (e) { - return callback(e); - } - - pending = tokens.length; - - var done = function(err) { - if (err) { - opt.highlight = highlight; - return callback(err); - } - - var out; - - try { - out = Parser.parse(tokens, opt); - } catch (e) { - err = e; - } - - opt.highlight = highlight; - - return err - ? callback(err) - : callback(null, out); - }; - - if (!highlight || highlight.length < 3) { - return done(); - } - - delete opt.highlight; - - if (!pending) return done(); - - for (; i < tokens.length; i++) { - (function(token) { - if (token.type !== 'code') { - return --pending || done(); - } - return highlight(token.text, token.lang, function(err, code) { - if (err) return done(err); - if (code == null || code === token.text) { - return --pending || done(); - } - token.text = code; - token.escaped = true; - --pending || done(); - }); - })(tokens[i]); - } - - return; - } - try { - if (opt) opt = merge({}, marked.defaults, opt); - return Parser.parse(Lexer.lex(src, opt), opt); - } catch (e) { - e.message += '\nPlease report this to https://github.com/chjj/marked.'; - if ((opt || marked.defaults).silent) { - return '

    An error occured:

    '
    -        + escape(e.message + '', true)
    -        + '
    '; - } - throw e; - } -} - -/** - * Options - */ - -marked.options = -marked.setOptions = function(opt) { - merge(marked.defaults, opt); - return marked; -}; - -marked.defaults = { - gfm: true, - tables: true, - breaks: false, - pedantic: false, - sanitize: false, - sanitizer: null, - mangle: true, - smartLists: false, - silent: false, - highlight: null, - langPrefix: 'lang-', - smartypants: false, - headerPrefix: '', - renderer: new Renderer, - xhtml: false -}; - -/** - * Expose - */ - -marked.Parser = Parser; -marked.parser = Parser.parse; - -marked.Renderer = Renderer; - -marked.Lexer = Lexer; -marked.lexer = Lexer.lex; - -marked.InlineLexer = InlineLexer; -marked.inlineLexer = InlineLexer.output; - -marked.parse = marked; - -if (typeof module !== 'undefined' && typeof exports === 'object') { - module.exports = marked; -} else if (typeof define === 'function' && define.amd) { - define('marked',[],function() { return marked; }); -} else { - this.marked = marked; -} - -}).call(function() { - return this || (typeof window !== 'undefined' ? window : global); -}()); - -/*! - Autosize 3.0.19 - license: MIT - http://www.jacklmoore.com/autosize -*/ -(function (global, factory) { - if (typeof define === 'function' && define.amd) { - define('autosize',['exports', 'module'], factory); - } else if (typeof exports !== 'undefined' && typeof module !== 'undefined') { - factory(exports, module); - } else { - var mod = { - exports: {} - }; - factory(mod.exports, mod); - global.autosize = mod.exports; - } -})(this, function (exports, module) { - 'use strict'; - - var map = typeof Map === "function" ? new Map() : (function () { - var keys = []; - var values = []; - - return { - has: function has(key) { - return keys.indexOf(key) > -1; - }, - get: function get(key) { - return values[keys.indexOf(key)]; - }, - set: function set(key, value) { - if (keys.indexOf(key) === -1) { - keys.push(key); - values.push(value); - } - }, - 'delete': function _delete(key) { - var index = keys.indexOf(key); - if (index > -1) { - keys.splice(index, 1); - values.splice(index, 1); - } - } - }; - })(); - - var createEvent = function createEvent(name) { - return new Event(name, { bubbles: true }); - }; - try { - new Event('test'); - } catch (e) { - // IE does not support `new Event()` - createEvent = function (name) { - var evt = document.createEvent('Event'); - evt.initEvent(name, true, false); - return evt; - }; - } - - function assign(ta) { - if (!ta || !ta.nodeName || ta.nodeName !== 'TEXTAREA' || map.has(ta)) return; - - var heightOffset = null; - var clientWidth = ta.clientWidth; - var cachedHeight = null; - - function init() { - var style = window.getComputedStyle(ta, null); - - if (style.resize === 'vertical') { - ta.style.resize = 'none'; - } else if (style.resize === 'both') { - ta.style.resize = 'horizontal'; - } - - if (style.boxSizing === 'content-box') { - heightOffset = -(parseFloat(style.paddingTop) + parseFloat(style.paddingBottom)); - } else { - heightOffset = parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth); - } - // Fix when a textarea is not on document body and heightOffset is Not a Number - if (isNaN(heightOffset)) { - heightOffset = 0; - } - - update(); - } - - function changeOverflow(value) { - { - // Chrome/Safari-specific fix: - // When the textarea y-overflow is hidden, Chrome/Safari do not reflow the text to account for the space - // made available by removing the scrollbar. The following forces the necessary text reflow. - var width = ta.style.width; - ta.style.width = '0px'; - // Force reflow: - /* jshint ignore:start */ - ta.offsetWidth; - /* jshint ignore:end */ - ta.style.width = width; - } - - ta.style.overflowY = value; - - resize(); - } - - function getParentOverflows(el) { - var arr = []; - - while (el && el.parentNode && el.parentNode instanceof Element) { - if (el.parentNode.scrollTop) { - arr.push({ - node: el.parentNode, - scrollTop: el.parentNode.scrollTop - }); - } - el = el.parentNode; - } - - return arr; - } - - function resize() { - var originalHeight = ta.style.height; - var overflows = getParentOverflows(ta); - var docTop = document.documentElement && document.documentElement.scrollTop; // Needed for Mobile IE (ticket #240) - - ta.style.height = 'auto'; - - var endHeight = ta.scrollHeight + heightOffset; - - if (ta.scrollHeight === 0) { - // If the scrollHeight is 0, then the element probably has display:none or is detached from the DOM. - ta.style.height = originalHeight; - return; - } - - ta.style.height = endHeight + 'px'; - - // used to check if an update is actually necessary on window.resize - clientWidth = ta.clientWidth; - - // prevents scroll-position jumping - overflows.forEach(function (el) { - el.node.scrollTop = el.scrollTop; - }); - - if (docTop) { - document.documentElement.scrollTop = docTop; - } - } - - function update() { - resize(); - - var computed = window.getComputedStyle(ta, null); - var computedHeight = Math.round(parseFloat(computed.height)); - var styleHeight = Math.round(parseFloat(ta.style.height)); - - // The computed height not matching the height set via resize indicates that - // the max-height has been exceeded, in which case the overflow should be set to visible. - if (computedHeight !== styleHeight) { - if (computed.overflowY !== 'visible') { - changeOverflow('visible'); - } - } else { - // Normally keep overflow set to hidden, to avoid flash of scrollbar as the textarea expands. - if (computed.overflowY !== 'hidden') { - changeOverflow('hidden'); - } - } - - if (cachedHeight !== computedHeight) { - cachedHeight = computedHeight; - var evt = createEvent('autosize:resized'); - try { - ta.dispatchEvent(evt); - } catch (err) { - // Firefox will throw an error on dispatchEvent for a detached element - // https://bugzilla.mozilla.org/show_bug.cgi?id=889376 - } - } - } - - var pageResize = function pageResize() { - if (ta.clientWidth !== clientWidth) { - update(); - } - }; - - var destroy = (function (style) { - window.removeEventListener('resize', pageResize, false); - ta.removeEventListener('input', update, false); - ta.removeEventListener('keyup', update, false); - ta.removeEventListener('autosize:destroy', destroy, false); - ta.removeEventListener('autosize:update', update, false); - - Object.keys(style).forEach(function (key) { - ta.style[key] = style[key]; - }); - - map['delete'](ta); - }).bind(ta, { - height: ta.style.height, - resize: ta.style.resize, - overflowY: ta.style.overflowY, - overflowX: ta.style.overflowX, - wordWrap: ta.style.wordWrap - }); - - ta.addEventListener('autosize:destroy', destroy, false); - - // IE9 does not fire onpropertychange or oninput for deletions, - // so binding to onkeyup to catch most of those events. - // There is no way that I know of to detect something like 'cut' in IE9. - if ('onpropertychange' in ta && 'oninput' in ta) { - ta.addEventListener('keyup', update, false); - } - - window.addEventListener('resize', pageResize, false); - ta.addEventListener('input', update, false); - ta.addEventListener('autosize:update', update, false); - ta.style.overflowX = 'hidden'; - ta.style.wordWrap = 'break-word'; - - map.set(ta, { - destroy: destroy, - update: update - }); - - init(); - } - - function destroy(ta) { - var methods = map.get(ta); - if (methods) { - methods.destroy(); - } - } - - function update(ta) { - var methods = map.get(ta); - if (methods) { - methods.update(); - } - } - - var autosize = null; - - // Do nothing in Node.js environment and IE8 (or lower) - if (typeof window === 'undefined' || typeof window.getComputedStyle !== 'function') { - autosize = function (el) { - return el; - }; - autosize.destroy = function (el) { - return el; - }; - autosize.update = function (el) { - return el; - }; - } else { - autosize = function (el, options) { - if (el) { - Array.prototype.forEach.call(el.length ? el : [el], function (x) { - return assign(x, options); - }); - } - return el; - }; - autosize.destroy = function (el) { - if (el) { - Array.prototype.forEach.call(el.length ? el : [el], destroy); - } - return el; - }; - autosize.update = function (el) { - if (el) { - Array.prototype.forEach.call(el.length ? el : [el], update); - } - return el; - }; - } - - module.exports = autosize; -}); -// Import support https://stackoverflow.com/questions/13673346/supporting-both-commonjs-and-amd -(function(name, definition) { - if (typeof module !== "undefined") { module.exports = definition(); } - else if (typeof define === "function" && typeof define.amd === "object") { define('clipboard-js',definition); } - else { this[name] = definition(); } -}("clipboard", function() { - if (typeof document === 'undefined' || !document.addEventListener) { - return null; - } - - var clipboard = {}; - - clipboard.copy = (function() { - var _intercept = false; - var _data = null; // Map from data type (e.g. "text/html") to value. - var _bogusSelection = false; - - function cleanup() { - _intercept = false; - _data = null; - if (_bogusSelection) { - window.getSelection().removeAllRanges(); - } - _bogusSelection = false; - } - - document.addEventListener("copy", function(e) { - if (_intercept) { - for (var key in _data) { - e.clipboardData.setData(key, _data[key]); - } - e.preventDefault(); - } - }); - - // Workaround for Safari: https://bugs.webkit.org/show_bug.cgi?id=156529 - function bogusSelect() { - var sel = document.getSelection(); - // If "nothing" is selected... - if (!document.queryCommandEnabled("copy") && sel.isCollapsed) { - // ... temporarily select the entire body. - // - // We select the entire body because: - // - it's guaranteed to exist, - // - it works (unlike, say, document.head, or phantom element that is - // not inserted into the DOM), - // - it doesn't seem to flicker (due to the synchronous copy event), and - // - it avoids modifying the DOM (can trigger mutation observers). - // - // Because we can't do proper feature detection (we already checked - // document.queryCommandEnabled("copy") , which actually gives a false - // negative for Blink when nothing is selected) and UA sniffing is not - // reliable (a lot of UA strings contain "Safari"), this will also - // happen for some browsers other than Safari. :-() - var range = document.createRange(); - range.selectNodeContents(document.body); - sel.addRange(range); - _bogusSelection = true; - } - }; - - return function(data) { - return new Promise(function(resolve, reject) { - _intercept = true; - if (typeof data === "string") { - _data = {"text/plain": data}; - } else if (data instanceof Node) { - _data = {"text/html": new XMLSerializer().serializeToString(data)}; - } else { - _data = data; - } - try { - bogusSelect(); - if (document.execCommand("copy")) { - // document.execCommand is synchronous: http://www.w3.org/TR/2015/WD-clipboard-apis-20150421/#integration-with-rich-text-editing-apis - // So we can call resolve() back here. - cleanup(); - resolve(); - } - else { - throw new Error("Unable to copy. Perhaps it's not available in your browser?"); - } - } catch (e) { - cleanup(); - reject(e); - } - }); - }; - })(); - - clipboard.paste = (function() { - var _intercept = false; - var _resolve; - var _dataType; - - document.addEventListener("paste", function(e) { - if (_intercept) { - _intercept = false; - e.preventDefault(); - var resolve = _resolve; - _resolve = null; - resolve(e.clipboardData.getData(_dataType)); - } - }); - - return function(dataType) { - return new Promise(function(resolve, reject) { - _intercept = true; - _resolve = resolve; - _dataType = dataType || "text/plain"; - try { - if (!document.execCommand("paste")) { - _intercept = false; - reject(new Error("Unable to paste. Pasting only works in Internet Explorer at the moment.")); - } - } catch (e) { - _intercept = false; - reject(new Error(e)); - } - }); - }; - })(); - - // Handle IE behaviour. - if (typeof ClipboardEvent === "undefined" && - typeof window.clipboardData !== "undefined" && - typeof window.clipboardData.setData !== "undefined") { - - /*! promise-polyfill 2.0.1 */ - (function(a){function b(a,b){return function(){a.apply(b,arguments)}}function c(a){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof a)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],i(a,b(e,this),b(f,this))}function d(a){var b=this;return null===this._state?void this._deferreds.push(a):void j(function(){var c=b._state?a.onFulfilled:a.onRejected;if(null===c)return void(b._state?a.resolve:a.reject)(b._value);var d;try{d=c(b._value)}catch(e){return void a.reject(e)}a.resolve(d)})}function e(a){try{if(a===this)throw new TypeError("A promise cannot be resolved with itself.");if(a&&("object"==typeof a||"function"==typeof a)){var c=a.then;if("function"==typeof c)return void i(b(c,a),b(e,this),b(f,this))}this._state=!0,this._value=a,g.call(this)}catch(d){f.call(this,d)}}function f(a){this._state=!1,this._value=a,g.call(this)}function g(){for(var a=0,b=this._deferreds.length;b>a;a++)d.call(this,this._deferreds[a]);this._deferreds=null}function h(a,b,c,d){this.onFulfilled="function"==typeof a?a:null,this.onRejected="function"==typeof b?b:null,this.resolve=c,this.reject=d}function i(a,b,c){var d=!1;try{a(function(a){d||(d=!0,b(a))},function(a){d||(d=!0,c(a))})}catch(e){if(d)return;d=!0,c(e)}}var j=c.immediateFn||"function"==typeof setImmediate&&setImmediate||function(a){setTimeout(a,1)},k=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)};c.prototype["catch"]=function(a){return this.then(null,a)},c.prototype.then=function(a,b){var e=this;return new c(function(c,f){d.call(e,new h(a,b,c,f))})},c.all=function(){var a=Array.prototype.slice.call(1===arguments.length&&k(arguments[0])?arguments[0]:arguments);return new c(function(b,c){function d(f,g){try{if(g&&("object"==typeof g||"function"==typeof g)){var h=g.then;if("function"==typeof h)return void h.call(g,function(a){d(f,a)},c)}a[f]=g,0===--e&&b(a)}catch(i){c(i)}}if(0===a.length)return b([]);for(var e=a.length,f=0;fd;d++)a[d].then(b,c)})},"undefined"!=typeof module&&module.exports?module.exports=c:a.Promise||(a.Promise=c)})(this); - - clipboard.copy = function(data) { - return new Promise(function(resolve, reject) { - // IE supports string and URL types: https://msdn.microsoft.com/en-us/library/ms536744(v=vs.85).aspx - // We only support the string type for now. - if (typeof data !== "string" && !("text/plain" in data)) { - throw new Error("You must provide a text/plain type."); - } - - var strData = (typeof data === "string" ? data : data["text/plain"]); - var copySucceeded = window.clipboardData.setData("Text", strData); - if (copySucceeded) { - resolve(); - } else { - reject(new Error("Copying was rejected.")); - } - }); - }; - - clipboard.paste = function() { - return new Promise(function(resolve, reject) { - var strData = window.clipboardData.getData("Text"); - if (strData) { - resolve(strData); - } else { - // The user rejected the paste request. - reject(new Error("Pasting was rejected.")); - } - }); - }; - } - - return clipboard; -})); - -//! moment.js -//! version : 2.17.1 -//! authors : Tim Wood, Iskren Chernev, Moment.js contributors -//! license : MIT -//! momentjs.com - -;(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : - typeof define === 'function' && define.amd ? define('moment',factory) : - global.moment = factory() -}(this, (function () { 'use strict'; - -var hookCallback; - -function hooks () { - return hookCallback.apply(null, arguments); -} - -// This is done to register the method called with moment() -// without creating circular dependencies. -function setHookCallback (callback) { - hookCallback = callback; -} - -function isArray(input) { - return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]'; -} - -function isObject(input) { - // IE8 will treat undefined and null as object if it wasn't for - // input != null - return input != null && Object.prototype.toString.call(input) === '[object Object]'; -} - -function isObjectEmpty(obj) { - var k; - for (k in obj) { - // even if its not own property I'd still call it non-empty - return false; - } - return true; -} - -function isNumber(input) { - return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]'; -} - -function isDate(input) { - return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]'; -} - -function map(arr, fn) { - var res = [], i; - for (i = 0; i < arr.length; ++i) { - res.push(fn(arr[i], i)); - } - return res; -} - -function hasOwnProp(a, b) { - return Object.prototype.hasOwnProperty.call(a, b); -} - -function extend(a, b) { - for (var i in b) { - if (hasOwnProp(b, i)) { - a[i] = b[i]; - } - } - - if (hasOwnProp(b, 'toString')) { - a.toString = b.toString; - } - - if (hasOwnProp(b, 'valueOf')) { - a.valueOf = b.valueOf; - } - - return a; -} - -function createUTC (input, format, locale, strict) { - return createLocalOrUTC(input, format, locale, strict, true).utc(); -} - -function defaultParsingFlags() { - // We need to deep clone this object. - return { - empty : false, - unusedTokens : [], - unusedInput : [], - overflow : -2, - charsLeftOver : 0, - nullInput : false, - invalidMonth : null, - invalidFormat : false, - userInvalidated : false, - iso : false, - parsedDateParts : [], - meridiem : null - }; -} - -function getParsingFlags(m) { - if (m._pf == null) { - m._pf = defaultParsingFlags(); - } - return m._pf; -} - -var some; -if (Array.prototype.some) { - some = Array.prototype.some; -} else { - some = function (fun) { - var t = Object(this); - var len = t.length >>> 0; - - for (var i = 0; i < len; i++) { - if (i in t && fun.call(this, t[i], i, t)) { - return true; - } - } - - return false; - }; -} - -var some$1 = some; - -function isValid(m) { - if (m._isValid == null) { - var flags = getParsingFlags(m); - var parsedParts = some$1.call(flags.parsedDateParts, function (i) { - return i != null; - }); - var isNowValid = !isNaN(m._d.getTime()) && - flags.overflow < 0 && - !flags.empty && - !flags.invalidMonth && - !flags.invalidWeekday && - !flags.nullInput && - !flags.invalidFormat && - !flags.userInvalidated && - (!flags.meridiem || (flags.meridiem && parsedParts)); - - if (m._strict) { - isNowValid = isNowValid && - flags.charsLeftOver === 0 && - flags.unusedTokens.length === 0 && - flags.bigHour === undefined; - } - - if (Object.isFrozen == null || !Object.isFrozen(m)) { - m._isValid = isNowValid; - } - else { - return isNowValid; - } - } - return m._isValid; -} - -function createInvalid (flags) { - var m = createUTC(NaN); - if (flags != null) { - extend(getParsingFlags(m), flags); - } - else { - getParsingFlags(m).userInvalidated = true; - } - - return m; -} - -function isUndefined(input) { - return input === void 0; -} - -// Plugins that add properties should also add the key here (null value), -// so we can properly clone ourselves. -var momentProperties = hooks.momentProperties = []; - -function copyConfig(to, from) { - var i, prop, val; - - if (!isUndefined(from._isAMomentObject)) { - to._isAMomentObject = from._isAMomentObject; - } - if (!isUndefined(from._i)) { - to._i = from._i; - } - if (!isUndefined(from._f)) { - to._f = from._f; - } - if (!isUndefined(from._l)) { - to._l = from._l; - } - if (!isUndefined(from._strict)) { - to._strict = from._strict; - } - if (!isUndefined(from._tzm)) { - to._tzm = from._tzm; - } - if (!isUndefined(from._isUTC)) { - to._isUTC = from._isUTC; - } - if (!isUndefined(from._offset)) { - to._offset = from._offset; - } - if (!isUndefined(from._pf)) { - to._pf = getParsingFlags(from); - } - if (!isUndefined(from._locale)) { - to._locale = from._locale; - } - - if (momentProperties.length > 0) { - for (i in momentProperties) { - prop = momentProperties[i]; - val = from[prop]; - if (!isUndefined(val)) { - to[prop] = val; - } - } - } - - return to; -} - -var updateInProgress = false; - -// Moment prototype object -function Moment(config) { - copyConfig(this, config); - this._d = new Date(config._d != null ? config._d.getTime() : NaN); - if (!this.isValid()) { - this._d = new Date(NaN); - } - // Prevent infinite loop in case updateOffset creates new moment - // objects. - if (updateInProgress === false) { - updateInProgress = true; - hooks.updateOffset(this); - updateInProgress = false; - } -} - -function isMoment (obj) { - return obj instanceof Moment || (obj != null && obj._isAMomentObject != null); -} - -function absFloor (number) { - if (number < 0) { - // -0 -> 0 - return Math.ceil(number) || 0; - } else { - return Math.floor(number); - } -} - -function toInt(argumentForCoercion) { - var coercedNumber = +argumentForCoercion, - value = 0; - - if (coercedNumber !== 0 && isFinite(coercedNumber)) { - value = absFloor(coercedNumber); - } - - return value; -} - -// compare two arrays, return the number of differences -function compareArrays(array1, array2, dontConvert) { - var len = Math.min(array1.length, array2.length), - lengthDiff = Math.abs(array1.length - array2.length), - diffs = 0, - i; - for (i = 0; i < len; i++) { - if ((dontConvert && array1[i] !== array2[i]) || - (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) { - diffs++; - } - } - return diffs + lengthDiff; -} - -function warn(msg) { - if (hooks.suppressDeprecationWarnings === false && - (typeof console !== 'undefined') && console.warn) { - console.warn('Deprecation warning: ' + msg); - } -} - -function deprecate(msg, fn) { - var firstTime = true; - - return extend(function () { - if (hooks.deprecationHandler != null) { - hooks.deprecationHandler(null, msg); - } - if (firstTime) { - var args = []; - var arg; - for (var i = 0; i < arguments.length; i++) { - arg = ''; - if (typeof arguments[i] === 'object') { - arg += '\n[' + i + '] '; - for (var key in arguments[0]) { - arg += key + ': ' + arguments[0][key] + ', '; - } - arg = arg.slice(0, -2); // Remove trailing comma and space - } else { - arg = arguments[i]; - } - args.push(arg); - } - warn(msg + '\nArguments: ' + Array.prototype.slice.call(args).join('') + '\n' + (new Error()).stack); - firstTime = false; - } - return fn.apply(this, arguments); - }, fn); -} - -var deprecations = {}; - -function deprecateSimple(name, msg) { - if (hooks.deprecationHandler != null) { - hooks.deprecationHandler(name, msg); - } - if (!deprecations[name]) { - warn(msg); - deprecations[name] = true; - } -} - -hooks.suppressDeprecationWarnings = false; -hooks.deprecationHandler = null; - -function isFunction(input) { - return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]'; -} - -function set (config) { - var prop, i; - for (i in config) { - prop = config[i]; - if (isFunction(prop)) { - this[i] = prop; - } else { - this['_' + i] = prop; - } - } - this._config = config; - // Lenient ordinal parsing accepts just a number in addition to - // number + (possibly) stuff coming from _ordinalParseLenient. - this._ordinalParseLenient = new RegExp(this._ordinalParse.source + '|' + (/\d{1,2}/).source); -} - -function mergeConfigs(parentConfig, childConfig) { - var res = extend({}, parentConfig), prop; - for (prop in childConfig) { - if (hasOwnProp(childConfig, prop)) { - if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) { - res[prop] = {}; - extend(res[prop], parentConfig[prop]); - extend(res[prop], childConfig[prop]); - } else if (childConfig[prop] != null) { - res[prop] = childConfig[prop]; - } else { - delete res[prop]; - } - } - } - for (prop in parentConfig) { - if (hasOwnProp(parentConfig, prop) && - !hasOwnProp(childConfig, prop) && - isObject(parentConfig[prop])) { - // make sure changes to properties don't modify parent config - res[prop] = extend({}, res[prop]); - } - } - return res; -} - -function Locale(config) { - if (config != null) { - this.set(config); - } -} - -var keys; - -if (Object.keys) { - keys = Object.keys; -} else { - keys = function (obj) { - var i, res = []; - for (i in obj) { - if (hasOwnProp(obj, i)) { - res.push(i); - } - } - return res; - }; -} - -var keys$1 = keys; - -var defaultCalendar = { - sameDay : '[Today at] LT', - nextDay : '[Tomorrow at] LT', - nextWeek : 'dddd [at] LT', - lastDay : '[Yesterday at] LT', - lastWeek : '[Last] dddd [at] LT', - sameElse : 'L' -}; - -function calendar (key, mom, now) { - var output = this._calendar[key] || this._calendar['sameElse']; - return isFunction(output) ? output.call(mom, now) : output; -} - -var defaultLongDateFormat = { - LTS : 'h:mm:ss A', - LT : 'h:mm A', - L : 'MM/DD/YYYY', - LL : 'MMMM D, YYYY', - LLL : 'MMMM D, YYYY h:mm A', - LLLL : 'dddd, MMMM D, YYYY h:mm A' -}; - -function longDateFormat (key) { - var format = this._longDateFormat[key], - formatUpper = this._longDateFormat[key.toUpperCase()]; - - if (format || !formatUpper) { - return format; - } - - this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) { - return val.slice(1); - }); - - return this._longDateFormat[key]; -} - -var defaultInvalidDate = 'Invalid date'; - -function invalidDate () { - return this._invalidDate; -} - -var defaultOrdinal = '%d'; -var defaultOrdinalParse = /\d{1,2}/; - -function ordinal (number) { - return this._ordinal.replace('%d', number); -} - -var defaultRelativeTime = { - future : 'in %s', - past : '%s ago', - s : 'a few seconds', - m : 'a minute', - mm : '%d minutes', - h : 'an hour', - hh : '%d hours', - d : 'a day', - dd : '%d days', - M : 'a month', - MM : '%d months', - y : 'a year', - yy : '%d years' -}; - -function relativeTime (number, withoutSuffix, string, isFuture) { - var output = this._relativeTime[string]; - return (isFunction(output)) ? - output(number, withoutSuffix, string, isFuture) : - output.replace(/%d/i, number); -} - -function pastFuture (diff, output) { - var format = this._relativeTime[diff > 0 ? 'future' : 'past']; - return isFunction(format) ? format(output) : format.replace(/%s/i, output); -} - -var aliases = {}; - -function addUnitAlias (unit, shorthand) { - var lowerCase = unit.toLowerCase(); - aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit; -} - -function normalizeUnits(units) { - return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined; -} - -function normalizeObjectUnits(inputObject) { - var normalizedInput = {}, - normalizedProp, - prop; - - for (prop in inputObject) { - if (hasOwnProp(inputObject, prop)) { - normalizedProp = normalizeUnits(prop); - if (normalizedProp) { - normalizedInput[normalizedProp] = inputObject[prop]; - } - } - } - - return normalizedInput; -} - -var priorities = {}; - -function addUnitPriority(unit, priority) { - priorities[unit] = priority; -} - -function getPrioritizedUnits(unitsObj) { - var units = []; - for (var u in unitsObj) { - units.push({unit: u, priority: priorities[u]}); - } - units.sort(function (a, b) { - return a.priority - b.priority; - }); - return units; -} - -function makeGetSet (unit, keepTime) { - return function (value) { - if (value != null) { - set$1(this, unit, value); - hooks.updateOffset(this, keepTime); - return this; - } else { - return get(this, unit); - } - }; -} - -function get (mom, unit) { - return mom.isValid() ? - mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN; -} - -function set$1 (mom, unit, value) { - if (mom.isValid()) { - mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value); - } -} - -// MOMENTS - -function stringGet (units) { - units = normalizeUnits(units); - if (isFunction(this[units])) { - return this[units](); - } - return this; -} - - -function stringSet (units, value) { - if (typeof units === 'object') { - units = normalizeObjectUnits(units); - var prioritized = getPrioritizedUnits(units); - for (var i = 0; i < prioritized.length; i++) { - this[prioritized[i].unit](units[prioritized[i].unit]); - } - } else { - units = normalizeUnits(units); - if (isFunction(this[units])) { - return this[units](value); - } - } - return this; -} - -function zeroFill(number, targetLength, forceSign) { - var absNumber = '' + Math.abs(number), - zerosToFill = targetLength - absNumber.length, - sign = number >= 0; - return (sign ? (forceSign ? '+' : '') : '-') + - Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber; -} - -var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g; - -var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g; - -var formatFunctions = {}; - -var formatTokenFunctions = {}; - -// token: 'M' -// padded: ['MM', 2] -// ordinal: 'Mo' -// callback: function () { this.month() + 1 } -function addFormatToken (token, padded, ordinal, callback) { - var func = callback; - if (typeof callback === 'string') { - func = function () { - return this[callback](); - }; - } - if (token) { - formatTokenFunctions[token] = func; - } - if (padded) { - formatTokenFunctions[padded[0]] = function () { - return zeroFill(func.apply(this, arguments), padded[1], padded[2]); - }; - } - if (ordinal) { - formatTokenFunctions[ordinal] = function () { - return this.localeData().ordinal(func.apply(this, arguments), token); - }; - } -} - -function removeFormattingTokens(input) { - if (input.match(/\[[\s\S]/)) { - return input.replace(/^\[|\]$/g, ''); - } - return input.replace(/\\/g, ''); -} - -function makeFormatFunction(format) { - var array = format.match(formattingTokens), i, length; - - for (i = 0, length = array.length; i < length; i++) { - if (formatTokenFunctions[array[i]]) { - array[i] = formatTokenFunctions[array[i]]; - } else { - array[i] = removeFormattingTokens(array[i]); - } - } - - return function (mom) { - var output = '', i; - for (i = 0; i < length; i++) { - output += array[i] instanceof Function ? array[i].call(mom, format) : array[i]; - } - return output; - }; -} - -// format date using native date object -function formatMoment(m, format) { - if (!m.isValid()) { - return m.localeData().invalidDate(); - } - - format = expandFormat(format, m.localeData()); - formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format); - - return formatFunctions[format](m); -} - -function expandFormat(format, locale) { - var i = 5; - - function replaceLongDateFormatTokens(input) { - return locale.longDateFormat(input) || input; - } - - localFormattingTokens.lastIndex = 0; - while (i >= 0 && localFormattingTokens.test(format)) { - format = format.replace(localFormattingTokens, replaceLongDateFormatTokens); - localFormattingTokens.lastIndex = 0; - i -= 1; - } - - return format; -} - -var match1 = /\d/; // 0 - 9 -var match2 = /\d\d/; // 00 - 99 -var match3 = /\d{3}/; // 000 - 999 -var match4 = /\d{4}/; // 0000 - 9999 -var match6 = /[+-]?\d{6}/; // -999999 - 999999 -var match1to2 = /\d\d?/; // 0 - 99 -var match3to4 = /\d\d\d\d?/; // 999 - 9999 -var match5to6 = /\d\d\d\d\d\d?/; // 99999 - 999999 -var match1to3 = /\d{1,3}/; // 0 - 999 -var match1to4 = /\d{1,4}/; // 0 - 9999 -var match1to6 = /[+-]?\d{1,6}/; // -999999 - 999999 - -var matchUnsigned = /\d+/; // 0 - inf -var matchSigned = /[+-]?\d+/; // -inf - inf - -var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z -var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z - -var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123 - -// any word (or two) characters or numbers including two/three word month in arabic. -// includes scottish gaelic two word and hyphenated months -var matchWord = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i; - - -var regexes = {}; - -function addRegexToken (token, regex, strictRegex) { - regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) { - return (isStrict && strictRegex) ? strictRegex : regex; - }; -} - -function getParseRegexForToken (token, config) { - if (!hasOwnProp(regexes, token)) { - return new RegExp(unescapeFormat(token)); - } - - return regexes[token](config._strict, config._locale); -} - -// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript -function unescapeFormat(s) { - return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) { - return p1 || p2 || p3 || p4; - })); -} - -function regexEscape(s) { - return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); -} - -var tokens = {}; - -function addParseToken (token, callback) { - var i, func = callback; - if (typeof token === 'string') { - token = [token]; - } - if (isNumber(callback)) { - func = function (input, array) { - array[callback] = toInt(input); - }; - } - for (i = 0; i < token.length; i++) { - tokens[token[i]] = func; - } -} - -function addWeekParseToken (token, callback) { - addParseToken(token, function (input, array, config, token) { - config._w = config._w || {}; - callback(input, config._w, config, token); - }); -} - -function addTimeToArrayFromToken(token, input, config) { - if (input != null && hasOwnProp(tokens, token)) { - tokens[token](input, config._a, config, token); - } -} - -var YEAR = 0; -var MONTH = 1; -var DATE = 2; -var HOUR = 3; -var MINUTE = 4; -var SECOND = 5; -var MILLISECOND = 6; -var WEEK = 7; -var WEEKDAY = 8; - -var indexOf; - -if (Array.prototype.indexOf) { - indexOf = Array.prototype.indexOf; -} else { - indexOf = function (o) { - // I know - var i; - for (i = 0; i < this.length; ++i) { - if (this[i] === o) { - return i; - } - } - return -1; - }; -} - -var indexOf$1 = indexOf; - -function daysInMonth(year, month) { - return new Date(Date.UTC(year, month + 1, 0)).getUTCDate(); -} - -// FORMATTING - -addFormatToken('M', ['MM', 2], 'Mo', function () { - return this.month() + 1; -}); - -addFormatToken('MMM', 0, 0, function (format) { - return this.localeData().monthsShort(this, format); -}); - -addFormatToken('MMMM', 0, 0, function (format) { - return this.localeData().months(this, format); -}); - -// ALIASES - -addUnitAlias('month', 'M'); - -// PRIORITY - -addUnitPriority('month', 8); - -// PARSING - -addRegexToken('M', match1to2); -addRegexToken('MM', match1to2, match2); -addRegexToken('MMM', function (isStrict, locale) { - return locale.monthsShortRegex(isStrict); -}); -addRegexToken('MMMM', function (isStrict, locale) { - return locale.monthsRegex(isStrict); -}); - -addParseToken(['M', 'MM'], function (input, array) { - array[MONTH] = toInt(input) - 1; -}); - -addParseToken(['MMM', 'MMMM'], function (input, array, config, token) { - var month = config._locale.monthsParse(input, token, config._strict); - // if we didn't find a month name, mark the date as invalid. - if (month != null) { - array[MONTH] = month; - } else { - getParsingFlags(config).invalidMonth = input; - } -}); - -// LOCALES - -var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/; -var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'); -function localeMonths (m, format) { - if (!m) { - return this._months; - } - return isArray(this._months) ? this._months[m.month()] : - this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()]; -} - -var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'); -function localeMonthsShort (m, format) { - if (!m) { - return this._monthsShort; - } - return isArray(this._monthsShort) ? this._monthsShort[m.month()] : - this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()]; -} - -function handleStrictParse(monthName, format, strict) { - var i, ii, mom, llc = monthName.toLocaleLowerCase(); - if (!this._monthsParse) { - // this is not used - this._monthsParse = []; - this._longMonthsParse = []; - this._shortMonthsParse = []; - for (i = 0; i < 12; ++i) { - mom = createUTC([2000, i]); - this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase(); - this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase(); - } - } - - if (strict) { - if (format === 'MMM') { - ii = indexOf$1.call(this._shortMonthsParse, llc); - return ii !== -1 ? ii : null; - } else { - ii = indexOf$1.call(this._longMonthsParse, llc); - return ii !== -1 ? ii : null; - } - } else { - if (format === 'MMM') { - ii = indexOf$1.call(this._shortMonthsParse, llc); - if (ii !== -1) { - return ii; - } - ii = indexOf$1.call(this._longMonthsParse, llc); - return ii !== -1 ? ii : null; - } else { - ii = indexOf$1.call(this._longMonthsParse, llc); - if (ii !== -1) { - return ii; - } - ii = indexOf$1.call(this._shortMonthsParse, llc); - return ii !== -1 ? ii : null; - } - } -} - -function localeMonthsParse (monthName, format, strict) { - var i, mom, regex; - - if (this._monthsParseExact) { - return handleStrictParse.call(this, monthName, format, strict); - } - - if (!this._monthsParse) { - this._monthsParse = []; - this._longMonthsParse = []; - this._shortMonthsParse = []; - } - - // TODO: add sorting - // Sorting makes sure if one month (or abbr) is a prefix of another - // see sorting in computeMonthsParse - for (i = 0; i < 12; i++) { - // make the regex if we don't have it already - mom = createUTC([2000, i]); - if (strict && !this._longMonthsParse[i]) { - this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i'); - this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i'); - } - if (!strict && !this._monthsParse[i]) { - regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); - this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); - } - // test the regex - if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) { - return i; - } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) { - return i; - } else if (!strict && this._monthsParse[i].test(monthName)) { - return i; - } - } -} - -// MOMENTS - -function setMonth (mom, value) { - var dayOfMonth; - - if (!mom.isValid()) { - // No op - return mom; - } - - if (typeof value === 'string') { - if (/^\d+$/.test(value)) { - value = toInt(value); - } else { - value = mom.localeData().monthsParse(value); - // TODO: Another silent failure? - if (!isNumber(value)) { - return mom; - } - } - } - - dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value)); - mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth); - return mom; -} - -function getSetMonth (value) { - if (value != null) { - setMonth(this, value); - hooks.updateOffset(this, true); - return this; - } else { - return get(this, 'Month'); - } -} - -function getDaysInMonth () { - return daysInMonth(this.year(), this.month()); -} - -var defaultMonthsShortRegex = matchWord; -function monthsShortRegex (isStrict) { - if (this._monthsParseExact) { - if (!hasOwnProp(this, '_monthsRegex')) { - computeMonthsParse.call(this); - } - if (isStrict) { - return this._monthsShortStrictRegex; - } else { - return this._monthsShortRegex; - } - } else { - if (!hasOwnProp(this, '_monthsShortRegex')) { - this._monthsShortRegex = defaultMonthsShortRegex; - } - return this._monthsShortStrictRegex && isStrict ? - this._monthsShortStrictRegex : this._monthsShortRegex; - } -} - -var defaultMonthsRegex = matchWord; -function monthsRegex (isStrict) { - if (this._monthsParseExact) { - if (!hasOwnProp(this, '_monthsRegex')) { - computeMonthsParse.call(this); - } - if (isStrict) { - return this._monthsStrictRegex; - } else { - return this._monthsRegex; - } - } else { - if (!hasOwnProp(this, '_monthsRegex')) { - this._monthsRegex = defaultMonthsRegex; - } - return this._monthsStrictRegex && isStrict ? - this._monthsStrictRegex : this._monthsRegex; - } -} - -function computeMonthsParse () { - function cmpLenRev(a, b) { - return b.length - a.length; - } - - var shortPieces = [], longPieces = [], mixedPieces = [], - i, mom; - for (i = 0; i < 12; i++) { - // make the regex if we don't have it already - mom = createUTC([2000, i]); - shortPieces.push(this.monthsShort(mom, '')); - longPieces.push(this.months(mom, '')); - mixedPieces.push(this.months(mom, '')); - mixedPieces.push(this.monthsShort(mom, '')); - } - // Sorting makes sure if one month (or abbr) is a prefix of another it - // will match the longer piece. - shortPieces.sort(cmpLenRev); - longPieces.sort(cmpLenRev); - mixedPieces.sort(cmpLenRev); - for (i = 0; i < 12; i++) { - shortPieces[i] = regexEscape(shortPieces[i]); - longPieces[i] = regexEscape(longPieces[i]); - } - for (i = 0; i < 24; i++) { - mixedPieces[i] = regexEscape(mixedPieces[i]); - } - - this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); - this._monthsShortRegex = this._monthsRegex; - this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); - this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); -} - -// FORMATTING - -addFormatToken('Y', 0, 0, function () { - var y = this.year(); - return y <= 9999 ? '' + y : '+' + y; -}); - -addFormatToken(0, ['YY', 2], 0, function () { - return this.year() % 100; -}); - -addFormatToken(0, ['YYYY', 4], 0, 'year'); -addFormatToken(0, ['YYYYY', 5], 0, 'year'); -addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); - -// ALIASES - -addUnitAlias('year', 'y'); - -// PRIORITIES - -addUnitPriority('year', 1); - -// PARSING - -addRegexToken('Y', matchSigned); -addRegexToken('YY', match1to2, match2); -addRegexToken('YYYY', match1to4, match4); -addRegexToken('YYYYY', match1to6, match6); -addRegexToken('YYYYYY', match1to6, match6); - -addParseToken(['YYYYY', 'YYYYYY'], YEAR); -addParseToken('YYYY', function (input, array) { - array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input); -}); -addParseToken('YY', function (input, array) { - array[YEAR] = hooks.parseTwoDigitYear(input); -}); -addParseToken('Y', function (input, array) { - array[YEAR] = parseInt(input, 10); -}); - -// HELPERS - -function daysInYear(year) { - return isLeapYear(year) ? 366 : 365; -} - -function isLeapYear(year) { - return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0; -} - -// HOOKS - -hooks.parseTwoDigitYear = function (input) { - return toInt(input) + (toInt(input) > 68 ? 1900 : 2000); -}; - -// MOMENTS - -var getSetYear = makeGetSet('FullYear', true); - -function getIsLeapYear () { - return isLeapYear(this.year()); -} - -function createDate (y, m, d, h, M, s, ms) { - //can't just apply() to create a date: - //http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply - var date = new Date(y, m, d, h, M, s, ms); - - //the date constructor remaps years 0-99 to 1900-1999 - if (y < 100 && y >= 0 && isFinite(date.getFullYear())) { - date.setFullYear(y); - } - return date; -} - -function createUTCDate (y) { - var date = new Date(Date.UTC.apply(null, arguments)); - - //the Date.UTC function remaps years 0-99 to 1900-1999 - if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) { - date.setUTCFullYear(y); - } - return date; -} - -// start-of-first-week - start-of-year -function firstWeekOffset(year, dow, doy) { - var // first-week day -- which january is always in the first week (4 for iso, 1 for other) - fwd = 7 + dow - doy, - // first-week day local weekday -- which local weekday is fwd - fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7; - - return -fwdlw + fwd - 1; -} - -//http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday -function dayOfYearFromWeeks(year, week, weekday, dow, doy) { - var localWeekday = (7 + weekday - dow) % 7, - weekOffset = firstWeekOffset(year, dow, doy), - dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset, - resYear, resDayOfYear; - - if (dayOfYear <= 0) { - resYear = year - 1; - resDayOfYear = daysInYear(resYear) + dayOfYear; - } else if (dayOfYear > daysInYear(year)) { - resYear = year + 1; - resDayOfYear = dayOfYear - daysInYear(year); - } else { - resYear = year; - resDayOfYear = dayOfYear; - } - - return { - year: resYear, - dayOfYear: resDayOfYear - }; -} - -function weekOfYear(mom, dow, doy) { - var weekOffset = firstWeekOffset(mom.year(), dow, doy), - week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1, - resWeek, resYear; - - if (week < 1) { - resYear = mom.year() - 1; - resWeek = week + weeksInYear(resYear, dow, doy); - } else if (week > weeksInYear(mom.year(), dow, doy)) { - resWeek = week - weeksInYear(mom.year(), dow, doy); - resYear = mom.year() + 1; - } else { - resYear = mom.year(); - resWeek = week; - } - - return { - week: resWeek, - year: resYear - }; -} - -function weeksInYear(year, dow, doy) { - var weekOffset = firstWeekOffset(year, dow, doy), - weekOffsetNext = firstWeekOffset(year + 1, dow, doy); - return (daysInYear(year) - weekOffset + weekOffsetNext) / 7; -} - -// FORMATTING - -addFormatToken('w', ['ww', 2], 'wo', 'week'); -addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); - -// ALIASES - -addUnitAlias('week', 'w'); -addUnitAlias('isoWeek', 'W'); - -// PRIORITIES - -addUnitPriority('week', 5); -addUnitPriority('isoWeek', 5); - -// PARSING - -addRegexToken('w', match1to2); -addRegexToken('ww', match1to2, match2); -addRegexToken('W', match1to2); -addRegexToken('WW', match1to2, match2); - -addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) { - week[token.substr(0, 1)] = toInt(input); -}); - -// HELPERS - -// LOCALES - -function localeWeek (mom) { - return weekOfYear(mom, this._week.dow, this._week.doy).week; -} - -var defaultLocaleWeek = { - dow : 0, // Sunday is the first day of the week. - doy : 6 // The week that contains Jan 1st is the first week of the year. -}; - -function localeFirstDayOfWeek () { - return this._week.dow; -} - -function localeFirstDayOfYear () { - return this._week.doy; -} - -// MOMENTS - -function getSetWeek (input) { - var week = this.localeData().week(this); - return input == null ? week : this.add((input - week) * 7, 'd'); -} - -function getSetISOWeek (input) { - var week = weekOfYear(this, 1, 4).week; - return input == null ? week : this.add((input - week) * 7, 'd'); -} - -// FORMATTING - -addFormatToken('d', 0, 'do', 'day'); - -addFormatToken('dd', 0, 0, function (format) { - return this.localeData().weekdaysMin(this, format); -}); - -addFormatToken('ddd', 0, 0, function (format) { - return this.localeData().weekdaysShort(this, format); -}); - -addFormatToken('dddd', 0, 0, function (format) { - return this.localeData().weekdays(this, format); -}); - -addFormatToken('e', 0, 0, 'weekday'); -addFormatToken('E', 0, 0, 'isoWeekday'); - -// ALIASES - -addUnitAlias('day', 'd'); -addUnitAlias('weekday', 'e'); -addUnitAlias('isoWeekday', 'E'); - -// PRIORITY -addUnitPriority('day', 11); -addUnitPriority('weekday', 11); -addUnitPriority('isoWeekday', 11); - -// PARSING - -addRegexToken('d', match1to2); -addRegexToken('e', match1to2); -addRegexToken('E', match1to2); -addRegexToken('dd', function (isStrict, locale) { - return locale.weekdaysMinRegex(isStrict); -}); -addRegexToken('ddd', function (isStrict, locale) { - return locale.weekdaysShortRegex(isStrict); -}); -addRegexToken('dddd', function (isStrict, locale) { - return locale.weekdaysRegex(isStrict); -}); - -addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) { - var weekday = config._locale.weekdaysParse(input, token, config._strict); - // if we didn't get a weekday name, mark the date as invalid - if (weekday != null) { - week.d = weekday; - } else { - getParsingFlags(config).invalidWeekday = input; - } -}); - -addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) { - week[token] = toInt(input); -}); - -// HELPERS - -function parseWeekday(input, locale) { - if (typeof input !== 'string') { - return input; - } - - if (!isNaN(input)) { - return parseInt(input, 10); - } - - input = locale.weekdaysParse(input); - if (typeof input === 'number') { - return input; - } - - return null; -} - -function parseIsoWeekday(input, locale) { - if (typeof input === 'string') { - return locale.weekdaysParse(input) % 7 || 7; - } - return isNaN(input) ? null : input; -} - -// LOCALES - -var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'); -function localeWeekdays (m, format) { - if (!m) { - return this._weekdays; - } - return isArray(this._weekdays) ? this._weekdays[m.day()] : - this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()]; -} - -var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'); -function localeWeekdaysShort (m) { - return (m) ? this._weekdaysShort[m.day()] : this._weekdaysShort; -} - -var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'); -function localeWeekdaysMin (m) { - return (m) ? this._weekdaysMin[m.day()] : this._weekdaysMin; -} - -function handleStrictParse$1(weekdayName, format, strict) { - var i, ii, mom, llc = weekdayName.toLocaleLowerCase(); - if (!this._weekdaysParse) { - this._weekdaysParse = []; - this._shortWeekdaysParse = []; - this._minWeekdaysParse = []; - - for (i = 0; i < 7; ++i) { - mom = createUTC([2000, 1]).day(i); - this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase(); - this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase(); - this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase(); - } - } - - if (strict) { - if (format === 'dddd') { - ii = indexOf$1.call(this._weekdaysParse, llc); - return ii !== -1 ? ii : null; - } else if (format === 'ddd') { - ii = indexOf$1.call(this._shortWeekdaysParse, llc); - return ii !== -1 ? ii : null; - } else { - ii = indexOf$1.call(this._minWeekdaysParse, llc); - return ii !== -1 ? ii : null; - } - } else { - if (format === 'dddd') { - ii = indexOf$1.call(this._weekdaysParse, llc); - if (ii !== -1) { - return ii; - } - ii = indexOf$1.call(this._shortWeekdaysParse, llc); - if (ii !== -1) { - return ii; - } - ii = indexOf$1.call(this._minWeekdaysParse, llc); - return ii !== -1 ? ii : null; - } else if (format === 'ddd') { - ii = indexOf$1.call(this._shortWeekdaysParse, llc); - if (ii !== -1) { - return ii; - } - ii = indexOf$1.call(this._weekdaysParse, llc); - if (ii !== -1) { - return ii; - } - ii = indexOf$1.call(this._minWeekdaysParse, llc); - return ii !== -1 ? ii : null; - } else { - ii = indexOf$1.call(this._minWeekdaysParse, llc); - if (ii !== -1) { - return ii; - } - ii = indexOf$1.call(this._weekdaysParse, llc); - if (ii !== -1) { - return ii; - } - ii = indexOf$1.call(this._shortWeekdaysParse, llc); - return ii !== -1 ? ii : null; - } - } -} - -function localeWeekdaysParse (weekdayName, format, strict) { - var i, mom, regex; - - if (this._weekdaysParseExact) { - return handleStrictParse$1.call(this, weekdayName, format, strict); - } - - if (!this._weekdaysParse) { - this._weekdaysParse = []; - this._minWeekdaysParse = []; - this._shortWeekdaysParse = []; - this._fullWeekdaysParse = []; - } - - for (i = 0; i < 7; i++) { - // make the regex if we don't have it already - - mom = createUTC([2000, 1]).day(i); - if (strict && !this._fullWeekdaysParse[i]) { - this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\.?') + '$', 'i'); - this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\.?') + '$', 'i'); - this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\.?') + '$', 'i'); - } - if (!this._weekdaysParse[i]) { - regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, ''); - this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); - } - // test the regex - if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) { - return i; - } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) { - return i; - } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) { - return i; - } else if (!strict && this._weekdaysParse[i].test(weekdayName)) { - return i; - } - } -} - -// MOMENTS - -function getSetDayOfWeek (input) { - if (!this.isValid()) { - return input != null ? this : NaN; - } - var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); - if (input != null) { - input = parseWeekday(input, this.localeData()); - return this.add(input - day, 'd'); - } else { - return day; - } -} - -function getSetLocaleDayOfWeek (input) { - if (!this.isValid()) { - return input != null ? this : NaN; - } - var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; - return input == null ? weekday : this.add(input - weekday, 'd'); -} - -function getSetISODayOfWeek (input) { - if (!this.isValid()) { - return input != null ? this : NaN; - } - - // behaves the same as moment#day except - // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) - // as a setter, sunday should belong to the previous week. - - if (input != null) { - var weekday = parseIsoWeekday(input, this.localeData()); - return this.day(this.day() % 7 ? weekday : weekday - 7); - } else { - return this.day() || 7; - } -} - -var defaultWeekdaysRegex = matchWord; -function weekdaysRegex (isStrict) { - if (this._weekdaysParseExact) { - if (!hasOwnProp(this, '_weekdaysRegex')) { - computeWeekdaysParse.call(this); - } - if (isStrict) { - return this._weekdaysStrictRegex; - } else { - return this._weekdaysRegex; - } - } else { - if (!hasOwnProp(this, '_weekdaysRegex')) { - this._weekdaysRegex = defaultWeekdaysRegex; - } - return this._weekdaysStrictRegex && isStrict ? - this._weekdaysStrictRegex : this._weekdaysRegex; - } -} - -var defaultWeekdaysShortRegex = matchWord; -function weekdaysShortRegex (isStrict) { - if (this._weekdaysParseExact) { - if (!hasOwnProp(this, '_weekdaysRegex')) { - computeWeekdaysParse.call(this); - } - if (isStrict) { - return this._weekdaysShortStrictRegex; - } else { - return this._weekdaysShortRegex; - } - } else { - if (!hasOwnProp(this, '_weekdaysShortRegex')) { - this._weekdaysShortRegex = defaultWeekdaysShortRegex; - } - return this._weekdaysShortStrictRegex && isStrict ? - this._weekdaysShortStrictRegex : this._weekdaysShortRegex; - } -} - -var defaultWeekdaysMinRegex = matchWord; -function weekdaysMinRegex (isStrict) { - if (this._weekdaysParseExact) { - if (!hasOwnProp(this, '_weekdaysRegex')) { - computeWeekdaysParse.call(this); - } - if (isStrict) { - return this._weekdaysMinStrictRegex; - } else { - return this._weekdaysMinRegex; - } - } else { - if (!hasOwnProp(this, '_weekdaysMinRegex')) { - this._weekdaysMinRegex = defaultWeekdaysMinRegex; - } - return this._weekdaysMinStrictRegex && isStrict ? - this._weekdaysMinStrictRegex : this._weekdaysMinRegex; - } -} - - -function computeWeekdaysParse () { - function cmpLenRev(a, b) { - return b.length - a.length; - } - - var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [], - i, mom, minp, shortp, longp; - for (i = 0; i < 7; i++) { - // make the regex if we don't have it already - mom = createUTC([2000, 1]).day(i); - minp = this.weekdaysMin(mom, ''); - shortp = this.weekdaysShort(mom, ''); - longp = this.weekdays(mom, ''); - minPieces.push(minp); - shortPieces.push(shortp); - longPieces.push(longp); - mixedPieces.push(minp); - mixedPieces.push(shortp); - mixedPieces.push(longp); - } - // Sorting makes sure if one weekday (or abbr) is a prefix of another it - // will match the longer piece. - minPieces.sort(cmpLenRev); - shortPieces.sort(cmpLenRev); - longPieces.sort(cmpLenRev); - mixedPieces.sort(cmpLenRev); - for (i = 0; i < 7; i++) { - shortPieces[i] = regexEscape(shortPieces[i]); - longPieces[i] = regexEscape(longPieces[i]); - mixedPieces[i] = regexEscape(mixedPieces[i]); - } - - this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); - this._weekdaysShortRegex = this._weekdaysRegex; - this._weekdaysMinRegex = this._weekdaysRegex; - - this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); - this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); - this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i'); -} - -// FORMATTING - -function hFormat() { - return this.hours() % 12 || 12; -} - -function kFormat() { - return this.hours() || 24; -} - -addFormatToken('H', ['HH', 2], 0, 'hour'); -addFormatToken('h', ['hh', 2], 0, hFormat); -addFormatToken('k', ['kk', 2], 0, kFormat); - -addFormatToken('hmm', 0, 0, function () { - return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2); -}); - -addFormatToken('hmmss', 0, 0, function () { - return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + - zeroFill(this.seconds(), 2); -}); - -addFormatToken('Hmm', 0, 0, function () { - return '' + this.hours() + zeroFill(this.minutes(), 2); -}); - -addFormatToken('Hmmss', 0, 0, function () { - return '' + this.hours() + zeroFill(this.minutes(), 2) + - zeroFill(this.seconds(), 2); -}); - -function meridiem (token, lowercase) { - addFormatToken(token, 0, 0, function () { - return this.localeData().meridiem(this.hours(), this.minutes(), lowercase); - }); -} - -meridiem('a', true); -meridiem('A', false); - -// ALIASES - -addUnitAlias('hour', 'h'); - -// PRIORITY -addUnitPriority('hour', 13); - -// PARSING - -function matchMeridiem (isStrict, locale) { - return locale._meridiemParse; -} - -addRegexToken('a', matchMeridiem); -addRegexToken('A', matchMeridiem); -addRegexToken('H', match1to2); -addRegexToken('h', match1to2); -addRegexToken('HH', match1to2, match2); -addRegexToken('hh', match1to2, match2); - -addRegexToken('hmm', match3to4); -addRegexToken('hmmss', match5to6); -addRegexToken('Hmm', match3to4); -addRegexToken('Hmmss', match5to6); - -addParseToken(['H', 'HH'], HOUR); -addParseToken(['a', 'A'], function (input, array, config) { - config._isPm = config._locale.isPM(input); - config._meridiem = input; -}); -addParseToken(['h', 'hh'], function (input, array, config) { - array[HOUR] = toInt(input); - getParsingFlags(config).bigHour = true; -}); -addParseToken('hmm', function (input, array, config) { - var pos = input.length - 2; - array[HOUR] = toInt(input.substr(0, pos)); - array[MINUTE] = toInt(input.substr(pos)); - getParsingFlags(config).bigHour = true; -}); -addParseToken('hmmss', function (input, array, config) { - var pos1 = input.length - 4; - var pos2 = input.length - 2; - array[HOUR] = toInt(input.substr(0, pos1)); - array[MINUTE] = toInt(input.substr(pos1, 2)); - array[SECOND] = toInt(input.substr(pos2)); - getParsingFlags(config).bigHour = true; -}); -addParseToken('Hmm', function (input, array, config) { - var pos = input.length - 2; - array[HOUR] = toInt(input.substr(0, pos)); - array[MINUTE] = toInt(input.substr(pos)); -}); -addParseToken('Hmmss', function (input, array, config) { - var pos1 = input.length - 4; - var pos2 = input.length - 2; - array[HOUR] = toInt(input.substr(0, pos1)); - array[MINUTE] = toInt(input.substr(pos1, 2)); - array[SECOND] = toInt(input.substr(pos2)); -}); - -// LOCALES - -function localeIsPM (input) { - // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays - // Using charAt should be more compatible. - return ((input + '').toLowerCase().charAt(0) === 'p'); -} - -var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i; -function localeMeridiem (hours, minutes, isLower) { - if (hours > 11) { - return isLower ? 'pm' : 'PM'; - } else { - return isLower ? 'am' : 'AM'; - } -} - - -// MOMENTS - -// Setting the hour should keep the time, because the user explicitly -// specified which hour he wants. So trying to maintain the same hour (in -// a new timezone) makes sense. Adding/subtracting hours does not follow -// this rule. -var getSetHour = makeGetSet('Hours', true); - -// months -// week -// weekdays -// meridiem -var baseConfig = { - calendar: defaultCalendar, - longDateFormat: defaultLongDateFormat, - invalidDate: defaultInvalidDate, - ordinal: defaultOrdinal, - ordinalParse: defaultOrdinalParse, - relativeTime: defaultRelativeTime, - - months: defaultLocaleMonths, - monthsShort: defaultLocaleMonthsShort, - - week: defaultLocaleWeek, - - weekdays: defaultLocaleWeekdays, - weekdaysMin: defaultLocaleWeekdaysMin, - weekdaysShort: defaultLocaleWeekdaysShort, - - meridiemParse: defaultLocaleMeridiemParse -}; - -// internal storage for locale config files -var locales = {}; -var localeFamilies = {}; -var globalLocale; - -function normalizeLocale(key) { - return key ? key.toLowerCase().replace('_', '-') : key; -} - -// pick the locale from the array -// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each -// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root -function chooseLocale(names) { - var i = 0, j, next, locale, split; - - while (i < names.length) { - split = normalizeLocale(names[i]).split('-'); - j = split.length; - next = normalizeLocale(names[i + 1]); - next = next ? next.split('-') : null; - while (j > 0) { - locale = loadLocale(split.slice(0, j).join('-')); - if (locale) { - return locale; - } - if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) { - //the next array item is better than a shallower substring of this one - break; - } - j--; - } - i++; - } - return null; -} - -function loadLocale(name) { - var oldLocale = null; - // TODO: Find a better way to register and load all the locales in Node - if (!locales[name] && (typeof module !== 'undefined') && - module && module.exports) { - try { - oldLocale = globalLocale._abbr; - require('./locale/' + name); - // because defineLocale currently also sets the global locale, we - // want to undo that for lazy loaded locales - getSetGlobalLocale(oldLocale); - } catch (e) { } - } - return locales[name]; -} - -// This function will load locale and then set the global locale. If -// no arguments are passed in, it will simply return the current global -// locale key. -function getSetGlobalLocale (key, values) { - var data; - if (key) { - if (isUndefined(values)) { - data = getLocale(key); - } - else { - data = defineLocale(key, values); - } - - if (data) { - // moment.duration._locale = moment._locale = data; - globalLocale = data; - } - } - - return globalLocale._abbr; -} - -function defineLocale (name, config) { - if (config !== null) { - var parentConfig = baseConfig; - config.abbr = name; - if (locales[name] != null) { - deprecateSimple('defineLocaleOverride', - 'use moment.updateLocale(localeName, config) to change ' + - 'an existing locale. moment.defineLocale(localeName, ' + - 'config) should only be used for creating a new locale ' + - 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'); - parentConfig = locales[name]._config; - } else if (config.parentLocale != null) { - if (locales[config.parentLocale] != null) { - parentConfig = locales[config.parentLocale]._config; - } else { - if (!localeFamilies[config.parentLocale]) { - localeFamilies[config.parentLocale] = []; - } - localeFamilies[config.parentLocale].push({ - name: name, - config: config - }); - return null; - } - } - locales[name] = new Locale(mergeConfigs(parentConfig, config)); - - if (localeFamilies[name]) { - localeFamilies[name].forEach(function (x) { - defineLocale(x.name, x.config); - }); - } - - // backwards compat for now: also set the locale - // make sure we set the locale AFTER all child locales have been - // created, so we won't end up with the child locale set. - getSetGlobalLocale(name); - - - return locales[name]; - } else { - // useful for testing - delete locales[name]; - return null; - } -} - -function updateLocale(name, config) { - if (config != null) { - var locale, parentConfig = baseConfig; - // MERGE - if (locales[name] != null) { - parentConfig = locales[name]._config; - } - config = mergeConfigs(parentConfig, config); - locale = new Locale(config); - locale.parentLocale = locales[name]; - locales[name] = locale; - - // backwards compat for now: also set the locale - getSetGlobalLocale(name); - } else { - // pass null for config to unupdate, useful for tests - if (locales[name] != null) { - if (locales[name].parentLocale != null) { - locales[name] = locales[name].parentLocale; - } else if (locales[name] != null) { - delete locales[name]; - } - } - } - return locales[name]; -} - -// returns locale data -function getLocale (key) { - var locale; - - if (key && key._locale && key._locale._abbr) { - key = key._locale._abbr; - } - - if (!key) { - return globalLocale; - } - - if (!isArray(key)) { - //short-circuit everything else - locale = loadLocale(key); - if (locale) { - return locale; - } - key = [key]; - } - - return chooseLocale(key); -} - -function listLocales() { - return keys$1(locales); -} - -function checkOverflow (m) { - var overflow; - var a = m._a; - - if (a && getParsingFlags(m).overflow === -2) { - overflow = - a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : - a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : - a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR : - a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : - a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : - a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : - -1; - - if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) { - overflow = DATE; - } - if (getParsingFlags(m)._overflowWeeks && overflow === -1) { - overflow = WEEK; - } - if (getParsingFlags(m)._overflowWeekday && overflow === -1) { - overflow = WEEKDAY; - } - - getParsingFlags(m).overflow = overflow; - } - - return m; -} - -// iso 8601 regex -// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00) -var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; -var basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; - -var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/; - -var isoDates = [ - ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/], - ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/], - ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/], - ['GGGG-[W]WW', /\d{4}-W\d\d/, false], - ['YYYY-DDD', /\d{4}-\d{3}/], - ['YYYY-MM', /\d{4}-\d\d/, false], - ['YYYYYYMMDD', /[+-]\d{10}/], - ['YYYYMMDD', /\d{8}/], - // YYYYMM is NOT allowed by the standard - ['GGGG[W]WWE', /\d{4}W\d{3}/], - ['GGGG[W]WW', /\d{4}W\d{2}/, false], - ['YYYYDDD', /\d{7}/] -]; - -// iso time formats and regexes -var isoTimes = [ - ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/], - ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/], - ['HH:mm:ss', /\d\d:\d\d:\d\d/], - ['HH:mm', /\d\d:\d\d/], - ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/], - ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/], - ['HHmmss', /\d\d\d\d\d\d/], - ['HHmm', /\d\d\d\d/], - ['HH', /\d\d/] -]; - -var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i; - -// date from iso format -function configFromISO(config) { - var i, l, - string = config._i, - match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), - allowTime, dateFormat, timeFormat, tzFormat; - - if (match) { - getParsingFlags(config).iso = true; - - for (i = 0, l = isoDates.length; i < l; i++) { - if (isoDates[i][1].exec(match[1])) { - dateFormat = isoDates[i][0]; - allowTime = isoDates[i][2] !== false; - break; - } - } - if (dateFormat == null) { - config._isValid = false; - return; - } - if (match[3]) { - for (i = 0, l = isoTimes.length; i < l; i++) { - if (isoTimes[i][1].exec(match[3])) { - // match[2] should be 'T' or space - timeFormat = (match[2] || ' ') + isoTimes[i][0]; - break; - } - } - if (timeFormat == null) { - config._isValid = false; - return; - } - } - if (!allowTime && timeFormat != null) { - config._isValid = false; - return; - } - if (match[4]) { - if (tzRegex.exec(match[4])) { - tzFormat = 'Z'; - } else { - config._isValid = false; - return; - } - } - config._f = dateFormat + (timeFormat || '') + (tzFormat || ''); - configFromStringAndFormat(config); - } else { - config._isValid = false; - } -} - -// date from iso format or fallback -function configFromString(config) { - var matched = aspNetJsonRegex.exec(config._i); - - if (matched !== null) { - config._d = new Date(+matched[1]); - return; - } - - configFromISO(config); - if (config._isValid === false) { - delete config._isValid; - hooks.createFromInputFallback(config); - } -} - -hooks.createFromInputFallback = deprecate( - 'value provided is not in a recognized ISO format. moment construction falls back to js Date(), ' + - 'which is not reliable across all browsers and versions. Non ISO date formats are ' + - 'discouraged and will be removed in an upcoming major release. Please refer to ' + - 'http://momentjs.com/guides/#/warnings/js-date/ for more info.', - function (config) { - config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); - } -); - -// Pick the first defined of two or three arguments. -function defaults(a, b, c) { - if (a != null) { - return a; - } - if (b != null) { - return b; - } - return c; -} - -function currentDateArray(config) { - // hooks is actually the exported moment object - var nowValue = new Date(hooks.now()); - if (config._useUTC) { - return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()]; - } - return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()]; -} - -// convert an array to a date. -// the array should mirror the parameters below -// note: all values past the year are optional and will default to the lowest possible value. -// [year, month, day , hour, minute, second, millisecond] -function configFromArray (config) { - var i, date, input = [], currentDate, yearToUse; - - if (config._d) { - return; - } - - currentDate = currentDateArray(config); - - //compute day of the year from weeks and weekdays - if (config._w && config._a[DATE] == null && config._a[MONTH] == null) { - dayOfYearFromWeekInfo(config); - } - - //if the day of the year is set, figure out what it is - if (config._dayOfYear) { - yearToUse = defaults(config._a[YEAR], currentDate[YEAR]); - - if (config._dayOfYear > daysInYear(yearToUse)) { - getParsingFlags(config)._overflowDayOfYear = true; - } - - date = createUTCDate(yearToUse, 0, config._dayOfYear); - config._a[MONTH] = date.getUTCMonth(); - config._a[DATE] = date.getUTCDate(); - } - - // Default to current date. - // * if no year, month, day of month are given, default to today - // * if day of month is given, default month and year - // * if month is given, default only year - // * if year is given, don't default anything - for (i = 0; i < 3 && config._a[i] == null; ++i) { - config._a[i] = input[i] = currentDate[i]; - } - - // Zero out whatever was not defaulted, including time - for (; i < 7; i++) { - config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i]; - } - - // Check for 24:00:00.000 - if (config._a[HOUR] === 24 && - config._a[MINUTE] === 0 && - config._a[SECOND] === 0 && - config._a[MILLISECOND] === 0) { - config._nextDay = true; - config._a[HOUR] = 0; - } - - config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input); - // Apply timezone offset from input. The actual utcOffset can be changed - // with parseZone. - if (config._tzm != null) { - config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); - } - - if (config._nextDay) { - config._a[HOUR] = 24; - } -} - -function dayOfYearFromWeekInfo(config) { - var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow; - - w = config._w; - if (w.GG != null || w.W != null || w.E != null) { - dow = 1; - doy = 4; - - // TODO: We need to take the current isoWeekYear, but that depends on - // how we interpret now (local, utc, fixed offset). So create - // a now version of current config (take local/utc/offset flags, and - // create now). - weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year); - week = defaults(w.W, 1); - weekday = defaults(w.E, 1); - if (weekday < 1 || weekday > 7) { - weekdayOverflow = true; - } - } else { - dow = config._locale._week.dow; - doy = config._locale._week.doy; - - var curWeek = weekOfYear(createLocal(), dow, doy); - - weekYear = defaults(w.gg, config._a[YEAR], curWeek.year); - - // Default to current week. - week = defaults(w.w, curWeek.week); - - if (w.d != null) { - // weekday -- low day numbers are considered next week - weekday = w.d; - if (weekday < 0 || weekday > 6) { - weekdayOverflow = true; - } - } else if (w.e != null) { - // local weekday -- counting starts from begining of week - weekday = w.e + dow; - if (w.e < 0 || w.e > 6) { - weekdayOverflow = true; - } - } else { - // default to begining of week - weekday = dow; - } - } - if (week < 1 || week > weeksInYear(weekYear, dow, doy)) { - getParsingFlags(config)._overflowWeeks = true; - } else if (weekdayOverflow != null) { - getParsingFlags(config)._overflowWeekday = true; - } else { - temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy); - config._a[YEAR] = temp.year; - config._dayOfYear = temp.dayOfYear; - } -} - -// constant that refers to the ISO standard -hooks.ISO_8601 = function () {}; - -// date from string and format string -function configFromStringAndFormat(config) { - // TODO: Move this to another part of the creation flow to prevent circular deps - if (config._f === hooks.ISO_8601) { - configFromISO(config); - return; - } - - config._a = []; - getParsingFlags(config).empty = true; - - // This array is used to make a Date, either with `new Date` or `Date.UTC` - var string = '' + config._i, - i, parsedInput, tokens, token, skipped, - stringLength = string.length, - totalParsedInputLength = 0; - - tokens = expandFormat(config._f, config._locale).match(formattingTokens) || []; - - for (i = 0; i < tokens.length; i++) { - token = tokens[i]; - parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0]; - // console.log('token', token, 'parsedInput', parsedInput, - // 'regex', getParseRegexForToken(token, config)); - if (parsedInput) { - skipped = string.substr(0, string.indexOf(parsedInput)); - if (skipped.length > 0) { - getParsingFlags(config).unusedInput.push(skipped); - } - string = string.slice(string.indexOf(parsedInput) + parsedInput.length); - totalParsedInputLength += parsedInput.length; - } - // don't parse if it's not a known token - if (formatTokenFunctions[token]) { - if (parsedInput) { - getParsingFlags(config).empty = false; - } - else { - getParsingFlags(config).unusedTokens.push(token); - } - addTimeToArrayFromToken(token, parsedInput, config); - } - else if (config._strict && !parsedInput) { - getParsingFlags(config).unusedTokens.push(token); - } - } - - // add remaining unparsed input length to the string - getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength; - if (string.length > 0) { - getParsingFlags(config).unusedInput.push(string); - } - - // clear _12h flag if hour is <= 12 - if (config._a[HOUR] <= 12 && - getParsingFlags(config).bigHour === true && - config._a[HOUR] > 0) { - getParsingFlags(config).bigHour = undefined; - } - - getParsingFlags(config).parsedDateParts = config._a.slice(0); - getParsingFlags(config).meridiem = config._meridiem; - // handle meridiem - config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem); - - configFromArray(config); - checkOverflow(config); -} - - -function meridiemFixWrap (locale, hour, meridiem) { - var isPm; - - if (meridiem == null) { - // nothing to do - return hour; - } - if (locale.meridiemHour != null) { - return locale.meridiemHour(hour, meridiem); - } else if (locale.isPM != null) { - // Fallback - isPm = locale.isPM(meridiem); - if (isPm && hour < 12) { - hour += 12; - } - if (!isPm && hour === 12) { - hour = 0; - } - return hour; - } else { - // this is not supposed to happen - return hour; - } -} - -// date from string and array of format strings -function configFromStringAndArray(config) { - var tempConfig, - bestMoment, - - scoreToBeat, - i, - currentScore; - - if (config._f.length === 0) { - getParsingFlags(config).invalidFormat = true; - config._d = new Date(NaN); - return; - } - - for (i = 0; i < config._f.length; i++) { - currentScore = 0; - tempConfig = copyConfig({}, config); - if (config._useUTC != null) { - tempConfig._useUTC = config._useUTC; - } - tempConfig._f = config._f[i]; - configFromStringAndFormat(tempConfig); - - if (!isValid(tempConfig)) { - continue; - } - - // if there is any input that was not parsed add a penalty for that format - currentScore += getParsingFlags(tempConfig).charsLeftOver; - - //or tokens - currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; - - getParsingFlags(tempConfig).score = currentScore; - - if (scoreToBeat == null || currentScore < scoreToBeat) { - scoreToBeat = currentScore; - bestMoment = tempConfig; - } - } - - extend(config, bestMoment || tempConfig); -} - -function configFromObject(config) { - if (config._d) { - return; - } - - var i = normalizeObjectUnits(config._i); - config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) { - return obj && parseInt(obj, 10); - }); - - configFromArray(config); -} - -function createFromConfig (config) { - var res = new Moment(checkOverflow(prepareConfig(config))); - if (res._nextDay) { - // Adding is smart enough around DST - res.add(1, 'd'); - res._nextDay = undefined; - } - - return res; -} - -function prepareConfig (config) { - var input = config._i, - format = config._f; - - config._locale = config._locale || getLocale(config._l); - - if (input === null || (format === undefined && input === '')) { - return createInvalid({nullInput: true}); - } - - if (typeof input === 'string') { - config._i = input = config._locale.preparse(input); - } - - if (isMoment(input)) { - return new Moment(checkOverflow(input)); - } else if (isDate(input)) { - config._d = input; - } else if (isArray(format)) { - configFromStringAndArray(config); - } else if (format) { - configFromStringAndFormat(config); - } else { - configFromInput(config); - } - - if (!isValid(config)) { - config._d = null; - } - - return config; -} - -function configFromInput(config) { - var input = config._i; - if (input === undefined) { - config._d = new Date(hooks.now()); - } else if (isDate(input)) { - config._d = new Date(input.valueOf()); - } else if (typeof input === 'string') { - configFromString(config); - } else if (isArray(input)) { - config._a = map(input.slice(0), function (obj) { - return parseInt(obj, 10); - }); - configFromArray(config); - } else if (typeof(input) === 'object') { - configFromObject(config); - } else if (isNumber(input)) { - // from milliseconds - config._d = new Date(input); - } else { - hooks.createFromInputFallback(config); - } -} - -function createLocalOrUTC (input, format, locale, strict, isUTC) { - var c = {}; - - if (locale === true || locale === false) { - strict = locale; - locale = undefined; - } - - if ((isObject(input) && isObjectEmpty(input)) || - (isArray(input) && input.length === 0)) { - input = undefined; - } - // object construction must be done this way. - // https://github.com/moment/moment/issues/1423 - c._isAMomentObject = true; - c._useUTC = c._isUTC = isUTC; - c._l = locale; - c._i = input; - c._f = format; - c._strict = strict; - - return createFromConfig(c); -} - -function createLocal (input, format, locale, strict) { - return createLocalOrUTC(input, format, locale, strict, false); -} - -var prototypeMin = deprecate( - 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', - function () { - var other = createLocal.apply(null, arguments); - if (this.isValid() && other.isValid()) { - return other < this ? this : other; - } else { - return createInvalid(); - } - } -); - -var prototypeMax = deprecate( - 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', - function () { - var other = createLocal.apply(null, arguments); - if (this.isValid() && other.isValid()) { - return other > this ? this : other; - } else { - return createInvalid(); - } - } -); - -// Pick a moment m from moments so that m[fn](other) is true for all -// other. This relies on the function fn to be transitive. -// -// moments should either be an array of moment objects or an array, whose -// first element is an array of moment objects. -function pickBy(fn, moments) { - var res, i; - if (moments.length === 1 && isArray(moments[0])) { - moments = moments[0]; - } - if (!moments.length) { - return createLocal(); - } - res = moments[0]; - for (i = 1; i < moments.length; ++i) { - if (!moments[i].isValid() || moments[i][fn](res)) { - res = moments[i]; - } - } - return res; -} - -// TODO: Use [].sort instead? -function min () { - var args = [].slice.call(arguments, 0); - - return pickBy('isBefore', args); -} - -function max () { - var args = [].slice.call(arguments, 0); - - return pickBy('isAfter', args); -} - -var now = function () { - return Date.now ? Date.now() : +(new Date()); -}; - -function Duration (duration) { - var normalizedInput = normalizeObjectUnits(duration), - years = normalizedInput.year || 0, - quarters = normalizedInput.quarter || 0, - months = normalizedInput.month || 0, - weeks = normalizedInput.week || 0, - days = normalizedInput.day || 0, - hours = normalizedInput.hour || 0, - minutes = normalizedInput.minute || 0, - seconds = normalizedInput.second || 0, - milliseconds = normalizedInput.millisecond || 0; - - // representation for dateAddRemove - this._milliseconds = +milliseconds + - seconds * 1e3 + // 1000 - minutes * 6e4 + // 1000 * 60 - hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978 - // Because of dateAddRemove treats 24 hours as different from a - // day when working around DST, we need to store them separately - this._days = +days + - weeks * 7; - // It is impossible translate months into days without knowing - // which months you are are talking about, so we have to store - // it separately. - this._months = +months + - quarters * 3 + - years * 12; - - this._data = {}; - - this._locale = getLocale(); - - this._bubble(); -} - -function isDuration (obj) { - return obj instanceof Duration; -} - -function absRound (number) { - if (number < 0) { - return Math.round(-1 * number) * -1; - } else { - return Math.round(number); - } -} - -// FORMATTING - -function offset (token, separator) { - addFormatToken(token, 0, 0, function () { - var offset = this.utcOffset(); - var sign = '+'; - if (offset < 0) { - offset = -offset; - sign = '-'; - } - return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2); - }); -} - -offset('Z', ':'); -offset('ZZ', ''); - -// PARSING - -addRegexToken('Z', matchShortOffset); -addRegexToken('ZZ', matchShortOffset); -addParseToken(['Z', 'ZZ'], function (input, array, config) { - config._useUTC = true; - config._tzm = offsetFromString(matchShortOffset, input); -}); - -// HELPERS - -// timezone chunker -// '+10:00' > ['10', '00'] -// '-1530' > ['-15', '30'] -var chunkOffset = /([\+\-]|\d\d)/gi; - -function offsetFromString(matcher, string) { - var matches = (string || '').match(matcher); - - if (matches === null) { - return null; - } - - var chunk = matches[matches.length - 1] || []; - var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0]; - var minutes = +(parts[1] * 60) + toInt(parts[2]); - - return minutes === 0 ? - 0 : - parts[0] === '+' ? minutes : -minutes; -} - -// Return a moment from input, that is local/utc/zone equivalent to model. -function cloneWithOffset(input, model) { - var res, diff; - if (model._isUTC) { - res = model.clone(); - diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf(); - // Use low-level api, because this fn is low-level api. - res._d.setTime(res._d.valueOf() + diff); - hooks.updateOffset(res, false); - return res; - } else { - return createLocal(input).local(); - } -} - -function getDateOffset (m) { - // On Firefox.24 Date#getTimezoneOffset returns a floating point. - // https://github.com/moment/moment/pull/1871 - return -Math.round(m._d.getTimezoneOffset() / 15) * 15; -} - -// HOOKS - -// This function will be called whenever a moment is mutated. -// It is intended to keep the offset in sync with the timezone. -hooks.updateOffset = function () {}; - -// MOMENTS - -// keepLocalTime = true means only change the timezone, without -// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]--> -// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset -// +0200, so we adjust the time as needed, to be valid. -// -// Keeping the time actually adds/subtracts (one hour) -// from the actual represented time. That is why we call updateOffset -// a second time. In case it wants us to change the offset again -// _changeInProgress == true case, then we have to adjust, because -// there is no such time in the given timezone. -function getSetOffset (input, keepLocalTime) { - var offset = this._offset || 0, - localAdjust; - if (!this.isValid()) { - return input != null ? this : NaN; - } - if (input != null) { - if (typeof input === 'string') { - input = offsetFromString(matchShortOffset, input); - if (input === null) { - return this; - } - } else if (Math.abs(input) < 16) { - input = input * 60; - } - if (!this._isUTC && keepLocalTime) { - localAdjust = getDateOffset(this); - } - this._offset = input; - this._isUTC = true; - if (localAdjust != null) { - this.add(localAdjust, 'm'); - } - if (offset !== input) { - if (!keepLocalTime || this._changeInProgress) { - addSubtract(this, createDuration(input - offset, 'm'), 1, false); - } else if (!this._changeInProgress) { - this._changeInProgress = true; - hooks.updateOffset(this, true); - this._changeInProgress = null; - } - } - return this; - } else { - return this._isUTC ? offset : getDateOffset(this); - } -} - -function getSetZone (input, keepLocalTime) { - if (input != null) { - if (typeof input !== 'string') { - input = -input; - } - - this.utcOffset(input, keepLocalTime); - - return this; - } else { - return -this.utcOffset(); - } -} - -function setOffsetToUTC (keepLocalTime) { - return this.utcOffset(0, keepLocalTime); -} - -function setOffsetToLocal (keepLocalTime) { - if (this._isUTC) { - this.utcOffset(0, keepLocalTime); - this._isUTC = false; - - if (keepLocalTime) { - this.subtract(getDateOffset(this), 'm'); - } - } - return this; -} - -function setOffsetToParsedOffset () { - if (this._tzm != null) { - this.utcOffset(this._tzm); - } else if (typeof this._i === 'string') { - var tZone = offsetFromString(matchOffset, this._i); - if (tZone != null) { - this.utcOffset(tZone); - } - else { - this.utcOffset(0, true); - } - } - return this; -} - -function hasAlignedHourOffset (input) { - if (!this.isValid()) { - return false; - } - input = input ? createLocal(input).utcOffset() : 0; - - return (this.utcOffset() - input) % 60 === 0; -} - -function isDaylightSavingTime () { - return ( - this.utcOffset() > this.clone().month(0).utcOffset() || - this.utcOffset() > this.clone().month(5).utcOffset() - ); -} - -function isDaylightSavingTimeShifted () { - if (!isUndefined(this._isDSTShifted)) { - return this._isDSTShifted; - } - - var c = {}; - - copyConfig(c, this); - c = prepareConfig(c); - - if (c._a) { - var other = c._isUTC ? createUTC(c._a) : createLocal(c._a); - this._isDSTShifted = this.isValid() && - compareArrays(c._a, other.toArray()) > 0; - } else { - this._isDSTShifted = false; - } - - return this._isDSTShifted; -} - -function isLocal () { - return this.isValid() ? !this._isUTC : false; -} - -function isUtcOffset () { - return this.isValid() ? this._isUTC : false; -} - -function isUtc () { - return this.isValid() ? this._isUTC && this._offset === 0 : false; -} - -// ASP.NET json date format regex -var aspNetRegex = /^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/; - -// from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html -// somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere -// and further modified to allow for strings containing both week and day -var isoRegex = /^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/; - -function createDuration (input, key) { - var duration = input, - // matching against regexp is expensive, do it on demand - match = null, - sign, - ret, - diffRes; - - if (isDuration(input)) { - duration = { - ms : input._milliseconds, - d : input._days, - M : input._months - }; - } else if (isNumber(input)) { - duration = {}; - if (key) { - duration[key] = input; - } else { - duration.milliseconds = input; - } - } else if (!!(match = aspNetRegex.exec(input))) { - sign = (match[1] === '-') ? -1 : 1; - duration = { - y : 0, - d : toInt(match[DATE]) * sign, - h : toInt(match[HOUR]) * sign, - m : toInt(match[MINUTE]) * sign, - s : toInt(match[SECOND]) * sign, - ms : toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match - }; - } else if (!!(match = isoRegex.exec(input))) { - sign = (match[1] === '-') ? -1 : 1; - duration = { - y : parseIso(match[2], sign), - M : parseIso(match[3], sign), - w : parseIso(match[4], sign), - d : parseIso(match[5], sign), - h : parseIso(match[6], sign), - m : parseIso(match[7], sign), - s : parseIso(match[8], sign) - }; - } else if (duration == null) {// checks for null or undefined - duration = {}; - } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) { - diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to)); - - duration = {}; - duration.ms = diffRes.milliseconds; - duration.M = diffRes.months; - } - - ret = new Duration(duration); - - if (isDuration(input) && hasOwnProp(input, '_locale')) { - ret._locale = input._locale; - } - - return ret; -} - -createDuration.fn = Duration.prototype; - -function parseIso (inp, sign) { - // We'd normally use ~~inp for this, but unfortunately it also - // converts floats to ints. - // inp may be undefined, so careful calling replace on it. - var res = inp && parseFloat(inp.replace(',', '.')); - // apply sign while we're at it - return (isNaN(res) ? 0 : res) * sign; -} - -function positiveMomentsDifference(base, other) { - var res = {milliseconds: 0, months: 0}; - - res.months = other.month() - base.month() + - (other.year() - base.year()) * 12; - if (base.clone().add(res.months, 'M').isAfter(other)) { - --res.months; - } - - res.milliseconds = +other - +(base.clone().add(res.months, 'M')); - - return res; -} - -function momentsDifference(base, other) { - var res; - if (!(base.isValid() && other.isValid())) { - return {milliseconds: 0, months: 0}; - } - - other = cloneWithOffset(other, base); - if (base.isBefore(other)) { - res = positiveMomentsDifference(base, other); - } else { - res = positiveMomentsDifference(other, base); - res.milliseconds = -res.milliseconds; - res.months = -res.months; - } - - return res; -} - -// TODO: remove 'name' arg after deprecation is removed -function createAdder(direction, name) { - return function (val, period) { - var dur, tmp; - //invert the arguments, but complain about it - if (period !== null && !isNaN(+period)) { - deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' + - 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'); - tmp = val; val = period; period = tmp; - } - - val = typeof val === 'string' ? +val : val; - dur = createDuration(val, period); - addSubtract(this, dur, direction); - return this; - }; -} - -function addSubtract (mom, duration, isAdding, updateOffset) { - var milliseconds = duration._milliseconds, - days = absRound(duration._days), - months = absRound(duration._months); - - if (!mom.isValid()) { - // No op - return; - } - - updateOffset = updateOffset == null ? true : updateOffset; - - if (milliseconds) { - mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding); - } - if (days) { - set$1(mom, 'Date', get(mom, 'Date') + days * isAdding); - } - if (months) { - setMonth(mom, get(mom, 'Month') + months * isAdding); - } - if (updateOffset) { - hooks.updateOffset(mom, days || months); - } -} - -var add = createAdder(1, 'add'); -var subtract = createAdder(-1, 'subtract'); - -function getCalendarFormat(myMoment, now) { - var diff = myMoment.diff(now, 'days', true); - return diff < -6 ? 'sameElse' : - diff < -1 ? 'lastWeek' : - diff < 0 ? 'lastDay' : - diff < 1 ? 'sameDay' : - diff < 2 ? 'nextDay' : - diff < 7 ? 'nextWeek' : 'sameElse'; -} - -function calendar$1 (time, formats) { - // We want to compare the start of today, vs this. - // Getting start-of-today depends on whether we're local/utc/offset or not. - var now = time || createLocal(), - sod = cloneWithOffset(now, this).startOf('day'), - format = hooks.calendarFormat(this, sod) || 'sameElse'; - - var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]); - - return this.format(output || this.localeData().calendar(format, this, createLocal(now))); -} - -function clone () { - return new Moment(this); -} - -function isAfter (input, units) { - var localInput = isMoment(input) ? input : createLocal(input); - if (!(this.isValid() && localInput.isValid())) { - return false; - } - units = normalizeUnits(!isUndefined(units) ? units : 'millisecond'); - if (units === 'millisecond') { - return this.valueOf() > localInput.valueOf(); - } else { - return localInput.valueOf() < this.clone().startOf(units).valueOf(); - } -} - -function isBefore (input, units) { - var localInput = isMoment(input) ? input : createLocal(input); - if (!(this.isValid() && localInput.isValid())) { - return false; - } - units = normalizeUnits(!isUndefined(units) ? units : 'millisecond'); - if (units === 'millisecond') { - return this.valueOf() < localInput.valueOf(); - } else { - return this.clone().endOf(units).valueOf() < localInput.valueOf(); - } -} - -function isBetween (from, to, units, inclusivity) { - inclusivity = inclusivity || '()'; - return (inclusivity[0] === '(' ? this.isAfter(from, units) : !this.isBefore(from, units)) && - (inclusivity[1] === ')' ? this.isBefore(to, units) : !this.isAfter(to, units)); -} - -function isSame (input, units) { - var localInput = isMoment(input) ? input : createLocal(input), - inputMs; - if (!(this.isValid() && localInput.isValid())) { - return false; - } - units = normalizeUnits(units || 'millisecond'); - if (units === 'millisecond') { - return this.valueOf() === localInput.valueOf(); - } else { - inputMs = localInput.valueOf(); - return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf(); - } -} - -function isSameOrAfter (input, units) { - return this.isSame(input, units) || this.isAfter(input,units); -} - -function isSameOrBefore (input, units) { - return this.isSame(input, units) || this.isBefore(input,units); -} - -function diff (input, units, asFloat) { - var that, - zoneDelta, - delta, output; - - if (!this.isValid()) { - return NaN; - } - - that = cloneWithOffset(input, this); - - if (!that.isValid()) { - return NaN; - } - - zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4; - - units = normalizeUnits(units); - - if (units === 'year' || units === 'month' || units === 'quarter') { - output = monthDiff(this, that); - if (units === 'quarter') { - output = output / 3; - } else if (units === 'year') { - output = output / 12; - } - } else { - delta = this - that; - output = units === 'second' ? delta / 1e3 : // 1000 - units === 'minute' ? delta / 6e4 : // 1000 * 60 - units === 'hour' ? delta / 36e5 : // 1000 * 60 * 60 - units === 'day' ? (delta - zoneDelta) / 864e5 : // 1000 * 60 * 60 * 24, negate dst - units === 'week' ? (delta - zoneDelta) / 6048e5 : // 1000 * 60 * 60 * 24 * 7, negate dst - delta; - } - return asFloat ? output : absFloor(output); -} - -function monthDiff (a, b) { - // difference in months - var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()), - // b is in (anchor - 1 month, anchor + 1 month) - anchor = a.clone().add(wholeMonthDiff, 'months'), - anchor2, adjust; - - if (b - anchor < 0) { - anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); - // linear across the month - adjust = (b - anchor) / (anchor - anchor2); - } else { - anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); - // linear across the month - adjust = (b - anchor) / (anchor2 - anchor); - } - - //check for negative zero, return zero if negative zero - return -(wholeMonthDiff + adjust) || 0; -} - -hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ'; -hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]'; - -function toString () { - return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); -} - -function toISOString () { - var m = this.clone().utc(); - if (0 < m.year() && m.year() <= 9999) { - if (isFunction(Date.prototype.toISOString)) { - // native implementation is ~50x faster, use it when we can - return this.toDate().toISOString(); - } else { - return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]'); - } - } else { - return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'); - } -} - -/** - * Return a human readable representation of a moment that can - * also be evaluated to get a new moment which is the same - * - * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects - */ -function inspect () { - if (!this.isValid()) { - return 'moment.invalid(/* ' + this._i + ' */)'; - } - var func = 'moment'; - var zone = ''; - if (!this.isLocal()) { - func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone'; - zone = 'Z'; - } - var prefix = '[' + func + '("]'; - var year = (0 < this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY'; - var datetime = '-MM-DD[T]HH:mm:ss.SSS'; - var suffix = zone + '[")]'; - - return this.format(prefix + year + datetime + suffix); -} - -function format (inputString) { - if (!inputString) { - inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat; - } - var output = formatMoment(this, inputString); - return this.localeData().postformat(output); -} - -function from (time, withoutSuffix) { - if (this.isValid() && - ((isMoment(time) && time.isValid()) || - createLocal(time).isValid())) { - return createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix); - } else { - return this.localeData().invalidDate(); - } -} - -function fromNow (withoutSuffix) { - return this.from(createLocal(), withoutSuffix); -} - -function to (time, withoutSuffix) { - if (this.isValid() && - ((isMoment(time) && time.isValid()) || - createLocal(time).isValid())) { - return createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix); - } else { - return this.localeData().invalidDate(); - } -} - -function toNow (withoutSuffix) { - return this.to(createLocal(), withoutSuffix); -} - -// If passed a locale key, it will set the locale for this -// instance. Otherwise, it will return the locale configuration -// variables for this instance. -function locale (key) { - var newLocaleData; - - if (key === undefined) { - return this._locale._abbr; - } else { - newLocaleData = getLocale(key); - if (newLocaleData != null) { - this._locale = newLocaleData; - } - return this; - } -} - -var lang = deprecate( - 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', - function (key) { - if (key === undefined) { - return this.localeData(); - } else { - return this.locale(key); - } - } -); - -function localeData () { - return this._locale; -} - -function startOf (units) { - units = normalizeUnits(units); - // the following switch intentionally omits break keywords - // to utilize falling through the cases. - switch (units) { - case 'year': - this.month(0); - /* falls through */ - case 'quarter': - case 'month': - this.date(1); - /* falls through */ - case 'week': - case 'isoWeek': - case 'day': - case 'date': - this.hours(0); - /* falls through */ - case 'hour': - this.minutes(0); - /* falls through */ - case 'minute': - this.seconds(0); - /* falls through */ - case 'second': - this.milliseconds(0); - } - - // weeks are a special case - if (units === 'week') { - this.weekday(0); - } - if (units === 'isoWeek') { - this.isoWeekday(1); - } - - // quarters are also special - if (units === 'quarter') { - this.month(Math.floor(this.month() / 3) * 3); - } - - return this; -} - -function endOf (units) { - units = normalizeUnits(units); - if (units === undefined || units === 'millisecond') { - return this; - } - - // 'date' is an alias for 'day', so it should be considered as such. - if (units === 'date') { - units = 'day'; - } - - return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms'); -} - -function valueOf () { - return this._d.valueOf() - ((this._offset || 0) * 60000); -} - -function unix () { - return Math.floor(this.valueOf() / 1000); -} - -function toDate () { - return new Date(this.valueOf()); -} - -function toArray () { - var m = this; - return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()]; -} - -function toObject () { - var m = this; - return { - years: m.year(), - months: m.month(), - date: m.date(), - hours: m.hours(), - minutes: m.minutes(), - seconds: m.seconds(), - milliseconds: m.milliseconds() - }; -} - -function toJSON () { - // new Date(NaN).toJSON() === null - return this.isValid() ? this.toISOString() : null; -} - -function isValid$1 () { - return isValid(this); -} - -function parsingFlags () { - return extend({}, getParsingFlags(this)); -} - -function invalidAt () { - return getParsingFlags(this).overflow; -} - -function creationData() { - return { - input: this._i, - format: this._f, - locale: this._locale, - isUTC: this._isUTC, - strict: this._strict - }; -} - -// FORMATTING - -addFormatToken(0, ['gg', 2], 0, function () { - return this.weekYear() % 100; -}); - -addFormatToken(0, ['GG', 2], 0, function () { - return this.isoWeekYear() % 100; -}); - -function addWeekYearFormatToken (token, getter) { - addFormatToken(0, [token, token.length], 0, getter); -} - -addWeekYearFormatToken('gggg', 'weekYear'); -addWeekYearFormatToken('ggggg', 'weekYear'); -addWeekYearFormatToken('GGGG', 'isoWeekYear'); -addWeekYearFormatToken('GGGGG', 'isoWeekYear'); - -// ALIASES - -addUnitAlias('weekYear', 'gg'); -addUnitAlias('isoWeekYear', 'GG'); - -// PRIORITY - -addUnitPriority('weekYear', 1); -addUnitPriority('isoWeekYear', 1); - - -// PARSING - -addRegexToken('G', matchSigned); -addRegexToken('g', matchSigned); -addRegexToken('GG', match1to2, match2); -addRegexToken('gg', match1to2, match2); -addRegexToken('GGGG', match1to4, match4); -addRegexToken('gggg', match1to4, match4); -addRegexToken('GGGGG', match1to6, match6); -addRegexToken('ggggg', match1to6, match6); - -addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) { - week[token.substr(0, 2)] = toInt(input); -}); - -addWeekParseToken(['gg', 'GG'], function (input, week, config, token) { - week[token] = hooks.parseTwoDigitYear(input); -}); - -// MOMENTS - -function getSetWeekYear (input) { - return getSetWeekYearHelper.call(this, - input, - this.week(), - this.weekday(), - this.localeData()._week.dow, - this.localeData()._week.doy); -} - -function getSetISOWeekYear (input) { - return getSetWeekYearHelper.call(this, - input, this.isoWeek(), this.isoWeekday(), 1, 4); -} - -function getISOWeeksInYear () { - return weeksInYear(this.year(), 1, 4); -} - -function getWeeksInYear () { - var weekInfo = this.localeData()._week; - return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); -} - -function getSetWeekYearHelper(input, week, weekday, dow, doy) { - var weeksTarget; - if (input == null) { - return weekOfYear(this, dow, doy).year; - } else { - weeksTarget = weeksInYear(input, dow, doy); - if (week > weeksTarget) { - week = weeksTarget; - } - return setWeekAll.call(this, input, week, weekday, dow, doy); - } -} - -function setWeekAll(weekYear, week, weekday, dow, doy) { - var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), - date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear); - - this.year(date.getUTCFullYear()); - this.month(date.getUTCMonth()); - this.date(date.getUTCDate()); - return this; -} - -// FORMATTING - -addFormatToken('Q', 0, 'Qo', 'quarter'); - -// ALIASES - -addUnitAlias('quarter', 'Q'); - -// PRIORITY - -addUnitPriority('quarter', 7); - -// PARSING - -addRegexToken('Q', match1); -addParseToken('Q', function (input, array) { - array[MONTH] = (toInt(input) - 1) * 3; -}); - -// MOMENTS - -function getSetQuarter (input) { - return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3); -} - -// FORMATTING - -addFormatToken('D', ['DD', 2], 'Do', 'date'); - -// ALIASES - -addUnitAlias('date', 'D'); - -// PRIOROITY -addUnitPriority('date', 9); - -// PARSING - -addRegexToken('D', match1to2); -addRegexToken('DD', match1to2, match2); -addRegexToken('Do', function (isStrict, locale) { - return isStrict ? locale._ordinalParse : locale._ordinalParseLenient; -}); - -addParseToken(['D', 'DD'], DATE); -addParseToken('Do', function (input, array) { - array[DATE] = toInt(input.match(match1to2)[0], 10); -}); - -// MOMENTS - -var getSetDayOfMonth = makeGetSet('Date', true); - -// FORMATTING - -addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); - -// ALIASES - -addUnitAlias('dayOfYear', 'DDD'); - -// PRIORITY -addUnitPriority('dayOfYear', 4); - -// PARSING - -addRegexToken('DDD', match1to3); -addRegexToken('DDDD', match3); -addParseToken(['DDD', 'DDDD'], function (input, array, config) { - config._dayOfYear = toInt(input); -}); - -// HELPERS - -// MOMENTS - -function getSetDayOfYear (input) { - var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1; - return input == null ? dayOfYear : this.add((input - dayOfYear), 'd'); -} - -// FORMATTING - -addFormatToken('m', ['mm', 2], 0, 'minute'); - -// ALIASES - -addUnitAlias('minute', 'm'); - -// PRIORITY - -addUnitPriority('minute', 14); - -// PARSING - -addRegexToken('m', match1to2); -addRegexToken('mm', match1to2, match2); -addParseToken(['m', 'mm'], MINUTE); - -// MOMENTS - -var getSetMinute = makeGetSet('Minutes', false); - -// FORMATTING - -addFormatToken('s', ['ss', 2], 0, 'second'); - -// ALIASES - -addUnitAlias('second', 's'); - -// PRIORITY - -addUnitPriority('second', 15); - -// PARSING - -addRegexToken('s', match1to2); -addRegexToken('ss', match1to2, match2); -addParseToken(['s', 'ss'], SECOND); - -// MOMENTS - -var getSetSecond = makeGetSet('Seconds', false); - -// FORMATTING - -addFormatToken('S', 0, 0, function () { - return ~~(this.millisecond() / 100); -}); - -addFormatToken(0, ['SS', 2], 0, function () { - return ~~(this.millisecond() / 10); -}); - -addFormatToken(0, ['SSS', 3], 0, 'millisecond'); -addFormatToken(0, ['SSSS', 4], 0, function () { - return this.millisecond() * 10; -}); -addFormatToken(0, ['SSSSS', 5], 0, function () { - return this.millisecond() * 100; -}); -addFormatToken(0, ['SSSSSS', 6], 0, function () { - return this.millisecond() * 1000; -}); -addFormatToken(0, ['SSSSSSS', 7], 0, function () { - return this.millisecond() * 10000; -}); -addFormatToken(0, ['SSSSSSSS', 8], 0, function () { - return this.millisecond() * 100000; -}); -addFormatToken(0, ['SSSSSSSSS', 9], 0, function () { - return this.millisecond() * 1000000; -}); - - -// ALIASES - -addUnitAlias('millisecond', 'ms'); - -// PRIORITY - -addUnitPriority('millisecond', 16); - -// PARSING - -addRegexToken('S', match1to3, match1); -addRegexToken('SS', match1to3, match2); -addRegexToken('SSS', match1to3, match3); - -var token; -for (token = 'SSSS'; token.length <= 9; token += 'S') { - addRegexToken(token, matchUnsigned); -} - -function parseMs(input, array) { - array[MILLISECOND] = toInt(('0.' + input) * 1000); -} - -for (token = 'S'; token.length <= 9; token += 'S') { - addParseToken(token, parseMs); -} -// MOMENTS - -var getSetMillisecond = makeGetSet('Milliseconds', false); - -// FORMATTING - -addFormatToken('z', 0, 0, 'zoneAbbr'); -addFormatToken('zz', 0, 0, 'zoneName'); - -// MOMENTS - -function getZoneAbbr () { - return this._isUTC ? 'UTC' : ''; -} - -function getZoneName () { - return this._isUTC ? 'Coordinated Universal Time' : ''; -} - -var proto = Moment.prototype; - -proto.add = add; -proto.calendar = calendar$1; -proto.clone = clone; -proto.diff = diff; -proto.endOf = endOf; -proto.format = format; -proto.from = from; -proto.fromNow = fromNow; -proto.to = to; -proto.toNow = toNow; -proto.get = stringGet; -proto.invalidAt = invalidAt; -proto.isAfter = isAfter; -proto.isBefore = isBefore; -proto.isBetween = isBetween; -proto.isSame = isSame; -proto.isSameOrAfter = isSameOrAfter; -proto.isSameOrBefore = isSameOrBefore; -proto.isValid = isValid$1; -proto.lang = lang; -proto.locale = locale; -proto.localeData = localeData; -proto.max = prototypeMax; -proto.min = prototypeMin; -proto.parsingFlags = parsingFlags; -proto.set = stringSet; -proto.startOf = startOf; -proto.subtract = subtract; -proto.toArray = toArray; -proto.toObject = toObject; -proto.toDate = toDate; -proto.toISOString = toISOString; -proto.inspect = inspect; -proto.toJSON = toJSON; -proto.toString = toString; -proto.unix = unix; -proto.valueOf = valueOf; -proto.creationData = creationData; - -// Year -proto.year = getSetYear; -proto.isLeapYear = getIsLeapYear; - -// Week Year -proto.weekYear = getSetWeekYear; -proto.isoWeekYear = getSetISOWeekYear; - -// Quarter -proto.quarter = proto.quarters = getSetQuarter; - -// Month -proto.month = getSetMonth; -proto.daysInMonth = getDaysInMonth; - -// Week -proto.week = proto.weeks = getSetWeek; -proto.isoWeek = proto.isoWeeks = getSetISOWeek; -proto.weeksInYear = getWeeksInYear; -proto.isoWeeksInYear = getISOWeeksInYear; - -// Day -proto.date = getSetDayOfMonth; -proto.day = proto.days = getSetDayOfWeek; -proto.weekday = getSetLocaleDayOfWeek; -proto.isoWeekday = getSetISODayOfWeek; -proto.dayOfYear = getSetDayOfYear; - -// Hour -proto.hour = proto.hours = getSetHour; - -// Minute -proto.minute = proto.minutes = getSetMinute; - -// Second -proto.second = proto.seconds = getSetSecond; - -// Millisecond -proto.millisecond = proto.milliseconds = getSetMillisecond; - -// Offset -proto.utcOffset = getSetOffset; -proto.utc = setOffsetToUTC; -proto.local = setOffsetToLocal; -proto.parseZone = setOffsetToParsedOffset; -proto.hasAlignedHourOffset = hasAlignedHourOffset; -proto.isDST = isDaylightSavingTime; -proto.isLocal = isLocal; -proto.isUtcOffset = isUtcOffset; -proto.isUtc = isUtc; -proto.isUTC = isUtc; - -// Timezone -proto.zoneAbbr = getZoneAbbr; -proto.zoneName = getZoneName; - -// Deprecations -proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth); -proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth); -proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear); -proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone); -proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted); - -function createUnix (input) { - return createLocal(input * 1000); -} - -function createInZone () { - return createLocal.apply(null, arguments).parseZone(); -} - -function preParsePostFormat (string) { - return string; -} - -var proto$1 = Locale.prototype; - -proto$1.calendar = calendar; -proto$1.longDateFormat = longDateFormat; -proto$1.invalidDate = invalidDate; -proto$1.ordinal = ordinal; -proto$1.preparse = preParsePostFormat; -proto$1.postformat = preParsePostFormat; -proto$1.relativeTime = relativeTime; -proto$1.pastFuture = pastFuture; -proto$1.set = set; - -// Month -proto$1.months = localeMonths; -proto$1.monthsShort = localeMonthsShort; -proto$1.monthsParse = localeMonthsParse; -proto$1.monthsRegex = monthsRegex; -proto$1.monthsShortRegex = monthsShortRegex; - -// Week -proto$1.week = localeWeek; -proto$1.firstDayOfYear = localeFirstDayOfYear; -proto$1.firstDayOfWeek = localeFirstDayOfWeek; - -// Day of Week -proto$1.weekdays = localeWeekdays; -proto$1.weekdaysMin = localeWeekdaysMin; -proto$1.weekdaysShort = localeWeekdaysShort; -proto$1.weekdaysParse = localeWeekdaysParse; - -proto$1.weekdaysRegex = weekdaysRegex; -proto$1.weekdaysShortRegex = weekdaysShortRegex; -proto$1.weekdaysMinRegex = weekdaysMinRegex; - -// Hours -proto$1.isPM = localeIsPM; -proto$1.meridiem = localeMeridiem; - -function get$1 (format, index, field, setter) { - var locale = getLocale(); - var utc = createUTC().set(setter, index); - return locale[field](utc, format); -} - -function listMonthsImpl (format, index, field) { - if (isNumber(format)) { - index = format; - format = undefined; - } - - format = format || ''; - - if (index != null) { - return get$1(format, index, field, 'month'); - } - - var i; - var out = []; - for (i = 0; i < 12; i++) { - out[i] = get$1(format, i, field, 'month'); - } - return out; -} - -// () -// (5) -// (fmt, 5) -// (fmt) -// (true) -// (true, 5) -// (true, fmt, 5) -// (true, fmt) -function listWeekdaysImpl (localeSorted, format, index, field) { - if (typeof localeSorted === 'boolean') { - if (isNumber(format)) { - index = format; - format = undefined; - } - - format = format || ''; - } else { - format = localeSorted; - index = format; - localeSorted = false; - - if (isNumber(format)) { - index = format; - format = undefined; - } - - format = format || ''; - } - - var locale = getLocale(), - shift = localeSorted ? locale._week.dow : 0; - - if (index != null) { - return get$1(format, (index + shift) % 7, field, 'day'); - } - - var i; - var out = []; - for (i = 0; i < 7; i++) { - out[i] = get$1(format, (i + shift) % 7, field, 'day'); - } - return out; -} - -function listMonths (format, index) { - return listMonthsImpl(format, index, 'months'); -} - -function listMonthsShort (format, index) { - return listMonthsImpl(format, index, 'monthsShort'); -} - -function listWeekdays (localeSorted, format, index) { - return listWeekdaysImpl(localeSorted, format, index, 'weekdays'); -} - -function listWeekdaysShort (localeSorted, format, index) { - return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort'); -} - -function listWeekdaysMin (localeSorted, format, index) { - return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin'); -} - -getSetGlobalLocale('en', { - ordinalParse: /\d{1,2}(th|st|nd|rd)/, - ordinal : function (number) { - var b = number % 10, - output = (toInt(number % 100 / 10) === 1) ? 'th' : - (b === 1) ? 'st' : - (b === 2) ? 'nd' : - (b === 3) ? 'rd' : 'th'; - return number + output; - } -}); - -// Side effect imports -hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale); -hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale); - -var mathAbs = Math.abs; - -function abs () { - var data = this._data; - - this._milliseconds = mathAbs(this._milliseconds); - this._days = mathAbs(this._days); - this._months = mathAbs(this._months); - - data.milliseconds = mathAbs(data.milliseconds); - data.seconds = mathAbs(data.seconds); - data.minutes = mathAbs(data.minutes); - data.hours = mathAbs(data.hours); - data.months = mathAbs(data.months); - data.years = mathAbs(data.years); - - return this; -} - -function addSubtract$1 (duration, input, value, direction) { - var other = createDuration(input, value); - - duration._milliseconds += direction * other._milliseconds; - duration._days += direction * other._days; - duration._months += direction * other._months; - - return duration._bubble(); -} - -// supports only 2.0-style add(1, 's') or add(duration) -function add$1 (input, value) { - return addSubtract$1(this, input, value, 1); -} - -// supports only 2.0-style subtract(1, 's') or subtract(duration) -function subtract$1 (input, value) { - return addSubtract$1(this, input, value, -1); -} - -function absCeil (number) { - if (number < 0) { - return Math.floor(number); - } else { - return Math.ceil(number); - } -} - -function bubble () { - var milliseconds = this._milliseconds; - var days = this._days; - var months = this._months; - var data = this._data; - var seconds, minutes, hours, years, monthsFromDays; - - // if we have a mix of positive and negative values, bubble down first - // check: https://github.com/moment/moment/issues/2166 - if (!((milliseconds >= 0 && days >= 0 && months >= 0) || - (milliseconds <= 0 && days <= 0 && months <= 0))) { - milliseconds += absCeil(monthsToDays(months) + days) * 864e5; - days = 0; - months = 0; - } - - // The following code bubbles up values, see the tests for - // examples of what that means. - data.milliseconds = milliseconds % 1000; - - seconds = absFloor(milliseconds / 1000); - data.seconds = seconds % 60; - - minutes = absFloor(seconds / 60); - data.minutes = minutes % 60; - - hours = absFloor(minutes / 60); - data.hours = hours % 24; - - days += absFloor(hours / 24); - - // convert days to months - monthsFromDays = absFloor(daysToMonths(days)); - months += monthsFromDays; - days -= absCeil(monthsToDays(monthsFromDays)); - - // 12 months -> 1 year - years = absFloor(months / 12); - months %= 12; - - data.days = days; - data.months = months; - data.years = years; - - return this; -} - -function daysToMonths (days) { - // 400 years have 146097 days (taking into account leap year rules) - // 400 years have 12 months === 4800 - return days * 4800 / 146097; -} - -function monthsToDays (months) { - // the reverse of daysToMonths - return months * 146097 / 4800; -} - -function as (units) { - var days; - var months; - var milliseconds = this._milliseconds; - - units = normalizeUnits(units); - - if (units === 'month' || units === 'year') { - days = this._days + milliseconds / 864e5; - months = this._months + daysToMonths(days); - return units === 'month' ? months : months / 12; - } else { - // handle milliseconds separately because of floating point math errors (issue #1867) - days = this._days + Math.round(monthsToDays(this._months)); - switch (units) { - case 'week' : return days / 7 + milliseconds / 6048e5; - case 'day' : return days + milliseconds / 864e5; - case 'hour' : return days * 24 + milliseconds / 36e5; - case 'minute' : return days * 1440 + milliseconds / 6e4; - case 'second' : return days * 86400 + milliseconds / 1000; - // Math.floor prevents floating point math errors here - case 'millisecond': return Math.floor(days * 864e5) + milliseconds; - default: throw new Error('Unknown unit ' + units); - } - } -} - -// TODO: Use this.as('ms')? -function valueOf$1 () { - return ( - this._milliseconds + - this._days * 864e5 + - (this._months % 12) * 2592e6 + - toInt(this._months / 12) * 31536e6 - ); -} - -function makeAs (alias) { - return function () { - return this.as(alias); - }; -} - -var asMilliseconds = makeAs('ms'); -var asSeconds = makeAs('s'); -var asMinutes = makeAs('m'); -var asHours = makeAs('h'); -var asDays = makeAs('d'); -var asWeeks = makeAs('w'); -var asMonths = makeAs('M'); -var asYears = makeAs('y'); - -function get$2 (units) { - units = normalizeUnits(units); - return this[units + 's'](); -} - -function makeGetter(name) { - return function () { - return this._data[name]; - }; -} - -var milliseconds = makeGetter('milliseconds'); -var seconds = makeGetter('seconds'); -var minutes = makeGetter('minutes'); -var hours = makeGetter('hours'); -var days = makeGetter('days'); -var months = makeGetter('months'); -var years = makeGetter('years'); - -function weeks () { - return absFloor(this.days() / 7); -} - -var round = Math.round; -var thresholds = { - s: 45, // seconds to minute - m: 45, // minutes to hour - h: 22, // hours to day - d: 26, // days to month - M: 11 // months to year -}; - -// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize -function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) { - return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture); -} - -function relativeTime$1 (posNegDuration, withoutSuffix, locale) { - var duration = createDuration(posNegDuration).abs(); - var seconds = round(duration.as('s')); - var minutes = round(duration.as('m')); - var hours = round(duration.as('h')); - var days = round(duration.as('d')); - var months = round(duration.as('M')); - var years = round(duration.as('y')); - - var a = seconds < thresholds.s && ['s', seconds] || - minutes <= 1 && ['m'] || - minutes < thresholds.m && ['mm', minutes] || - hours <= 1 && ['h'] || - hours < thresholds.h && ['hh', hours] || - days <= 1 && ['d'] || - days < thresholds.d && ['dd', days] || - months <= 1 && ['M'] || - months < thresholds.M && ['MM', months] || - years <= 1 && ['y'] || ['yy', years]; - - a[2] = withoutSuffix; - a[3] = +posNegDuration > 0; - a[4] = locale; - return substituteTimeAgo.apply(null, a); -} - -// This function allows you to set the rounding function for relative time strings -function getSetRelativeTimeRounding (roundingFunction) { - if (roundingFunction === undefined) { - return round; - } - if (typeof(roundingFunction) === 'function') { - round = roundingFunction; - return true; - } - return false; -} - -// This function allows you to set a threshold for relative time strings -function getSetRelativeTimeThreshold (threshold, limit) { - if (thresholds[threshold] === undefined) { - return false; - } - if (limit === undefined) { - return thresholds[threshold]; - } - thresholds[threshold] = limit; - return true; -} - -function humanize (withSuffix) { - var locale = this.localeData(); - var output = relativeTime$1(this, !withSuffix, locale); - - if (withSuffix) { - output = locale.pastFuture(+this, output); - } - - return locale.postformat(output); -} - -var abs$1 = Math.abs; - -function toISOString$1() { - // for ISO strings we do not use the normal bubbling rules: - // * milliseconds bubble up until they become hours - // * days do not bubble at all - // * months bubble up until they become years - // This is because there is no context-free conversion between hours and days - // (think of clock changes) - // and also not between days and months (28-31 days per month) - var seconds = abs$1(this._milliseconds) / 1000; - var days = abs$1(this._days); - var months = abs$1(this._months); - var minutes, hours, years; - - // 3600 seconds -> 60 minutes -> 1 hour - minutes = absFloor(seconds / 60); - hours = absFloor(minutes / 60); - seconds %= 60; - minutes %= 60; - - // 12 months -> 1 year - years = absFloor(months / 12); - months %= 12; - - - // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js - var Y = years; - var M = months; - var D = days; - var h = hours; - var m = minutes; - var s = seconds; - var total = this.asSeconds(); - - if (!total) { - // this is the same as C#'s (Noda) and python (isodate)... - // but not other JS (goog.date) - return 'P0D'; - } - - return (total < 0 ? '-' : '') + - 'P' + - (Y ? Y + 'Y' : '') + - (M ? M + 'M' : '') + - (D ? D + 'D' : '') + - ((h || m || s) ? 'T' : '') + - (h ? h + 'H' : '') + - (m ? m + 'M' : '') + - (s ? s + 'S' : ''); -} - -var proto$2 = Duration.prototype; - -proto$2.abs = abs; -proto$2.add = add$1; -proto$2.subtract = subtract$1; -proto$2.as = as; -proto$2.asMilliseconds = asMilliseconds; -proto$2.asSeconds = asSeconds; -proto$2.asMinutes = asMinutes; -proto$2.asHours = asHours; -proto$2.asDays = asDays; -proto$2.asWeeks = asWeeks; -proto$2.asMonths = asMonths; -proto$2.asYears = asYears; -proto$2.valueOf = valueOf$1; -proto$2._bubble = bubble; -proto$2.get = get$2; -proto$2.milliseconds = milliseconds; -proto$2.seconds = seconds; -proto$2.minutes = minutes; -proto$2.hours = hours; -proto$2.days = days; -proto$2.weeks = weeks; -proto$2.months = months; -proto$2.years = years; -proto$2.humanize = humanize; -proto$2.toISOString = toISOString$1; -proto$2.toString = toISOString$1; -proto$2.toJSON = toISOString$1; -proto$2.locale = locale; -proto$2.localeData = localeData; - -// Deprecations -proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1); -proto$2.lang = lang; - -// Side effect imports - -// FORMATTING - -addFormatToken('X', 0, 0, 'unix'); -addFormatToken('x', 0, 0, 'valueOf'); - -// PARSING - -addRegexToken('x', matchSigned); -addRegexToken('X', matchTimestamp); -addParseToken('X', function (input, array, config) { - config._d = new Date(parseFloat(input, 10) * 1000); -}); -addParseToken('x', function (input, array, config) { - config._d = new Date(toInt(input)); -}); - -// Side effect imports - - -hooks.version = '2.17.1'; - -setHookCallback(createLocal); - -hooks.fn = proto; -hooks.min = min; -hooks.max = max; -hooks.now = now; -hooks.utc = createUTC; -hooks.unix = createUnix; -hooks.months = listMonths; -hooks.isDate = isDate; -hooks.locale = getSetGlobalLocale; -hooks.invalid = createInvalid; -hooks.duration = createDuration; -hooks.isMoment = isMoment; -hooks.weekdays = listWeekdays; -hooks.parseZone = createInZone; -hooks.localeData = getLocale; -hooks.isDuration = isDuration; -hooks.monthsShort = listMonthsShort; -hooks.weekdaysMin = listWeekdaysMin; -hooks.defineLocale = defineLocale; -hooks.updateLocale = updateLocale; -hooks.locales = listLocales; -hooks.weekdaysShort = listWeekdaysShort; -hooks.normalizeUnits = normalizeUnits; -hooks.relativeTimeRounding = getSetRelativeTimeRounding; -hooks.relativeTimeThreshold = getSetRelativeTimeThreshold; -hooks.calendarFormat = getCalendarFormat; -hooks.prototype = proto; - -return hooks; - -}))); - -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define('color-hash/dist/color-hash',[],e);else{var o;"undefined"!=typeof window?o=window:"undefined"!=typeof global?o=global:"undefined"!=typeof self&&(o=self),o.ColorHash=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o MAX_SAFE_INTEGER) { - hash = parseInt(hash / seed2); - } - hash = hash * seed + str.charCodeAt(i); - } - return hash; -}; - -module.exports = BKDRHash; - -},{}],2:[function(require,module,exports){ -var BKDRHash = require('./bkdr-hash'); - -/** - * Convert RGB Array to HEX - * - * @param {Array} RGBArray - [R, G, B] - * @returns {String} 6 digits hex starting with # - */ -var RGB2HEX = function(RGBArray) { - var hex = '#'; - RGBArray.forEach(function(value) { - if (value < 16) { - hex += 0; - } - hex += value.toString(16); - }); - return hex; -}; - -/** - * Convert HSL to RGB - * - * @see {@link http://zh.wikipedia.org/wiki/HSL和HSV色彩空间} for further information. - * @param {Number} H Hue ∈ [0, 360) - * @param {Number} S Saturation ∈ [0, 1] - * @param {Number} L Lightness ∈ [0, 1] - * @returns {Array} R, G, B ∈ [0, 255] - */ -var HSL2RGB = function(H, S, L) { - H /= 360; - - var q = L < 0.5 ? L * (1 + S) : L + S - L * S; - var p = 2 * L - q; - - return [H + 1/3, H, H - 1/3].map(function(color) { - if(color < 0) { - color++; - } - if(color > 1) { - color--; - } - if(color < 1/6) { - color = p + (q - p) * 6 * color; - } else if(color < 0.5) { - color = q; - } else if(color < 2/3) { - color = p + (q - p) * 6 * (2/3 - color); - } else { - color = p; - } - return Math.round(color * 255); - }); -}; - -/** - * Color Hash Class - * - * @class - */ -var ColorHash = function(options) { - options = options || {}; - - var LS = [options.lightness, options.saturation].map(function(param) { - param = param || [0.35, 0.5, 0.65]; // note that 3 is a prime - return Object.prototype.toString.call(param) === '[object Array]' ? param.concat() : [param]; - }); - - this.L = LS[0]; - this.S = LS[1]; - - this.hash = options.hash || BKDRHash; -}; - -/** - * Returns the hash in [h, s, l]. - * Note that H ∈ [0, 360); S ∈ [0, 1]; L ∈ [0, 1]; - * - * @param {String} str string to hash - * @returns {Array} [h, s, l] - */ -ColorHash.prototype.hsl = function(str) { - var H, S, L; - var hash = this.hash(str); - - H = hash % 359; // note that 359 is a prime - hash = parseInt(hash / 360); - S = this.S[hash % this.S.length]; - hash = parseInt(hash / this.S.length); - L = this.L[hash % this.L.length]; - - return [H, S, L]; -}; - -/** - * Returns the hash in [r, g, b]. - * Note that R, G, B ∈ [0, 255] - * - * @param {String} str string to hash - * @returns {Array} [r, g, b] - */ -ColorHash.prototype.rgb = function(str) { - var hsl = this.hsl(str); - return HSL2RGB.apply(this, hsl); -}; - -/** - * Returns the hash in hex - * - * @param {String} str string to hash - * @returns {String} hex with # - */ -ColorHash.prototype.hex = function(str) { - var rgb = this.rgb(str); - return RGB2HEX(rgb); -}; - -module.exports = ColorHash; - -},{"./bkdr-hash":1}]},{},[2])(2) -});;define('color-hash', ['color-hash/dist/color-hash'], function (main) { return main; }); - -/** - * Push - * ======= - * A compact, cross-browser solution for the JavaScript Notifications API - * - * Credits - * ------- - * Tsvetan Tsvetkov (ttsvetko) - * Alex Gibson (alexgibson) - * - * License - * ------- - * - * The MIT License (MIT) - * - * Copyright (c) 2015 Tyler Nickerson - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * - * @preserve - */ -(function(global,factory){"use strict";if(typeof define==="function"&&define.amd){define('push/push.min',[],function(){return new(factory(global,global.document))})}else if(typeof module!=="undefined"&&module.exports){module.exports=new(factory(global,global.document))}else{global.Push=new(factory(global,global.document))}})(typeof window!=="undefined"?window:this,function(w,d){var Push=function(){var self=this,isUndefined=function(obj){return obj===undefined},isString=function(obj){return String(obj)===obj},isFunction=function(obj){return obj&&{}.toString.call(obj)==="[object Function]"},currentId=0,incompatibilityErrorMessage="PushError: push.js is incompatible with browser.",hasPermission=false,notifications={},lastWorkerPath=null,closeNotification=function(id){var errored=false,notification=notifications[id];if(typeof notification!=="undefined"){if(notification.close){notification.close()}else if(notification.cancel){notification.cancel()}else if(w.external&&w.external.msIsSiteMode){w.external.msSiteModeClearIconOverlay()}else{errored=true;throw new Error("Unable to close notification: unknown interface")}if(!errored){return removeNotification(id)}}return false},addNotification=function(notification){var id=currentId;notifications[id]=notification;currentId++;return id},removeNotification=function(id){var dict={},success=false,key;for(key in notifications){if(notifications.hasOwnProperty(key)){if(key!=id){dict[key]=notifications[key]}else{success=true}}}notifications=dict;return success},createCallback=function(title,options){var notification,wrapper,id,onClose;options=options||{};self.lastWorkerPath=options.serviceWorker||"sw.js";if(w.Notification){try{notification=new w.Notification(title,{icon:isString(options.icon)||isUndefined(options.icon)?options.icon:options.icon.x32,body:options.body,tag:options.tag,requireInteraction:options.requireInteraction})}catch(e){if(w.navigator){w.navigator.serviceWorker.register(options.serviceWorker||"sw.js");w.navigator.serviceWorker.ready.then(function(registration){registration.showNotification(title,{body:options.body,vibrate:options.vibrate,tag:options.tag,requireInteraction:options.requireInteraction})})}}}else if(w.webkitNotifications){notification=w.webkitNotifications.createNotification(options.icon,title,options.body);notification.show()}else if(navigator.mozNotification){notification=navigator.mozNotification.createNotification(title,options.body,options.icon);notification.show()}else if(w.external&&w.external.msIsSiteMode()){w.external.msSiteModeClearIconOverlay();w.external.msSiteModeSetIconOverlay(isString(options.icon)||isUndefined(options.icon)?options.icon:options.icon.x16,title);w.external.msSiteModeActivate();notification={}}else{throw new Error("Unable to create notification: unknown interface")}id=addNotification(notification);wrapper={get:function(){return notification},close:function(){closeNotification(id)}};if(options.timeout){setTimeout(function(){wrapper.close()},options.timeout)}if(isFunction(options.onShow))notification.addEventListener("show",options.onShow);if(isFunction(options.onError))notification.addEventListener("error",options.onError);if(isFunction(options.onClick))notification.addEventListener("click",options.onClick);onClose=function(){removeNotification(id);if(isFunction(options.onClose)){options.onClose.call(this)}};notification.addEventListener("close",onClose);notification.addEventListener("cancel",onClose);return wrapper},Permission={DEFAULT:"default",GRANTED:"granted",DENIED:"denied"},Permissions=[Permission.GRANTED,Permission.DEFAULT,Permission.DENIED];self.Permission=Permission;self.Permission.request=function(onGranted,onDenied){if(!self.isSupported){throw new Error(incompatibilityErrorMessage)}callback=function(result){switch(result){case self.Permission.GRANTED:hasPermission=true;if(onGranted)onGranted();break;case self.Permission.DENIED:hasPermission=false;if(onDenied)onDenied();break}};if(w.Notification&&w.Notification.requestPermission){Notification.requestPermission(callback)}else if(w.webkitNotifications&&w.webkitNotifications.checkPermission){w.webkitNotifications.requestPermission(callback)}else{throw new Error(incompatibilityErrorMessage)}};self.Permission.has=function(){return hasPermission};self.Permission.get=function(){var permission;if(!self.isSupported){throw new Error(incompatibilityErrorMessage)}if(w.Notification&&w.Notification.permissionLevel){permission=w.Notification.permissionLevel}else if(w.webkitNotifications&&w.webkitNotifications.checkPermission){permission=Permissions[w.webkitNotifications.checkPermission()]}else if(w.Notification&&w.Notification.permission){permission=w.Notification.permission}else if(navigator.mozNotification){permission=Permissions.GRANTED}else if(w.external&&w.external.msIsSiteMode()!==undefined){permission=w.external.msIsSiteMode()?Permission.GRANTED:Permission.DEFAULT}else{throw new Error(incompatibilityErrorMessage)}return permission};self.isSupported=function(){var isSupported=false;try{isSupported=!!(w.Notification||w.webkitNotifications||navigator.mozNotification||w.external&&w.external.msIsSiteMode()!==undefined)}catch(e){}return isSupported}();self.create=function(title,options){if(!self.isSupported){throw new Error(incompatibilityErrorMessage)}if(!isString(title)){throw new Error("PushError: Title of notification must be a string")}if(!self.Permission.has()){return new Promise(function(resolve,reject){self.Permission.request(function(){try{resolve(createCallback(title,options))}catch(e){reject(e)}},function(){reject("Permission request declined")})})}else{return new Promise(function(resolve,reject){try{resolve(createCallback(title,options))}catch(e){reject(e)}})}};self.count=function(){var count=0,key;for(key in notifications){count++}return count},self.__lastWorkerPath=function(){return self.lastWorkerPath},self.close=function(tag){var key;for(key in notifications){notification=notifications[key];if(notification.tag===tag){return closeNotification(key)}}};self.clear=function(){var i,success=true;for(key in notifications){var didClose=closeNotification(key);success=success&&didClose}return success}};return Push});;define('push', ['push/push.min'], function (main) { return main; }); - -/*! - * clipboard.js v1.5.15 - * https://zenorocha.github.io/clipboard.js - * - * Licensed MIT © Zeno Rocha - */ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define('clipboard/dist/clipboard.min',[],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.Clipboard=e()}}(function(){var e,t,n;return function e(t,n,i){function o(a,c){if(!n[a]){if(!t[a]){var l="function"==typeof require&&require;if(!c&&l)return l(a,!0);if(r)return r(a,!0);var s=new Error("Cannot find module '"+a+"'");throw s.code="MODULE_NOT_FOUND",s}var u=n[a]={exports:{}};t[a][0].call(u.exports,function(e){var n=t[a][1][e];return o(n?n:e)},u,u.exports,e,t,n,i)}return n[a].exports}for(var r="function"==typeof require&&require,a=0;a0&&void 0!==arguments[0]?arguments[0]:{};this.action=t.action,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""}},{key:"initSelection",value:function e(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function e(){var t=this,n="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return t.removeFake()},this.fakeHandler=document.body.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[n?"right":"left"]="-9999px";var i=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.addEventListener("focus",window.scrollTo(0,i)),this.fakeElem.style.top=i+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,document.body.appendChild(this.fakeElem),this.selectedText=(0,o.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function e(){this.fakeHandler&&(document.body.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(document.body.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function e(){this.selectedText=(0,o.default)(this.target),this.copyText()}},{key:"copyText",value:function e(){var t=void 0;try{t=document.execCommand(this.action)}catch(e){t=!1}this.handleResult(t)}},{key:"handleResult",value:function e(t){this.emitter.emit(t?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function e(){this.target&&this.target.blur(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function e(){this.removeFake()}},{key:"action",set:function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function e(){return this._action}},{key:"target",set:function e(t){if(void 0!==t){if(!t||"object"!==("undefined"==typeof t?"undefined":r(t))||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function e(){return this._target}}]),e}();e.exports=c})},{select:5}],8:[function(t,n,i){!function(o,r){if("function"==typeof e&&e.amd)e(["module","./clipboard-action","tiny-emitter","good-listener"],r);else if("undefined"!=typeof i)r(n,t("./clipboard-action"),t("tiny-emitter"),t("good-listener"));else{var a={exports:{}};r(a,o.clipboardAction,o.tinyEmitter,o.goodListener),o.clipboard=a.exports}}(this,function(e,t,n,i){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e,t){var n="data-clipboard-"+e;if(t.hasAttribute(n))return t.getAttribute(n)}var s=o(t),u=o(n),f=o(i),d=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText}},{key:"listenClick",value:function e(t){var n=this;this.listener=(0,f.default)(t,"click",function(e){return n.onClick(e)})}},{key:"onClick",value:function e(t){var n=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new s.default({action:this.action(n),target:this.target(n),text:this.text(n),trigger:n,emitter:this})}},{key:"defaultAction",value:function e(t){return l("action",t)}},{key:"defaultTarget",value:function e(t){var n=l("target",t);if(n)return document.querySelector(n)}},{key:"defaultText",value:function e(t){return l("text",t)}},{key:"destroy",value:function e(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}]),t}(u.default);e.exports=h})},{"./clipboard-action":7,"good-listener":4,"tiny-emitter":6}]},{},[8])(8)});;define('clipboard', ['clipboard/dist/clipboard.min'], function (main) { return main; }); - -!function(t,e){"object"==typeof module&&module.exports?module.exports=e(t):t.timeago=e(t)}("undefined"!=typeof window?window:this,function(){function t(t){return t instanceof Date?t:isNaN(t)?/^\d+$/.test(t)?new Date(e(t)):(t=(t||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/T/," ").replace(/Z/," UTC").replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2"),new Date(t)):new Date(e(t))}function e(t){return parseInt(t)}function n(t,n,r){n=d[n]?n:d[r]?r:"en";var i=0,o=t<0?1:0;for(t=Math.abs(t);t>=l[i]&&i(0===i?9:1)&&(i+=1),d[n](t,i)[o].replace("%s",t)}function r(e,n){return n=n?t(n):new Date,(n-t(e))/1e3}function i(t){for(var e=1,n=0,r=Math.abs(t);t>=l[n]&&n1&&(n+="s"),[t+" "+n+" ago","in "+t+" "+n]},zh_CN:function(t,e){if(0===e)return["刚刚","片刻后"];var n=s[parseInt(e/2)];return[t+n+"前",t+n+"后"]}},l=[60,60,24,7,365/7/12,12],p=6,h="datetime";return u.register=function(t,e){d[t]=e},u}); -define("timeago/dist/timeago.min", [],function(){}); -;define('timeago', ['timeago/dist/timeago.min'], function (main) { return main; }); - -define('dropzone/dist/dropzone',['require','exports','module'],function (require, exports, module) { -/* - * - * More info at [www.dropzonejs.com](http://www.dropzonejs.com) - * - * Copyright (c) 2012, Matias Meno - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * - */ - -(function() { - var Dropzone, Emitter, camelize, contentLoaded, detectVerticalSquash, drawImageIOSFix, noop, without, - __slice = [].slice, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - - noop = function() {}; - - Emitter = (function() { - function Emitter() {} - - Emitter.prototype.addEventListener = Emitter.prototype.on; - - Emitter.prototype.on = function(event, fn) { - this._callbacks = this._callbacks || {}; - if (!this._callbacks[event]) { - this._callbacks[event] = []; - } - this._callbacks[event].push(fn); - return this; - }; - - Emitter.prototype.emit = function() { - var args, callback, callbacks, event, _i, _len; - event = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : []; - this._callbacks = this._callbacks || {}; - callbacks = this._callbacks[event]; - if (callbacks) { - for (_i = 0, _len = callbacks.length; _i < _len; _i++) { - callback = callbacks[_i]; - callback.apply(this, args); - } - } - return this; - }; - - Emitter.prototype.removeListener = Emitter.prototype.off; - - Emitter.prototype.removeAllListeners = Emitter.prototype.off; - - Emitter.prototype.removeEventListener = Emitter.prototype.off; - - Emitter.prototype.off = function(event, fn) { - var callback, callbacks, i, _i, _len; - if (!this._callbacks || arguments.length === 0) { - this._callbacks = {}; - return this; - } - callbacks = this._callbacks[event]; - if (!callbacks) { - return this; - } - if (arguments.length === 1) { - delete this._callbacks[event]; - return this; - } - for (i = _i = 0, _len = callbacks.length; _i < _len; i = ++_i) { - callback = callbacks[i]; - if (callback === fn) { - callbacks.splice(i, 1); - break; - } - } - return this; - }; - - return Emitter; - - })(); - - Dropzone = (function(_super) { - var extend, resolveOption; - - __extends(Dropzone, _super); - - Dropzone.prototype.Emitter = Emitter; - - - /* - This is a list of all available events you can register on a dropzone object. - - You can register an event handler like this: - - dropzone.on("dragEnter", function() { }); - */ - - Dropzone.prototype.events = ["drop", "dragstart", "dragend", "dragenter", "dragover", "dragleave", "addedfile", "addedfiles", "removedfile", "thumbnail", "error", "errormultiple", "processing", "processingmultiple", "uploadprogress", "totaluploadprogress", "sending", "sendingmultiple", "success", "successmultiple", "canceled", "canceledmultiple", "complete", "completemultiple", "reset", "maxfilesexceeded", "maxfilesreached", "queuecomplete"]; - - Dropzone.prototype.defaultOptions = { - url: null, - method: "post", - withCredentials: false, - parallelUploads: 2, - uploadMultiple: false, - maxFilesize: 256, - paramName: "file", - createImageThumbnails: true, - maxThumbnailFilesize: 10, - thumbnailWidth: 120, - thumbnailHeight: 120, - filesizeBase: 1000, - maxFiles: null, - params: {}, - clickable: true, - ignoreHiddenFiles: true, - acceptedFiles: null, - acceptedMimeTypes: null, - autoProcessQueue: true, - autoQueue: true, - addRemoveLinks: false, - previewsContainer: null, - hiddenInputContainer: "body", - capture: null, - renameFilename: null, - dictDefaultMessage: "Drop files here to upload", - dictFallbackMessage: "Your browser does not support drag'n'drop file uploads.", - dictFallbackText: "Please use the fallback form below to upload your files like in the olden days.", - dictFileTooBig: "File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.", - dictInvalidFileType: "You can't upload files of this type.", - dictResponseError: "Server responded with {{statusCode}} code.", - dictCancelUpload: "Cancel upload", - dictCancelUploadConfirmation: "Are you sure you want to cancel this upload?", - dictRemoveFile: "Remove file", - dictRemoveFileConfirmation: null, - dictMaxFilesExceeded: "You can not upload any more files.", - accept: function(file, done) { - return done(); - }, - init: function() { - return noop; - }, - forceFallback: false, - fallback: function() { - var child, messageElement, span, _i, _len, _ref; - this.element.className = "" + this.element.className + " dz-browser-not-supported"; - _ref = this.element.getElementsByTagName("div"); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - child = _ref[_i]; - if (/(^| )dz-message($| )/.test(child.className)) { - messageElement = child; - child.className = "dz-message"; - continue; - } - } - if (!messageElement) { - messageElement = Dropzone.createElement("
    "); - this.element.appendChild(messageElement); - } - span = messageElement.getElementsByTagName("span")[0]; - if (span) { - if (span.textContent != null) { - span.textContent = this.options.dictFallbackMessage; - } else if (span.innerText != null) { - span.innerText = this.options.dictFallbackMessage; - } - } - return this.element.appendChild(this.getFallbackForm()); - }, - resize: function(file) { - var info, srcRatio, trgRatio; - info = { - srcX: 0, - srcY: 0, - srcWidth: file.width, - srcHeight: file.height - }; - srcRatio = file.width / file.height; - info.optWidth = this.options.thumbnailWidth; - info.optHeight = this.options.thumbnailHeight; - if ((info.optWidth == null) && (info.optHeight == null)) { - info.optWidth = info.srcWidth; - info.optHeight = info.srcHeight; - } else if (info.optWidth == null) { - info.optWidth = srcRatio * info.optHeight; - } else if (info.optHeight == null) { - info.optHeight = (1 / srcRatio) * info.optWidth; - } - trgRatio = info.optWidth / info.optHeight; - if (file.height < info.optHeight || file.width < info.optWidth) { - info.trgHeight = info.srcHeight; - info.trgWidth = info.srcWidth; - } else { - if (srcRatio > trgRatio) { - info.srcHeight = file.height; - info.srcWidth = info.srcHeight * trgRatio; - } else { - info.srcWidth = file.width; - info.srcHeight = info.srcWidth / trgRatio; - } - } - info.srcX = (file.width - info.srcWidth) / 2; - info.srcY = (file.height - info.srcHeight) / 2; - return info; - }, - - /* - Those functions register themselves to the events on init and handle all - the user interface specific stuff. Overwriting them won't break the upload - but can break the way it's displayed. - You can overwrite them if you don't like the default behavior. If you just - want to add an additional event handler, register it on the dropzone object - and don't overwrite those options. - */ - drop: function(e) { - return this.element.classList.remove("dz-drag-hover"); - }, - dragstart: noop, - dragend: function(e) { - return this.element.classList.remove("dz-drag-hover"); - }, - dragenter: function(e) { - return this.element.classList.add("dz-drag-hover"); - }, - dragover: function(e) { - return this.element.classList.add("dz-drag-hover"); - }, - dragleave: function(e) { - return this.element.classList.remove("dz-drag-hover"); - }, - paste: noop, - reset: function() { - return this.element.classList.remove("dz-started"); - }, - addedfile: function(file) { - var node, removeFileEvent, removeLink, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _results; - if (this.element === this.previewsContainer) { - this.element.classList.add("dz-started"); - } - if (this.previewsContainer) { - file.previewElement = Dropzone.createElement(this.options.previewTemplate.trim()); - file.previewTemplate = file.previewElement; - this.previewsContainer.appendChild(file.previewElement); - _ref = file.previewElement.querySelectorAll("[data-dz-name]"); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - node = _ref[_i]; - node.textContent = this._renameFilename(file.name); - } - _ref1 = file.previewElement.querySelectorAll("[data-dz-size]"); - for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { - node = _ref1[_j]; - node.innerHTML = this.filesize(file.size); - } - if (this.options.addRemoveLinks) { - file._removeLink = Dropzone.createElement("
    " + this.options.dictRemoveFile + ""); - file.previewElement.appendChild(file._removeLink); - } - removeFileEvent = (function(_this) { - return function(e) { - e.preventDefault(); - e.stopPropagation(); - if (file.status === Dropzone.UPLOADING) { - return Dropzone.confirm(_this.options.dictCancelUploadConfirmation, function() { - return _this.removeFile(file); - }); - } else { - if (_this.options.dictRemoveFileConfirmation) { - return Dropzone.confirm(_this.options.dictRemoveFileConfirmation, function() { - return _this.removeFile(file); - }); - } else { - return _this.removeFile(file); - } - } - }; - })(this); - _ref2 = file.previewElement.querySelectorAll("[data-dz-remove]"); - _results = []; - for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) { - removeLink = _ref2[_k]; - _results.push(removeLink.addEventListener("click", removeFileEvent)); - } - return _results; - } - }, - removedfile: function(file) { - var _ref; - if (file.previewElement) { - if ((_ref = file.previewElement) != null) { - _ref.parentNode.removeChild(file.previewElement); - } - } - return this._updateMaxFilesReachedClass(); - }, - thumbnail: function(file, dataUrl) { - var thumbnailElement, _i, _len, _ref; - if (file.previewElement) { - file.previewElement.classList.remove("dz-file-preview"); - _ref = file.previewElement.querySelectorAll("[data-dz-thumbnail]"); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - thumbnailElement = _ref[_i]; - thumbnailElement.alt = file.name; - thumbnailElement.src = dataUrl; - } - return setTimeout(((function(_this) { - return function() { - return file.previewElement.classList.add("dz-image-preview"); - }; - })(this)), 1); - } - }, - error: function(file, message) { - var node, _i, _len, _ref, _results; - if (file.previewElement) { - file.previewElement.classList.add("dz-error"); - if (typeof message !== "String" && message.error) { - message = message.error; - } - _ref = file.previewElement.querySelectorAll("[data-dz-errormessage]"); - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - node = _ref[_i]; - _results.push(node.textContent = message); - } - return _results; - } - }, - errormultiple: noop, - processing: function(file) { - if (file.previewElement) { - file.previewElement.classList.add("dz-processing"); - if (file._removeLink) { - return file._removeLink.textContent = this.options.dictCancelUpload; - } - } - }, - processingmultiple: noop, - uploadprogress: function(file, progress, bytesSent) { - var node, _i, _len, _ref, _results; - if (file.previewElement) { - _ref = file.previewElement.querySelectorAll("[data-dz-uploadprogress]"); - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - node = _ref[_i]; - if (node.nodeName === 'PROGRESS') { - _results.push(node.value = progress); - } else { - _results.push(node.style.width = "" + progress + "%"); - } - } - return _results; - } - }, - totaluploadprogress: noop, - sending: noop, - sendingmultiple: noop, - success: function(file) { - if (file.previewElement) { - return file.previewElement.classList.add("dz-success"); - } - }, - successmultiple: noop, - canceled: function(file) { - return this.emit("error", file, "Upload canceled."); - }, - canceledmultiple: noop, - complete: function(file) { - if (file._removeLink) { - file._removeLink.textContent = this.options.dictRemoveFile; - } - if (file.previewElement) { - return file.previewElement.classList.add("dz-complete"); - } - }, - completemultiple: noop, - maxfilesexceeded: noop, - maxfilesreached: noop, - queuecomplete: noop, - addedfiles: noop, - previewTemplate: "
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n Check\n \n \n \n \n \n
    \n
    \n \n Error\n \n \n \n \n \n \n \n
    \n
    " - }; - - extend = function() { - var key, object, objects, target, val, _i, _len; - target = arguments[0], objects = 2 <= arguments.length ? __slice.call(arguments, 1) : []; - for (_i = 0, _len = objects.length; _i < _len; _i++) { - object = objects[_i]; - for (key in object) { - val = object[key]; - target[key] = val; - } - } - return target; - }; - - function Dropzone(element, options) { - var elementOptions, fallback, _ref; - this.element = element; - this.version = Dropzone.version; - this.defaultOptions.previewTemplate = this.defaultOptions.previewTemplate.replace(/\n*/g, ""); - this.clickableElements = []; - this.listeners = []; - this.files = []; - if (typeof this.element === "string") { - this.element = document.querySelector(this.element); - } - if (!(this.element && (this.element.nodeType != null))) { - throw new Error("Invalid dropzone element."); - } - if (this.element.dropzone) { - throw new Error("Dropzone already attached."); - } - Dropzone.instances.push(this); - this.element.dropzone = this; - elementOptions = (_ref = Dropzone.optionsForElement(this.element)) != null ? _ref : {}; - this.options = extend({}, this.defaultOptions, elementOptions, options != null ? options : {}); - if (this.options.forceFallback || !Dropzone.isBrowserSupported()) { - return this.options.fallback.call(this); - } - if (this.options.url == null) { - this.options.url = this.element.getAttribute("action"); - } - if (!this.options.url) { - throw new Error("No URL provided."); - } - if (this.options.acceptedFiles && this.options.acceptedMimeTypes) { - throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated."); - } - if (this.options.acceptedMimeTypes) { - this.options.acceptedFiles = this.options.acceptedMimeTypes; - delete this.options.acceptedMimeTypes; - } - this.options.method = this.options.method.toUpperCase(); - if ((fallback = this.getExistingFallback()) && fallback.parentNode) { - fallback.parentNode.removeChild(fallback); - } - if (this.options.previewsContainer !== false) { - if (this.options.previewsContainer) { - this.previewsContainer = Dropzone.getElement(this.options.previewsContainer, "previewsContainer"); - } else { - this.previewsContainer = this.element; - } - } - if (this.options.clickable) { - if (this.options.clickable === true) { - this.clickableElements = [this.element]; - } else { - this.clickableElements = Dropzone.getElements(this.options.clickable, "clickable"); - } - } - this.init(); - } - - Dropzone.prototype.getAcceptedFiles = function() { - var file, _i, _len, _ref, _results; - _ref = this.files; - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - file = _ref[_i]; - if (file.accepted) { - _results.push(file); - } - } - return _results; - }; - - Dropzone.prototype.getRejectedFiles = function() { - var file, _i, _len, _ref, _results; - _ref = this.files; - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - file = _ref[_i]; - if (!file.accepted) { - _results.push(file); - } - } - return _results; - }; - - Dropzone.prototype.getFilesWithStatus = function(status) { - var file, _i, _len, _ref, _results; - _ref = this.files; - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - file = _ref[_i]; - if (file.status === status) { - _results.push(file); - } - } - return _results; - }; - - Dropzone.prototype.getQueuedFiles = function() { - return this.getFilesWithStatus(Dropzone.QUEUED); - }; - - Dropzone.prototype.getUploadingFiles = function() { - return this.getFilesWithStatus(Dropzone.UPLOADING); - }; - - Dropzone.prototype.getAddedFiles = function() { - return this.getFilesWithStatus(Dropzone.ADDED); - }; - - Dropzone.prototype.getActiveFiles = function() { - var file, _i, _len, _ref, _results; - _ref = this.files; - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - file = _ref[_i]; - if (file.status === Dropzone.UPLOADING || file.status === Dropzone.QUEUED) { - _results.push(file); - } - } - return _results; - }; - - Dropzone.prototype.init = function() { - var eventName, noPropagation, setupHiddenFileInput, _i, _len, _ref, _ref1; - if (this.element.tagName === "form") { - this.element.setAttribute("enctype", "multipart/form-data"); - } - if (this.element.classList.contains("dropzone") && !this.element.querySelector(".dz-message")) { - this.element.appendChild(Dropzone.createElement("
    " + this.options.dictDefaultMessage + "
    ")); - } - if (this.clickableElements.length) { - setupHiddenFileInput = (function(_this) { - return function() { - if (_this.hiddenFileInput) { - _this.hiddenFileInput.parentNode.removeChild(_this.hiddenFileInput); - } - _this.hiddenFileInput = document.createElement("input"); - _this.hiddenFileInput.setAttribute("type", "file"); - if ((_this.options.maxFiles == null) || _this.options.maxFiles > 1) { - _this.hiddenFileInput.setAttribute("multiple", "multiple"); - } - _this.hiddenFileInput.className = "dz-hidden-input"; - if (_this.options.acceptedFiles != null) { - _this.hiddenFileInput.setAttribute("accept", _this.options.acceptedFiles); - } - if (_this.options.capture != null) { - _this.hiddenFileInput.setAttribute("capture", _this.options.capture); - } - _this.hiddenFileInput.style.visibility = "hidden"; - _this.hiddenFileInput.style.position = "absolute"; - _this.hiddenFileInput.style.top = "0"; - _this.hiddenFileInput.style.left = "0"; - _this.hiddenFileInput.style.height = "0"; - _this.hiddenFileInput.style.width = "0"; - document.querySelector(_this.options.hiddenInputContainer).appendChild(_this.hiddenFileInput); - return _this.hiddenFileInput.addEventListener("change", function() { - var file, files, _i, _len; - files = _this.hiddenFileInput.files; - if (files.length) { - for (_i = 0, _len = files.length; _i < _len; _i++) { - file = files[_i]; - _this.addFile(file); - } - } - _this.emit("addedfiles", files); - return setupHiddenFileInput(); - }); - }; - })(this); - setupHiddenFileInput(); - } - this.URL = (_ref = window.URL) != null ? _ref : window.webkitURL; - _ref1 = this.events; - for (_i = 0, _len = _ref1.length; _i < _len; _i++) { - eventName = _ref1[_i]; - this.on(eventName, this.options[eventName]); - } - this.on("uploadprogress", (function(_this) { - return function() { - return _this.updateTotalUploadProgress(); - }; - })(this)); - this.on("removedfile", (function(_this) { - return function() { - return _this.updateTotalUploadProgress(); - }; - })(this)); - this.on("canceled", (function(_this) { - return function(file) { - return _this.emit("complete", file); - }; - })(this)); - this.on("complete", (function(_this) { - return function(file) { - if (_this.getAddedFiles().length === 0 && _this.getUploadingFiles().length === 0 && _this.getQueuedFiles().length === 0) { - return setTimeout((function() { - return _this.emit("queuecomplete"); - }), 0); - } - }; - })(this)); - noPropagation = function(e) { - e.stopPropagation(); - if (e.preventDefault) { - return e.preventDefault(); - } else { - return e.returnValue = false; - } - }; - this.listeners = [ - { - element: this.element, - events: { - "dragstart": (function(_this) { - return function(e) { - return _this.emit("dragstart", e); - }; - })(this), - "dragenter": (function(_this) { - return function(e) { - noPropagation(e); - return _this.emit("dragenter", e); - }; - })(this), - "dragover": (function(_this) { - return function(e) { - var efct; - try { - efct = e.dataTransfer.effectAllowed; - } catch (_error) {} - e.dataTransfer.dropEffect = 'move' === efct || 'linkMove' === efct ? 'move' : 'copy'; - noPropagation(e); - return _this.emit("dragover", e); - }; - })(this), - "dragleave": (function(_this) { - return function(e) { - return _this.emit("dragleave", e); - }; - })(this), - "drop": (function(_this) { - return function(e) { - noPropagation(e); - return _this.drop(e); - }; - })(this), - "dragend": (function(_this) { - return function(e) { - return _this.emit("dragend", e); - }; - })(this) - } - } - ]; - this.clickableElements.forEach((function(_this) { - return function(clickableElement) { - return _this.listeners.push({ - element: clickableElement, - events: { - "click": function(evt) { - if ((clickableElement !== _this.element) || (evt.target === _this.element || Dropzone.elementInside(evt.target, _this.element.querySelector(".dz-message")))) { - _this.hiddenFileInput.click(); - } - return true; - } - } - }); - }; - })(this)); - this.enable(); - return this.options.init.call(this); - }; - - Dropzone.prototype.destroy = function() { - var _ref; - this.disable(); - this.removeAllFiles(true); - if ((_ref = this.hiddenFileInput) != null ? _ref.parentNode : void 0) { - this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput); - this.hiddenFileInput = null; - } - delete this.element.dropzone; - return Dropzone.instances.splice(Dropzone.instances.indexOf(this), 1); - }; - - Dropzone.prototype.updateTotalUploadProgress = function() { - var activeFiles, file, totalBytes, totalBytesSent, totalUploadProgress, _i, _len, _ref; - totalBytesSent = 0; - totalBytes = 0; - activeFiles = this.getActiveFiles(); - if (activeFiles.length) { - _ref = this.getActiveFiles(); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - file = _ref[_i]; - totalBytesSent += file.upload.bytesSent; - totalBytes += file.upload.total; - } - totalUploadProgress = 100 * totalBytesSent / totalBytes; - } else { - totalUploadProgress = 100; - } - return this.emit("totaluploadprogress", totalUploadProgress, totalBytes, totalBytesSent); - }; - - Dropzone.prototype._getParamName = function(n) { - if (typeof this.options.paramName === "function") { - return this.options.paramName(n); - } else { - return "" + this.options.paramName + (this.options.uploadMultiple ? "[" + n + "]" : ""); - } - }; - - Dropzone.prototype._renameFilename = function(name) { - if (typeof this.options.renameFilename !== "function") { - return name; - } - return this.options.renameFilename(name); - }; - - Dropzone.prototype.getFallbackForm = function() { - var existingFallback, fields, fieldsString, form; - if (existingFallback = this.getExistingFallback()) { - return existingFallback; - } - fieldsString = "
    "; - if (this.options.dictFallbackText) { - fieldsString += "

    " + this.options.dictFallbackText + "

    "; - } - fieldsString += "
    "; - fields = Dropzone.createElement(fieldsString); - if (this.element.tagName !== "FORM") { - form = Dropzone.createElement("
    "); - form.appendChild(fields); - } else { - this.element.setAttribute("enctype", "multipart/form-data"); - this.element.setAttribute("method", this.options.method); - } - return form != null ? form : fields; - }; - - Dropzone.prototype.getExistingFallback = function() { - var fallback, getFallback, tagName, _i, _len, _ref; - getFallback = function(elements) { - var el, _i, _len; - for (_i = 0, _len = elements.length; _i < _len; _i++) { - el = elements[_i]; - if (/(^| )fallback($| )/.test(el.className)) { - return el; - } - } - }; - _ref = ["div", "form"]; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - tagName = _ref[_i]; - if (fallback = getFallback(this.element.getElementsByTagName(tagName))) { - return fallback; - } - } - }; - - Dropzone.prototype.setupEventListeners = function() { - var elementListeners, event, listener, _i, _len, _ref, _results; - _ref = this.listeners; - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - elementListeners = _ref[_i]; - _results.push((function() { - var _ref1, _results1; - _ref1 = elementListeners.events; - _results1 = []; - for (event in _ref1) { - listener = _ref1[event]; - _results1.push(elementListeners.element.addEventListener(event, listener, false)); - } - return _results1; - })()); - } - return _results; - }; - - Dropzone.prototype.removeEventListeners = function() { - var elementListeners, event, listener, _i, _len, _ref, _results; - _ref = this.listeners; - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - elementListeners = _ref[_i]; - _results.push((function() { - var _ref1, _results1; - _ref1 = elementListeners.events; - _results1 = []; - for (event in _ref1) { - listener = _ref1[event]; - _results1.push(elementListeners.element.removeEventListener(event, listener, false)); - } - return _results1; - })()); - } - return _results; - }; - - Dropzone.prototype.disable = function() { - var file, _i, _len, _ref, _results; - this.clickableElements.forEach(function(element) { - return element.classList.remove("dz-clickable"); - }); - this.removeEventListeners(); - _ref = this.files; - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - file = _ref[_i]; - _results.push(this.cancelUpload(file)); - } - return _results; - }; - - Dropzone.prototype.enable = function() { - this.clickableElements.forEach(function(element) { - return element.classList.add("dz-clickable"); - }); - return this.setupEventListeners(); - }; - - Dropzone.prototype.filesize = function(size) { - var cutoff, i, selectedSize, selectedUnit, unit, units, _i, _len; - selectedSize = 0; - selectedUnit = "b"; - if (size > 0) { - units = ['TB', 'GB', 'MB', 'KB', 'b']; - for (i = _i = 0, _len = units.length; _i < _len; i = ++_i) { - unit = units[i]; - cutoff = Math.pow(this.options.filesizeBase, 4 - i) / 10; - if (size >= cutoff) { - selectedSize = size / Math.pow(this.options.filesizeBase, 4 - i); - selectedUnit = unit; - break; - } - } - selectedSize = Math.round(10 * selectedSize) / 10; - } - return "" + selectedSize + " " + selectedUnit; - }; - - Dropzone.prototype._updateMaxFilesReachedClass = function() { - if ((this.options.maxFiles != null) && this.getAcceptedFiles().length >= this.options.maxFiles) { - if (this.getAcceptedFiles().length === this.options.maxFiles) { - this.emit('maxfilesreached', this.files); - } - return this.element.classList.add("dz-max-files-reached"); - } else { - return this.element.classList.remove("dz-max-files-reached"); - } - }; - - Dropzone.prototype.drop = function(e) { - var files, items; - if (!e.dataTransfer) { - return; - } - this.emit("drop", e); - files = e.dataTransfer.files; - this.emit("addedfiles", files); - if (files.length) { - items = e.dataTransfer.items; - if (items && items.length && (items[0].webkitGetAsEntry != null)) { - this._addFilesFromItems(items); - } else { - this.handleFiles(files); - } - } - }; - - Dropzone.prototype.paste = function(e) { - var items, _ref; - if ((e != null ? (_ref = e.clipboardData) != null ? _ref.items : void 0 : void 0) == null) { - return; - } - this.emit("paste", e); - items = e.clipboardData.items; - if (items.length) { - return this._addFilesFromItems(items); - } - }; - - Dropzone.prototype.handleFiles = function(files) { - var file, _i, _len, _results; - _results = []; - for (_i = 0, _len = files.length; _i < _len; _i++) { - file = files[_i]; - _results.push(this.addFile(file)); - } - return _results; - }; - - Dropzone.prototype._addFilesFromItems = function(items) { - var entry, item, _i, _len, _results; - _results = []; - for (_i = 0, _len = items.length; _i < _len; _i++) { - item = items[_i]; - if ((item.webkitGetAsEntry != null) && (entry = item.webkitGetAsEntry())) { - if (entry.isFile) { - _results.push(this.addFile(item.getAsFile())); - } else if (entry.isDirectory) { - _results.push(this._addFilesFromDirectory(entry, entry.name)); - } else { - _results.push(void 0); - } - } else if (item.getAsFile != null) { - if ((item.kind == null) || item.kind === "file") { - _results.push(this.addFile(item.getAsFile())); - } else { - _results.push(void 0); - } - } else { - _results.push(void 0); - } - } - return _results; - }; - - Dropzone.prototype._addFilesFromDirectory = function(directory, path) { - var dirReader, errorHandler, readEntries; - dirReader = directory.createReader(); - errorHandler = function(error) { - return typeof console !== "undefined" && console !== null ? typeof console.log === "function" ? console.log(error) : void 0 : void 0; - }; - readEntries = (function(_this) { - return function() { - return dirReader.readEntries(function(entries) { - var entry, _i, _len; - if (entries.length > 0) { - for (_i = 0, _len = entries.length; _i < _len; _i++) { - entry = entries[_i]; - if (entry.isFile) { - entry.file(function(file) { - if (_this.options.ignoreHiddenFiles && file.name.substring(0, 1) === '.') { - return; - } - file.fullPath = "" + path + "/" + file.name; - return _this.addFile(file); - }); - } else if (entry.isDirectory) { - _this._addFilesFromDirectory(entry, "" + path + "/" + entry.name); - } - } - readEntries(); - } - return null; - }, errorHandler); - }; - })(this); - return readEntries(); - }; - - Dropzone.prototype.accept = function(file, done) { - if (file.size > this.options.maxFilesize * 1024 * 1024) { - return done(this.options.dictFileTooBig.replace("{{filesize}}", Math.round(file.size / 1024 / 10.24) / 100).replace("{{maxFilesize}}", this.options.maxFilesize)); - } else if (!Dropzone.isValidFile(file, this.options.acceptedFiles)) { - return done(this.options.dictInvalidFileType); - } else if ((this.options.maxFiles != null) && this.getAcceptedFiles().length >= this.options.maxFiles) { - done(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}", this.options.maxFiles)); - return this.emit("maxfilesexceeded", file); - } else { - return this.options.accept.call(this, file, done); - } - }; - - Dropzone.prototype.addFile = function(file) { - file.upload = { - progress: 0, - total: file.size, - bytesSent: 0 - }; - this.files.push(file); - file.status = Dropzone.ADDED; - this.emit("addedfile", file); - this._enqueueThumbnail(file); - return this.accept(file, (function(_this) { - return function(error) { - if (error) { - file.accepted = false; - _this._errorProcessing([file], error); - } else { - file.accepted = true; - if (_this.options.autoQueue) { - _this.enqueueFile(file); - } - } - return _this._updateMaxFilesReachedClass(); - }; - })(this)); - }; - - Dropzone.prototype.enqueueFiles = function(files) { - var file, _i, _len; - for (_i = 0, _len = files.length; _i < _len; _i++) { - file = files[_i]; - this.enqueueFile(file); - } - return null; - }; - - Dropzone.prototype.enqueueFile = function(file) { - if (file.status === Dropzone.ADDED && file.accepted === true) { - file.status = Dropzone.QUEUED; - if (this.options.autoProcessQueue) { - return setTimeout(((function(_this) { - return function() { - return _this.processQueue(); - }; - })(this)), 0); - } - } else { - throw new Error("This file can't be queued because it has already been processed or was rejected."); - } - }; - - Dropzone.prototype._thumbnailQueue = []; - - Dropzone.prototype._processingThumbnail = false; - - Dropzone.prototype._enqueueThumbnail = function(file) { - if (this.options.createImageThumbnails && file.type.match(/image.*/) && file.size <= this.options.maxThumbnailFilesize * 1024 * 1024) { - this._thumbnailQueue.push(file); - return setTimeout(((function(_this) { - return function() { - return _this._processThumbnailQueue(); - }; - })(this)), 0); - } - }; - - Dropzone.prototype._processThumbnailQueue = function() { - if (this._processingThumbnail || this._thumbnailQueue.length === 0) { - return; - } - this._processingThumbnail = true; - return this.createThumbnail(this._thumbnailQueue.shift(), (function(_this) { - return function() { - _this._processingThumbnail = false; - return _this._processThumbnailQueue(); - }; - })(this)); - }; - - Dropzone.prototype.removeFile = function(file) { - if (file.status === Dropzone.UPLOADING) { - this.cancelUpload(file); - } - this.files = without(this.files, file); - this.emit("removedfile", file); - if (this.files.length === 0) { - return this.emit("reset"); - } - }; - - Dropzone.prototype.removeAllFiles = function(cancelIfNecessary) { - var file, _i, _len, _ref; - if (cancelIfNecessary == null) { - cancelIfNecessary = false; - } - _ref = this.files.slice(); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - file = _ref[_i]; - if (file.status !== Dropzone.UPLOADING || cancelIfNecessary) { - this.removeFile(file); - } - } - return null; - }; - - Dropzone.prototype.createThumbnail = function(file, callback) { - var fileReader; - fileReader = new FileReader; - fileReader.onload = (function(_this) { - return function() { - if (file.type === "image/svg+xml") { - _this.emit("thumbnail", file, fileReader.result); - if (callback != null) { - callback(); - } - return; - } - return _this.createThumbnailFromUrl(file, fileReader.result, callback); - }; - })(this); - return fileReader.readAsDataURL(file); - }; - - Dropzone.prototype.createThumbnailFromUrl = function(file, imageUrl, callback, crossOrigin) { - var img; - img = document.createElement("img"); - if (crossOrigin) { - img.crossOrigin = crossOrigin; - } - img.onload = (function(_this) { - return function() { - var canvas, ctx, resizeInfo, thumbnail, _ref, _ref1, _ref2, _ref3; - file.width = img.width; - file.height = img.height; - resizeInfo = _this.options.resize.call(_this, file); - if (resizeInfo.trgWidth == null) { - resizeInfo.trgWidth = resizeInfo.optWidth; - } - if (resizeInfo.trgHeight == null) { - resizeInfo.trgHeight = resizeInfo.optHeight; - } - canvas = document.createElement("canvas"); - ctx = canvas.getContext("2d"); - canvas.width = resizeInfo.trgWidth; - canvas.height = resizeInfo.trgHeight; - drawImageIOSFix(ctx, img, (_ref = resizeInfo.srcX) != null ? _ref : 0, (_ref1 = resizeInfo.srcY) != null ? _ref1 : 0, resizeInfo.srcWidth, resizeInfo.srcHeight, (_ref2 = resizeInfo.trgX) != null ? _ref2 : 0, (_ref3 = resizeInfo.trgY) != null ? _ref3 : 0, resizeInfo.trgWidth, resizeInfo.trgHeight); - thumbnail = canvas.toDataURL("image/png"); - _this.emit("thumbnail", file, thumbnail); - if (callback != null) { - return callback(); - } - }; - })(this); - if (callback != null) { - img.onerror = callback; - } - return img.src = imageUrl; - }; - - Dropzone.prototype.processQueue = function() { - var i, parallelUploads, processingLength, queuedFiles; - parallelUploads = this.options.parallelUploads; - processingLength = this.getUploadingFiles().length; - i = processingLength; - if (processingLength >= parallelUploads) { - return; - } - queuedFiles = this.getQueuedFiles(); - if (!(queuedFiles.length > 0)) { - return; - } - if (this.options.uploadMultiple) { - return this.processFiles(queuedFiles.slice(0, parallelUploads - processingLength)); - } else { - while (i < parallelUploads) { - if (!queuedFiles.length) { - return; - } - this.processFile(queuedFiles.shift()); - i++; - } - } - }; - - Dropzone.prototype.processFile = function(file) { - return this.processFiles([file]); - }; - - Dropzone.prototype.processFiles = function(files) { - var file, _i, _len; - for (_i = 0, _len = files.length; _i < _len; _i++) { - file = files[_i]; - file.processing = true; - file.status = Dropzone.UPLOADING; - this.emit("processing", file); - } - if (this.options.uploadMultiple) { - this.emit("processingmultiple", files); - } - return this.uploadFiles(files); - }; - - Dropzone.prototype._getFilesWithXhr = function(xhr) { - var file, files; - return files = (function() { - var _i, _len, _ref, _results; - _ref = this.files; - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - file = _ref[_i]; - if (file.xhr === xhr) { - _results.push(file); - } - } - return _results; - }).call(this); - }; - - Dropzone.prototype.cancelUpload = function(file) { - var groupedFile, groupedFiles, _i, _j, _len, _len1, _ref; - if (file.status === Dropzone.UPLOADING) { - groupedFiles = this._getFilesWithXhr(file.xhr); - for (_i = 0, _len = groupedFiles.length; _i < _len; _i++) { - groupedFile = groupedFiles[_i]; - groupedFile.status = Dropzone.CANCELED; - } - file.xhr.abort(); - for (_j = 0, _len1 = groupedFiles.length; _j < _len1; _j++) { - groupedFile = groupedFiles[_j]; - this.emit("canceled", groupedFile); - } - if (this.options.uploadMultiple) { - this.emit("canceledmultiple", groupedFiles); - } - } else if ((_ref = file.status) === Dropzone.ADDED || _ref === Dropzone.QUEUED) { - file.status = Dropzone.CANCELED; - this.emit("canceled", file); - if (this.options.uploadMultiple) { - this.emit("canceledmultiple", [file]); - } - } - if (this.options.autoProcessQueue) { - return this.processQueue(); - } - }; - - resolveOption = function() { - var args, option; - option = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : []; - if (typeof option === 'function') { - return option.apply(this, args); - } - return option; - }; - - Dropzone.prototype.uploadFile = function(file) { - return this.uploadFiles([file]); - }; - - Dropzone.prototype.uploadFiles = function(files) { - var file, formData, handleError, headerName, headerValue, headers, i, input, inputName, inputType, key, method, option, progressObj, response, updateProgress, url, value, xhr, _i, _j, _k, _l, _len, _len1, _len2, _len3, _m, _ref, _ref1, _ref2, _ref3, _ref4, _ref5; - xhr = new XMLHttpRequest(); - for (_i = 0, _len = files.length; _i < _len; _i++) { - file = files[_i]; - file.xhr = xhr; - } - method = resolveOption(this.options.method, files); - url = resolveOption(this.options.url, files); - xhr.open(method, url, true); - xhr.withCredentials = !!this.options.withCredentials; - response = null; - handleError = (function(_this) { - return function() { - var _j, _len1, _results; - _results = []; - for (_j = 0, _len1 = files.length; _j < _len1; _j++) { - file = files[_j]; - _results.push(_this._errorProcessing(files, response || _this.options.dictResponseError.replace("{{statusCode}}", xhr.status), xhr)); - } - return _results; - }; - })(this); - updateProgress = (function(_this) { - return function(e) { - var allFilesFinished, progress, _j, _k, _l, _len1, _len2, _len3, _results; - if (e != null) { - progress = 100 * e.loaded / e.total; - for (_j = 0, _len1 = files.length; _j < _len1; _j++) { - file = files[_j]; - file.upload = { - progress: progress, - total: e.total, - bytesSent: e.loaded - }; - } - } else { - allFilesFinished = true; - progress = 100; - for (_k = 0, _len2 = files.length; _k < _len2; _k++) { - file = files[_k]; - if (!(file.upload.progress === 100 && file.upload.bytesSent === file.upload.total)) { - allFilesFinished = false; - } - file.upload.progress = progress; - file.upload.bytesSent = file.upload.total; - } - if (allFilesFinished) { - return; - } - } - _results = []; - for (_l = 0, _len3 = files.length; _l < _len3; _l++) { - file = files[_l]; - _results.push(_this.emit("uploadprogress", file, progress, file.upload.bytesSent)); - } - return _results; - }; - })(this); - xhr.onload = (function(_this) { - return function(e) { - var _ref; - if (files[0].status === Dropzone.CANCELED) { - return; - } - if (xhr.readyState !== 4) { - return; - } - response = xhr.responseText; - if (xhr.getResponseHeader("content-type") && ~xhr.getResponseHeader("content-type").indexOf("application/json")) { - try { - response = JSON.parse(response); - } catch (_error) { - e = _error; - response = "Invalid JSON response from server."; - } - } - updateProgress(); - if (!((200 <= (_ref = xhr.status) && _ref < 300))) { - return handleError(); - } else { - return _this._finished(files, response, e); - } - }; - })(this); - xhr.onerror = (function(_this) { - return function() { - if (files[0].status === Dropzone.CANCELED) { - return; - } - return handleError(); - }; - })(this); - progressObj = (_ref = xhr.upload) != null ? _ref : xhr; - progressObj.onprogress = updateProgress; - headers = { - "Accept": "application/json", - "Cache-Control": "no-cache", - "X-Requested-With": "XMLHttpRequest" - }; - if (this.options.headers) { - extend(headers, this.options.headers); - } - for (headerName in headers) { - headerValue = headers[headerName]; - if (headerValue) { - xhr.setRequestHeader(headerName, headerValue); - } - } - formData = new FormData(); - if (this.options.params) { - _ref1 = this.options.params; - for (key in _ref1) { - value = _ref1[key]; - formData.append(key, value); - } - } - for (_j = 0, _len1 = files.length; _j < _len1; _j++) { - file = files[_j]; - this.emit("sending", file, xhr, formData); - } - if (this.options.uploadMultiple) { - this.emit("sendingmultiple", files, xhr, formData); - } - if (this.element.tagName === "FORM") { - _ref2 = this.element.querySelectorAll("input, textarea, select, button"); - for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) { - input = _ref2[_k]; - inputName = input.getAttribute("name"); - inputType = input.getAttribute("type"); - if (input.tagName === "SELECT" && input.hasAttribute("multiple")) { - _ref3 = input.options; - for (_l = 0, _len3 = _ref3.length; _l < _len3; _l++) { - option = _ref3[_l]; - if (option.selected) { - formData.append(inputName, option.value); - } - } - } else if (!inputType || ((_ref4 = inputType.toLowerCase()) !== "checkbox" && _ref4 !== "radio") || input.checked) { - formData.append(inputName, input.value); - } - } - } - for (i = _m = 0, _ref5 = files.length - 1; 0 <= _ref5 ? _m <= _ref5 : _m >= _ref5; i = 0 <= _ref5 ? ++_m : --_m) { - formData.append(this._getParamName(i), files[i], this._renameFilename(files[i].name)); - } - return this.submitRequest(xhr, formData, files); - }; - - Dropzone.prototype.submitRequest = function(xhr, formData, files) { - return xhr.send(formData); - }; - - Dropzone.prototype._finished = function(files, responseText, e) { - var file, _i, _len; - for (_i = 0, _len = files.length; _i < _len; _i++) { - file = files[_i]; - file.status = Dropzone.SUCCESS; - this.emit("success", file, responseText, e); - this.emit("complete", file); - } - if (this.options.uploadMultiple) { - this.emit("successmultiple", files, responseText, e); - this.emit("completemultiple", files); - } - if (this.options.autoProcessQueue) { - return this.processQueue(); - } - }; - - Dropzone.prototype._errorProcessing = function(files, message, xhr) { - var file, _i, _len; - for (_i = 0, _len = files.length; _i < _len; _i++) { - file = files[_i]; - file.status = Dropzone.ERROR; - this.emit("error", file, message, xhr); - this.emit("complete", file); - } - if (this.options.uploadMultiple) { - this.emit("errormultiple", files, message, xhr); - this.emit("completemultiple", files); - } - if (this.options.autoProcessQueue) { - return this.processQueue(); - } - }; - - return Dropzone; - - })(Emitter); - - Dropzone.version = "4.3.0"; - - Dropzone.options = {}; - - Dropzone.optionsForElement = function(element) { - if (element.getAttribute("id")) { - return Dropzone.options[camelize(element.getAttribute("id"))]; - } else { - return void 0; - } - }; - - Dropzone.instances = []; - - Dropzone.forElement = function(element) { - if (typeof element === "string") { - element = document.querySelector(element); - } - if ((element != null ? element.dropzone : void 0) == null) { - throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone."); - } - return element.dropzone; - }; - - Dropzone.autoDiscover = true; - - Dropzone.discover = function() { - var checkElements, dropzone, dropzones, _i, _len, _results; - if (document.querySelectorAll) { - dropzones = document.querySelectorAll(".dropzone"); - } else { - dropzones = []; - checkElements = function(elements) { - var el, _i, _len, _results; - _results = []; - for (_i = 0, _len = elements.length; _i < _len; _i++) { - el = elements[_i]; - if (/(^| )dropzone($| )/.test(el.className)) { - _results.push(dropzones.push(el)); - } else { - _results.push(void 0); - } - } - return _results; - }; - checkElements(document.getElementsByTagName("div")); - checkElements(document.getElementsByTagName("form")); - } - _results = []; - for (_i = 0, _len = dropzones.length; _i < _len; _i++) { - dropzone = dropzones[_i]; - if (Dropzone.optionsForElement(dropzone) !== false) { - _results.push(new Dropzone(dropzone)); - } else { - _results.push(void 0); - } - } - return _results; - }; - - Dropzone.blacklistedBrowsers = [/opera.*Macintosh.*version\/12/i]; - - Dropzone.isBrowserSupported = function() { - var capableBrowser, regex, _i, _len, _ref; - capableBrowser = true; - if (window.File && window.FileReader && window.FileList && window.Blob && window.FormData && document.querySelector) { - if (!("classList" in document.createElement("a"))) { - capableBrowser = false; - } else { - _ref = Dropzone.blacklistedBrowsers; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - regex = _ref[_i]; - if (regex.test(navigator.userAgent)) { - capableBrowser = false; - continue; - } - } - } - } else { - capableBrowser = false; - } - return capableBrowser; - }; - - without = function(list, rejectedItem) { - var item, _i, _len, _results; - _results = []; - for (_i = 0, _len = list.length; _i < _len; _i++) { - item = list[_i]; - if (item !== rejectedItem) { - _results.push(item); - } - } - return _results; - }; - - camelize = function(str) { - return str.replace(/[\-_](\w)/g, function(match) { - return match.charAt(1).toUpperCase(); - }); - }; - - Dropzone.createElement = function(string) { - var div; - div = document.createElement("div"); - div.innerHTML = string; - return div.childNodes[0]; - }; - - Dropzone.elementInside = function(element, container) { - if (element === container) { - return true; - } - while (element = element.parentNode) { - if (element === container) { - return true; - } - } - return false; - }; - - Dropzone.getElement = function(el, name) { - var element; - if (typeof el === "string") { - element = document.querySelector(el); - } else if (el.nodeType != null) { - element = el; - } - if (element == null) { - throw new Error("Invalid `" + name + "` option provided. Please provide a CSS selector or a plain HTML element."); - } - return element; - }; - - Dropzone.getElements = function(els, name) { - var e, el, elements, _i, _j, _len, _len1, _ref; - if (els instanceof Array) { - elements = []; - try { - for (_i = 0, _len = els.length; _i < _len; _i++) { - el = els[_i]; - elements.push(this.getElement(el, name)); - } - } catch (_error) { - e = _error; - elements = null; - } - } else if (typeof els === "string") { - elements = []; - _ref = document.querySelectorAll(els); - for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) { - el = _ref[_j]; - elements.push(el); - } - } else if (els.nodeType != null) { - elements = [els]; - } - if (!((elements != null) && elements.length)) { - throw new Error("Invalid `" + name + "` option provided. Please provide a CSS selector, a plain HTML element or a list of those."); - } - return elements; - }; - - Dropzone.confirm = function(question, accepted, rejected) { - if (window.confirm(question)) { - return accepted(); - } else if (rejected != null) { - return rejected(); - } - }; - - Dropzone.isValidFile = function(file, acceptedFiles) { - var baseMimeType, mimeType, validType, _i, _len; - if (!acceptedFiles) { - return true; - } - acceptedFiles = acceptedFiles.split(","); - mimeType = file.type; - baseMimeType = mimeType.replace(/\/.*$/, ""); - for (_i = 0, _len = acceptedFiles.length; _i < _len; _i++) { - validType = acceptedFiles[_i]; - validType = validType.trim(); - if (validType.charAt(0) === ".") { - if (file.name.toLowerCase().indexOf(validType.toLowerCase(), file.name.length - validType.length) !== -1) { - return true; - } - } else if (/\/\*$/.test(validType)) { - if (baseMimeType === validType.replace(/\/.*$/, "")) { - return true; - } - } else { - if (mimeType === validType) { - return true; - } - } - } - return false; - }; - - if (typeof jQuery !== "undefined" && jQuery !== null) { - jQuery.fn.dropzone = function(options) { - return this.each(function() { - return new Dropzone(this, options); - }); - }; - } - - if (typeof module !== "undefined" && module !== null) { - module.exports = Dropzone; - } else { - window.Dropzone = Dropzone; - } - - Dropzone.ADDED = "added"; - - Dropzone.QUEUED = "queued"; - - Dropzone.ACCEPTED = Dropzone.QUEUED; - - Dropzone.UPLOADING = "uploading"; - - Dropzone.PROCESSING = Dropzone.UPLOADING; - - Dropzone.CANCELED = "canceled"; - - Dropzone.ERROR = "error"; - - Dropzone.SUCCESS = "success"; - - - /* - - Bugfix for iOS 6 and 7 - Source: http://stackoverflow.com/questions/11929099/html5-canvas-drawimage-ratio-bug-ios - based on the work of https://github.com/stomita/ios-imagefile-megapixel - */ - - detectVerticalSquash = function(img) { - var alpha, canvas, ctx, data, ey, ih, iw, py, ratio, sy; - iw = img.naturalWidth; - ih = img.naturalHeight; - canvas = document.createElement("canvas"); - canvas.width = 1; - canvas.height = ih; - ctx = canvas.getContext("2d"); - ctx.drawImage(img, 0, 0); - data = ctx.getImageData(0, 0, 1, ih).data; - sy = 0; - ey = ih; - py = ih; - while (py > sy) { - alpha = data[(py - 1) * 4 + 3]; - if (alpha === 0) { - ey = py; - } else { - sy = py; - } - py = (ey + sy) >> 1; - } - ratio = py / ih; - if (ratio === 0) { - return 1; - } else { - return ratio; - } - }; - - drawImageIOSFix = function(ctx, img, sx, sy, sw, sh, dx, dy, dw, dh) { - var vertSquashRatio; - vertSquashRatio = detectVerticalSquash(img); - return ctx.drawImage(img, sx, sy, sw, sh, dx, dy, dw, dh / vertSquashRatio); - }; - - - /* - * contentloaded.js - * - * Author: Diego Perini (diego.perini at gmail.com) - * Summary: cross-browser wrapper for DOMContentLoaded - * Updated: 20101020 - * License: MIT - * Version: 1.2 - * - * URL: - * http://javascript.nwbox.com/ContentLoaded/ - * http://javascript.nwbox.com/ContentLoaded/MIT-LICENSE - */ - - contentLoaded = function(win, fn) { - var add, doc, done, init, poll, pre, rem, root, top; - done = false; - top = true; - doc = win.document; - root = doc.documentElement; - add = (doc.addEventListener ? "addEventListener" : "attachEvent"); - rem = (doc.addEventListener ? "removeEventListener" : "detachEvent"); - pre = (doc.addEventListener ? "" : "on"); - init = function(e) { - if (e.type === "readystatechange" && doc.readyState !== "complete") { - return; - } - (e.type === "load" ? win : doc)[rem](pre + e.type, init, false); - if (!done && (done = true)) { - return fn.call(win, e.type || e); - } - }; - poll = function() { - var e; - try { - root.doScroll("left"); - } catch (_error) { - e = _error; - setTimeout(poll, 50); - return; - } - return init("poll"); - }; - if (doc.readyState !== "complete") { - if (doc.createEventObject && root.doScroll) { - try { - top = !win.frameElement; - } catch (_error) {} - if (top) { - poll(); - } - } - doc[add](pre + "DOMContentLoaded", init, false); - doc[add](pre + "readystatechange", init, false); - return win[add](pre + "load", init, false); - } - }; - - Dropzone._autoDiscoverFunction = function() { - if (Dropzone.autoDiscover) { - return Dropzone.discover(); - } - }; - - contentLoaded(window, Dropzone._autoDiscoverFunction); - -}).call(this); - -}); -;define('dropzone', ['dropzone/dist/dropzone'], function (main) { return main; }); - -define('text!dropzone/dist/basic.css', ['module'], function(module) { module.exports = "/*\n * The MIT License\n * Copyright (c) 2012 Matias Meno \n */\n.dropzone, .dropzone * {\n box-sizing: border-box; }\n\n.dropzone {\n position: relative; }\n .dropzone .dz-preview {\n position: relative;\n display: inline-block;\n width: 120px;\n margin: 0.5em; }\n .dropzone .dz-preview .dz-progress {\n display: block;\n height: 15px;\n border: 1px solid #aaa; }\n .dropzone .dz-preview .dz-progress .dz-upload {\n display: block;\n height: 100%;\n width: 0;\n background: green; }\n .dropzone .dz-preview .dz-error-message {\n color: red;\n display: none; }\n .dropzone .dz-preview.dz-error .dz-error-message, .dropzone .dz-preview.dz-error .dz-error-mark {\n display: block; }\n .dropzone .dz-preview.dz-success .dz-success-mark {\n display: block; }\n .dropzone .dz-preview .dz-error-mark, .dropzone .dz-preview .dz-success-mark {\n position: absolute;\n display: none;\n left: 30px;\n top: 30px;\n width: 54px;\n height: 58px;\n left: 50%;\n margin-left: -27px; }\n"; }); -/*! Swipebox v1.4.4 | Constantin Saguin csag.co | MIT License | github.com/brutaldesign/swipebox */ -!function(a,b,c,d){c.swipebox=function(e,f){var g,h,i={useCSS:!0,useSVG:!0,initialIndexOnArray:0,removeBarsOnMobile:!0,hideCloseButtonOnMobile:!1,hideBarsDelay:3e3,videoMaxWidth:1140,vimeoColor:"cccccc",beforeOpen:null,afterOpen:null,afterClose:null,afterMedia:null,nextSlide:null,prevSlide:null,loopAtEnd:!1,autoplayVideos:!1,queryStringData:{},toggleClassOnLoad:""},j=this,k=[],l=e.selector,m=navigator.userAgent.match(/(iPad)|(iPhone)|(iPod)|(Android)|(PlayBook)|(BB10)|(BlackBerry)|(Opera Mini)|(IEMobile)|(webOS)|(MeeGo)/i),n=null!==m||b.createTouch!==d||"ontouchstart"in a||"onmsgesturechange"in a||navigator.msMaxTouchPoints,o=!!b.createElementNS&&!!b.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,p=a.innerWidth?a.innerWidth:c(a).width(),q=a.innerHeight?a.innerHeight:c(a).height(),r=0,s='
    ';j.settings={},c.swipebox.close=function(){g.closeSlide()},c.swipebox.destroy=function(){c(b).off("click.swipebox")},c.swipebox.extend=function(){return g},j.init=function(){j.settings=c.extend({},i,f),c.isArray(e)?(k=e,g.target=c(a),g.init(j.settings.initialIndexOnArray)):c(b).on("click.swipebox",l,function(a){if("slide current"===a.target.parentNode.className)return!1;c.isArray(e)||(g.destroy(),h=c(l),g.actions()),k=[];var b,d,f;f||(d="data-rel",f=c(this).attr(d)),f||(d="rel",f=c(this).attr(d)),h=f&&""!==f&&"nofollow"!==f?c(l).filter("["+d+'="'+f+'"]'):c(l),h.each(function(){var a=null,b=null;c(this).attr("title")&&(a=c(this).attr("title")),c(this).attr("href")&&(b=c(this).attr("href")),k.push({href:b,title:a})}),b=h.index(c(this)),a.preventDefault(),a.stopPropagation(),g.target=c(a.target),g.init(b)})},g={init:function(a){j.settings.beforeOpen&&j.settings.beforeOpen(),this.target.trigger("swipebox-start"),c.swipebox.isOpen=!0,this.build(),this.openSlide(a),this.openMedia(a),this.preloadMedia(a+1),this.preloadMedia(a-1),j.settings.afterOpen&&j.settings.afterOpen(a)},build:function(){var a,b=this;c("body").append(s),o&&j.settings.useSVG===!0&&(a=c("#swipebox-close").css("background-image"),a=a.replace("png","svg"),c("#swipebox-prev, #swipebox-next, #swipebox-close").css({"background-image":a})),m&&j.settings.removeBarsOnMobile&&c("#swipebox-bottom-bar, #swipebox-top-bar").remove(),c.each(k,function(){c("#swipebox-slider").append('
    ')}),b.setDim(),b.actions(),n&&b.gesture(),b.keyboard(),b.animBars(),b.resize()},setDim:function(){var b,d,e={};"onorientationchange"in a?a.addEventListener("orientationchange",function(){0===a.orientation?(b=p,d=q):90!==a.orientation&&-90!==a.orientation||(b=q,d=p)},!1):(b=a.innerWidth?a.innerWidth:c(a).width(),d=a.innerHeight?a.innerHeight:c(a).height()),e={width:b,height:d},c("#swipebox-overlay").css(e)},resize:function(){var b=this;c(a).resize(function(){b.setDim()}).resize()},supportTransition:function(){var a,c="transition WebkitTransition MozTransition OTransition msTransition KhtmlTransition".split(" ");for(a=0;a=m||i)){var q=.75-Math.abs(d)/s.height();s.css({top:d+"px"}),s.css({opacity:q}),i=!0}e=b,b=o.pageX-n.pageX,g=100*b/p,!j&&!i&&Math.abs(b)>=l&&(c("#swipebox-slider").css({"-webkit-transition":"",transition:""}),j=!0),j&&(b>0?0===a?c("#swipebox-overlay").addClass("leftSpringTouch"):(c("#swipebox-overlay").removeClass("leftSpringTouch").removeClass("rightSpringTouch"),c("#swipebox-slider").css({"-webkit-transform":"translate3d("+(r+g)+"%, 0, 0)",transform:"translate3d("+(r+g)+"%, 0, 0)"})):0>b&&(k.length===a+1?c("#swipebox-overlay").addClass("rightSpringTouch"):(c("#swipebox-overlay").removeClass("leftSpringTouch").removeClass("rightSpringTouch"),c("#swipebox-slider").css({"-webkit-transform":"translate3d("+(r+g)+"%, 0, 0)",transform:"translate3d("+(r+g)+"%, 0, 0)"}))))}),!1}).bind("touchend",function(a){if(a.preventDefault(),a.stopPropagation(),c("#swipebox-slider").css({"-webkit-transition":"-webkit-transform 0.4s ease",transition:"transform 0.4s ease"}),d=o.pageY-n.pageY,b=o.pageX-n.pageX,g=100*b/p,i)if(i=!1,Math.abs(d)>=2*m&&Math.abs(d)>Math.abs(f)){var k=d>0?s.height():-s.height();s.animate({top:k+"px",opacity:0},300,function(){h.closeSlide()})}else s.animate({top:0,opacity:1},300);else j?(j=!1,b>=l&&b>=e?h.getPrev():-l>=b&&e>=b&&h.getNext()):q.hasClass("visible-bars")?(h.clearTimeout(),h.hideBars()):(h.showBars(),h.setTimeout());c("#swipebox-slider").css({"-webkit-transform":"translate3d("+r+"%, 0, 0)",transform:"translate3d("+r+"%, 0, 0)"}),c("#swipebox-overlay").removeClass("leftSpringTouch").removeClass("rightSpringTouch"),c(".touching").off("touchmove").removeClass("touching")})},setTimeout:function(){if(j.settings.hideBarsDelay>0){var b=this;b.clearTimeout(),b.timeout=a.setTimeout(function(){b.hideBars()},j.settings.hideBarsDelay)}},clearTimeout:function(){a.clearTimeout(this.timeout),this.timeout=null},showBars:function(){var a=c("#swipebox-top-bar, #swipebox-bottom-bar");this.doCssTrans()?a.addClass("visible-bars"):(c("#swipebox-top-bar").animate({top:0},500),c("#swipebox-bottom-bar").animate({bottom:0},500),setTimeout(function(){a.addClass("visible-bars")},1e3))},hideBars:function(){var a=c("#swipebox-top-bar, #swipebox-bottom-bar");this.doCssTrans()?a.removeClass("visible-bars"):(c("#swipebox-top-bar").animate({top:"-50px"},500),c("#swipebox-bottom-bar").animate({bottom:"-50px"},500),setTimeout(function(){a.removeClass("visible-bars")},1e3))},animBars:function(){var a=this,b=c("#swipebox-top-bar, #swipebox-bottom-bar");b.addClass("visible-bars"),a.setTimeout(),c("#swipebox-slider").click(function(){b.hasClass("visible-bars")||(a.showBars(),a.setTimeout())}),c("#swipebox-bottom-bar").hover(function(){a.showBars(),b.addClass("visible-bars"),a.clearTimeout()},function(){j.settings.hideBarsDelay>0&&(b.removeClass("visible-bars"),a.setTimeout())})},keyboard:function(){var b=this;c(a).bind("keyup",function(a){a.preventDefault(),a.stopPropagation(),37===a.keyCode?b.getPrev():39===a.keyCode?b.getNext():27===a.keyCode&&b.closeSlide()})},actions:function(){var a=this,b="touchend click";k.length<2?(c("#swipebox-bottom-bar").hide(),d===k[1]&&c("#swipebox-top-bar").hide()):(c("#swipebox-prev").bind(b,function(b){b.preventDefault(),b.stopPropagation(),a.getPrev(),a.setTimeout()}),c("#swipebox-next").bind(b,function(b){b.preventDefault(),b.stopPropagation(),a.getNext(),a.setTimeout()})),c("#swipebox-close").bind(b,function(){a.closeSlide()})},setSlide:function(a,b){b=b||!1;var d=c("#swipebox-slider");r=100*-a,this.doCssTrans()?d.css({"-webkit-transform":"translate3d("+100*-a+"%, 0, 0)",transform:"translate3d("+100*-a+"%, 0, 0)"}):d.animate({left:100*-a+"%"}),c("#swipebox-slider .slide").removeClass("current"),c("#swipebox-slider .slide").eq(a).addClass("current"),this.setTitle(a),b&&d.fadeIn(),c("#swipebox-prev, #swipebox-next").removeClass("disabled"),0===a?c("#swipebox-prev").addClass("disabled"):a===k.length-1&&j.settings.loopAtEnd!==!0&&c("#swipebox-next").addClass("disabled")},openSlide:function(b){c("html").addClass("swipebox-html"),n?(c("html").addClass("swipebox-touch"),j.settings.hideCloseButtonOnMobile&&c("html").addClass("swipebox-no-close-button")):c("html").addClass("swipebox-no-touch"),c(a).trigger("resize"),this.setSlide(b,!0)},preloadMedia:function(a){var b=this,c=null;k[a]!==d&&(c=k[a].href),b.isVideo(c)?b.openMedia(a):setTimeout(function(){b.openMedia(a)},1e3)},openMedia:function(a){var b,e,f=this;return k[a]!==d&&(b=k[a].href),0>a||a>=k.length?!1:(e=c("#swipebox-slider .slide").eq(a),void(f.isVideo(b)?(e.html(f.getVideo(b)),j.settings.afterMedia&&j.settings.afterMedia(a)):(e.addClass("slide-loading"),f.loadMedia(b,function(){e.removeClass("slide-loading"),e.html(this),j.settings.afterMedia&&j.settings.afterMedia(a)}))))},setTitle:function(a){var b=null;c("#swipebox-title").empty(),k[a]!==d&&(b=k[a].title),b?(c("#swipebox-top-bar").show(),c("#swipebox-title").append(b)):c("#swipebox-top-bar").hide()},isVideo:function(a){if(a){if(a.match(/(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/)||a.match(/vimeo\.com\/([0-9]*)/)||a.match(/youtu\.be\/([a-zA-Z0-9\-_]+)/))return!0;if(a.toLowerCase().indexOf("swipeboxvideo=1")>=0)return!0}},parseUri:function(a,d){var e=b.createElement("a"),f={};return e.href=decodeURIComponent(a),e.search&&(f=JSON.parse('{"'+e.search.toLowerCase().replace("?","").replace(/&/g,'","').replace(/=/g,'":"')+'"}')),c.isPlainObject(d)&&(f=c.extend(f,d,j.settings.queryStringData)),c.map(f,function(a,b){return a&&a>""?encodeURIComponent(b)+"="+encodeURIComponent(a):void 0}).join("&")},getVideo:function(a){var b="",c=a.match(/((?:www\.)?youtube\.com|(?:www\.)?youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/),d=a.match(/(?:www\.)?youtu\.be\/([a-zA-Z0-9\-_]+)/),e=a.match(/(?:www\.)?vimeo\.com\/([0-9]*)/),f="";return c||d?(d&&(c=d),f=g.parseUri(a,{autoplay:j.settings.autoplayVideos?"1":"0",v:""}),b=''):e?(f=g.parseUri(a,{autoplay:j.settings.autoplayVideos?"1":"0",byline:"0",portrait:"0",color:j.settings.vimeoColor}),b=''):b='','
    '+b+"
    "},loadMedia:function(a,b){if(0===a.trim().indexOf("#"))b.call(c("
    ",{"class":"swipebox-inline-container"}).append(c(a).clone().toggleClass(j.settings.toggleClassOnLoad)));else if(!this.isVideo(a)){var d=c("").on("load",function(){b.call(d)});d.attr("src",a)}},getNext:function(){var a,b=this,d=c("#swipebox-slider .slide").index(c("#swipebox-slider .slide.current"));d+10?(a=c("#swipebox-slider .slide").eq(b).contents().find("iframe").attr("src"),c("#swipebox-slider .slide").eq(b).contents().find("iframe").attr("src",a),b--,this.setSlide(b),this.preloadMedia(b-1),j.settings.prevSlide&&j.settings.prevSlide(b)):(c("#swipebox-overlay").addClass("leftSpring"),setTimeout(function(){c("#swipebox-overlay").removeClass("leftSpring")},500))},nextSlide:function(a){},prevSlide:function(a){},closeSlide:function(){c("html").removeClass("swipebox-html"),c("html").removeClass("swipebox-touch"),c(a).trigger("resize"),this.destroy()},destroy:function(){c(a).unbind("keyup"),c("body").unbind("touchstart"),c("body").unbind("touchmove"),c("body").unbind("touchend"),c("#swipebox-slider").unbind(),c("#swipebox-overlay").remove(),c.isArray(e)||e.removeData("_swipebox"),this.target&&this.target.trigger("swipebox-destroy"),c.swipebox.isOpen=!1,j.settings.afterClose&&j.settings.afterClose()}},j.init()},c.fn.swipebox=function(a){if(!c.data(this,"_swipebox")){var b=new c.swipebox(this,a);this.data("_swipebox",b)}return this.data("_swipebox")}}(window,document,jQuery); -define("swipebox/src/js/jquery.swipebox.min", ["jquery"], function(){}); -;define('swipebox', ['swipebox/src/js/jquery.swipebox.min'], function (main) { return main; }); - -define('text!swipebox/src/css/swipebox.min.css', ['module'], function(module) { module.exports = "/*! Swipebox v1.3.0 | Constantin Saguin csag.co | MIT License | github.com/brutaldesign/swipebox */html.swipebox-html.swipebox-touch{overflow:hidden!important}#swipebox-overlay img{border:none!important}#swipebox-overlay{width:100%;height:100%;position:fixed;top:0;left:0;z-index:99999!important;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#swipebox-container{position:relative;width:100%;height:100%}#swipebox-slider{-webkit-transition:-webkit-transform .4s ease;transition:transform .4s ease;height:100%;left:0;top:0;width:100%;white-space:nowrap;position:absolute;display:none;cursor:pointer}#swipebox-slider .slide{height:100%;width:100%;line-height:1px;text-align:center;display:inline-block}#swipebox-slider .slide:before{content:\"\";display:inline-block;height:50%;width:1px;margin-right:-1px}#swipebox-slider .slide .swipebox-inline-container,#swipebox-slider .slide .swipebox-video-container,#swipebox-slider .slide img{display:inline-block;max-height:100%;max-width:100%;margin:0;padding:0;width:auto;height:auto;vertical-align:middle}#swipebox-slider .slide .swipebox-video-container{background:0 0;max-width:1140px;max-height:100%;width:100%;padding:5%;-webkit-box-sizing:border-box;box-sizing:border-box}#swipebox-slider .slide .swipebox-video-container .swipebox-video{width:100%;height:0;padding-bottom:56.25%;overflow:hidden;position:relative}#swipebox-slider .slide .swipebox-video-container .swipebox-video iframe{width:100%!important;height:100%!important;position:absolute;top:0;left:0}#swipebox-slider .slide-loading{background:url(../img/loader.gif) center center no-repeat}#swipebox-bottom-bar,#swipebox-top-bar{-webkit-transition:.5s;transition:.5s;position:absolute;left:0;z-index:999;height:50px;width:100%}#swipebox-bottom-bar{bottom:-50px}#swipebox-bottom-bar.visible-bars{-webkit-transform:translate3d(0,-50px,0);transform:translate3d(0,-50px,0)}#swipebox-top-bar{top:-50px}#swipebox-top-bar.visible-bars{-webkit-transform:translate3d(0,50px,0);transform:translate3d(0,50px,0)}#swipebox-title{display:block;width:100%;text-align:center}#swipebox-close,#swipebox-next,#swipebox-prev{background-image:url(../img/icons.png);background-repeat:no-repeat;border:none!important;text-decoration:none!important;cursor:pointer;width:50px;height:50px;top:0}#swipebox-arrows{display:block;margin:0 auto;width:100%;height:50px}#swipebox-prev{background-position:-32px 13px;float:left}#swipebox-next{background-position:-78px 13px;float:right}#swipebox-close{top:0;right:0;position:absolute;z-index:9999;background-position:15px 12px}.swipebox-no-close-button #swipebox-close{display:none}#swipebox-next.disabled,#swipebox-prev.disabled{opacity:.3}.swipebox-no-touch #swipebox-overlay.rightSpring #swipebox-slider{-webkit-animation:rightSpring .3s;animation:rightSpring .3s}.swipebox-no-touch #swipebox-overlay.leftSpring #swipebox-slider{-webkit-animation:leftSpring .3s;animation:leftSpring .3s}.swipebox-touch #swipebox-container:after,.swipebox-touch #swipebox-container:before{-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transition:all .3s ease;transition:all .3s ease;content:' ';position:absolute;z-index:999;top:0;height:100%;width:20px;opacity:0}.swipebox-touch #swipebox-container:before{left:0;-webkit-box-shadow:inset 10px 0 10px -8px #656565;box-shadow:inset 10px 0 10px -8px #656565}.swipebox-touch #swipebox-container:after{right:0;-webkit-box-shadow:inset -10px 0 10px -8px #656565;box-shadow:inset -10px 0 10px -8px #656565}.swipebox-touch #swipebox-overlay.leftSpringTouch #swipebox-container:before,.swipebox-touch #swipebox-overlay.rightSpringTouch #swipebox-container:after{opacity:1}@-webkit-keyframes rightSpring{0%{left:0}50%{left:-30px}100%{left:0}}@keyframes rightSpring{0%{left:0}50%{left:-30px}100%{left:0}}@-webkit-keyframes leftSpring{0%{left:0}50%{left:30px}100%{left:0}}@keyframes leftSpring{0%{left:0}50%{left:30px}100%{left:0}}@media screen and (min-width:800px){#swipebox-close{right:10px}#swipebox-arrows{width:92%;max-width:800px}}#swipebox-overlay{background:#0d0d0d}#swipebox-bottom-bar,#swipebox-top-bar{text-shadow:1px 1px 1px #000;background:#000;opacity:.95}#swipebox-top-bar{color:#fff!important;font-size:15px;line-height:43px;font-family:Helvetica,Arial,sans-serif}"; }); -/** - * simplemde v1.11.2 - * Copyright Next Step Webs, Inc. - * @link https://github.com/NextStepWebs/simplemde-markdown-editor - * @license MIT - */ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define('simplemde/dist/simplemde.min',[],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.SimpleMDE=e()}}(function(){var e;return function t(e,n,r){function i(a,l){if(!n[a]){if(!e[a]){var s="function"==typeof require&&require;if(!l&&s)return s(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[a]={exports:{}};e[a][0].call(u.exports,function(t){var n=e[a][1][t];return i(n?n:t)},u,u.exports,t,e,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;at;++t)s[t]=e[t],c[e.charCodeAt(t)]=t;c["-".charCodeAt(0)]=62,c["_".charCodeAt(0)]=63}function i(e){var t,n,r,i,o,a,l=e.length;if(l%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===e[l-2]?2:"="===e[l-1]?1:0,a=new u(3*l/4-o),r=o>0?l-4:l;var s=0;for(t=0,n=0;r>t;t+=4,n+=3)i=c[e.charCodeAt(t)]<<18|c[e.charCodeAt(t+1)]<<12|c[e.charCodeAt(t+2)]<<6|c[e.charCodeAt(t+3)],a[s++]=i>>16&255,a[s++]=i>>8&255,a[s++]=255&i;return 2===o?(i=c[e.charCodeAt(t)]<<2|c[e.charCodeAt(t+1)]>>4,a[s++]=255&i):1===o&&(i=c[e.charCodeAt(t)]<<10|c[e.charCodeAt(t+1)]<<4|c[e.charCodeAt(t+2)]>>2,a[s++]=i>>8&255,a[s++]=255&i),a}function o(e){return s[e>>18&63]+s[e>>12&63]+s[e>>6&63]+s[63&e]}function a(e,t,n){for(var r,i=[],a=t;n>a;a+=3)r=(e[a]<<16)+(e[a+1]<<8)+e[a+2],i.push(o(r));return i.join("")}function l(e){for(var t,n=e.length,r=n%3,i="",o=[],l=16383,c=0,u=n-r;u>c;c+=l)o.push(a(e,c,c+l>u?u:c+l));return 1===r?(t=e[n-1],i+=s[t>>2],i+=s[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=s[t>>10],i+=s[t>>4&63],i+=s[t<<2&63],i+="="),o.push(i),o.join("")}n.toByteArray=i,n.fromByteArray=l;var s=[],c=[],u="undefined"!=typeof Uint8Array?Uint8Array:Array;r()},{}],2:[function(e,t,n){},{}],3:[function(e,t,n){(function(t){"use strict";function r(){try{var e=new Uint8Array(1);return e.foo=function(){return 42},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(t){return!1}}function i(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e,t){if(i()=t?o(e,t):void 0!==n?"string"==typeof r?o(e,t).fill(n,r):o(e,t).fill(n):o(e,t)}function u(e,t){if(s(t),e=o(e,0>t?0:0|m(t)),!a.TYPED_ARRAY_SUPPORT)for(var n=0;t>n;n++)e[n]=0;return e}function f(e,t,n){if("string"==typeof n&&""!==n||(n="utf8"),!a.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|v(t,n);return e=o(e,r),e.write(t,n),e}function h(e,t){var n=0|m(t.length);e=o(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function d(e,t,n,r){if(t.byteLength,0>n||t.byteLength=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function g(e){return+e!=e&&(e=0),a.alloc(+e)}function v(e,t){if(a.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"binary":case"raw":case"raws":return n;case"utf8":case"utf-8":case void 0:return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return $(e).length;default:if(r)return q(e).length;t=(""+t).toLowerCase(),r=!0}}function y(e,t,n){var r=!1;if((void 0===t||0>t)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),0>=n)return"";if(n>>>=0,t>>>=0,t>=n)return"";for(e||(e="utf8");;)switch(e){case"hex":return I(this,t,n);case"utf8":case"utf-8":return N(this,t,n);case"ascii":return E(this,t,n);case"binary":return O(this,t,n);case"base64":return M(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function x(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r){function i(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}var o=1,a=e.length,l=t.length;if(void 0!==r&&(r=String(r).toLowerCase(),"ucs2"===r||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,a/=2,l/=2,n/=2}for(var s=-1,c=0;a>n+c;c++)if(i(e,n+c)===i(t,-1===s?0:c-s)){if(-1===s&&(s=c),c-s+1===l)return(n+s)*o}else-1!==s&&(c-=c-s),s=-1;return-1}function w(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;var o=t.length;if(o%2!==0)throw new Error("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;r>a;a++){var l=parseInt(t.substr(2*a,2),16);if(isNaN(l))return a;e[n+a]=l}return a}function k(e,t,n,r){return V(q(t,e.length-n),e,n,r)}function S(e,t,n,r){return V(G(t),e,n,r)}function C(e,t,n,r){return S(e,t,n,r)}function L(e,t,n,r){return V($(t),e,n,r)}function T(e,t,n,r){return V(Y(t,e.length-n),e,n,r)}function M(e,t,n){return 0===t&&n===e.length?X.fromByteArray(e):X.fromByteArray(e.slice(t,n))}function N(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;n>i;){var o=e[i],a=null,l=o>239?4:o>223?3:o>191?2:1;if(n>=i+l){var s,c,u,f;switch(l){case 1:128>o&&(a=o);break;case 2:s=e[i+1],128===(192&s)&&(f=(31&o)<<6|63&s,f>127&&(a=f));break;case 3:s=e[i+1],c=e[i+2],128===(192&s)&&128===(192&c)&&(f=(15&o)<<12|(63&s)<<6|63&c,f>2047&&(55296>f||f>57343)&&(a=f));break;case 4:s=e[i+1],c=e[i+2],u=e[i+3],128===(192&s)&&128===(192&c)&&128===(192&u)&&(f=(15&o)<<18|(63&s)<<12|(63&c)<<6|63&u,f>65535&&1114112>f&&(a=f))}}null===a?(a=65533,l=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),i+=l}return A(r)}function A(e){var t=e.length;if(Q>=t)return String.fromCharCode.apply(String,e);for(var n="",r=0;t>r;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Q));return n}function E(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;n>i;i++)r+=String.fromCharCode(127&e[i]);return r}function O(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;n>i;i++)r+=String.fromCharCode(e[i]);return r}function I(e,t,n){var r=e.length;(!t||0>t)&&(t=0),(!n||0>n||n>r)&&(n=r);for(var i="",o=t;n>o;o++)i+=U(e[o]);return i}function P(e,t,n){for(var r=e.slice(t,n),i="",o=0;oe)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,n,r,i,o){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||o>t)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function H(e,t,n,r){0>t&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);o>i;i++)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function W(e,t,n,r){0>t&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);o>i;i++)e[n+i]=t>>>8*(r?i:3-i)&255}function B(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(0>n)throw new RangeError("Index out of range")}function _(e,t,n,r,i){return i||B(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),Z.write(e,t,n,r,23,4),n+4}function F(e,t,n,r,i){return i||B(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),Z.write(e,t,n,r,52,8),n+8}function z(e){if(e=j(e).replace(ee,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function j(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function U(e){return 16>e?"0"+e.toString(16):e.toString(16)}function q(e,t){t=t||1/0;for(var n,r=e.length,i=null,o=[],a=0;r>a;a++){if(n=e.charCodeAt(a),n>55295&&57344>n){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(56320>n){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,128>n){if((t-=1)<0)break;o.push(n)}else if(2048>n){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(65536>n){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(1114112>n))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function G(e){for(var t=[],n=0;n>8,i=n%256,o.push(i),o.push(r);return o}function $(e){return X.toByteArray(z(e))}function V(e,t,n,r){for(var i=0;r>i&&!(i+n>=t.length||i>=e.length);i++)t[i+n]=e[i];return i}function K(e){return e!==e}var X=e("base64-js"),Z=e("ieee754"),J=e("isarray");n.Buffer=a,n.SlowBuffer=g,n.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:r(),n.kMaxLength=i(),a.poolSize=8192,a._augment=function(e){return e.__proto__=a.prototype,e},a.from=function(e,t,n){return l(null,e,t,n)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(e,t,n){return c(null,e,t,n)},a.allocUnsafe=function(e){return u(null,e)},a.allocUnsafeSlow=function(e){return u(null,e)},a.isBuffer=function(e){return!(null==e||!e._isBuffer)},a.compare=function(e,t){if(!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);o>i;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return r>n?-1:n>r?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!J(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);var n;if(void 0===t)for(t=0,n=0;nt;t+=2)x(this,t,t+1);return this},a.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;e>t;t+=4)x(this,t,t+3),x(this,t+1,t+2);return this},a.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?N(this,0,e):y.apply(this,arguments)},a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:0===a.compare(this,e)},a.prototype.inspect=function(){var e="",t=n.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},a.prototype.compare=function(e,t,n,r,i){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),0>t||n>e.length||0>r||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var o=i-r,l=n-t,s=Math.min(o,l),c=this.slice(r,i),u=e.slice(t,n),f=0;s>f;++f)if(c[f]!==u[f]){o=c[f],l=u[f];break}return l>o?-1:o>l?1:0},a.prototype.indexOf=function(e,t,n){if("string"==typeof t?(n=t,t=0):t>2147483647?t=2147483647:-2147483648>t&&(t=-2147483648),t>>=0,0===this.length)return-1;if(t>=this.length)return-1;if(0>t&&(t=Math.max(this.length+t,0)),"string"==typeof e&&(e=a.from(e,n)),a.isBuffer(e))return 0===e.length?-1:b(this,e,t,n);if("number"==typeof e)return a.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,e,t):b(this,[e],t,n);throw new TypeError("val must be string, number or Buffer")},a.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},a.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t=0|t,isFinite(n)?(n=0|n,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(0>n||0>t)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return w(this,e,t,n);case"utf8":case"utf-8":return k(this,e,t,n);case"ascii":return S(this,e,t,n);case"binary":return C(this,e,t,n);case"base64":return L(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Q=4096;a.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),0>t?(t+=n,0>t&&(t=0)):t>n&&(t=n),e>t&&(t=e);var r;if(a.TYPED_ARRAY_SUPPORT)r=this.subarray(e,t),r.__proto__=a.prototype;else{var i=t-e;r=new a(i,void 0);for(var o=0;i>o;o++)r[o]=this[o+e]}return r},a.prototype.readUIntLE=function(e,t,n){e=0|e,t=0|t,n||R(e,t,this.length);for(var r=this[e],i=1,o=0;++o0&&(i*=256);)r+=this[e+--t]*i;return r},a.prototype.readUInt8=function(e,t){return t||R(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return t||R(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return t||R(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,t){return t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,n){e=0|e,t=0|t,n||R(e,t,this.length);for(var r=this[e],i=1,o=0;++o=i&&(r-=Math.pow(2,8*t)),r},a.prototype.readIntBE=function(e,t,n){e=0|e,t=0|t,n||R(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},a.prototype.readInt8=function(e,t){return t||R(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){t||R(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(e,t){t||R(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(e,t){return t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return t||R(e,4,this.length),Z.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return t||R(e,4,this.length),Z.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return t||R(e,8,this.length),Z.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return t||R(e,8,this.length),Z.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t=0|t,n=0|n,!r){var i=Math.pow(2,8*n)-1;D(this,e,t,n,i,0)}var o=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+o]=e/a&255;return t+n},a.prototype.writeUInt8=function(e,t,n){return e=+e,t=0|t,n||D(this,e,t,1,255,0),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=0|t,n||D(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):H(this,e,t,!0),t+2},a.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=0|t,n||D(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):H(this,e,t,!1),t+2},a.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=0|t,n||D(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):W(this,e,t,!0),t+4},a.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=0|t,n||D(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):W(this,e,t,!1),t+4},a.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t=0|t,!r){var i=Math.pow(2,8*n-1);D(this,e,t,n,i-1,-i)}var o=0,a=1,l=0;for(this[t]=255&e;++oe&&0===l&&0!==this[t+o-1]&&(l=1),this[t+o]=(e/a>>0)-l&255;return t+n},a.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t=0|t,!r){var i=Math.pow(2,8*n-1);D(this,e,t,n,i-1,-i)}var o=n-1,a=1,l=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)0>e&&0===l&&0!==this[t+o+1]&&(l=1),this[t+o]=(e/a>>0)-l&255;return t+n},a.prototype.writeInt8=function(e,t,n){return e=+e,t=0|t,n||D(this,e,t,1,127,-128),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,n){return e=+e,t=0|t,n||D(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):H(this,e,t,!0),t+2},a.prototype.writeInt16BE=function(e,t,n){return e=+e,t=0|t,n||D(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):H(this,e,t,!1),t+2},a.prototype.writeInt32LE=function(e,t,n){return e=+e,t=0|t,n||D(this,e,t,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):W(this,e,t,!0),t+4},a.prototype.writeInt32BE=function(e,t,n){return e=+e,t=0|t,n||D(this,e,t,4,2147483647,-2147483648),0>e&&(e=4294967295+e+1),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):W(this,e,t,!1),t+4},a.prototype.writeFloatLE=function(e,t,n){return _(this,e,t,!0,n)},a.prototype.writeFloatBE=function(e,t,n){return _(this,e,t,!1,n)},a.prototype.writeDoubleLE=function(e,t,n){return F(this,e,t,!0,n)},a.prototype.writeDoubleBE=function(e,t,n){return F(this,e,t,!1,n)},a.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&n>r&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(0>t)throw new RangeError("targetStart out of bounds");if(0>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>r)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-tn&&r>t)for(i=o-1;i>=0;i--)e[i+t]=this[i+n];else if(1e3>o||!a.TYPED_ARRAY_SUPPORT)for(i=0;o>i;i++)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},a.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);256>i&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!a.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e=255&e);if(0>t||this.length=n)return this;t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var o;if("number"==typeof e)for(o=t;n>o;o++)this[o]=e;else{var l=a.isBuffer(e)?e:q(new a(e,r).toString()),s=l.length;for(o=0;n-t>o;o++)this[o+t]=l[o%s]}return this};var ee=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":1,ieee754:15,isarray:16}],4:[function(e,t,n){"use strict";function r(e){return e=e||{},"function"!=typeof e.codeMirrorInstance||"function"!=typeof e.codeMirrorInstance.defineMode?void console.log("CodeMirror Spell Checker: You must provide an instance of CodeMirror via the option `codeMirrorInstance`"):(String.prototype.includes||(String.prototype.includes=function(){return-1!==String.prototype.indexOf.apply(this,arguments)}),void e.codeMirrorInstance.defineMode("spell-checker",function(t){if(!r.aff_loading){r.aff_loading=!0;var n=new XMLHttpRequest;n.open("GET","https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.aff",!0),n.onload=function(){4===n.readyState&&200===n.status&&(r.aff_data=n.responseText,r.num_loaded++,2==r.num_loaded&&(r.typo=new i("en_US",r.aff_data,r.dic_data,{platform:"any"})))},n.send(null)}if(!r.dic_loading){r.dic_loading=!0;var o=new XMLHttpRequest;o.open("GET","https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.dic",!0),o.onload=function(){4===o.readyState&&200===o.status&&(r.dic_data=o.responseText,r.num_loaded++,2==r.num_loaded&&(r.typo=new i("en_US",r.aff_data,r.dic_data,{platform:"any"})))},o.send(null)}var a='!"#$%&()*+,-./:;<=>?@[\\]^_`{|}~ ',l={token:function(e){var t=e.peek(),n="";if(a.includes(t))return e.next(),null;for(;null!=(t=e.peek())&&!a.includes(t);)n+=t,e.next();return r.typo&&!r.typo.check(n)?"spell-error":null}},s=e.codeMirrorInstance.getMode(t,t.backdrop||"text/plain");return e.codeMirrorInstance.overlayMode(s,l,!0)}))}var i=e("typo-js");r.num_loaded=0,r.aff_loading=!1,r.dic_loading=!1,r.aff_data="",r.dic_data="",r.typo,t.exports=r},{"typo-js":18}],5:[function(t,n,r){!function(i){"object"==typeof r&&"object"==typeof n?i(t("../../lib/codemirror")):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],i):i(CodeMirror)}(function(e){"use strict";function t(e){var t=e.getWrapperElement();e.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:t.style.width,height:t.style.height},t.style.width="",t.style.height="auto",t.className+=" CodeMirror-fullscreen",document.documentElement.style.overflow="hidden",e.refresh()}function n(e){var t=e.getWrapperElement();t.className=t.className.replace(/\s*CodeMirror-fullscreen\b/,""),document.documentElement.style.overflow="";var n=e.state.fullScreenRestore;t.style.width=n.width,t.style.height=n.height,window.scrollTo(n.scrollLeft,n.scrollTop),e.refresh()}e.defineOption("fullScreen",!1,function(r,i,o){o==e.Init&&(o=!1),!o!=!i&&(i?t(r):n(r))})})},{"../../lib/codemirror":10}],6:[function(t,n,r){!function(i){"object"==typeof r&&"object"==typeof n?i(t("../../lib/codemirror")):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],i):i(CodeMirror)}(function(e){function t(e){e.state.placeholder&&(e.state.placeholder.parentNode.removeChild(e.state.placeholder),e.state.placeholder=null)}function n(e){t(e);var n=e.state.placeholder=document.createElement("pre");n.style.cssText="height: 0; overflow: visible",n.className="CodeMirror-placeholder";var r=e.getOption("placeholder");"string"==typeof r&&(r=document.createTextNode(r)),n.appendChild(r),e.display.lineSpace.insertBefore(n,e.display.lineSpace.firstChild)}function r(e){o(e)&&n(e)}function i(e){var r=e.getWrapperElement(),i=o(e);r.className=r.className.replace(" CodeMirror-empty","")+(i?" CodeMirror-empty":""),i?n(e):t(e)}function o(e){return 1===e.lineCount()&&""===e.getLine(0)}e.defineOption("placeholder","",function(n,o,a){var l=a&&a!=e.Init;if(o&&!l)n.on("blur",r),n.on("change",i),n.on("swapDoc",i),i(n);else if(!o&&l){n.off("blur",r),n.off("change",i),n.off("swapDoc",i),t(n);var s=n.getWrapperElement();s.className=s.className.replace(" CodeMirror-empty","")}o&&!n.hasFocus()&&r(n)})})},{"../../lib/codemirror":10}],7:[function(t,n,r){!function(i){"object"==typeof r&&"object"==typeof n?i(t("../../lib/codemirror")):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],i):i(CodeMirror)}(function(e){"use strict";var t=/^(\s*)(>[> ]*|[*+-]\s|(\d+)([.)]))(\s*)/,n=/^(\s*)(>[> ]*|[*+-]|(\d+)[.)])(\s*)$/,r=/[*+-]\s/;e.commands.newlineAndIndentContinueMarkdownList=function(i){if(i.getOption("disableInput"))return e.Pass;for(var o=i.listSelections(),a=[],l=0;l")>=0?d[2]:parseInt(d[3],10)+1+d[4];a[l]="\n"+p+g+m}}i.replaceSelections(a)}})},{"../../lib/codemirror":10}],8:[function(t,n,r){!function(i){"object"==typeof r&&"object"==typeof n?i(t("../../lib/codemirror")):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],i):i(CodeMirror)}(function(e){"use strict";e.overlayMode=function(t,n,r){return{startState:function(){return{base:e.startState(t),overlay:e.startState(n),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(r){return{base:e.copyState(t,r.base),overlay:e.copyState(n,r.overlay),basePos:r.basePos,baseCur:null,overlayPos:r.overlayPos,overlayCur:null}},token:function(e,i){return(e!=i.streamSeen||Math.min(i.basePos,i.overlayPos)=n.line,d=h?n:s(f,0),p=e.markText(u,d,{className:o});if(null==r?i.push(p):i.splice(r++,0,p),h)break;a=f}}function i(e){for(var t=e.state.markedSelection,n=0;n1)return o(e);var t=e.getCursor("start"),n=e.getCursor("end"),a=e.state.markedSelection;if(!a.length)return r(e,t,n);var s=a[0].find(),u=a[a.length-1].find();if(!s||!u||n.line-t.line=0||c(n,s.from)<=0)return o(e);for(;c(t,s.from)>0;)a.shift().clear(),s=a[0].find();for(c(t,s.from)<0&&(s.to.line-t.line0&&(n.line-u.from.linebo&&setTimeout(function(){s.display.input.reset(!0)},20),jt(this),Ki(),bt(this),this.curOp.forceUpdate=!0,Xr(this,i),r.autofocus&&!Ao||s.hasFocus()?setTimeout(Bi(vn,this),20):yn(this);for(var u in ta)ta.hasOwnProperty(u)&&ta[u](this,r[u],na);k(this),r.finishInit&&r.finishInit(this);for(var f=0;fbo&&(r.gutters.style.zIndex=-1,r.scroller.style.paddingRight=0),wo||go&&Ao||(r.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(r.wrapper):e(r.wrapper)),r.viewFrom=r.viewTo=t.first,r.reportedViewFrom=r.reportedViewTo=t.first,r.view=[],r.renderedView=null,r.externalMeasured=null,r.viewOffset=0,r.lastWrapHeight=r.lastWrapWidth=0,r.updateLineNumbers=null,r.nativeBarWidth=r.barHeight=r.barWidth=0,r.scrollbarsClipped=!1,r.lineNumWidth=r.lineNumInnerWidth=r.lineNumChars=null,r.alignWidgets=!1,r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null, -r.maxLine=null,r.maxLineLength=0,r.maxLineChanged=!1,r.wheelDX=r.wheelDY=r.wheelStartX=r.wheelStartY=null,r.shift=!1,r.selForContextMenu=null,r.activeTouch=null,n.init(r)}function n(t){t.doc.mode=e.getMode(t.options,t.doc.modeOption),r(t)}function r(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.frontier=e.doc.first,_e(e,100),e.state.modeGen++,e.curOp&&Dt(e)}function i(e){e.options.lineWrapping?(Ja(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Za(e.display.wrapper,"CodeMirror-wrap"),h(e)),a(e),Dt(e),lt(e),setTimeout(function(){y(e)},100)}function o(e){var t=yt(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/xt(e.display)-3);return function(i){if(kr(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;at.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}function d(e){var t=Pi(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function p(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+qe(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Ye(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function m(e,t,n){this.cm=n;var r=this.vert=ji("div",[ji("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=ji("div",[ji("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(r),e(i),Ea(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),Ea(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,xo&&8>bo&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function g(){}function v(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&Za(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new e.scrollbarModel[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),Ea(e,"mousedown",function(){t.state.focused&&setTimeout(function(){t.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,n){"horizontal"==n?on(t,e):rn(t,e)},t),t.display.scrollbars.addClass&&Ja(t.display.wrapper,t.display.scrollbars.addClass)}function y(e,t){t||(t=p(e));var n=e.display.barWidth,r=e.display.barHeight;x(e,t);for(var i=0;4>i&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&O(e),x(e,p(e)),n=e.display.barWidth,r=e.display.barHeight}function x(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}function b(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Ue(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,o=ni(t,r),a=ni(t,i);if(n&&n.ensure){var l=n.ensure.from.line,s=n.ensure.to.line;o>l?(o=l,a=ni(t,ri(Zr(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(o=ni(t,ri(Zr(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function w(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=C(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;a=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==zt(e))return!1;k(e)&&(Wt(e),t.dims=P(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),Wo&&(o=br(e.doc,o),a=wr(e.doc,a));var l=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Ft(e,o,a),n.viewOffset=ri(Zr(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var s=zt(e);if(!l&&0==s&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=Gi();return s>4&&(n.lineDiv.style.display="none"),R(e,n.updateLineNumbers,t.dims),s>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,c&&Gi()!=c&&c.offsetHeight&&c.focus(),Ui(n.cursorDiv),Ui(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,l&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,_e(e,400)),n.updateLineNumbers=null,!0}function N(e,t){for(var n=t.viewport,r=!0;(r&&e.options.lineWrapping&&t.oldDisplayWidth!=$e(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+qe(e.display)-Ve(e),n.top)}),t.visible=b(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&M(e,t);r=!1){O(e);var i=p(e);Re(e),y(e,i),E(e,i)}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function A(e,t){var n=new L(e,t);if(M(e,n)){O(e),N(e,n);var r=p(e);Re(e),y(e,r),E(e,r),n.finish()}}function E(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Ye(e)+"px"}function O(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;rbo){var a=o.node.offsetTop+o.node.offsetHeight;i=a-n,n=a}else{var l=o.node.getBoundingClientRect();i=l.bottom-l.top}var s=o.line.height-i;if(2>i&&(i=yt(t)),(s>.001||-.001>s)&&(ei(o.line,i),I(o.line),o.rest))for(var c=0;c=t&&f.lineNumber;f.changes&&(Pi(f.changes,"gutter")>-1&&(h=!1),D(e,f,c,n)),h&&(Ui(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(S(e.options,c)))),l=f.node.nextSibling}else{var d=U(e,f,c,n);a.insertBefore(d,l)}c+=f.size}for(;l;)l=r(l)}function D(e,t,n,r){for(var i=0;ibo&&(e.node.style.zIndex=2)),e.node}function W(e){var t=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(t&&(t+=" CodeMirror-linebackground"),e.background)t?e.background.className=t:(e.background.parentNode.removeChild(e.background),e.background=null);else if(t){var n=H(e);e.background=n.insertBefore(ji("div",null,t),n.firstChild)}}function B(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):Br(e,t)}function _(e,t){var n=t.text.className,r=B(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,F(t)):n&&(t.text.className=n)}function F(e){W(e),e.line.wrapClass?H(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var t=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=t||""}function z(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=H(t);t.gutterBackground=ji("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var i=H(t),a=t.gutter=ji("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(e.display.input.setUneditable(a),i.insertBefore(a,t.text),t.line.gutterClass&&(a.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=a.appendChild(ji("div",S(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var l=0;l1)if(Fo&&Fo.text.join("\n")==t){if(r.ranges.length%Fo.text.length==0){s=[];for(var c=0;c=0;c--){var u=r.ranges[c],f=u.from(),h=u.to();u.empty()&&(n&&n>0?f=Bo(f.line,f.ch-n):e.state.overwrite&&!a?h=Bo(h.line,Math.min(Zr(o,h.line).text.length,h.ch+Ii(l).length)):Fo&&Fo.lineWise&&Fo.text.join("\n")==t&&(f=h=Bo(f.line,0)));var d=e.curOp.updateInput,p={from:f,to:h,text:s?s[c%s.length]:l,origin:i||(a?"paste":e.state.cutIncoming?"cut":"+input")};Tn(e.doc,p),Ci(e,"inputRead",e,p)}t&&!a&&Q(e,t),Bn(e),e.curOp.updateInput=d,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function J(e,t){var n=e.clipboardData&&e.clipboardData.getData("text/plain");return n?(e.preventDefault(),t.isReadOnly()||t.options.disableInput||At(t,function(){Z(t,n,0,null,"paste")}),!0):void 0}function Q(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var l=0;l-1){a=Fn(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Zr(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Fn(e,i.head.line,"smart"));a&&Ci(e,"electricInput",e,i.head.line)}}}function ee(e){for(var t=[],n=[],r=0;ri?c.map:u[i],a=0;ai?e.line:e.rest[i]),f=o[a]+r;return(0>r||l!=t)&&(f=o[a+(r?1:0)]),Bo(s,f)}}}var i=e.text.firstChild,o=!1;if(!t||!Va(i,t))return ae(Bo(ti(e.line),0),!0);if(t==i&&(o=!0,t=i.childNodes[n],n=0,!t)){var a=e.rest?Ii(e.rest):e.line;return ae(Bo(ti(a),a.text.length),o)}var l=3==t.nodeType?t:null,s=t;for(l||1!=t.childNodes.length||3!=t.firstChild.nodeType||(l=t.firstChild,n&&(n=l.nodeValue.length));s.parentNode!=i;)s=s.parentNode;var c=e.measure,u=c.maps,f=r(l,s,n);if(f)return ae(f,o);for(var h=s.nextSibling,d=l?l.nodeValue.length-n:0;h;h=h.nextSibling){if(f=r(h,h.firstChild,0))return ae(Bo(f.line,f.ch-d),o);d+=h.textContent.length}for(var p=s.previousSibling,d=n;p;p=p.previousSibling){if(f=r(p,p.firstChild,-1))return ae(Bo(f.line,f.ch+d),o);d+=h.textContent.length}}function ce(e,t,n,r,i){function o(e){return function(t){return t.id==e}}function a(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(null!=n)return""==n&&(n=t.textContent.replace(/\u200b/g,"")),void(l+=n);var u,f=t.getAttribute("cm-marker");if(f){var h=e.findMarks(Bo(r,0),Bo(i+1,0),o(+f));return void(h.length&&(u=h[0].find())&&(l+=Jr(e.doc,u.from,u.to).join(c)))}if("false"==t.getAttribute("contenteditable"))return;for(var d=0;d=0){var a=K(o.from(),i.from()),l=V(o.to(),i.to()),s=o.empty()?i.from()==i.head:o.from()==o.head;t>=r&&--t,e.splice(--r,2,new fe(s?l:a,s?a:l))}}return new ue(e,t)}function de(e,t){return new ue([new fe(e,t||e)],0)}function pe(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function me(e,t){if(t.linen?Bo(n,Zr(e,n).text.length):ge(t,Zr(e,t.line).text.length)}function ge(e,t){var n=e.ch;return null==n||n>t?Bo(e.line,t):0>n?Bo(e.line,0):e}function ve(e,t){return t>=e.first&&t=t.ch:l.to>t.ch))){if(i&&(Pa(s,"beforeCursorEnter"),s.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!s.atomic)continue;if(n){var c,u=s.find(0>r?1:-1);if((0>r?s.inclusiveRight:s.inclusiveLeft)&&(u=Pe(e,u,-r,u&&u.line==t.line?o:null)),u&&u.line==t.line&&(c=_o(u,n))&&(0>r?0>c:c>0))return Oe(e,u,t,r,i)}var f=s.find(0>r?-1:1);return(0>r?s.inclusiveLeft:s.inclusiveRight)&&(f=Pe(e,f,r,f.line==t.line?o:null)),f?Oe(e,f,t,r,i):null}}return t}function Ie(e,t,n,r,i){var o=r||1,a=Oe(e,t,n,o,i)||!i&&Oe(e,t,n,o,!0)||Oe(e,t,n,-o,i)||!i&&Oe(e,t,n,-o,!0);return a?a:(e.cantEdit=!0,Bo(e.first,0))}function Pe(e,t,n,r){return 0>n&&0==t.ch?t.line>e.first?me(e,Bo(t.line-1)):null:n>0&&t.ch==(r||Zr(e,t.line)).text.length?t.line=e.display.viewTo||l.to().linet&&(t=0),t=Math.round(t),r=Math.round(r),l.appendChild(ji("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px; top: "+t+"px; width: "+(null==n?u-e:n)+"px; height: "+(r-t)+"px"))}function i(t,n,i){function o(n,r){return ht(e,Bo(t,n),"div",f,r)}var l,s,f=Zr(a,t),h=f.text.length;return eo(ii(f),n||0,null==i?h:i,function(e,t,a){var f,d,p,m=o(e,"left");if(e==t)f=m,d=p=m.left;else{if(f=o(t-1,"right"),"rtl"==a){var g=m;m=f,f=g}d=m.left,p=f.right}null==n&&0==e&&(d=c),f.top-m.top>3&&(r(d,m.top,null,m.bottom),d=c,m.bottoms.bottom||f.bottom==s.bottom&&f.right>s.right)&&(s=f),c+1>d&&(d=c),r(d,f.top,p-d,f.bottom)}),{start:l,end:s}}var o=e.display,a=e.doc,l=document.createDocumentFragment(),s=Ge(e.display),c=s.left,u=Math.max(o.sizerWidth,$e(e)-o.sizer.offsetLeft)-s.right,f=t.from(),h=t.to();if(f.line==h.line)i(f.line,f.ch,h.ch);else{var d=Zr(a,f.line),p=Zr(a,h.line),m=yr(d)==yr(p),g=i(f.line,f.ch,m?d.text.length+1:null).end,v=i(h.line,m?0:null,h.ch).start;m&&(g.top0?t.blinker=setInterval(function(){t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function _e(e,t){e.doc.mode.startState&&e.doc.frontier=e.display.viewTo)){var n=+new Date+e.options.workTime,r=sa(t.mode,je(e,t.frontier)),i=[];t.iter(t.frontier,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(t.frontier>=e.display.viewFrom){var a=o.styles,l=o.text.length>e.options.maxHighlightLength,s=Rr(e,o,l?sa(t.mode,r):r,!0);o.styles=s.styles;var c=o.styleClasses,u=s.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var f=!a||a.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),h=0;!f&&hn?(_e(e,e.options.workDelay),!0):void 0}),i.length&&At(e,function(){for(var t=0;ta;--l){if(l<=o.first)return o.first;var s=Zr(o,l-1);if(s.stateAfter&&(!n||l<=o.frontier))return l;var c=Fa(s.text,null,e.options.tabSize);(null==i||r>c)&&(i=l-1,r=c)}return i}function je(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return!0;var o=ze(e,t,n),a=o>r.first&&Zr(r,o-1).stateAfter;return a=a?sa(r.mode,a):ca(r.mode),r.iter(o,t,function(n){Hr(e,n.text,a);var l=o==t-1||o%5==0||o>=i.viewFrom&&o2&&o.push((s.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Xe(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;rn)return{map:e.measure.maps[r],cache:e.measure.caches[r],before:!0}}function Ze(e,t){t=yr(t);var n=ti(t),r=e.display.externalMeasured=new Pt(e.doc,t,n);r.lineN=n;var i=r.built=Br(e,r);return r.text=i.pre,qi(e.display.lineMeasure,i.pre),r}function Je(e,t,n,r){return tt(e,et(e,t),n,r)}function Qe(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt?(i=0,o=1,a="left"):c>t?(i=t-s,o=i+1):(l==e.length-3||t==c&&e[l+3]>t)&&(o=c-s,i=o-1,t>=c&&(a="right")),null!=i){if(r=e[l+2],s==c&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;l&&e[l-2]==e[l-3]&&e[l-1].insertLeft;)r=e[(l-=3)+2],a="left";if("right"==n&&i==c-s)for(;lu;u++){for(;l&&zi(t.line.text.charAt(o.coverStart+l));)--l;for(;o.coverStart+sbo&&0==l&&s==o.coverEnd-o.coverStart)i=a.parentNode.getBoundingClientRect();else if(xo&&e.options.lineWrapping){var f=qa(a,l,s).getClientRects();i=f.length?f["right"==r?f.length-1:0]:qo}else i=qa(a,l,s).getBoundingClientRect()||qo;if(i.left||i.right||0==l)break;s=l,l-=1,c="right"}xo&&11>bo&&(i=it(e.display.measure,i))}else{l>0&&(c=r="right");var f;i=e.options.lineWrapping&&(f=a.getClientRects()).length>1?f["right"==r?f.length-1:0]:a.getBoundingClientRect()}if(xo&&9>bo&&!l&&(!i||!i.left&&!i.right)){var h=a.parentNode.getClientRects()[0];i=h?{left:h.left,right:h.left+xt(e.display),top:h.top,bottom:h.bottom}:qo}for(var d=i.top-t.rect.top,p=i.bottom-t.rect.top,m=(d+p)/2,g=t.view.measure.heights,u=0;un.from?a(e-1):a(e,r)}r=r||Zr(e.doc,t.line),i||(i=et(e,r));var s=ii(r),c=t.ch;if(!s)return a(c);var u=co(s,c),f=l(c,u);return null!=al&&(f.other=l(c,al)),f}function pt(e,t){var n=0,t=me(e.doc,t);e.options.lineWrapping||(n=xt(e.display)*t.ch);var r=Zr(e.doc,t.line),i=ri(r)+Ue(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function mt(e,t,n,r){var i=Bo(e,t);return i.xRel=r,n&&(i.outside=!0),i}function gt(e,t,n){var r=e.doc;if(n+=e.display.viewOffset,0>n)return mt(r.first,0,!0,-1);var i=ni(r,n),o=r.first+r.size-1;if(i>o)return mt(r.first+r.size-1,Zr(r,o).text.length,!0,1);0>t&&(t=0);for(var a=Zr(r,i);;){var l=vt(e,a,i,t,n),s=gr(a),c=s&&s.find(0,!0);if(!s||!(l.ch>c.from.ch||l.ch==c.from.ch&&l.xRel>0))return l;i=ti(a=c.to.line)}}function vt(e,t,n,r,i){function o(r){var i=dt(e,Bo(n,r),"line",t,c);return l=!0,a>i.bottom?i.left-s:ag)return mt(n,d,v,1);for(;;){if(u?d==h||d==fo(t,h,1):1>=d-h){for(var y=p>r||g-r>=r-p?h:d,x=r-(y==h?p:g);zi(t.text.charAt(y));)++y;var b=mt(n,y,y==h?m:v,-1>x?-1:x>1?1:0);return b}var w=Math.ceil(f/2),k=h+w;if(u){k=h;for(var S=0;w>S;++S)k=fo(t,k,1)}var C=o(k);C>r?(d=k,g=C,(v=l)&&(g+=1e3),f=w):(h=k,p=C,m=l,f-=w)}}function yt(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==zo){zo=ji("pre");for(var t=0;49>t;++t)zo.appendChild(document.createTextNode("x")),zo.appendChild(ji("br"));zo.appendChild(document.createTextNode("x"))}qi(e.measure,zo);var n=zo.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),Ui(e.measure),n||1}function xt(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=ji("span","xxxxxxxxxx"),n=ji("pre",[t]);qi(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function bt(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Yo},Go?Go.ops.push(e.curOp):e.curOp.ownsGroup=Go={ops:[e.curOp],delayedCallbacks:[]}}function wt(e){var t=e.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new L(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Lt(e){e.updatedDisplay=e.mustUpdate&&M(e.cm,e.update)}function Tt(e){var t=e.cm,n=t.display;e.updatedDisplay&&O(t),e.barMeasure=p(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Je(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Ye(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-$e(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection(e.focus))}function Mt(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLefto;o=r){var a=new Pt(e.doc,Zr(e.doc,o),o);r=o+a.size,i.push(a)}return i}function Dt(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&nt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Wo&&br(e.doc,t)i.viewFrom?Wt(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Wt(e);else if(t<=i.viewFrom){var o=_t(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):Wt(e)}else if(n>=i.viewTo){var o=_t(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):Wt(e)}else{var a=_t(e,t,t,-1),l=_t(e,n,n+r,1);a&&l?(i.view=i.view.slice(0,a.index).concat(Rt(e,a.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):Wt(e)}var s=i.externalMeasured;s&&(n=i.lineN&&t=r.viewTo)){var o=r.view[Bt(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==Pi(a,n)&&a.push(n)}}}function Wt(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Bt(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,0>t)return null;for(var n=e.display.view,r=0;rt)return r}function _t(e,t,n,r){var i,o=Bt(e,t),a=e.display.view;if(!Wo||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var l=0,s=e.display.viewFrom;o>l;l++)s+=a[l].size;if(s!=t){if(r>0){if(o==a.length-1)return null;i=s+a[o].size-t,o++}else i=s-t;t+=i,n+=i}for(;br(e.doc,n)!=n;){if(o==(0>r?0:a.length-1))return null;n+=r*a[o-(0>r?1:0)].size,o+=r}return{index:o,lineN:n}}function Ft(e,t,n){var r=e.display,i=r.view;0==i.length||t>=r.viewTo||n<=r.viewFrom?(r.view=Rt(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=Rt(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,Bt(e,n)))),r.viewTo=n}function zt(e){for(var t=e.display.view,n=0,r=0;r400}var i=e.display;Ea(i.scroller,"mousedown",Et(e,$t)),xo&&11>bo?Ea(i.scroller,"dblclick",Et(e,function(t){if(!Ti(e,t)){var n=Yt(e,t);if(n&&!Jt(e,t)&&!Gt(e.display,t)){Ma(t);var r=e.findWordAt(n);be(e.doc,r.anchor,r.head)}}})):Ea(i.scroller,"dblclick",function(t){Ti(e,t)||Ma(t)}),Do||Ea(i.scroller,"contextmenu",function(t){xn(e,t)});var o,a={end:0};Ea(i.scroller,"touchstart",function(t){if(!Ti(e,t)&&!n(t)){clearTimeout(o);var r=+new Date;i.activeTouch={start:r,moved:!1,prev:r-a.end<=300?a:null},1==t.touches.length&&(i.activeTouch.left=t.touches[0].pageX,i.activeTouch.top=t.touches[0].pageY)}}),Ea(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),Ea(i.scroller,"touchend",function(n){var o=i.activeTouch;if(o&&!Gt(i,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var a,l=e.coordsChar(i.activeTouch,"page");a=!o.prev||r(o,o.prev)?new fe(l,l):!o.prev.prev||r(o,o.prev.prev)?e.findWordAt(l):new fe(Bo(l.line,0),me(e.doc,Bo(l.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),Ma(n)}t()}),Ea(i.scroller,"touchcancel",t),Ea(i.scroller,"scroll",function(){i.scroller.clientHeight&&(rn(e,i.scroller.scrollTop),on(e,i.scroller.scrollLeft,!0),Pa(e,"scroll",e))}),Ea(i.scroller,"mousewheel",function(t){an(e,t)}),Ea(i.scroller,"DOMMouseScroll",function(t){an(e,t)}),Ea(i.wrapper,"scroll",function(){i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(t){Ti(e,t)||Aa(t)},over:function(t){Ti(e,t)||(tn(e,t),Aa(t))},start:function(t){en(e,t)},drop:Et(e,Qt),leave:function(t){Ti(e,t)||nn(e)}};var l=i.input.getField();Ea(l,"keyup",function(t){pn.call(e,t)}),Ea(l,"keydown",Et(e,hn)),Ea(l,"keypress",Et(e,mn)),Ea(l,"focus",Bi(vn,e)),Ea(l,"blur",Bi(yn,e))}function Ut(t,n,r){var i=r&&r!=e.Init;if(!n!=!i){var o=t.display.dragFunctions,a=n?Ea:Ia;a(t.display.scroller,"dragstart",o.start),a(t.display.scroller,"dragenter",o.enter),a(t.display.scroller,"dragover",o.over),a(t.display.scroller,"dragleave",o.leave),a(t.display.scroller,"drop",o.drop)}}function qt(e){var t=e.display;t.lastWrapHeight==t.wrapper.clientHeight&&t.lastWrapWidth==t.wrapper.clientWidth||(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}function Gt(e,t){for(var n=wi(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function Yt(e,t,n,r){var i=e.display;if(!n&&"true"==wi(t).getAttribute("cm-not-content"))return null;var o,a,l=i.lineSpace.getBoundingClientRect();try{o=t.clientX-l.left,a=t.clientY-l.top}catch(t){return null}var s,c=gt(e,o,a);if(r&&1==c.xRel&&(s=Zr(e.doc,c.line).text).length==c.ch){var u=Fa(s,s.length,e.options.tabSize)-s.length;c=Bo(c.line,Math.max(0,Math.round((o-Ge(e.display).left)/xt(e.display))-u))}return c}function $t(e){var t=this,n=t.display;if(!(Ti(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.shift=e.shiftKey,Gt(n,e))return void(wo||(n.scroller.draggable=!1,setTimeout(function(){n.scroller.draggable=!0},100)));if(!Jt(t,e)){var r=Yt(t,e);switch(window.focus(),ki(e)){case 1:t.state.selectingText?t.state.selectingText(e):r?Vt(t,e,r):wi(e)==n.scroller&&Ma(e);break;case 2:wo&&(t.state.lastMiddleDown=+new Date),r&&be(t.doc,r),setTimeout(function(){n.input.focus()},20),Ma(e);break;case 3:Do?xn(t,e):gn(t)}}}}function Vt(e,t,n){xo?setTimeout(Bi(X,e),0):e.curOp.focus=Gi();var r,i=+new Date;Uo&&Uo.time>i-400&&0==_o(Uo.pos,n)?r="triple":jo&&jo.time>i-400&&0==_o(jo.pos,n)?(r="double",Uo={time:i,pos:n}):(r="single",jo={time:i,pos:n});var o,a=e.doc.sel,l=Eo?t.metaKey:t.ctrlKey;e.options.dragDrop&&el&&!e.isReadOnly()&&"single"==r&&(o=a.contains(n))>-1&&(_o((o=a.ranges[o]).from(),n)<0||n.xRel>0)&&(_o(o.to(),n)>0||n.xRel<0)?Kt(e,t,n,l):Xt(e,t,n,r,l)}function Kt(e,t,n,r){var i=e.display,o=+new Date,a=Et(e,function(l){wo&&(i.scroller.draggable=!1),e.state.draggingText=!1,Ia(document,"mouseup",a),Ia(i.scroller,"drop",a),Math.abs(t.clientX-l.clientX)+Math.abs(t.clientY-l.clientY)<10&&(Ma(l),!r&&+new Date-200=p;p++){var v=Zr(c,p).text,y=za(v,s,o);s==d?i.push(new fe(Bo(p,y),Bo(p,y))):v.length>y&&i.push(new fe(Bo(p,y),Bo(p,za(v,d,o))))}i.length||i.push(new fe(n,n)),Te(c,he(h.ranges.slice(0,f).concat(i),f),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var x=u,b=x.anchor,w=t;if("single"!=r){if("double"==r)var k=e.findWordAt(t);else var k=new fe(Bo(t.line,0),me(c,Bo(t.line+1,0)));_o(k.anchor,b)>0?(w=k.head,b=K(x.from(),k.anchor)):(w=k.anchor,b=V(x.to(),k.head))}var i=h.ranges.slice(0);i[f]=new fe(me(c,b),w),Te(c,he(i,f),Ba)}}function a(t){var n=++y,i=Yt(e,t,!0,"rect"==r);if(i)if(0!=_o(i,g)){e.curOp.focus=Gi(),o(i);var l=b(s,c);(i.line>=l.to||i.linev.bottom?20:0;u&&setTimeout(Et(e,function(){y==n&&(s.scroller.scrollTop+=u,a(t))}),50)}}function l(t){e.state.selectingText=!1,y=1/0,Ma(t),s.input.focus(),Ia(document,"mousemove",x),Ia(document,"mouseup",w),c.history.lastSelOrigin=null}var s=e.display,c=e.doc;Ma(t);var u,f,h=c.sel,d=h.ranges;if(i&&!t.shiftKey?(f=c.sel.contains(n),u=f>-1?d[f]:new fe(n,n)):(u=c.sel.primary(),f=c.sel.primIndex),Oo?t.shiftKey&&t.metaKey:t.altKey)r="rect",i||(u=new fe(n,n)),n=Yt(e,t,!0,!0),f=-1;else if("double"==r){var p=e.findWordAt(n);u=e.display.shift||c.extend?xe(c,u,p.anchor,p.head):p}else if("triple"==r){var m=new fe(Bo(n.line,0),me(c,Bo(n.line+1,0)));u=e.display.shift||c.extend?xe(c,u,m.anchor,m.head):m}else u=xe(c,u,n);i?-1==f?(f=d.length,Te(c,he(d.concat([u]),f),{scroll:!1,origin:"*mouse"})):d.length>1&&d[f].empty()&&"single"==r&&!t.shiftKey?(Te(c,he(d.slice(0,f).concat(d.slice(f+1)),0),{scroll:!1,origin:"*mouse"}),h=c.sel):ke(c,f,u,Ba):(f=0,Te(c,new ue([u],0),Ba),h=c.sel);var g=n,v=s.wrapper.getBoundingClientRect(),y=0,x=Et(e,function(e){ki(e)?a(e):l(e)}),w=Et(e,l);e.state.selectingText=w,Ea(document,"mousemove",x),Ea(document,"mouseup",w)}function Zt(e,t,n,r){try{var i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Ma(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!Ni(e,n))return bi(t);o-=l.top-a.viewOffset;for(var s=0;s=i){var u=ni(e.doc,o),f=e.options.gutters[s];return Pa(e,n,e,u,f,t),bi(t)}}}function Jt(e,t){return Zt(e,t,"gutterClick",!0)}function Qt(e){var t=this;if(nn(t),!Ti(t,e)&&!Gt(t.display,e)){Ma(e),xo&&($o=+new Date);var n=Yt(t,e,!0),r=e.dataTransfer.files;if(n&&!t.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),a=0,l=function(e,r){if(!t.options.allowDropFileTypes||-1!=Pi(t.options.allowDropFileTypes,e.type)){var l=new FileReader;l.onload=Et(t,function(){var e=l.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),o[r]=e,++a==i){n=me(t.doc,n);var s={from:n,to:n,text:t.doc.splitLines(o.join(t.doc.lineSeparator())),origin:"paste"};Tn(t.doc,s),Le(t.doc,de(n,Qo(s)))}}),l.readAsText(e)}},s=0;i>s;++s)l(r[s],s);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout(function(){t.display.input.focus()},20);try{var o=e.dataTransfer.getData("Text");if(o){if(t.state.draggingText&&!(Eo?e.altKey:e.ctrlKey))var c=t.listSelections();if(Me(t.doc,de(n,n)),c)for(var s=0;sa.clientWidth,s=a.scrollHeight>a.clientHeight;if(r&&l||i&&s){if(i&&Eo&&wo)e:for(var c=t.target,u=o.view;c!=a;c=c.parentNode)for(var f=0;fh?d=Math.max(0,d+h-50):p=Math.min(e.doc.height,p+h+50),A(e,{top:d,bottom:p})}20>Vo&&(null==o.wheelStartX?(o.wheelStartX=a.scrollLeft,o.wheelStartY=a.scrollTop,o.wheelDX=r,o.wheelDY=i,setTimeout(function(){if(null!=o.wheelStartX){var e=a.scrollLeft-o.wheelStartX,t=a.scrollTop-o.wheelStartY,n=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null,n&&(Ko=(Ko*Vo+n)/(Vo+1),++Vo)}},200)):(o.wheelDX+=r,o.wheelDY+=i))}}function ln(e,t,n){if("string"==typeof t&&(t=ua[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=Ha}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function sn(e,t,n){for(var r=0;rbo&&27==e.keyCode&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=16==n||e.shiftKey;var r=un(t,e);Co&&(Jo=r?n:null,!r&&88==n&&!rl&&(Eo?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=n||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||dn(t)}}function dn(e){function t(e){18!=e.keyCode&&e.altKey||(Za(n,"CodeMirror-crosshair"),Ia(document,"keyup",t),Ia(document,"mouseover",t))}var n=e.display.lineDiv;Ja(n,"CodeMirror-crosshair"),Ea(document,"keyup",t),Ea(document,"mouseover",t)}function pn(e){16==e.keyCode&&(this.doc.sel.shift=!1),Ti(this,e)}function mn(e){var t=this;if(!(Gt(t.display,e)||Ti(t,e)||e.ctrlKey&&!e.altKey||Eo&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(Co&&n==Jo)return Jo=null,void Ma(e);if(!Co||e.which&&!(e.which<10)||!un(t,e)){var i=String.fromCharCode(null==r?n:r);fn(t,e,i)||t.display.input.onKeyPress(e)}}}function gn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,yn(e))},100)}function vn(e){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(Pa(e,"focus",e),e.state.focused=!0,Ja(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),wo&&setTimeout(function(){e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Be(e))}function yn(e){e.state.delayingBlurEvent||(e.state.focused&&(Pa(e,"blur",e),e.state.focused=!1,Za(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function xn(e,t){Gt(e.display,t)||bn(e,t)||Ti(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function bn(e,t){return Ni(e,"gutterContextMenu")?Zt(e,t,"gutterContextMenu",!1):!1}function wn(e,t){if(_o(e,t.from)<0)return e;if(_o(e,t.to)<=0)return Qo(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Qo(t).ch-t.to.ch),Bo(n,r)}function kn(e,t){for(var n=[],r=0;r=0;--i)Mn(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text});else Mn(e,t)}}function Mn(e,t){if(1!=t.text.length||""!=t.text[0]||0!=_o(t.from,t.to)){var n=kn(e,t);ci(e,t,n,e.cm?e.cm.curOp.id:NaN),En(e,t,n,or(e,t));var r=[];Kr(e,function(e,n){n||-1!=Pi(r,e.history)||(xi(e.history,t),r.push(e.history)),En(e,t,null,or(e,t))})}}function Nn(e,t,n){if(!e.cm||!e.cm.state.suppressEdits){for(var r,i=e.history,o=e.sel,a="undo"==t?i.done:i.undone,l="undo"==t?i.undone:i.done,s=0;s=0;--s){var f=r.changes[s];if(f.origin=t,u&&!Ln(e,f,!1))return void(a.length=0);c.push(ai(e,f));var h=s?kn(e,f):Ii(a);En(e,f,h,lr(e,f)),!s&&e.cm&&e.cm.scrollIntoView({from:f.from,to:Qo(f)});var d=[];Kr(e,function(e,t){t||-1!=Pi(d,e.history)||(xi(e.history,f),d.push(e.history)),En(e,f,null,lr(e,f))})}}}}function An(e,t){if(0!=t&&(e.first+=t,e.sel=new ue(Ri(e.sel.ranges,function(e){return new fe(Bo(e.anchor.line+t,e.anchor.ch),Bo(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Dt(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.lineo&&(t={from:t.from,to:Bo(o,Zr(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Jr(e,t.from,t.to),n||(n=kn(e,t)),e.cm?On(e.cm,t,r):Yr(e,t,r),Me(e,n,Wa)}}function On(e,t,n){var r=e.doc,i=e.display,a=t.from,l=t.to,s=!1,c=a.line;e.options.lineWrapping||(c=ti(yr(Zr(r,a.line))),r.iter(c,l.line+1,function(e){return e==i.maxLine?(s=!0,!0):void 0})),r.sel.contains(t.from,t.to)>-1&&Mi(e),Yr(r,t,n,o(e)),e.options.lineWrapping||(r.iter(c,a.line+t.text.length,function(e){var t=f(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),r.frontier=Math.min(r.frontier,a.line),_e(e,400);var u=t.text.length-(l.line-a.line)-1;t.full?Dt(e):a.line!=l.line||1!=t.text.length||Gr(e.doc,t)?Dt(e,a.line,l.line+1,u):Ht(e,a.line,"text");var h=Ni(e,"changes"),d=Ni(e,"change");if(d||h){var p={from:a,to:l,text:t.text,removed:t.removed,origin:t.origin};d&&Ci(e,"change",e,p),h&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(p)}e.display.selForContextMenu=null}function In(e,t,n,r,i){if(r||(r=n),_o(r,n)<0){var o=r;r=n,n=o}"string"==typeof t&&(t=e.splitLines(t)),Tn(e,{from:n,to:r,text:t,origin:i})}function Pn(e,t){if(!Ti(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!Mo){var o=ji("div","​",null,"position: absolute; top: "+(t.top-n.viewOffset-Ue(e.display))+"px; height: "+(t.bottom-t.top+Ye(e)+n.barHeight)+"px; left: "+t.left+"px; width: 2px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function Rn(e,t,n,r){null==r&&(r=0);for(var i=0;5>i;i++){var o=!1,a=dt(e,t),l=n&&n!=t?dt(e,n):a,s=Hn(e,Math.min(a.left,l.left),Math.min(a.top,l.top)-r,Math.max(a.left,l.left),Math.max(a.bottom,l.bottom)+r),c=e.doc.scrollTop,u=e.doc.scrollLeft;if(null!=s.scrollTop&&(rn(e,s.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(o=!0)),null!=s.scrollLeft&&(on(e,s.scrollLeft),Math.abs(e.doc.scrollLeft-u)>1&&(o=!0)),!o)break}return a}function Dn(e,t,n,r,i){var o=Hn(e,t,n,r,i);null!=o.scrollTop&&rn(e,o.scrollTop),null!=o.scrollLeft&&on(e,o.scrollLeft)}function Hn(e,t,n,r,i){var o=e.display,a=yt(e.display);0>n&&(n=0);var l=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:o.scroller.scrollTop,s=Ve(e),c={};i-n>s&&(i=n+s);var u=e.doc.height+qe(o),f=a>n,h=i>u-a;if(l>n)c.scrollTop=f?0:n;else if(i>l+s){var d=Math.min(n,(h?u:i)-s);d!=l&&(c.scrollTop=d)}var p=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:o.scroller.scrollLeft,m=$e(e)-(e.options.fixedGutter?o.gutters.offsetWidth:0),g=r-t>m;return g&&(r=t+m),10>t?c.scrollLeft=0:p>t?c.scrollLeft=Math.max(0,t-(g?0:10)):r>m+p-3&&(c.scrollLeft=r+(g?0:10)-m),c}function Wn(e,t,n){null==t&&null==n||_n(e),null!=t&&(e.curOp.scrollLeft=(null==e.curOp.scrollLeft?e.doc.scrollLeft:e.curOp.scrollLeft)+t),null!=n&&(e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+n)}function Bn(e){_n(e);var t=e.getCursor(),n=t,r=t;e.options.lineWrapping||(n=t.ch?Bo(t.line,t.ch-1):t,r=Bo(t.line,t.ch+1)),e.curOp.scrollToPos={from:n,to:r,margin:e.options.cursorScrollMargin,isCursor:!0}}function _n(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=pt(e,t.from),r=pt(e,t.to),i=Hn(e,Math.min(n.left,r.left),Math.min(n.top,r.top)-t.margin,Math.max(n.right,r.right),Math.max(n.bottom,r.bottom)+t.margin);e.scrollTo(i.scrollLeft,i.scrollTop)}}function Fn(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=je(e,t):n="prev");var a=e.options.tabSize,l=Zr(o,t),s=Fa(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var c,u=l.text.match(/^\s*/)[0];if(r||/\S/.test(l.text)){if("smart"==n&&(c=o.mode.indent(i,l.text.slice(u.length),l.text),c==Ha||c>150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>o.first?Fa(Zr(o,t-1).text,null,a):0:"add"==n?c=s+e.options.indentUnit:"subtract"==n?c=s-e.options.indentUnit:"number"==typeof n&&(c=s+n),c=Math.max(0,c);var f="",h=0;if(e.options.indentWithTabs)for(var d=Math.floor(c/a);d;--d)h+=a,f+=" ";if(c>h&&(f+=Oi(c-h)),f!=u)return In(o,f,Bo(t,0),Bo(t,u.length),"+input"),l.stateAfter=null,!0;for(var d=0;d=0;t--)In(e.doc,"",r[t].from,r[t].to,"+delete");Bn(e)})}function Un(e,t,n,r,i){function o(){var t=l+n;return t=e.first+e.size?!1:(l=t,u=Zr(e,t))}function a(e){var t=(i?fo:ho)(u,s,n,!0);if(null==t){if(e||!o())return!1;s=i?(0>n?io:ro)(u):0>n?u.text.length:0}else s=t;return!0}var l=t.line,s=t.ch,c=n,u=Zr(e,l);if("char"==r)a();else if("column"==r)a(!0);else if("word"==r||"group"==r)for(var f=null,h="group"==r,d=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(0>n)||a(!p);p=!1){var m=u.text.charAt(s)||"\n",g=_i(m,d)?"w":h&&"\n"==m?"n":!h||/\s/.test(m)?null:"p";if(!h||p||g||(g="s"),f&&f!=g){0>n&&(n=1,a());break}if(g&&(f=g),n>0&&!a(!p))break}var v=Ie(e,Bo(l,s),t,c,!0);return _o(t,v)||(v.hitSide=!0),v}function qn(e,t,n,r){var i,o=e.doc,a=t.left;if("page"==r){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);i=t.top+n*(l-(0>n?1.5:.5)*yt(e.display))}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;;){var s=gt(e,a,i);if(!s.outside)break;if(0>n?0>=i:i>=o.height){s.hitSide=!0;break}i+=5*n}return s}function Gn(t,n,r,i){e.defaults[t]=n,r&&(ta[t]=i?function(e,t,n){n!=na&&r(e,t,n)}:r)}function Yn(e){for(var t,n,r,i,o=e.split(/-(?!$)/),e=o[o.length-1],a=0;a0||0==a&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=ji("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(vr(e,t.line,t,n,o)||t.line!=n.line&&vr(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Wo=!0}o.addToHistory&&ci(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var l,s=t.line,c=e.cm;if(e.iter(s,n.line+1,function(e){c&&o.collapsed&&!c.options.lineWrapping&&yr(e)==c.display.maxLine&&(l=!0),o.collapsed&&s!=t.line&&ei(e,0),nr(e,new Qn(o,s==t.line?t.ch:null,s==n.line?n.ch:null)),++s}),o.collapsed&&e.iter(t.line,n.line+1,function(t){kr(e,t)&&ei(t,0)}),o.clearOnEnter&&Ea(o,"beforeCursorEnter",function(){o.clear()}),o.readOnly&&(Ho=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++ga,o.atomic=!0),c){if(l&&(c.curOp.updateMaxLine=!0),o.collapsed)Dt(c,t.line,n.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var u=t.line;u<=n.line;u++)Ht(c,u,"text");o.atomic&&Ae(c.doc),Ci(c,"markerAdded",c,o)}return o}function Kn(e,t,n,r,i){r=Wi(r),r.shared=!1;var o=[Vn(e,t,n,r,i)],a=o[0],l=r.widgetNode;return Kr(e,function(e){l&&(r.widgetNode=l.cloneNode(!0)),o.push(Vn(e,me(e,t),me(e,n),r,i));for(var s=0;s=t:o.to>t);(r||(r=[])).push(new Qn(a,o.from,s?null:o.to))}}return r}function ir(e,t,n){if(e)for(var r,i=0;i=t:o.to>t);if(l||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from0&&l)for(var f=0;ff;++f)p.push(m);p.push(s)}return p}function ar(e){for(var t=0;t0)){var u=[s,1],f=_o(c.from,l.from),h=_o(c.to,l.to);(0>f||!a.inclusiveLeft&&!f)&&u.push({from:c.from,to:l.from}),(h>0||!a.inclusiveRight&&!h)&&u.push({from:l.to,to:c.to}),i.splice.apply(i,u),s+=u.length-1}}return i}function cr(e){var t=e.markedSpans;if(t){for(var n=0;n=0&&0>=f||0>=u&&f>=0)&&(0>=u&&(s.marker.inclusiveRight&&i.inclusiveLeft?_o(c.to,n)>=0:_o(c.to,n)>0)||u>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?_o(c.from,r)<=0:_o(c.from,r)<0)))return!0}}}function yr(e){for(var t;t=mr(e);)e=t.find(-1,!0).line;return e}function xr(e){for(var t,n;t=gr(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function br(e,t){var n=Zr(e,t),r=yr(n);return n==r?t:ti(r)}function wr(e,t){if(t>e.lastLine())return t;var n,r=Zr(e,t);if(!kr(e,r))return t;for(;n=gr(r);)r=n.find(1,!0).line;return ti(r)+1}function kr(e,t){var n=Wo&&t.markedSpans;if(n)for(var r,i=0;io;o++){i&&(i[0]=e.innerMode(t,r).mode);var a=t.token(n,r);if(n.pos>n.start)return a}throw new Error("Mode "+t.name+" failed to advance stream.")}function Ir(e,t,n,r){function i(e){return{start:f.start,end:f.pos,string:f.current(),type:o||null,state:e?sa(a.mode,u):u}}var o,a=e.doc,l=a.mode;t=me(a,t);var s,c=Zr(a,t.line),u=je(e,t.line,n),f=new ma(c.text,e.options.tabSize);for(r&&(s=[]);(r||f.pose.options.maxHighlightLength?(l=!1,a&&Hr(e,t,r,f.pos),f.pos=t.length,s=null):s=Ar(Or(n,f,r,h),o),h){var d=h[0].name;d&&(s="m-"+(s?d+" "+s:d))}if(!l||u!=s){for(;cc;){var r=i[s];r>e&&i.splice(s,1,e,i[s+1],r),s+=2,c=Math.min(e,r)}if(t)if(l.opaque)i.splice(n,s-n,e,"cm-overlay "+t),s=n+2;else for(;s>n;n+=2){var o=i[n+1];i[n+1]=(o?o+" ":"")+"cm-overlay "+t}},o)}return{styles:i,classes:o.bgClass||o.textClass?o:null}}function Dr(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=je(e,ti(t)),i=Rr(e,t,t.text.length>e.options.maxHighlightLength?sa(e.doc.mode,r):r);t.stateAfter=r,t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.frontier&&e.doc.frontier++}return t.styles}function Hr(e,t,n,r){var i=e.doc.mode,o=new ma(t,e.options.tabSize);for(o.start=o.pos=r||0,""==t&&Er(i,n);!o.eol();)Or(i,o,n),o.start=o.pos}function Wr(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?ka:wa;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Br(e,t){var n=ji("span",null,null,wo?"padding-right: .1px":null),r={pre:ji("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,splitSpaces:(xo||wo)&&e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o,a=i?t.rest[i-1]:t.line;r.pos=0,r.addToken=Fr,Ji(e.display.measure)&&(o=ii(a))&&(r.addToken=jr(r.addToken,o)),r.map=[];var l=t!=e.display.externalMeasured&&ti(a);qr(a,r,Dr(e,a,l)),a.styleClasses&&(a.styleClasses.bgClass&&(r.bgClass=$i(a.styleClasses.bgClass,r.bgClass||"")),a.styleClasses.textClass&&(r.textClass=$i(a.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Zi(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(wo){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return Pa(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=$i(r.pre.className,r.textClass||"")),r}function _r(e){var t=ji("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Fr(e,t,n,r,i,o,a){if(t){var l=e.splitSpaces?t.replace(/ {3,}/g,zr):t,s=e.cm.state.specialChars,c=!1;if(s.test(t))for(var u=document.createDocumentFragment(),f=0;;){s.lastIndex=f;var h=s.exec(t),d=h?h.index-f:t.length-f;if(d){var p=document.createTextNode(l.slice(f,f+d));xo&&9>bo?u.appendChild(ji("span",[p])):u.appendChild(p),e.map.push(e.pos,e.pos+d,p),e.col+=d,e.pos+=d}if(!h)break;if(f+=d+1," "==h[0]){var m=e.cm.options.tabSize,g=m-e.col%m,p=u.appendChild(ji("span",Oi(g),"cm-tab"));p.setAttribute("role","presentation"),p.setAttribute("cm-text"," "),e.col+=g}else if("\r"==h[0]||"\n"==h[0]){var p=u.appendChild(ji("span","\r"==h[0]?"␍":"␤","cm-invalidchar"));p.setAttribute("cm-text",h[0]),e.col+=1}else{var p=e.cm.options.specialCharPlaceholder(h[0]);p.setAttribute("cm-text",h[0]),xo&&9>bo?u.appendChild(ji("span",[p])):u.appendChild(p),e.col+=1}e.map.push(e.pos,e.pos+1,p),e.pos++}else{e.col+=t.length;var u=document.createTextNode(l);e.map.push(e.pos,e.pos+t.length,u),xo&&9>bo&&(c=!0),e.pos+=t.length}if(n||r||i||c||a){var v=n||"";r&&(v+=r),i&&(v+=i);var y=ji("span",[u],v,a);return o&&(y.title=o),e.content.appendChild(y)}e.content.appendChild(u)}}function zr(e){for(var t=" ",n=0;nc&&h.from<=c)break}if(h.to>=u)return e(n,r,i,o,a,l,s);e(n,r.slice(0,h.to-c),i,o,null,l,s),o=null,r=r.slice(h.to-c),c=h.to}}}function Ur(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t}function qr(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,l,s,c,u,f,h,d=i.length,p=0,m=1,g="",v=0;;){if(v==p){s=c=u=f=l="",h=null,v=1/0;for(var y,x=[],b=0;bp||k.collapsed&&w.to==p&&w.from==p)?(null!=w.to&&w.to!=p&&v>w.to&&(v=w.to,c=""),k.className&&(s+=" "+k.className),k.css&&(l=(l?l+";":"")+k.css),k.startStyle&&w.from==p&&(u+=" "+k.startStyle),k.endStyle&&w.to==v&&(y||(y=[])).push(k.endStyle,w.to),k.title&&!f&&(f=k.title),k.collapsed&&(!h||dr(h.marker,k)<0)&&(h=w)):w.from>p&&v>w.from&&(v=w.from)}if(y)for(var b=0;b=d)break;for(var S=Math.min(d,v);;){if(g){var C=p+g.length;if(!h){var L=C>S?g.slice(0,S-p):g;t.addToken(t,L,a?a+s:s,u,p+L.length==v?c:"",f,l)}if(C>=S){g=g.slice(S-p),p=S;break}p=C,u=""}g=i.slice(o,o=n[m++]),a=Wr(n[m++],t.cm.options)}}else for(var m=1;mn;++n)o.push(new ba(c[n],i(n),r));return o}var l=t.from,s=t.to,c=t.text,u=Zr(e,l.line),f=Zr(e,s.line),h=Ii(c),d=i(c.length-1),p=s.line-l.line;if(t.full)e.insert(0,a(0,c.length)),e.remove(c.length,e.size-c.length);else if(Gr(e,t)){var m=a(0,c.length-1);o(f,f.text,d),p&&e.remove(l.line,p),m.length&&e.insert(l.line,m)}else if(u==f)if(1==c.length)o(u,u.text.slice(0,l.ch)+h+u.text.slice(s.ch),d);else{var m=a(1,c.length-1);m.push(new ba(h+u.text.slice(s.ch),d,r)),o(u,u.text.slice(0,l.ch)+c[0],i(0)),e.insert(l.line+1,m)}else if(1==c.length)o(u,u.text.slice(0,l.ch)+c[0]+f.text.slice(s.ch),i(0)),e.remove(l.line+1,p);else{o(u,u.text.slice(0,l.ch)+c[0],i(0)),o(f,h+f.text.slice(s.ch),d);var m=a(1,c.length-1);p>1&&e.remove(l.line+1,p-1),e.insert(l.line+1,m)}Ci(e,"change",e,t)}function $r(e){this.lines=e,this.parent=null;for(var t=0,n=0;tt||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(o>t){n=i;break}t-=o}return n.lines[t]}function Jr(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,function(e){var o=e.text;i==n.line&&(o=o.slice(0,n.ch)),i==t.line&&(o=o.slice(t.ch)),r.push(o),++i}),r}function Qr(e,t,n){var r=[];return e.iter(t,n,function(e){r.push(e.text)}),r}function ei(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function ti(e){if(null==e.parent)return null;for(var t=e.parent,n=Pi(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function ni(e,t){var n=e.first;e:do{for(var r=0;rt){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var r=0;rt)break;t-=l}return n+r}function ri(e){e=yr(e);for(var t=0,n=e.parent,r=0;r1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Ii(e.done)):void 0}function ci(e,t,n,r){var i=e.history;i.undone.length=0;var o,a=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>a-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=si(i,i.lastOp==r))){var l=Ii(o.changes);0==_o(t.from,t.to)&&0==_o(t.from,l.to)?l.to=Qo(t):o.changes.push(ai(e,t))}else{var s=Ii(i.done);for(s&&s.ranges||hi(e.sel,i.done),o={changes:[ai(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,l||Pa(e,"historyAdded")}function ui(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function fi(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||ui(e,o,Ii(i.done),t))?i.done[i.done.length-1]=t:hi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&r.clearRedo!==!1&&li(i.undone)}function hi(e,t){var n=Ii(t);n&&n.ranges&&n.equals(e)||t.push(e)}function di(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o})}function pi(e){if(!e)return null;for(var t,n=0;n-1&&(Ii(l)[f]=u[f],delete u[f])}}}return i}function vi(e,t,n,r){n0?r.slice():Oa:r||Oa}function Ci(e,t){function n(e){return function(){e.apply(null,o)}}var r=Si(e,t,!1);if(r.length){var i,o=Array.prototype.slice.call(arguments,2);Go?i=Go.delayedCallbacks:Ra?i=Ra:(i=Ra=[],setTimeout(Li,0));for(var a=0;a0}function Ai(e){e.prototype.on=function(e,t){Ea(this,e,t)},e.prototype.off=function(e,t){Ia(this,e,t)}}function Ei(){this.id=null}function Oi(e){for(;ja.length<=e;)ja.push(Ii(ja)+" ");return ja[e]}function Ii(e){return e[e.length-1]}function Pi(e,t){for(var n=0;n-1&&Ya(e)?!0:t.test(e):Ya(e)}function Fi(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function zi(e){return e.charCodeAt(0)>=768&&$a.test(e)}function ji(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o0;--t)e.removeChild(e.firstChild);return e}function qi(e,t){return Ui(e).appendChild(t)}function Gi(){for(var e=document.activeElement;e&&e.root&&e.root.activeElement;)e=e.root.activeElement;return e}function Yi(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function $i(e,t){for(var n=e.split(" "),r=0;r2&&!(xo&&8>bo))}var n=Ka?ji("span","​"):ji("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Ji(e){if(null!=Xa)return Xa;var t=qi(e,document.createTextNode("AخA")),n=qa(t,0,1).getBoundingClientRect();if(!n||n.left==n.right)return!1;var r=qa(t,1,2).getBoundingClientRect();return Xa=r.right-n.right<3}function Qi(e){if(null!=il)return il;var t=qi(e,ji("span","x")),n=t.getBoundingClientRect(),r=qa(t,0,1).getBoundingClientRect();return il=Math.abs(n.left-r.left)>1}function eo(e,t,n,r){if(!e)return r(t,n,"ltr");for(var i=!1,o=0;ot||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr"),i=!0)}i||r(t,n,"ltr")}function to(e){return e.level%2?e.to:e.from}function no(e){return e.level%2?e.from:e.to}function ro(e){var t=ii(e);return t?to(t[0]):0}function io(e){var t=ii(e);return t?no(Ii(t)):e.text.length}function oo(e,t){var n=Zr(e.doc,t),r=yr(n);r!=n&&(t=ti(r));var i=ii(r),o=i?i[0].level%2?io(r):ro(r):0;return Bo(t,o)}function ao(e,t){for(var n,r=Zr(e.doc,t);n=gr(r);)r=n.find(1,!0).line,t=null;var i=ii(r),o=i?i[0].level%2?ro(r):io(r):r.text.length;return Bo(null==t?ti(r):t,o)}function lo(e,t){var n=oo(e,t.line),r=Zr(e.doc,n.line),i=ii(r);if(!i||0==i[0].level){var o=Math.max(0,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=o&&t.ch;return Bo(n.line,a?0:o)}return n}function so(e,t,n){var r=e[0].level;return t==r?!0:n==r?!1:n>t}function co(e,t){al=null;for(var n,r=0;rt)return r;if(i.from==t||i.to==t){if(null!=n)return so(e,i.level,e[n].level)?(i.from!=i.to&&(al=n),r):(i.from!=i.to&&(al=r),n);n=r}}return n}function uo(e,t,n,r){if(!r)return t+n;do t+=n;while(t>0&&zi(e.text.charAt(t)));return t}function fo(e,t,n,r){var i=ii(e);if(!i)return ho(e,t,n,r);for(var o=co(i,t),a=i[o],l=uo(e,t,a.level%2?-n:n,r);;){if(l>a.from&&l0==a.level%2?a.to:a.from);if(a=i[o+=n],!a)return null;l=n>0==a.level%2?uo(e,a.to,-1,r):uo(e,a.from,1,r)}}function ho(e,t,n,r){var i=t+n;if(r)for(;i>0&&zi(e.text.charAt(i));)i+=n;return 0>i||i>e.text.length?null:i}var po=navigator.userAgent,mo=navigator.platform,go=/gecko\/\d/i.test(po),vo=/MSIE \d/.test(po),yo=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(po),xo=vo||yo,bo=xo&&(vo?document.documentMode||6:yo[1]),wo=/WebKit\//.test(po),ko=wo&&/Qt\/\d+\.\d+/.test(po),So=/Chrome\//.test(po),Co=/Opera\//.test(po),Lo=/Apple Computer/.test(navigator.vendor),To=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(po),Mo=/PhantomJS/.test(po),No=/AppleWebKit/.test(po)&&/Mobile\/\w+/.test(po),Ao=No||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(po),Eo=No||/Mac/.test(mo),Oo=/\bCrOS\b/.test(po),Io=/win/i.test(mo),Po=Co&&po.match(/Version\/(\d*\.\d*)/);Po&&(Po=Number(Po[1])),Po&&Po>=15&&(Co=!1,wo=!0);var Ro=Eo&&(ko||Co&&(null==Po||12.11>Po)),Do=go||xo&&bo>=9,Ho=!1,Wo=!1;m.prototype=Wi({update:function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=e.scrollWidth-e.clientWidth+o+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},setScrollLeft:function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz)},setScrollTop:function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert)},zeroWidthHack:function(){var e=Eo&&!To?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Ei,this.disableVert=new Ei},enableZeroWidthBar:function(e,t){function n(){var r=e.getBoundingClientRect(),i=document.elementFromPoint(r.left+1,r.bottom-1);i!=e?e.style.pointerEvents="none":t.set(1e3,n)}e.style.pointerEvents="auto",t.set(1e3,n)},clear:function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)}},m.prototype),g.prototype=Wi({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},g.prototype),e.scrollbarModel={"native":m,"null":g},L.prototype.signal=function(e,t){Ni(e,t)&&this.events.push(arguments)},L.prototype.finish=function(){for(var e=0;e=9&&n.hasSelection&&(n.hasSelection=null),n.poll()}),Ea(o,"paste",function(e){Ti(r,e)||J(e,r)||(r.state.pasteIncoming=!0,n.fastPoll())}),Ea(o,"cut",t),Ea(o,"copy",t),Ea(e.scroller,"paste",function(t){Gt(e,t)||Ti(r,t)||(r.state.pasteIncoming=!0,n.focus())}),Ea(e.lineSpace,"selectstart",function(t){Gt(e,t)||Ma(t)}),Ea(o,"compositionstart",function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}}),Ea(o,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},prepareSelection:function(){var e=this.cm,t=e.display,n=e.doc,r=De(e);if(e.options.moveInputWithCursor){var i=dt(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},showSelection:function(e){var t=this.cm,n=t.display;qi(n.cursorDiv,e.cursors),qi(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},reset:function(e){if(!this.contextMenuPending){var t,n,r=this.cm,i=r.doc;if(r.somethingSelected()){this.prevInput="";var o=i.sel.primary();t=rl&&(o.to().line-o.from().line>100||(n=r.getSelection()).length>1e3);var a=t?"-":n||r.getSelection();this.textarea.value=a,r.state.focused&&Ua(this.textarea),xo&&bo>=9&&(this.hasSelection=a)}else e||(this.prevInput=this.textarea.value="",xo&&bo>=9&&(this.hasSelection=null));this.inaccurateSelection=t}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!Ao||Gi()!=this.textarea))try{this.textarea.focus()}catch(e){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0; -},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var e=this;e.pollingFast||e.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},fastPoll:function(){function e(){var r=n.poll();r||t?(n.pollingFast=!1,n.slowPoll()):(t=!0,n.polling.set(60,e))}var t=!1,n=this;n.pollingFast=!0,n.polling.set(20,e)},poll:function(){var e=this.cm,t=this.textarea,n=this.prevInput;if(this.contextMenuPending||!e.state.focused||nl(t)&&!n&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var r=t.value;if(r==n&&!e.somethingSelected())return!1;if(xo&&bo>=9&&this.hasSelection===r||Eo&&/[\uf700-\uf7ff]/.test(r))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var i=r.charCodeAt(0);if(8203!=i||n||(n="​"),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var o=0,a=Math.min(n.length,r.length);a>o&&n.charCodeAt(o)==r.charCodeAt(o);)++o;var l=this;return At(e,function(){Z(e,r.slice(o),n.length-o,null,l.composing?"*compose":null),r.length>1e3||r.indexOf("\n")>-1?t.value=l.prevInput="":l.prevInput=r,l.composing&&(l.composing.range.clear(),l.composing.range=e.markText(l.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){xo&&bo>=9&&(this.hasSelection=null),this.fastPoll()},onContextMenu:function(e){function t(){if(null!=a.selectionStart){var e=i.somethingSelected(),t="​"+(e?a.value:"");a.value="⇚",a.value=t,r.prevInput=e?"":"​",a.selectionStart=1,a.selectionEnd=t.length,o.selForContextMenu=i.doc.sel}}function n(){if(r.contextMenuPending=!1,r.wrapper.style.cssText=f,a.style.cssText=u,xo&&9>bo&&o.scrollbars.setScrollTop(o.scroller.scrollTop=s),null!=a.selectionStart){(!xo||xo&&9>bo)&&t();var e=0,n=function(){o.selForContextMenu==i.doc.sel&&0==a.selectionStart&&a.selectionEnd>0&&"​"==r.prevInput?Et(i,ua.selectAll)(i):e++<10?o.detectingSelectAll=setTimeout(n,500):o.input.reset()};o.detectingSelectAll=setTimeout(n,200)}}var r=this,i=r.cm,o=i.display,a=r.textarea,l=Yt(i,e),s=o.scroller.scrollTop;if(l&&!Co){var c=i.options.resetSelectionOnContextMenu;c&&-1==i.doc.sel.contains(l)&&Et(i,Te)(i.doc,de(l),Wa);var u=a.style.cssText,f=r.wrapper.style.cssText;r.wrapper.style.cssText="position: absolute";var h=r.wrapper.getBoundingClientRect();if(a.style.cssText="position: absolute; width: 30px; height: 30px; top: "+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+"px; z-index: 1000; background: "+(xo?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",wo)var d=window.scrollY;if(o.input.focus(),wo&&window.scrollTo(null,d),o.input.reset(),i.somethingSelected()||(a.value=r.prevInput=" "),r.contextMenuPending=!0,o.selForContextMenu=i.doc.sel,clearTimeout(o.detectingSelectAll),xo&&bo>=9&&t(),Do){Aa(e);var p=function(){Ia(window,"mouseup",p),setTimeout(n,20)};Ea(window,"mouseup",p)}else setTimeout(n,50)}},readOnlyChanged:function(e){e||this.reset()},setUneditable:Di,needsContentAttribute:!1},ne.prototype),ie.prototype=Wi({init:function(e){function t(e){if(!Ti(r,e)){if(r.somethingSelected())Fo={lineWise:!1,text:r.getSelections()},"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var t=ee(r);Fo={lineWise:!0,text:t.text},"cut"==e.type&&r.operation(function(){r.setSelections(t.ranges,0,Wa),r.replaceSelection("",null,"cut")})}if(e.clipboardData&&!No)e.preventDefault(),e.clipboardData.clearData(),e.clipboardData.setData("text/plain",Fo.text.join("\n"));else{var n=re(),i=n.firstChild;r.display.lineSpace.insertBefore(n,r.display.lineSpace.firstChild),i.value=Fo.text.join("\n");var o=document.activeElement;Ua(i),setTimeout(function(){r.display.lineSpace.removeChild(n),o.focus()},50)}}}var n=this,r=n.cm,i=n.div=e.lineDiv;te(i),Ea(i,"paste",function(e){Ti(r,e)||J(e,r)}),Ea(i,"compositionstart",function(e){var t=e.data;if(n.composing={sel:r.doc.sel,data:t,startData:t},t){var i=r.doc.sel.primary(),o=r.getLine(i.head.line),a=o.indexOf(t,Math.max(0,i.head.ch-t.length));a>-1&&a<=i.head.ch&&(n.composing.sel=de(Bo(i.head.line,a),Bo(i.head.line,a+t.length)))}}),Ea(i,"compositionupdate",function(e){n.composing.data=e.data}),Ea(i,"compositionend",function(e){var t=n.composing;t&&(e.data==t.startData||/\u200b/.test(e.data)||(t.data=e.data),setTimeout(function(){t.handled||n.applyComposition(t),n.composing==t&&(n.composing=null)},50))}),Ea(i,"touchstart",function(){n.forceCompositionEnd()}),Ea(i,"input",function(){n.composing||!r.isReadOnly()&&n.pollContent()||At(n.cm,function(){Dt(r)})}),Ea(i,"copy",t),Ea(i,"cut",t)},prepareSelection:function(){var e=De(this.cm,!1);return e.focus=this.cm.state.focused,e},showSelection:function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},showPrimarySelection:function(){var e=window.getSelection(),t=this.cm.doc.sel.primary(),n=le(this.cm,e.anchorNode,e.anchorOffset),r=le(this.cm,e.focusNode,e.focusOffset);if(!n||n.bad||!r||r.bad||0!=_o(K(n,r),t.from())||0!=_o(V(n,r),t.to())){var i=oe(this.cm,t.from()),o=oe(this.cm,t.to());if(i||o){var a=this.cm.display.view,l=e.rangeCount&&e.getRangeAt(0);if(i){if(!o){var s=a[a.length-1].measure,c=s.maps?s.maps[s.maps.length-1]:s.map;o={node:c[c.length-1],offset:c[c.length-2]-c[c.length-3]}}}else i={node:a[0].measure.map[2],offset:0};try{var u=qa(i.node,i.offset,o.offset,o.node)}catch(f){}u&&(!go&&this.cm.state.focused?(e.collapse(i.node,i.offset),u.collapsed||e.addRange(u)):(e.removeAllRanges(),e.addRange(u)),l&&null==e.anchorNode?e.addRange(l):go&&this.startGracePeriod()),this.rememberSelection()}}},startGracePeriod:function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){e.cm.curOp.selectionChanged=!0})},20)},showMultipleSelections:function(e){qi(this.cm.display.cursorDiv,e.cursors),qi(this.cm.display.selectionDiv,e.selection)},rememberSelection:function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},selectionInEditor:function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return Va(this.div,t)},focus:function(){"nocursor"!=this.cm.options.readOnly&&this.div.focus()},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return!0},receivedFocus:function(){function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}var t=this;this.selectionInEditor()?this.pollSelection():At(this.cm,function(){t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,e)},selectionChanged:function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;this.rememberSelection();var n=le(t,e.anchorNode,e.anchorOffset),r=le(t,e.focusNode,e.focusOffset);n&&r&&At(t,function(){Te(t.doc,de(n,r),Wa),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}},pollContent:function(){var e=this.cm,t=e.display,n=e.doc.sel.primary(),r=n.from(),i=n.to();if(r.linet.viewTo-1)return!1;var o;if(r.line==t.viewFrom||0==(o=Bt(e,r.line)))var a=ti(t.view[0].line),l=t.view[0].node;else var a=ti(t.view[o].line),l=t.view[o-1].node.nextSibling;var s=Bt(e,i.line);if(s==t.view.length-1)var c=t.viewTo-1,u=t.lineDiv.lastChild;else var c=ti(t.view[s+1].line)-1,u=t.view[s+1].node.previousSibling;for(var f=e.doc.splitLines(ce(e,l,u,a,c)),h=Jr(e.doc,Bo(a,0),Bo(c,Zr(e.doc,c).text.length));f.length>1&&h.length>1;)if(Ii(f)==Ii(h))f.pop(),h.pop(),c--;else{if(f[0]!=h[0])break;f.shift(),h.shift(),a++}for(var d=0,p=0,m=f[0],g=h[0],v=Math.min(m.length,g.length);v>d&&m.charCodeAt(d)==g.charCodeAt(d);)++d;for(var y=Ii(f),x=Ii(h),b=Math.min(y.length-(1==f.length?d:0),x.length-(1==h.length?d:0));b>p&&y.charCodeAt(y.length-p-1)==x.charCodeAt(x.length-p-1);)++p;f[f.length-1]=y.slice(0,y.length-p),f[0]=f[0].slice(d);var w=Bo(a,d),k=Bo(c,h.length?Ii(h).length-p:0);return f.length>1||f[0]||_o(w,k)?(In(e.doc,f,w,k,"+input"),!0):void 0},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){this.composing&&!this.composing.handled&&(this.applyComposition(this.composing),this.composing.handled=!0,this.div.blur(),this.div.focus())},applyComposition:function(e){this.cm.isReadOnly()?Et(this.cm,Dt)(this.cm):e.data&&e.data!=e.startData&&Et(this.cm,Z)(this.cm,e.data,0,e.sel)},setUneditable:function(e){e.contentEditable="false"},onKeyPress:function(e){e.preventDefault(),this.cm.isReadOnly()||Et(this.cm,Z)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0)},readOnlyChanged:function(e){this.div.contentEditable=String("nocursor"!=e)},onContextMenu:Di,resetPosition:Di,needsContentAttribute:!0},ie.prototype),e.inputStyles={textarea:ne,contenteditable:ie},ue.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t=0&&_o(e,r.to())<=0)return n}return-1}},fe.prototype={from:function(){return K(this.anchor,this.head)},to:function(){return V(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var zo,jo,Uo,qo={left:0,right:0,top:0,bottom:0},Go=null,Yo=0,$o=0,Vo=0,Ko=null;xo?Ko=-.53:go?Ko=15:So?Ko=-.7:Lo&&(Ko=-1/3);var Xo=function(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}};e.wheelEventPixels=function(e){var t=Xo(e);return t.x*=Ko,t.y*=Ko,t};var Zo=new Ei,Jo=null,Qo=e.changeEnd=function(e){return e.text?Bo(e.from.line+e.text.length-1,Ii(e.text).length+(1==e.text.length?e.from.ch:0)):e.to};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,t){var n=this.options,r=n[e];n[e]==t&&"mode"!=e||(n[e]=t,ta.hasOwnProperty(e)&&Et(this,ta[e])(this,t,r))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"]($n(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nn&&(Fn(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Bn(this));else{var o=i.from(),a=i.to(),l=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var s=l;n>s;++s)Fn(this,s,e);var c=this.doc.sel.ranges;0==o.ch&&t.length==c.length&&c[r].from().ch>0&&ke(this.doc,r,new fe(o,c[r].to()),Wa)}}}),getTokenAt:function(e,t){return Ir(this,e,t)},getLineTokens:function(e,t){return Ir(this,Bo(e),t,!0)},getTokenTypeAt:function(e){e=me(this.doc,e);var t,n=Dr(this,Zr(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]l?t:0==l?null:t.slice(0,l-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!la.hasOwnProperty(t))return n;var r=la[t],i=this.getModeAt(e);if("string"==typeof i[t])r[i[t]]&&n.push(r[i[t]]);else if(i[t])for(var o=0;oi&&(e=i,r=!0),n=Zr(this.doc,e)}else n=e;return ut(this,n,{top:0,left:0},t||"page").top+(r?this.doc.height-ri(n):0)},defaultTextHeight:function(){return yt(this.display)},defaultCharWidth:function(){return xt(this.display)},setGutterMarker:Ot(function(e,t,n){return zn(this.doc,e,"gutter",function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&Fi(r)&&(e.gutterMarkers=null),!0})}),clearGutter:Ot(function(e){var t=this,n=t.doc,r=n.first;n.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&(n.gutterMarkers[e]=null,Ht(t,r,"gutter"),Fi(n.gutterMarkers)&&(n.gutterMarkers=null)),++r})}),lineInfo:function(e){if("number"==typeof e){if(!ve(this.doc,e))return null;var t=e;if(e=Zr(this.doc,e),!e)return null}else{var t=ti(e);if(null==t)return null}return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display;e=dt(this,me(this.doc,e));var a=e.bottom,l=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)a=e.top;else if("above"==r||"near"==r){var s=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>s)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=s&&(a=e.bottom),l+t.offsetWidth>c&&(l=c-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(l=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?l=0:"middle"==i&&(l=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=l+"px"),n&&Dn(this,l,a,l+t.offsetWidth,a+t.offsetHeight)},triggerOnKeyDown:Ot(hn),triggerOnKeyPress:Ot(mn),triggerOnKeyUp:pn,execCommand:function(e){return ua.hasOwnProperty(e)?ua[e].call(null,this):void 0},triggerElectric:Ot(function(e){Q(this,e)}),findPosH:function(e,t,n,r){var i=1;0>t&&(i=-1,t=-t);for(var o=0,a=me(this.doc,e);t>o&&(a=Un(this.doc,a,i,n,r),!a.hitSide);++o);return a},moveH:Ot(function(e,t){var n=this;n.extendSelectionsBy(function(r){return n.display.shift||n.doc.extend||r.empty()?Un(n.doc,r.head,e,t,n.options.rtlMoveVisually):0>e?r.from():r.to()},_a)}),deleteH:Ot(function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):jn(this,function(n){var i=Un(r,n.head,e,t,!1);return 0>e?{from:i,to:n.head}:{from:n.head,to:i}})}),findPosV:function(e,t,n,r){var i=1,o=r;0>t&&(i=-1,t=-t);for(var a=0,l=me(this.doc,e);t>a;++a){var s=dt(this,l,"div");if(null==o?o=s.left:s.left=o,l=qn(this,s,i,n),l.hitSide)break}return l},moveV:Ot(function(e,t){var n=this,r=this.doc,i=[],o=!n.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy(function(a){if(o)return 0>e?a.from():a.to();var l=dt(n,a.head,"div");null!=a.goalColumn&&(l.left=a.goalColumn),i.push(l.left);var s=qn(n,l,e,t);return"page"==t&&a==r.sel.primary()&&Wn(n,null,ht(n,s,"div").top-l.top),s},_a),i.length)for(var a=0;a0&&l(n.charAt(r-1));)--r;for(;i.5)&&a(this),Pa(this,"refresh",this)}),swapDoc:Ot(function(e){var t=this.doc;return t.cm=null,Xr(this,e),lt(this),this.display.input.reset(),this.scrollTo(e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,Ci(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Ai(e);var ea=e.defaults={},ta=e.optionHandlers={},na=e.Init={toString:function(){return"CodeMirror.Init"}};Gn("value","",function(e,t){e.setValue(t)},!0),Gn("mode",null,function(e,t){e.doc.modeOption=t,n(e)},!0),Gn("indentUnit",2,n,!0),Gn("indentWithTabs",!1),Gn("smartIndent",!0),Gn("tabSize",4,function(e){r(e),lt(e),Dt(e)},!0),Gn("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(Bo(r,o))}r++});for(var i=n.length-1;i>=0;i--)In(e.doc,t,n[i],Bo(n[i].line,n[i].ch+t.length))}}),Gn("specialChars",/[\u0000-\u001f\u007f\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(t,n,r){t.state.specialChars=new RegExp(n.source+(n.test(" ")?"":"| "),"g"),r!=e.Init&&t.refresh()}),Gn("specialCharPlaceholder",_r,function(e){e.refresh()},!0),Gn("electricChars",!0),Gn("inputStyle",Ao?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),Gn("rtlMoveVisually",!Io),Gn("wholeLineUpdateBefore",!0),Gn("theme","default",function(e){l(e),s(e)},!0),Gn("keyMap","default",function(t,n,r){var i=$n(n),o=r!=e.Init&&$n(r);o&&o.detach&&o.detach(t,i),i.attach&&i.attach(t,o||null)}),Gn("extraKeys",null),Gn("lineWrapping",!1,i,!0),Gn("gutters",[],function(e){d(e.options),s(e)},!0),Gn("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?C(e.display)+"px":"0",e.refresh()},!0),Gn("coverGutterNextToScrollbar",!1,function(e){y(e)},!0),Gn("scrollbarStyle","native",function(e){v(e),y(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),Gn("lineNumbers",!1,function(e){d(e.options),s(e)},!0),Gn("firstLineNumber",1,s,!0),Gn("lineNumberFormatter",function(e){return e},s,!0),Gn("showCursorWhenSelecting",!1,Re,!0),Gn("resetSelectionOnContextMenu",!0),Gn("lineWiseCopyCut",!0),Gn("readOnly",!1,function(e,t){"nocursor"==t?(yn(e),e.display.input.blur(),e.display.disabled=!0):e.display.disabled=!1,e.display.input.readOnlyChanged(t)}),Gn("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),Gn("dragDrop",!0,Ut),Gn("allowDropFileTypes",null),Gn("cursorBlinkRate",530),Gn("cursorScrollMargin",0),Gn("cursorHeight",1,Re,!0),Gn("singleCursorHeightPerLine",!0,Re,!0),Gn("workTime",100),Gn("workDelay",100),Gn("flattenSpans",!0,r,!0),Gn("addModeClass",!1,r,!0),Gn("pollInterval",100),Gn("undoDepth",200,function(e,t){e.doc.history.undoDepth=t}),Gn("historyEventDelay",1250),Gn("viewportMargin",10,function(e){e.refresh()},!0),Gn("maxHighlightLength",1e4,r,!0),Gn("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),Gn("tabindex",null,function(e,t){e.display.input.getField().tabIndex=t||""}),Gn("autofocus",null);var ra=e.modes={},ia=e.mimeModes={};e.defineMode=function(t,n){e.defaults.mode||"null"==t||(e.defaults.mode=t),arguments.length>2&&(n.dependencies=Array.prototype.slice.call(arguments,2)),ra[t]=n},e.defineMIME=function(e,t){ia[e]=t},e.resolveMode=function(t){if("string"==typeof t&&ia.hasOwnProperty(t))t=ia[t];else if(t&&"string"==typeof t.name&&ia.hasOwnProperty(t.name)){var n=ia[t.name];"string"==typeof n&&(n={name:n}),t=Hi(n,t),t.name=n.name}else if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return e.resolveMode("application/xml");return"string"==typeof t?{name:t}:t||{name:"null"}},e.getMode=function(t,n){var n=e.resolveMode(n),r=ra[n.name];if(!r)return e.getMode(t,"text/plain");var i=r(t,n);if(oa.hasOwnProperty(n.name)){var o=oa[n.name];for(var a in o)o.hasOwnProperty(a)&&(i.hasOwnProperty(a)&&(i["_"+a]=i[a]),i[a]=o[a])}if(i.name=n.name,n.helperType&&(i.helperType=n.helperType),n.modeProps)for(var a in n.modeProps)i[a]=n.modeProps[a];return i},e.defineMode("null",function(){return{token:function(e){e.skipToEnd()}}}),e.defineMIME("text/plain","null");var oa=e.modeExtensions={};e.extendMode=function(e,t){var n=oa.hasOwnProperty(e)?oa[e]:oa[e]={};Wi(t,n)},e.defineExtension=function(t,n){e.prototype[t]=n},e.defineDocExtension=function(e,t){Ca.prototype[e]=t},e.defineOption=Gn;var aa=[];e.defineInitHook=function(e){aa.push(e)};var la=e.helpers={};e.registerHelper=function(t,n,r){la.hasOwnProperty(t)||(la[t]=e[t]={_global:[]}),la[t][n]=r},e.registerGlobalHelper=function(t,n,r,i){e.registerHelper(t,n,i),la[t]._global.push({pred:r,val:i})};var sa=e.copyState=function(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n},ca=e.startState=function(e,t,n){return e.startState?e.startState(t,n):!0};e.innerMode=function(e,t){for(;e.innerMode;){var n=e.innerMode(t);if(!n||n.mode==e)break;t=n.state,e=n.mode}return n||{mode:e,state:t}};var ua=e.commands={selectAll:function(e){e.setSelection(Bo(e.firstLine(),0),Bo(e.lastLine()),Wa)},singleSelection:function(e){e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Wa)},killLine:function(e){jn(e,function(t){if(t.empty()){var n=Zr(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new Bo(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),Bo(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=Zr(e.doc,i.line-1).text;a&&e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),Bo(i.line-1,a.length-1),Bo(i.line,1),"+transpose")}n.push(new fe(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){At(e,function(){for(var t=e.listSelections().length,n=0;t>n;n++){var r=e.listSelections()[n];e.replaceRange(e.doc.lineSeparator(),r.anchor,r.head,"+input"),e.indentLine(r.from().line+1,null,!0)}Bn(e)})},openLine:function(e){e.replaceSelection("\n","start")},toggleOverwrite:function(e){e.toggleOverwrite()}},fa=e.keyMap={};fa.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},fa.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},fa.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},fa.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},fa["default"]=Eo?fa.macDefault:fa.pcDefault,e.normalizeKeyMap=function(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=Ri(n.split(" "),Yn),o=0;o=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){return this.post},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);return t>-1?(this.pos=t,!0):void 0},backUp:function(e){this.pos-=e},column:function(){return this.lastColumnPos0?null:(r&&t!==!1&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);return i(o)==i(e)?(t!==!1&&(this.pos+=e.length),!0):void 0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}};var ga=0,va=e.TextMarker=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ga};Ai(va),va.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&bt(e),Ni(this,"clear")){var n=this.find();n&&Ci(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=s,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&Dt(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Ae(e.doc)),e&&Ci(e,"markerCleared",e,this),t&&kt(e),this.parent&&this.parent.clear()}},va.prototype.find=function(e,t){null==e&&"bookmark"==this.type&&(e=1);for(var n,r,i=0;in;++n){var i=this.lines[n];this.height-=i.height,Nr(i),Ci(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;re;++e)if(n(this.lines[e]))return!0}},Vr.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;ne){var o=Math.min(t,i-e),a=r.height;if(r.removeInner(e,o),this.height-=a-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof $r))){var l=[];this.collapse(l),this.children=[new $r(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t=e){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(var a=i.lines.length%25+25,l=a;l10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;re){var a=Math.min(t,o-e);if(i.iterN(e,a,n))return!0;if(0==(t-=a))break;e=0}else e-=o}}};var Sa=0,Ca=e.Doc=function(e,t,n,r){if(!(this instanceof Ca))return new Ca(e,t,n,r);null==n&&(n=0),Vr.call(this,[new $r([new ba("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=n;var i=Bo(n,0);this.sel=de(i),this.history=new oi(null),this.id=++Sa,this.modeOption=t,this.lineSep=r,this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Yr(this,{from:i,to:i,text:e}),Te(this,de(i),Wa)};Ca.prototype=Hi(Vr.prototype,{constructor:Ca,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r=0;o--)Tn(this,r[o]);l?Le(this,l):this.cm&&Bn(this.cm)}),undo:It(function(){Nn(this,"undo")}),redo:It(function(){Nn(this,"redo")}),undoSelection:It(function(){Nn(this,"undo",!0)}),redoSelection:It(function(){Nn(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=me(this,e),t=me(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var a=o.markedSpans;if(a)for(var l=0;l=s.to||null==s.from&&i!=e.line||null!=s.from&&i==t.line&&s.from>=t.ch||n&&!n(s.marker)||r.push(s.marker.parent||s.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re?(t=e,!0):(e-=o,void++n)}),me(this,Bo(n,t))},indexFromPos:function(e){e=me(this,e);var t=e.ch;if(e.linet&&(t=e.from),null!=e.to&&e.tol||l>=t)return a+(t-o);a+=l-o,a+=n-a%n,o=l+1}},za=e.findColumn=function(e,t,n){for(var r=0,i=0;;){var o=e.indexOf(" ",r);-1==o&&(o=e.length);var a=o-r;if(o==e.length||i+a>=t)return r+Math.min(a,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}},ja=[""],Ua=function(e){e.select()};No?Ua=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:xo&&(Ua=function(e){try{e.select()}catch(t){}});var qa,Ga=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Ya=e.isWordChar=function(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||Ga.test(e))},$a=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;qa=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(i){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var Va=e.contains=function(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do if(11==t.nodeType&&(t=t.host),t==e)return!0;while(t=t.parentNode)};xo&&11>bo&&(Gi=function(){try{return document.activeElement}catch(e){return document.body}});var Ka,Xa,Za=e.rmClass=function(e,t){var n=e.className,r=Yi(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}},Ja=e.addClass=function(e,t){var n=e.className;Yi(t).test(n)||(e.className+=(n?" ":"")+t)},Qa=!1,el=function(){if(xo&&9>bo)return!1;var e=ji("div");return"draggable"in e||"dragDrop"in e}(),tl=e.splitLines=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;r>=t;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},nl=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){try{var t=e.ownerDocument.selection.createRange()}catch(n){}return t&&t.parentElement()==e?0!=t.compareEndPoints("StartToEnd",t):!1},rl=function(){var e=ji("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),il=null,ol=e.keyNames={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};!function(){for(var e=0;10>e;e++)ol[e+48]=ol[e+96]=String(e);for(var e=65;90>=e;e++)ol[e]=String.fromCharCode(e);for(var e=1;12>=e;e++)ol[e+111]=ol[e+63235]="F"+e}();var al,ll=function(){function e(e){return 247>=e?n.charAt(e):e>=1424&&1524>=e?"R":e>=1536&&1773>=e?r.charAt(e-1536):e>=1774&&2220>=e?"r":e>=8192&&8203>=e?"w":8204==e?"b":"L"}function t(e,t,n){this.level=e,this.from=t,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,a=/[LRr]/,l=/[Lb1n]/,s=/[1n]/,c="L";return function(n){if(!i.test(n))return!1;for(var r,u=n.length,f=[],h=0;u>h;++h)f.push(r=e(n.charCodeAt(h)));for(var h=0,d=c;u>h;++h){var r=f[h];"m"==r?f[h]=d:d=r}for(var h=0,p=c;u>h;++h){var r=f[h];"1"==r&&"r"==p?f[h]="n":a.test(r)&&(p=r,"r"==r&&(f[h]="R"))}for(var h=1,d=f[0];u-1>h;++h){var r=f[h];"+"==r&&"1"==d&&"1"==f[h+1]?f[h]="1":","!=r||d!=f[h+1]||"1"!=d&&"n"!=d||(f[h]=d),d=r}for(var h=0;u>h;++h){var r=f[h];if(","==r)f[h]="N";else if("%"==r){for(var m=h+1;u>m&&"%"==f[m];++m);for(var g=h&&"!"==f[h-1]||u>m&&"1"==f[m]?"1":"N",v=h;m>v;++v)f[v]=g;h=m-1}}for(var h=0,p=c;u>h;++h){var r=f[h];"L"==p&&"1"==r?f[h]="L":a.test(r)&&(p=r)}for(var h=0;u>h;++h)if(o.test(f[h])){for(var m=h+1;u>m&&o.test(f[m]);++m);for(var y="L"==(h?f[h-1]:c),x="L"==(u>m?f[m]:c),g=y||x?"L":"R",v=h;m>v;++v)f[v]=g;h=m-1}for(var b,w=[],h=0;u>h;)if(l.test(f[h])){var k=h;for(++h;u>h&&l.test(f[h]);++h);w.push(new t(0,k,h))}else{var S=h,C=w.length;for(++h;u>h&&"L"!=f[h];++h);for(var v=S;h>v;)if(s.test(f[v])){v>S&&w.splice(C,0,new t(1,S,v));var L=v;for(++v;h>v&&s.test(f[v]);++v);w.splice(C,0,new t(2,L,v)),S=v}else++v;h>S&&w.splice(C,0,new t(1,S,h))}return 1==w[0].level&&(b=n.match(/^\s+/))&&(w[0].from=b[0].length,w.unshift(new t(0,0,b[0].length))),1==Ii(w).level&&(b=n.match(/\s+$/))&&(Ii(w).to-=b[0].length,w.push(new t(0,u-b[0].length,u))),2==w[0].level&&w.unshift(new t(1,w[0].to,w[0].to)),w[0].level!=Ii(w).level&&w.push(new t(w[0].level,u,u)),w}}();return e.version="5.15.2",e})},{}],11:[function(t,n,r){!function(i){"object"==typeof r&&"object"==typeof n?i(t("../../lib/codemirror"),t("../markdown/markdown"),t("../../addon/mode/overlay")):"function"==typeof e&&e.amd?e(["../../lib/codemirror","../markdown/markdown","../../addon/mode/overlay"],i):i(CodeMirror)}(function(e){"use strict";var t=/^((?:(?:aaas?|about|acap|adiumxtra|af[ps]|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|cap|chrome(?:-extension)?|cid|coap|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-(?:playcontainer|playsingle)|dns|doi|dtn|dvb|ed2k|facetime|feed|file|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|hcp|https?|iax|icap|icon|im|imap|info|ipn|ipp|irc[6s]?|iris(?:\.beep|\.lwz|\.xpc|\.xpcs)?|itms|jar|javascript|jms|keyparc|lastfm|ldaps?|magnet|mailto|maps|market|message|mid|mms|ms-help|msnim|msrps?|mtqp|mumble|mupdate|mvn|news|nfs|nih?|nntp|notes|oid|opaquelocktoken|palm|paparazzi|platform|pop|pres|proxy|psyc|query|res(?:ource)?|rmi|rsync|rtmp|rtsp|secondlife|service|session|sftp|sgn|shttp|sieve|sips?|skype|sm[bs]|snmp|soap\.beeps?|soldat|spotify|ssh|steam|svn|tag|teamspeak|tel(?:net)?|tftp|things|thismessage|tip|tn3270|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|view-source|webcal|wss?|wtai|wyciwyg|xcon(?:-userid)?|xfire|xmlrpc\.beeps?|xmpp|xri|ymsgr|z39\.50[rs]?):(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i;e.defineMode("gfm",function(n,r){function i(e){return e.code=!1,null}var o=0,a={startState:function(){return{code:!1,codeBlock:!1,ateSpace:!1}},copyState:function(e){return{code:e.code,codeBlock:e.codeBlock,ateSpace:e.ateSpace}},token:function(e,n){if(n.combineTokens=null,n.codeBlock)return e.match(/^```+/)?(n.codeBlock=!1,null):(e.skipToEnd(),null);if(e.sol()&&(n.code=!1),e.sol()&&e.match(/^```+/))return e.skipToEnd(),n.codeBlock=!0,null;if("`"===e.peek()){e.next();var i=e.pos;e.eatWhile("`");var a=1+e.pos-i;return n.code?a===o&&(n.code=!1):(o=a,n.code=!0),null}if(n.code)return e.next(),null;if(e.eatSpace())return n.ateSpace=!0,null;if((e.sol()||n.ateSpace)&&(n.ateSpace=!1,r.gitHubSpice!==!1)){if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?:[a-f0-9]{7,40}\b)/))return n.combineTokens=!0,"link";if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return n.combineTokens=!0,"link"}return e.match(t)&&"]("!=e.string.slice(e.start-2,e.start)&&(0==e.start||/\W/.test(e.string.charAt(e.start-1)))?(n.combineTokens=!0,"link"):(e.next(),null)},blankLine:i},l={underscoresBreakWords:!1,taskLists:!0,fencedCodeBlocks:"```",strikethrough:!0};for(var s in r)l[s]=r[s];return l.name="markdown",e.overlayMode(e.getMode(n,l),a)},"markdown"),e.defineMIME("text/x-gfm","gfm")})},{"../../addon/mode/overlay":8,"../../lib/codemirror":10,"../markdown/markdown":12}],12:[function(t,n,r){!function(i){"object"==typeof r&&"object"==typeof n?i(t("../../lib/codemirror"),t("../xml/xml"),t("../meta")):"function"==typeof e&&e.amd?e(["../../lib/codemirror","../xml/xml","../meta"],i):i(CodeMirror)}(function(e){"use strict";e.defineMode("markdown",function(t,n){function r(n){if(e.findModeByName){var r=e.findModeByName(n);r&&(n=r.mime||r.mimes[0])}var i=e.getMode(t,n);return"null"==i.name?null:i}function i(e,t,n){return t.f=t.inline=n,n(e,t)}function o(e,t,n){return t.f=t.block=n,n(e,t)}function a(e){return!e||!/\S/.test(e.string)}function l(e){return e.linkTitle=!1,e.em=!1,e.strong=!1,e.strikethrough=!1,e.quote=0,e.indentedCode=!1,k&&e.f==c&&(e.f=p,e.block=s),e.trailingSpace=0,e.trailingSpaceNewLine=!1,e.prevLine=e.thisLine,e.thisLine=null,null}function s(t,o){var l=t.sol(),s=o.list!==!1,c=o.indentedCode;o.indentedCode=!1,s&&(o.indentationDiff>=0?(o.indentationDiff<4&&(o.indentation-=o.indentationDiff),o.list=null):o.indentation>0?o.list=null:o.list=!1);var f=null;if(o.indentationDiff>=4)return t.skipToEnd(),c||a(o.prevLine)?(o.indentation-=4,o.indentedCode=!0,S.code):null;if(t.eatSpace())return null;if((f=t.match(A))&&f[1].length<=6)return o.header=f[1].length,n.highlightFormatting&&(o.formatting="header"),o.f=o.inline,h(o);if(!(a(o.prevLine)||o.quote||s||c)&&(f=t.match(E)))return o.header="="==f[0].charAt(0)?1:2,n.highlightFormatting&&(o.formatting="header"),o.f=o.inline,h(o);if(t.eat(">"))return o.quote=l?1:o.quote+1,n.highlightFormatting&&(o.formatting="quote"),t.eatSpace(),h(o);if("["===t.peek())return i(t,o,y);if(t.match(L,!0))return o.hr=!0,S.hr;if((a(o.prevLine)||s)&&(t.match(T,!1)||t.match(M,!1))){var d=null;for(t.match(T,!0)?d="ul":(t.match(M,!0),d="ol"),o.indentation=t.column()+t.current().length,o.list=!0;o.listStack&&t.column()")>-1)&&(n.f=p,n.block=s,n.htmlState=null)}return r}function u(e,t){return t.fencedChars&&e.match(t.fencedChars,!1)?(t.localMode=t.localState=null,t.f=t.block=f,null):t.localMode?t.localMode.token(e,t.localState):(e.skipToEnd(),S.code)}function f(e,t){e.match(t.fencedChars),t.block=s,t.f=p,t.fencedChars=null,n.highlightFormatting&&(t.formatting="code-block"),t.code=1;var r=h(t);return t.code=0,r}function h(e){var t=[];if(e.formatting){t.push(S.formatting),"string"==typeof e.formatting&&(e.formatting=[e.formatting]);for(var r=0;r=e.quote?t.push(S.formatting+"-"+e.formatting[r]+"-"+e.quote):t.push("error"))}if(e.taskOpen)return t.push("meta"),t.length?t.join(" "):null;if(e.taskClosed)return t.push("property"),t.length?t.join(" "):null;if(e.linkHref?t.push(S.linkHref,"url"):(e.strong&&t.push(S.strong),e.em&&t.push(S.em),e.strikethrough&&t.push(S.strikethrough),e.linkText&&t.push(S.linkText),e.code&&t.push(S.code)),e.header&&t.push(S.header,S.header+"-"+e.header),e.quote&&(t.push(S.quote),!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(S.quote+"-"+e.quote):t.push(S.quote+"-"+n.maxBlockquoteDepth)),e.list!==!1){var i=(e.listStack.length-1)%3;i?1===i?t.push(S.list2):t.push(S.list3):t.push(S.list1)}return e.trailingSpaceNewLine?t.push("trailing-space-new-line"):e.trailingSpace&&t.push("trailing-space-"+(e.trailingSpace%2?"a":"b")),t.length?t.join(" "):null}function d(e,t){return e.match(O,!0)?h(t):void 0}function p(t,r){var i=r.text(t,r);if("undefined"!=typeof i)return i;if(r.list)return r.list=null,h(r);if(r.taskList){var a="x"!==t.match(N,!0)[1];return a?r.taskOpen=!0:r.taskClosed=!0,n.highlightFormatting&&(r.formatting="task"),r.taskList=!1,h(r)}if(r.taskOpen=!1,r.taskClosed=!1,r.header&&t.match(/^#+$/,!0))return n.highlightFormatting&&(r.formatting="header"), -h(r);var l=t.sol(),s=t.next();if(r.linkTitle){r.linkTitle=!1;var u=s;"("===s&&(u=")"),u=(u+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");var f="^\\s*(?:[^"+u+"\\\\]+|\\\\\\\\|\\\\.)"+u;if(t.match(new RegExp(f),!0))return S.linkHref}if("`"===s){var d=r.formatting;n.highlightFormatting&&(r.formatting="code"),t.eatWhile("`");var p=t.current().length;if(0==r.code)return r.code=p,h(r);if(p==r.code){var v=h(r);return r.code=0,v}return r.formatting=d,h(r)}if(r.code)return h(r);if("\\"===s&&(t.next(),n.highlightFormatting)){var y=h(r),x=S.formatting+"-escape";return y?y+" "+x:x}if("!"===s&&t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return t.match(/\[[^\]]*\]/),r.inline=r.f=g,S.image;if("["===s&&t.match(/[^\]]*\](\(.*\)| ?\[.*?\])/,!1))return r.linkText=!0,n.highlightFormatting&&(r.formatting="link"),h(r);if("]"===s&&r.linkText&&t.match(/\(.*?\)| ?\[.*?\]/,!1)){n.highlightFormatting&&(r.formatting="link");var y=h(r);return r.linkText=!1,r.inline=r.f=g,y}if("<"===s&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){r.f=r.inline=m,n.highlightFormatting&&(r.formatting="link");var y=h(r);return y?y+=" ":y="",y+S.linkInline}if("<"===s&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){r.f=r.inline=m,n.highlightFormatting&&(r.formatting="link");var y=h(r);return y?y+=" ":y="",y+S.linkEmail}if("<"===s&&t.match(/^(!--|\w)/,!1)){var b=t.string.indexOf(">",t.pos);if(-1!=b){var k=t.string.substring(t.start,b);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(k)&&(r.md_inside=!0)}return t.backUp(1),r.htmlState=e.startState(w),o(t,r,c)}if("<"===s&&t.match(/^\/\w*?>/))return r.md_inside=!1,"tag";var C=!1;if(!n.underscoresBreakWords&&"_"===s&&"_"!==t.peek()&&t.match(/(\w)/,!1)){var L=t.pos-2;if(L>=0){var T=t.string.charAt(L);"_"!==T&&T.match(/(\w)/,!1)&&(C=!0)}}if("*"===s||"_"===s&&!C)if(l&&" "===t.peek());else{if(r.strong===s&&t.eat(s)){n.highlightFormatting&&(r.formatting="strong");var v=h(r);return r.strong=!1,v}if(!r.strong&&t.eat(s))return r.strong=s,n.highlightFormatting&&(r.formatting="strong"),h(r);if(r.em===s){n.highlightFormatting&&(r.formatting="em");var v=h(r);return r.em=!1,v}if(!r.em)return r.em=s,n.highlightFormatting&&(r.formatting="em"),h(r)}else if(" "===s&&(t.eat("*")||t.eat("_"))){if(" "===t.peek())return h(r);t.backUp(1)}if(n.strikethrough)if("~"===s&&t.eatWhile(s)){if(r.strikethrough){n.highlightFormatting&&(r.formatting="strikethrough");var v=h(r);return r.strikethrough=!1,v}if(t.match(/^[^\s]/,!1))return r.strikethrough=!0,n.highlightFormatting&&(r.formatting="strikethrough"),h(r)}else if(" "===s&&t.match(/^~~/,!0)){if(" "===t.peek())return h(r);t.backUp(2)}return" "===s&&(t.match(/ +$/,!1)?r.trailingSpace++:r.trailingSpace&&(r.trailingSpaceNewLine=!0)),h(r)}function m(e,t){var r=e.next();if(">"===r){t.f=t.inline=p,n.highlightFormatting&&(t.formatting="link");var i=h(t);return i?i+=" ":i="",i+S.linkInline}return e.match(/^[^>]+/,!0),S.linkInline}function g(e,t){if(e.eatSpace())return null;var r=e.next();return"("===r||"["===r?(t.f=t.inline=v("("===r?")":"]",0),n.highlightFormatting&&(t.formatting="link-string"),t.linkHref=!0,h(t)):"error"}function v(e){return function(t,r){var i=t.next();if(i===e){r.f=r.inline=p,n.highlightFormatting&&(r.formatting="link-string");var o=h(r);return r.linkHref=!1,o}return t.match(P[e]),r.linkHref=!0,h(r)}}function y(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=x,e.next(),n.highlightFormatting&&(t.formatting="link"),t.linkText=!0,h(t)):i(e,t,p)}function x(e,t){if(e.match(/^\]:/,!0)){t.f=t.inline=b,n.highlightFormatting&&(t.formatting="link");var r=h(t);return t.linkText=!1,r}return e.match(/^([^\]\\]|\\.)+/,!0),S.linkText}function b(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),void 0===e.peek()?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),t.f=t.inline=p,S.linkHref+" url")}var w=e.getMode(t,"text/html"),k="null"==w.name;void 0===n.highlightFormatting&&(n.highlightFormatting=!1),void 0===n.maxBlockquoteDepth&&(n.maxBlockquoteDepth=0),void 0===n.underscoresBreakWords&&(n.underscoresBreakWords=!0),void 0===n.taskLists&&(n.taskLists=!1),void 0===n.strikethrough&&(n.strikethrough=!1),void 0===n.tokenTypeOverrides&&(n.tokenTypeOverrides={});var S={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"tag",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough"};for(var C in S)S.hasOwnProperty(C)&&n.tokenTypeOverrides[C]&&(S[C]=n.tokenTypeOverrides[C]);var L=/^([*\-_])(?:\s*\1){2,}\s*$/,T=/^[*\-+]\s+/,M=/^[0-9]+([.)])\s+/,N=/^\[(x| )\](?=\s)/,A=n.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,E=/^ *(?:\={1,}|-{1,})\s*$/,O=/^[^#!\[\]*_\\<>` "'(~]+/,I=new RegExp("^("+(n.fencedCodeBlocks===!0?"~~~+|```+":n.fencedCodeBlocks)+")[ \\t]*([\\w+#-]*)"),P={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\\]]|\\.)*\])*?(?=\])/},R={startState:function(){return{f:s,prevLine:null,thisLine:null,block:s,htmlState:null,indentation:0,inline:p,text:d,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,fencedChars:null}},copyState:function(t){return{f:t.f,prevLine:t.prevLine,thisLine:t.thisLine,block:t.block,htmlState:t.htmlState&&e.copyState(w,t.htmlState),indentation:t.indentation,localMode:t.localMode,localState:t.localMode?e.copyState(t.localMode,t.localState):null,inline:t.inline,text:t.text,formatting:!1,linkTitle:t.linkTitle,code:t.code,em:t.em,strong:t.strong,strikethrough:t.strikethrough,header:t.header,hr:t.hr,taskList:t.taskList,list:t.list,listStack:t.listStack.slice(0),quote:t.quote,indentedCode:t.indentedCode,trailingSpace:t.trailingSpace,trailingSpaceNewLine:t.trailingSpaceNewLine,md_inside:t.md_inside,fencedChars:t.fencedChars}},token:function(e,t){if(t.formatting=!1,e!=t.thisLine){var n=t.header||t.hr;if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0)||n){if(l(t),!n)return null;t.prevLine=null}t.prevLine=t.thisLine,t.thisLine=e,t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.f=t.block;var r=e.match(/^\s*/,!0)[0].replace(/\t/g," ").length;if(t.indentationDiff=Math.min(r-t.indentation,4),t.indentation=t.indentation+t.indentationDiff,r>0)return null}return t.f(e,t)},innerMode:function(e){return e.block==c?{state:e.htmlState,mode:w}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:R}},blankLine:l,getType:h,fold:"markdown"};return R},"xml"),e.defineMIME("text/x-markdown","markdown")})},{"../../lib/codemirror":10,"../meta":13,"../xml/xml":14}],13:[function(t,n,r){!function(i){"object"==typeof r&&"object"==typeof n?i(t("../lib/codemirror")):"function"==typeof e&&e.amd?e(["../lib/codemirror"],i):i(CodeMirror)}(function(e){"use strict";e.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["pgp"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists.txt$/},{name:"CoffeeScript",mime:"text/x-coffeescript",mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history).md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"]},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Jade",mime:"text/x-jade",mode:"jade",ext:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"null",mode:"jinja2"},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mime:"text/n-triples",mode:"ntriples",ext:["nt"]},{name:"Objective C",mime:"text/x-objectivec",mode:"clike",ext:["m","mm"],alias:["objective-c","objc"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mime:"application/x-httpd-php",mode:"php",ext:["php","php3","php4","php5","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mime:"text/x-sh",mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki ",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mime:"text/x-yaml",mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]}];for(var t=0;t-1&&t.substring(i+1,t.length);return o?e.findModeByExtension(o):void 0},e.findModeByName=function(t){t=t.toLowerCase();for(var n=0;n")):null:e.match("--")?n(s("comment","-->")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(c(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=s("meta","?>"),"meta"):(T=e.eat("/")?"closeTag":"openTag",t.tokenize=a,"tag bracket");if("&"==r){var i;return i=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),i?"atom":"error"}return e.eatWhile(/[^&<]/),null}function a(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">"))return t.tokenize=o,T=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return T="equals",null;if("<"==n){t.tokenize=o,t.state=d,t.tagName=t.tagStart=null;var r=t.tokenize(e,t);return r?r+" tag error":"tag error"}return/[\'\"]/.test(n)?(t.tokenize=l(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function l(e){var t=function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=a;break}return"string"};return t.isInAttribute=!0,t}function s(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=o;break}n.next()}return e}}function c(e){return function(t,n){for(var r;null!=(r=t.next());){if("<"==r)return n.tokenize=c(e+1),n.tokenize(t,n);if(">"==r){if(1==e){n.tokenize=o;break}return n.tokenize=c(e-1),n.tokenize(t,n)}}return"meta"}}function u(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(S.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function f(e){e.context&&(e.context=e.context.prev)}function h(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!S.contextGrabbers.hasOwnProperty(n)||!S.contextGrabbers[n].hasOwnProperty(t))return;f(e)}}function d(e,t,n){return"openTag"==e?(n.tagStart=t.column(),p):"closeTag"==e?m:d}function p(e,t,n){return"word"==e?(n.tagName=t.current(),M="tag",y):(M="error",p)}function m(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&S.implicitlyClosed.hasOwnProperty(n.context.tagName)&&f(n),n.context&&n.context.tagName==r||S.matchClosing===!1?(M="tag",g):(M="tag error",v)}return M="error",v}function g(e,t,n){return"endTag"!=e?(M="error",g):(f(n),d)}function v(e,t,n){return M="error",g(e,t,n)}function y(e,t,n){if("word"==e)return M="attribute",x;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||S.autoSelfClosers.hasOwnProperty(r)?h(n,r):(h(n,r),n.context=new u(n,r,i==n.indented)),d}return M="error",y}function x(e,t,n){return"equals"==e?b:(S.allowMissing||(M="error"),y(e,t,n))}function b(e,t,n){return"string"==e?w:"word"==e&&S.allowUnquoted?(M="string",y):(M="error",y(e,t,n))}function w(e,t,n){return"string"==e?w:y(e,t,n)}var k=r.indentUnit,S={},C=i.htmlMode?t:n;for(var L in C)S[L]=C[L];for(var L in i)S[L]=i[L];var T,M;return o.isInText=!0,{startState:function(e){var t={tokenize:o,state:d,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;T=null;var n=t.tokenize(e,t);return(n||T)&&"comment"!=n&&(M=null,t.state=t.state(T||n,e,t),M&&(n="error"==M?n+" error":M)),n},indent:function(t,n,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+k;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=a&&t.tokenize!=o)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return S.multilineTagIndentPastTag!==!1?t.tagStart+t.tagName.length+2:t.tagStart+k*(S.multilineTagIndentFactor||1);if(S.alignCDATA&&/$/,blockCommentStart:"",configuration:S.htmlMode?"html":"xml",helperType:S.htmlMode?"html":"xml",skipAttribute:function(e){e.state==b&&(e.state=y)}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})})},{"../../lib/codemirror":10}],15:[function(e,t,n){n.read=function(e,t,n,r,i){var o,a,l=8*i-r-1,s=(1<>1,u=-7,f=n?i-1:0,h=n?-1:1,d=e[t+f];for(f+=h,o=d&(1<<-u)-1,d>>=-u,u+=l;u>0;o=256*o+e[t+f],f+=h,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=r;u>0;a=256*a+e[t+f],f+=h,u-=8);if(0===o)o=1-c;else{if(o===s)return a?NaN:(d?-1:1)*(1/0);a+=Math.pow(2,r),o-=c}return(d?-1:1)*a*Math.pow(2,o-r)},n.write=function(e,t,n,r,i,o){var a,l,s,c=8*o-i-1,u=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,m=0>t||0===t&&0>1/t?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-a))<1&&(a--,s*=2),t+=a+f>=1?h/s:h*Math.pow(2,1-f),t*s>=2&&(a++,s/=2),a+f>=u?(l=0,a=u):a+f>=1?(l=(t*s-1)*Math.pow(2,i),a+=f):(l=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[n+d]=255&l,d+=p,l/=256,i-=8);for(a=a<0;e[n+d]=255&a,d+=p,a/=256,c-=8);e[n+d-p]|=128*m}},{}],16:[function(e,t,n){var r={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},{}],17:[function(t,n,r){(function(t){(function(){function t(e){this.tokens=[],this.tokens.links={},this.options=e||h.defaults,this.rules=d.normal,this.options.gfm&&(this.options.tables?this.rules=d.tables:this.rules=d.gfm)}function i(e,t){if(this.options=t||h.defaults,this.links=e,this.rules=p.normal,this.renderer=this.options.renderer||new o,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.gfm?this.options.breaks?this.rules=p.breaks:this.rules=p.gfm:this.options.pedantic&&(this.rules=p.pedantic)}function o(e){this.options=e||{}}function a(e){this.tokens=[],this.token=null,this.options=e||h.defaults,this.options.renderer=this.options.renderer||new o,this.renderer=this.options.renderer,this.renderer.options=this.options}function l(e,t){return e.replace(t?/&/g:/&(?!#?\w+;)/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function s(e){return e.replace(/&([#\w]+);/g,function(e,t){return t=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}function c(e,t){return e=e.source,t=t||"",function n(r,i){return r?(i=i.source||i,i=i.replace(/(^|[^\[])\^/g,"$1"),e=e.replace(r,i),n):new RegExp(e,t)}}function u(){}function f(e){for(var t,n,r=1;rAn error occured:

    "+l(u.message+"",!0)+"
    ";throw u}}var d={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:u,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:u,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:u,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};d.bullet=/(?:[*+-]|\d+\.)/,d.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,d.item=c(d.item,"gm")(/bull/g,d.bullet)(),d.list=c(d.list)(/bull/g,d.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+d.def.source+")")(),d.blockquote=c(d.blockquote)("def",d.def)(),d._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",d.html=c(d.html)("comment",//)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/])*?>/)(/tag/g,d._tag)(),d.paragraph=c(d.paragraph)("hr",d.hr)("heading",d.heading)("lheading",d.lheading)("blockquote",d.blockquote)("tag","<"+d._tag)("def",d.def)(),d.normal=f({},d),d.gfm=f({},d.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),d.gfm.paragraph=c(d.paragraph)("(?!","(?!"+d.gfm.fences.source.replace("\\1","\\2")+"|"+d.list.source.replace("\\1","\\3")+"|")(),d.tables=f({},d.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),t.rules=d,t.lex=function(e,n){var r=new t(n);return r.lex(e)},t.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},t.prototype.token=function(e,t,n){for(var r,i,o,a,l,s,c,u,f,e=e.replace(/^ +$/gm,"");e;)if((o=this.rules.newline.exec(e))&&(e=e.substring(o[0].length),o[0].length>1&&this.tokens.push({type:"space"})),o=this.rules.code.exec(e))e=e.substring(o[0].length),o=o[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?o:o.replace(/\n+$/,"")});else if(o=this.rules.fences.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"code",lang:o[2],text:o[3]||""});else if(o=this.rules.heading.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"heading",depth:o[1].length,text:o[2]});else if(t&&(o=this.rules.nptable.exec(e))){for(e=e.substring(o[0].length),s={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/\n$/,"").split("\n")},u=0;u ?/gm,""),this.token(o,t,!0),this.tokens.push({type:"blockquote_end"});else if(o=this.rules.list.exec(e)){for(e=e.substring(o[0].length),a=o[2],this.tokens.push({type:"list_start",ordered:a.length>1}),o=o[0].match(this.rules.item),r=!1,f=o.length,u=0;f>u;u++)s=o[u],c=s.length,s=s.replace(/^ *([*+-]|\d+\.) +/,""),~s.indexOf("\n ")&&(c-=s.length,s=this.options.pedantic?s.replace(/^ {1,4}/gm,""):s.replace(new RegExp("^ {1,"+c+"}","gm"),"")),this.options.smartLists&&u!==f-1&&(l=d.bullet.exec(o[u+1])[0],a===l||a.length>1&&l.length>1||(e=o.slice(u+1).join("\n")+e,u=f-1)),i=r||/\n\n(?!\s*$)/.test(s),u!==f-1&&(r="\n"===s.charAt(s.length-1),i||(i=r)),this.tokens.push({type:i?"loose_item_start":"list_item_start"}),this.token(s,!1,n),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(o=this.rules.html.exec(e))e=e.substring(o[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===o[1]||"script"===o[1]||"style"===o[1]),text:o[0]});else if(!n&&t&&(o=this.rules.def.exec(e)))e=e.substring(o[0].length),this.tokens.links[o[1].toLowerCase()]={href:o[2],title:o[3]};else if(t&&(o=this.rules.table.exec(e))){for(e=e.substring(o[0].length),s={type:"table", -header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/(?: *\| *)?\n$/,"").split("\n")},u=0;u])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:u,tag:/^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:u,text:/^[\s\S]+?(?=[\\?(?:\s+['"]([\s\S]*?)['"])?\s*/,p.link=c(p.link)("inside",p._inside)("href",p._href)(),p.reflink=c(p.reflink)("inside",p._inside)(),p.normal=f({},p),p.pedantic=f({},p.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),p.gfm=f({},p.normal,{escape:c(p.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:c(p.text)("]|","~]|")("|","|https?://|")()}),p.breaks=f({},p.gfm,{br:c(p.br)("{2,}","*")(),text:c(p.gfm.text)("{2,}","*")()}),i.rules=p,i.output=function(e,t,n){var r=new i(t,n);return r.output(e)},i.prototype.output=function(e){for(var t,n,r,i,o="";e;)if(i=this.rules.escape.exec(e))e=e.substring(i[0].length),o+=i[1];else if(i=this.rules.autolink.exec(e))e=e.substring(i[0].length),"@"===i[2]?(n=":"===i[1].charAt(6)?this.mangle(i[1].substring(7)):this.mangle(i[1]),r=this.mangle("mailto:")+n):(n=l(i[1]),r=n),o+=this.renderer.link(r,null,n);else if(this.inLink||!(i=this.rules.url.exec(e))){if(i=this.rules.tag.exec(e))!this.inLink&&/^/i.test(i[0])&&(this.inLink=!1),e=e.substring(i[0].length),o+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):l(i[0]):i[0];else if(i=this.rules.link.exec(e))e=e.substring(i[0].length),this.inLink=!0,o+=this.outputLink(i,{href:i[2],title:i[3]}),this.inLink=!1;else if((i=this.rules.reflink.exec(e))||(i=this.rules.nolink.exec(e))){if(e=e.substring(i[0].length),t=(i[2]||i[1]).replace(/\s+/g," "),t=this.links[t.toLowerCase()],!t||!t.href){o+=i[0].charAt(0),e=i[0].substring(1)+e;continue}this.inLink=!0,o+=this.outputLink(i,t),this.inLink=!1}else if(i=this.rules.strong.exec(e))e=e.substring(i[0].length),o+=this.renderer.strong(this.output(i[2]||i[1]));else if(i=this.rules.em.exec(e))e=e.substring(i[0].length),o+=this.renderer.em(this.output(i[2]||i[1]));else if(i=this.rules.code.exec(e))e=e.substring(i[0].length),o+=this.renderer.codespan(l(i[2],!0));else if(i=this.rules.br.exec(e))e=e.substring(i[0].length),o+=this.renderer.br();else if(i=this.rules.del.exec(e))e=e.substring(i[0].length),o+=this.renderer.del(this.output(i[1]));else if(i=this.rules.text.exec(e))e=e.substring(i[0].length),o+=this.renderer.text(l(this.smartypants(i[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else e=e.substring(i[0].length),n=l(i[1]),r=n,o+=this.renderer.link(r,null,n);return o},i.prototype.outputLink=function(e,t){var n=l(t.href),r=t.title?l(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,l(e[1]))},i.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014\/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014\/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},i.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",r=e.length,i=0;r>i;i++)t=e.charCodeAt(i),Math.random()>.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},o.prototype.code=function(e,t,n){if(this.options.highlight){var r=this.options.highlight(e,t);null!=r&&r!==e&&(n=!0,e=r)}return t?'
    '+(n?e:l(e,!0))+"\n
    \n":"
    "+(n?e:l(e,!0))+"\n
    "},o.prototype.blockquote=function(e){return"
    \n"+e+"
    \n"},o.prototype.html=function(e){return e},o.prototype.heading=function(e,t,n){return"'+e+"\n"},o.prototype.hr=function(){return this.options.xhtml?"
    \n":"
    \n"},o.prototype.list=function(e,t){var n=t?"ol":"ul";return"<"+n+">\n"+e+"\n"},o.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},o.prototype.paragraph=function(e){return"

    "+e+"

    \n"},o.prototype.table=function(e,t){return"\n\n"+e+"\n\n"+t+"\n
    \n"},o.prototype.tablerow=function(e){return"\n"+e+"\n"},o.prototype.tablecell=function(e,t){var n=t.header?"th":"td",r=t.align?"<"+n+' style="text-align:'+t.align+'">':"<"+n+">";return r+e+"\n"},o.prototype.strong=function(e){return""+e+""},o.prototype.em=function(e){return""+e+""},o.prototype.codespan=function(e){return""+e+""},o.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},o.prototype.del=function(e){return""+e+""},o.prototype.link=function(e,t,n){if(this.options.sanitize){try{var r=decodeURIComponent(s(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(i){return""}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:"))return""}var o='
    "},o.prototype.image=function(e,t,n){var r=''+n+'":">"},o.prototype.text=function(e){return e},a.parse=function(e,t,n){var r=new a(t,n);return r.parse(e)},a.prototype.parse=function(e){this.inline=new i(e.links,this.options,this.renderer),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},a.prototype.next=function(){return this.token=this.tokens.pop()},a.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},a.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},a.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,r,i,o="",a="";for(n="",e=0;ea;a++)for(var s=this.compoundRules[a],c=0,u=s.length;u>c;c++)this.compoundRuleCodes[s[c]]=[];"ONLYINCOMPOUND"in this.flags&&(this.compoundRuleCodes[this.flags.ONLYINCOMPOUND]=[]),this.dictionaryTable=this._parseDIC(n);for(var a in this.compoundRuleCodes)0==this.compoundRuleCodes[a].length&&delete this.compoundRuleCodes[a];for(var a=0,l=this.compoundRules.length;l>a;a++){for(var f=this.compoundRules[a],h="",c=0,u=f.length;u>c;c++){var d=f[c];h+=d in this.compoundRuleCodes?"("+this.compoundRuleCodes[d].join("|")+")":d}this.compoundRules[a]=new RegExp(h,"i")}}return this};i.prototype={load:function(e){for(var t in e)this[t]=e[t];return this},_readFile:function(t,r){if(r||(r="utf8"),"undefined"!=typeof XMLHttpRequest){var i=new XMLHttpRequest;return i.open("GET",t,!1),i.overrideMimeType&&i.overrideMimeType("text/plain; charset="+r),i.send(null),i.responseText}if("undefined"!=typeof e){var o=e("fs");try{if(o.existsSync(t)){var a=o.statSync(t),l=o.openSync(t,"r"),s=new n(a.size);return o.readSync(l,s,0,s.length,null),s.toString(r,0,s.length)}console.log("Path "+t+" does not exist.")}catch(c){return console.log(c),""}}},_parseAFF:function(e){var t={};e=this._removeAffixComments(e);for(var n=e.split("\n"),r=0,i=n.length;i>r;r++){var o=n[r],a=o.split(/\s+/),l=a[0];if("PFX"==l||"SFX"==l){for(var s=a[1],c=a[2],u=parseInt(a[3],10),f=[],h=r+1,d=r+1+u;d>h;h++){var o=n[h],p=o.split(/\s+/),m=p[2],g=p[3].split("/"),v=g[0];"0"===v&&(v="");var y=this.parseRuleCodes(g[1]),x=p[4],b={};b.add=v,y.length>0&&(b.continuationClasses=y),"."!==x&&("SFX"===l?b.match=new RegExp(x+"$"):b.match=new RegExp("^"+x)),"0"!=m&&("SFX"===l?b.remove=new RegExp(m+"$"):b.remove=m),f.push(b)}t[s]={type:l,combineable:"Y"==c,entries:f},r+=u}else if("COMPOUNDRULE"===l){for(var u=parseInt(a[1],10),h=r+1,d=r+1+u;d>h;h++){var o=n[h],p=o.split(/\s+/);this.compoundRules.push(p[1])}r+=u}else if("REP"===l){var p=o.split(/\s+/);3===p.length&&this.replacementTable.push([p[1],p[2]])}else this.flags[l]=a[1]}return t},_removeAffixComments:function(e){return e=e.replace(/#.*$/gm,""),e=e.replace(/^\s\s*/m,"").replace(/\s\s*$/m,""),e=e.replace(/\n{2,}/g,"\n"),e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")},_parseDIC:function(e){function t(e,t){e in r&&"object"==typeof r[e]||(r[e]=[]),r[e].push(t)}e=this._removeDicComments(e);for(var n=e.split("\n"),r={},i=1,o=n.length;o>i;i++){var a=n[i],l=a.split("/",2),s=l[0];if(l.length>1){var c=this.parseRuleCodes(l[1]);"NEEDAFFIX"in this.flags&&-1!=c.indexOf(this.flags.NEEDAFFIX)||t(s,c);for(var u=0,f=c.length;f>u;u++){var h=c[u],d=this.rules[h];if(d)for(var p=this._applyRule(s,d),m=0,g=p.length;g>m;m++){var v=p[m];if(t(v,[]),d.combineable)for(var y=u+1;f>y;y++){var x=c[y],b=this.rules[x];if(b&&b.combineable&&d.type!=b.type)for(var w=this._applyRule(v,b),k=0,S=w.length;S>k;k++){var C=w[k];t(C,[])}}}h in this.compoundRuleCodes&&this.compoundRuleCodes[h].push(s)}}else t(s.trim(),[])}return r},_removeDicComments:function(e){return e=e.replace(/^\t.*$/gm,"")},parseRuleCodes:function(e){if(!e)return[];if(!("FLAG"in this.flags))return e.split("");if("long"===this.flags.FLAG){for(var t=[],n=0,r=e.length;r>n;n+=2)t.push(e.substr(n,2));return t}return"num"===this.flags.FLAG?textCode.split(","):void 0},_applyRule:function(e,t){for(var n=t.entries,r=[],i=0,o=n.length;o>i;i++){var a=n[i];if(!a.match||e.match(a.match)){var l=e;if(a.remove&&(l=l.replace(a.remove,"")),"SFX"===t.type?l+=a.add:l=a.add+l,r.push(l),"continuationClasses"in a)for(var s=0,c=a.continuationClasses.length;c>s;s++){var u=this.rules[a.continuationClasses[s]];u&&(r=r.concat(this._applyRule(l,u)))}}}return r},check:function(e){var t=e.replace(/^\s\s*/,"").replace(/\s\s*$/,"");if(this.checkExact(t))return!0;if(t.toUpperCase()===t){var n=t[0]+t.substring(1).toLowerCase();if(this.hasFlag(n,"KEEPCASE"))return!1;if(this.checkExact(n))return!0}var r=t.toLowerCase();if(r!==t){if(this.hasFlag(r,"KEEPCASE"))return!1;if(this.checkExact(r))return!0}return!1},checkExact:function(e){var t=this.dictionaryTable[e];if("undefined"==typeof t){if("COMPOUNDMIN"in this.flags&&e.length>=this.flags.COMPOUNDMIN)for(var n=0,r=this.compoundRules.length;r>n;n++)if(e.match(this.compoundRules[n]))return!0;return!1}if("object"==typeof t){for(var n=0,r=t.length;r>n;n++)if(!this.hasFlag(e,"ONLYINCOMPOUND",t[n]))return!0;return!1}},hasFlag:function(e,t,n){if(t in this.flags){if("undefined"==typeof n)var n=Array.prototype.concat.apply([],this.dictionaryTable[e]);if(n&&-1!==n.indexOf(this.flags[t]))return!0}return!1},alphabet:"",suggest:function(e,t){function n(e){for(var t=[],n=0,r=e.length;r>n;n++){for(var i=e[n],o=[],a=0,l=i.length+1;l>a;a++)o.push([i.substring(0,a),i.substring(a,i.length)]);for(var s=[],a=0,l=o.length;l>a;a++){var u=o[a];u[1]&&s.push(u[0]+u[1].substring(1))}for(var f=[],a=0,l=o.length;l>a;a++){var u=o[a];u[1].length>1&&f.push(u[0]+u[1][1]+u[1][0]+u[1].substring(2))}for(var h=[],a=0,l=o.length;l>a;a++){var u=o[a];if(u[1])for(var d=0,p=c.alphabet.length;p>d;d++)h.push(u[0]+c.alphabet[d]+u[1].substring(1))}for(var m=[],a=0,l=o.length;l>a;a++){var u=o[a];if(u[1])for(var d=0,p=c.alphabet.length;p>d;d++)h.push(u[0]+c.alphabet[d]+u[1])}t=t.concat(s),t=t.concat(f),t=t.concat(h),t=t.concat(m)}return t}function r(e){for(var t=[],n=0;nu;u++)l[u]in s?s[l[u]]+=1:s[l[u]]=1;var h=[];for(var u in s)h.push([u,s[u]]);h.sort(i).reverse();for(var d=[],u=0,f=Math.min(t,h.length);f>u;u++)c.hasFlag(h[u][0],"NOSUGGEST")||d.push(h[u][0]);return d}if(t||(t=5),this.check(e))return[];for(var o=0,a=this.replacementTable.length;a>o;o++){var l=this.replacementTable[o];if(-1!==e.indexOf(l[0])){var s=e.replace(l[0],l[1]);if(this.check(s))return[s]}}var c=this;return c.alphabet="abcdefghijklmnopqrstuvwxyz",i(e)}},"undefined"!=typeof t&&(t.exports=i)}).call(this,e("buffer").Buffer,"/node_modules/typo-js")},{buffer:3,fs:2}],19:[function(e,t,n){var r=e("codemirror");r.commands.tabAndIndentMarkdownList=function(e){var t=e.listSelections(),n=t[0].head,r=e.getStateAfter(n.line),i=r.list!==!1;if(i)return void e.execCommand("indentMore");if(e.options.indentWithTabs)e.execCommand("insertTab");else{var o=Array(e.options.tabSize+1).join(" ");e.replaceSelection(o)}},r.commands.shiftTabAndUnindentMarkdownList=function(e){var t=e.listSelections(),n=t[0].head,r=e.getStateAfter(n.line),i=r.list!==!1;if(i)return void e.execCommand("indentLess");if(e.options.indentWithTabs)e.execCommand("insertTab");else{var o=Array(e.options.tabSize+1).join(" ");e.replaceSelection(o)}}},{codemirror:10}],20:[function(e,t,n){"use strict";function r(e){return e=U?e.replace("Ctrl","Cmd"):e.replace("Cmd","Ctrl")}function i(e,t,n){e=e||{};var r=document.createElement("a");return t=void 0==t?!0:t,e.title&&t&&(r.title=a(e.title,e.action,n),U&&(r.title=r.title.replace("Ctrl","⌘"),r.title=r.title.replace("Alt","⌥"))),r.tabIndex=-1,r.className=e.className,r}function o(){var e=document.createElement("i");return e.className="separator",e.innerHTML="|",e}function a(e,t,n){var i,o=e;return t&&(i=Y(t),n[i]&&(o+=" ("+r(n[i])+")")),o}function l(e,t){t=t||e.getCursor("start");var n=e.getTokenAt(t);if(!n.type)return{};for(var r,i,o=n.type.split(" "),a={},l=0;l=0&&(d=c.getLineHandle(o),!t(d));o--);var v,y,x,b,w=c.getTokenAt({line:o,ch:1}),k=n(w).fencedChars;t(c.getLineHandle(u.line))?(v="",y=u.line):t(c.getLineHandle(u.line-1))?(v="",y=u.line-1):(v=k+"\n",y=u.line),t(c.getLineHandle(f.line))?(x="",b=f.line,0===f.ch&&(b+=1)):0!==f.ch&&t(c.getLineHandle(f.line+1))?(x="",b=f.line+1):(x=k+"\n",b=f.line+1),0===f.ch&&(b-=1),c.operation(function(){c.replaceRange(x,{line:b,ch:0},{line:b+(x?0:1),ch:0}),c.replaceRange(v,{line:y,ch:0},{line:y+(v?0:1),ch:0})}),c.setSelection({line:y+(v?1:0),ch:0},{line:b+(v?1:-1),ch:0}),c.focus()}else{var S=u.line;if(t(c.getLineHandle(u.line))&&("fenced"===r(c,u.line+1)?(o=u.line,S=u.line+1):(a=u.line,S=u.line-1)),void 0===o)for(o=S;o>=0&&(d=c.getLineHandle(o),!t(d));o--);if(void 0===a)for(l=c.lineCount(),a=S;l>a&&(d=c.getLineHandle(a),!t(d));a++);c.operation(function(){c.replaceRange("",{line:o,ch:0},{line:o+1,ch:0}),c.replaceRange("",{line:a-1,ch:0},{line:a,ch:0})}),c.focus()}else if("indented"===p){if(u.line!==f.line||u.ch!==f.ch)o=u.line,a=f.line,0===f.ch&&a--;else{for(o=u.line;o>=0;o--)if(d=c.getLineHandle(o),!d.text.match(/^\s*$/)&&"indented"!==r(c,o,d)){o+=1;break}for(l=c.lineCount(),a=u.line;l>a;a++)if(d=c.getLineHandle(a),!d.text.match(/^\s*$/)&&"indented"!==r(c,a,d)){a-=1;break}}var C=c.getLineHandle(a+1),L=C&&c.getTokenAt({line:a+1,ch:C.text.length-1}),T=L&&n(L).indentedCode;T&&c.replaceRange("\n",{line:a+1,ch:0});for(var M=o;a>=M;M++)c.indentLine(M,"subtract");c.focus()}else{var N=u.line===f.line&&u.ch===f.ch&&0===u.ch,A=u.line!==f.line;N||A?i(c,u,f,s):E(c,!1,["`","`"])}}function d(e){var t=e.codemirror;I(t,"quote")}function p(e){var t=e.codemirror;O(t,"smaller")}function m(e){var t=e.codemirror;O(t,"bigger")}function g(e){var t=e.codemirror;O(t,void 0,1)}function v(e){var t=e.codemirror;O(t,void 0,2)}function y(e){var t=e.codemirror;O(t,void 0,3)}function x(e){var t=e.codemirror;I(t,"unordered-list")}function b(e){var t=e.codemirror;I(t,"ordered-list")}function w(e){var t=e.codemirror;R(t)}function k(e){var t=e.codemirror,n=l(t),r=e.options,i="http://";return r.promptURLs&&(i=prompt(r.promptTexts.link),!i)?!1:void E(t,n.link,r.insertTexts.link,i)}function S(e){var t=e.codemirror,n=l(t),r=e.options,i="http://";return r.promptURLs&&(i=prompt(r.promptTexts.image),!i)?!1:void E(t,n.image,r.insertTexts.image,i)}function C(e){var t=e.codemirror,n=l(t),r=e.options;E(t,n.table,r.insertTexts.table)}function L(e){var t=e.codemirror,n=l(t),r=e.options;E(t,n.image,r.insertTexts.horizontalRule)}function T(e){var t=e.codemirror;t.undo(),t.focus()}function M(e){var t=e.codemirror;t.redo(),t.focus()}function N(e){var t=e.codemirror,n=t.getWrapperElement(),r=n.nextSibling,i=e.toolbarElements["side-by-side"],o=!1;/editor-preview-active-side/.test(r.className)?(r.className=r.className.replace(/\s*editor-preview-active-side\s*/g,""),i.className=i.className.replace(/\s*active\s*/g,""),n.className=n.className.replace(/\s*CodeMirror-sided\s*/g," ")):(setTimeout(function(){t.getOption("fullScreen")||s(e),r.className+=" editor-preview-active-side"},1),i.className+=" active",n.className+=" CodeMirror-sided",o=!0);var a=n.lastChild;if(/editor-preview-active/.test(a.className)){a.className=a.className.replace(/\s*editor-preview-active\s*/g,"");var l=e.toolbarElements.preview,c=n.previousSibling;l.className=l.className.replace(/\s*active\s*/g,""),c.className=c.className.replace(/\s*disabled-for-preview*/g,"")}var u=function(){r.innerHTML=e.options.previewRender(e.value(),r)};t.sideBySideRenderingFunction||(t.sideBySideRenderingFunction=u),o?(r.innerHTML=e.options.previewRender(e.value(),r),t.on("update",t.sideBySideRenderingFunction)):t.off("update",t.sideBySideRenderingFunction),t.refresh()}function A(e){var t=e.codemirror,n=t.getWrapperElement(),r=n.previousSibling,i=e.options.toolbar?e.toolbarElements.preview:!1,o=n.lastChild;o&&/editor-preview/.test(o.className)||(o=document.createElement("div"),o.className="editor-preview",n.appendChild(o)),/editor-preview-active/.test(o.className)?(o.className=o.className.replace(/\s*editor-preview-active\s*/g,""),i&&(i.className=i.className.replace(/\s*active\s*/g,""),r.className=r.className.replace(/\s*disabled-for-preview*/g,""))):(setTimeout(function(){o.className+=" editor-preview-active"},1),i&&(i.className+=" active",r.className+=" disabled-for-preview")),o.innerHTML=e.options.previewRender(e.value(),o);var a=t.getWrapperElement().nextSibling;/editor-preview-active-side/.test(a.className)&&N(e)}function E(e,t,n,r){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){var i,o=n[0],a=n[1],l=e.getCursor("start"),s=e.getCursor("end");r&&(a=a.replace("#url#",r)),t?(i=e.getLine(l.line),o=i.slice(0,l.ch),a=i.slice(l.ch),e.replaceRange(o+a,{line:l.line,ch:0})):(i=e.getSelection(),e.replaceSelection(o+i+a),l.ch+=o.length,l!==s&&(s.ch+=o.length)),e.setSelection(l,s),e.focus()}}function O(e,t,n){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){for(var r=e.getCursor("start"),i=e.getCursor("end"),o=r.line;o<=i.line;o++)!function(r){var i=e.getLine(r),o=i.search(/[^#]/);i=void 0!==t?0>=o?"bigger"==t?"###### "+i:"# "+i:6==o&&"smaller"==t?i.substr(7):1==o&&"bigger"==t?i.substr(2):"bigger"==t?i.substr(1):"#"+i:1==n?0>=o?"# "+i:o==n?i.substr(o+1):"# "+i.substr(o+1):2==n?0>=o?"## "+i:o==n?i.substr(o+1):"## "+i.substr(o+1):0>=o?"### "+i:o==n?i.substr(o+1):"### "+i.substr(o+1),e.replaceRange(i,{line:r,ch:0},{line:r,ch:99999999999999})}(o);e.focus()}}function I(e,t){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){for(var n=l(e),r=e.getCursor("start"),i=e.getCursor("end"),o={quote:/^(\s*)\>\s+/,"unordered-list":/^(\s*)(\*|\-|\+)\s+/,"ordered-list":/^(\s*)\d+\.\s+/},a={quote:"> ","unordered-list":"* ","ordered-list":"1. "},s=r.line;s<=i.line;s++)!function(r){var i=e.getLine(r);i=n[t]?i.replace(o[t],"$1"):a[t]+i,e.replaceRange(i,{line:r,ch:0},{line:r,ch:99999999999999})}(s);e.focus()}}function P(e,t,n,r){if(!/editor-preview-active/.test(e.codemirror.getWrapperElement().lastChild.className)){r="undefined"==typeof r?n:r;var i,o=e.codemirror,a=l(o),s=n,c=r,u=o.getCursor("start"),f=o.getCursor("end");a[t]?(i=o.getLine(u.line),s=i.slice(0,u.ch),c=i.slice(u.ch),"bold"==t?(s=s.replace(/(\*\*|__)(?![\s\S]*(\*\*|__))/,""),c=c.replace(/(\*\*|__)/,"")):"italic"==t?(s=s.replace(/(\*|_)(?![\s\S]*(\*|_))/,""),c=c.replace(/(\*|_)/,"")):"strikethrough"==t&&(s=s.replace(/(\*\*|~~)(?![\s\S]*(\*\*|~~))/,""),c=c.replace(/(\*\*|~~)/,"")),o.replaceRange(s+c,{line:u.line,ch:0},{line:u.line,ch:99999999999999}),"bold"==t||"strikethrough"==t?(u.ch-=2,u!==f&&(f.ch-=2)):"italic"==t&&(u.ch-=1,u!==f&&(f.ch-=1))):(i=o.getSelection(),"bold"==t?(i=i.split("**").join(""),i=i.split("__").join("")):"italic"==t?(i=i.split("*").join(""),i=i.split("_").join("")):"strikethrough"==t&&(i=i.split("~~").join("")),o.replaceSelection(s+i+c),u.ch+=n.length,f.ch=u.ch+i.length),o.setSelection(u,f),o.focus()}}function R(e){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className))for(var t,n=e.getCursor("start"),r=e.getCursor("end"),i=n.line;i<=r.line;i++)t=e.getLine(i),t=t.replace(/^[ ]*([# ]+|\*|\-|[> ]+|[0-9]+(.|\)))[ ]*/,""),e.replaceRange(t,{line:i,ch:0},{line:i,ch:99999999999999})}function D(e,t){for(var n in t)t.hasOwnProperty(n)&&(t[n]instanceof Array?e[n]=t[n].concat(e[n]instanceof Array?e[n]:[]):null!==t[n]&&"object"==typeof t[n]&&t[n].constructor===Object?e[n]=D(e[n]||{},t[n]):e[n]=t[n]);return e}function H(e){for(var t=1;t=19968?n[i].length:1;return r}function B(e){e=e||{},e.parent=this;var t=!0;if(e.autoDownloadFontAwesome===!1&&(t=!1),e.autoDownloadFontAwesome!==!0)for(var n=document.styleSheets,r=0;r-1&&(t=!1);if(t){var i=document.createElement("link");i.rel="stylesheet",i.href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css",document.getElementsByTagName("head")[0].appendChild(i)}if(e.element)this.element=e.element;else if(null===e.element)return void console.log("SimpleMDE: Error. No element was found.");if(void 0===e.toolbar){e.toolbar=[];for(var o in K)K.hasOwnProperty(o)&&(-1!=o.indexOf("separator-")&&e.toolbar.push("|"),(K[o]["default"]===!0||e.showIcons&&e.showIcons.constructor===Array&&-1!=e.showIcons.indexOf(o))&&e.toolbar.push(o))}e.hasOwnProperty("status")||(e.status=["autosave","lines","words","cursor"]),e.previewRender||(e.previewRender=function(e){return this.parent.markdown(e)}),e.parsingConfig=H({highlightFormatting:!0},e.parsingConfig||{}),e.insertTexts=H({},X,e.insertTexts||{}),e.promptTexts=Z,e.blockStyles=H({},J,e.blockStyles||{}),e.shortcuts=H({},G,e.shortcuts||{}),void 0!=e.autosave&&void 0!=e.autosave.unique_id&&""!=e.autosave.unique_id&&(e.autosave.uniqueId=e.autosave.unique_id),this.options=e,this.render(),!e.initialValue||this.options.autosave&&this.options.autosave.foundSavedValue===!0||this.value(e.initialValue)}function _(){if("object"!=typeof localStorage)return!1;try{localStorage.setItem("smde_localStorage",1),localStorage.removeItem("smde_localStorage")}catch(e){return!1}return!0}var F=e("codemirror");e("codemirror/addon/edit/continuelist.js"),e("./codemirror/tablist"),e("codemirror/addon/display/fullscreen.js"),e("codemirror/mode/markdown/markdown.js"),e("codemirror/addon/mode/overlay.js"),e("codemirror/addon/display/placeholder.js"),e("codemirror/addon/selection/mark-selection.js"),e("codemirror/mode/gfm/gfm.js"),e("codemirror/mode/xml/xml.js");var z=e("codemirror-spell-checker"),j=e("marked"),U=/Mac/.test(navigator.platform),q={toggleBold:c,toggleItalic:u,drawLink:k,toggleHeadingSmaller:p,toggleHeadingBigger:m,drawImage:S,toggleBlockquote:d,toggleOrderedList:b,toggleUnorderedList:x,toggleCodeBlock:h,togglePreview:A,toggleStrikethrough:f,toggleHeading1:g,toggleHeading2:v,toggleHeading3:y,cleanBlock:w,drawTable:C,drawHorizontalRule:L,undo:T,redo:M,toggleSideBySide:N,toggleFullScreen:s},G={toggleBold:"Cmd-B",toggleItalic:"Cmd-I",drawLink:"Cmd-K",toggleHeadingSmaller:"Cmd-H",toggleHeadingBigger:"Shift-Cmd-H",cleanBlock:"Cmd-E",drawImage:"Cmd-Alt-I",toggleBlockquote:"Cmd-'",toggleOrderedList:"Cmd-Alt-L",toggleUnorderedList:"Cmd-L",toggleCodeBlock:"Cmd-Alt-C",togglePreview:"Cmd-P",toggleSideBySide:"F9",toggleFullScreen:"F11"},Y=function(e){for(var t in q)if(q[t]===e)return t;return null},$=function(){var e=!1;return function(t){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(e=!0); -}(navigator.userAgent||navigator.vendor||window.opera),e},V="",K={bold:{name:"bold",action:c,className:"fa fa-bold",title:"Bold","default":!0},italic:{name:"italic",action:u,className:"fa fa-italic",title:"Italic","default":!0},strikethrough:{name:"strikethrough",action:f,className:"fa fa-strikethrough",title:"Strikethrough"},heading:{name:"heading",action:p,className:"fa fa-header",title:"Heading","default":!0},"heading-smaller":{name:"heading-smaller",action:p,className:"fa fa-header fa-header-x fa-header-smaller",title:"Smaller Heading"},"heading-bigger":{name:"heading-bigger",action:m,className:"fa fa-header fa-header-x fa-header-bigger",title:"Bigger Heading"},"heading-1":{name:"heading-1",action:g,className:"fa fa-header fa-header-x fa-header-1",title:"Big Heading"},"heading-2":{name:"heading-2",action:v,className:"fa fa-header fa-header-x fa-header-2",title:"Medium Heading"},"heading-3":{name:"heading-3",action:y,className:"fa fa-header fa-header-x fa-header-3",title:"Small Heading"},"separator-1":{name:"separator-1"},code:{name:"code",action:h,className:"fa fa-code",title:"Code"},quote:{name:"quote",action:d,className:"fa fa-quote-left",title:"Quote","default":!0},"unordered-list":{name:"unordered-list",action:x,className:"fa fa-list-ul",title:"Generic List","default":!0},"ordered-list":{name:"ordered-list",action:b,className:"fa fa-list-ol",title:"Numbered List","default":!0},"clean-block":{name:"clean-block",action:w,className:"fa fa-eraser fa-clean-block",title:"Clean block"},"separator-2":{name:"separator-2"},link:{name:"link",action:k,className:"fa fa-link",title:"Create Link","default":!0},image:{name:"image",action:S,className:"fa fa-picture-o",title:"Insert Image","default":!0},table:{name:"table",action:C,className:"fa fa-table",title:"Insert Table"},"horizontal-rule":{name:"horizontal-rule",action:L,className:"fa fa-minus",title:"Insert Horizontal Line"},"separator-3":{name:"separator-3"},preview:{name:"preview",action:A,className:"fa fa-eye no-disable",title:"Toggle Preview","default":!0},"side-by-side":{name:"side-by-side",action:N,className:"fa fa-columns no-disable no-mobile",title:"Toggle Side by Side","default":!0},fullscreen:{name:"fullscreen",action:s,className:"fa fa-arrows-alt no-disable no-mobile",title:"Toggle Fullscreen","default":!0},"separator-4":{name:"separator-4"},guide:{name:"guide",action:"https://simplemde.com/markdown-guide",className:"fa fa-question-circle",title:"Markdown Guide","default":!0},"separator-5":{name:"separator-5"},undo:{name:"undo",action:T,className:"fa fa-undo no-disable",title:"Undo"},redo:{name:"redo",action:M,className:"fa fa-repeat no-disable",title:"Redo"}},X={link:["[","](#url#)"],image:["![](","#url#)"],table:["","\n\n| Column 1 | Column 2 | Column 3 |\n| -------- | -------- | -------- |\n| Text | Text | Text |\n\n"],horizontalRule:["","\n\n-----\n\n"]},Z={link:"URL for the link:",image:"URL of the image:"},J={bold:"**",code:"```",italic:"*"};B.prototype.markdown=function(e){if(j){var t={};return this.options&&this.options.renderingConfig&&this.options.renderingConfig.singleLineBreaks===!1?t.breaks=!1:t.breaks=!0,this.options&&this.options.renderingConfig&&this.options.renderingConfig.codeSyntaxHighlighting===!0&&window.hljs&&(t.highlight=function(e){return window.hljs.highlightAuto(e).value}),j.setOptions(t),j(e)}},B.prototype.render=function(e){if(e||(e=this.element||document.getElementsByTagName("textarea")[0]),!this._rendered||this._rendered!==e){this.element=e;var t=this.options,n=this,i={};for(var o in t.shortcuts)null!==t.shortcuts[o]&&null!==q[o]&&!function(e){i[r(t.shortcuts[e])]=function(){q[e](n)}}(o);i.Enter="newlineAndIndentContinueMarkdownList",i.Tab="tabAndIndentMarkdownList",i["Shift-Tab"]="shiftTabAndUnindentMarkdownList",i.Esc=function(e){e.getOption("fullScreen")&&s(n)},document.addEventListener("keydown",function(e){e=e||window.event,27==e.keyCode&&n.codemirror.getOption("fullScreen")&&s(n)},!1);var a,l;if(t.spellChecker!==!1?(a="spell-checker",l=t.parsingConfig,l.name="gfm",l.gitHubSpice=!1,z({codeMirrorInstance:F})):(a=t.parsingConfig,a.name="gfm",a.gitHubSpice=!1),this.codemirror=F.fromTextArea(e,{mode:a,backdrop:l,theme:"paper",tabSize:void 0!=t.tabSize?t.tabSize:2,indentUnit:void 0!=t.tabSize?t.tabSize:2,indentWithTabs:t.indentWithTabs!==!1,lineNumbers:!1,autofocus:t.autofocus===!0,extraKeys:i,lineWrapping:t.lineWrapping!==!1,allowDropFileTypes:["text/plain"],placeholder:t.placeholder||e.getAttribute("placeholder")||"",styleSelectedText:void 0!=t.styleSelectedText?t.styleSelectedText:!0}),t.forceSync===!0){var c=this.codemirror;c.on("change",function(){c.save()})}this.gui={},t.toolbar!==!1&&(this.gui.toolbar=this.createToolbar()),t.status!==!1&&(this.gui.statusbar=this.createStatusbar()),void 0!=t.autosave&&t.autosave.enabled===!0&&this.autosave(),this.gui.sideBySide=this.createSideBySide(),this._rendered=this.element;var u=this.codemirror;setTimeout(function(){u.refresh()}.bind(u),0)}},B.prototype.autosave=function(){if(_()){var e=this;if(void 0==this.options.autosave.uniqueId||""==this.options.autosave.uniqueId)return void console.log("SimpleMDE: You must set a uniqueId to use the autosave feature");null!=e.element.form&&void 0!=e.element.form&&e.element.form.addEventListener("submit",function(){localStorage.removeItem("smde_"+e.options.autosave.uniqueId)}),this.options.autosave.loaded!==!0&&("string"==typeof localStorage.getItem("smde_"+this.options.autosave.uniqueId)&&""!=localStorage.getItem("smde_"+this.options.autosave.uniqueId)&&(this.codemirror.setValue(localStorage.getItem("smde_"+this.options.autosave.uniqueId)),this.options.autosave.foundSavedValue=!0),this.options.autosave.loaded=!0),localStorage.setItem("smde_"+this.options.autosave.uniqueId,e.value());var t=document.getElementById("autosaved");if(null!=t&&void 0!=t&&""!=t){var n=new Date,r=n.getHours(),i=n.getMinutes(),o="am",a=r;a>=12&&(a=r-12,o="pm"),0==a&&(a=12),i=10>i?"0"+i:i,t.innerHTML="Autosaved: "+a+":"+i+" "+o}this.autosaveTimeoutId=setTimeout(function(){e.autosave()},this.options.autosave.delay||1e4)}else console.log("SimpleMDE: localStorage not available, cannot autosave")},B.prototype.clearAutosavedValue=function(){if(_()){if(void 0==this.options.autosave||void 0==this.options.autosave.uniqueId||""==this.options.autosave.uniqueId)return void console.log("SimpleMDE: You must set a uniqueId to clear the autosave value");localStorage.removeItem("smde_"+this.options.autosave.uniqueId)}else console.log("SimpleMDE: localStorage not available, cannot autosave")},B.prototype.createSideBySide=function(){var e=this.codemirror,t=e.getWrapperElement(),n=t.nextSibling;n&&/editor-preview-side/.test(n.className)||(n=document.createElement("div"),n.className="editor-preview-side",t.parentNode.insertBefore(n,t.nextSibling));var r=!1,i=!1;return e.on("scroll",function(e){if(r)return void(r=!1);i=!0;var t=e.getScrollInfo().height-e.getScrollInfo().clientHeight,o=parseFloat(e.getScrollInfo().top)/t,a=(n.scrollHeight-n.clientHeight)*o;n.scrollTop=a}),n.onscroll=function(){if(i)return void(i=!1);r=!0;var t=n.scrollHeight-n.clientHeight,o=parseFloat(n.scrollTop)/t,a=(e.getScrollInfo().height-e.getScrollInfo().clientHeight)*o;e.scrollTo(0,a)},n},B.prototype.createToolbar=function(e){if(e=e||this.options.toolbar,e&&0!==e.length){var t;for(t=0;tp,.editor-preview>p{margin-top:0}.editor-preview pre,.editor-preview-side pre{background:#eee;margin-bottom:10px}.editor-preview table td,.editor-preview table th,.editor-preview-side table td,.editor-preview-side table th{border:1px solid #ddd;padding:5px}.CodeMirror .CodeMirror-code .cm-tag{color:#63a35c}.CodeMirror .CodeMirror-code .cm-attribute{color:#795da3}.CodeMirror .CodeMirror-code .cm-string{color:#183691}.CodeMirror .CodeMirror-selected{background:#d9d9d9}.CodeMirror .CodeMirror-code .cm-header-1{font-size:200%;line-height:200%}.CodeMirror .CodeMirror-code .cm-header-2{font-size:160%;line-height:160%}.CodeMirror .CodeMirror-code .cm-header-3{font-size:125%;line-height:125%}.CodeMirror .CodeMirror-code .cm-header-4{font-size:110%;line-height:110%}.CodeMirror .CodeMirror-code .cm-comment{background:rgba(0,0,0,.05);border-radius:2px}.CodeMirror .CodeMirror-code .cm-link{color:#7f8c8d}.CodeMirror .CodeMirror-code .cm-url{color:#aab2b3}.CodeMirror .CodeMirror-code .cm-strikethrough{text-decoration:line-through}.CodeMirror .CodeMirror-placeholder{opacity:.5}.CodeMirror .cm-spell-error:not(.cm-url):not(.cm-comment):not(.cm-tag):not(.cm-word){background:rgba(255,0,0,.15)}"; }); -define('highlight/lib/index',['require','exports','module','./highlight','./languages/1c','./languages/abnf','./languages/accesslog','./languages/actionscript','./languages/ada','./languages/apache','./languages/applescript','./languages/cpp','./languages/arduino','./languages/armasm','./languages/xml','./languages/asciidoc','./languages/aspectj','./languages/autohotkey','./languages/autoit','./languages/avrasm','./languages/awk','./languages/axapta','./languages/bash','./languages/basic','./languages/bnf','./languages/brainfuck','./languages/cal','./languages/capnproto','./languages/ceylon','./languages/clean','./languages/clojure','./languages/clojure-repl','./languages/cmake','./languages/coffeescript','./languages/coq','./languages/cos','./languages/crmsh','./languages/crystal','./languages/cs','./languages/csp','./languages/css','./languages/d','./languages/markdown','./languages/dart','./languages/delphi','./languages/diff','./languages/django','./languages/dns','./languages/dockerfile','./languages/dos','./languages/dsconfig','./languages/dts','./languages/dust','./languages/ebnf','./languages/elixir','./languages/elm','./languages/ruby','./languages/erb','./languages/erlang-repl','./languages/erlang','./languages/excel','./languages/fix','./languages/flix','./languages/fortran','./languages/fsharp','./languages/gams','./languages/gauss','./languages/gcode','./languages/gherkin','./languages/glsl','./languages/go','./languages/golo','./languages/gradle','./languages/groovy','./languages/haml','./languages/handlebars','./languages/haskell','./languages/haxe','./languages/hsp','./languages/htmlbars','./languages/http','./languages/inform7','./languages/ini','./languages/irpf90','./languages/java','./languages/javascript','./languages/json','./languages/julia','./languages/kotlin','./languages/lasso','./languages/ldif','./languages/less','./languages/lisp','./languages/livecodeserver','./languages/livescript','./languages/lsl','./languages/lua','./languages/makefile','./languages/mathematica','./languages/matlab','./languages/maxima','./languages/mel','./languages/mercury','./languages/mipsasm','./languages/mizar','./languages/perl','./languages/mojolicious','./languages/monkey','./languages/moonscript','./languages/nginx','./languages/nimrod','./languages/nix','./languages/nsis','./languages/objectivec','./languages/ocaml','./languages/openscad','./languages/oxygene','./languages/parser3','./languages/pf','./languages/php','./languages/pony','./languages/powershell','./languages/processing','./languages/profile','./languages/prolog','./languages/protobuf','./languages/puppet','./languages/purebasic','./languages/python','./languages/q','./languages/qml','./languages/r','./languages/rib','./languages/roboconf','./languages/rsl','./languages/ruleslanguage','./languages/rust','./languages/scala','./languages/scheme','./languages/scilab','./languages/scss','./languages/smali','./languages/smalltalk','./languages/sml','./languages/sqf','./languages/sql','./languages/stan','./languages/stata','./languages/step21','./languages/stylus','./languages/subunit','./languages/swift','./languages/taggerscript','./languages/yaml','./languages/tap','./languages/tcl','./languages/tex','./languages/thrift','./languages/tp','./languages/twig','./languages/typescript','./languages/vala','./languages/vbnet','./languages/vbscript','./languages/vbscript-html','./languages/verilog','./languages/vhdl','./languages/vim','./languages/x86asm','./languages/xl','./languages/xquery','./languages/zephir'],function (require, exports, module) {var hljs = require('./highlight'); - -hljs.registerLanguage('1c', require('./languages/1c')); -hljs.registerLanguage('abnf', require('./languages/abnf')); -hljs.registerLanguage('accesslog', require('./languages/accesslog')); -hljs.registerLanguage('actionscript', require('./languages/actionscript')); -hljs.registerLanguage('ada', require('./languages/ada')); -hljs.registerLanguage('apache', require('./languages/apache')); -hljs.registerLanguage('applescript', require('./languages/applescript')); -hljs.registerLanguage('cpp', require('./languages/cpp')); -hljs.registerLanguage('arduino', require('./languages/arduino')); -hljs.registerLanguage('armasm', require('./languages/armasm')); -hljs.registerLanguage('xml', require('./languages/xml')); -hljs.registerLanguage('asciidoc', require('./languages/asciidoc')); -hljs.registerLanguage('aspectj', require('./languages/aspectj')); -hljs.registerLanguage('autohotkey', require('./languages/autohotkey')); -hljs.registerLanguage('autoit', require('./languages/autoit')); -hljs.registerLanguage('avrasm', require('./languages/avrasm')); -hljs.registerLanguage('awk', require('./languages/awk')); -hljs.registerLanguage('axapta', require('./languages/axapta')); -hljs.registerLanguage('bash', require('./languages/bash')); -hljs.registerLanguage('basic', require('./languages/basic')); -hljs.registerLanguage('bnf', require('./languages/bnf')); -hljs.registerLanguage('brainfuck', require('./languages/brainfuck')); -hljs.registerLanguage('cal', require('./languages/cal')); -hljs.registerLanguage('capnproto', require('./languages/capnproto')); -hljs.registerLanguage('ceylon', require('./languages/ceylon')); -hljs.registerLanguage('clean', require('./languages/clean')); -hljs.registerLanguage('clojure', require('./languages/clojure')); -hljs.registerLanguage('clojure-repl', require('./languages/clojure-repl')); -hljs.registerLanguage('cmake', require('./languages/cmake')); -hljs.registerLanguage('coffeescript', require('./languages/coffeescript')); -hljs.registerLanguage('coq', require('./languages/coq')); -hljs.registerLanguage('cos', require('./languages/cos')); -hljs.registerLanguage('crmsh', require('./languages/crmsh')); -hljs.registerLanguage('crystal', require('./languages/crystal')); -hljs.registerLanguage('cs', require('./languages/cs')); -hljs.registerLanguage('csp', require('./languages/csp')); -hljs.registerLanguage('css', require('./languages/css')); -hljs.registerLanguage('d', require('./languages/d')); -hljs.registerLanguage('markdown', require('./languages/markdown')); -hljs.registerLanguage('dart', require('./languages/dart')); -hljs.registerLanguage('delphi', require('./languages/delphi')); -hljs.registerLanguage('diff', require('./languages/diff')); -hljs.registerLanguage('django', require('./languages/django')); -hljs.registerLanguage('dns', require('./languages/dns')); -hljs.registerLanguage('dockerfile', require('./languages/dockerfile')); -hljs.registerLanguage('dos', require('./languages/dos')); -hljs.registerLanguage('dsconfig', require('./languages/dsconfig')); -hljs.registerLanguage('dts', require('./languages/dts')); -hljs.registerLanguage('dust', require('./languages/dust')); -hljs.registerLanguage('ebnf', require('./languages/ebnf')); -hljs.registerLanguage('elixir', require('./languages/elixir')); -hljs.registerLanguage('elm', require('./languages/elm')); -hljs.registerLanguage('ruby', require('./languages/ruby')); -hljs.registerLanguage('erb', require('./languages/erb')); -hljs.registerLanguage('erlang-repl', require('./languages/erlang-repl')); -hljs.registerLanguage('erlang', require('./languages/erlang')); -hljs.registerLanguage('excel', require('./languages/excel')); -hljs.registerLanguage('fix', require('./languages/fix')); -hljs.registerLanguage('flix', require('./languages/flix')); -hljs.registerLanguage('fortran', require('./languages/fortran')); -hljs.registerLanguage('fsharp', require('./languages/fsharp')); -hljs.registerLanguage('gams', require('./languages/gams')); -hljs.registerLanguage('gauss', require('./languages/gauss')); -hljs.registerLanguage('gcode', require('./languages/gcode')); -hljs.registerLanguage('gherkin', require('./languages/gherkin')); -hljs.registerLanguage('glsl', require('./languages/glsl')); -hljs.registerLanguage('go', require('./languages/go')); -hljs.registerLanguage('golo', require('./languages/golo')); -hljs.registerLanguage('gradle', require('./languages/gradle')); -hljs.registerLanguage('groovy', require('./languages/groovy')); -hljs.registerLanguage('haml', require('./languages/haml')); -hljs.registerLanguage('handlebars', require('./languages/handlebars')); -hljs.registerLanguage('haskell', require('./languages/haskell')); -hljs.registerLanguage('haxe', require('./languages/haxe')); -hljs.registerLanguage('hsp', require('./languages/hsp')); -hljs.registerLanguage('htmlbars', require('./languages/htmlbars')); -hljs.registerLanguage('http', require('./languages/http')); -hljs.registerLanguage('inform7', require('./languages/inform7')); -hljs.registerLanguage('ini', require('./languages/ini')); -hljs.registerLanguage('irpf90', require('./languages/irpf90')); -hljs.registerLanguage('java', require('./languages/java')); -hljs.registerLanguage('javascript', require('./languages/javascript')); -hljs.registerLanguage('json', require('./languages/json')); -hljs.registerLanguage('julia', require('./languages/julia')); -hljs.registerLanguage('kotlin', require('./languages/kotlin')); -hljs.registerLanguage('lasso', require('./languages/lasso')); -hljs.registerLanguage('ldif', require('./languages/ldif')); -hljs.registerLanguage('less', require('./languages/less')); -hljs.registerLanguage('lisp', require('./languages/lisp')); -hljs.registerLanguage('livecodeserver', require('./languages/livecodeserver')); -hljs.registerLanguage('livescript', require('./languages/livescript')); -hljs.registerLanguage('lsl', require('./languages/lsl')); -hljs.registerLanguage('lua', require('./languages/lua')); -hljs.registerLanguage('makefile', require('./languages/makefile')); -hljs.registerLanguage('mathematica', require('./languages/mathematica')); -hljs.registerLanguage('matlab', require('./languages/matlab')); -hljs.registerLanguage('maxima', require('./languages/maxima')); -hljs.registerLanguage('mel', require('./languages/mel')); -hljs.registerLanguage('mercury', require('./languages/mercury')); -hljs.registerLanguage('mipsasm', require('./languages/mipsasm')); -hljs.registerLanguage('mizar', require('./languages/mizar')); -hljs.registerLanguage('perl', require('./languages/perl')); -hljs.registerLanguage('mojolicious', require('./languages/mojolicious')); -hljs.registerLanguage('monkey', require('./languages/monkey')); -hljs.registerLanguage('moonscript', require('./languages/moonscript')); -hljs.registerLanguage('nginx', require('./languages/nginx')); -hljs.registerLanguage('nimrod', require('./languages/nimrod')); -hljs.registerLanguage('nix', require('./languages/nix')); -hljs.registerLanguage('nsis', require('./languages/nsis')); -hljs.registerLanguage('objectivec', require('./languages/objectivec')); -hljs.registerLanguage('ocaml', require('./languages/ocaml')); -hljs.registerLanguage('openscad', require('./languages/openscad')); -hljs.registerLanguage('oxygene', require('./languages/oxygene')); -hljs.registerLanguage('parser3', require('./languages/parser3')); -hljs.registerLanguage('pf', require('./languages/pf')); -hljs.registerLanguage('php', require('./languages/php')); -hljs.registerLanguage('pony', require('./languages/pony')); -hljs.registerLanguage('powershell', require('./languages/powershell')); -hljs.registerLanguage('processing', require('./languages/processing')); -hljs.registerLanguage('profile', require('./languages/profile')); -hljs.registerLanguage('prolog', require('./languages/prolog')); -hljs.registerLanguage('protobuf', require('./languages/protobuf')); -hljs.registerLanguage('puppet', require('./languages/puppet')); -hljs.registerLanguage('purebasic', require('./languages/purebasic')); -hljs.registerLanguage('python', require('./languages/python')); -hljs.registerLanguage('q', require('./languages/q')); -hljs.registerLanguage('qml', require('./languages/qml')); -hljs.registerLanguage('r', require('./languages/r')); -hljs.registerLanguage('rib', require('./languages/rib')); -hljs.registerLanguage('roboconf', require('./languages/roboconf')); -hljs.registerLanguage('rsl', require('./languages/rsl')); -hljs.registerLanguage('ruleslanguage', require('./languages/ruleslanguage')); -hljs.registerLanguage('rust', require('./languages/rust')); -hljs.registerLanguage('scala', require('./languages/scala')); -hljs.registerLanguage('scheme', require('./languages/scheme')); -hljs.registerLanguage('scilab', require('./languages/scilab')); -hljs.registerLanguage('scss', require('./languages/scss')); -hljs.registerLanguage('smali', require('./languages/smali')); -hljs.registerLanguage('smalltalk', require('./languages/smalltalk')); -hljs.registerLanguage('sml', require('./languages/sml')); -hljs.registerLanguage('sqf', require('./languages/sqf')); -hljs.registerLanguage('sql', require('./languages/sql')); -hljs.registerLanguage('stan', require('./languages/stan')); -hljs.registerLanguage('stata', require('./languages/stata')); -hljs.registerLanguage('step21', require('./languages/step21')); -hljs.registerLanguage('stylus', require('./languages/stylus')); -hljs.registerLanguage('subunit', require('./languages/subunit')); -hljs.registerLanguage('swift', require('./languages/swift')); -hljs.registerLanguage('taggerscript', require('./languages/taggerscript')); -hljs.registerLanguage('yaml', require('./languages/yaml')); -hljs.registerLanguage('tap', require('./languages/tap')); -hljs.registerLanguage('tcl', require('./languages/tcl')); -hljs.registerLanguage('tex', require('./languages/tex')); -hljs.registerLanguage('thrift', require('./languages/thrift')); -hljs.registerLanguage('tp', require('./languages/tp')); -hljs.registerLanguage('twig', require('./languages/twig')); -hljs.registerLanguage('typescript', require('./languages/typescript')); -hljs.registerLanguage('vala', require('./languages/vala')); -hljs.registerLanguage('vbnet', require('./languages/vbnet')); -hljs.registerLanguage('vbscript', require('./languages/vbscript')); -hljs.registerLanguage('vbscript-html', require('./languages/vbscript-html')); -hljs.registerLanguage('verilog', require('./languages/verilog')); -hljs.registerLanguage('vhdl', require('./languages/vhdl')); -hljs.registerLanguage('vim', require('./languages/vim')); -hljs.registerLanguage('x86asm', require('./languages/x86asm')); -hljs.registerLanguage('xl', require('./languages/xl')); -hljs.registerLanguage('xquery', require('./languages/xquery')); -hljs.registerLanguage('zephir', require('./languages/zephir')); - -module.exports = hljs; -}); -;define('highlight', ['highlight/lib/index'], function (main) { return main; }); - -define('text!highlight/styles/github.css', ['module'], function(module) { module.exports = "/*\n\ngithub.com style (c) Vasily Polovnyov \n\n*/\n\n.hljs {\n display: block;\n overflow-x: auto;\n padding: 0.5em;\n color: #333;\n background: #f8f8f8;\n}\n\n.hljs-comment,\n.hljs-quote {\n color: #998;\n font-style: italic;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-subst {\n color: #333;\n font-weight: bold;\n}\n\n.hljs-number,\n.hljs-literal,\n.hljs-variable,\n.hljs-template-variable,\n.hljs-tag .hljs-attr {\n color: #008080;\n}\n\n.hljs-string,\n.hljs-doctag {\n color: #d14;\n}\n\n.hljs-title,\n.hljs-section,\n.hljs-selector-id {\n color: #900;\n font-weight: bold;\n}\n\n.hljs-subst {\n font-weight: normal;\n}\n\n.hljs-type,\n.hljs-class .hljs-title {\n color: #458;\n font-weight: bold;\n}\n\n.hljs-tag,\n.hljs-name,\n.hljs-attribute {\n color: #000080;\n font-weight: normal;\n}\n\n.hljs-regexp,\n.hljs-link {\n color: #009926;\n}\n\n.hljs-symbol,\n.hljs-bullet {\n color: #990073;\n}\n\n.hljs-built_in,\n.hljs-builtin-name {\n color: #0086b3;\n}\n\n.hljs-meta {\n color: #999;\n font-weight: bold;\n}\n\n.hljs-deletion {\n background: #fdd;\n}\n\n.hljs-addition {\n background: #dfd;\n}\n\n.hljs-emphasis {\n font-style: italic;\n}\n\n.hljs-strong {\n font-weight: bold;\n}\n"; }); -/*jslint browser: true*/ -/*jslint jquery: true*/ - -/* - * jQuery Hotkeys Plugin - * Copyright 2010, John Resig - * Dual licensed under the MIT or GPL Version 2 licenses. - * - * Based upon the plugin by Tzury Bar Yochay: - * https://github.com/tzuryby/jquery.hotkeys - * - * Original idea by: - * Binny V A, http://www.openjs.com/scripts/events/keyboard_shortcuts/ - */ - -/* - * One small change is: now keys are passed by object { keys: '...' } - * Might be useful, when you want to pass some other data to your handler - */ - -(function(jQuery) { - - jQuery.hotkeys = { - version: "0.2.0", - - specialKeys: { - 8: "backspace", - 9: "tab", - 10: "return", - 13: "return", - 16: "shift", - 17: "ctrl", - 18: "alt", - 19: "pause", - 20: "capslock", - 27: "esc", - 32: "space", - 33: "pageup", - 34: "pagedown", - 35: "end", - 36: "home", - 37: "left", - 38: "up", - 39: "right", - 40: "down", - 45: "insert", - 46: "del", - 59: ";", - 61: "=", - 96: "0", - 97: "1", - 98: "2", - 99: "3", - 100: "4", - 101: "5", - 102: "6", - 103: "7", - 104: "8", - 105: "9", - 106: "*", - 107: "+", - 109: "-", - 110: ".", - 111: "/", - 112: "f1", - 113: "f2", - 114: "f3", - 115: "f4", - 116: "f5", - 117: "f6", - 118: "f7", - 119: "f8", - 120: "f9", - 121: "f10", - 122: "f11", - 123: "f12", - 144: "numlock", - 145: "scroll", - 173: "-", - 186: ";", - 187: "=", - 188: ",", - 189: "-", - 190: ".", - 191: "/", - 192: "`", - 219: "[", - 220: "\\", - 221: "]", - 222: "'" - }, - - shiftNums: { - "`": "~", - "1": "!", - "2": "@", - "3": "#", - "4": "$", - "5": "%", - "6": "^", - "7": "&", - "8": "*", - "9": "(", - "0": ")", - "-": "_", - "=": "+", - ";": ": ", - "'": "\"", - ",": "<", - ".": ">", - "/": "?", - "\\": "|" - }, - - // excludes: button, checkbox, file, hidden, image, password, radio, reset, search, submit, url - textAcceptingInputTypes: [ - "text", "password", "number", "email", "url", "range", "date", "month", "week", "time", "datetime", - "datetime-local", "search", "color", "tel"], - - // default input types not to bind to unless bound directly - textInputTypes: /textarea|input|select/i, - - options: { - filterInputAcceptingElements: true, - filterTextInputs: true, - filterContentEditable: true - } - }; - - function keyHandler(handleObj) { - if (typeof handleObj.data === "string") { - handleObj.data = { - keys: handleObj.data - }; - } - - // Only care when a possible input has been specified - if (!handleObj.data || !handleObj.data.keys || typeof handleObj.data.keys !== "string") { - return; - } - - var origHandler = handleObj.handler, - keys = handleObj.data.keys.toLowerCase().split(" "); - - handleObj.handler = function(event) { - // Don't fire in text-accepting inputs that we didn't directly bind to - if (this !== event.target && - (jQuery.hotkeys.options.filterInputAcceptingElements && - jQuery.hotkeys.textInputTypes.test(event.target.nodeName) || - (jQuery.hotkeys.options.filterContentEditable && jQuery(event.target).attr('contenteditable')) || - (jQuery.hotkeys.options.filterTextInputs && - jQuery.inArray(event.target.type, jQuery.hotkeys.textAcceptingInputTypes) > -1))) { - return; - } - - var special = event.type !== "keypress" && jQuery.hotkeys.specialKeys[event.which], - character = String.fromCharCode(event.which).toLowerCase(), - modif = "", - possible = {}; - - jQuery.each(["alt", "ctrl", "shift"], function(index, specialKey) { - - if (event[specialKey + 'Key'] && special !== specialKey) { - modif += specialKey + '+'; - } - }); - - // metaKey is triggered off ctrlKey erronously - if (event.metaKey && !event.ctrlKey && special !== "meta") { - modif += "meta+"; - } - - if (event.metaKey && special !== "meta" && modif.indexOf("alt+ctrl+shift+") > -1) { - modif = modif.replace("alt+ctrl+shift+", "hyper+"); - } - - if (special) { - possible[modif + special] = true; - } - else { - possible[modif + character] = true; - possible[modif + jQuery.hotkeys.shiftNums[character]] = true; - - // "$" can be triggered as "Shift+4" or "Shift+$" or just "$" - if (modif === "shift+") { - possible[jQuery.hotkeys.shiftNums[character]] = true; - } - } - - for (var i = 0, l = keys.length; i < l; i++) { - if (possible[keys[i]]) { - return origHandler.apply(this, arguments); - } - } - }; - } - - jQuery.each(["keydown", "keyup", "keypress"], function() { - jQuery.event.special[this] = { - add: keyHandler - }; - }); - -})(jQuery || this.jQuery || window.jQuery); - -define("hotkeys/jquery.hotkeys", ["jquery"], function(){}); -;define('hotkeys', ['hotkeys/jquery.hotkeys'], function (main) { return main; }); - -/* - A simple, lightweight jQuery plugin for creating sortable tables. - https://github.com/kylefox/jquery-tablesort - Version 0.0.11 -*/ - -(function($) { - $.tablesort = function ($table, settings) { - var self = this; - this.$table = $table; - this.$thead = this.$table.find('thead'); - this.settings = $.extend({}, $.tablesort.defaults, settings); - this.$sortCells = this.$thead.length > 0 ? this.$thead.find('th:not(.no-sort)') : this.$table.find('th:not(.no-sort)'); - this.$sortCells.on('click.tablesort', function() { - self.sort($(this)); - }); - this.index = null; - this.$th = null; - this.direction = null; - }; - - $.tablesort.prototype = { - - sort: function(th, direction) { - var start = new Date(), - self = this, - table = this.$table, - rowsContainer = table.find('tbody').length > 0 ? table.find('tbody') : table, - rows = rowsContainer.find('tr').has('td, th'), - cells = rows.find(':nth-child(' + (th.index() + 1) + ')').filter('td, th'), - sortBy = th.data().sortBy, - sortedMap = []; - - var unsortedValues = cells.map(function(idx, cell) { - if (sortBy) - return (typeof sortBy === 'function') ? sortBy($(th), $(cell), self) : sortBy; - return ($(this).data().sortValue != null ? $(this).data().sortValue : $(this).text()); - }); - if (unsortedValues.length === 0) return; - - //click on a different column - if (this.index !== th.index()) { - this.direction = 'asc'; - this.index = th.index(); - } - else if (direction !== 'asc' && direction !== 'desc') - this.direction = this.direction === 'asc' ? 'desc' : 'asc'; - else - this.direction = direction; - - direction = this.direction == 'asc' ? 1 : -1; - - self.$table.trigger('tablesort:start', [self]); - self.log("Sorting by " + this.index + ' ' + this.direction); - - // Try to force a browser redraw - self.$table.css("display"); - // Run sorting asynchronously on a timeout to force browser redraw after - // `tablesort:start` callback. Also avoids locking up the browser too much. - setTimeout(function() { - self.$sortCells.removeClass(self.settings.asc + ' ' + self.settings.desc); - for (var i = 0, length = unsortedValues.length; i < length; i++) - { - sortedMap.push({ - index: i, - cell: cells[i], - row: rows[i], - value: unsortedValues[i] - }); - } - - sortedMap.sort(function(a, b) { - return self.settings.compare(a.value, b.value) * direction; - }); - - $.each(sortedMap, function(i, entry) { - rowsContainer.append(entry.row); - }); - - th.addClass(self.settings[self.direction]); - - self.log('Sort finished in ' + ((new Date()).getTime() - start.getTime()) + 'ms'); - self.$table.trigger('tablesort:complete', [self]); - //Try to force a browser redraw - self.$table.css("display"); - }, unsortedValues.length > 2000 ? 200 : 10); - }, - - log: function(msg) { - if(($.tablesort.DEBUG || this.settings.debug) && console && console.log) { - console.log('[tablesort] ' + msg); - } - }, - - destroy: function() { - this.$sortCells.off('click.tablesort'); - this.$table.data('tablesort', null); - return null; - } - - }; - - $.tablesort.DEBUG = false; - - $.tablesort.defaults = { - debug: $.tablesort.DEBUG, - asc: 'sorted ascending', - desc: 'sorted descending', - compare: function(a, b) { - if (a > b) { - return 1; - } else if (a < b) { - return -1; - } else { - return 0; - } - } - }; - - $.fn.tablesort = function(settings) { - var table, sortable, previous; - return this.each(function() { - table = $(this); - previous = table.data('tablesort'); - if(previous) { - previous.destroy(); - } - table.data('tablesort', new $.tablesort(table, settings)); - }); - }; - -})(window.Zepto || window.jQuery); - -define("tablesort/jquery.tablesort", ["jquery"], function(){}); -;define('tablesort', ['tablesort/jquery.tablesort'], function (main) { return main; }); - -/*! - Modaal - accessible modals - v0.3.1 - by Humaan, for all humans. - http://humaan.com - */ -!function(a){var t='
    ',o={init:function(t,o){var e=this;e.dom=a("body"),e.$elem=a(o),e.options=a.extend({},a.fn.modaal.options,e.$elem.data(),t),e.xhr=null,e.scope={is_open:!1,id:"modaal_"+(new Date).getTime()+Math.random().toString(16).substring(2)},e.$elem.attr("data-modaal-scope",e.scope.id),e.private_options={active_class:"is_active"},e.lastFocus=null,e.options.is_locked||"confirm"==e.options.type||e.options.hide_close?e.scope.close_btn="":e.scope.close_btn='","none"===e.options.animation&&(e.options.animation_speed=0,e.options.after_callback_delay=0),a(o).on("click.Modaal",function(a){a.preventDefault();var t;if(e.lastFocus=document.activeElement,e.options.should_open!==!1&&("function"!=typeof e.options.should_open||e.options.should_open()!==!1)){switch(e.options.before_open.call(e,a),e.options.type){case"inline":e.create_basic();break;case"ajax":t=e.options.source(e.$elem,e.$elem.attr("href")),e.fetch_ajax(t);break;case"confirm":e.options.is_locked=!0,e.create_confirm();break;case"image":e.create_image();break;case"iframe":t=e.options.source(e.$elem,e.$elem.attr("href")),e.create_iframe(t);break;case"video":e.create_video(e.$elem.attr("href"));break;case"instagram":e.create_instagram()}e.watch_events()}}),e.options.start_open===!0&&a(o).click()},watch_events:function(){var t=this;t.dom.off("click.Modaal keyup.Modaal keydown.Modaal"),t.dom.on("keydown.Modaal",function(o){var e=o.keyCode,i=o.target;9==e&&t.scope.is_open&&(a.contains(document.getElementById(t.scope.id),i)||a("#"+t.scope.id).find('*[tabindex="0"]').focus())}),t.dom.on("keyup.Modaal",function(o){var e=o.keyCode,i=o.target;return o.shiftKey&&9==o.keyCode&&t.scope.is_open&&(a.contains(document.getElementById(t.scope.id),i)||a("#"+t.scope.id).find(".modaal-close").focus()),!t.options.is_locked&&27==e&&t.scope.is_open?a(document.activeElement).is("input:not(:checkbox):not(:radio)")?!1:void t.modaal_close():"image"==t.options.type?(37==e&&t.scope.is_open&&!a("#"+t.scope.id+" .modaal-gallery-prev").hasClass("is_hidden")&&t.gallery_update("prev"),void(39==e&&t.scope.is_open&&!a("#"+t.scope.id+" .modaal-gallery-next").hasClass("is_hidden")&&t.gallery_update("next"))):void 0}),t.dom.on("click.Modaal",function(o){var e=a(o.target);if(!t.options.is_locked&&(t.options.overlay_close&&e.is(".modaal-inner-wrapper")||e.is(".modaal-close")||e.closest(".modaal-close").length))return void t.modaal_close();if(e.is(".modaal-confirm-btn"))return e.is(".modaal-ok")&&t.options.confirm_callback.call(t,t.lastFocus),e.is(".modaal-cancel")&&t.options.confirm_cancel_callback.call(t,t.lastFocus),void t.modaal_close();if(e.is(".modaal-gallery-control")){if(e.hasClass("is_hidden"))return;return e.is(".modaal-gallery-prev")&&t.gallery_update("prev"),void(e.is(".modaal-gallery-next")&&t.gallery_update("next"))}})},build_modal:function(a){var t=this,o="";"instagram"==t.options.type&&(o=" modaal-instagram");var e,i="video"==t.options.type?"modaal-video-wrap":"modaal-content";switch(t.options.animation){case"fade":e=" modaal-start_fade";break;case"slide-down":e=" modaal-start_slidedown";break;default:e=" modaal-start_none"}var l="";t.options.fullscreen&&(l=" modaal-fullscreen"),""===t.options.custom_class&&"undefined"==typeof t.options.custom_class||(t.options.custom_class=" "+t.options.custom_class);var s="";t.options.width&&t.options.height&&"number"==typeof t.options.width&&"number"==typeof t.options.height?s=' style="max-width:'+t.options.width+"px;height:"+t.options.height+'px;overflow:auto;"':t.options.width&&"number"==typeof t.options.width?s=' style="max-width:'+t.options.width+'px;"':t.options.height&&"number"==typeof t.options.height&&(s=' style="height:'+t.options.height+'px;overflow:auto;"'),("image"==t.options.type||"video"==t.options.type||"instagram"==t.options.type||t.options.fullscreen)&&(s="");var n='
    ';"video"!=t.options.type&&(n+='
    "),n+='"+t.scope.close_btn,"video"!=t.options.type&&(n+="
    "),n+="
    ",t.dom.append(n),"inline"==t.options.type&&a.appendTo("#"+t.scope.id+" .modaal-content-container"),t.modaal_overlay("show")},create_basic:function(){var t=this,o=t.$elem.is("[href]")?a(t.$elem.attr("href")):t.$elem,e="";o.length?(e=o.contents().clone(!0,!0),o.empty()):e="Content could not be loaded. Please check the source and try again.",t.build_modal(e)},create_instagram:function(){var t=this,o=t.options.instagram_id,e="",i="Instagram photo couldn't be loaded, please check the embed code and try again.";if(t.build_modal('
    '+t.options.loading_content+"
    "),""!=o&&null!==o&&void 0!==o){var l="https://api.instagram.com/oembed?url=http://instagr.am/p/"+o+"/";a.ajax({url:l,dataType:"jsonp",cache:!1,success:function(o){e=o.html;var i=a("#"+t.scope.id+" .modaal-content-container");i.length>0&&(i.removeClass(t.options.loading_class),i.html(e),window.instgrm.Embeds.process())},error:function(){e=i;var o=a("#"+t.scope.id+" .modaal-content-container");o.length>0&&(o.removeClass(t.options.loading_class).addClass(t.options.ajax_error_class),o.html(e))}})}else e=i;return!1},fetch_ajax:function(t){var o=this;null==o.options.accessible_title&&(o.options.accessible_title="Dialog Window"),null!==o.xhr&&(o.xhr.abort(),o.xhr=null),o.build_modal('
    '+o.options.loading_content+"
    "),o.xhr=a.ajax(t,{success:function(t){var e=a("#"+o.scope.id).find(".modaal-content-container");e.length>0&&(e.removeClass(o.options.loading_class),e.html(t),o.options.ajax_success.call(o,e))},error:function(t){if("abort"!=t.statusText){var e=a("#"+o.scope.id+" .modaal-content-container");e.length>0&&(e.removeClass(o.options.loading_class).addClass(o.options.ajax_error_class),e.html("Content could not be loaded. Please check the source and try again."))}}})},create_confirm:function(){var a,t=this;a='

    '+t.options.confirm_title+'

    '+t.options.confirm_content+'
    ",t.build_modal(a)},create_image:function(){var t,o,e=this,i="",l='',s='';if(e.$elem.is("[rel]")){var n=e.$elem.attr("rel"),d=a('[rel="'+n+'"]');d.removeAttr("data-gallery-active","is_active"),e.$elem.attr("data-gallery-active","is_active"),o=d.length-1;var r=[];i='"}i+="
    "+l+s}else{var _=e.$elem.attr("href"),v="",f="",p="";e.$elem.attr("data-modaal-desc")?(p=e.$elem.attr("data-modaal-desc"),v=e.$elem.attr("data-modaal-desc"),f='"):p="Image with no description",i='"}t=i,e.build_modal(t),a(".modaal-gallery-item.is_active").is(".gallery-item-0")&&a(".modaal-gallery-prev").hide(),a(".modaal-gallery-item.is_active").is(".gallery-item-"+o)&&a(".modaal-gallery-next").hide()},gallery_update:function(t){var o=this,e=a("#"+o.scope.id),i=e.find(".modaal-gallery-item"),l=i.length-1;if(0==l)return!1;var s=e.find(".modaal-gallery-prev"),n=e.find(".modaal-gallery-next"),d=250,r=0,c=0,m=e.find(".modaal-gallery-item."+o.private_options.active_class),p="next"==t?m.next(".modaal-gallery-item"):m.prev(".modaal-gallery-item");return o.options.before_image_change.call(o,m,p),"prev"==t&&e.find(".gallery-item-0").hasClass("is_active")?!1:"next"==t&&e.find(".gallery-item-"+l).hasClass("is_active")?!1:void m.stop().animate({opacity:0},d,function(){p.addClass("is_next").css({position:"absolute",display:"block",opacity:0});var t=a(document).width(),i=t>1140?280:50;r=e.find(".modaal-gallery-item.is_next").width(),c=e.find(".modaal-gallery-item.is_next").height();var _=e.find(".modaal-gallery-item.is_next img").prop("naturalWidth"),v=e.find(".modaal-gallery-item.is_next img").prop("naturalHeight");_>t-i?(r=t-i,e.find(".modaal-gallery-item.is_next").css({width:r}),e.find(".modaal-gallery-item.is_next img").css({width:r}),c=e.find(".modaal-gallery-item.is_next").find("img").height()):(r=_,c=v),e.find(".modaal-gallery-item-wrap").stop().animate({width:r,height:c},d,function(){m.removeClass(o.private_options.active_class+" "+o.options.gallery_active_class).removeAttr("style"),m.find("img").removeAttr("style"),p.addClass(o.private_options.active_class+" "+o.options.gallery_active_class).removeClass("is_next").css("position",""),p.stop().animate({opacity:1},d,function(){a(this).removeAttr("style").css({width:"100%"}),a(this).find("img").css("width","100%"),e.find(".modaal-gallery-item-wrap").removeAttr("style"),o.options.after_image_change.call(o,p)}),e.find(".modaal-gallery-item").removeAttr("tabindex"),e.find(".modaal-gallery-item."+o.private_options.active_class).attr("tabindex","0").focus(),e.find(".modaal-gallery-item."+o.private_options.active_class).is(".gallery-item-0")?s.stop().animate({opacity:0},150,function(){a(this).hide()}):s.stop().css({display:"block",opacity:s.css("opacity")}).animate({opacity:1},150),e.find(".modaal-gallery-item."+o.private_options.active_class).is(".gallery-item-"+l)?n.stop().animate({opacity:0},150,function(){a(this).hide()}):n.stop().css({display:"block",opacity:s.css("opacity")}).animate({opacity:1},150)})})},create_video:function(a){var t,o=this;t='',o.build_modal('
    '+t+"
    ")},create_iframe:function(a){var t,o=this;t=null!==o.options.width||void 0!==o.options.width||null!==o.options.height||void 0!==o.options.height?'':'
    Please specify a width and height for your iframe
    ',o.build_modal(t)},modaal_open:function(){var t=this,o=a("#"+t.scope.id),e=t.options.animation;"none"===e&&(o.removeClass("modaal-start_none"),t.options.after_open.call(t,o)),"fade"===e&&o.removeClass("modaal-start_fade"),"slide-down"===e&&o.removeClass("modaal-start_slide_down");var i=o;a(".modaal-wrapper *[tabindex=0]").removeAttr("tabindex"),i="image"==t.options.type?a("#"+t.scope.id).find(".modaal-gallery-item."+t.private_options.active_class):o.find(".modaal-iframe-elem").length?o.find(".modaal-iframe-elem"):o.find(".modaal-video-wrap").length?o.find(".modaal-video-wrap"):o.find(".modaal-focus"),i.attr("tabindex","0").focus(),"none"!==e&&setTimeout(function(){t.options.after_open.call(t,o)},t.options.after_callback_delay)},modaal_close:function(){var t=this,o=a("#"+t.scope.id);t.options.before_close.call(t,o),null!==t.xhr&&(t.xhr.abort(),t.xhr=null),"none"===t.options.animation&&o.addClass("modaal-start_none"),"fade"===t.options.animation&&o.addClass("modaal-start_fade"),"slide-down"===t.options.animation&&o.addClass("modaal-start_slide_down"),setTimeout(function(){"inline"==t.options.type&&a("#"+t.scope.id+" .modaal-content-container").contents().clone(!0,!0).appendTo(t.$elem.attr("href")),o.remove(),t.options.after_close.call(t),t.scope.is_open=!1},t.options.after_callback_delay),t.modaal_overlay("hide"),null!=t.lastFocus&&t.lastFocus.focus()},modaal_overlay:function(t){var o=this;"show"==t?(o.scope.is_open=!0,o.options.background_scroll||o.dom.addClass("modaal-noscroll"),o.dom.append('
    '),a("#"+o.scope.id+"_overlay").css("background",o.options.background).stop().animate({opacity:o.options.overlay_opacity},o.options.animation_speed,function(){o.modaal_open()})):"hide"==t&&(o.dom.removeClass("modaal-noscroll"),a("#"+o.scope.id+"_overlay").stop().animate({opacity:0},o.options.animation_speed,function(){a(this).remove()}))}};a.fn.modaal=function(t){return this.each(function(){var e=a(this).data("modaal");if(e){if("string"==typeof t)switch(t){case"close":e.modaal_close()}}else{var i=Object.create(o);i.init(t,this),a.data(this,"modaal",i)}})},a.fn.modaal.options={type:"inline",animation:"fade",animation_speed:300,after_callback_delay:350,is_locked:!1,hide_close:!1,background:"#000",overlay_opacity:"0.8",overlay_close:!0,accessible_title:"Dialog Window",start_open:!1,fullscreen:!1,custom_class:"",background_scroll:!1,should_open:!0,close_text:"Close",close_aria_label:"Close (Press escape to close)",width:null,height:null,before_open:function(){},after_open:function(){},before_close:function(){},after_close:function(){},source:function(a,t){return t},confirm_button_text:"Confirm",confirm_cancel_button_text:"Cancel",confirm_title:"Confirm Title",confirm_content:"

    This is the default confirm dialog content. Replace me through the options

    ",confirm_callback:function(){},confirm_cancel_callback:function(){},gallery_active_class:"gallery_active_item",before_image_change:function(a,t){},after_image_change:function(a){},loading_content:t,loading_class:"is_loading",ajax_error_class:"modaal-error",ajax_success:function(){},instagram_id:null},a(function(){var t=a(".modaal");t.length&&t.each(function(){var t=a(this),o={},e=!1;t.attr("data-modaal-type")&&(e=!0,o.type=t.attr("data-modaal-type")),t.attr("data-modaal-animation")&&(e=!0,o.animation=t.attr("data-modaal-animation")),t.attr("data-modaal-animation-speed")&&(e=!0,o.animation_speed=t.attr("data-modaal-animation-speed")),t.attr("data-modaal-after-callback-delay")&&(e=!0,o.after_callback_delay=t.attr("data-modaal-after-callback-delay")),t.attr("data-modaal-is-locked")&&(e=!0,o.is_locked="true"===t.attr("data-modaal-is-locked")),t.attr("data-modaal-hide-close")&&(e=!0,o.hide_close="true"===t.attr("data-modaal-hide-close")),t.attr("data-modaal-background")&&(e=!0,o.background=t.attr("data-modaal-background")),t.attr("data-modaal-overlay-opacity")&&(e=!0,o.overlay_opacity=t.attr("data-modaal-overlay-opacity")),t.attr("data-modaal-overlay-close")&&(e=!0,o.overlay_close="false"!==t.attr("data-modaal-overlay-close")),t.attr("data-modaal-accessible-title")&&(e=!0,o.accessible_title=t.attr("data-modaal-accessible-title")),t.attr("data-modaal-start-open")&&(e=!0,o.start_open="true"===t.attr("data-modaal-start-open")),t.attr("data-modaal-fullscreen")&&(e=!0,o.fullscreen="true"===t.attr("data-modaal-fullscreen")),t.attr("data-modaal-custom-class")&&(e=!0,o.custom_class=t.attr("data-modaal-custom-class")),t.attr("data-modaal-close-text")&&(e=!0,o.close_text=t.attr("data-modaal-close-text")),t.attr("data-modaal-close-aria-label")&&(e=!0,o.close_aria_label=t.attr("data-modaal-close-aria-label")),t.attr("data-modaal-background-scroll")&&(e=!0,o.background_scroll="true"===t.attr("data-modaal-background-scroll")),t.attr("data-modaal-width")&&(e=!0,o.width=parseInt(t.attr("data-modaal-width"))),t.attr("data-modaal-height")&&(e=!0,o.height=parseInt(t.attr("data-modaal-height"))),t.attr("data-modaal-confirm-button-text")&&(e=!0,o.confirm_button_text=t.attr("data-modaal-confirm-button-text")),t.attr("data-modaal-confirm-cancel-button-text")&&(e=!0,o.confirm_cancel_button_text=t.attr("data-modaal-confirm-cancel-button-text")),t.attr("data-modaal-confirm-title")&&(e=!0,o.confirm_title=t.attr("data-modaal-confirm-title")),t.attr("data-modaal-confirm-content")&&(e=!0,o.confirm_content=t.attr("data-modaal-confirm-content")),t.attr("data-modaal-gallery-active-class")&&(e=!0,o.gallery_active_class=t.attr("data-modaal-gallery-active-class")),t.attr("data-modaal-loading-content")&&(e=!0,o.loading_content=t.attr("data-modaal-loading-content")),t.attr("data-modaal-loading-class")&&(e=!0,o.loading_class=t.attr("data-modaal-loading-class")),t.attr("data-modaal-ajax-error-class")&&(e=!0,o.ajax_error_class=t.attr("data-modaal-ajax-error-class")),t.attr("data-modaal-instagram-id")&&(e=!0,o.instagram_id=t.attr("data-modaal-instagram-id")),e&&t.modaal(o)})})}(jQuery,window,document); -define("modaal/dist/js/modaal.min", ["jquery"], function(){}); -;define('modaal', ['modaal/dist/js/modaal.min'], function (main) { return main; }); - -define('text!modaal/dist/css/modaal.min.css', ['module'], function(module) { module.exports = "/*!\n\tModaal - accessible modals - v0.3.1\n\tby Humaan, for all humans.\n\thttp://humaan.com\n */\n.modaal-noscroll{overflow:hidden}.modaal-accessible-hide,.modaal-close span,.modaal-gallery-control span{position:absolute!important;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px);padding:0!important;border:0!important;height:1px!important;width:1px!important;overflow:hidden}.modaal-overlay,.modaal-wrapper{position:fixed;top:0;left:0;width:100%;height:100%;z-index:999;opacity:0}.modaal-wrapper{display:block;z-index:9999;overflow:auto;opacity:1;box-sizing:border-box;-webkit-overflow-scrolling:touch;transition:all .3s ease-in-out}.modaal-wrapper *{box-sizing:border-box;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-backface-visibility:hidden}.modaal-wrapper .modaal-close{border:none;background:0 0;padding:0;-webkit-appearance:none}.modaal-wrapper.modaal-start_none{display:none;opacity:1}.modaal-wrapper.modaal-start_fade{opacity:0}.modaal-wrapper [tabindex=\"0\"]{outline:none!important}.modaal-wrapper.modaal-fullscreen{overflow:hidden}.modaal-outer-wrapper{display:table;position:relative;width:100%;height:100%}.modaal-fullscreen .modaal-outer-wrapper,.modaal-gallery-item img{display:block}.modaal-inner-wrapper{display:table-cell;width:100%;height:100%;position:relative;vertical-align:middle;text-align:center;padding:80px 25px}.modaal-fullscreen .modaal-inner-wrapper{padding:0;display:block;vertical-align:top}.modaal-container{position:relative;display:inline-block;width:100%;margin:auto;text-align:left;color:#000;max-width:1000px;border-radius:0;background:#fff;box-shadow:0 4px 15px rgba(0,0,0,.2);cursor:auto}.modaal-container.is_loading{height:100px;width:100px;overflow:hidden}.modaal-fullscreen .modaal-container{max-width:none;height:100%;overflow:auto}.modaal-close{position:fixed;right:20px;top:20px;color:#fff;cursor:pointer;opacity:1;width:50px;height:50px;background:0 0;border-radius:100%;transition:all .2s ease-in-out}.modaal-close:focus,.modaal-close:hover{outline:none;background:#fff}.modaal-close:focus:after,.modaal-close:focus:before,.modaal-close:hover:after,.modaal-close:hover:before{background:#b93d0c}.modaal-close:after,.modaal-close:before{display:block;content:\" \";position:absolute;top:14px;left:23px;width:4px;height:22px;border-radius:4px;background:#fff;transition:background .2s ease-in-out}.modaal-close:before{-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg)}.modaal-close:after{-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.modaal-fullscreen .modaal-close{background:#afb7bc;right:10px;top:10px}.modaal-content-container{padding:30px}.modaal-confirm-wrap{padding:30px 0 0;text-align:center;font-size:0}.modaal-confirm-btn{font-size:14px;display:inline-block;margin:0 10px;vertical-align:middle;cursor:pointer;border:none;background:0 0}.modaal-confirm-btn.modaal-ok{padding:10px 15px;color:#fff;background:#555;border-radius:3px;transition:background .2s ease-in-out}.modaal-confirm-btn.modaal-ok:hover{background:#2f2f2f}.modaal-confirm-btn.modaal-cancel{text-decoration:underline}.modaal-confirm-btn.modaal-cancel:hover{text-decoration:none;color:#2f2f2f}@keyframes instaReveal{0%{opacity:0}to{opacity:1}}@-webkit-keyframes instaReveal{0%{opacity:0}to{opacity:1}}.modaal-instagram .modaal-container{width:auto;background:0 0;box-shadow:none!important}.modaal-instagram .modaal-content-container{padding:0;background:0 0}.modaal-instagram .modaal-content-container>blockquote{width:1px!important;height:1px!important;opacity:0!important}.modaal-instagram iframe{opacity:0;margin:-6px!important;border-radius:0!important;width:1000px!important;max-width:800px!important;box-shadow:none!important;-webkit-animation:instaReveal 1s linear forwards;animation:instaReveal 1s linear forwards}.modaal-image .modaal-inner-wrapper{padding-left:140px;padding-right:140px}.modaal-image .modaal-container{width:auto;max-width:100%}.modaal-gallery-wrap{position:relative;color:#fff}.modaal-gallery-item{display:none}.modaal-gallery-item.is_active{display:block}.modaal-gallery-label{position:absolute;left:0;width:100%;margin:20px 0 0;font-size:18px;text-align:center;color:#fff}.modaal-gallery-label:focus{outline:none}.modaal-gallery-control{position:absolute;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);opacity:1;cursor:pointer;color:#fff;width:50px;height:50px;background:0 0;border:none;border-radius:100%;transition:all .2s ease-in-out}.modaal-gallery-control.is_hidden{opacity:0;cursor:default}.modaal-gallery-control:focus,.modaal-gallery-control:hover{outline:none;background:#fff}.modaal-gallery-control:focus:after,.modaal-gallery-control:focus:before,.modaal-gallery-control:hover:after,.modaal-gallery-control:hover:before{background:#afb7bc}.modaal-gallery-control:after,.modaal-gallery-control:before{display:block;content:\" \";position:absolute;top:16px;left:25px;width:4px;height:18px;border-radius:4px;background:#fff;transition:background .2s ease-in-out}.modaal-gallery-control:before{margin:-5px 0 0;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg)}.modaal-gallery-control:after{margin:5px 0 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.modaal-gallery-next{left:100%;margin-left:40px}.modaal-gallery-prev{right:100%;margin-right:40px}.modaal-gallery-prev:after,.modaal-gallery-prev:before{left:22px}.modaal-gallery-prev:before{margin:5px 0 0;-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg)}.modaal-gallery-prev:after{margin:-5px 0 0;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.modaal-video-wrap{margin:auto 50px;position:relative}.modaal-video-container{position:relative;padding-bottom:56.25%;height:0;overflow:hidden;box-shadow:0 0 10px rgba(0,0,0,.3);background:#000;max-width:1300px;margin-left:auto;margin-right:auto}.modaal-video-container embed,.modaal-video-container iframe,.modaal-video-container object{position:absolute;top:0;left:0;width:100%;height:100%}.modaal-iframe .modaal-content,.modaal-iframe-elem{width:100%;height:100%}.modaal-iframe-elem{display:block}@media only screen and (min-width:1400px){.modaal-video-container{padding-bottom:0;height:731px}}@media only screen and (max-width:1140px){.modaal-image .modaal-inner-wrapper{padding-left:25px;padding-right:25px}.modaal-gallery-control{top:auto;bottom:20px;-webkit-transform:none;-ms-transform:none;transform:none;background:rgba(0,0,0,.7)}.modaal-gallery-control:after,.modaal-gallery-control:before{background:#fff}.modaal-gallery-next{left:auto;right:20px}.modaal-gallery-prev{left:20px;right:auto}}@media screen and (max-width:900px){.modaal-instagram iframe{width:500px!important}}@media screen and (max-height:1100px){.modaal-instagram iframe{width:700px!important}}@media screen and (max-height:1000px){.modaal-inner-wrapper{padding-top:60px;padding-bottom:60px}.modaal-instagram iframe{width:600px!important}}@media screen and (max-height:900px){.modaal-instagram iframe{width:500px!important}.modaal-video-container{max-width:900px;max-height:510px}}@media only screen and (max-width:600px){.modaal-instagram iframe{width:280px!important}}@media only screen and (max-height:820px){.modaal-gallery-label{display:none}}.modaal-loading-spinner{background:0 0;position:absolute;width:200px;height:200px;top:50%;left:50%;margin:-100px 0 0 -100px;-webkit-transform:scale(.25);-ms-transform:scale(.25);transform:scale(.25)}@-webkit-keyframes modaal-loading-spinner{0%{opacity:1;-ms-transform:scale(1.5);-webkit-transform:scale(1.5);transform:scale(1.5)}to{opacity:.1;-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1)}}@keyframes modaal-loading-spinner{0%{opacity:1;-ms-transform:scale(1.5);-webkit-transform:scale(1.5);transform:scale(1.5)}to{opacity:.1;-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1)}}.modaal-loading-spinner>div{width:24px;height:24px;margin-left:4px;margin-top:4px;position:absolute}.modaal-loading-spinner>div>div{width:100%;height:100%;border-radius:15px;background:#fff}.modaal-loading-spinner>div:nth-of-type(1)>div{-webkit-animation:modaal-loading-spinner 1s linear infinite;animation:modaal-loading-spinner 1s linear infinite;-webkit-animation-delay:0s;animation-delay:0s}.modaal-loading-spinner>div:nth-of-type(2)>div,.modaal-loading-spinner>div:nth-of-type(3)>div{-ms-animation:modaal-loading-spinner 1s linear infinite;-moz-animation:modaal-loading-spinner 1s linear infinite;-o-animation:modaal-loading-spinner 1s linear infinite}.modaal-loading-spinner>div:nth-of-type(1){-ms-transform:translate(84px,84px) rotate(45deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(45deg) translate(70px,0);transform:translate(84px,84px) rotate(45deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(2)>div{-webkit-animation:modaal-loading-spinner 1s linear infinite;animation:modaal-loading-spinner 1s linear infinite;-webkit-animation-delay:.12s;animation-delay:.12s}.modaal-loading-spinner>div:nth-of-type(2){-ms-transform:translate(84px,84px) rotate(90deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(90deg) translate(70px,0);transform:translate(84px,84px) rotate(90deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(3)>div,.modaal-loading-spinner>div:nth-of-type(4)>div,.modaal-loading-spinner>div:nth-of-type(5)>div{-webkit-animation:modaal-loading-spinner 1s linear infinite;animation:modaal-loading-spinner 1s linear infinite;-webkit-animation-delay:.25s;animation-delay:.25s}.modaal-loading-spinner>div:nth-of-type(4)>div,.modaal-loading-spinner>div:nth-of-type(5)>div{-ms-animation:modaal-loading-spinner 1s linear infinite;-moz-animation:modaal-loading-spinner 1s linear infinite;-o-animation:modaal-loading-spinner 1s linear infinite;-webkit-animation-delay:.37s;animation-delay:.37s}.modaal-loading-spinner>div:nth-of-type(3){-ms-transform:translate(84px,84px) rotate(135deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(135deg) translate(70px,0);transform:translate(84px,84px) rotate(135deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(4){-ms-transform:translate(84px,84px) rotate(180deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(180deg) translate(70px,0);transform:translate(84px,84px) rotate(180deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(5)>div{-webkit-animation-delay:.5s;animation-delay:.5s}.modaal-loading-spinner>div:nth-of-type(6)>div,.modaal-loading-spinner>div:nth-of-type(7)>div{-ms-animation:modaal-loading-spinner 1s linear infinite;-moz-animation:modaal-loading-spinner 1s linear infinite;-o-animation:modaal-loading-spinner 1s linear infinite}.modaal-loading-spinner>div:nth-of-type(5){-ms-transform:translate(84px,84px) rotate(225deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(225deg) translate(70px,0);transform:translate(84px,84px) rotate(225deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(6)>div,.modaal-loading-spinner>div:nth-of-type(7)>div,.modaal-loading-spinner>div:nth-of-type(8)>div{-webkit-animation:modaal-loading-spinner 1s linear infinite;animation:modaal-loading-spinner 1s linear infinite;-webkit-animation-delay:.62s;animation-delay:.62s}.modaal-loading-spinner>div:nth-of-type(6){-ms-transform:translate(84px,84px) rotate(270deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(270deg) translate(70px,0);transform:translate(84px,84px) rotate(270deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(7)>div,.modaal-loading-spinner>div:nth-of-type(8)>div{-webkit-animation-delay:.75s;animation-delay:.75s}.modaal-loading-spinner>div:nth-of-type(7){-ms-transform:translate(84px,84px) rotate(315deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(315deg) translate(70px,0);transform:translate(84px,84px) rotate(315deg) translate(70px,0)}.modaal-loading-spinner>div:nth-of-type(8)>div{-webkit-animation-delay:.87s;animation-delay:.87s}.modaal-loading-spinner>div:nth-of-type(8){-ms-transform:translate(84px,84px) rotate(360deg) translate(70px,0);-webkit-transform:translate(84px,84px) rotate(360deg) translate(70px,0);transform:translate(84px,84px) rotate(360deg) translate(70px,0)}"; }); -/*! - * FullCalendar v3.2.0 - * Docs & License: https://fullcalendar.io/ - * (c) 2017 Adam Shaw - */ -!function(t){"function"==typeof define&&define.amd?define('fullcalendar/dist/fullcalendar.min',["jquery","moment"],t):"object"==typeof exports?module.exports=t(require("jquery"),require("moment")):t(jQuery,moment)}(function(t,e){function n(t){return q(t,Vt)}function i(t,e){e.left&&t.css({"border-left-width":1,"margin-left":e.left-1}),e.right&&t.css({"border-right-width":1,"margin-right":e.right-1})}function r(t){t.css({"margin-left":"","margin-right":"","border-left-width":"","border-right-width":""})}function s(){t("body").addClass("fc-not-allowed")}function o(){t("body").removeClass("fc-not-allowed")}function l(e,n,i){var r=Math.floor(n/e.length),s=Math.floor(n-r*(e.length-1)),o=[],l=[],u=[],c=0;a(e),e.each(function(n,i){var a=n===e.length-1?s:r,d=t(i).outerHeight(!0);d *").each(function(e,i){var r=t(i).outerWidth();r>n&&(n=r)}),n++,e.width(n),n}function c(t,e){var n,i=t.add(e);return i.css({position:"relative",left:-1}),n=t.outerHeight()-e.outerHeight(),i.css({position:"",left:""}),n}function d(e){var n=e.css("position"),i=e.parents().filter(function(){var e=t(this);return/(auto|scroll)/.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==n&&i.length?i:t(e[0].ownerDocument||document)}function h(t,e){var n=t.offset(),i=n.left-(e?e.left:0),r=n.top-(e?e.top:0);return{left:i,right:i+t.outerWidth(),top:r,bottom:r+t.outerHeight()}}function f(t,e){var n=t.offset(),i=p(t),r=n.left+S(t,"border-left-width")+i.left-(e?e.left:0),s=n.top+S(t,"border-top-width")+i.top-(e?e.top:0);return{left:r,right:r+t[0].clientWidth,top:s,bottom:s+t[0].clientHeight}}function g(t,e){var n=t.offset(),i=n.left+S(t,"border-left-width")+S(t,"padding-left")-(e?e.left:0),r=n.top+S(t,"border-top-width")+S(t,"padding-top")-(e?e.top:0);return{left:i,right:i+t.width(),top:r,bottom:r+t.height()}}function p(t){var e,n=t.innerWidth()-t[0].clientWidth,i=t.innerHeight()-t[0].clientHeight;return n=v(n),i=v(i),e={left:0,right:0,top:0,bottom:i},m()&&"rtl"==t.css("direction")?e.left=n:e.right=n,e}function v(t){return t=Math.max(0,t),t=Math.round(t)}function m(){return null===Pt&&(Pt=y()),Pt}function y(){var e=t("
    ").css({position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}).appendTo("body"),n=e.children(),i=n.offset().left>e.offset().left;return e.remove(),i}function S(t,e){return parseFloat(t.css(e))||0}function w(t){return 1==t.which&&!t.ctrlKey}function E(t){var e=t.originalEvent.touches;return e&&e.length?e[0].pageX:t.pageX}function b(t){var e=t.originalEvent.touches;return e&&e.length?e[0].pageY:t.pageY}function D(t){return/^touch/.test(t.type)}function T(t){t.addClass("fc-unselectable").on("selectstart",H)}function C(t){t.removeClass("fc-unselectable").off("selectstart",H)}function H(t){t.preventDefault()}function x(t,e){var n={left:Math.max(t.left,e.left),right:Math.min(t.right,e.right),top:Math.max(t.top,e.top),bottom:Math.min(t.bottom,e.bottom)};return n.lefta&&o=a?(n=o.clone(),r=!0):(n=a.clone(),r=!1),l<=u?(i=l.clone(),s=!0):(i=u.clone(),s=!1),{start:n,end:i,isStart:r,isEnd:s}}function z(t,n){return e.duration({days:t.clone().stripTime().diff(n.clone().stripTime(),"days"),ms:t.time()-n.time()})}function G(t,n){return e.duration({days:t.clone().stripTime().diff(n.clone().stripTime(),"days")})}function O(t,n,i){return e.duration(Math.round(t.diff(n,i,!0)),i)}function A(t,e){var n,i,r;for(n=0;n=1&&ot(r)));n++);return i}function V(t,n,i){return null!=i?i.diff(n,t,!0):e.isDuration(n)?n.as(t):n.end.diff(n.start,t,!0)}function P(t,e,n){var i;return W(n)?(e-t)/n:(i=n.asMonths(),Math.abs(i)>=1&&ot(i)?e.diff(t,"months",!0)/i:e.diff(t,"days",!0)/n.asDays())}function _(t,e){var n,i;return W(t)||W(e)?t/e:(n=t.asMonths(),i=e.asMonths(),Math.abs(n)>=1&&ot(n)&&Math.abs(i)>=1&&ot(i)?n/i:t.asDays()/e.asDays())}function Y(t,n){var i;return W(t)?e.duration(t*n):(i=t.asMonths(),Math.abs(i)>=1&&ot(i)?e.duration({months:i*n}):e.duration({days:t.asDays()*n}))}function W(t){return Boolean(t.hours()||t.minutes()||t.seconds()||t.milliseconds())}function U(t){return"[object Date]"===Object.prototype.toString.call(t)||t instanceof Date}function j(t){return/^\d+\:\d+(?:\:\d+\.?(?:\d{3})?)?$/.test(t)}function q(t,e){var n,i,r,s,o,l,a={};if(e)for(n=0;n=0;s--)if(o=t[s][i],"object"==typeof o)r.unshift(o);else if(void 0!==o){a[i]=o;break}r.length&&(a[i]=q(r))}for(n=t.length-1;n>=0;n--){l=t[n];for(i in l)i in a||(a[i]=l[i])}return a}function Z(t){var e=function(){};return e.prototype=t,new e}function $(t,e){for(var n in t)Q(t,n)&&(e[n]=t[n])}function Q(t,e){return Wt.call(t,e)}function X(e){return/undefined|null|boolean|number|string/.test(t.type(e))}function K(e,n,i){if(t.isFunction(e)&&(e=[e]),e){var r,s;for(r=0;r/g,">").replace(/'/g,"'").replace(/"/g,""").replace(/\n/g,"
    ")}function et(t){return t.replace(/&.*?;/g,"")}function nt(e){var n=[];return t.each(e,function(t,e){null!=e&&n.push(t+":"+e)}),n.join(";")}function it(e){var n=[];return t.each(e,function(t,e){null!=e&&n.push(t+'="'+tt(e)+'"')}),n.join(" ")}function rt(t){return t.charAt(0).toUpperCase()+t.slice(1)}function st(t,e){return t-e}function ot(t){return t%1===0}function lt(t,e){var n=t[e];return function(){return n.apply(t,arguments)}}function at(t,e,n){var i,r,s,o,l,a=function(){var u=+new Date-o;u=t.leftCol)return!0;return!1}function Ct(t,e){return t.leftCol-e.leftCol}function Ht(t){var e,n,i,r=[];for(e=0;ee.top&&t.top"),g.append(o("left")).append(o("right")).append(o("center")).append('
    ')):s()}function s(){g&&(g.remove(),g=f.el=null)}function o(i){var r=t('
    '),s=n.layout[i];return s&&t.each(s.split(" "),function(n){var i,s=t(),o=!0;t.each(this.split(","),function(n,i){var r,l,a,u,c,d,h,f,g,m;"title"==i?(s=s.add(t("

     

    ")),o=!1):((r=(e.options.customButtons||{})[i])?(a=function(t){r.click&&r.click.call(m[0],t)},u="",c=r.text):(l=e.getViewSpec(i))?(a=function(){e.changeView(i)},v.push(i),u=l.buttonTextOverride,c=l.buttonTextDefault):e[i]&&(a=function(){e[i]()},u=(e.overrides.buttonText||{})[i],c=e.options.buttonText[i]),a&&(d=r?r.themeIcon:e.options.themeButtonIcons[i],h=r?r.icon:e.options.buttonIcons[i],f=u?tt(u):d&&e.options.theme?"":h&&!e.options.theme?"":tt(c),g=["fc-"+i+"-button",p+"-button",p+"-state-default"],m=t('").click(function(t){m.hasClass(p+"-state-disabled")||(a(t),(m.hasClass(p+"-state-active")||m.hasClass(p+"-state-disabled"))&&m.removeClass(p+"-state-hover"))}).mousedown(function(){m.not("."+p+"-state-active").not("."+p+"-state-disabled").addClass(p+"-state-down")}).mouseup(function(){m.removeClass(p+"-state-down")}).hover(function(){m.not("."+p+"-state-active").not("."+p+"-state-disabled").addClass(p+"-state-hover")},function(){m.removeClass(p+"-state-hover").removeClass(p+"-state-down")}),s=s.add(m)))}),o&&s.first().addClass(p+"-corner-left").end().last().addClass(p+"-corner-right").end(),s.length>1?(i=t("
    "),o&&i.addClass("fc-button-group"),i.append(s),r.append(i)):r.append(s)}),r}function l(t){g&&g.find("h2").text(t)}function a(t){g&&g.find(".fc-"+t+"-button").addClass(p+"-state-active")}function u(t){g&&g.find(".fc-"+t+"-button").removeClass(p+"-state-active")}function c(t){g&&g.find(".fc-"+t+"-button").prop("disabled",!0).addClass(p+"-state-disabled")}function d(t){g&&g.find(".fc-"+t+"-button").prop("disabled",!1).removeClass(p+"-state-disabled")}function h(){return v}var f=this;f.setToolbarOptions=i,f.render=r,f.removeElement=s,f.updateTitle=l,f.activateButton=a,f.deactivateButton=u,f.disableButton=c,f.enableButton=d,f.getViewsWithButtons=h,f.el=null;var g,p,v=[]}function Bt(n,i){function r(t){t._locale=Y}function s(){q?a()&&(f(),u()):o()}function o(){n.addClass("fc"),n.on("click.fc","a[data-goto]",function(e){var n=t(this),i=n.data("goto"),r=_.moment(i.date),s=i.type,o=Q.opt("navLink"+rt(s)+"Click");"function"==typeof o?o(r,e):("string"==typeof o&&(s=o),B(r,s))}),_.bindOption("theme",function(t){$=t?"ui":"fc",n.toggleClass("ui-widget",t),n.toggleClass("fc-unthemed",!t)}),_.bindOptions(["isRTL","locale"],function(t){n.toggleClass("fc-ltr",!t),n.toggleClass("fc-rtl",t)}),q=t("
    ").prependTo(n);var e=y();W=new Lt(e),U=_.header=e[0],j=_.footer=e[1],E(),b(),u(_.options.defaultView),_.options.handleWindowResize&&(K=at(v,_.options.windowResizeDelay),t(window).resize(K))}function l(){Q&&Q.removeElement(),W.proxyCall("removeElement"),q.remove(),n.removeClass("fc fc-ltr fc-rtl fc-unthemed ui-widget"),n.off(".fc"),K&&t(window).unbind("resize",K),se.unneeded()}function a(){return n.is(":visible")}function u(e,n){nt++;var i=Q&&e&&Q.type!==e;i&&(F(),c()),!Q&&e&&(Q=_.view=et[e]||(et[e]=_.instantiateView(e)),Q.setElement(t("
    ").appendTo(q)),W.proxyCall("activateButton",e)),Q&&(J=Q.massageCurrentDate(J),Q.isDateSet&&J>=Q.intervalStart&&J=Q.intervalStart&&tq&&i.push(n);return i}function s(t,e){return!q||tZ}function o(t,e){return q=t,Z=e,l()}function l(){return u(tt,"reset")}function a(t){return u(E(t))}function u(t,e){var n,i;for("reset"===e?nt=[]:"add"!==e&&(nt=C(nt,t)),n=0;ns&&(!a[o]||u.isSame(c,a[o]))&&(o-1!==s||"."!==f[o]);o--)v=f[o]+v;for(l=s;l<=o;l++)m+=f[l],y+=g[l];return(m||y)&&(S=r?y+i+m:m+i+y),h(p+S+v)}function r(t){return w[t]||(w[t]=s(t))}function s(t){var e=o(t);return{fakeFormatString:a(e),sameUnits:u(e)}}function o(t){for(var e,n=[],i=/\[([^\]]*)\]|\(([^\)]*)\)|(LTS|LT|(\w)\4*o?)|([^\w\[\(]+)/g;e=i.exec(t);)e[1]?n.push.apply(n,l(e[1])):e[2]?n.push({maybe:o(e[2])}):e[3]?n.push({token:e[3]}):e[5]&&n.push.apply(n,l(e[5]));return n}function l(t){return". "===t?["."," "]:[t]}function a(t){var e,n,i=[];for(e=0;er.value)&&(r=i));return r?r.unit:null}Ot.formatDate=t,Ot.formatRange=n,Ot.oldMomentFormat=e,Ot.queryMostGranularFormatUnit=f;var g="\v",p="",v="",m=new RegExp(v+"([^"+v+"]*)"+v,"g"),y={t:function(t){return e(t,"a").charAt(0)},T:function(t){return e(t,"A").charAt(0)}},S={Y:{value:1,unit:"year"},M:{value:2,unit:"month"},W:{value:3,unit:"week"},w:{value:3,unit:"week"},D:{value:4,unit:"day"},d:{value:4,unit:"day"}},w={}}();var Qt=Ot.formatDate,Xt=Ot.formatRange,Kt=Ot.oldMomentFormat;Ot.Class=ct,ct.extend=function(){var t,e,n=arguments.length;for(t=0;t').addClass(n.className||"").css({top:0,left:0}).append(n.content).appendTo(n.parentEl),this.el.on("click",".fc-close",function(){e.hide()}),n.autoHide&&this.listenTo(t(document),"mousedown",this.documentMousedown)},documentMousedown:function(e){this.el&&!t(e.target).closest(this.el).length&&this.hide()},removeElement:function(){this.hide(),this.el&&(this.el.remove(),this.el=null),this.stopListeningTo(t(document),"mousedown")},position:function(){var e,n,i,r,s,o=this.options,l=this.el.offsetParent().offset(),a=this.el.outerWidth(),u=this.el.outerHeight(),c=t(window),h=d(this.el);r=o.top||0,s=void 0!==o.left?o.left:void 0!==o.right?o.right-a:0,h.is(window)||h.is(document)?(h=c,e=0,n=0):(i=h.offset(),e=i.top,n=i.left),e+=c.scrollTop(),n+=c.scrollLeft(),o.viewportConstrain!==!1&&(r=Math.min(r,e+h.outerHeight()-u-this.margin),r=Math.max(r,e+this.margin),s=Math.min(s,n+h.outerWidth()-a-this.margin),s=Math.max(s,n+this.margin)),this.el.css({top:r-l.top,left:s-l.left})},trigger:function(t){this.options[t]&&this.options[t].apply(this,Array.prototype.slice.call(arguments,1))}}),ne=Ot.CoordCache=ct.extend({els:null,forcedOffsetParentEl:null,origin:null,boundingRect:null,isHorizontal:!1,isVertical:!1,lefts:null,rights:null,tops:null,bottoms:null,constructor:function(e){this.els=t(e.els),this.isHorizontal=e.isHorizontal,this.isVertical=e.isVertical,this.forcedOffsetParentEl=e.offsetParent?t(e.offsetParent):null},build:function(){var t=this.forcedOffsetParentEl;!t&&this.els.length>0&&(t=this.els.eq(0).offsetParent()),this.origin=t?t.offset():null,this.boundingRect=this.queryBoundingRect(),this.isHorizontal&&this.buildElHorizontals(),this.isVertical&&this.buildElVerticals()},clear:function(){this.origin=null,this.boundingRect=null,this.lefts=null,this.rights=null,this.tops=null,this.bottoms=null},ensureBuilt:function(){this.origin||this.build()},buildElHorizontals:function(){var e=[],n=[];this.els.each(function(i,r){var s=t(r),o=s.offset().left,l=s.outerWidth();e.push(o),n.push(o+l)}),this.lefts=e,this.rights=n},buildElVerticals:function(){var e=[],n=[];this.els.each(function(i,r){var s=t(r),o=s.offset().top,l=s.outerHeight();e.push(o),n.push(o+l)}),this.tops=e,this.bottoms=n},getHorizontalIndex:function(t){this.ensureBuilt();var e,n=this.lefts,i=this.rights,r=n.length;for(e=0;e=n[e]&&t=n[e]&&t0&&(t=d(this.els.eq(0)),!t.is(document))?f(t):null},isPointInBounds:function(t,e){return this.isLeftInBounds(t)&&this.isTopInBounds(e)},isLeftInBounds:function(t){return!this.boundingRect||t>=this.boundingRect.left&&t=this.boundingRect.top&&t=r*r&&this.handleDistanceSurpassed(t)),this.isDragging&&this.handleDrag(n,i,t)},handleDrag:function(t,e,n){this.trigger("drag",t,e,n),this.updateAutoScroll(n)},endDrag:function(t){this.isDragging&&(this.isDragging=!1,this.handleDragEnd(t))},handleDragEnd:function(t){this.trigger("dragEnd",t)},startDelay:function(t){var e=this;this.delay?this.delayTimeoutId=setTimeout(function(){e.handleDelayEnd(t)},this.delay):this.handleDelayEnd(t)},handleDelayEnd:function(t){this.isDelayEnded=!0,this.isDistanceSurpassed&&this.startDrag(t)},handleDistanceSurpassed:function(t){this.isDistanceSurpassed=!0,this.isDelayEnded&&this.startDrag(t)},handleTouchMove:function(t){this.isDragging&&this.shouldCancelTouchScroll&&t.preventDefault(),this.handleMove(t)},handleMouseMove:function(t){this.handleMove(t)},handleTouchScroll:function(t){this.isDragging&&!this.scrollAlwaysKills||this.endInteraction(t,!0)},trigger:function(t){this.options[t]&&this.options[t].apply(this,Array.prototype.slice.call(arguments,1)),this["_"+t]&&this["_"+t].apply(this,Array.prototype.slice.call(arguments,1))}});ie.mixin({isAutoScroll:!1,scrollBounds:null,scrollTopVel:null,scrollLeftVel:null,scrollIntervalId:null,scrollSensitivity:30,scrollSpeed:200,scrollIntervalMs:50,initAutoScroll:function(){var t=this.scrollEl;this.isAutoScroll=this.options.scroll&&t&&!t.is(window)&&!t.is(document),this.isAutoScroll&&this.listenTo(t,"scroll",at(this.handleDebouncedScroll,100))},destroyAutoScroll:function(){this.endAutoScroll(),this.isAutoScroll&&this.stopListeningTo(this.scrollEl,"scroll")},computeScrollBounds:function(){this.isAutoScroll&&(this.scrollBounds=h(this.scrollEl))},updateAutoScroll:function(t){var e,n,i,r,s=this.scrollSensitivity,o=this.scrollBounds,l=0,a=0;o&&(e=(s-(b(t)-o.top))/s,n=(s-(o.bottom-b(t)))/s,i=(s-(E(t)-o.left))/s,r=(s-(o.right-E(t)))/s,e>=0&&e<=1?l=e*this.scrollSpeed*-1:n>=0&&n<=1&&(l=n*this.scrollSpeed),i>=0&&i<=1?a=i*this.scrollSpeed*-1:r>=0&&r<=1&&(a=r*this.scrollSpeed)),this.setScrollVel(l,a)},setScrollVel:function(t,e){this.scrollTopVel=t,this.scrollLeftVel=e,this.constrainScrollVel(),!this.scrollTopVel&&!this.scrollLeftVel||this.scrollIntervalId||(this.scrollIntervalId=setInterval(lt(this,"scrollIntervalFunc"),this.scrollIntervalMs))},constrainScrollVel:function(){var t=this.scrollEl;this.scrollTopVel<0?t.scrollTop()<=0&&(this.scrollTopVel=0):this.scrollTopVel>0&&t.scrollTop()+t[0].clientHeight>=t[0].scrollHeight&&(this.scrollTopVel=0),this.scrollLeftVel<0?t.scrollLeft()<=0&&(this.scrollLeftVel=0):this.scrollLeftVel>0&&t.scrollLeft()+t[0].clientWidth>=t[0].scrollWidth&&(this.scrollLeftVel=0)},scrollIntervalFunc:function(){var t=this.scrollEl,e=this.scrollIntervalMs/1e3;this.scrollTopVel&&t.scrollTop(t.scrollTop()+this.scrollTopVel*e),this.scrollLeftVel&&t.scrollLeft(t.scrollLeft()+this.scrollLeftVel*e),this.constrainScrollVel(),this.scrollTopVel||this.scrollLeftVel||this.endAutoScroll()},endAutoScroll:function(){this.scrollIntervalId&&(clearInterval(this.scrollIntervalId),this.scrollIntervalId=null,this.handleScrollEnd())},handleDebouncedScroll:function(){this.scrollIntervalId||this.handleScrollEnd()},handleScrollEnd:function(){}});var re=ie.extend({component:null,origHit:null,hit:null,coordAdjust:null,constructor:function(t,e){ie.call(this,e),this.component=t},handleInteractionStart:function(t){var e,n,i,r=this.subjectEl;this.component.hitsNeeded(),this.computeScrollBounds(),t?(n={left:E(t),top:b(t)},i=n,r&&(e=h(r),i=R(i,e)),this.origHit=this.queryHit(i.left,i.top),r&&this.options.subjectCenter&&(this.origHit&&(e=x(this.origHit,e)||e),i=I(e)),this.coordAdjust=k(i,n)):(this.origHit=null,this.coordAdjust=null),ie.prototype.handleInteractionStart.apply(this,arguments)},handleDragStart:function(t){var e;ie.prototype.handleDragStart.apply(this,arguments),e=this.queryHit(E(t),b(t)),e&&this.handleHitOver(e)},handleDrag:function(t,e,n){var i;ie.prototype.handleDrag.apply(this,arguments),i=this.queryHit(E(n),b(n)),pt(i,this.hit)||(this.hit&&this.handleHitOut(),i&&this.handleHitOver(i))},handleDragEnd:function(){this.handleHitDone(),ie.prototype.handleDragEnd.apply(this,arguments)},handleHitOver:function(t){var e=pt(t,this.origHit);this.hit=t,this.trigger("hitOver",this.hit,e,this.origHit)},handleHitOut:function(){this.hit&&(this.trigger("hitOut",this.hit),this.handleHitDone(),this.hit=null)},handleHitDone:function(){this.hit&&this.trigger("hitDone",this.hit)},handleInteractionEnd:function(){ie.prototype.handleInteractionEnd.apply(this,arguments),this.origHit=null,this.hit=null,this.component.hitsNotNeeded()},handleScrollEnd:function(){ie.prototype.handleScrollEnd.apply(this,arguments),this.isDragging&&(this.component.releaseHits(),this.component.prepareHits())},queryHit:function(t,e){return this.coordAdjust&&(t+=this.coordAdjust.left,e+=this.coordAdjust.top),this.component.queryHit(t,e)}});Ot.touchMouseIgnoreWait=500;var se=ct.extend(te,Jt,{isTouching:!1,mouseIgnoreDepth:0,handleScrollProxy:null,bind:function(){var e=this;this.listenTo(t(document),{touchstart:this.handleTouchStart,touchcancel:this.handleTouchCancel,touchend:this.handleTouchEnd,mousedown:this.handleMouseDown,mousemove:this.handleMouseMove,mouseup:this.handleMouseUp,click:this.handleClick,selectstart:this.handleSelectStart,contextmenu:this.handleContextMenu}),window.addEventListener("touchmove",this.handleTouchMoveProxy=function(n){e.handleTouchMove(t.Event(n))},{passive:!1}),window.addEventListener("scroll",this.handleScrollProxy=function(n){e.handleScroll(t.Event(n))},!0)},unbind:function(){this.stopListeningTo(t(document)),window.removeEventListener("touchmove",this.handleTouchMoveProxy),window.removeEventListener("scroll",this.handleScrollProxy,!0)},handleTouchStart:function(t){this.stopTouch(t,!0),this.isTouching=!0,this.trigger("touchstart",t)},handleTouchMove:function(t){this.isTouching&&this.trigger("touchmove",t)},handleTouchCancel:function(t){this.isTouching&&(this.trigger("touchcancel",t),this.stopTouch(t))},handleTouchEnd:function(t){this.stopTouch(t)},handleMouseDown:function(t){this.shouldIgnoreMouse()||this.trigger("mousedown",t)},handleMouseMove:function(t){this.shouldIgnoreMouse()||this.trigger("mousemove",t)},handleMouseUp:function(t){this.shouldIgnoreMouse()||this.trigger("mouseup",t)},handleClick:function(t){this.shouldIgnoreMouse()||this.trigger("click",t)},handleSelectStart:function(t){this.trigger("selectstart",t)},handleContextMenu:function(t){this.trigger("contextmenu",t)},handleScroll:function(t){this.trigger("scroll",t)},stopTouch:function(t,e){this.isTouching&&(this.isTouching=!1,this.trigger("touchend",t),e||this.startTouchMouseIgnore())},startTouchMouseIgnore:function(){var t=this,e=Ot.touchMouseIgnoreWait;e&&(this.mouseIgnoreDepth++,setTimeout(function(){t.mouseIgnoreDepth--},e))},shouldIgnoreMouse:function(){return this.isTouching||Boolean(this.mouseIgnoreDepth)}});!function(){var t=null,e=0;se.get=function(){return t||(t=new se,t.bind()),t},se.needed=function(){se.get(),e++},se.unneeded=function(){e--,e||(t.unbind(),t=null)}}();var oe=ct.extend(te,{options:null,sourceEl:null,el:null,parentEl:null,top0:null,left0:null,y0:null,x0:null,topDelta:null,leftDelta:null,isFollowing:!1,isHidden:!1,isAnimating:!1,constructor:function(e,n){this.options=n=n||{},this.sourceEl=e,this.parentEl=n.parentEl?t(n.parentEl):e.parent()},start:function(e){this.isFollowing||(this.isFollowing=!0,this.y0=b(e),this.x0=E(e),this.topDelta=0,this.leftDelta=0,this.isHidden||this.updatePosition(),D(e)?this.listenTo(t(document),"touchmove",this.handleMove):this.listenTo(t(document),"mousemove",this.handleMove))},stop:function(e,n){function i(){r.isAnimating=!1,r.removeElement(),r.top0=r.left0=null,n&&n()}var r=this,s=this.options.revertDuration;this.isFollowing&&!this.isAnimating&&(this.isFollowing=!1,this.stopListeningTo(t(document)),e&&s&&!this.isHidden?(this.isAnimating=!0,this.el.animate({top:this.top0,left:this.left0},{duration:s,complete:i})):i())},getEl:function(){var t=this.el;return t||(t=this.el=this.sourceEl.clone().addClass(this.options.additionalClass||"").css({position:"absolute",visibility:"",display:this.isHidden?"none":"",margin:0,right:"auto",bottom:"auto",width:this.sourceEl.width(),height:this.sourceEl.height(),opacity:this.options.opacity||"",zIndex:this.options.zIndex}),t.addClass("fc-unselectable"),t.appendTo(this.parentEl)),t},removeElement:function(){this.el&&(this.el.remove(),this.el=null)},updatePosition:function(){var t,e;this.getEl(),null===this.top0&&(t=this.sourceEl.offset(),e=this.el.offsetParent().offset(),this.top0=t.top-e.top,this.left0=t.left-e.left),this.el.css({top:this.top0+this.topDelta,left:this.left0+this.leftDelta})},handleMove:function(t){this.topDelta=b(t)-this.y0,this.leftDelta=E(t)-this.x0,this.isHidden||this.updatePosition()},hide:function(){this.isHidden||(this.isHidden=!0,this.el&&this.el.hide())},show:function(){this.isHidden&&(this.isHidden=!1,this.updatePosition(),this.getEl().show())}}),le=Ot.Grid=ct.extend(te,{hasDayInteractions:!0,view:null,isRTL:null,start:null,end:null,el:null,elsByFill:null,eventTimeFormat:null,displayEventTime:null,displayEventEnd:null,minResizeDuration:null,largeUnit:null,dayClickListener:null,daySelectListener:null,segDragListener:null,segResizeListener:null,externalDragListener:null,constructor:function(t){this.view=t,this.isRTL=t.opt("isRTL"),this.elsByFill={},this.dayClickListener=this.buildDayClickListener(),this.daySelectListener=this.buildDaySelectListener()},computeEventTimeFormat:function(){return this.view.opt("smallTimeFormat")},computeDisplayEventTime:function(){return!0},computeDisplayEventEnd:function(){return!0},setRange:function(t){this.start=t.start.clone(),this.end=t.end.clone(),this.rangeUpdated(),this.processRangeOptions()},rangeUpdated:function(){},processRangeOptions:function(){var t,e,n=this.view;this.eventTimeFormat=n.opt("eventTimeFormat")||n.opt("timeFormat")||this.computeEventTimeFormat(),t=n.opt("displayEventTime"),null==t&&(t=this.computeDisplayEventTime()),e=n.opt("displayEventEnd"),null==e&&(e=this.computeDisplayEventEnd()),this.displayEventTime=t,this.displayEventEnd=e},spanToSegs:function(t){},diffDates:function(t,e){return this.largeUnit?O(t,e,this.largeUnit):z(t,e)},hitsNeededDepth:0,hitsNeeded:function(){this.hitsNeededDepth++||this.prepareHits()},hitsNotNeeded:function(){this.hitsNeededDepth&&!--this.hitsNeededDepth&&this.releaseHits()},prepareHits:function(){},releaseHits:function(){},queryHit:function(t,e){},getHitSpan:function(t){},getHitEl:function(t){},setElement:function(t){this.el=t,this.hasDayInteractions&&(T(t),this.bindDayHandler("touchstart",this.dayTouchStart),this.bindDayHandler("mousedown",this.dayMousedown)),this.bindSegHandlers(),this.bindGlobalHandlers()},bindDayHandler:function(e,n){var i=this;this.el.on(e,function(e){if(!t(e.target).is(i.segSelector+","+i.segSelector+" *,.fc-more,a[data-goto]"))return n.call(i,e)})},removeElement:function(){this.unbindGlobalHandlers(),this.clearDragListeners(),this.el.remove()},renderSkeleton:function(){},renderDates:function(){},unrenderDates:function(){},bindGlobalHandlers:function(){this.listenTo(t(document),{dragstart:this.externalDragStart,sortstart:this.externalDragStart})},unbindGlobalHandlers:function(){this.stopListeningTo(t(document))},dayMousedown:function(t){var e=this.view;e.isSelected||e.selectedEvent||(this.dayClickListener.startInteraction(t),e.opt("selectable")&&this.daySelectListener.startInteraction(t,{distance:e.opt("selectMinDistance")}))},dayTouchStart:function(t){var e,n=this.view;n.isSelected||n.selectedEvent||(e=n.opt("selectLongPressDelay"),null==e&&(e=n.opt("longPressDelay")),this.dayClickListener.startInteraction(t),n.opt("selectable")&&this.daySelectListener.startInteraction(t,{delay:e}))},buildDayClickListener:function(){var t,e=this,n=this.view,i=new re(this,{scroll:n.opt("dragScroll"),interactionStart:function(){t=i.origHit},hitOver:function(e,n,i){n||(t=null)},hitOut:function(){t=null},interactionEnd:function(i,r){!r&&t&&n.triggerDayClick(e.getHitSpan(t),e.getHitEl(t),i)}});return i.shouldCancelTouchScroll=!1,i.scrollAlwaysKills=!0,i},buildDaySelectListener:function(){var t,e=this,n=this.view,i=new re(this,{scroll:n.opt("dragScroll"),interactionStart:function(){t=null},dragStart:function(){n.unselect()},hitOver:function(n,i,r){r&&(t=e.computeSelection(e.getHitSpan(r),e.getHitSpan(n)),t?e.renderSelection(t):t===!1&&s())},hitOut:function(){t=null,e.unrenderSelection()},hitDone:function(){o()},interactionEnd:function(e,i){!i&&t&&n.reportSelection(t,e)}});return i},clearDragListeners:function(){this.dayClickListener.endInteraction(),this.daySelectListener.endInteraction(),this.segDragListener&&this.segDragListener.endInteraction(),this.segResizeListener&&this.segResizeListener.endInteraction(),this.externalDragListener&&this.externalDragListener.endInteraction()},renderEventLocationHelper:function(t,e){var n=this.fabricateHelperEvent(t,e);return this.renderHelper(n,e)},fabricateHelperEvent:function(t,e){var n=e?Z(e.event):{};return n.start=t.start.clone(),n.end=t.end?t.end.clone():null,n.allDay=null,this.view.calendar.normalizeEventDates(n),n.className=(n.className||[]).concat("fc-helper"),e||(n.editable=!1),n},renderHelper:function(t,e){},unrenderHelper:function(){},renderSelection:function(t){this.renderHighlight(t)},unrenderSelection:function(){this.unrenderHighlight()},computeSelection:function(t,e){var n=this.computeSelectionSpan(t,e);return!(n&&!this.view.calendar.isSelectionSpanAllowed(n))&&n},computeSelectionSpan:function(t,e){var n=[t.start,t.end,e.start,e.end];return n.sort(st),{start:n[0].clone(),end:n[3].clone()}},renderHighlight:function(t){this.renderFill("highlight",this.spanToSegs(t))},unrenderHighlight:function(){this.unrenderFill("highlight")},highlightSegClasses:function(){return["fc-highlight"]},renderBusinessHours:function(){},unrenderBusinessHours:function(){},getNowIndicatorUnit:function(){},renderNowIndicator:function(t){},unrenderNowIndicator:function(){},renderFill:function(t,e){},unrenderFill:function(t){var e=this.elsByFill[t];e&&(e.remove(),delete this.elsByFill[t])},renderFillSegEls:function(e,n){var i,r=this,s=this[e+"SegEl"],o="",l=[];if(n.length){for(i=0;i"},getDayClasses:function(t,e){var n=this.view,i=n.calendar.getNow(),r=["fc-"+_t[t.day()]];return 1==n.intervalDuration.as("months")&&t.month()!=n.intervalStart.month()&&r.push("fc-other-month"),t.isSame(i,"day")?(r.push("fc-today"),e!==!0&&r.push(n.highlightStateClass)):t *",mousedOverSeg:null,isDraggingSeg:!1,isResizingSeg:!1,isDraggingExternal:!1,segs:null,renderEvents:function(t){var e,n=[],i=[];for(e=0;el&&o.push({start:l,end:n.start}),l=n.end;return l=e.length?e[e.length-1]+1:e[n]},computeColHeadFormat:function(){return this.rowCnt>1||this.colCnt>10?"ddd":this.colCnt>1?this.view.opt("dayOfMonthFormat"):"dddd"},sliceRangeByRow:function(t){var e,n,i,r,s,o=this.daysPerRow,l=this.view.computeDayRange(t),a=this.getDateDayIndex(l.start),u=this.getDateDayIndex(l.end.clone().subtract(1,"days")),c=[];for(e=0;e'+this.renderHeadTrHtml()+"
    "},renderHeadIntroHtml:function(){return this.renderIntroHtml()},renderHeadTrHtml:function(){return""+(this.isRTL?"":this.renderHeadIntroHtml())+this.renderHeadDateCellsHtml()+(this.isRTL?this.renderHeadIntroHtml():"")+""},renderHeadDateCellsHtml:function(){var t,e,n=[];for(t=0;t1?' colspan="'+e+'"':"")+(n?" "+n:"")+">"+i.buildGotoAnchorHtml({date:t,forceOff:this.rowCnt>1||1===this.colCnt},tt(t.format(this.colHeadFormat)))+""},renderBgTrHtml:function(t){return""+(this.isRTL?"":this.renderBgIntroHtml(t))+this.renderBgCellsHtml(t)+(this.isRTL?this.renderBgIntroHtml(t):"")+""},renderBgIntroHtml:function(t){return this.renderIntroHtml()},renderBgCellsHtml:function(t){var e,n,i=[];for(e=0;e"},renderIntroHtml:function(){},bookendCells:function(t){var e=this.renderIntroHtml();e&&(this.isRTL?t.append(e):t.prepend(e))}},ue=Ot.DayGrid=le.extend(ae,{numbersVisible:!1,bottomCoordPadding:0,rowEls:null,cellEls:null,helperEls:null,rowCoordCache:null,colCoordCache:null,renderDates:function(t){var e,n,i=this.view,r=this.rowCnt,s=this.colCnt,o="";for(e=0;e
    '+this.renderBgTrHtml(t)+'
    '+(this.numbersVisible?""+this.renderNumberTrHtml(t)+"":"")+"
    "},renderNumberTrHtml:function(t){return""+(this.isRTL?"":this.renderNumberIntroHtml(t))+this.renderNumberCellsHtml(t)+(this.isRTL?this.renderNumberIntroHtml(t):"")+""},renderNumberIntroHtml:function(t){return this.renderIntroHtml()},renderNumberCellsHtml:function(t){var e,n,i=[];for(e=0;e',this.view.cellWeekNumbersVisible&&t.day()==n&&(i+=this.view.buildGotoAnchorHtml({date:t,type:"week"},{class:"fc-week-number"},t.format("w"))),this.view.dayNumbersVisible&&(i+=this.view.buildGotoAnchorHtml(t,{class:"fc-day-number"},t.date())),i+=""):""},computeEventTimeFormat:function(){return this.view.opt("extraSmallTimeFormat")},computeDisplayEventEnd:function(){return 1==this.colCnt},rangeUpdated:function(){this.updateDayTable()},spanToSegs:function(t){var e,n,i=this.sliceRangeByRow(t);for(e=0;e');o=n&&n.row===e?n.el.position().top:l.find(".fc-content-skeleton tbody").position().top,a.css("top",o).find("table").append(i[e].tbodyEl),l.append(a),r.push(a[0])}),this.helperEls=t(r)},unrenderHelper:function(){this.helperEls&&(this.helperEls.remove(),this.helperEls=null)},fillSegTag:"td",renderFill:function(e,n,i){var r,s,o,l=[];for(n=this.renderFillSegEls(e,n),r=0;r
    '),s=r.find("tr"),l>0&&s.append(''),s.append(n.el.attr("colspan",a-l)),a'),this.bookendCells(s),r}});ue.mixin({rowStructs:null,unrenderEvents:function(){this.removeSegPopover(),le.prototype.unrenderEvents.apply(this,arguments)},getEventSegs:function(){return le.prototype.getEventSegs.call(this).concat(this.popoverSegs||[])},renderBgSegs:function(e){var n=t.grep(e,function(t){return t.event.allDay});return le.prototype.renderBgSegs.call(this,n)},renderFgSegs:function(e){var n;return e=this.renderFgSegEls(e),n=this.rowStructs=this.renderSegRows(e),this.rowEls.each(function(e,i){t(i).find(".fc-content-skeleton > table").append(n[e].tbodyEl)}),e},unrenderFgSegs:function(){for(var t,e=this.rowStructs||[];t=e.pop();)t.tbodyEl.remove();this.rowStructs=null},renderSegRows:function(t){var e,n,i=[];for(e=this.groupSegRows(t),n=0;n'+tt(n)+"")),i=''+(tt(s.title||"")||" ")+"",'
    '+(this.isRTL?i+" "+d:d+" "+i)+"
    "+(l?'
    ':"")+(a?'
    ':"")+""},renderSegRow:function(e,n){function i(e){for(;o"),l.append(c)),v[r][o]=c,m[r][o]=c,o++}var r,s,o,l,a,u,c,d=this.colCnt,h=this.buildSegLevels(n),f=Math.max(1,h.length),g=t(""),p=[],v=[],m=[];for(r=0;r"),p.push([]),v.push([]),m.push([]),s)for(a=0;a').append(u.el),u.leftCol!=u.rightCol?c.attr("colspan",u.rightCol-u.leftCol+1):m[r][o]=c;o<=u.rightCol;)v[r][o]=c,p[r][o]=u,o++;l.append(c)}i(d),this.bookendCells(l),g.append(l)}return{row:e,tbodyEl:g,cellMatrix:v,segMatrix:p,segLevels:h,segs:n}},buildSegLevels:function(t){var e,n,i,r=[];for(this.sortEventSegs(t),e=0;e td > :first-child").each(n),r.position().top+s>l)return i;return!1},limitRow:function(e,n){function i(i){for(;b").append(y),h.append(m),E.push(m[0])),b++}var r,s,o,l,a,u,c,d,h,f,g,p,v,m,y,S=this,w=this.rowStructs[e],E=[],b=0;if(n&&n').attr("rowspan",f),u=d[p],y=this.renderMoreLink(e,a.leftCol+p,[a].concat(u)),m=t("
    ").append(y),v.append(m),g.push(v[0]),E.push(v[0]);h.addClass("fc-limited").after(t(g)),o.push(h[0])}}i(this.colCnt),w.moreEls=t(E),w.limitedEls=t(o)}},unlimitRow:function(t){var e=this.rowStructs[t];e.moreEls&&(e.moreEls.remove(),e.moreEls=null),e.limitedEls&&(e.limitedEls.removeClass("fc-limited"),e.limitedEls=null)},renderMoreLink:function(e,n,i){var r=this,s=this.view;return t('').text(this.getMoreLinkText(i.length)).on("click",function(o){var l=s.opt("eventLimitClick"),a=r.getCellDate(e,n),u=t(this),c=r.getCellEl(e,n),d=r.getCellSegs(e,n),h=r.resliceDaySegs(d,a),f=r.resliceDaySegs(i,a);"function"==typeof l&&(l=s.publiclyTrigger("eventLimitClick",null,{date:a,dayEl:c,moreEl:u,segs:h,hiddenSegs:f},o)),"popover"===l?r.showSegPopover(e,n,u,h):"string"==typeof l&&s.calendar.zoomTo(a,l)})},showSegPopover:function(t,e,n,i){var r,s,o=this,l=this.view,a=n.parent();r=1==this.rowCnt?l.el:this.rowEls.eq(t),s={className:"fc-more-popover",content:this.renderSegPopoverContent(t,e,i),parentEl:this.view.el,top:r.offset().top,autoHide:!0,viewportConstrain:l.opt("popoverViewportConstrain"),hide:function(){if(o.popoverSegs)for(var t,e=0;e'+tt(l)+'
    '),u=a.find(".fc-event-container");for(i=this.renderFgSegEls(i,!0),this.popoverSegs=i,r=0;r'+this.renderBgTrHtml(0)+'
    "},renderSlatRowHtml:function(){for(var t,n,i,r=this.view,s=this.isRTL,o="",l=e.duration(+this.minTime);l"+(n?""+tt(t.format(this.labelFormat))+"":"")+"",o+='"+(s?"":i)+''+(s?i:"")+"",l.add(this.slotDuration);return o},processOptions:function(){var n,i=this.view,r=i.opt("slotDuration"),s=i.opt("snapDuration");r=e.duration(r),s=s?e.duration(s):r,this.slotDuration=r,this.snapDuration=s,this.snapsPerSlot=r/s,this.minResizeDuration=s,this.minTime=e.duration(i.opt("minTime")),this.maxTime=e.duration(i.opt("maxTime")),n=i.opt("slotLabelFormat"),t.isArray(n)&&(n=n[n.length-1]),this.labelFormat=n||i.opt("smallTimeFormat"),n=i.opt("slotLabelInterval"),this.labelInterval=n?e.duration(n):this.computeLabelInterval(r)},computeLabelInterval:function(t){var n,i,r;for(n=Re.length-1;n>=0;n--)if(i=e.duration(Re[n]),r=_(i,t),ot(r)&&r>1)return i;return e.duration(t)},computeEventTimeFormat:function(){return this.view.opt("noMeridiemTimeFormat")},computeDisplayEventEnd:function(){return!0},prepareHits:function(){this.colCoordCache.build(),this.slatCoordCache.build()},releaseHits:function(){this.colCoordCache.clear()},queryHit:function(t,e){var n=this.snapsPerSlot,i=this.colCoordCache,r=this.slatCoordCache;if(i.isLeftInBounds(t)&&r.isTopInBounds(e)){var s=i.getHorizontalIndex(t),o=r.getVerticalIndex(e);if(null!=s&&null!=o){var l=r.getTopOffset(o),a=r.getHeight(o),u=(e-l)/a,c=Math.floor(u*n),d=o*n+c,h=l+c/n*a,f=l+(c+1)/n*a;return{col:s,snap:d,component:this,left:i.getLeftOffset(s),right:i.getRightOffset(s),top:h,bottom:f}}}},getHitSpan:function(t){var e,n=this.getCellDate(0,t.col),i=this.computeSnapTime(t.snap);return n.time(i),e=n.clone().add(this.snapDuration),{start:n,end:e}},getHitEl:function(t){return this.colEls.eq(t.col)},rangeUpdated:function(){this.updateDayTable()},computeSnapTime:function(t){return e.duration(this.minTime+this.snapDuration*t)},spanToSegs:function(t){var e,n=this.sliceRangeByTimes(t);for(e=0;e
    ').css("top",r).appendTo(this.colContainerEls.eq(i[n].col))[0]);i.length>0&&s.push(t('
    ').css("top",r).appendTo(this.el.find(".fc-content-skeleton"))[0]),this.nowIndicatorEls=t(s)},unrenderNowIndicator:function(){this.nowIndicatorEls&&(this.nowIndicatorEls.remove(),this.nowIndicatorEls=null)},renderSelection:function(t){this.view.opt("selectHelper")?this.renderEventLocationHelper(t):this.renderHighlight(t)},unrenderSelection:function(){this.unrenderHelper(),this.unrenderHighlight()},renderHighlight:function(t){this.renderHighlightSegs(this.spanToSegs(t))},unrenderHighlight:function(){this.unrenderHighlightSegs()}});ce.mixin({colContainerEls:null,fgContainerEls:null,bgContainerEls:null,helperContainerEls:null,highlightContainerEls:null,businessContainerEls:null,fgSegs:null,bgSegs:null,helperSegs:null,highlightSegs:null,businessSegs:null,renderContentSkeleton:function(){var e,n,i="";for(e=0;e
    ';n=t('
    '+i+"
    "),this.colContainerEls=n.find(".fc-content-col"),this.helperContainerEls=n.find(".fc-helper-container"),this.fgContainerEls=n.find(".fc-event-container:not(.fc-helper-container)"),this.bgContainerEls=n.find(".fc-bgevent-container"),this.highlightContainerEls=n.find(".fc-highlight-container"),this.businessContainerEls=n.find(".fc-business-container"),this.bookendCells(n.find("tr")),this.el.append(n)},renderFgSegs:function(t){return t=this.renderFgSegsIntoContainers(t,this.fgContainerEls),this.fgSegs=t,t},unrenderFgSegs:function(){this.unrenderNamedSegs("fgSegs")},renderHelperSegs:function(e,n){var i,r,s,o=[];for(e=this.renderFgSegsIntoContainers(e,this.helperContainerEls),i=0;i
    '+(n?'
    '+tt(n)+"
    ":"")+(o.title?'
    '+tt(o.title)+"
    ":"")+'
    '+(u?'
    ':"")+""},updateSegVerticals:function(t){this.computeSegVerticals(t),this.assignSegVerticals(t)},computeSegVerticals:function(t){var e,n;for(e=0;e1?"ll":"LL"},formatRange:function(t,e,n){var i=t.end;return i.hasTime()||(i=i.clone().subtract(1)),Xt(t.start,i,e,n,this.opt("isRTL"))},getAllDayHtml:function(){return this.opt("allDayHtml")||tt(this.opt("allDayText"))},buildGotoAnchorHtml:function(e,n,i){var r,s,o,l;return t.isPlainObject(e)?(r=e.date,s=e.type,o=e.forceOff):r=e,r=Ot.moment(r),l={date:r.format("YYYY-MM-DD"),type:s||"day"},"string"==typeof n&&(i=n,n=null),n=n?" "+it(n):"",i=i||"",!o&&this.opt("navLinks")?"'+i+"":""+i+""},setElement:function(t){this.el=t,this.bindGlobalHandlers(),this.renderSkeleton()},removeElement:function(){this.unsetDate(),this.unrenderSkeleton(),this.unbindGlobalHandlers(),this.el.remove()},renderSkeleton:function(){},unrenderSkeleton:function(){},setDate:function(t){var e=this.isDateSet;this.isDateSet=!0,this.handleDate(t,e),this.trigger(e?"dateReset":"dateSet",t)},unsetDate:function(){this.isDateSet&&(this.isDateSet=!1,this.handleDateUnset(),this.trigger("dateUnset"))},handleDate:function(t,e){var n=this;this.unbindEvents(),this.requestDateRender(t).then(function(){n.bindEvents()})},handleDateUnset:function(){this.unbindEvents(),this.requestDateUnrender()},requestDateRender:function(t){var e=this;return this.dateRenderQueue.add(function(){return e.executeDateRender(t)})},requestDateUnrender:function(){var t=this;return this.dateRenderQueue.add(function(){return t.executeDateUnrender()})},executeDateRender:function(t){var e=this;return t?this.captureInitialScroll():this.captureScroll(),this.freezeHeight(),this.executeDateUnrender().then(function(){t&&e.setRange(e.computeRange(t)),e.render&&e.render(),e.renderDates(),e.updateSize(),e.renderBusinessHours(),e.startNowIndicator(),e.thawHeight(),e.releaseScroll(),e.isDateRendered=!0,e.onDateRender(),e.trigger("dateRender")})},executeDateUnrender:function(){var t=this;return t.isDateRendered?this.requestEventsUnrender().then(function(){t.unselect(),t.stopNowIndicator(),t.triggerUnrender(),t.unrenderBusinessHours(),t.unrenderDates(),t.destroy&&t.destroy(),t.isDateRendered=!1,t.trigger("dateUnrender")}):ft.resolve()},onDateRender:function(){this.triggerRender()},renderDates:function(){},unrenderDates:function(){},triggerRender:function(){this.publiclyTrigger("viewRender",this,this,this.el)},triggerUnrender:function(){this.publiclyTrigger("viewDestroy",this,this,this.el)},bindGlobalHandlers:function(){this.listenTo(se.get(),{touchstart:this.processUnselect,mousedown:this.handleDocumentMousedown})},unbindGlobalHandlers:function(){this.stopListeningTo(se.get())},initThemingProps:function(){var t=this.opt("theme")?"ui":"fc";this.widgetHeaderClass=t+"-widget-header",this.widgetContentClass=t+"-widget-content",this.highlightStateClass=t+"-state-highlight"},renderBusinessHours:function(){},unrenderBusinessHours:function(){},startNowIndicator:function(){var t,n,i,r=this;this.opt("nowIndicator")&&(t=this.getNowIndicatorUnit(),t&&(n=lt(this,"updateNowIndicator"),this.initialNowDate=this.calendar.getNow(),this.initialNowQueriedMs=+new Date,this.renderNowIndicator(this.initialNowDate),this.isNowIndicatorRendered=!0,i=this.initialNowDate.clone().startOf(t).add(1,t)-this.initialNowDate,this.nowIndicatorTimeoutID=setTimeout(function(){r.nowIndicatorTimeoutID=null,n(),i=+e.duration(1,t),i=Math.max(100,i),r.nowIndicatorIntervalID=setInterval(n,i)},i)))},updateNowIndicator:function(){this.isNowIndicatorRendered&&(this.unrenderNowIndicator(),this.renderNowIndicator(this.initialNowDate.clone().add(new Date-this.initialNowQueriedMs)))},stopNowIndicator:function(){this.isNowIndicatorRendered&&(this.nowIndicatorTimeoutID&&(clearTimeout(this.nowIndicatorTimeoutID),this.nowIndicatorTimeoutID=null),this.nowIndicatorIntervalID&&(clearTimeout(this.nowIndicatorIntervalID),this.nowIndicatorIntervalID=null),this.unrenderNowIndicator(),this.isNowIndicatorRendered=!1)},getNowIndicatorUnit:function(){},renderNowIndicator:function(t){},unrenderNowIndicator:function(){},updateSize:function(t){t&&this.captureScroll(),this.updateHeight(t),this.updateWidth(t),this.updateNowIndicator(),t&&this.releaseScroll()},updateWidth:function(t){},updateHeight:function(t){var e=this.calendar;this.setHeight(e.getSuggestedViewHeight(),e.isHeightAuto())},setHeight:function(t,e){},capturedScroll:null,capturedScrollDepth:0,captureScroll:function(){return!this.capturedScrollDepth++&&(this.capturedScroll=this.isDateRendered?this.queryScroll():{},!0)},captureInitialScroll:function(e){this.captureScroll()&&(this.capturedScroll.isInitial=!0,e?t.extend(this.capturedScroll,e):this.capturedScroll.isComputed=!0)},releaseScroll:function(){var e=this.capturedScroll,n=this.discardScroll();e.isComputed&&(n?t.extend(e,this.computeInitialScroll()):e=null),e&&(e.isInitial?this.hardSetScroll(e):this.setScroll(e))},discardScroll:function(){return!--this.capturedScrollDepth&&(this.capturedScroll=null,!0)},computeInitialScroll:function(){return{}},queryScroll:function(){return{}},hardSetScroll:function(t){var e=this,n=function(){e.setScroll(t)};n(),setTimeout(n,0)},setScroll:function(t){},freezeHeight:function(){this.calendar.freezeContentHeight()},thawHeight:function(){this.calendar.thawContentHeight()},bindEvents:function(){var t=this;this.isEventsBound||(this.isEventsBound=!0,this.rejectOn("eventsUnbind",this.requestEvents()).then(function(e){t.listenTo(t.calendar,"eventsReset",t.setEvents),t.setEvents(e)}))},unbindEvents:function(){this.isEventsBound&&(this.isEventsBound=!1,this.stopListeningTo(this.calendar,"eventsReset"),this.unsetEvents(),this.trigger("eventsUnbind"))},setEvents:function(t){var e=this.isEventSet;this.isEventsSet=!0,this.handleEvents(t,e),this.trigger(e?"eventsReset":"eventsSet",t)},unsetEvents:function(){this.isEventsSet&&(this.isEventsSet=!1,this.handleEventsUnset(),this.trigger("eventsUnset"))},whenEventsSet:function(){var t=this;return this.isEventsSet?ft.resolve(this.getCurrentEvents()):new ft(function(e){t.one("eventsSet",e)})},handleEvents:function(t,e){this.requestEventsRender(t)},handleEventsUnset:function(){this.requestEventsUnrender()},requestEventsRender:function(t){var e=this;return this.eventRenderQueue.add(function(){return e.executeEventsRender(t)})},requestEventsUnrender:function(){var t=this;return this.isEventsRendered?this.eventRenderQueue.addQuickly(function(){return t.executeEventsUnrender()}):ft.resolve()},requestCurrentEventsRender:function(){return this.isEventsSet?void this.requestEventsRender(this.getCurrentEvents()):ft.reject()},executeEventsRender:function(t){var e=this;return this.captureScroll(),this.freezeHeight(),this.executeEventsUnrender().then(function(){e.renderEvents(t),e.thawHeight(),e.releaseScroll(),e.isEventsRendered=!0,e.onEventsRender(),e.trigger("eventsRender")})},executeEventsUnrender:function(){return this.isEventsRendered&&(this.onBeforeEventsUnrender(),this.captureScroll(),this.freezeHeight(),this.destroyEvents&&this.destroyEvents(),this.unrenderEvents(),this.thawHeight(),this.releaseScroll(),this.isEventsRendered=!1,this.trigger("eventsUnrender")),ft.resolve()},onEventsRender:function(){this.renderedEventSegEach(function(t){this.publiclyTrigger("eventAfterRender",t.event,t.event,t.el)}),this.publiclyTrigger("eventAfterAllRender")},onBeforeEventsUnrender:function(){this.renderedEventSegEach(function(t){this.publiclyTrigger("eventDestroy",t.event,t.event,t.el)})},renderEvents:function(t){},unrenderEvents:function(){},requestEvents:function(){return this.calendar.requestEvents(this.start,this.end)},getCurrentEvents:function(){return this.calendar.getPrunedEventCache()},resolveEventEl:function(e,n){var i=this.publiclyTrigger("eventRender",e,e,n);return i===!1?n=null:i&&i!==!0&&(n=t(i)),n},showEvent:function(t){this.renderedEventSegEach(function(t){t.el.css("visibility","")},t)},hideEvent:function(t){this.renderedEventSegEach(function(t){t.el.css("visibility","hidden")},t)},renderedEventSegEach:function(t,e){var n,i=this.getEventSegs();for(n=0;n=this.nextDayThreshold&&r.add(1,"days")),(!i||r<=n)&&(r=n.clone().add(1,"days")),{start:n,end:r}},isMultiDayEvent:function(t){var e=this.computeDayRange(t);return e.end.diff(e.start,"days")>1}}),he=Ot.Scroller=ct.extend({el:null,scrollEl:null,overflowX:null,overflowY:null,constructor:function(t){t=t||{},this.overflowX=t.overflowX||t.overflow||"auto",this.overflowY=t.overflowY||t.overflow||"auto"},render:function(){this.el=this.renderEl(),this.applyOverflow()},renderEl:function(){return this.scrollEl=t('
    ')},clear:function(){this.setHeight("auto"),this.applyOverflow()},destroy:function(){this.el.remove()},applyOverflow:function(){this.scrollEl.css({"overflow-x":this.overflowX,"overflow-y":this.overflowY})},lockOverflow:function(t){var e=this.overflowX,n=this.overflowY;t=t||this.getScrollbarWidths(),"auto"===e&&(e=t.top||t.bottom||this.scrollEl[0].scrollWidth-1>this.scrollEl[0].clientWidth?"scroll":"hidden"),"auto"===n&&(n=t.left||t.right||this.scrollEl[0].scrollHeight-1>this.scrollEl[0].clientHeight?"scroll":"hidden"),this.scrollEl.css({"overflow-x":e,"overflow-y":n})},setHeight:function(t){this.scrollEl.height(t)},getScrollTop:function(){return this.scrollEl.scrollTop()},setScrollTop:function(t){this.scrollEl.scrollTop(t)},getClientWidth:function(){return this.scrollEl[0].clientWidth},getClientHeight:function(){return this.scrollEl[0].clientHeight},getScrollbarWidths:function(){return p(this.scrollEl)}});Lt.prototype.proxyCall=function(t){var e=Array.prototype.slice.call(arguments,1),n=[];return this.items.forEach(function(i){n.push(i[t].apply(i,e))}),n};var fe=Ot.Calendar=ct.extend({dirDefaults:null,localeDefaults:null,overrides:null,dynamicOverrides:null,options:null,viewSpecCache:null,view:null,header:null,footer:null,loadingLevel:0,constructor:Bt,initialize:function(){},populateOptionsHash:function(){var t,e,i,r;t=J(this.dynamicOverrides.locale,this.overrides.locale),e=ge[t],e||(t=fe.defaults.locale,e=ge[t]||{}),i=J(this.dynamicOverrides.isRTL,this.overrides.isRTL,e.isRTL,fe.defaults.isRTL),r=i?fe.rtlDefaults:{},this.dirDefaults=r,this.localeDefaults=e,this.options=n([fe.defaults,r,e,this.overrides,this.dynamicOverrides]),Nt(this.options)},getViewSpec:function(t){var e=this.viewSpecCache;return e[t]||(e[t]=this.buildViewSpec(t))},getUnitViewSpec:function(e){var n,i,r;if(t.inArray(e,Yt)!=-1)for(n=this.header.getViewsWithButtons(),t.each(Ot.views,function(t){n.push(t)}),i=0;i=n&&e.end<=i},fe.prototype.getPeerEvents=function(t,e){var n,i,r=this.getEventCache(),s=[];for(n=0;nn};var we={id:"_fcBusinessHours",start:"09:00",end:"17:00",dow:[1,2,3,4,5],rendering:"inverse-background"};fe.prototype.getCurrentBusinessHourEvents=function(t){return this.computeBusinessHourEvents(t,this.options.businessHours)},fe.prototype.computeBusinessHourEvents=function(e,n){return n===!0?this.expandBusinessHourEvents(e,[{}]):t.isPlainObject(n)?this.expandBusinessHourEvents(e,[n]):t.isArray(n)?this.expandBusinessHourEvents(e,n,!0):[]},fe.prototype.expandBusinessHourEvents=function(e,n,i){var r,s,o=this.getView(),l=[];for(r=0;r1,this.opt("weekNumbers")&&(this.opt("weekNumbersWithinDays")?(this.cellWeekNumbersVisible=!0,this.colWeekNumbersVisible=!1):(this.cellWeekNumbersVisible=!1,this.colWeekNumbersVisible=!0)),this.dayGrid.numbersVisible=this.dayNumbersVisible||this.cellWeekNumbersVisible||this.colWeekNumbersVisible,this.el.addClass("fc-basic-view").html(this.renderSkeletonHtml()),this.renderHead(),this.scroller.render();var e=this.scroller.el.addClass("fc-day-grid-container"),n=t('
    ').appendTo(e);this.el.find(".fc-body > tr > td").append(e),this.dayGrid.setElement(n),this.dayGrid.renderDates(this.hasRigidRows())},renderHead:function(){this.headContainerEl=this.el.find(".fc-head-container").html(this.dayGrid.renderHeadHtml()),this.headRowEl=this.headContainerEl.find(".fc-row")},unrenderDates:function(){this.dayGrid.unrenderDates(),this.dayGrid.removeElement(),this.scroller.destroy()},renderBusinessHours:function(){this.dayGrid.renderBusinessHours()},unrenderBusinessHours:function(){this.dayGrid.unrenderBusinessHours()},renderSkeletonHtml:function(){return'
    '},weekNumberStyleAttr:function(){return null!==this.weekNumberWidth?'style="width:'+this.weekNumberWidth+'px"':""},hasRigidRows:function(){var t=this.opt("eventLimit");return t&&"number"!=typeof t},updateWidth:function(){this.colWeekNumbersVisible&&(this.weekNumberWidth=u(this.el.find(".fc-week-number")))},setHeight:function(t,e){var n,s,o=this.opt("eventLimit");this.scroller.clear(),r(this.headRowEl),this.dayGrid.removeSegPopover(),o&&"number"==typeof o&&this.dayGrid.limitRows(o),n=this.computeScrollerHeight(t),this.setGridHeight(n,e),o&&"number"!=typeof o&&this.dayGrid.limitRows(o),e||(this.scroller.setHeight(n),s=this.scroller.getScrollbarWidths(),(s.left||s.right)&&(i(this.headRowEl,s),n=this.computeScrollerHeight(t),this.scroller.setHeight(n)),this.scroller.lockOverflow(s))},computeScrollerHeight:function(t){return t-c(this.el,this.scroller.el)},setGridHeight:function(t,e){e?a(this.dayGrid.rowEls):l(this.dayGrid.rowEls,t,!0)},computeInitialScroll:function(){return{top:0}},queryScroll:function(){return{top:this.scroller.getScrollTop()}},setScroll:function(t){this.scroller.setScrollTop(t.top)},hitsNeeded:function(){this.dayGrid.hitsNeeded()},hitsNotNeeded:function(){this.dayGrid.hitsNotNeeded()},prepareHits:function(){this.dayGrid.prepareHits()},releaseHits:function(){this.dayGrid.releaseHits()},queryHit:function(t,e){return this.dayGrid.queryHit(t,e)},getHitSpan:function(t){return this.dayGrid.getHitSpan(t)},getHitEl:function(t){return this.dayGrid.getHitEl(t)},renderEvents:function(t){this.dayGrid.renderEvents(t),this.updateHeight()},getEventSegs:function(){return this.dayGrid.getEventSegs()},unrenderEvents:function(){this.dayGrid.unrenderEvents()},renderDrag:function(t,e){return this.dayGrid.renderDrag(t,e)},unrenderDrag:function(){this.dayGrid.unrenderDrag()},renderSelection:function(t){this.dayGrid.renderSelection(t)},unrenderSelection:function(){this.dayGrid.unrenderSelection()}}),be={renderHeadIntroHtml:function(){var t=this.view;return t.colWeekNumbersVisible?'"+tt(t.opt("weekNumberTitle"))+"":""},renderNumberIntroHtml:function(t){var e=this.view,n=this.getCellDate(t,0);return e.colWeekNumbersVisible?'"+e.buildGotoAnchorHtml({date:n,type:"week",forceOff:1===this.colCnt},n.format("w"))+"":""},renderBgIntroHtml:function(){var t=this.view;return t.colWeekNumbersVisible?'":""},renderIntroHtml:function(){var t=this.view;return t.colWeekNumbersVisible?'":""}},De=Ot.MonthView=Ee.extend({computeRange:function(t){var e,n=Ee.prototype.computeRange.call(this,t);return this.isFixedWeeks()&&(e=Math.ceil(n.end.diff(n.start,"weeks",!0)),n.end.add(6-e,"weeks")),n},setGridHeight:function(t,e){e&&(t*=this.rowCnt/6),l(this.dayGrid.rowEls,t,!e)},isFixedWeeks:function(){return this.opt("fixedWeekCount")}});At.basic={class:Ee},At.basicDay={type:"basic",duration:{days:1}},At.basicWeek={type:"basic",duration:{weeks:1}},At.month={class:De,duration:{months:1},defaults:{fixedWeekCount:!0}};var Te=Ot.AgendaView=de.extend({scroller:null,timeGridClass:ce,timeGrid:null,dayGridClass:ue,dayGrid:null,axisWidth:null,headContainerEl:null,noScrollRowEls:null,bottomRuleEl:null,initialize:function(){this.timeGrid=this.instantiateTimeGrid(),this.opt("allDaySlot")&&(this.dayGrid=this.instantiateDayGrid()),this.scroller=new he({overflowX:"hidden",overflowY:"auto"})},instantiateTimeGrid:function(){var t=this.timeGridClass.extend(Ce);return new t(this)},instantiateDayGrid:function(){var t=this.dayGridClass.extend(He);return new t(this)},setRange:function(t){de.prototype.setRange.call(this,t),this.timeGrid.setRange(t),this.dayGrid&&this.dayGrid.setRange(t)},renderDates:function(){this.el.addClass("fc-agenda-view").html(this.renderSkeletonHtml()),this.renderHead(),this.scroller.render();var e=this.scroller.el.addClass("fc-time-grid-container"),n=t('
    ').appendTo(e);this.el.find(".fc-body > tr > td").append(e),this.timeGrid.setElement(n),this.timeGrid.renderDates(),this.bottomRuleEl=t('
    ').appendTo(this.timeGrid.el),this.dayGrid&&(this.dayGrid.setElement(this.el.find(".fc-day-grid")),this.dayGrid.renderDates(),this.dayGrid.bottomCoordPadding=this.dayGrid.el.next("hr").outerHeight()),this.noScrollRowEls=this.el.find(".fc-row:not(.fc-scroller *)")},renderHead:function(){this.headContainerEl=this.el.find(".fc-head-container").html(this.timeGrid.renderHeadHtml())},unrenderDates:function(){this.timeGrid.unrenderDates(),this.timeGrid.removeElement(),this.dayGrid&&(this.dayGrid.unrenderDates(),this.dayGrid.removeElement()),this.scroller.destroy()},renderSkeletonHtml:function(){return'
    '+(this.dayGrid?'

    ':"")+"
    "},axisStyleAttr:function(){return null!==this.axisWidth?'style="width:'+this.axisWidth+'px"':""},renderBusinessHours:function(){this.timeGrid.renderBusinessHours(),this.dayGrid&&this.dayGrid.renderBusinessHours()},unrenderBusinessHours:function(){this.timeGrid.unrenderBusinessHours(),this.dayGrid&&this.dayGrid.unrenderBusinessHours()},getNowIndicatorUnit:function(){return this.timeGrid.getNowIndicatorUnit()},renderNowIndicator:function(t){this.timeGrid.renderNowIndicator(t)},unrenderNowIndicator:function(){this.timeGrid.unrenderNowIndicator()},updateSize:function(t){this.timeGrid.updateSize(t),de.prototype.updateSize.call(this,t)},updateWidth:function(){this.axisWidth=u(this.el.find(".fc-axis"))},setHeight:function(t,e){var n,s,o;this.bottomRuleEl.hide(),this.scroller.clear(),r(this.noScrollRowEls),this.dayGrid&&(this.dayGrid.removeSegPopover(),n=this.opt("eventLimit"),n&&"number"!=typeof n&&(n=xe),n&&this.dayGrid.limitRows(n)),e||(s=this.computeScrollerHeight(t),this.scroller.setHeight(s),o=this.scroller.getScrollbarWidths(),(o.left||o.right)&&(i(this.noScrollRowEls,o),s=this.computeScrollerHeight(t),this.scroller.setHeight(s)),this.scroller.lockOverflow(o),this.timeGrid.getTotalSlatHeight()"+e.buildGotoAnchorHtml({date:this.start,type:"week",forceOff:this.colCnt>1},tt(t))+""):'"},renderBgIntroHtml:function(){var t=this.view;return'"},renderIntroHtml:function(){var t=this.view;return'"}},He={renderBgIntroHtml:function(){var t=this.view;return'"+t.getAllDayHtml()+""},renderIntroHtml:function(){var t=this.view;return'"}},xe=5,Re=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}];At.agenda={class:Te,defaults:{allDaySlot:!0,slotDuration:"00:30:00",minTime:"00:00:00",maxTime:"24:00:00",slotEventOverlap:!0}},At.agendaDay={type:"agenda",duration:{days:1}},At.agendaWeek={type:"agenda",duration:{weeks:1}};var Ie=de.extend({grid:null,scroller:null,initialize:function(){this.grid=new ke(this),this.scroller=new he({overflowX:"hidden",overflowY:"auto"})},setRange:function(t){de.prototype.setRange.call(this,t),this.grid.setRange(t)},renderSkeleton:function(){this.el.addClass("fc-list-view "+this.widgetContentClass),this.scroller.render(),this.scroller.el.appendTo(this.el),this.grid.setElement(this.scroller.scrollEl)},unrenderSkeleton:function(){this.scroller.destroy()},setHeight:function(t,e){this.scroller.setHeight(this.computeScrollerHeight(t))},computeScrollerHeight:function(t){return t-c(this.el,this.scroller.el)},renderEvents:function(t){this.grid.renderEvents(t)},unrenderEvents:function(){this.grid.unrenderEvents()},isEventResizable:function(t){return!1},isEventDraggable:function(t){return!1}}),ke=le.extend({segSelector:".fc-list-item",hasDayInteractions:!1,spanToSegs:function(t){for(var e,n=this.view,i=n.start.clone().time(0),r=0,s=[];i
    '+tt(this.view.opt("noEventsMessage"))+"
    ")},renderSegList:function(e){var n,i,r,s=this.groupSegsByDay(e),o=t('
    '),l=o.find("tbody");for(n=0;n'+(n?e.buildGotoAnchorHtml(t,{class:"fc-list-heading-main"},tt(t.format(n))):"")+(i?e.buildGotoAnchorHtml(t,{class:"fc-list-heading-alt"},tt(t.format(i))):"")+""},fgSegHtml:function(t){var e,n=this.view,i=["fc-list-item"].concat(this.getSegCustomClasses(t)),r=this.getSegBackgroundColor(t),s=t.event,o=s.url;return e=s.allDay?n.getAllDayHtml():n.isMultiDayEvent(s)?t.isStart||t.isEnd?tt(this.getEventTimeText(t)):n.getAllDayHtml():tt(this.getEventTimeText(s)),o&&i.push("fc-has-url"),''+(this.displayEventTime?''+(e||"")+"":"")+'"+tt(t.event.title||"")+""}});return At.list={class:Ie,buttonTextKey:"list",defaults:{buttonText:"list",listDayFormat:"LL",noEventsMessage:"No events to display"}},At.listDay={type:"list",duration:{days:1},defaults:{listDayFormat:"dddd"}},At.listWeek={type:"list",duration:{weeks:1},defaults:{listDayFormat:"dddd",listDayAltFormat:"LL"}},At.listMonth={type:"list",duration:{month:1},defaults:{listDayAltFormat:"dddd"}},At.listYear={type:"list",duration:{year:1},defaults:{listDayAltFormat:"dddd"}},Ot});;define('fullcalendar', ['fullcalendar/dist/fullcalendar.min'], function (main) { return main; }); - -define('text!fullcalendar/dist/fullcalendar.min.css', ['module'], function(module) { module.exports = "/*!\n * FullCalendar v3.2.0 Stylesheet\n * Docs & License: https://fullcalendar.io/\n * (c) 2017 Adam Shaw\n */.fc-icon,body .fc{font-size:1em}.fc-button-group,.fc-icon{display:inline-block}.fc-bg,.fc-row .fc-bgevent-skeleton,.fc-row .fc-highlight-skeleton{bottom:0}.fc-icon,.fc-unselectable{-khtml-user-select:none;-webkit-touch-callout:none}.fc{direction:ltr;text-align:left}.fc-rtl{text-align:right}.fc th,.fc-basic-view td.fc-week-number,.fc-icon,.fc-toolbar{text-align:center}.fc-unthemed .fc-content,.fc-unthemed .fc-divider,.fc-unthemed .fc-list-heading td,.fc-unthemed .fc-list-view,.fc-unthemed .fc-popover,.fc-unthemed .fc-row,.fc-unthemed tbody,.fc-unthemed td,.fc-unthemed th,.fc-unthemed thead{border-color:#ddd}.fc-unthemed .fc-popover{background-color:#fff}.fc-unthemed .fc-divider,.fc-unthemed .fc-list-heading td,.fc-unthemed .fc-popover .fc-header{background:#eee}.fc-unthemed .fc-popover .fc-header .fc-close{color:#666}.fc-unthemed td.fc-today{background:#fcf8e3}.fc-highlight{background:#bce8f1;opacity:.3}.fc-bgevent{background:#8fdf82;opacity:.3}.fc-nonbusiness{background:#d7d7d7}.fc-icon{height:1em;line-height:1em;overflow:hidden;font-family:\"Courier New\",Courier,monospace;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fc-icon:after{position:relative}.fc-icon-left-single-arrow:after{content:\"\\02039\";font-weight:700;font-size:200%;top:-7%}.fc-icon-right-single-arrow:after{content:\"\\0203A\";font-weight:700;font-size:200%;top:-7%}.fc-icon-left-double-arrow:after{content:\"\\000AB\";font-size:160%;top:-7%}.fc-icon-right-double-arrow:after{content:\"\\000BB\";font-size:160%;top:-7%}.fc-icon-left-triangle:after{content:\"\\25C4\";font-size:125%;top:3%}.fc-icon-right-triangle:after{content:\"\\25BA\";font-size:125%;top:3%}.fc-icon-down-triangle:after{content:\"\\25BC\";font-size:125%;top:2%}.fc-icon-x:after{content:\"\\000D7\";font-size:200%;top:6%}.fc button{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;height:2.1em;padding:0 .6em;font-size:1em;white-space:nowrap;cursor:pointer}.fc button::-moz-focus-inner{margin:0;padding:0}.fc-state-default{border:1px solid;background-color:#f5f5f5;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);color:#333;text-shadow:0 1px 1px rgba(255,255,255,.75);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05)}.fc-state-default.fc-corner-left{border-top-left-radius:4px;border-bottom-left-radius:4px}.fc-state-default.fc-corner-right{border-top-right-radius:4px;border-bottom-right-radius:4px}.fc button .fc-icon{position:relative;top:-.05em;margin:0 .2em;vertical-align:middle}.fc-state-active,.fc-state-disabled,.fc-state-down,.fc-state-hover{color:#333;background-color:#e6e6e6}.fc-state-hover{color:#333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.fc-state-active,.fc-state-down{background-color:#ccc;background-image:none;box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}.fc-state-disabled{cursor:default;background-image:none;opacity:.65;box-shadow:none}.fc-event.fc-draggable,.fc-event[href],.fc-popover .fc-header .fc-close,a[data-goto]{cursor:pointer}.fc .fc-button-group>*{float:left;margin:0 0 0 -1px}.fc .fc-button-group>:first-child{margin-left:0}.fc-popover{position:absolute;box-shadow:0 2px 6px rgba(0,0,0,.15)}.fc-popover .fc-header{padding:2px 4px}.fc-popover .fc-header .fc-title{margin:0 2px}.fc-ltr .fc-popover .fc-header .fc-title,.fc-rtl .fc-popover .fc-header .fc-close{float:left}.fc-ltr .fc-popover .fc-header .fc-close,.fc-rtl .fc-popover .fc-header .fc-title{float:right}.fc-unthemed .fc-popover{border-width:1px;border-style:solid}.fc-unthemed .fc-popover .fc-header .fc-close{font-size:.9em;margin-top:2px}.fc-popover>.ui-widget-header+.ui-widget-content{border-top:0}.fc-divider{border-style:solid;border-width:1px}hr.fc-divider{height:0;margin:0;padding:0 0 2px;border-width:1px 0}.fc-bg table,.fc-row .fc-bgevent-skeleton table,.fc-row .fc-highlight-skeleton table{height:100%}.fc-clear{clear:both}.fc-bg,.fc-bgevent-skeleton,.fc-helper-skeleton,.fc-highlight-skeleton{position:absolute;top:0;left:0;right:0}.fc table{width:100%;box-sizing:border-box;table-layout:fixed;border-collapse:collapse;border-spacing:0;font-size:1em}.fc td,.fc th{border-style:solid;border-width:1px;padding:0;vertical-align:top}.fc td.fc-today{border-style:double}a[data-goto]:hover{text-decoration:underline}.fc .fc-row{border-style:solid;border-width:0}.fc-row table{border-left:0 hidden transparent;border-right:0 hidden transparent;border-bottom:0 hidden transparent}.fc-row:first-child table{border-top:0 hidden transparent}.fc-row{position:relative}.fc-row .fc-bg{z-index:1}.fc-row .fc-bgevent-skeleton td,.fc-row .fc-highlight-skeleton td{border-color:transparent}.fc-row .fc-bgevent-skeleton{z-index:2}.fc-row .fc-highlight-skeleton{z-index:3}.fc-row .fc-content-skeleton{position:relative;z-index:4;padding-bottom:2px}.fc-row .fc-helper-skeleton{z-index:5}.fc-row .fc-content-skeleton td,.fc-row .fc-helper-skeleton td{background:0 0;border-color:transparent;border-bottom:0}.fc-row .fc-content-skeleton tbody td,.fc-row .fc-helper-skeleton tbody td{border-top:0}.fc-scroller{-webkit-overflow-scrolling:touch}.fc-row.fc-rigid,.fc-time-grid-event{overflow:hidden}.fc-scroller>.fc-day-grid,.fc-scroller>.fc-time-grid{position:relative;width:100%}.fc-event{position:relative;display:block;font-size:.85em;line-height:1.3;border-radius:3px;border:1px solid #3a87ad;font-weight:400}.fc-event,.fc-event-dot{background-color:#3a87ad}.fc-event,.fc-event:hover,.ui-widget .fc-event{color:#fff;text-decoration:none}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc-event .fc-bg{z-index:1;background:#fff;opacity:.25}.fc-event .fc-content{position:relative;z-index:2}.fc-event .fc-resizer{position:absolute;z-index:4;display:none}.fc-event.fc-allow-mouse-resize .fc-resizer,.fc-event.fc-selected .fc-resizer{display:block}.fc-event.fc-selected .fc-resizer:before{content:\"\";position:absolute;z-index:9999;top:50%;left:50%;width:40px;height:40px;margin-left:-20px;margin-top:-20px}.fc-event.fc-selected{z-index:9999!important;box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event.fc-selected.fc-dragging{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-h-event.fc-selected:before{content:\"\";position:absolute;z-index:3;top:-10px;bottom:-10px;left:0;right:0}.fc-ltr .fc-h-event.fc-not-start,.fc-rtl .fc-h-event.fc-not-end{margin-left:0;border-left-width:0;padding-left:1px;border-top-left-radius:0;border-bottom-left-radius:0}.fc-ltr .fc-h-event.fc-not-end,.fc-rtl .fc-h-event.fc-not-start{margin-right:0;border-right-width:0;padding-right:1px;border-top-right-radius:0;border-bottom-right-radius:0}.fc-ltr .fc-h-event .fc-start-resizer,.fc-rtl .fc-h-event .fc-end-resizer{cursor:w-resize;left:-1px}.fc-ltr .fc-h-event .fc-end-resizer,.fc-rtl .fc-h-event .fc-start-resizer{cursor:e-resize;right:-1px}.fc-h-event.fc-allow-mouse-resize .fc-resizer{width:7px;top:-1px;bottom:-1px}.fc-h-event.fc-selected .fc-resizer{border-radius:4px;border-width:1px;width:6px;height:6px;border-style:solid;border-color:inherit;background:#fff;top:50%;margin-top:-4px}.fc-ltr .fc-h-event.fc-selected .fc-start-resizer,.fc-rtl .fc-h-event.fc-selected .fc-end-resizer{margin-left:-4px}.fc-ltr .fc-h-event.fc-selected .fc-end-resizer,.fc-rtl .fc-h-event.fc-selected .fc-start-resizer{margin-right:-4px}.fc-day-grid-event{margin:1px 2px 0;padding:0 1px}tr:first-child>td>.fc-day-grid-event{margin-top:2px}.fc-day-grid-event.fc-selected:after{content:\"\";position:absolute;z-index:1;top:-1px;right:-1px;bottom:-1px;left:-1px;background:#000;opacity:.25}.fc-day-grid-event .fc-content{white-space:nowrap;overflow:hidden}.fc-day-grid-event .fc-time{font-weight:700}.fc-ltr .fc-day-grid-event.fc-allow-mouse-resize .fc-start-resizer,.fc-rtl .fc-day-grid-event.fc-allow-mouse-resize .fc-end-resizer{margin-left:-2px}.fc-ltr .fc-day-grid-event.fc-allow-mouse-resize .fc-end-resizer,.fc-rtl .fc-day-grid-event.fc-allow-mouse-resize .fc-start-resizer{margin-right:-2px}a.fc-more{margin:1px 3px;font-size:.85em;cursor:pointer;text-decoration:none}a.fc-more:hover{text-decoration:underline}.fc-limited{display:none}.fc-day-grid .fc-row{z-index:1}.fc-more-popover{z-index:2;width:220px}.fc-more-popover .fc-event-container{padding:10px}.fc-now-indicator{position:absolute;border:0 solid red}.fc-unselectable{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.fc-toolbar.fc-header-toolbar{margin-bottom:1em}.fc-toolbar.fc-footer-toolbar{margin-top:1em}.fc-toolbar .fc-left{float:left}.fc-toolbar .fc-right{float:right}.fc-toolbar .fc-center{display:inline-block}.fc .fc-toolbar>*>*{float:left;margin-left:.75em}.fc .fc-toolbar>*>:first-child{margin-left:0}.fc-toolbar h2{margin:0}.fc-toolbar button{position:relative}.fc-toolbar .fc-state-hover,.fc-toolbar .ui-state-hover{z-index:2}.fc-toolbar .fc-state-down{z-index:3}.fc-toolbar .fc-state-active,.fc-toolbar .ui-state-active{z-index:4}.fc-toolbar button:focus{z-index:5}.fc-view-container *,.fc-view-container :after,.fc-view-container :before{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.fc-view,.fc-view>table{position:relative;z-index:1}.fc-basicDay-view .fc-content-skeleton,.fc-basicWeek-view .fc-content-skeleton{padding-bottom:1em}.fc-basic-view .fc-body .fc-row{min-height:4em}.fc-row.fc-rigid .fc-content-skeleton{position:absolute;top:0;left:0;right:0}.fc-day-top.fc-other-month{opacity:.3}.fc-basic-view .fc-day-number,.fc-basic-view .fc-week-number{padding:2px}.fc-basic-view th.fc-day-number,.fc-basic-view th.fc-week-number{padding:0 2px}.fc-ltr .fc-basic-view .fc-day-top .fc-day-number{float:right}.fc-rtl .fc-basic-view .fc-day-top .fc-day-number{float:left}.fc-ltr .fc-basic-view .fc-day-top .fc-week-number{float:left;border-radius:0 0 3px}.fc-rtl .fc-basic-view .fc-day-top .fc-week-number{float:right;border-radius:0 0 0 3px}.fc-basic-view .fc-day-top .fc-week-number{min-width:1.5em;text-align:center;background-color:#f2f2f2;color:grey}.fc-basic-view td.fc-week-number>*{display:inline-block;min-width:1.25em}.fc-agenda-view .fc-day-grid{position:relative;z-index:2}.fc-agenda-view .fc-day-grid .fc-row{min-height:3em}.fc-agenda-view .fc-day-grid .fc-row .fc-content-skeleton{padding-bottom:1em}.fc .fc-axis{vertical-align:middle;padding:0 4px;white-space:nowrap}.fc-ltr .fc-axis{text-align:right}.fc-rtl .fc-axis{text-align:left}.ui-widget td.fc-axis{font-weight:400}.fc-time-grid,.fc-time-grid-container{position:relative;z-index:1}.fc-time-grid{min-height:100%}.fc-time-grid table{border:0 hidden transparent}.fc-time-grid>.fc-bg{z-index:1}.fc-time-grid .fc-slats,.fc-time-grid>hr{position:relative;z-index:2}.fc-time-grid .fc-content-col{position:relative}.fc-time-grid .fc-content-skeleton{position:absolute;z-index:3;top:0;left:0;right:0}.fc-time-grid .fc-business-container{position:relative;z-index:1}.fc-time-grid .fc-bgevent-container{position:relative;z-index:2}.fc-time-grid .fc-highlight-container{z-index:3;position:relative}.fc-time-grid .fc-event-container{position:relative;z-index:4}.fc-time-grid .fc-now-indicator-line{z-index:5}.fc-time-grid .fc-helper-container{position:relative;z-index:6}.fc-time-grid .fc-slats td{height:1.5em;border-bottom:0}.fc-time-grid .fc-slats .fc-minor td{border-top-style:dotted}.fc-time-grid .fc-slats .ui-widget-content{background:0 0}.fc-time-grid .fc-highlight{position:absolute;left:0;right:0}.fc-ltr .fc-time-grid .fc-event-container{margin:0 2.5% 0 2px}.fc-rtl .fc-time-grid .fc-event-container{margin:0 2px 0 2.5%}.fc-time-grid .fc-bgevent,.fc-time-grid .fc-event{position:absolute;z-index:1}.fc-time-grid .fc-bgevent{left:0;right:0}.fc-v-event.fc-not-start{border-top-width:0;padding-top:1px;border-top-left-radius:0;border-top-right-radius:0}.fc-v-event.fc-not-end{border-bottom-width:0;padding-bottom:1px;border-bottom-left-radius:0;border-bottom-right-radius:0}.fc-time-grid-event.fc-selected{overflow:visible}.fc-time-grid-event.fc-selected .fc-bg{display:none}.fc-time-grid-event .fc-content{overflow:hidden}.fc-time-grid-event .fc-time,.fc-time-grid-event .fc-title{padding:0 1px}.fc-time-grid-event .fc-time{font-size:.85em;white-space:nowrap}.fc-time-grid-event.fc-short .fc-content{white-space:nowrap}.fc-time-grid-event.fc-short .fc-time,.fc-time-grid-event.fc-short .fc-title{display:inline-block;vertical-align:top}.fc-time-grid-event.fc-short .fc-time span{display:none}.fc-time-grid-event.fc-short .fc-time:before{content:attr(data-start)}.fc-time-grid-event.fc-short .fc-time:after{content:\"\\000A0-\\000A0\"}.fc-time-grid-event.fc-short .fc-title{font-size:.85em;padding:0}.fc-time-grid-event.fc-allow-mouse-resize .fc-resizer{left:0;right:0;bottom:0;height:8px;overflow:hidden;line-height:8px;font-size:11px;font-family:monospace;text-align:center;cursor:s-resize}.fc-time-grid-event.fc-allow-mouse-resize .fc-resizer:after{content:\"=\"}.fc-time-grid-event.fc-selected .fc-resizer{border-radius:5px;border-width:1px;width:8px;height:8px;border-style:solid;border-color:inherit;background:#fff;left:50%;margin-left:-5px;bottom:-5px}.fc-time-grid .fc-now-indicator-line{border-top-width:1px;left:0;right:0}.fc-time-grid .fc-now-indicator-arrow{margin-top:-5px}.fc-ltr .fc-time-grid .fc-now-indicator-arrow{left:0;border-width:5px 0 5px 6px;border-top-color:transparent;border-bottom-color:transparent}.fc-rtl .fc-time-grid .fc-now-indicator-arrow{right:0;border-width:5px 6px 5px 0;border-top-color:transparent;border-bottom-color:transparent}.fc-event-dot{display:inline-block;width:10px;height:10px;border-radius:5px}.fc-rtl .fc-list-view{direction:rtl}.fc-list-view{border-width:1px;border-style:solid}.fc .fc-list-table{table-layout:auto}.fc-list-table td{border-width:1px 0 0;padding:8px 14px}.fc-list-table tr:first-child td{border-top-width:0}.fc-list-heading{border-bottom-width:1px}.fc-list-heading td{font-weight:700}.fc-ltr .fc-list-heading-main{float:left}.fc-ltr .fc-list-heading-alt,.fc-rtl .fc-list-heading-main{float:right}.fc-rtl .fc-list-heading-alt{float:left}.fc-list-item.fc-has-url{cursor:pointer}.fc-list-item:hover td{background-color:#f5f5f5}.fc-list-item-marker,.fc-list-item-time{white-space:nowrap;width:1px}.fc-ltr .fc-list-item-marker{padding-right:0}.fc-rtl .fc-list-item-marker{padding-left:0}.fc-list-item-title a{text-decoration:none;color:inherit}.fc-list-item-title a[href]:hover{text-decoration:underline}.fc-list-empty-wrap2{position:absolute;top:0;left:0;right:0;bottom:0}.fc-list-empty-wrap1{width:100%;height:100%;display:table}.fc-list-empty{display:table-cell;vertical-align:middle;text-align:center}.fc-unthemed .fc-list-empty{background-color:#eee}"; }); -!function(e){"function"==typeof define&&define.amd?define('fullcalendar/dist/locale/zh-cn',["jquery","moment"],e):"object"==typeof exports?module.exports=e(require("jquery"),require("moment")):e(jQuery,moment)}(function(e,t){!function(){var e=t.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"Ah点mm分",LTS:"Ah点m分s秒",L:"YYYY-MM-DD",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日Ah点mm分",LLLL:"YYYY年MMMD日ddddAh点mm分",l:"YYYY-MM-DD",ll:"YYYY年MMMD日",lll:"YYYY年MMMD日Ah点mm分",llll:"YYYY年MMMD日ddddAh点mm分"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"下午"===t||"晚上"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:function(){return 0===this.minutes()?"[今天]Ah[点整]":"[今天]LT"},nextDay:function(){return 0===this.minutes()?"[明天]Ah[点整]":"[明天]LT"},lastDay:function(){return 0===this.minutes()?"[昨天]Ah[点整]":"[昨天]LT"},nextWeek:function(){var e,n;return e=t().startOf("week"),n=this.diff(e,"days")>=7?"[下]":"[本]",0===this.minutes()?n+"dddAh点整":n+"dddAh点mm"},lastWeek:function(){var e,n;return e=t().startOf("week"),n=this.unix()2?arguments[2]:void 0,c=Math.min((void 0===u?a:o(u,a))-l,a-s),d=1;for(l0;)l in i?i[s]=i[l]:delete i[s],s+=d,l+=d;return i}},{105:105,108:108,109:109}],9:[function(e,t,i){"use strict";var n=e(109),o=e(105),r=e(108);t.exports=function(e){for(var t=n(this),i=r(t.length),a=arguments.length,s=o(a>1?arguments[1]:void 0,i),l=a>2?arguments[2]:void 0,u=void 0===l?i:o(l,i);u>s;)t[s++]=e;return t}},{105:105,108:108,109:109}],10:[function(e,t,i){var n=e(37);t.exports=function(e,t){var i=[];return n(e,!1,i.push,i,t),i}},{37:37}],11:[function(e,t,i){var n=e(107),o=e(108),r=e(105);t.exports=function(e){return function(t,i,a){var s,l=n(t),u=o(l.length),c=r(a,u);if(e&&i!=i){for(;u>c;)if(s=l[c++],s!=s)return!0}else for(;u>c;c++)if((e||c in l)&&l[c]===i)return e||c||0;return!e&&-1}}},{105:105,107:107,108:108}],12:[function(e,t,i){var n=e(25),o=e(45),r=e(109),a=e(108),s=e(15);t.exports=function(e,t){var i=1==e,l=2==e,u=3==e,c=4==e,d=6==e,f=5==e||d,p=t||s;return function(t,s,m){for(var h,g,b=r(t),v=o(b),A=n(s,m,3),w=a(v.length),y=0,x=i?p(t,w):l?p(t,0):void 0;w>y;y++)if((f||y in v)&&(h=v[y],g=A(h,y,b),e))if(i)x[y]=g;else if(g)switch(e){case 3:return!0;case 5:return h;case 6:return y;case 2:x.push(h)}else if(c)return!1;return d?-1:u||c?c:x}}},{108:108,109:109,15:15,25:25,45:45}],13:[function(e,t,i){var n=e(3),o=e(109),r=e(45),a=e(108);t.exports=function(e,t,i,s,l){n(t);var u=o(e),c=r(u),d=a(u.length),f=l?d-1:0,p=l?-1:1;if(i<2)for(;;){if(f in c){s=c[f],f+=p;break}if(f+=p,l?f<0:d<=f)throw TypeError("Reduce of empty array with no initial value")}for(;l?f>=0:d>f;f+=p)f in c&&(s=t(s,c[f],f,u));return s}},{108:108,109:109,3:3,45:45}],14:[function(e,t,i){var n=e(49),o=e(47),r=e(117)("species");t.exports=function(e){var t;return o(e)&&(t=e.constructor,"function"!=typeof t||t!==Array&&!o(t.prototype)||(t=void 0),n(t)&&(t=t[r],null===t&&(t=void 0))),void 0===t?Array:t}},{117:117,47:47,49:49}],15:[function(e,t,i){var n=e(14);t.exports=function(e,t){return new(n(e))(t)}},{14:14}],16:[function(e,t,i){"use strict";var n=e(3),o=e(49),r=e(44),a=[].slice,s={},l=function(e,t,i){if(!(t in s)){for(var n=[],o=0;o1?arguments[1]:void 0,3);t=t?t.n:this._f;)for(i(t.v,t.k,this);t&&t.r;)t=t.p},has:function(e){return!!g(this,e)}}),p&&n(d.prototype,"size",{get:function(){return l(this[h])}}),d},def:function(e,t,i){var n,o,r=g(e,t);return r?r.v=i:(e._l=r={i:o=m(t,!0),k:t,v:i,p:n=e._l,n:void 0,r:!1},e._f||(e._f=r),n&&(n.n=r),e[h]++,"F"!==o&&(e._i[o]=r)),e},getEntry:g,setStrong:function(e,t,i){c(e,t,function(e,t){this._t=e,this._k=t,this._l=void 0},function(){for(var e=this,t=e._k,i=e._l;i&&i.r;)i=i.p;return e._t&&(e._l=i=i?i.n:e._t._f)?"keys"==t?d(0,i.k):"values"==t?d(0,i.v):d(0,[i.k,i.v]):(e._t=void 0,d(1))},i?"entries":"values",!i,!0),f(t)}}},{25:25,27:27,28:28,37:37,53:53,55:55,6:6,62:62,66:66,67:67,86:86,91:91}],20:[function(e,t,i){var n=e(17),o=e(10);t.exports=function(e){return function(){if(n(this)!=e)throw TypeError(e+"#toJSON isn't generic");return o(this)}}},{10:10,17:17}],21:[function(e,t,i){"use strict";var n=e(86),o=e(62).getWeak,r=e(7),a=e(49),s=e(6),l=e(37),u=e(12),c=e(39),d=u(5),f=u(6),p=0,m=function(e){return e._l||(e._l=new h)},h=function(){this.a=[]},g=function(e,t){return d(e.a,function(e){return e[0]===t})};h.prototype={get:function(e){var t=g(this,e);if(t)return t[1]},has:function(e){return!!g(this,e)},set:function(e,t){var i=g(this,e);i?i[1]=t:this.a.push([e,t])},delete:function(e){var t=f(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},t.exports={getConstructor:function(e,t,i,r){var u=e(function(e,n){s(e,u,t,"_i"),e._i=p++,e._l=void 0,void 0!=n&&l(n,i,e[r],e)});return n(u.prototype,{delete:function(e){if(!a(e))return!1;var t=o(e);return t===!0?m(this).delete(e):t&&c(t,this._i)&&delete t[this._i]},has:function(e){if(!a(e))return!1;var t=o(e);return t===!0?m(this).has(e):t&&c(t,this._i)}}),u},def:function(e,t,i){var n=o(r(t),!0);return n===!0?m(e).set(t,i):n[e._i]=i,e},ufstore:m}},{12:12,37:37,39:39,49:49,6:6,62:62,7:7,86:86}],22:[function(e,t,i){"use strict";var n=e(38),o=e(32),r=e(87),a=e(86),s=e(62),l=e(37),u=e(6),c=e(49),d=e(34),f=e(54),p=e(92),m=e(43);t.exports=function(e,t,i,h,g,b){var v=n[e],A=v,w=g?"set":"add",y=A&&A.prototype,x={},k=function(e){var t=y[e];r(y,e,"delete"==e?function(e){return!(b&&!c(e))&&t.call(this,0===e?0:e)}:"has"==e?function(e){return!(b&&!c(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return b&&!c(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,i){return t.call(this,0===e?0:e,i),this})};if("function"==typeof A&&(b||y.forEach&&!d(function(){(new A).entries().next()}))){var C=new A,F=C[w](b?{}:-0,1)!=C,E=d(function(){C.has(1)}),_=f(function(e){new A(e)}),S=!b&&d(function(){for(var e=new A,t=5;t--;)e[w](t,t);return!e.has(-0)});_||(A=t(function(t,i){u(t,A,e);var n=m(new v,t,A);return void 0!=i&&l(i,g,n[w],n),n}),A.prototype=y,y.constructor=A),(E||S)&&(k("delete"),k("has"),g&&k("get")),(S||F)&&k(w),b&&y.clear&&delete y.clear}else A=h.getConstructor(t,e,g,w),a(A.prototype,i),s.NEED=!0;return p(A,e),x[e]=A,o(o.G+o.W+o.F*(A!=v),x),b||h.setStrong(A,e,g),A}},{32:32,34:34,37:37,38:38,43:43,49:49,54:54,6:6,62:62,86:86,87:87,92:92}],23:[function(e,t,i){var n=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},{}],24:[function(e,t,i){"use strict";var n=e(67),o=e(85);t.exports=function(e,t,i){t in e?n.f(e,t,o(0,i)):e[t]=i}},{67:67,85:85}],25:[function(e,t,i){var n=e(3);t.exports=function(e,t,i){if(n(e),void 0===t)return e;switch(i){case 1:return function(i){return e.call(t,i)};case 2:return function(i,n){return e.call(t,i,n)};case 3:return function(i,n,o){return e.call(t,i,n,o)}}return function(){return e.apply(t,arguments)}}},{3:3}],26:[function(e,t,i){"use strict";var n=e(7),o=e(110),r="number";t.exports=function(e){if("string"!==e&&e!==r&&"default"!==e)throw TypeError("Incorrect hint");return o(n(this),e!=r)}},{110:110,7:7}],27:[function(e,t,i){t.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},{}],28:[function(e,t,i){t.exports=!e(34)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{34:34}],29:[function(e,t,i){var n=e(49),o=e(38).document,r=n(o)&&n(o.createElement);t.exports=function(e){return r?o.createElement(e):{}}},{38:38,49:49}],30:[function(e,t,i){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],31:[function(e,t,i){var n=e(76),o=e(73),r=e(77);t.exports=function(e){var t=n(e),i=o.f;if(i)for(var a,s=i(e),l=r.f,u=0;s.length>u;)l.call(e,a=s[u++])&&t.push(a);return t}},{73:73,76:76,77:77}],32:[function(e,t,i){var n=e(38),o=e(23),r=e(40),a=e(87),s=e(25),l="prototype",u=function(e,t,i){var c,d,f,p,m=e&u.F,h=e&u.G,g=e&u.S,b=e&u.P,v=e&u.B,A=h?n:g?n[t]||(n[t]={}):(n[t]||{})[l],w=h?o:o[t]||(o[t]={}),y=w[l]||(w[l]={});h&&(i=t);for(c in i)d=!m&&A&&void 0!==A[c],f=(d?A:i)[c],p=v&&d?s(f,n):b&&"function"==typeof f?s(Function.call,f):f,A&&a(A,c,f,e&u.U),w[c]!=f&&r(w,c,p),b&&y[c]!=f&&(y[c]=f)};n.core=o,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},{23:23,25:25,38:38,40:40,87:87}],33:[function(e,t,i){var n=e(117)("match");t.exports=function(e){var t=/./;try{"/./"[e](t)}catch(i){try{return t[n]=!1,!"/./"[e](t)}catch(e){}}return!0}},{117:117}],34:[function(e,t,i){t.exports=function(e){try{return!!e()}catch(e){return!0}}},{}],35:[function(e,t,i){"use strict";var n=e(40),o=e(87),r=e(34),a=e(27),s=e(117);t.exports=function(e,t,i){var l=s(e),u=i(a,l,""[e]),c=u[0],d=u[1];r(function(){var t={};return t[l]=function(){return 7},7!=""[e](t)})&&(o(String.prototype,e,c),n(RegExp.prototype,l,2==t?function(e,t){return d.call(e,this,t)}:function(e){return d.call(e,this)}))}},{117:117,27:27,34:34,40:40,87:87}],36:[function(e,t,i){"use strict";var n=e(7);t.exports=function(){var e=n(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},{7:7}],37:[function(e,t,i){var n=e(25),o=e(51),r=e(46),a=e(7),s=e(108),l=e(118),u={},c={},i=t.exports=function(e,t,i,d,f){var p,m,h,g,b=f?function(){return e}:l(e),v=n(i,d,t?2:1),A=0;if("function"!=typeof b)throw TypeError(e+" is not iterable!");if(r(b)){for(p=s(e.length);p>A;A++)if(g=t?v(a(m=e[A])[0],m[1]):v(e[A]),g===u||g===c)return g}else for(h=b.call(e);!(m=h.next()).done;)if(g=o(h,v,m.value,t),g===u||g===c)return g};i.BREAK=u,i.RETURN=c},{108:108,118:118,25:25,46:46,51:51,7:7}],38:[function(e,t,i){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},{}],39:[function(e,t,i){var n={}.hasOwnProperty;t.exports=function(e,t){return n.call(e,t)}},{}],40:[function(e,t,i){var n=e(67),o=e(85);t.exports=e(28)?function(e,t,i){return n.f(e,t,o(1,i))}:function(e,t,i){return e[t]=i,e}},{28:28,67:67,85:85}],41:[function(e,t,i){t.exports=e(38).document&&document.documentElement},{38:38}],42:[function(e,t,i){t.exports=!e(28)&&!e(34)(function(){return 7!=Object.defineProperty(e(29)("div"),"a",{get:function(){return 7}}).a})},{28:28,29:29,34:34}],43:[function(e,t,i){var n=e(49),o=e(90).set;t.exports=function(e,t,i){var r,a=t.constructor;return a!==i&&"function"==typeof a&&(r=a.prototype)!==i.prototype&&n(r)&&o&&o(e,r),e}},{49:49,90:90}],44:[function(e,t,i){t.exports=function(e,t,i){var n=void 0===i;switch(t.length){case 0:return n?e():e.call(i);case 1:return n?e(t[0]):e.call(i,t[0]);case 2:return n?e(t[0],t[1]):e.call(i,t[0],t[1]);case 3:return n?e(t[0],t[1],t[2]):e.call(i,t[0],t[1],t[2]);case 4:return n?e(t[0],t[1],t[2],t[3]):e.call(i,t[0],t[1],t[2],t[3])}return e.apply(i,t)}},{}],45:[function(e,t,i){var n=e(18);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},{18:18}],46:[function(e,t,i){var n=e(56),o=e(117)("iterator"),r=Array.prototype;t.exports=function(e){return void 0!==e&&(n.Array===e||r[o]===e)}},{117:117,56:56}],47:[function(e,t,i){var n=e(18);t.exports=Array.isArray||function(e){return"Array"==n(e)}},{18:18}],48:[function(e,t,i){var n=e(49),o=Math.floor;t.exports=function(e){return!n(e)&&isFinite(e)&&o(e)===e}},{49:49}],49:[function(e,t,i){t.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},{}],50:[function(e,t,i){var n=e(49),o=e(18),r=e(117)("match");t.exports=function(e){var t;return n(e)&&(void 0!==(t=e[r])?!!t:"RegExp"==o(e))}},{117:117,18:18,49:49}],51:[function(e,t,i){var n=e(7);t.exports=function(e,t,i,o){try{return o?t(n(i)[0],i[1]):t(i)}catch(t){var r=e.return;throw void 0!==r&&n(r.call(e)),t}}},{7:7}],52:[function(e,t,i){"use strict";var n=e(66),o=e(85),r=e(92),a={};e(40)(a,e(117)("iterator"),function(){return this}),t.exports=function(e,t,i){e.prototype=n(a,{next:o(1,i)}),r(e,t+" Iterator")}},{117:117,40:40,66:66,85:85,92:92}],53:[function(e,t,i){"use strict";var n=e(58),o=e(32),r=e(87),a=e(40),s=e(39),l=e(56),u=e(52),c=e(92),d=e(74),f=e(117)("iterator"),p=!([].keys&&"next"in[].keys()),m="@@iterator",h="keys",g="values",b=function(){return this};t.exports=function(e,t,i,v,A,w,y){u(i,t,v);var x,k,C,F=function(e){if(!p&&e in B)return B[e];switch(e){case h:return function(){return new i(this,e)};case g:return function(){return new i(this,e)}}return function(){return new i(this,e)}},E=t+" Iterator",_=A==g,S=!1,B=e.prototype,D=B[f]||B[m]||A&&B[A],I=D||F(A),T=A?_?F("entries"):I:void 0,O="Array"==t?B.entries||D:D;if(O&&(C=d(O.call(new e)),C!==Object.prototype&&(c(C,E,!0),n||s(C,f)||a(C,f,b))),_&&D&&D.name!==g&&(S=!0,I=function(){return D.call(this)}),n&&!y||!p&&!S&&B[f]||a(B,f,I),l[t]=I,l[E]=b,A)if(x={values:_?I:F(g),keys:w?I:F(h),entries:T},y)for(k in x)k in B||r(B,k,x[k]);else o(o.P+o.F*(p||S),t,x);return x}},{117:117,32:32,39:39,40:40,52:52,56:56,58:58,74:74,87:87,92:92}],54:[function(e,t,i){var n=e(117)("iterator"),o=!1;try{var r=[7][n]();r.return=function(){o=!0},Array.from(r,function(){throw 2})}catch(e){}t.exports=function(e,t){if(!t&&!o)return!1;var i=!1;try{var r=[7],a=r[n]();a.next=function(){return{done:i=!0}},r[n]=function(){return a},e(r)}catch(e){}return i}},{117:117}],55:[function(e,t,i){t.exports=function(e,t){return{value:t,done:!!e}}},{}],56:[function(e,t,i){t.exports={}},{}],57:[function(e,t,i){var n=e(76),o=e(107);t.exports=function(e,t){for(var i,r=o(e),a=n(r),s=a.length,l=0;s>l;)if(r[i=a[l++]]===t)return i}},{107:107,76:76}],58:[function(e,t,i){t.exports=!1},{}],59:[function(e,t,i){var n=Math.expm1;t.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||n(-2e-17)!=-2e-17?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:Math.exp(e)-1}:n},{}],60:[function(e,t,i){t.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:Math.log(1+e)}},{}],61:[function(e,t,i){t.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},{}],62:[function(e,t,i){var n=e(114)("meta"),o=e(49),r=e(39),a=e(67).f,s=0,l=Object.isExtensible||function(){return!0},u=!e(34)(function(){return l(Object.preventExtensions({})); -}),c=function(e){a(e,n,{value:{i:"O"+ ++s,w:{}}})},d=function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!r(e,n)){if(!l(e))return"F";if(!t)return"E";c(e)}return e[n].i},f=function(e,t){if(!r(e,n)){if(!l(e))return!0;if(!t)return!1;c(e)}return e[n].w},p=function(e){return u&&m.NEED&&l(e)&&!r(e,n)&&c(e),e},m=t.exports={KEY:n,NEED:!1,fastKey:d,getWeak:f,onFreeze:p}},{114:114,34:34,39:39,49:49,67:67}],63:[function(e,t,i){var n=e(149),o=e(32),r=e(94)("metadata"),a=r.store||(r.store=new(e(255))),s=function(e,t,i){var o=a.get(e);if(!o){if(!i)return;a.set(e,o=new n)}var r=o.get(t);if(!r){if(!i)return;o.set(t,r=new n)}return r},l=function(e,t,i){var n=s(t,i,!1);return void 0!==n&&n.has(e)},u=function(e,t,i){var n=s(t,i,!1);return void 0===n?void 0:n.get(e)},c=function(e,t,i,n){s(i,n,!0).set(e,t)},d=function(e,t){var i=s(e,t,!1),n=[];return i&&i.forEach(function(e,t){n.push(t)}),n},f=function(e){return void 0===e||"symbol"==typeof e?e:String(e)},p=function(e){o(o.S,"Reflect",e)};t.exports={store:a,map:s,has:l,get:u,set:c,keys:d,key:f,exp:p}},{149:149,255:255,32:32,94:94}],64:[function(e,t,i){var n=e(38),o=e(104).set,r=n.MutationObserver||n.WebKitMutationObserver,a=n.process,s=n.Promise,l="process"==e(18)(a);t.exports=function(){var e,t,i,u=function(){var n,o;for(l&&(n=a.domain)&&n.exit();e;){o=e.fn,e=e.next;try{o()}catch(n){throw e?i():t=void 0,n}}t=void 0,n&&n.enter()};if(l)i=function(){a.nextTick(u)};else if(r){var c=!0,d=document.createTextNode("");new r(u).observe(d,{characterData:!0}),i=function(){d.data=c=!c}}else if(s&&s.resolve){var f=s.resolve();i=function(){f.then(u)}}else i=function(){o.call(n,u)};return function(n){var o={fn:n,next:void 0};t&&(t.next=o),e||(e=o,i()),t=o}}},{104:104,18:18,38:38}],65:[function(e,t,i){"use strict";var n=e(76),o=e(73),r=e(77),a=e(109),s=e(45),l=Object.assign;t.exports=!l||e(34)(function(){var e={},t={},i=Symbol(),n="abcdefghijklmnopqrst";return e[i]=7,n.split("").forEach(function(e){t[e]=e}),7!=l({},e)[i]||Object.keys(l({},t)).join("")!=n})?function(e,t){for(var i=a(e),l=arguments.length,u=1,c=o.f,d=r.f;l>u;)for(var f,p=s(arguments[u++]),m=c?n(p).concat(c(p)):n(p),h=m.length,g=0;h>g;)d.call(p,f=m[g++])&&(i[f]=p[f]);return i}:l},{109:109,34:34,45:45,73:73,76:76,77:77}],66:[function(e,t,i){var n=e(7),o=e(68),r=e(30),a=e(93)("IE_PROTO"),s=function(){},l="prototype",u=function(){var t,i=e(29)("iframe"),n=r.length,o="<",a=">";for(i.style.display="none",e(41).appendChild(i),i.src="javascript:",t=i.contentWindow.document,t.open(),t.write(o+"script"+a+"document.F=Object"+o+"/script"+a),t.close(),u=t.F;n--;)delete u[l][r[n]];return u()};t.exports=Object.create||function(e,t){var i;return null!==e?(s[l]=n(e),i=new s,s[l]=null,i[a]=e):i=u(),void 0===t?i:o(i,t)}},{29:29,30:30,41:41,68:68,7:7,93:93}],67:[function(e,t,i){var n=e(7),o=e(42),r=e(110),a=Object.defineProperty;i.f=e(28)?Object.defineProperty:function(e,t,i){if(n(e),t=r(t,!0),n(i),o)try{return a(e,t,i)}catch(e){}if("get"in i||"set"in i)throw TypeError("Accessors not supported!");return"value"in i&&(e[t]=i.value),e}},{110:110,28:28,42:42,7:7}],68:[function(e,t,i){var n=e(67),o=e(7),r=e(76);t.exports=e(28)?Object.defineProperties:function(e,t){o(e);for(var i,a=r(t),s=a.length,l=0;s>l;)n.f(e,i=a[l++],t[i]);return e}},{28:28,67:67,7:7,76:76}],69:[function(e,t,i){t.exports=e(58)||!e(34)(function(){var t=Math.random();__defineSetter__.call(null,t,function(){}),delete e(38)[t]})},{34:34,38:38,58:58}],70:[function(e,t,i){var n=e(77),o=e(85),r=e(107),a=e(110),s=e(39),l=e(42),u=Object.getOwnPropertyDescriptor;i.f=e(28)?u:function(e,t){if(e=r(e),t=a(t,!0),l)try{return u(e,t)}catch(e){}if(s(e,t))return o(!n.f.call(e,t),e[t])}},{107:107,110:110,28:28,39:39,42:42,77:77,85:85}],71:[function(e,t,i){var n=e(107),o=e(72).f,r={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(e){try{return o(e)}catch(e){return a.slice()}};t.exports.f=function(e){return a&&"[object Window]"==r.call(e)?s(e):o(n(e))}},{107:107,72:72}],72:[function(e,t,i){var n=e(75),o=e(30).concat("length","prototype");i.f=Object.getOwnPropertyNames||function(e){return n(e,o)}},{30:30,75:75}],73:[function(e,t,i){i.f=Object.getOwnPropertySymbols},{}],74:[function(e,t,i){var n=e(39),o=e(109),r=e(93)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(e){return e=o(e),n(e,r)?e[r]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},{109:109,39:39,93:93}],75:[function(e,t,i){var n=e(39),o=e(107),r=e(11)(!1),a=e(93)("IE_PROTO");t.exports=function(e,t){var i,s=o(e),l=0,u=[];for(i in s)i!=a&&n(s,i)&&u.push(i);for(;t.length>l;)n(s,i=t[l++])&&(~r(u,i)||u.push(i));return u}},{107:107,11:11,39:39,93:93}],76:[function(e,t,i){var n=e(75),o=e(30);t.exports=Object.keys||function(e){return n(e,o)}},{30:30,75:75}],77:[function(e,t,i){i.f={}.propertyIsEnumerable},{}],78:[function(e,t,i){var n=e(32),o=e(23),r=e(34);t.exports=function(e,t){var i=(o.Object||{})[e]||Object[e],a={};a[e]=t(i),n(n.S+n.F*r(function(){i(1)}),"Object",a)}},{23:23,32:32,34:34}],79:[function(e,t,i){var n=e(76),o=e(107),r=e(77).f;t.exports=function(e){return function(t){for(var i,a=o(t),s=n(a),l=s.length,u=0,c=[];l>u;)r.call(a,i=s[u++])&&c.push(e?[i,a[i]]:a[i]);return c}}},{107:107,76:76,77:77}],80:[function(e,t,i){var n=e(72),o=e(73),r=e(7),a=e(38).Reflect;t.exports=a&&a.ownKeys||function(e){var t=n.f(r(e)),i=o.f;return i?t.concat(i(e)):t}},{38:38,7:7,72:72,73:73}],81:[function(e,t,i){var n=e(38).parseFloat,o=e(102).trim;t.exports=1/n(e(103)+"-0")!==-(1/0)?function(e){var t=o(String(e),3),i=n(t);return 0===i&&"-"==t.charAt(0)?-0:i}:n},{102:102,103:103,38:38}],82:[function(e,t,i){var n=e(38).parseInt,o=e(102).trim,r=e(103),a=/^[\-+]?0[xX]/;t.exports=8!==n(r+"08")||22!==n(r+"0x16")?function(e,t){var i=o(String(e),3);return n(i,t>>>0||(a.test(i)?16:10))}:n},{102:102,103:103,38:38}],83:[function(e,t,i){"use strict";var n=e(84),o=e(44),r=e(3);t.exports=function(){for(var e=r(this),t=arguments.length,i=Array(t),a=0,s=n._,l=!1;t>a;)(i[a]=arguments[a++])===s&&(l=!0);return function(){var n,r=this,a=arguments.length,u=0,c=0;if(!l&&!a)return o(e,i,r);if(n=i.slice(),l)for(;t>u;u++)n[u]===s&&(n[u]=arguments[c++]);for(;a>c;)n.push(arguments[c++]);return o(e,n,r)}}},{3:3,44:44,84:84}],84:[function(e,t,i){t.exports=e(38)},{38:38}],85:[function(e,t,i){t.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},{}],86:[function(e,t,i){var n=e(87);t.exports=function(e,t,i){for(var o in t)n(e,o,t[o],i);return e}},{87:87}],87:[function(e,t,i){var n=e(38),o=e(40),r=e(39),a=e(114)("src"),s="toString",l=Function[s],u=(""+l).split(s);e(23).inspectSource=function(e){return l.call(e)},(t.exports=function(e,t,i,s){var l="function"==typeof i;l&&(r(i,"name")||o(i,"name",t)),e[t]!==i&&(l&&(r(i,a)||o(i,a,e[t]?""+e[t]:u.join(String(t)))),e===n?e[t]=i:s?e[t]?e[t]=i:o(e,t,i):(delete e[t],o(e,t,i)))})(Function.prototype,s,function(){return"function"==typeof this&&this[a]||l.call(this)})},{114:114,23:23,38:38,39:39,40:40}],88:[function(e,t,i){t.exports=function(e,t){var i=t===Object(t)?function(e){return t[e]}:t;return function(t){return String(t).replace(e,i)}}},{}],89:[function(e,t,i){t.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}},{}],90:[function(e,t,i){var n=e(49),o=e(7),r=function(e,t){if(o(e),!n(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,i,n){try{n=e(25)(Function.call,e(70).f(Object.prototype,"__proto__").set,2),n(t,[]),i=!(t instanceof Array)}catch(e){i=!0}return function(e,t){return r(e,t),i?e.__proto__=t:n(e,t),e}}({},!1):void 0),check:r}},{25:25,49:49,7:7,70:70}],91:[function(e,t,i){"use strict";var n=e(38),o=e(67),r=e(28),a=e(117)("species");t.exports=function(e){var t=n[e];r&&t&&!t[a]&&o.f(t,a,{configurable:!0,get:function(){return this}})}},{117:117,28:28,38:38,67:67}],92:[function(e,t,i){var n=e(67).f,o=e(39),r=e(117)("toStringTag");t.exports=function(e,t,i){e&&!o(e=i?e:e.prototype,r)&&n(e,r,{configurable:!0,value:t})}},{117:117,39:39,67:67}],93:[function(e,t,i){var n=e(94)("keys"),o=e(114);t.exports=function(e){return n[e]||(n[e]=o(e))}},{114:114,94:94}],94:[function(e,t,i){var n=e(38),o="__core-js_shared__",r=n[o]||(n[o]={});t.exports=function(e){return r[e]||(r[e]={})}},{38:38}],95:[function(e,t,i){var n=e(7),o=e(3),r=e(117)("species");t.exports=function(e,t){var i,a=n(e).constructor;return void 0===a||void 0==(i=n(a)[r])?t:o(i)}},{117:117,3:3,7:7}],96:[function(e,t,i){var n=e(34);t.exports=function(e,t){return!!e&&n(function(){t?e.call(null,function(){},1):e.call(null)})}},{34:34}],97:[function(e,t,i){var n=e(106),o=e(27);t.exports=function(e){return function(t,i){var r,a,s=String(o(t)),l=n(i),u=s.length;return l<0||l>=u?e?"":void 0:(r=s.charCodeAt(l),r<55296||r>56319||l+1===u||(a=s.charCodeAt(l+1))<56320||a>57343?e?s.charAt(l):r:e?s.slice(l,l+2):(r-55296<<10)+(a-56320)+65536)}}},{106:106,27:27}],98:[function(e,t,i){var n=e(50),o=e(27);t.exports=function(e,t,i){if(n(t))throw TypeError("String#"+i+" doesn't accept regex!");return String(o(e))}},{27:27,50:50}],99:[function(e,t,i){var n=e(32),o=e(34),r=e(27),a=/"/g,s=function(e,t,i,n){var o=String(r(e)),s="<"+t;return""!==i&&(s+=" "+i+'="'+String(n).replace(a,""")+'"'),s+">"+o+""};t.exports=function(e,t){var i={};i[e]=t(s),n(n.P+n.F*o(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}),"String",i)}},{27:27,32:32,34:34}],100:[function(e,t,i){var n=e(108),o=e(101),r=e(27);t.exports=function(e,t,i,a){var s=String(r(e)),l=s.length,u=void 0===i?" ":String(i),c=n(t);if(c<=l||""==u)return s;var d=c-l,f=o.call(u,Math.ceil(d/u.length));return f.length>d&&(f=f.slice(0,d)),a?f+s:s+f}},{101:101,108:108,27:27}],101:[function(e,t,i){"use strict";var n=e(106),o=e(27);t.exports=function(e){var t=String(o(this)),i="",r=n(e);if(r<0||r==1/0)throw RangeError("Count can't be negative");for(;r>0;(r>>>=1)&&(t+=t))1&r&&(i+=t);return i}},{106:106,27:27}],102:[function(e,t,i){var n=e(32),o=e(27),r=e(34),a=e(103),s="["+a+"]",l="​…",u=RegExp("^"+s+s+"*"),c=RegExp(s+s+"*$"),d=function(e,t,i){var o={},s=r(function(){return!!a[e]()||l[e]()!=l}),u=o[e]=s?t(f):a[e];i&&(o[i]=u),n(n.P+n.F*s,"String",o)},f=d.trim=function(e,t){return e=String(o(e)),1&t&&(e=e.replace(u,"")),2&t&&(e=e.replace(c,"")),e};t.exports=d},{103:103,27:27,32:32,34:34}],103:[function(e,t,i){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},{}],104:[function(e,t,i){var n,o,r,a=e(25),s=e(44),l=e(41),u=e(29),c=e(38),d=c.process,f=c.setImmediate,p=c.clearImmediate,m=c.MessageChannel,h=0,g={},b="onreadystatechange",v=function(){var e=+this;if(g.hasOwnProperty(e)){var t=g[e];delete g[e],t()}},A=function(e){v.call(e.data)};f&&p||(f=function(e){for(var t=[],i=1;arguments.length>i;)t.push(arguments[i++]);return g[++h]=function(){s("function"==typeof e?e:Function(e),t)},n(h),h},p=function(e){delete g[e]},"process"==e(18)(d)?n=function(e){d.nextTick(a(v,e,1))}:m?(o=new m,r=o.port2,o.port1.onmessage=A,n=a(r.postMessage,r,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(n=function(e){c.postMessage(e+"","*")},c.addEventListener("message",A,!1)):n=b in u("script")?function(e){l.appendChild(u("script"))[b]=function(){l.removeChild(this),v.call(e)}}:function(e){setTimeout(a(v,e,1),0)}),t.exports={set:f,clear:p}},{18:18,25:25,29:29,38:38,41:41,44:44}],105:[function(e,t,i){var n=e(106),o=Math.max,r=Math.min;t.exports=function(e,t){return e=n(e),e<0?o(e+t,0):r(e,t)}},{106:106}],106:[function(e,t,i){var n=Math.ceil,o=Math.floor;t.exports=function(e){return isNaN(e=+e)?0:(e>0?o:n)(e)}},{}],107:[function(e,t,i){var n=e(45),o=e(27);t.exports=function(e){return n(o(e))}},{27:27,45:45}],108:[function(e,t,i){var n=e(106),o=Math.min;t.exports=function(e){return e>0?o(n(e),9007199254740991):0}},{106:106}],109:[function(e,t,i){var n=e(27);t.exports=function(e){return Object(n(e))}},{27:27}],110:[function(e,t,i){var n=e(49);t.exports=function(e,t){if(!n(e))return e;var i,o;if(t&&"function"==typeof(i=e.toString)&&!n(o=i.call(e)))return o;if("function"==typeof(i=e.valueOf)&&!n(o=i.call(e)))return o;if(!t&&"function"==typeof(i=e.toString)&&!n(o=i.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},{49:49}],111:[function(e,t,i){"use strict";if(e(28)){var n=e(58),o=e(38),r=e(34),a=e(32),s=e(113),l=e(112),u=e(25),c=e(6),d=e(85),f=e(40),p=e(86),m=e(106),h=e(108),g=e(105),b=e(110),v=e(39),A=e(89),w=e(17),y=e(49),x=e(109),k=e(46),C=e(66),F=e(74),E=e(72).f,_=e(118),S=e(114),B=e(117),D=e(12),I=e(11),T=e(95),O=e(130),j=e(56),R=e(54),M=e(91),P=e(9),L=e(8),N=e(67),z=e(70),Y=N.f,Q=z.f,H=o.RangeError,q=o.TypeError,U=o.Uint8Array,V="ArrayBuffer",G="Shared"+V,W="BYTES_PER_ELEMENT",J="prototype",X=Array[J],Z=l.ArrayBuffer,K=l.DataView,$=D(0),ee=D(2),te=D(3),ie=D(4),ne=D(5),oe=D(6),re=I(!0),ae=I(!1),se=O.values,le=O.keys,ue=O.entries,ce=X.lastIndexOf,de=X.reduce,fe=X.reduceRight,pe=X.join,me=X.sort,he=X.slice,ge=X.toString,be=X.toLocaleString,ve=B("iterator"),Ae=B("toStringTag"),we=S("typed_constructor"),ye=S("def_constructor"),xe=s.CONSTR,ke=s.TYPED,Ce=s.VIEW,Fe="Wrong length!",Ee=D(1,function(e,t){return Te(T(e,e[ye]),t)}),_e=r(function(){return 1===new U(new Uint16Array([1]).buffer)[0]}),Se=!!U&&!!U[J].set&&r(function(){new U(1).set({})}),Be=function(e,t){if(void 0===e)throw q(Fe);var i=+e,n=h(e);if(t&&!A(i,n))throw H(Fe);return n},De=function(e,t){var i=m(e);if(i<0||i%t)throw H("Wrong offset!");return i},Ie=function(e){if(y(e)&&ke in e)return e;throw q(e+" is not a typed array!")},Te=function(e,t){if(!(y(e)&&we in e))throw q("It is not a typed array constructor!");return new e(t)},Oe=function(e,t){return je(T(e,e[ye]),t)},je=function(e,t){for(var i=0,n=t.length,o=Te(e,n);n>i;)o[i]=t[i++];return o},Re=function(e,t,i){Y(e,t,{get:function(){return this._d[i]}})},Me=function(e){var t,i,n,o,r,a,s=x(e),l=arguments.length,c=l>1?arguments[1]:void 0,d=void 0!==c,f=_(s);if(void 0!=f&&!k(f)){for(a=f.call(s),n=[],t=0;!(r=a.next()).done;t++)n.push(r.value);s=n}for(d&&l>2&&(c=u(c,arguments[2],2)),t=0,i=h(s.length),o=Te(this,i);i>t;t++)o[t]=d?c(s[t],t):s[t];return o},Pe=function(){for(var e=0,t=arguments.length,i=Te(this,t);t>e;)i[e]=arguments[e++];return i},Le=!!U&&r(function(){be.call(new U(1))}),Ne=function(){return be.apply(Le?he.call(Ie(this)):Ie(this),arguments)},ze={copyWithin:function(e,t){return L.call(Ie(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return ie(Ie(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return P.apply(Ie(this),arguments)},filter:function(e){return Oe(this,ee(Ie(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return ne(Ie(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return oe(Ie(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){$(Ie(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return ae(Ie(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return re(Ie(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return pe.apply(Ie(this),arguments)},lastIndexOf:function(e){return ce.apply(Ie(this),arguments)},map:function(e){return Ee(Ie(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return de.apply(Ie(this),arguments)},reduceRight:function(e){return fe.apply(Ie(this),arguments)},reverse:function(){for(var e,t=this,i=Ie(t).length,n=Math.floor(i/2),o=0;o1?arguments[1]:void 0)},sort:function(e){return me.call(Ie(this),e)},subarray:function(e,t){var i=Ie(this),n=i.length,o=g(e,n);return new(T(i,i[ye]))(i.buffer,i.byteOffset+o*i.BYTES_PER_ELEMENT,h((void 0===t?n:g(t,n))-o))}},Ye=function(e,t){return Oe(this,he.call(Ie(this),e,t))},Qe=function(e){Ie(this);var t=De(arguments[1],1),i=this.length,n=x(e),o=h(n.length),r=0;if(o+t>i)throw H(Fe);for(;r255?255:255&n),o.v[m](i*t+o.o,n,_e)},B=function(e,t){Y(e,t,{get:function(){return _(this,t)},set:function(e){return S(this,t,e)},enumerable:!0})};A?(g=i(function(e,i,n,o){c(e,g,u,"_d");var r,a,s,l,d=0,p=0;if(y(i)){if(!(i instanceof Z||(l=w(i))==V||l==G))return ke in i?je(g,i):Me.call(g,i);r=i,p=De(n,t);var m=i.byteLength;if(void 0===o){if(m%t)throw H(Fe);if(a=m-p,a<0)throw H(Fe)}else if(a=h(o)*t,a+p>m)throw H(Fe);s=a/t}else s=Be(i,!0),a=s*t,r=new Z(a);for(f(e,"_d",{b:r,o:p,l:a,e:s,v:new K(r)});d>1,c=23===t?B(2,-24)-B(2,-77):0,d=0,f=e<0||0===e&&1/e<0?1:0;for(e=S(e),e!=e||e===E?(o=e!=e?1:0,n=l):(n=D(I(e)/T),e*(r=B(2,-n))<1&&(n--,r*=2),e+=n+u>=1?c/r:c*B(2,1-u),e*r>=2&&(n++,r/=2),n+u>=l?(o=0,n=l):n+u>=1?(o=(e*r-1)*B(2,t),n+=u):(o=e*B(2,u-1)*B(2,t),n=0));t>=8;a[d++]=255&o,o/=256,t-=8);for(n=n<0;a[d++]=255&n,n/=256,s-=8);return a[--d]|=128*f,a},z=function(e,t,i){var n,o=8*i-t-1,r=(1<>1,s=o-7,l=i-1,u=e[l--],c=127&u;for(u>>=7;s>0;c=256*c+e[l],l--,s-=8);for(n=c&(1<<-s)-1,c>>=-s,s+=t;s>0;n=256*n+e[l],l--,s-=8);if(0===c)c=1-a;else{if(c===r)return n?NaN:u?-E:E;n+=B(2,t),c-=a}return(u?-1:1)*n*B(2,c-t)},Y=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},Q=function(e){return[255&e]},H=function(e){return[255&e,e>>8&255]},q=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},U=function(e){return N(e,52,8)},V=function(e){return N(e,23,4)},G=function(e,t,i){m(e[A],t,{get:function(){return this[i]}})},W=function(e,t,i,n){var o=+i,r=d(o);if(o!=r||r<0||r+t>e[P])throw F(y);var a=e[M]._b,s=r+e[L],l=a.slice(s,s+t);return n?l:l.reverse()},J=function(e,t,i,n,o,r){var a=+i,s=d(a);if(a!=s||s<0||s+t>e[P])throw F(y);for(var l=e[M]._b,u=s+e[L],c=n(+o),f=0;fee;)(Z=$[ee++])in x||s(x,Z,_[Z]);r||(K.constructor=x)}var te=new k(new x(2)),ie=k[A].setInt8;te.setInt8(0,2147483648),te.setInt8(1,2147483649),!te.getInt8(0)&&te.getInt8(1)||l(k[A],{setInt8:function(e,t){ie.call(this,e,t<<24>>24)},setUint8:function(e,t){ie.call(this,e,t<<24>>24)}},!0)}else x=function(e){var t=X(this,e);this._b=h.call(Array(t),0),this[P]=t},k=function(e,t,i){c(this,k,v),c(e,x,v);var n=e[P],o=d(t);if(o<0||o>n)throw F("Wrong offset!");if(i=void 0===i?n-o:f(i),o+i>n)throw F(w);this[M]=e,this[L]=o,this[P]=i},o&&(G(x,j,"_l"),G(k,O,"_b"),G(k,j,"_l"),G(k,R,"_o")),l(k[A],{getInt8:function(e){return W(this,1,e)[0]<<24>>24},getUint8:function(e){return W(this,1,e)[0]},getInt16:function(e){var t=W(this,2,e,arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=W(this,2,e,arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return Y(W(this,4,e,arguments[1]))},getUint32:function(e){return Y(W(this,4,e,arguments[1]))>>>0},getFloat32:function(e){return z(W(this,4,e,arguments[1]),23,4)},getFloat64:function(e){return z(W(this,8,e,arguments[1]),52,8)},setInt8:function(e,t){J(this,1,e,Q,t)},setUint8:function(e,t){J(this,1,e,Q,t)},setInt16:function(e,t){J(this,2,e,H,t,arguments[2])},setUint16:function(e,t){J(this,2,e,H,t,arguments[2])},setInt32:function(e,t){J(this,4,e,q,t,arguments[2])},setUint32:function(e,t){J(this,4,e,q,t,arguments[2])},setFloat32:function(e,t){J(this,4,e,V,t,arguments[2])},setFloat64:function(e,t){J(this,8,e,U,t,arguments[2])}});g(x,b),g(k,v),s(k[A],a.VIEW,!0),i[b]=x,i[v]=k},{106:106,108:108,113:113,28:28,34:34,38:38,40:40,58:58,6:6,67:67,72:72,86:86,9:9,92:92}],113:[function(e,t,i){for(var n,o=e(38),r=e(40),a=e(114),s=a("typed_array"),l=a("view"),u=!(!o.ArrayBuffer||!o.DataView),c=u,d=0,f=9,p="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");d1?arguments[1]:void 0)}}),e(5)(r)},{12:12,32:32,5:5}],125:[function(e,t,i){"use strict";var n=e(32),o=e(12)(5),r="find",a=!0;r in[]&&Array(1)[r](function(){a=!1}),n(n.P+n.F*a,"Array",{find:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),e(5)(r)},{12:12,32:32,5:5}],126:[function(e,t,i){"use strict";var n=e(32),o=e(12)(0),r=e(96)([].forEach,!0);n(n.P+n.F*!r,"Array",{forEach:function(e){return o(this,e,arguments[1])}})},{12:12,32:32,96:96}],127:[function(e,t,i){"use strict";var n=e(25),o=e(32),r=e(109),a=e(51),s=e(46),l=e(108),u=e(24),c=e(118);o(o.S+o.F*!e(54)(function(e){Array.from(e)}),"Array",{from:function(e){var t,i,o,d,f=r(e),p="function"==typeof this?this:Array,m=arguments.length,h=m>1?arguments[1]:void 0,g=void 0!==h,b=0,v=c(f);if(g&&(h=n(h,m>2?arguments[2]:void 0,2)),void 0==v||p==Array&&s(v))for(t=l(f.length),i=new p(t);t>b;b++)u(i,b,g?h(f[b],b):f[b]);else for(d=v.call(f),i=new p;!(o=d.next()).done;b++)u(i,b,g?a(d,h,[o.value,b],!0):o.value);return i.length=b,i}})},{108:108,109:109,118:118,24:24,25:25,32:32,46:46,51:51,54:54}],128:[function(e,t,i){"use strict";var n=e(32),o=e(11)(!1),r=[].indexOf,a=!!r&&1/[1].indexOf(1,-0)<0;n(n.P+n.F*(a||!e(96)(r)),"Array",{indexOf:function(e){return a?r.apply(this,arguments)||0:o(this,e,arguments[1])}})},{11:11,32:32,96:96}],129:[function(e,t,i){var n=e(32);n(n.S,"Array",{isArray:e(47)})},{32:32,47:47}],130:[function(e,t,i){"use strict";var n=e(5),o=e(55),r=e(56),a=e(107);t.exports=e(53)(Array,"Array",function(e,t){this._t=a(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,i=this._i++;return!e||i>=e.length?(this._t=void 0,o(1)):"keys"==t?o(0,i):"values"==t?o(0,e[i]):o(0,[i,e[i]])},"values"),r.Arguments=r.Array,n("keys"),n("values"),n("entries")},{107:107,5:5,53:53,55:55,56:56}],131:[function(e,t,i){"use strict";var n=e(32),o=e(107),r=[].join;n(n.P+n.F*(e(45)!=Object||!e(96)(r)),"Array",{join:function(e){return r.call(o(this),void 0===e?",":e)}})},{107:107,32:32,45:45,96:96}],132:[function(e,t,i){"use strict";var n=e(32),o=e(107),r=e(106),a=e(108),s=[].lastIndexOf,l=!!s&&1/[1].lastIndexOf(1,-0)<0;n(n.P+n.F*(l||!e(96)(s)),"Array",{lastIndexOf:function(e){if(l)return s.apply(this,arguments)||0;var t=o(this),i=a(t.length),n=i-1;for(arguments.length>1&&(n=Math.min(n,r(arguments[1]))),n<0&&(n=i+n);n>=0;n--)if(n in t&&t[n]===e)return n||0;return-1}})},{106:106,107:107,108:108,32:32,96:96}],133:[function(e,t,i){"use strict";var n=e(32),o=e(12)(1);n(n.P+n.F*!e(96)([].map,!0),"Array",{map:function(e){return o(this,e,arguments[1])}})},{12:12,32:32,96:96}],134:[function(e,t,i){"use strict";var n=e(32),o=e(24);n(n.S+n.F*e(34)(function(){function e(){}return!(Array.of.call(e)instanceof e)}),"Array",{of:function(){for(var e=0,t=arguments.length,i=new("function"==typeof this?this:Array)(t);t>e;)o(i,e,arguments[e++]);return i.length=t,i}})},{24:24,32:32,34:34}],135:[function(e,t,i){"use strict";var n=e(32),o=e(13);n(n.P+n.F*!e(96)([].reduceRight,!0),"Array",{reduceRight:function(e){return o(this,e,arguments.length,arguments[1],!0)}})},{13:13,32:32,96:96}],136:[function(e,t,i){"use strict";var n=e(32),o=e(13);n(n.P+n.F*!e(96)([].reduce,!0),"Array",{reduce:function(e){return o(this,e,arguments.length,arguments[1],!1)}})},{13:13,32:32,96:96}],137:[function(e,t,i){"use strict";var n=e(32),o=e(41),r=e(18),a=e(105),s=e(108),l=[].slice;n(n.P+n.F*e(34)(function(){o&&l.call(o)}),"Array",{slice:function(e,t){var i=s(this.length),n=r(this);if(t=void 0===t?i:t,"Array"==n)return l.call(this,e,t);for(var o=a(e,i),u=a(t,i),c=s(u-o),d=Array(c),f=0;f9?e:"0"+e};n(n.P+n.F*(o(function(){return"0385-07-25T07:06:39.999Z"!=new Date(-5e13-1).toISOString()})||!o(function(){new Date(NaN).toISOString()})),"Date",{toISOString:function(){if(!isFinite(r.call(this)))throw RangeError("Invalid time value");var e=this,t=e.getUTCFullYear(),i=e.getUTCMilliseconds(),n=t<0?"-":t>9999?"+":"";return n+("00000"+Math.abs(t)).slice(n?-6:-4)+"-"+a(e.getUTCMonth()+1)+"-"+a(e.getUTCDate())+"T"+a(e.getUTCHours())+":"+a(e.getUTCMinutes())+":"+a(e.getUTCSeconds())+"."+(i>99?i:"0"+a(i))+"Z"}})},{32:32,34:34}],143:[function(e,t,i){"use strict";var n=e(32),o=e(109),r=e(110);n(n.P+n.F*e(34)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(e){var t=o(this),i=r(t);return"number"!=typeof i||isFinite(i)?t.toISOString():null}})},{109:109,110:110,32:32,34:34}],144:[function(e,t,i){var n=e(117)("toPrimitive"),o=Date.prototype;n in o||e(40)(o,n,e(26))},{117:117,26:26,40:40}],145:[function(e,t,i){var n=Date.prototype,o="Invalid Date",r="toString",a=n[r],s=n.getTime;new Date(NaN)+""!=o&&e(87)(n,r,function(){var e=s.call(this);return e===e?a.call(this):o})},{87:87}],146:[function(e,t,i){var n=e(32);n(n.P,"Function",{bind:e(16)})},{16:16,32:32}],147:[function(e,t,i){"use strict";var n=e(49),o=e(74),r=e(117)("hasInstance"),a=Function.prototype;r in a||e(67).f(a,r,{value:function(e){if("function"!=typeof this||!n(e))return!1;if(!n(this.prototype))return e instanceof this;for(;e=o(e);)if(this.prototype===e)return!0;return!1}})},{117:117,49:49,67:67,74:74}],148:[function(e,t,i){var n=e(67).f,o=e(85),r=e(39),a=Function.prototype,s=/^\s*function ([^ (]*)/,l="name",u=Object.isExtensible||function(){return!0};l in a||e(28)&&n(a,l,{configurable:!0,get:function(){try{var e=this,t=(""+e).match(s)[1];return r(e,l)||!u(e)||n(e,l,o(5,t)),t}catch(e){return""}}})},{28:28,39:39,67:67,85:85}],149:[function(e,t,i){"use strict";var n=e(19);t.exports=e(22)("Map",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{get:function(e){var t=n.getEntry(this,e);return t&&t.v},set:function(e,t){return n.def(this,0===e?0:e,t)}},n,!0)},{19:19,22:22}],150:[function(e,t,i){var n=e(32),o=e(60),r=Math.sqrt,a=Math.acosh;n(n.S+n.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Math.log(e)+Math.LN2:o(e-1+r(e-1)*r(e+1))}})},{32:32,60:60}],151:[function(e,t,i){function n(e){return isFinite(e=+e)&&0!=e?e<0?-n(-e):Math.log(e+Math.sqrt(e*e+1)):e}var o=e(32),r=Math.asinh;o(o.S+o.F*!(r&&1/r(0)>0),"Math",{asinh:n})},{32:32}],152:[function(e,t,i){var n=e(32),o=Math.atanh;n(n.S+n.F*!(o&&1/o(-0)<0),"Math",{atanh:function(e){return 0==(e=+e)?e:Math.log((1+e)/(1-e))/2}})},{32:32}],153:[function(e,t,i){var n=e(32),o=e(61);n(n.S,"Math",{cbrt:function(e){return o(e=+e)*Math.pow(Math.abs(e),1/3)}})},{32:32,61:61}],154:[function(e,t,i){var n=e(32);n(n.S,"Math",{clz32:function(e){return(e>>>=0)?31-Math.floor(Math.log(e+.5)*Math.LOG2E):32; -}})},{32:32}],155:[function(e,t,i){var n=e(32),o=Math.exp;n(n.S,"Math",{cosh:function(e){return(o(e=+e)+o(-e))/2}})},{32:32}],156:[function(e,t,i){var n=e(32),o=e(59);n(n.S+n.F*(o!=Math.expm1),"Math",{expm1:o})},{32:32,59:59}],157:[function(e,t,i){var n=e(32),o=e(61),r=Math.pow,a=r(2,-52),s=r(2,-23),l=r(2,127)*(2-s),u=r(2,-126),c=function(e){return e+1/a-1/a};n(n.S,"Math",{fround:function(e){var t,i,n=Math.abs(e),r=o(e);return nl||i!=i?r*(1/0):r*i)}})},{32:32,61:61}],158:[function(e,t,i){var n=e(32),o=Math.abs;n(n.S,"Math",{hypot:function(e,t){for(var i,n,r=0,a=0,s=arguments.length,l=0;a0?(n=i/l,r+=n*n):r+=i;return l===1/0?1/0:l*Math.sqrt(r)}})},{32:32}],159:[function(e,t,i){var n=e(32),o=Math.imul;n(n.S+n.F*e(34)(function(){return o(4294967295,5)!=-5||2!=o.length}),"Math",{imul:function(e,t){var i=65535,n=+e,o=+t,r=i&n,a=i&o;return 0|r*a+((i&n>>>16)*a+r*(i&o>>>16)<<16>>>0)}})},{32:32,34:34}],160:[function(e,t,i){var n=e(32);n(n.S,"Math",{log10:function(e){return Math.log(e)/Math.LN10}})},{32:32}],161:[function(e,t,i){var n=e(32);n(n.S,"Math",{log1p:e(60)})},{32:32,60:60}],162:[function(e,t,i){var n=e(32);n(n.S,"Math",{log2:function(e){return Math.log(e)/Math.LN2}})},{32:32}],163:[function(e,t,i){var n=e(32);n(n.S,"Math",{sign:e(61)})},{32:32,61:61}],164:[function(e,t,i){var n=e(32),o=e(59),r=Math.exp;n(n.S+n.F*e(34)(function(){return!Math.sinh(-2e-17)!=-2e-17}),"Math",{sinh:function(e){return Math.abs(e=+e)<1?(o(e)-o(-e))/2:(r(e-1)-r(-e-1))*(Math.E/2)}})},{32:32,34:34,59:59}],165:[function(e,t,i){var n=e(32),o=e(59),r=Math.exp;n(n.S,"Math",{tanh:function(e){var t=o(e=+e),i=o(-e);return t==1/0?1:i==1/0?-1:(t-i)/(r(e)+r(-e))}})},{32:32,59:59}],166:[function(e,t,i){var n=e(32);n(n.S,"Math",{trunc:function(e){return(e>0?Math.floor:Math.ceil)(e)}})},{32:32}],167:[function(e,t,i){"use strict";var n=e(38),o=e(39),r=e(18),a=e(43),s=e(110),l=e(34),u=e(72).f,c=e(70).f,d=e(67).f,f=e(102).trim,p="Number",m=n[p],h=m,g=m.prototype,b=r(e(66)(g))==p,v="trim"in String.prototype,A=function(e){var t=s(e,!1);if("string"==typeof t&&t.length>2){t=v?t.trim():f(t,3);var i,n,o,r=t.charCodeAt(0);if(43===r||45===r){if(i=t.charCodeAt(2),88===i||120===i)return NaN}else if(48===r){switch(t.charCodeAt(1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+t}for(var a,l=t.slice(2),u=0,c=l.length;uo)return NaN;return parseInt(l,n)}}return+t};if(!m(" 0o1")||!m("0b1")||m("+0x1")){m=function(e){var t=arguments.length<1?0:e,i=this;return i instanceof m&&(b?l(function(){g.valueOf.call(i)}):r(i)!=p)?a(new h(A(t)),i,m):A(t)};for(var w,y=e(28)?u(h):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),x=0;y.length>x;x++)o(h,w=y[x])&&!o(m,w)&&d(m,w,c(h,w));m.prototype=g,g.constructor=m,e(87)(n,p,m)}},{102:102,110:110,18:18,28:28,34:34,38:38,39:39,43:43,66:66,67:67,70:70,72:72,87:87}],168:[function(e,t,i){var n=e(32);n(n.S,"Number",{EPSILON:Math.pow(2,-52)})},{32:32}],169:[function(e,t,i){var n=e(32),o=e(38).isFinite;n(n.S,"Number",{isFinite:function(e){return"number"==typeof e&&o(e)}})},{32:32,38:38}],170:[function(e,t,i){var n=e(32);n(n.S,"Number",{isInteger:e(48)})},{32:32,48:48}],171:[function(e,t,i){var n=e(32);n(n.S,"Number",{isNaN:function(e){return e!=e}})},{32:32}],172:[function(e,t,i){var n=e(32),o=e(48),r=Math.abs;n(n.S,"Number",{isSafeInteger:function(e){return o(e)&&r(e)<=9007199254740991}})},{32:32,48:48}],173:[function(e,t,i){var n=e(32);n(n.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},{32:32}],174:[function(e,t,i){var n=e(32);n(n.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},{32:32}],175:[function(e,t,i){var n=e(32),o=e(81);n(n.S+n.F*(Number.parseFloat!=o),"Number",{parseFloat:o})},{32:32,81:81}],176:[function(e,t,i){var n=e(32),o=e(82);n(n.S+n.F*(Number.parseInt!=o),"Number",{parseInt:o})},{32:32,82:82}],177:[function(e,t,i){"use strict";var n=e(32),o=e(106),r=e(4),a=e(101),s=1..toFixed,l=Math.floor,u=[0,0,0,0,0,0],c="Number.toFixed: incorrect invocation!",d="0",f=function(e,t){for(var i=-1,n=t;++i<6;)n+=e*u[i],u[i]=n%1e7,n=l(n/1e7)},p=function(e){for(var t=6,i=0;--t>=0;)i+=u[t],u[t]=l(i/e),i=i%e*1e7},m=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==u[e]){var i=String(u[e]);t=""===t?i:t+a.call(d,7-i.length)+i}return t},h=function(e,t,i){return 0===t?i:t%2===1?h(e,t-1,i*e):h(e*e,t/2,i)},g=function(e){for(var t=0,i=e;i>=4096;)t+=12,i/=4096;for(;i>=2;)t+=1,i/=2;return t};n(n.P+n.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!e(34)(function(){s.call({})})),"Number",{toFixed:function(e){var t,i,n,s,l=r(this,c),u=o(e),b="",v=d;if(u<0||u>20)throw RangeError(c);if(l!=l)return"NaN";if(l<=-1e21||l>=1e21)return String(l);if(l<0&&(b="-",l=-l),l>1e-21)if(t=g(l*h(2,69,1))-69,i=t<0?l*h(2,-t,1):l/h(2,t,1),i*=4503599627370496,t=52-t,t>0){for(f(0,i),n=u;n>=7;)f(1e7,0),n-=7;for(f(h(10,n,1),0),n=t-1;n>=23;)p(1<<23),n-=23;p(1<0?(s=v.length,v=b+(s<=u?"0."+a.call(d,u-s)+v:v.slice(0,s-u)+"."+v.slice(s-u))):v=b+v,v}})},{101:101,106:106,32:32,34:34,4:4}],178:[function(e,t,i){"use strict";var n=e(32),o=e(34),r=e(4),a=1..toPrecision;n(n.P+n.F*(o(function(){return"1"!==a.call(1,void 0)})||!o(function(){a.call({})})),"Number",{toPrecision:function(e){var t=r(this,"Number#toPrecision: incorrect invocation!");return void 0===e?a.call(t):a.call(t,e)}})},{32:32,34:34,4:4}],179:[function(e,t,i){var n=e(32);n(n.S+n.F,"Object",{assign:e(65)})},{32:32,65:65}],180:[function(e,t,i){var n=e(32);n(n.S,"Object",{create:e(66)})},{32:32,66:66}],181:[function(e,t,i){var n=e(32);n(n.S+n.F*!e(28),"Object",{defineProperties:e(68)})},{28:28,32:32,68:68}],182:[function(e,t,i){var n=e(32);n(n.S+n.F*!e(28),"Object",{defineProperty:e(67).f})},{28:28,32:32,67:67}],183:[function(e,t,i){var n=e(49),o=e(62).onFreeze;e(78)("freeze",function(e){return function(t){return e&&n(t)?e(o(t)):t}})},{49:49,62:62,78:78}],184:[function(e,t,i){var n=e(107),o=e(70).f;e(78)("getOwnPropertyDescriptor",function(){return function(e,t){return o(n(e),t)}})},{107:107,70:70,78:78}],185:[function(e,t,i){e(78)("getOwnPropertyNames",function(){return e(71).f})},{71:71,78:78}],186:[function(e,t,i){var n=e(109),o=e(74);e(78)("getPrototypeOf",function(){return function(e){return o(n(e))}})},{109:109,74:74,78:78}],187:[function(e,t,i){var n=e(49);e(78)("isExtensible",function(e){return function(t){return!!n(t)&&(!e||e(t))}})},{49:49,78:78}],188:[function(e,t,i){var n=e(49);e(78)("isFrozen",function(e){return function(t){return!n(t)||!!e&&e(t)}})},{49:49,78:78}],189:[function(e,t,i){var n=e(49);e(78)("isSealed",function(e){return function(t){return!n(t)||!!e&&e(t)}})},{49:49,78:78}],190:[function(e,t,i){var n=e(32);n(n.S,"Object",{is:e(89)})},{32:32,89:89}],191:[function(e,t,i){var n=e(109),o=e(76);e(78)("keys",function(){return function(e){return o(n(e))}})},{109:109,76:76,78:78}],192:[function(e,t,i){var n=e(49),o=e(62).onFreeze;e(78)("preventExtensions",function(e){return function(t){return e&&n(t)?e(o(t)):t}})},{49:49,62:62,78:78}],193:[function(e,t,i){var n=e(49),o=e(62).onFreeze;e(78)("seal",function(e){return function(t){return e&&n(t)?e(o(t)):t}})},{49:49,62:62,78:78}],194:[function(e,t,i){var n=e(32);n(n.S,"Object",{setPrototypeOf:e(90).set})},{32:32,90:90}],195:[function(e,t,i){"use strict";var n=e(17),o={};o[e(117)("toStringTag")]="z",o+""!="[object z]"&&e(87)(Object.prototype,"toString",function(){return"[object "+n(this)+"]"},!0)},{117:117,17:17,87:87}],196:[function(e,t,i){var n=e(32),o=e(81);n(n.G+n.F*(parseFloat!=o),{parseFloat:o})},{32:32,81:81}],197:[function(e,t,i){var n=e(32),o=e(82);n(n.G+n.F*(parseInt!=o),{parseInt:o})},{32:32,82:82}],198:[function(e,t,i){"use strict";var n,o,r,a=e(58),s=e(38),l=e(25),u=e(17),c=e(32),d=e(49),f=e(3),p=e(6),m=e(37),h=e(95),g=e(104).set,b=e(64)(),v="Promise",A=s.TypeError,w=s.process,y=s[v],w=s.process,x="process"==u(w),k=function(){},C=!!function(){try{var t=y.resolve(1),i=(t.constructor={})[e(117)("species")]=function(e){e(k,k)};return(x||"function"==typeof PromiseRejectionEvent)&&t.then(k)instanceof i}catch(e){}}(),F=function(e,t){return e===t||e===y&&t===r},E=function(e){var t;return!(!d(e)||"function"!=typeof(t=e.then))&&t},_=function(e){return F(y,e)?new S(e):new o(e)},S=o=function(e){var t,i;this.promise=new e(function(e,n){if(void 0!==t||void 0!==i)throw A("Bad Promise constructor");t=e,i=n}),this.resolve=f(t),this.reject=f(i)},B=function(e){try{e()}catch(e){return{error:e}}},D=function(e,t){if(!e._n){e._n=!0;var i=e._c;b(function(){for(var n=e._v,o=1==e._s,r=0,a=function(t){var i,r,a=o?t.ok:t.fail,s=t.resolve,l=t.reject,u=t.domain;try{a?(o||(2==e._h&&O(e),e._h=1),a===!0?i=n:(u&&u.enter(),i=a(n),u&&u.exit()),i===t.promise?l(A("Promise-chain cycle")):(r=E(i))?r.call(i,s,l):s(i)):l(n)}catch(e){l(e)}};i.length>r;)a(i[r++]);e._c=[],e._n=!1,t&&!e._h&&I(e)})}},I=function(e){g.call(s,function(){var t,i,n,o=e._v;if(T(e)&&(t=B(function(){x?w.emit("unhandledRejection",o,e):(i=s.onunhandledrejection)?i({promise:e,reason:o}):(n=s.console)&&n.error&&n.error("Unhandled promise rejection",o)}),e._h=x||T(e)?2:1),e._a=void 0,t)throw t.error})},T=function(e){if(1==e._h)return!1;for(var t,i=e._a||e._c,n=0;i.length>n;)if(t=i[n++],t.fail||!T(t.promise))return!1;return!0},O=function(e){g.call(s,function(){var t;x?w.emit("rejectionHandled",e):(t=s.onrejectionhandled)&&t({promise:e,reason:e._v})})},j=function(e){var t=this;t._d||(t._d=!0,t=t._w||t,t._v=e,t._s=2,t._a||(t._a=t._c.slice()),D(t,!0))},R=function(e){var t,i=this;if(!i._d){i._d=!0,i=i._w||i;try{if(i===e)throw A("Promise can't be resolved itself");(t=E(e))?b(function(){var n={_w:i,_d:!1};try{t.call(e,l(R,n,1),l(j,n,1))}catch(e){j.call(n,e)}}):(i._v=e,i._s=1,D(i,!1))}catch(e){j.call({_w:i,_d:!1},e)}}};C||(y=function(e){p(this,y,v,"_h"),f(e),n.call(this);try{e(l(R,this,1),l(j,this,1))}catch(e){j.call(this,e)}},n=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},n.prototype=e(86)(y.prototype,{then:function(e,t){var i=_(h(this,y));return i.ok="function"!=typeof e||e,i.fail="function"==typeof t&&t,i.domain=x?w.domain:void 0,this._c.push(i),this._a&&this._a.push(i),this._s&&D(this,!1),i.promise},catch:function(e){return this.then(void 0,e)}}),S=function(){var e=new n;this.promise=e,this.resolve=l(R,e,1),this.reject=l(j,e,1)}),c(c.G+c.W+c.F*!C,{Promise:y}),e(92)(y,v),e(91)(v),r=e(23)[v],c(c.S+c.F*!C,v,{reject:function(e){var t=_(this),i=t.reject;return i(e),t.promise}}),c(c.S+c.F*(a||!C),v,{resolve:function(e){if(e instanceof y&&F(e.constructor,this))return e;var t=_(this),i=t.resolve;return i(e),t.promise}}),c(c.S+c.F*!(C&&e(54)(function(e){y.all(e).catch(k)})),v,{all:function(e){var t=this,i=_(t),n=i.resolve,o=i.reject,r=B(function(){var i=[],r=0,a=1;m(e,!1,function(e){var s=r++,l=!1;i.push(void 0),a++,t.resolve(e).then(function(e){l||(l=!0,i[s]=e,--a||n(i))},o)}),--a||n(i)});return r&&o(r.error),i.promise},race:function(e){var t=this,i=_(t),n=i.reject,o=B(function(){m(e,!1,function(e){t.resolve(e).then(i.resolve,n)})});return o&&n(o.error),i.promise}})},{104:104,117:117,17:17,23:23,25:25,3:3,32:32,37:37,38:38,49:49,54:54,58:58,6:6,64:64,86:86,91:91,92:92,95:95}],199:[function(e,t,i){var n=e(32),o=e(3),r=e(7),a=(e(38).Reflect||{}).apply,s=Function.apply;n(n.S+n.F*!e(34)(function(){a(function(){})}),"Reflect",{apply:function(e,t,i){var n=o(e),l=r(i);return a?a(n,t,l):s.call(n,t,l)}})},{3:3,32:32,34:34,38:38,7:7}],200:[function(e,t,i){var n=e(32),o=e(66),r=e(3),a=e(7),s=e(49),l=e(34),u=e(16),c=(e(38).Reflect||{}).construct,d=l(function(){function e(){}return!(c(function(){},[],e)instanceof e)}),f=!l(function(){c(function(){})});n(n.S+n.F*(d||f),"Reflect",{construct:function(e,t){r(e),a(t);var i=arguments.length<3?e:r(arguments[2]);if(f&&!d)return c(e,t,i);if(e==i){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var n=[null];return n.push.apply(n,t),new(u.apply(e,n))}var l=i.prototype,p=o(s(l)?l:Object.prototype),m=Function.apply.call(e,p,t);return s(m)?m:p}})},{16:16,3:3,32:32,34:34,38:38,49:49,66:66,7:7}],201:[function(e,t,i){var n=e(67),o=e(32),r=e(7),a=e(110);o(o.S+o.F*e(34)(function(){Reflect.defineProperty(n.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(e,t,i){r(e),t=a(t,!0),r(i);try{return n.f(e,t,i),!0}catch(e){return!1}}})},{110:110,32:32,34:34,67:67,7:7}],202:[function(e,t,i){var n=e(32),o=e(70).f,r=e(7);n(n.S,"Reflect",{deleteProperty:function(e,t){var i=o(r(e),t);return!(i&&!i.configurable)&&delete e[t]}})},{32:32,7:7,70:70}],203:[function(e,t,i){"use strict";var n=e(32),o=e(7),r=function(e){this._t=o(e),this._i=0;var t,i=this._k=[];for(t in e)i.push(t)};e(52)(r,"Object",function(){var e,t=this,i=t._k;do if(t._i>=i.length)return{value:void 0,done:!0};while(!((e=i[t._i++])in t._t));return{value:e,done:!1}}),n(n.S,"Reflect",{enumerate:function(e){return new r(e)}})},{32:32,52:52,7:7}],204:[function(e,t,i){var n=e(70),o=e(32),r=e(7);o(o.S,"Reflect",{getOwnPropertyDescriptor:function(e,t){return n.f(r(e),t)}})},{32:32,7:7,70:70}],205:[function(e,t,i){var n=e(32),o=e(74),r=e(7);n(n.S,"Reflect",{getPrototypeOf:function(e){return o(r(e))}})},{32:32,7:7,74:74}],206:[function(e,t,i){function n(e,t){var i,s,c=arguments.length<3?e:arguments[2];return u(e)===c?e[t]:(i=o.f(e,t))?a(i,"value")?i.value:void 0!==i.get?i.get.call(c):void 0:l(s=r(e))?n(s,t,c):void 0}var o=e(70),r=e(74),a=e(39),s=e(32),l=e(49),u=e(7);s(s.S,"Reflect",{get:n})},{32:32,39:39,49:49,7:7,70:70,74:74}],207:[function(e,t,i){var n=e(32);n(n.S,"Reflect",{has:function(e,t){return t in e}})},{32:32}],208:[function(e,t,i){var n=e(32),o=e(7),r=Object.isExtensible;n(n.S,"Reflect",{isExtensible:function(e){return o(e),!r||r(e)}})},{32:32,7:7}],209:[function(e,t,i){var n=e(32);n(n.S,"Reflect",{ownKeys:e(80)})},{32:32,80:80}],210:[function(e,t,i){var n=e(32),o=e(7),r=Object.preventExtensions;n(n.S,"Reflect",{preventExtensions:function(e){o(e);try{return r&&r(e),!0}catch(e){return!1}}})},{32:32,7:7}],211:[function(e,t,i){var n=e(32),o=e(90);o&&n(n.S,"Reflect",{setPrototypeOf:function(e,t){o.check(e,t);try{return o.set(e,t),!0}catch(e){return!1}}})},{32:32,90:90}],212:[function(e,t,i){function n(e,t,i){var l,f,p=arguments.length<4?e:arguments[3],m=r.f(c(e),t);if(!m){if(d(f=a(e)))return n(f,t,i,p);m=u(0)}return s(m,"value")?!(m.writable===!1||!d(p)||(l=r.f(p,t)||u(0),l.value=i,o.f(p,t,l),0)):void 0!==m.set&&(m.set.call(p,i),!0)}var o=e(67),r=e(70),a=e(74),s=e(39),l=e(32),u=e(85),c=e(7),d=e(49);l(l.S,"Reflect",{set:n})},{32:32,39:39,49:49,67:67,7:7,70:70,74:74,85:85}],213:[function(e,t,i){var n=e(38),o=e(43),r=e(67).f,a=e(72).f,s=e(50),l=e(36),u=n.RegExp,c=u,d=u.prototype,f=/a/g,p=/a/g,m=new u(f)!==f;if(e(28)&&(!m||e(34)(function(){return p[e(117)("match")]=!1,u(f)!=f||u(p)==p||"/a/i"!=u(f,"i")}))){u=function(e,t){var i=this instanceof u,n=s(e),r=void 0===t;return!i&&n&&e.constructor===u&&r?e:o(m?new c(n&&!r?e.source:e,t):c((n=e instanceof u)?e.source:e,n&&r?l.call(e):t),i?this:d,u)};for(var h=(function(e){e in u||r(u,e,{configurable:!0,get:function(){return c[e]},set:function(t){c[e]=t}})}),g=a(c),b=0;g.length>b;)h(g[b++]);d.constructor=u,u.prototype=d,e(87)(n,"RegExp",u)}e(91)("RegExp")},{117:117,28:28,34:34,36:36,38:38,43:43,50:50,67:67,72:72,87:87,91:91}],214:[function(e,t,i){e(28)&&"g"!=/./g.flags&&e(67).f(RegExp.prototype,"flags",{configurable:!0,get:e(36)})},{28:28,36:36,67:67}],215:[function(e,t,i){e(35)("match",1,function(e,t,i){return[function(i){"use strict";var n=e(this),o=void 0==i?void 0:i[t];return void 0!==o?o.call(i,n):new RegExp(i)[t](String(n))},i]})},{35:35}],216:[function(e,t,i){e(35)("replace",2,function(e,t,i){return[function(n,o){"use strict";var r=e(this),a=void 0==n?void 0:n[t];return void 0!==a?a.call(n,r,o):i.call(String(r),n,o)},i]})},{35:35}],217:[function(e,t,i){e(35)("search",1,function(e,t,i){return[function(i){"use strict";var n=e(this),o=void 0==i?void 0:i[t];return void 0!==o?o.call(i,n):new RegExp(i)[t](String(n))},i]})},{35:35}],218:[function(e,t,i){e(35)("split",2,function(t,i,n){"use strict";var o=e(50),r=n,a=[].push,s="split",l="length",u="lastIndex";if("c"=="abbc"[s](/(b)*/)[1]||4!="test"[s](/(?:)/,-1)[l]||2!="ab"[s](/(?:ab)*/)[l]||4!="."[s](/(.?)(.?)/)[l]||"."[s](/()()/)[l]>1||""[s](/.?/)[l]){var c=void 0===/()??/.exec("")[1];n=function(e,t){var i=String(this);if(void 0===e&&0===t)return[];if(!o(e))return r.call(i,e,t);var n,s,d,f,p,m=[],h=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),g=0,b=void 0===t?4294967295:t>>>0,v=new RegExp(e.source,h+"g");for(c||(n=new RegExp("^"+v.source+"$(?!\\s)",h));(s=v.exec(i))&&(d=s.index+s[0][l],!(d>g&&(m.push(i.slice(g,s.index)),!c&&s[l]>1&&s[0].replace(n,function(){for(p=1;p1&&s.index=b)));)v[u]===s.index&&v[u]++;return g===i[l]?!f&&v.test("")||m.push(""):m.push(i.slice(g)),m[l]>b?m.slice(0,b):m}}else"0"[s](void 0,0)[l]&&(n=function(e,t){return void 0===e&&0===t?[]:r.call(this,e,t)});return[function(e,o){var r=t(this),a=void 0==e?void 0:e[i];return void 0!==a?a.call(e,r,o):n.call(String(r),e,o)},n]})},{35:35,50:50}],219:[function(e,t,i){"use strict";e(214);var n=e(7),o=e(36),r=e(28),a="toString",s=/./[a],l=function(t){e(87)(RegExp.prototype,a,t,!0)};e(34)(function(){return"/a/b"!=s.call({source:"a",flags:"b"})})?l(function(){var e=n(this);return"/".concat(e.source,"/","flags"in e?e.flags:!r&&e instanceof RegExp?o.call(e):void 0)}):s.name!=a&&l(function(){return s.call(this)})},{214:214,28:28,34:34,36:36,7:7,87:87}],220:[function(e,t,i){"use strict";var n=e(19);t.exports=e(22)("Set",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return n.def(this,e=0===e?0:e,e)}},n)},{19:19,22:22}],221:[function(e,t,i){"use strict";e(99)("anchor",function(e){return function(t){return e(this,"a","name",t)}})},{99:99}],222:[function(e,t,i){"use strict";e(99)("big",function(e){return function(){return e(this,"big","","")}})},{99:99}],223:[function(e,t,i){"use strict";e(99)("blink",function(e){return function(){return e(this,"blink","","")}})},{99:99}],224:[function(e,t,i){"use strict";e(99)("bold",function(e){return function(){return e(this,"b","","")}})},{99:99}],225:[function(e,t,i){"use strict";var n=e(32),o=e(97)(!1);n(n.P,"String",{codePointAt:function(e){return o(this,e)}})},{32:32,97:97}],226:[function(e,t,i){"use strict";var n=e(32),o=e(108),r=e(98),a="endsWith",s=""[a];n(n.P+n.F*e(33)(a),"String",{endsWith:function(e){var t=r(this,e,a),i=arguments.length>1?arguments[1]:void 0,n=o(t.length),l=void 0===i?n:Math.min(o(i),n),u=String(e);return s?s.call(t,u,l):t.slice(l-u.length,l)===u}})},{108:108,32:32,33:33,98:98}],227:[function(e,t,i){"use strict";e(99)("fixed",function(e){return function(){return e(this,"tt","","")}})},{99:99}],228:[function(e,t,i){"use strict";e(99)("fontcolor",function(e){return function(t){return e(this,"font","color",t)}})},{99:99}],229:[function(e,t,i){"use strict";e(99)("fontsize",function(e){return function(t){return e(this,"font","size",t)}})},{99:99}],230:[function(e,t,i){var n=e(32),o=e(105),r=String.fromCharCode,a=String.fromCodePoint;n(n.S+n.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(e){for(var t,i=[],n=arguments.length,a=0;n>a;){if(t=+arguments[a++],o(t,1114111)!==t)throw RangeError(t+" is not a valid code point");i.push(t<65536?r(t):r(((t-=65536)>>10)+55296,t%1024+56320))}return i.join("")}})},{105:105,32:32}],231:[function(e,t,i){"use strict";var n=e(32),o=e(98),r="includes";n(n.P+n.F*e(33)(r),"String",{includes:function(e){return!!~o(this,e,r).indexOf(e,arguments.length>1?arguments[1]:void 0)}})},{32:32,33:33,98:98}],232:[function(e,t,i){"use strict";e(99)("italics",function(e){return function(){return e(this,"i","","")}})},{99:99}],233:[function(e,t,i){"use strict";var n=e(97)(!0);e(53)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,i=this._i;return i>=t.length?{value:void 0,done:!0}:(e=n(t,i),this._i+=e.length,{value:e,done:!1})})},{53:53,97:97}],234:[function(e,t,i){"use strict";e(99)("link",function(e){return function(t){return e(this,"a","href",t)}})},{99:99}],235:[function(e,t,i){var n=e(32),o=e(107),r=e(108);n(n.S,"String",{raw:function(e){for(var t=o(e.raw),i=r(t.length),n=arguments.length,a=[],s=0;i>s;)a.push(String(t[s++])),s1?arguments[1]:void 0,t.length)),n=String(e);return s?s.call(t,n,i):t.slice(i,i+n.length)===n}})},{108:108,32:32,33:33,98:98}],239:[function(e,t,i){"use strict";e(99)("strike",function(e){return function(){return e(this,"strike","","")}})},{99:99}],240:[function(e,t,i){"use strict";e(99)("sub",function(e){return function(){return e(this,"sub","","")}})},{99:99}],241:[function(e,t,i){"use strict";e(99)("sup",function(e){return function(){return e(this,"sup","","")}})},{99:99}],242:[function(e,t,i){"use strict";e(102)("trim",function(e){return function(){return e(this,3)}})},{102:102}],243:[function(e,t,i){"use strict";var n=e(38),o=e(39),r=e(28),a=e(32),s=e(87),l=e(62).KEY,u=e(34),c=e(94),d=e(92),f=e(114),p=e(117),m=e(116),h=e(115),g=e(57),b=e(31),v=e(47),A=e(7),w=e(107),y=e(110),x=e(85),k=e(66),C=e(71),F=e(70),E=e(67),_=e(76),S=F.f,B=E.f,D=C.f,I=n.Symbol,T=n.JSON,O=T&&T.stringify,j="prototype",R=p("_hidden"),M=p("toPrimitive"),P={}.propertyIsEnumerable,L=c("symbol-registry"),N=c("symbols"),z=c("op-symbols"),Y=Object[j],Q="function"==typeof I,H=n.QObject,q=!H||!H[j]||!H[j].findChild,U=r&&u(function(){return 7!=k(B({},"a",{get:function(){return B(this,"a",{value:7}).a}})).a})?function(e,t,i){var n=S(Y,t);n&&delete Y[t],B(e,t,i),n&&e!==Y&&B(Y,t,n)}:B,V=function(e){var t=N[e]=k(I[j]);return t._k=e,t},G=Q&&"symbol"==typeof I.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof I},W=function(e,t,i){return e===Y&&W(z,t,i),A(e),t=y(t,!0),A(i),o(N,t)?(i.enumerable?(o(e,R)&&e[R][t]&&(e[R][t]=!1),i=k(i,{enumerable:x(0,!1)})):(o(e,R)||B(e,R,x(1,{})),e[R][t]=!0),U(e,t,i)):B(e,t,i)},J=function(e,t){A(e);for(var i,n=b(t=w(t)),o=0,r=n.length;r>o;)W(e,i=n[o++],t[i]);return e},X=function(e,t){return void 0===t?k(e):J(k(e),t)},Z=function(e){var t=P.call(this,e=y(e,!0));return!(this===Y&&o(N,e)&&!o(z,e))&&(!(t||!o(this,e)||!o(N,e)||o(this,R)&&this[R][e])||t)},K=function(e,t){if(e=w(e),t=y(t,!0),e!==Y||!o(N,t)||o(z,t)){var i=S(e,t);return!i||!o(N,t)||o(e,R)&&e[R][t]||(i.enumerable=!0),i}},$=function(e){for(var t,i=D(w(e)),n=[],r=0;i.length>r;)o(N,t=i[r++])||t==R||t==l||n.push(t);return n},ee=function(e){for(var t,i=e===Y,n=D(i?z:w(e)),r=[],a=0;n.length>a;)!o(N,t=n[a++])||i&&!o(Y,t)||r.push(N[t]);return r};Q||(I=function(){if(this instanceof I)throw TypeError("Symbol is not a constructor!");var e=f(arguments.length>0?arguments[0]:void 0),t=function(i){this===Y&&t.call(z,i),o(this,R)&&o(this[R],e)&&(this[R][e]=!1),U(this,e,x(1,i))};return r&&q&&U(Y,e,{configurable:!0,set:t}),V(e)},s(I[j],"toString",function(){return this._k}),F.f=K,E.f=W,e(72).f=C.f=$,e(77).f=Z,e(73).f=ee,r&&!e(58)&&s(Y,"propertyIsEnumerable",Z,!0),m.f=function(e){return V(p(e))}),a(a.G+a.W+a.F*!Q,{Symbol:I});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ie=0;te.length>ie;)p(te[ie++]);for(var te=_(p.store),ie=0;te.length>ie;)h(te[ie++]);a(a.S+a.F*!Q,"Symbol",{for:function(e){return o(L,e+="")?L[e]:L[e]=I(e)},keyFor:function(e){if(G(e))return g(L,e);throw TypeError(e+" is not a symbol!")},useSetter:function(){q=!0},useSimple:function(){q=!1}}),a(a.S+a.F*!Q,"Object",{create:X,defineProperty:W,defineProperties:J,getOwnPropertyDescriptor:K,getOwnPropertyNames:$,getOwnPropertySymbols:ee}),T&&a(a.S+a.F*(!Q||u(function(){var e=I();return"[null]"!=O([e])||"{}"!=O({a:e})||"{}"!=O(Object(e))})),"JSON",{stringify:function(e){if(void 0!==e&&!G(e)){for(var t,i,n=[e],o=1;arguments.length>o;)n.push(arguments[o++]);return t=n[1],"function"==typeof t&&(i=t),!i&&v(t)||(t=function(e,t){if(i&&(t=i.call(this,e,t)),!G(t))return t}),n[1]=t,O.apply(T,n)}}}),I[j][M]||e(40)(I[j],M,I[j].valueOf),d(I,"Symbol"),d(Math,"Math",!0),d(n.JSON,"JSON",!0)},{107:107,110:110,114:114,115:115,116:116,117:117,28:28,31:31,32:32,34:34,38:38,39:39,40:40,47:47,57:57,58:58,62:62,66:66,67:67,7:7,70:70,71:71,72:72,73:73,76:76,77:77,85:85,87:87,92:92,94:94}],244:[function(e,t,i){"use strict";var n=e(32),o=e(113),r=e(112),a=e(7),s=e(105),l=e(108),u=e(49),c=e(38).ArrayBuffer,d=e(95),f=r.ArrayBuffer,p=r.DataView,m=o.ABV&&c.isView,h=f.prototype.slice,g=o.VIEW,b="ArrayBuffer";n(n.G+n.W+n.F*(c!==f),{ArrayBuffer:f}),n(n.S+n.F*!o.CONSTR,b,{isView:function(e){return m&&m(e)||u(e)&&g in e}}),n(n.P+n.U+n.F*e(34)(function(){return!new f(2).slice(1,void 0).byteLength}),b,{slice:function(e,t){if(void 0!==h&&void 0===t)return h.call(a(this),e);for(var i=a(this).byteLength,n=s(e,i),o=s(void 0===t?i:t,i),r=new(d(this,f))(l(o-n)),u=new p(this),c=new p(r),m=0;n0?arguments[0]:void 0)}},h={get:function(e){if(u(e)){var t=c(e);return t===!0?f(this).get(e):t?t[this._i]:void 0}},set:function(e,t){return l.def(this,e,t)}},g=t.exports=e(22)("WeakMap",m,h,l,!0,!0);7!=(new g).set((Object.freeze||Object)(p),7).get(p)&&(n=l.getConstructor(m),s(n.prototype,h),a.NEED=!0,o(["delete","has","get","set"],function(e){var t=g.prototype,i=t[e];r(t,e,function(t,o){if(u(t)&&!d(t)){this._f||(this._f=new n);var r=this._f[e](t,o);return"set"==e?this:r}return i.call(this,t,o)})}))},{12:12,21:21,22:22,49:49,62:62,65:65,87:87}],256:[function(e,t,i){"use strict";var n=e(21);e(22)("WeakSet",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return n.def(this,e,!0)}},n,!1,!0)},{21:21,22:22}],257:[function(e,t,i){"use strict";var n=e(32),o=e(11)(!0);n(n.P,"Array",{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),e(5)("includes")},{11:11,32:32,5:5}],258:[function(e,t,i){var n=e(32),o=e(64)(),r=e(38).process,a="process"==e(18)(r);n(n.G,{asap:function(e){var t=a&&r.domain;o(t?t.bind(e):e)}})},{18:18,32:32,38:38,64:64}],259:[function(e,t,i){var n=e(32),o=e(18);n(n.S,"Error",{isError:function(e){return"Error"===o(e)}})},{18:18,32:32}],260:[function(e,t,i){var n=e(32);n(n.P+n.R,"Map",{toJSON:e(20)("Map")})},{20:20,32:32}],261:[function(e,t,i){var n=e(32);n(n.S,"Math",{iaddh:function(e,t,i,n){var o=e>>>0,r=t>>>0,a=i>>>0;return r+(n>>>0)+((o&a|(o|a)&~(o+a>>>0))>>>31)|0}})},{32:32}],262:[function(e,t,i){var n=e(32);n(n.S,"Math",{imulh:function(e,t){var i=65535,n=+e,o=+t,r=n&i,a=o&i,s=n>>16,l=o>>16,u=(s*a>>>0)+(r*a>>>16);return s*l+(u>>16)+((r*l>>>0)+(u&i)>>16)}})},{32:32}],263:[function(e,t,i){var n=e(32);n(n.S,"Math",{isubh:function(e,t,i,n){var o=e>>>0,r=t>>>0,a=i>>>0;return r-(n>>>0)-((~o&a|~(o^a)&o-a>>>0)>>>31)|0}})},{32:32}],264:[function(e,t,i){var n=e(32);n(n.S,"Math",{umulh:function(e,t){var i=65535,n=+e,o=+t,r=n&i,a=o&i,s=n>>>16,l=o>>>16,u=(s*a>>>0)+(r*a>>>16);return s*l+(u>>>16)+((r*l>>>0)+(u&i)>>>16)}})},{32:32}],265:[function(e,t,i){"use strict";var n=e(32),o=e(109),r=e(3),a=e(67);e(28)&&n(n.P+e(69),"Object",{__defineGetter__:function(e,t){a.f(o(this),e,{get:r(t),enumerable:!0,configurable:!0})}})},{109:109,28:28,3:3,32:32,67:67,69:69}],266:[function(e,t,i){"use strict";var n=e(32),o=e(109),r=e(3),a=e(67);e(28)&&n(n.P+e(69),"Object",{__defineSetter__:function(e,t){a.f(o(this),e,{set:r(t),enumerable:!0,configurable:!0})}})},{109:109,28:28,3:3,32:32,67:67,69:69}],267:[function(e,t,i){var n=e(32),o=e(79)(!0);n(n.S,"Object",{entries:function(e){return o(e)}})},{32:32,79:79}],268:[function(e,t,i){var n=e(32),o=e(80),r=e(107),a=e(70),s=e(24);n(n.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,i=r(e),n=a.f,l=o(i),u={},c=0;l.length>c;)s(u,t=l[c++],n(i,t));return u}})},{107:107,24:24,32:32,70:70,80:80}],269:[function(e,t,i){"use strict";var n=e(32),o=e(109),r=e(110),a=e(74),s=e(70).f;e(28)&&n(n.P+e(69),"Object",{__lookupGetter__:function(e){var t,i=o(this),n=r(e,!0);do if(t=s(i,n))return t.get;while(i=a(i))}})},{109:109,110:110,28:28,32:32,69:69,70:70,74:74}],270:[function(e,t,i){"use strict";var n=e(32),o=e(109),r=e(110),a=e(74),s=e(70).f;e(28)&&n(n.P+e(69),"Object",{__lookupSetter__:function(e){var t,i=o(this),n=r(e,!0);do if(t=s(i,n))return t.set;while(i=a(i))}})},{109:109,110:110,28:28,32:32,69:69,70:70,74:74}],271:[function(e,t,i){var n=e(32),o=e(79)(!1);n(n.S,"Object",{values:function(e){return o(e)}})},{32:32,79:79}],272:[function(e,t,i){"use strict";var n=e(32),o=e(38),r=e(23),a=e(64)(),s=e(117)("observable"),l=e(3),u=e(7),c=e(6),d=e(86),f=e(40),p=e(37),m=p.RETURN,h=function(e){return null==e?void 0:l(e)},g=function(e){var t=e._c;t&&(e._c=void 0,t())},b=function(e){return void 0===e._o},v=function(e){b(e)||(e._o=void 0,g(e))},A=function(e,t){u(e),this._c=void 0,this._o=e,e=new w(this);try{var i=t(e),n=i;null!=i&&("function"==typeof i.unsubscribe?i=function(){n.unsubscribe()}:l(i),this._c=i)}catch(t){return void e.error(t)}b(this)&&g(this)};A.prototype=d({},{unsubscribe:function(){v(this)}});var w=function(e){this._s=e};w.prototype=d({},{next:function(e){var t=this._s;if(!b(t)){var i=t._o;try{var n=h(i.next);if(n)return n.call(i,e)}catch(e){try{v(t)}finally{throw e}}}},error:function(e){var t=this._s;if(b(t))throw e;var i=t._o;t._o=void 0;try{var n=h(i.error);if(!n)throw e;e=n.call(i,e)}catch(e){try{g(t)}finally{throw e}}return g(t),e},complete:function(e){var t=this._s;if(!b(t)){var i=t._o;t._o=void 0;try{var n=h(i.complete);e=n?n.call(i,e):void 0}catch(e){try{g(t)}finally{throw e}}return g(t),e}}});var y=function(e){c(this,y,"Observable","_f")._f=l(e)};d(y.prototype,{subscribe:function(e){return new A(e,this._f)},forEach:function(e){var t=this;return new(r.Promise||o.Promise)(function(i,n){l(e);var o=t.subscribe({ -next:function(t){try{return e(t)}catch(e){n(e),o.unsubscribe()}},error:n,complete:i})})}}),d(y,{from:function(e){var t="function"==typeof this?this:y,i=h(u(e)[s]);if(i){var n=u(i.call(e));return n.constructor===t?n:new t(function(e){return n.subscribe(e)})}return new t(function(t){var i=!1;return a(function(){if(!i){try{if(p(e,!1,function(e){if(t.next(e),i)return m})===m)return}catch(e){if(i)throw e;return void t.error(e)}t.complete()}}),function(){i=!0}})},of:function(){for(var e=0,t=arguments.length,i=Array(t);e1?arguments[1]:void 0,!1)}})},{100:100,32:32}],286:[function(e,t,i){"use strict";var n=e(32),o=e(100);n(n.P,"String",{padStart:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},{100:100,32:32}],287:[function(e,t,i){"use strict";e(102)("trimLeft",function(e){return function(){return e(this,1)}},"trimStart")},{102:102}],288:[function(e,t,i){"use strict";e(102)("trimRight",function(e){return function(){return e(this,2)}},"trimEnd")},{102:102}],289:[function(e,t,i){e(115)("asyncIterator")},{115:115}],290:[function(e,t,i){e(115)("observable")},{115:115}],291:[function(e,t,i){var n=e(32);n(n.S,"System",{global:e(38)})},{32:32,38:38}],292:[function(e,t,i){for(var n=e(130),o=e(87),r=e(38),a=e(40),s=e(56),l=e(117),u=l("iterator"),c=l("toStringTag"),d=s.Array,f=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],p=0;p<5;p++){var m,h=f[p],g=r[h],b=g&&g.prototype;if(b){b[u]||a(b,u,d),b[c]||a(b,c,h),s[h]=d;for(m in n)b[m]||o(b,m,n[m],!0)}}},{117:117,130:130,38:38,40:40,56:56,87:87}],293:[function(e,t,i){var n=e(32),o=e(104);n(n.G+n.B,{setImmediate:o.set,clearImmediate:o.clear})},{104:104,32:32}],294:[function(e,t,i){var n=e(38),o=e(32),r=e(44),a=e(83),s=n.navigator,l=!!s&&/MSIE .\./.test(s.userAgent),u=function(e){return l?function(t,i){return e(r(a,[].slice.call(arguments,2),"function"==typeof t?t:Function(t)),i)}:e};o(o.G+o.B+o.F*l,{setTimeout:u(n.setTimeout),setInterval:u(n.setInterval)})},{32:32,38:38,44:44,83:83}],295:[function(e,t,i){e(243),e(180),e(182),e(181),e(184),e(186),e(191),e(185),e(183),e(193),e(192),e(188),e(189),e(187),e(179),e(190),e(194),e(195),e(146),e(148),e(147),e(197),e(196),e(167),e(177),e(178),e(168),e(169),e(170),e(171),e(172),e(173),e(174),e(175),e(176),e(150),e(151),e(152),e(153),e(154),e(155),e(156),e(157),e(158),e(159),e(160),e(161),e(162),e(163),e(164),e(165),e(166),e(230),e(235),e(242),e(233),e(225),e(226),e(231),e(236),e(238),e(221),e(222),e(223),e(224),e(227),e(228),e(229),e(232),e(234),e(237),e(239),e(240),e(241),e(141),e(143),e(142),e(145),e(144),e(129),e(127),e(134),e(131),e(137),e(139),e(126),e(133),e(123),e(138),e(121),e(136),e(135),e(128),e(132),e(120),e(122),e(125),e(124),e(140),e(130),e(213),e(219),e(214),e(215),e(216),e(217),e(218),e(198),e(149),e(220),e(255),e(256),e(244),e(245),e(250),e(253),e(254),e(248),e(251),e(249),e(252),e(246),e(247),e(199),e(200),e(201),e(202),e(203),e(206),e(204),e(205),e(207),e(208),e(209),e(210),e(212),e(211),e(257),e(283),e(286),e(285),e(287),e(288),e(284),e(289),e(290),e(268),e(271),e(267),e(265),e(266),e(269),e(270),e(260),e(282),e(291),e(259),e(261),e(263),e(262),e(264),e(273),e(274),e(276),e(275),e(278),e(277),e(279),e(280),e(281),e(258),e(272),e(294),e(293),e(292),t.exports=e(23)},{120:120,121:121,122:122,123:123,124:124,125:125,126:126,127:127,128:128,129:129,130:130,131:131,132:132,133:133,134:134,135:135,136:136,137:137,138:138,139:139,140:140,141:141,142:142,143:143,144:144,145:145,146:146,147:147,148:148,149:149,150:150,151:151,152:152,153:153,154:154,155:155,156:156,157:157,158:158,159:159,160:160,161:161,162:162,163:163,164:164,165:165,166:166,167:167,168:168,169:169,170:170,171:171,172:172,173:173,174:174,175:175,176:176,177:177,178:178,179:179,180:180,181:181,182:182,183:183,184:184,185:185,186:186,187:187,188:188,189:189,190:190,191:191,192:192,193:193,194:194,195:195,196:196,197:197,198:198,199:199,200:200,201:201,202:202,203:203,204:204,205:205,206:206,207:207,208:208,209:209,210:210,211:211,212:212,213:213,214:214,215:215,216:216,217:217,218:218,219:219,220:220,221:221,222:222,223:223,224:224,225:225,226:226,227:227,228:228,229:229,23:23,230:230,231:231,232:232,233:233,234:234,235:235,236:236,237:237,238:238,239:239,240:240,241:241,242:242,243:243,244:244,245:245,246:246,247:247,248:248,249:249,250:250,251:251,252:252,253:253,254:254,255:255,256:256,257:257,258:258,259:259,260:260,261:261,262:262,263:263,264:264,265:265,266:266,267:267,268:268,269:269,270:270,271:271,272:272,273:273,274:274,275:275,276:276,277:277,278:278,279:279,280:280,281:281,282:282,283:283,284:284,285:285,286:286,287:287,288:288,289:289,290:290,291:291,292:292,293:293,294:294}],296:[function(e,t,i){(function(e){!function(e){"use strict";function i(e,t,i,n){var r=Object.create((t||o).prototype),a=new p(n||[]);return r._invoke=c(e,i,a),r}function n(e,t,i){try{return{type:"normal",arg:e.call(t,i)}}catch(e){return{type:"throw",arg:e}}}function o(){}function r(){}function a(){}function s(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function l(e){this.arg=e}function u(e){function t(i,o,r,a){var s=n(e[i],e,o);if("throw"!==s.type){var u=s.arg,c=u.value;return c instanceof l?Promise.resolve(c.arg).then(function(e){t("next",e,r,a)},function(e){t("throw",e,r,a)}):Promise.resolve(c).then(function(e){u.value=e,r(u)},a)}a(s.arg)}function i(e,i){function n(){return new Promise(function(n,o){t(e,i,n,o)})}return o=o?o.then(n,n):n()}"object"==typeof process&&process.domain&&(t=process.domain.bind(t));var o;this._invoke=i}function c(e,t,i){var o=k;return function(r,a){if(o===F)throw new Error("Generator is already running");if(o===E){if("throw"===r)throw a;return h()}for(;;){var s=i.delegate;if(s){if("return"===r||"throw"===r&&s.iterator[r]===g){i.delegate=null;var l=s.iterator.return;if(l){var u=n(l,s.iterator,a);if("throw"===u.type){r="throw",a=u.arg;continue}}if("return"===r)continue}var u=n(s.iterator[r],s.iterator,a);if("throw"===u.type){i.delegate=null,r="throw",a=u.arg;continue}r="next",a=g;var c=u.arg;if(!c.done)return o=C,c;i[s.resultName]=c.value,i.next=s.nextLoc,i.delegate=null}if("next"===r)i.sent=i._sent=a;else if("throw"===r){if(o===k)throw o=E,a;i.dispatchException(a)&&(r="next",a=g)}else"return"===r&&i.abrupt("return",a);o=F;var u=n(e,t,i);if("normal"===u.type){o=i.done?E:C;var c={value:u.arg,done:i.done};if(u.arg!==_)return c;i.delegate&&"next"===r&&(a=g)}else"throw"===u.type&&(o=E,r="throw",a=u.arg)}}}function d(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function f(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function p(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(d,this),this.reset(!0)}function m(e){if(e){var t=e[A];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,n=function t(){for(;++i=0;--n){var o=this.tryEntries[n],r=o.completion;if("root"===o.tryLoc)return t("end");if(o.tryLoc<=this.prev){var a=b.call(o,"catchLoc"),s=b.call(o,"finallyLoc");if(a&&s){if(this.prev=0;--i){var n=this.tryEntries[i];if(n.tryLoc<=this.prev&&b.call(n,"finallyLoc")&&this.prev=0;--t){var i=this.tryEntries[t];if(i.finallyLoc===e)return this.complete(i.completion,i.afterLoc),f(i),_}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.tryLoc===e){var n=i.completion;if("throw"===n.type){var o=n.arg;f(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,i){return this.delegate={iterator:m(e),resultName:t,nextLoc:i},_}}}("object"==typeof e?e:"object"==typeof window?window:"object"==typeof self?self:this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1]),!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.Promise=e()}}(function(){var e,t,i;return function e(t,i,n){function o(a,s){if(!i[a]){if(!t[a]){var l="function"==typeof _dereq_&&_dereq_;if(!s&&l)return l(a,!0);if(r)return r(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=i[a]={exports:{}};t[a][0].call(c.exports,function(e){var i=t[a][1][e];return o(i?i:e)},c,c.exports,e,t,i,n)}return i[a].exports}for(var r="function"==typeof _dereq_&&_dereq_,a=0;a0;){var t=e.shift();if("function"==typeof t){var i=e.shift(),n=e.shift();t.call(i,n)}else t._settlePromises()}},n.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},n.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},n.prototype._reset=function(){this._isTickUsed=!1},t.exports=n,t.exports.firstLineError=s},{"./queue":17,"./schedule":18,"./util":21}],2:[function(e,t,i){"use strict";t.exports=function(e,t,i,n){var o=!1,r=function(e,t){this._reject(t)},a=function(e,t){t.promiseRejectionQueued=!0,t.bindingPromise._then(r,r,null,this,e)},s=function(e,t){0===(50397184&this._bitField)&&this._resolveCallback(t.target)},l=function(e,t){t.promiseRejectionQueued||this._reject(e)};e.prototype.bind=function(r){o||(o=!0,e.prototype._propagateFrom=n.propagateFromFunction(),e.prototype._boundValue=n.boundValueFunction());var u=i(r),c=new e(t);c._propagateFrom(this,1);var d=this._target();if(c._setBoundTo(u),u instanceof e){var f={promiseRejectionQueued:!1,promise:c,target:d,bindingPromise:u};d._then(t,a,void 0,c,f),u._then(s,l,void 0,c,f),c._setOnCancel(u)}else c._resolveCallback(d);return c},e.prototype._setBoundTo=function(e){void 0!==e?(this._bitField=2097152|this._bitField,this._boundTo=e):this._bitField=this._bitField&-2097153},e.prototype._isBound=function(){return 2097152===(2097152&this._bitField)},e.bind=function(t,i){return e.resolve(i).bind(t)}}},{}],3:[function(e,t,i){"use strict";function n(){try{Promise===r&&(Promise=o)}catch(e){}return r}var o;"undefined"!=typeof Promise&&(o=Promise);var r=e("./promise")();r.noConflict=n,t.exports=r},{"./promise":15}],4:[function(e,t,i){"use strict";t.exports=function(t,i,n,o){var r=e("./util"),a=r.tryCatch,s=r.errorObj,l=t._async;t.prototype.break=t.prototype.cancel=function(){if(!o.cancellation())return this._warn("cancellation is disabled");for(var e=this,t=e;e._isCancellable();){if(!e._cancelBy(t)){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}var i=e._cancellationParent;if(null==i||!i._isCancellable()){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}e._isFollowing()&&e._followee().cancel(),e._setWillBeCancelled(),t=e,e=i}},t.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},t.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},t.prototype._cancelBy=function(e){return e===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},t.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},t.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),l.invoke(this._cancelPromises,this,void 0))},t.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},t.prototype._unsetOnCancel=function(){this._onCancelField=void 0},t.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},t.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},t.prototype._doInvokeOnCancel=function(e,t){if(r.isArray(e))for(var i=0;i=0)return r[e]}var o=!1,r=[];return e.prototype._promiseCreated=function(){},e.prototype._pushContext=function(){},e.prototype._popContext=function(){return null},e._peekContext=e.prototype._peekContext=function(){},t.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,r.push(this._trace))},t.prototype._popContext=function(){if(void 0!==this._trace){var e=r.pop(),t=e._promiseCreated;return e._promiseCreated=null,t}return null},t.CapturedTrace=null,t.create=i,t.deactivateLongStackTraces=function(){},t.activateLongStackTraces=function(){var i=e.prototype._pushContext,r=e.prototype._popContext,a=e._peekContext,s=e.prototype._peekContext,l=e.prototype._promiseCreated;t.deactivateLongStackTraces=function(){e.prototype._pushContext=i,e.prototype._popContext=r,e._peekContext=a,e.prototype._peekContext=s,e.prototype._promiseCreated=l,o=!1},o=!0,e.prototype._pushContext=t.prototype._pushContext,e.prototype._popContext=t.prototype._popContext,e._peekContext=e.prototype._peekContext=n,e.prototype._promiseCreated=function(){var e=this._peekContext();e&&null==e._promiseCreated&&(e._promiseCreated=this)}},t}},{}],7:[function(e,t,i){"use strict";t.exports=function(t,i){function n(e,t){return{promise:t}}function o(){return!1}function r(e,t,i){var n=this;try{e(t,i,function(e){if("function"!=typeof e)throw new TypeError("onCancel must be a function, got: "+L.toString(e));n._attachCancellationCallback(e)})}catch(e){return e}}function a(e){if(!this._isCancellable())return this;var t=this._onCancel();void 0!==t?L.isArray(t)?t.push(e):this._setOnCancel([t,e]):this._setOnCancel(e)}function s(){return this._onCancelField}function l(e){this._onCancelField=e}function u(){this._cancellationParent=void 0,this._onCancelField=void 0}function c(e,t){if(0!==(1&t)){this._cancellationParent=e;var i=e._branchesRemainingToCancel;void 0===i&&(i=0),e._branchesRemainingToCancel=i+1}0!==(2&t)&&e._isBound()&&this._setBoundTo(e._boundTo)}function d(e,t){0!==(2&t)&&e._isBound()&&this._setBoundTo(e._boundTo)}function f(){var e=this._boundTo;return void 0!==e&&e instanceof t?e.isFulfilled()?e.value():void 0:e}function p(){this._trace=new I(this._peekContext())}function m(e,t){if(N(e)){var i=this._trace;if(void 0!==i&&t&&(i=i._parent),void 0!==i)i.attachExtraTrace(e);else if(!e.__stackCleaned__){var n=k(e);L.notEnumerableProp(e,"stack",n.message+"\n"+n.stack.join("\n")),L.notEnumerableProp(e,"__stackCleaned__",!0)}}}function h(e,t,i,n,o){if(void 0===e&&null!==t&&J){if(void 0!==o&&o._returnedNonUndefined())return;if(0===(65535&n._bitField))return;i&&(i+=" ");var r="",a="";if(t._trace){for(var s=t._trace.stack.split("\n"),l=y(s),u=l.length-1;u>=0;--u){var c=l[u];if(!Y.test(c)){var d=c.match(Q);d&&(r="at "+d[1]+":"+d[2]+":"+d[3]+" ");break}}if(l.length>0)for(var f=l[0],u=0;u0&&(a="\n"+s[u-1]);break}}var p="a promise was created in a "+i+"handler "+r+"but was not returned from it, see http://goo.gl/rRqMUw"+a;n._warn(p,!0,t)}}function g(e,t){var i=e+" is deprecated and will be removed in a future version.";return t&&(i+=" Use "+t+" instead."),b(i)}function b(e,i,n){if(re.warnings){var o,r=new P(e);if(i)n._attachExtraTrace(r);else if(re.longStackTraces&&(o=t._peekContext()))o.attachExtraTrace(r);else{var a=k(r);r.stack=a.message+"\n"+a.stack.join("\n")}ee("warning",r)||C(r,"",!0)}}function v(e,t){for(var i=0;i=0;--s)if(n[s]===r){a=s;break}for(var s=a;s>=0;--s){var l=n[s];if(t[o]!==l)break;t.pop(),o--}t=n}}function y(e){for(var t=[],i=0;i0&&(t=t.slice(i)),t}function k(e){var t=e.stack,i=e.toString();return t="string"==typeof t&&t.length>0?x(e):[" (No stack trace)"],{message:i,stack:y(t)}}function C(e,t,i){if("undefined"!=typeof console){var n;if(L.isObject(e)){var o=e.stack;n=t+q(o,e)}else n=t+String(e);"function"==typeof j?j(n,i):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(n)}}function F(e,t,i,n){var o=!1;try{"function"==typeof t&&(o=!0,"rejectionHandled"===e?t(n):t(i,n))}catch(e){M.throwLater(e)}"unhandledRejection"===e?ee(e,i,n)||o||C(i,"Unhandled rejection "):ee(e,n)}function E(e){var t;if("function"==typeof e)t="[function "+(e.name||"anonymous")+"]";else{t=e&&"function"==typeof e.toString?e.toString():L.toString(e);var i=/\[object [a-zA-Z0-9$_]+\]/;if(i.test(t))try{var n=JSON.stringify(e);t=n}catch(e){}0===t.length&&(t="(empty array)")}return"(<"+_(t)+">, no stack trace)"}function _(e){var t=41;return e.length=s||(ie=function(e){if(z.test(e))return!0;var t=B(e);return!!(t&&t.fileName===i&&a<=t.line&&t.line<=s)})}}function I(e){this._parent=e,this._promisesCreated=0;var t=this._length=1+(void 0===e?0:e._length);oe(this,I),t>32&&this.uncycle()}var T,O,j,R=t._getDomain,M=t._async,P=e("./errors").Warning,L=e("./util"),N=L.canAttachTrace,z=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,Y=/\((?:timers\.js):\d+:\d+\)/,Q=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,H=null,q=null,U=!1,V=!(0==L.env("BLUEBIRD_DEBUG")),G=!(0==L.env("BLUEBIRD_WARNINGS")||!V&&!L.env("BLUEBIRD_WARNINGS")),W=!(0==L.env("BLUEBIRD_LONG_STACK_TRACES")||!V&&!L.env("BLUEBIRD_LONG_STACK_TRACES")),J=0!=L.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(G||!!L.env("BLUEBIRD_W_FORGOTTEN_RETURN"));t.prototype.suppressUnhandledRejections=function(){var e=this._target();e._bitField=e._bitField&-1048577|524288},t.prototype._ensurePossibleRejectionHandled=function(){0===(524288&this._bitField)&&(this._setRejectionIsUnhandled(),M.invokeLater(this._notifyUnhandledRejection,this,void 0))},t.prototype._notifyUnhandledRejectionIsHandled=function(){F("rejectionHandled",T,void 0,this)},t.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},t.prototype._returnedNonUndefined=function(){return 0!==(268435456&this._bitField)},t.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var e=this._settledValue();this._setUnhandledRejectionIsNotified(),F("unhandledRejection",O,e,this)}},t.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},t.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=this._bitField&-262145},t.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},t.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},t.prototype._unsetRejectionIsUnhandled=function(){this._bitField=this._bitField&-1048577,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},t.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},t.prototype._warn=function(e,t,i){return b(e,t,i||this)},t.onPossiblyUnhandledRejection=function(e){var t=R();O="function"==typeof e?null===t?e:L.domainBind(t,e):void 0},t.onUnhandledRejectionHandled=function(e){var t=R();T="function"==typeof e?null===t?e:L.domainBind(t,e):void 0};var X=function(){};t.longStackTraces=function(){if(M.haveItemsQueued()&&!re.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!re.longStackTraces&&S()){var e=t.prototype._captureStackTrace,n=t.prototype._attachExtraTrace;re.longStackTraces=!0,X=function(){if(M.haveItemsQueued()&&!re.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");t.prototype._captureStackTrace=e,t.prototype._attachExtraTrace=n,i.deactivateLongStackTraces(),M.enableTrampoline(),re.longStackTraces=!1},t.prototype._captureStackTrace=p,t.prototype._attachExtraTrace=m,i.activateLongStackTraces(),M.disableTrampolineIfNecessary()}},t.hasLongStackTraces=function(){return re.longStackTraces&&S()};var Z=function(){try{if("function"==typeof CustomEvent){var e=new CustomEvent("CustomEvent");return L.global.dispatchEvent(e),function(e,t){var i=new CustomEvent(e.toLowerCase(),{detail:t,cancelable:!0});return!L.global.dispatchEvent(i)}}if("function"==typeof Event){var e=new Event("CustomEvent");return L.global.dispatchEvent(e),function(e,t){var i=new Event(e.toLowerCase(),{cancelable:!0});return i.detail=t,!L.global.dispatchEvent(i)}}var e=document.createEvent("CustomEvent");return e.initCustomEvent("testingtheevent",!1,!0,{}),L.global.dispatchEvent(e),function(e,t){var i=document.createEvent("CustomEvent");return i.initCustomEvent(e.toLowerCase(),!1,!0,t),!L.global.dispatchEvent(i)}}catch(e){}return function(){return!1}}(),K=function(){return L.isNode?function(){return process.emit.apply(process,arguments)}:L.global?function(e){var t="on"+e.toLowerCase(),i=L.global[t];return!!i&&(i.apply(L.global,[].slice.call(arguments,1)),!0)}:function(){return!1}}(),$={promiseCreated:n,promiseFulfilled:n,promiseRejected:n,promiseResolved:n,promiseCancelled:n,promiseChained:function(e,t,i){return{promise:t,child:i}},warning:function(e,t){return{warning:t}},unhandledRejection:function(e,t,i){return{reason:t,promise:i}},rejectionHandled:n},ee=function(e){var t=!1;try{t=K.apply(null,arguments)}catch(e){M.throwLater(e),t=!0}var i=!1;try{i=Z(e,$[e].apply(null,arguments))}catch(e){M.throwLater(e),i=!0}return i||t};t.config=function(e){if(e=Object(e),"longStackTraces"in e&&(e.longStackTraces?t.longStackTraces():!e.longStackTraces&&t.hasLongStackTraces()&&X()),"warnings"in e){var i=e.warnings;re.warnings=!!i,J=re.warnings,L.isObject(i)&&"wForgottenReturn"in i&&(J=!!i.wForgottenReturn)}if("cancellation"in e&&e.cancellation&&!re.cancellation){if(M.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");t.prototype._clearCancellationData=u,t.prototype._propagateFrom=c,t.prototype._onCancel=s,t.prototype._setOnCancel=l,t.prototype._attachCancellationCallback=a,t.prototype._execute=r,te=c,re.cancellation=!0}"monitoring"in e&&(e.monitoring&&!re.monitoring?(re.monitoring=!0,t.prototype._fireEvent=ee):!e.monitoring&&re.monitoring&&(re.monitoring=!1, -t.prototype._fireEvent=o))},t.prototype._fireEvent=o,t.prototype._execute=function(e,t,i){try{e(t,i)}catch(e){return e}},t.prototype._onCancel=function(){},t.prototype._setOnCancel=function(e){},t.prototype._attachCancellationCallback=function(e){},t.prototype._captureStackTrace=function(){},t.prototype._attachExtraTrace=function(){},t.prototype._clearCancellationData=function(){},t.prototype._propagateFrom=function(e,t){};var te=d,ie=function(){return!1},ne=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;L.inherits(I,Error),i.CapturedTrace=I,I.prototype.uncycle=function(){var e=this._length;if(!(e<2)){for(var t=[],i={},n=0,o=this;void 0!==o;++n)t.push(o),o=o._parent;e=this._length=n;for(var n=e-1;n>=0;--n){var r=t[n].stack;void 0===i[r]&&(i[r]=n)}for(var n=0;n0&&(t[s-1]._parent=void 0,t[s-1]._length=1),t[n]._parent=void 0,t[n]._length=1;var l=n>0?t[n-1]:this;s=0;--c)t[c]._length=u,u++;return}}}},I.prototype.attachExtraTrace=function(e){if(!e.__stackCleaned__){this.uncycle();for(var t=k(e),i=t.message,n=[t.stack],o=this;void 0!==o;)n.push(y(o.stack.split("\n"))),o=o._parent;w(n),A(n),L.notEnumerableProp(e,"stack",v(i,n)),L.notEnumerableProp(e,"__stackCleaned__",!0)}};var oe=function(){var e=/^\s*at\s*/,t=function(e,t){return"string"==typeof e?e:void 0!==t.name&&void 0!==t.message?t.toString():E(t)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,H=e,q=t;var i=Error.captureStackTrace;return ie=function(e){return z.test(e)},function(e,t){Error.stackTraceLimit+=6,i(e,t),Error.stackTraceLimit-=6}}var n=new Error;if("string"==typeof n.stack&&n.stack.split("\n")[0].indexOf("stackDetection@")>=0)return H=/@/,q=t,U=!0,function(e){e.stack=(new Error).stack};var o;try{throw new Error}catch(e){o="stack"in e}return"stack"in n||!o||"number"!=typeof Error.stackTraceLimit?(q=function(e,t){return"string"==typeof e?e:"object"!=typeof t&&"function"!=typeof t||void 0===t.name||void 0===t.message?E(t):t.toString()},null):(H=e,q=t,function(e){Error.stackTraceLimit+=6;try{throw new Error}catch(t){e.stack=t.stack}Error.stackTraceLimit-=6})}([]);"undefined"!=typeof console&&"undefined"!=typeof console.warn&&(j=function(e){console.warn(e)},L.isNode&&process.stderr.isTTY?j=function(e,t){var i=t?"":"";console.warn(i+e+"\n")}:L.isNode||"string"!=typeof(new Error).stack||(j=function(e,t){console.warn("%c"+e,t?"color: darkorange":"color: red")}));var re={warnings:G,longStackTraces:!1,cancellation:!1,monitoring:!1};return W&&t.longStackTraces(),{longStackTraces:function(){return re.longStackTraces},warnings:function(){return re.warnings},cancellation:function(){return re.cancellation},monitoring:function(){return re.monitoring},propagateFromFunction:function(){return te},boundValueFunction:function(){return f},checkForgottenReturns:h,setBounds:D,warn:b,deprecated:g,CapturedTrace:I,fireDomEvent:Z,fireGlobalEvent:K}}},{"./errors":9,"./util":21}],8:[function(e,t,i){"use strict";t.exports=function(e){function t(){return this.value}function i(){throw this.reason}e.prototype.return=e.prototype.thenReturn=function(i){return i instanceof e&&i.suppressUnhandledRejections(),this._then(t,void 0,void 0,{value:i},void 0)},e.prototype.throw=e.prototype.thenThrow=function(e){return this._then(i,void 0,void 0,{reason:e},void 0)},e.prototype.catchThrow=function(e){if(arguments.length<=1)return this._then(void 0,i,void 0,{reason:e},void 0);var t=arguments[1],n=function(){throw t};return this.caught(e,n)},e.prototype.catchReturn=function(i){if(arguments.length<=1)return i instanceof e&&i.suppressUnhandledRejections(),this._then(void 0,t,void 0,{value:i},void 0);var n=arguments[1];n instanceof e&&n.suppressUnhandledRejections();var o=function(){return n};return this.caught(i,o)}}},{}],9:[function(e,t,i){"use strict";function n(e,t){function i(n){return this instanceof i?(d(this,"message","string"==typeof n?n:t),d(this,"name",e),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new i(n)}return c(i,Error),i}function o(e){return this instanceof o?(d(this,"name","OperationalError"),d(this,"message",e),this.cause=e,this.isOperational=!0,void(e instanceof Error?(d(this,"message",e.message),d(this,"stack",e.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new o(e)}var r,a,s=e("./es5"),l=s.freeze,u=e("./util"),c=u.inherits,d=u.notEnumerableProp,f=n("Warning","warning"),p=n("CancellationError","cancellation error"),m=n("TimeoutError","timeout error"),h=n("AggregateError","aggregate error");try{r=TypeError,a=RangeError}catch(e){r=n("TypeError","type error"),a=n("RangeError","range error")}for(var g="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),b=0;b1?e.cancelPromise._reject(t):e.cancelPromise._cancel(),e.cancelPromise=null,!0)}function a(){return l.call(this,this.promise._target()._settledValue())}function s(e){if(!r(this,e))return d.e=e,d}function l(e){var n=this.promise,l=this.handler;if(!this.called){this.called=!0;var u=this.isFinallyHandler()?l.call(n._boundValue()):l.call(n._boundValue(),e);if(void 0!==u){n._setReturnedNonUndefined();var f=i(u,n);if(f instanceof t){if(null!=this.cancelPromise){if(f._isCancelled()){var p=new c("late cancellation observer");return n._attachExtraTrace(p),d.e=p,d}f.isPending()&&f._attachCancellationCallback(new o(this))}return f._then(a,s,void 0,this,void 0)}}}return n.isRejected()?(r(this),d.e=e,d):(r(this),e)}var u=e("./util"),c=t.CancellationError,d=u.errorObj;return n.prototype.isFinallyHandler=function(){return 0===this.type},o.prototype._resultCancelled=function(){r(this.finallyHandler)},t.prototype._passThrough=function(e,t,i,o){return"function"!=typeof e?this.then():this._then(i,o,void 0,new n(this,t,e),void 0)},t.prototype.lastly=t.prototype.finally=function(e){return this._passThrough(e,0,l,l)},t.prototype.tap=function(e){return this._passThrough(e,1,l)},n}},{"./util":21}],12:[function(e,t,i){"use strict";t.exports=function(t,i,n,o,r,a){var s=e("./util");s.canEvaluate,s.tryCatch,s.errorObj;t.join=function(){var e,t=arguments.length-1;if(t>0&&"function"==typeof arguments[t]){e=arguments[t];var n}var o=[].slice.call(arguments);e&&o.pop();var n=new i(o).promise();return void 0!==e?n.spread(e):n}}},{"./util":21}],13:[function(e,t,i){"use strict";t.exports=function(t,i,n,o,r){var a=e("./util"),s=a.tryCatch;t.method=function(e){if("function"!=typeof e)throw new t.TypeError("expecting a function but got "+a.classString(e));return function(){var n=new t(i);n._captureStackTrace(),n._pushContext();var o=s(e).apply(this,arguments),a=n._popContext();return r.checkForgottenReturns(o,a,"Promise.method",n),n._resolveFromSyncValue(o),n}},t.attempt=t.try=function(e){if("function"!=typeof e)return o("expecting a function but got "+a.classString(e));var n=new t(i);n._captureStackTrace(),n._pushContext();var l;if(arguments.length>1){r.deprecated("calling Promise.try with more than 1 argument");var u=arguments[1],c=arguments[2];l=a.isArray(u)?s(e).apply(c,u):s(e).call(c,u)}else l=s(e)();var d=n._popContext();return r.checkForgottenReturns(l,d,"Promise.try",n),n._resolveFromSyncValue(l),n},t.prototype._resolveFromSyncValue=function(e){e===a.errorObj?this._rejectCallback(e.e,!1):this._resolveCallback(e,!0)}}},{"./util":21}],14:[function(e,t,i){"use strict";function n(e){return e instanceof Error&&c.getPrototypeOf(e)===Error.prototype}function o(e){var t;if(n(e)){t=new u(e),t.name=e.name,t.message=e.message,t.stack=e.stack;for(var i=c.keys(e),o=0;o1){var i,n=new Array(t-1),o=0;for(i=0;i0&&"function"!=typeof e&&"function"!=typeof t){var i=".then() only accepts functions but was passed: "+p.classString(e);arguments.length>1&&(i+=", "+p.classString(t)),this._warn(i)}return this._then(e,t,void 0,void 0,void 0)},o.prototype.done=function(e,t){var i=this._then(e,t,void 0,void 0,void 0);i._setIsFinal()},o.prototype.spread=function(e){return"function"!=typeof e?d("expecting a function but got "+p.classString(e)):this.all()._then(e,void 0,void 0,y,void 0)},o.prototype.toJSON=function(){var e={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(e.fulfillmentValue=this.value(),e.isFulfilled=!0):this.isRejected()&&(e.rejectionReason=this.reason(),e.isRejected=!0),e},o.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new C(this).promise()},o.prototype.error=function(e){return this.caught(p.originatesFromRejection,e)},o.getNewLibraryCopy=t.exports,o.is=function(e){return e instanceof o},o.fromNode=o.fromCallback=function(e){var t=new o(w);t._captureStackTrace();var i=arguments.length>1&&!!Object(arguments[1]).multiArgs,n=I(e)(B(t,i));return n===D&&t._rejectCallback(n.e,!0),t._isFateSealed()||t._setAsyncGuaranteed(),t},o.all=function(e){return new C(e).promise()},o.cast=function(e){var t=k(e);return t instanceof o||(t=new o(w),t._captureStackTrace(),t._setFulfilled(),t._rejectionHandler0=e),t},o.resolve=o.fulfilled=o.cast,o.reject=o.rejected=function(e){var t=new o(w);return t._captureStackTrace(),t._rejectCallback(e,!0),t},o.setScheduler=function(e){if("function"!=typeof e)throw new v("expecting a function but got "+p.classString(e));return g.setScheduler(e)},o.prototype._then=function(e,t,i,n,r){var a=void 0!==r,s=a?r:new o(w),u=this._target(),c=u._bitField;a||(s._propagateFrom(this,3),s._captureStackTrace(),void 0===n&&0!==(2097152&this._bitField)&&(n=0!==(50397184&c)?this._boundValue():u===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,s));var d=l();if(0!==(50397184&c)){var f,m,h=u._settlePromiseCtx;0!==(33554432&c)?(m=u._rejectionHandler0,f=e):0!==(16777216&c)?(m=u._fulfillmentHandler0,f=t,u._unsetRejectionIsUnhandled()):(h=u._settlePromiseLateCancellationObserver,m=new A("late cancellation observer"),u._attachExtraTrace(m),f=t),g.invoke(h,u,{handler:null===d?f:"function"==typeof f&&p.domainBind(d,f),promise:s,receiver:n,value:m})}else u._addCallbacks(e,t,s,n,d);return s},o.prototype._length=function(){return 65535&this._bitField},o.prototype._isFateSealed=function(){return 0!==(117506048&this._bitField)},o.prototype._isFollowing=function(){return 67108864===(67108864&this._bitField)},o.prototype._setLength=function(e){this._bitField=this._bitField&-65536|65535&e},o.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},o.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},o.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},o.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},o.prototype._isFinal=function(){return(4194304&this._bitField)>0},o.prototype._unsetCancelled=function(){this._bitField=this._bitField&-65537},o.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},o.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},o.prototype._setAsyncGuaranteed=function(){g.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},o.prototype._receiverAt=function(e){var t=0===e?this._receiver0:this[4*e-4+3];if(t!==f)return void 0===t&&this._isBound()?this._boundValue():t},o.prototype._promiseAt=function(e){return this[4*e-4+2]},o.prototype._fulfillmentHandlerAt=function(e){return this[4*e-4+0]},o.prototype._rejectionHandlerAt=function(e){return this[4*e-4+1]},o.prototype._boundValue=function(){},o.prototype._migrateCallback0=function(e){var t=(e._bitField,e._fulfillmentHandler0),i=e._rejectionHandler0,n=e._promise0,o=e._receiverAt(0);void 0===o&&(o=f),this._addCallbacks(t,i,n,o,null)},o.prototype._migrateCallbackAt=function(e,t){var i=e._fulfillmentHandlerAt(t),n=e._rejectionHandlerAt(t),o=e._promiseAt(t),r=e._receiverAt(t);void 0===r&&(r=f),this._addCallbacks(i,n,o,r,null)},o.prototype._addCallbacks=function(e,t,i,n,o){var r=this._length();if(r>=65531&&(r=0,this._setLength(0)),0===r)this._promise0=i,this._receiver0=n,"function"==typeof e&&(this._fulfillmentHandler0=null===o?e:p.domainBind(o,e)),"function"==typeof t&&(this._rejectionHandler0=null===o?t:p.domainBind(o,t));else{var a=4*r-4;this[a+2]=i,this[a+3]=n,"function"==typeof e&&(this[a+0]=null===o?e:p.domainBind(o,e)),"function"==typeof t&&(this[a+1]=null===o?t:p.domainBind(o,t))}return this._setLength(r+1),r},o.prototype._proxy=function(e,t){this._addCallbacks(void 0,void 0,t,e,null)},o.prototype._resolveCallback=function(e,t){if(0===(117506048&this._bitField)){if(e===this)return this._rejectCallback(u(),!1);var i=k(e,this);if(!(i instanceof o))return this._fulfill(e);t&&this._propagateFrom(i,2);var n=i._target();if(n===this)return void this._reject(u());var r=n._bitField;if(0===(50397184&r)){var a=this._length();a>0&&n._migrateCallback0(this);for(var s=1;s>>16)){if(e===this){var i=u();return this._attachExtraTrace(i),this._reject(i)}this._setFulfilled(),this._rejectionHandler0=e,(65535&t)>0&&(0!==(134217728&t)?this._settlePromises():g.settlePromises(this))}},o.prototype._reject=function(e){var t=this._bitField;if(!((117506048&t)>>>16))return this._setRejected(),this._fulfillmentHandler0=e,this._isFinal()?g.fatalError(e,p.isNode):void((65535&t)>0?g.settlePromises(this):this._ensurePossibleRejectionHandled())},o.prototype._fulfillPromises=function(e,t){for(var i=1;i0){if(0!==(16842752&e)){var i=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,i,e),this._rejectPromises(t,i)}else{var n=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,n,e),this._fulfillPromises(t,n)}this._setLength(0)}this._clearCancellationData()},o.prototype._settledValue=function(){var e=this._bitField;return 0!==(33554432&e)?this._rejectionHandler0:0!==(16777216&e)?this._fulfillmentHandler0:void 0},o.defer=o.pending=function(){E.deprecated("Promise.defer","new Promise");var e=new o(w);return{promise:e,resolve:r,reject:a}},p.notEnumerableProp(o,"_makeSelfResolutionError",u),e("./method")(o,w,k,d,E),e("./bind")(o,w,k,E),e("./cancel")(o,C,d,E),e("./direct_resolve")(o),e("./synchronous_inspection")(o),e("./join")(o,C,k,w,g,l),o.Promise=o,o.version="3.4.6",p.toFastProperties(o),p.toFastProperties(o.prototype),s({a:1}),s({b:2}),s({c:3}),s(1),s(function(){}),s(void 0),s(!1),s(new o(w)),E.setBounds(h.firstLineError,p.lastLineError),o}},{"./async":1,"./bind":2,"./cancel":4,"./catch_filter":5,"./context":6,"./debuggability":7,"./direct_resolve":8,"./errors":9,"./es5":10,"./finally":11,"./join":12,"./method":13,"./nodeback":14,"./promise_array":16,"./synchronous_inspection":19,"./thenables":20,"./util":21}],16:[function(e,t,i){"use strict";t.exports=function(t,i,n,o,r){function a(e){switch(e){case-2:return[];case-3:return{}}}function s(e){var n=this._promise=new t(i);e instanceof t&&n._propagateFrom(e,3),n._setOnCancel(this),this._values=e,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var l=e("./util");l.isArray;return l.inherits(s,r),s.prototype.length=function(){return this._length},s.prototype.promise=function(){return this._promise},s.prototype._init=function e(i,r){var s=n(this._values,this._promise);if(s instanceof t){s=s._target();var u=s._bitField;if(this._values=s,0===(50397184&u))return this._promise._setAsyncGuaranteed(),s._then(e,this._reject,void 0,this,r);if(0===(33554432&u))return 0!==(16777216&u)?this._reject(s._reason()):this._cancel();s=s._value()}if(s=l.asArray(s),null===s){var c=o("expecting an array or an iterable object but got "+l.classString(s)).reason();return void this._promise._rejectCallback(c,!1)}return 0===s.length?void(r===-5?this._resolveEmptyArray():this._resolve(a(r))):void this._iterate(s)},s.prototype._iterate=function(e){var i=this.getActualLength(e.length);this._length=i,this._values=this.shouldCopyValues()?new Array(i):this._values;for(var o=this._promise,r=!1,a=null,s=0;s=this._length&&(this._resolve(this._values),!0)},s.prototype._promiseCancelled=function(){return this._cancel(),!0},s.prototype._promiseRejected=function(e){return this._totalResolved++,this._reject(e),!0},s.prototype._resultCancelled=function(){if(!this._isResolved()){var e=this._values;if(this._cancel(),e instanceof t)e.cancel();else for(var i=0;i1,n=t.length>0&&!(1===t.length&&"constructor"===t[0]),o=O.test(e+"")&&E.names(e).length>0;if(i||n||o)return!0}return!1}catch(e){return!1}}function p(e){function t(){}t.prototype=e;for(var i=8;i--;)new t;return e}function m(e){return j.test(e)}function h(e,t,i){for(var n=new Array(e),o=0;o10||e[0]>0}(),N.isNode&&N.toFastProperties(process);try{throw new Error}catch(e){N.lastLineError=e}t.exports=N},{"./es5":10}]},{},[3])(3)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise);var requirejs,require,define;!function(global,setTimeout){function commentReplace(e,t){return t||""}function isFunction(e){return"[object Function]"===ostring.call(e)}function isArray(e){return"[object Array]"===ostring.call(e)}function each(e,t){if(e){var i;for(i=0;i-1&&(!e[i]||!t(e[i],i,e));i-=1);}}function hasProp(e,t){return hasOwn.call(e,t)}function getOwn(e,t){return hasProp(e,t)&&e[t]}function eachProp(e,t){var i;for(i in e)if(hasProp(e,i)&&t(e[i],i))break}function mixin(e,t,i,n){return t&&eachProp(t,function(t,o){!i&&hasProp(e,o)||(!n||"object"!=typeof t||!t||isArray(t)||isFunction(t)||t instanceof RegExp?e[o]=t:(e[o]||(e[o]={}),mixin(e[o],t,i,n)))}),e}function bind(e,t){return function(){return t.apply(e,arguments)}}function scripts(){return document.getElementsByTagName("script")}function defaultOnError(e){throw e}function getGlobal(e){if(!e)return e;var t=global;return each(e.split("."),function(e){t=t[e]}),t}function makeError(e,t,i,n){var o=new Error(t+"\nhttp://requirejs.org/docs/errors.html#"+e);return o.requireType=e,o.requireModules=n,i&&(o.originalError=i),o}function newContext(e){function t(e){var t,i;for(t=0;t0&&(e.splice(t-1,2),t-=2)}}function i(e,i,n){var o,r,a,s,l,u,c,d,f,p,m,h,g=i&&i.split("/"),b=k.map,v=b&&b["*"];if(e&&(e=e.split("/"),c=e.length-1,k.nodeIdCompat&&jsSuffixRegExp.test(e[c])&&(e[c]=e[c].replace(jsSuffixRegExp,"")),"."===e[0].charAt(0)&&g&&(h=g.slice(0,g.length-1),e=h.concat(e)),t(e),e=e.join("/")),n&&b&&(g||v)){a=e.split("/");e:for(s=a.length;s>0;s-=1){if(u=a.slice(0,s).join("/"),g)for(l=g.length;l>0;l-=1)if(r=getOwn(b,g.slice(0,l).join("/")),r&&(r=getOwn(r,u))){d=r,f=s;break e}!p&&v&&getOwn(v,u)&&(p=getOwn(v,u),m=s)}!d&&p&&(d=p,f=m),d&&(a.splice(0,f,d),e=a.join("/"))}return o=getOwn(k.pkgs,e),o?o:e}function n(e){isBrowser&&each(scripts(),function(t){if(t.getAttribute("data-requiremodule")===e&&t.getAttribute("data-requirecontext")===w.contextName)return t.parentNode.removeChild(t),!0})}function o(e){var t=getOwn(k.paths,e);if(t&&isArray(t)&&t.length>1)return t.shift(),w.require.undef(e),w.makeRequire(null,{skipMap:!0})([e]),!0}function r(e){var t,i=e?e.indexOf("!"):-1;return i>-1&&(t=e.substring(0,i),e=e.substring(i+1,e.length)),[t,e]}function a(e,t,n,o){var a,s,l,u,c=null,d=t?t.name:null,f=e,p=!0,m="";return e||(p=!1,e="_@r"+(I+=1)),u=r(e),c=u[0],e=u[1],c&&(c=i(c,d,o),s=getOwn(S,c)),e&&(c?m=s&&s.normalize?s.normalize(e,function(e){return i(e,d,o)}):e.indexOf("!")===-1?i(e,d,o):e:(m=i(e,d,o),u=r(m),c=u[0],m=u[1],n=!0,a=w.nameToUrl(m))),l=!c||s||n?"":"_unnormalized"+(T+=1),{prefix:c,name:m,parentMap:t,unnormalized:!!l,url:a,originalName:f,isDefine:p,id:(c?c+"!"+m:m)+l}}function s(e){var t=e.id,i=getOwn(C,t);return i||(i=C[t]=new w.Module(e)),i}function l(e,t,i){var n=e.id,o=getOwn(C,n);!hasProp(S,n)||o&&!o.defineEmitComplete?(o=s(e),o.error&&"error"===t?i(o.error):o.on(t,i)):"defined"===t&&i(S[n])}function u(e,t){var i=e.requireModules,n=!1;t?t(e):(each(i,function(t){var i=getOwn(C,t);i&&(i.error=e,i.events.error&&(n=!0,i.emit("error",e)))}),n||req.onError(e))}function c(){globalDefQueue.length&&(each(globalDefQueue,function(e){var t=e[0];"string"==typeof t&&(w.defQueueMap[t]=!0),_.push(e)}),globalDefQueue=[])}function d(e){delete C[e],delete F[e]}function f(e,t,i){var n=e.map.id;e.error?e.emit("error",e.error):(t[n]=!0,each(e.depMaps,function(n,o){var r=n.id,a=getOwn(C,r);!a||e.depMatched[o]||i[r]||(getOwn(t,r)?(e.defineDep(o,S[r]),e.check()):f(a,t,i))}),i[n]=!0)}function p(){var e,t,i=1e3*k.waitSeconds,r=i&&w.startTime+i<(new Date).getTime(),a=[],s=[],l=!1,c=!0;if(!v){if(v=!0,eachProp(F,function(e){var i=e.map,u=i.id;if(e.enabled&&(i.isDefine||s.push(e),!e.error))if(!e.inited&&r)o(u)?(t=!0,l=!0):(a.push(u),n(u));else if(!e.inited&&e.fetched&&i.isDefine&&(l=!0,!i.prefix))return c=!1}),r&&a.length)return e=makeError("timeout","Load timeout for modules: "+a,null,a),e.contextName=w.contextName,u(e);c&&each(s,function(e){f(e,{},{})}),r&&!t||!l||!isBrowser&&!isWebWorker||x||(x=setTimeout(function(){x=0,p()},50)),v=!1}}function m(e){hasProp(S,e[0])||s(a(e[0],null,!0)).init(e[1],e[2])}function h(e,t,i,n){e.detachEvent&&!isOpera?n&&e.detachEvent(n,t):e.removeEventListener(i,t,!1)}function g(e){var t=e.currentTarget||e.srcElement;return h(t,w.onScriptLoad,"load","onreadystatechange"),h(t,w.onScriptError,"error"),{node:t,id:t&&t.getAttribute("data-requiremodule")}}function b(){var e;for(c();_.length;){if(e=_.shift(),null===e[0])return u(makeError("mismatch","Mismatched anonymous define() module: "+e[e.length-1]));m(e)}w.defQueueMap={}}var v,A,w,y,x,k={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},C={},F={},E={},_=[],S={},B={},D={},I=1,T=1;return y={require:function(e){return e.require?e.require:e.require=w.makeRequire(e.map)},exports:function(e){if(e.usingExports=!0,e.map.isDefine)return e.exports?S[e.map.id]=e.exports:e.exports=S[e.map.id]={}},module:function(e){return e.module?e.module:e.module={id:e.map.id,uri:e.map.url,config:function(){return getOwn(k.config,e.map.id)||{}},exports:e.exports||(e.exports={})}}},A=function(e){this.events=getOwn(E,e.id)||{},this.map=e,this.shim=getOwn(k.shim,e.id),this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0},A.prototype={init:function(e,t,i,n){n=n||{},this.inited||(this.factory=t,i?this.on("error",i):this.events.error&&(i=bind(this,function(e){this.emit("error",e)})),this.depMaps=e&&e.slice(0),this.errback=i,this.inited=!0,this.ignore=n.ignore,n.enabled||this.enabled?this.enable():this.check())},defineDep:function(e,t){this.depMatched[e]||(this.depMatched[e]=!0,this.depCount-=1,this.depExports[e]=t)},fetch:function(){if(!this.fetched){this.fetched=!0,w.startTime=(new Date).getTime();var e=this.map;return this.shim?void w.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],bind(this,function(){return e.prefix?this.callPlugin():this.load()})):e.prefix?this.callPlugin():this.load()}},load:function(){var e=this.map.url;B[e]||(B[e]=!0,w.load(this.map.id,e))},check:function(){if(this.enabled&&!this.enabling){var e,t,i=this.map.id,n=this.depExports,o=this.exports,r=this.factory;if(this.inited){if(this.error)this.emit("error",this.error);else if(!this.defining){if(this.defining=!0,this.depCount<1&&!this.defined){if(isFunction(r)){if(this.events.error&&this.map.isDefine||req.onError!==defaultOnError)try{o=w.execCb(i,r,n,o)}catch(t){e=t}else o=w.execCb(i,r,n,o);if(this.map.isDefine&&void 0===o&&(t=this.module,t?o=t.exports:this.usingExports&&(o=this.exports)),e)return e.requireMap=this.map,e.requireModules=this.map.isDefine?[this.map.id]:null,e.requireType=this.map.isDefine?"define":"require",u(this.error=e)}else o=r;if(this.exports=o,this.map.isDefine&&!this.ignore&&(S[i]=o,req.onResourceLoad)){var a=[];each(this.depMaps,function(e){a.push(e.normalizedMap||e)}),req.onResourceLoad(w,this.map,a)}d(i),this.defined=!0}this.defining=!1,this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else hasProp(w.defQueueMap,i)||this.fetch()}},callPlugin:function(){var e=this.map,t=e.id,n=a(e.prefix);this.depMaps.push(n),l(n,"defined",bind(this,function(n){var o,r,c,f=getOwn(D,this.map.id),p=this.map.name,m=this.map.parentMap?this.map.parentMap.name:null,h=w.makeRequire(e.parentMap,{enableBuildCallback:!0});return this.map.unnormalized?(n.normalize&&(p=n.normalize(p,function(e){return i(e,m,!0)})||""),r=a(e.prefix+"!"+p,this.map.parentMap),l(r,"defined",bind(this,function(e){this.map.normalizedMap=r,this.init([],function(){return e},null,{enabled:!0,ignore:!0})})),c=getOwn(C,r.id),void(c&&(this.depMaps.push(r),this.events.error&&c.on("error",bind(this,function(e){this.emit("error",e)})),c.enable()))):f?(this.map.url=w.nameToUrl(f),void this.load()):(o=bind(this,function(e){this.init([],function(){return e},null,{enabled:!0})}),o.error=bind(this,function(e){this.inited=!0,this.error=e,e.requireModules=[t],eachProp(C,function(e){0===e.map.id.indexOf(t+"_unnormalized")&&d(e.map.id)}),u(e)}),o.fromText=bind(this,function(i,n){var r=e.name,l=a(r),c=useInteractive;n&&(i=n),c&&(useInteractive=!1),s(l),hasProp(k.config,t)&&(k.config[r]=k.config[t]);try{req.exec(i)}catch(e){return u(makeError("fromtexteval","fromText eval for "+t+" failed: "+e,e,[t]))}c&&(useInteractive=!0),this.depMaps.push(l),w.completeLoad(r),h([r],o)}),void n.load(e.name,h,o,k))})),w.enable(n,this),this.pluginMaps[n.id]=n},enable:function(){F[this.map.id]=this,this.enabled=!0,this.enabling=!0,each(this.depMaps,bind(this,function(e,t){var i,n,o;if("string"==typeof e){if(e=a(e,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap),this.depMaps[t]=e,o=getOwn(y,e.id))return void(this.depExports[t]=o(this));this.depCount+=1,l(e,"defined",bind(this,function(e){this.undefed||(this.defineDep(t,e),this.check())})),this.errback?l(e,"error",bind(this,this.errback)):this.events.error&&l(e,"error",bind(this,function(e){this.emit("error",e)}))}i=e.id,n=C[i],hasProp(y,i)||!n||n.enabled||w.enable(e,this)})),eachProp(this.pluginMaps,bind(this,function(e){var t=getOwn(C,e.id);t&&!t.enabled&&w.enable(e,this)})),this.enabling=!1,this.check()},on:function(e,t){var i=this.events[e];i||(i=this.events[e]=[]),i.push(t)},emit:function(e,t){each(this.events[e],function(e){e(t)}),"error"===e&&delete this.events[e]}},w={config:k,contextName:e,registry:C,defined:S,urlFetched:B,defQueue:_,defQueueMap:{},Module:A,makeModuleMap:a,nextTick:req.nextTick,onError:u,configure:function(e){if(e.baseUrl&&"/"!==e.baseUrl.charAt(e.baseUrl.length-1)&&(e.baseUrl+="/"),"string"==typeof e.urlArgs){var t=e.urlArgs;e.urlArgs=function(e,i){return(i.indexOf("?")===-1?"?":"&")+t}}var i=k.shim,n={paths:!0,bundles:!0,config:!0,map:!0};eachProp(e,function(e,t){n[t]?(k[t]||(k[t]={}),mixin(k[t],e,!0,!0)):k[t]=e}),e.bundles&&eachProp(e.bundles,function(e,t){each(e,function(e){e!==t&&(D[e]=t)})}),e.shim&&(eachProp(e.shim,function(e,t){isArray(e)&&(e={deps:e}),!e.exports&&!e.init||e.exportsFn||(e.exportsFn=w.makeShimExports(e)),i[t]=e}),k.shim=i),e.packages&&each(e.packages,function(e){var t,i;e="string"==typeof e?{name:e}:e,i=e.name,t=e.location,t&&(k.paths[i]=e.location),k.pkgs[i]=e.name+"/"+(e.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}),eachProp(C,function(e,t){e.inited||e.map.unnormalized||(e.map=a(t,null,!0))}),(e.deps||e.callback)&&w.require(e.deps||[],e.callback)},makeShimExports:function(e){function t(){var t;return e.init&&(t=e.init.apply(global,arguments)),t||e.exports&&getGlobal(e.exports)}return t},makeRequire:function(t,o){function r(i,n,l){var c,d,f;return o.enableBuildCallback&&n&&isFunction(n)&&(n.__requireJsBuild=!0),"string"==typeof i?isFunction(n)?u(makeError("requireargs","Invalid require call"),l):t&&hasProp(y,i)?y[i](C[t.id]):req.get?req.get(w,i,t,r):(d=a(i,t,!1,!0),c=d.id,hasProp(S,c)?S[c]:u(makeError("notloaded",'Module name "'+c+'" has not been loaded yet for context: '+e+(t?"":". Use require([])")))):(b(),w.nextTick(function(){b(),f=s(a(null,t)),f.skipMap=o.skipMap,f.init(i,n,l,{enabled:!0}),p()}),r)}return o=o||{},mixin(r,{isBrowser:isBrowser,toUrl:function(e){var n,o=e.lastIndexOf("."),r=e.split("/")[0],a="."===r||".."===r;return o!==-1&&(!a||o>1)&&(n=e.substring(o,e.length),e=e.substring(0,o)),w.nameToUrl(i(e,t&&t.id,!0),n,!0)},defined:function(e){return hasProp(S,a(e,t,!1,!0).id)},specified:function(e){return e=a(e,t,!1,!0).id,hasProp(S,e)||hasProp(C,e)}}),t||(r.undef=function(e){c();var i=a(e,t,!0),o=getOwn(C,e);o.undefed=!0,n(e),delete S[e],delete B[i.url],delete E[e],eachReverse(_,function(t,i){t[0]===e&&_.splice(i,1)}),delete w.defQueueMap[e],o&&(o.events.defined&&(E[e]=o.events),d(e))}),r},enable:function(e){var t=getOwn(C,e.id);t&&s(e).enable()},completeLoad:function(e){var t,i,n,r=getOwn(k.shim,e)||{},a=r.exports;for(c();_.length;){if(i=_.shift(),null===i[0]){if(i[0]=e,t)break;t=!0}else i[0]===e&&(t=!0);m(i)}if(w.defQueueMap={},n=getOwn(C,e),!t&&!hasProp(S,e)&&n&&!n.inited){if(!(!k.enforceDefine||a&&getGlobal(a)))return o(e)?void 0:u(makeError("nodefine","No define call for "+e,null,[e]));m([e,r.deps||[],r.exportsFn])}p()},nameToUrl:function(e,t,i){var n,o,r,a,s,l,u,c=getOwn(k.pkgs,e);if(c&&(e=c),u=getOwn(D,e))return w.nameToUrl(u,t,i);if(req.jsExtRegExp.test(e))s=e+(t||"");else{for(n=k.paths,o=e.split("/"),r=o.length;r>0;r-=1)if(a=o.slice(0,r).join("/"),l=getOwn(n,a)){isArray(l)&&(l=l[0]),o.splice(0,r,l);break}s=o.join("/"),s+=t||(/^data\:|^blob\:|\?/.test(s)||i?"":".js"),s=("/"===s.charAt(0)||s.match(/^[\w\+\.\-]+:/)?"":k.baseUrl)+s}return k.urlArgs&&!/^blob\:/.test(s)?s+k.urlArgs(e,s):s},load:function(e,t){req.load(w,e,t)},execCb:function(e,t,i,n){return t.apply(n,i)},onScriptLoad:function(e){if("load"===e.type||readyRegExp.test((e.currentTarget||e.srcElement).readyState)){interactiveScript=null;var t=g(e);w.completeLoad(t.id)}},onScriptError:function(e){var t=g(e);if(!o(t.id)){var i=[];return eachProp(C,function(e,n){0!==n.indexOf("_@r")&&each(e.depMaps,function(e){if(e.id===t.id)return i.push(n),!0})}),u(makeError("scripterror",'Script error for "'+t.id+(i.length?'", needed by: '+i.join(", "):'"'),e,[t.id]))}}},w.require=w.makeRequire(),w}function getInteractiveScript(){return interactiveScript&&"interactive"===interactiveScript.readyState?interactiveScript:(eachReverse(scripts(),function(e){if("interactive"===e.readyState)return interactiveScript=e}),interactiveScript)}var req,s,head,baseElement,dataMain,src,interactiveScript,currentlyAddingScript,mainScript,subPath,version="2.3.2",commentRegExp=/\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,op=Object.prototype,ostring=op.toString,hasOwn=op.hasOwnProperty,isBrowser=!("undefined"==typeof window||"undefined"==typeof navigator||!window.document),isWebWorker=!isBrowser&&"undefined"!=typeof importScripts,readyRegExp=isBrowser&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,defContextName="_",isOpera="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),contexts={},cfg={},globalDefQueue=[],useInteractive=!1;if("undefined"==typeof define){if("undefined"!=typeof requirejs){if(isFunction(requirejs))return;cfg=requirejs,requirejs=void 0}"undefined"==typeof require||isFunction(require)||(cfg=require,require=void 0),req=requirejs=function(e,t,i,n){var o,r,a=defContextName;return isArray(e)||"string"==typeof e||(r=e,isArray(t)?(e=t,t=i,i=n):e=[]),r&&r.context&&(a=r.context),o=getOwn(contexts,a),o||(o=contexts[a]=req.s.newContext(a)),r&&o.configure(r),o.require(e,t,i)},req.config=function(e){return req(e)},req.nextTick="undefined"!=typeof setTimeout?function(e){setTimeout(e,4)}:function(e){e()},require||(require=req),req.version=version,req.jsExtRegExp=/^\/|:|\?|\.js$/,req.isBrowser=isBrowser,s=req.s={contexts:contexts,newContext:newContext},req({}),each(["toUrl","undef","defined","specified"],function(e){req[e]=function(){var t=contexts[defContextName];return t.require[e].apply(t,arguments)}}),isBrowser&&(head=s.head=document.getElementsByTagName("head")[0],baseElement=document.getElementsByTagName("base")[0],baseElement&&(head=s.head=baseElement.parentNode)),req.onError=defaultOnError,req.createNode=function(e,t,i){var n=e.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");return n.type=e.scriptType||"text/javascript",n.charset="utf-8",n.async=!0,n},req.load=function(e,t,i){var n,o=e&&e.config||{};if(isBrowser)return n=req.createNode(o,t,i),n.setAttribute("data-requirecontext",e.contextName),n.setAttribute("data-requiremodule",t),!n.attachEvent||n.attachEvent.toString&&n.attachEvent.toString().indexOf("[native code")<0||isOpera?(n.addEventListener("load",e.onScriptLoad,!1),n.addEventListener("error",e.onScriptError,!1)):(useInteractive=!0,n.attachEvent("onreadystatechange",e.onScriptLoad)),n.src=i,o.onNodeCreated&&o.onNodeCreated(n,o,t,i),currentlyAddingScript=n,baseElement?head.insertBefore(n,baseElement):head.appendChild(n),currentlyAddingScript=null,n;if(isWebWorker)try{setTimeout(function(){},0),importScripts(i),e.completeLoad(t)}catch(n){e.onError(makeError("importscripts","importScripts failed for "+t+" at "+i,n,[t]))}},isBrowser&&!cfg.skipDataMain&&eachReverse(scripts(),function(e){if(head||(head=e.parentNode),dataMain=e.getAttribute("data-main"))return mainScript=dataMain,cfg.baseUrl||mainScript.indexOf("!")!==-1||(src=mainScript.split("/"),mainScript=src.pop(),subPath=src.length?src.join("/")+"/":"./",cfg.baseUrl=subPath),mainScript=mainScript.replace(jsSuffixRegExp,""),req.jsExtRegExp.test(mainScript)&&(mainScript=dataMain),cfg.deps=cfg.deps?cfg.deps.concat(mainScript):[mainScript],!0}),define=function(e,t,i){var n,o;"string"!=typeof e&&(i=t,t=e,e=null),isArray(t)||(i=t,t=null),!t&&isFunction(i)&&(t=[],i.length&&(i.toString().replace(commentRegExp,commentReplace).replace(cjsRequireRegExp,function(e,i){t.push(i)}),t=(1===i.length?["require"]:["require","exports","module"]).concat(t))),useInteractive&&(n=currentlyAddingScript||getInteractiveScript(),n&&(e||(e=n.getAttribute("data-requiremodule")),o=contexts[n.getAttribute("data-requirecontext")])),o?(o.defQueue.push([e,t,i]),o.defQueueMap[e]=!0):globalDefQueue.push([e,t,i])},define.amd={jQuery:!0},req.exec=function(text){return eval(text)},req(cfg)}}(this,"undefined"==typeof setTimeout?void 0:setTimeout),_aureliaConfigureModuleLoader(),define("aurelia-binding",["exports","aurelia-logging","aurelia-pal","aurelia-task-queue","aurelia-metadata"],function(e,t,i,n,o){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e){if(e in Pe)return Pe[e];var t=e.charAt(0).toLowerCase()+e.slice(1).replace(/[_.-](\w|$)/g,function(e,t){return t.toUpperCase()});return Pe[e]=t,t}function u(e,t){return{bindingContext:e,parentOverrideContext:t||null}}function c(e,t,i){var n=t.overrideContext;if(i){for(;i&&n;)i--,n=n.parentOverrideContext;if(i||!n)return;return e in n?n:n.bindingContext}for(;n&&!(e in n)&&!(n.bindingContext&&e in n.bindingContext);)n=n.parentOverrideContext;return n?e in n?n:n.bindingContext:t.bindingContext||t.overrideContext}function d(e,t){return t?{bindingContext:e,overrideContext:u(e,u(t))}:{bindingContext:e,overrideContext:u(e)}}function f(e){for(var t=void 0===this._observerSlots?0:this._observerSlots,i=t;i--&&this[Ne[i]]!==e;);if(i===-1){for(i=0;this[Ne[i]];)i++;this[Ne[i]]=e,e.subscribe(Le,this),i===t&&(this._observerSlots=i+1)}void 0===this._version&&(this._version=0),this[ze[i]]=this._version}function p(e,t){var i=this.observerLocator.getObserver(e,t);f.call(this,i)}function m(e){var t=this.observerLocator.getArrayObserver(e);f.call(this,t)}function h(e){for(var t=this._observerSlots;t--;)if(e||this[ze[t]]!==this._version){var i=this[Ne[t]];this[Ne[t]]=null,i&&i.unsubscribe(Le,this)}}function g(){return function(e){e.prototype.observeProperty=p,e.prototype.observeArray=m,e.prototype.unobserve=h,e.prototype.addObserver=f}}function b(e){for(var t=0,n=Qe.keys(),o=void 0;(o=n.next())&&!o.done;){var r=o.value;if(Qe.delete(r),r.connect(!0),t++,t%100===0&&i.PLATFORM.performance.now()-e>qe)break}Qe.size?i.PLATFORM.requestAnimationFrame(b):(Ue=!1,Ve=0)}function v(e){Ve>>0}function E(e){return+e}function _(e,t,i){return{index:e,removed:t,addedCount:i}}function S(){}function B(e,t,i,n,o,r){return tt.calcSplices(e,t,i,n,o,r)}function D(e,t,i,n){return t=0){e.splice(s,1),s--,a-=l.addedCount-l.removed.length,o.addedCount+=l.addedCount-u;var c=o.removed.length+l.removed.length-u;if(o.addedCount||c){var d=l.removed;if(o.indexl.index+l.addedCount){var p=o.removed.slice(l.index+l.addedCount-o.index);Array.prototype.push.apply(d,p)}o.removed=d,l.index=zt&&e<=Ut||e===ji}function q(e){return xi<=e&&e<=Di||mi<=e&&e<=gi||e===yi||e===Wt}function U(e){return xi<=e&&e<=Di||mi<=e&&e<=gi||fi<=e&&e<=pi||e===yi||e===Wt}function V(e){return fi<=e&&e<=pi}function G(e){return e===ki||e===hi}function W(e){return e===ni||e===ti}function J(e){switch(e){case Fi:return Yt;case Ci:return Ht;case Ei:return qt;case _i:return zt;case Bi:return Qt;default:return e}}function X(e,t){if(!e)throw t||"Assertion failed"}function Z(e,t){return Ni.for(e,t)}function K(e){return e.path&&e.path[0]||e.deepPath&&e.deepPath[0]||e.target}function $(e){e.standardStopPropagation=e.stopPropagation,e.stopPropagation=function(){this.propagationStopped=!0,this.standardStopPropagation()}}function ee(e){var t=!1;e.propagationStopped=!1;for(var i=K(e);i&&!e.propagationStopped;){if(i.delegatedCallbacks){var n=i.delegatedCallbacks[e.type];n&&(t||($(e),t=!0),n(e))}i=i.parentNode}}function te(e){return!!(e&&e.get&&e.get.dependencies)}function ie(e,t,i){var n=Object.getOwnPropertyDescriptor(e.prototype,t);n.get.dependencies=i}function ne(){for(var e=arguments.length,t=Array(e),i=0;i0||i>0;)if(0!==t)if(0!==i){var r=e[t-1][i-1],a=e[t-1][i],s=e[t][i-1],l=void 0;l=ai?t=i-e.addedCount:t<0&&(t=i+e.removed.length+t-e.addedCount),t<0&&(t=0),e.index=t}null===this.changeRecords?this.changeRecords=[e]:this.changeRecords.push(e),this.queued||(this.queued=!0,this.taskQueue.queueMicroTask(this))}},e.prototype.flushChangeRecords=function(){(this.changeRecords&&this.changeRecords.length||this.oldCollection)&&this.call()},e.prototype.reset=function(e){this.oldCollection=e,this.hasSubscribers()&&!this.queued&&(this.queued=!0,this.taskQueue.queueMicroTask(this))},e.prototype.getLengthObserver=function(){return this.lengthObserver||(this.lengthObserver=new nt(this.collection))},e.prototype.call=function(){var e=this.changeRecords,t=this.oldCollection,i=void 0;this.queued=!1,this.changeRecords=[],this.oldCollection=null,this.hasSubscribers()&&(i=t?this.collection instanceof Map||this.collection instanceof Set?R(t):B(this.collection,0,this.collection.length,t,0,t.length):this.collection instanceof Map||this.collection instanceof Set?e:O(this.collection,e),this.callSubscribers(i)),this.lengthObserver&&this.lengthObserver.call(this.collection[this.lengthPropertyName])},e}())||he),nt=e.CollectionLengthObserver=(ge=C(),ge(be=function(){function e(e){this.collection=e,this.lengthPropertyName=e instanceof Map||e instanceof Set?"size":"length",this.currentValue=e[this.lengthPropertyName]}return e.prototype.getValue=function(){return this.collection[this.lengthPropertyName]},e.prototype.setValue=function(e){this.collection[this.lengthPropertyName]=e},e.prototype.subscribe=function(e,t){this.addSubscriber(e,t)},e.prototype.unsubscribe=function(e,t){this.removeSubscriber(e,t)},e.prototype.call=function(e){var t=this.currentValue;this.callSubscribers(e,t),this.currentValue=e},e}())||be),ot=Array.prototype.pop,rt=Array.prototype.push,at=Array.prototype.reverse,st=Array.prototype.shift,lt=Array.prototype.sort,ut=Array.prototype.splice,ct=Array.prototype.unshift;Array.prototype.pop=function(){var e=this.length>0,t=ot.apply(this,arguments);return e&&void 0!==this.__array_observer__&&this.__array_observer__.addChangeRecord({type:"delete",object:this,name:this.length,oldValue:t}),t},Array.prototype.push=function(){var e=rt.apply(this,arguments);return void 0!==this.__array_observer__&&this.__array_observer__.addChangeRecord({type:"splice",object:this,index:this.length-arguments.length,removed:[],addedCount:arguments.length}),e},Array.prototype.reverse=function(){var e=void 0;void 0!==this.__array_observer__&&(this.__array_observer__.flushChangeRecords(),e=this.slice());var t=at.apply(this,arguments);return void 0!==this.__array_observer__&&this.__array_observer__.reset(e),t},Array.prototype.shift=function(){var e=this.length>0,t=st.apply(this,arguments);return e&&void 0!==this.__array_observer__&&this.__array_observer__.addChangeRecord({type:"delete",object:this,name:0,oldValue:t}),t},Array.prototype.sort=function(){var e=void 0;void 0!==this.__array_observer__&&(this.__array_observer__.flushChangeRecords(),e=this.slice());var t=lt.apply(this,arguments);return void 0!==this.__array_observer__&&this.__array_observer__.reset(e),t},Array.prototype.splice=function(){var e=ut.apply(this,arguments);return void 0!==this.__array_observer__&&this.__array_observer__.addChangeRecord({type:"splice",object:this,index:arguments[0],removed:e,addedCount:arguments.length>2?arguments.length-2:0}),e},Array.prototype.unshift=function(){var e=ct.apply(this,arguments);return void 0!==this.__array_observer__&&this.__array_observer__.addChangeRecord({type:"splice",object:this,index:0,removed:[],addedCount:arguments.length}),e},e.getArrayObserver=M;var dt=function(e){function t(t,i){return a(this,e.call(this,t,i))}return s(t,e),t.for=function(e,i){return"__array_observer__"in i||Reflect.defineProperty(i,"__array_observer__",{value:t.create(e,i),enumerable:!1,configurable:!1}),i.__array_observer__},t.create=function(e,i){return new t(e,i)},t}(it),ft=e.Expression=function(){function e(){this.isChain=!1,this.isAssignable=!1}return e.prototype.evaluate=function(e,t,i){throw new Error('Binding expression "'+this+'" cannot be evaluated.')},e.prototype.assign=function(e,t,i){throw new Error('Binding expression "'+this+'" cannot be assigned to.')},e.prototype.toString=function(){return Tt.unparse(this)},e}(),pt=e.Chain=function(e){function t(t){var i=a(this,e.call(this));return i.expressions=t,i.isChain=!0,i}return s(t,e),t.prototype.evaluate=function(e,t){for(var i=void 0,n=this.expressions,o=void 0,r=0,a=n.length;r":return i>n;case"<=":return i<=n;case">=":return i>=n;case"^":return i^n}throw new Error("Internal error ["+this.operation+"] not handled")},t.prototype.accept=function(e){return e.visitBinary(this)},t.prototype.connect=function(e,t){this.left.connect(e,t);var i=this.left.evaluate(t);"&&"===this.operation&&!i||"||"===this.operation&&i||this.right.connect(e,t)},t}(ft),Et=e.PrefixNot=function(e){function t(t,i){var n=a(this,e.call(this));return n.operation=t,n.expression=i,n}return s(t,e),t.prototype.evaluate=function(e,t){return!this.expression.evaluate(e)},t.prototype.accept=function(e){return e.visitPrefix(this)},t.prototype.connect=function(e,t){this.expression.connect(e,t)},t}(ft),_t=e.LiteralPrimitive=function(e){function t(t){var i=a(this,e.call(this));return i.value=t,i}return s(t,e),t.prototype.evaluate=function(e,t){return this.value},t.prototype.accept=function(e){return e.visitLiteralPrimitive(this)},t.prototype.connect=function(e,t){},t}(ft),St=e.LiteralString=function(e){function t(t){var i=a(this,e.call(this));return i.value=t,i}return s(t,e),t.prototype.evaluate=function(e,t){return this.value},t.prototype.accept=function(e){return e.visitLiteralString(this)},t.prototype.connect=function(e,t){},t}(ft),Bt=e.LiteralArray=function(e){function t(t){var i=a(this,e.call(this));return i.elements=t,i}return s(t,e),t.prototype.evaluate=function(e,t){for(var i=this.elements,n=[],o=0,r=i.length;o=this.length)return this.peek=Nt,null;this.peek=this.input.charCodeAt(this.index)}if(q(this.peek))return this.scanIdentifier();if(V(this.peek))return this.scanNumber(this.index);var e=this.index;switch(this.peek){case oi:return this.advance(),V(this.peek)?this.scanNumber(e):new Rt(e,".");case Kt:case $t:case Ii:case Oi:case bi:case Ai:case ii:case ai:case si:return this.scanCharacter(e,String.fromCharCode(this.peek));case Zt:case Gt:return this.scanString();case ti:case ni:case ei:case ri:case Jt:case wi:case di:return this.scanOperator(e,String.fromCharCode(this.peek));case li:case ci:case Vt:case ui:return this.scanComplexOperator(e,ui,String.fromCharCode(this.peek),"=");case Xt:return this.scanComplexOperator(e,Xt,"&","&");case Ti:return this.scanComplexOperator(e,Ti,"|","|");case ji:for(;H(this.peek);)this.advance();return this.scanToken()}var t=String.fromCharCode(this.peek);return this.error("Unexpected character ["+t+"]"),null},e.prototype.scanCharacter=function(e,t){return X(this.peek===t.charCodeAt(0)),this.advance(),new Rt(e,t)},e.prototype.scanOperator=function(e,t){return X(this.peek===t.charCodeAt(0)),X(Lt.indexOf(t)!==-1),this.advance(),new Rt(e,t).withOp(t)},e.prototype.scanComplexOperator=function(e,t,i,n){X(this.peek===i.charCodeAt(0)),this.advance();var o=i;return this.peek===t&&(this.advance(),o+=n),this.peek===t&&(this.advance(),o+=n),X(Lt.indexOf(o)!==-1),new Rt(e,o).withOp(o)},e.prototype.scanIdentifier=function(){X(q(this.peek));var e=this.index;for(this.advance();U(this.peek);)this.advance();var t=this.input.substring(e,this.index),i=new Rt(e,t);return Lt.indexOf(t)!==-1?i.withOp(t):i.withGetterSetter(t),i},e.prototype.scanNumber=function(e){X(V(this.peek));var t=this.index===e;for(this.advance();;){if(!V(this.peek))if(this.peek===oi)t=!1;else{if(!G(this.peek))break;this.advance(),W(this.peek)&&this.advance(),V(this.peek)||this.error("Invalid exponent",-1),t=!1}this.advance()}var i=this.input.substring(e,this.index),n=t?parseInt(i,10):parseFloat(i);return new Rt(e,i).withValue(n)},e.prototype.scanString=function(){X(this.peek===Zt||this.peek===Gt);var e=this.index,t=this.peek;this.advance();for(var i=void 0,n=this.index;this.peek!==t;)if(this.peek===vi){i||(i=[]),i.push(this.input.substring(n,this.index)),this.advance();var o=void 0;if(this.peek===Si){var r=this.input.substring(this.index+1,this.index+5);/[A-Z0-9]{4}/.test(r)||this.error("Invalid unicode escape [\\u"+r+"]"),o=parseInt(r,16);for(var a=0;a<5;++a)this.advance()}else o=J(this.peek),this.advance();i.push(String.fromCharCode(o)),n=this.index}else this.peek===Nt?this.error("Unterminated quote"):this.advance();var s=this.input.substring(n,this.index);this.advance();var l=this.input.substring(e,this.index),u=s;return null!==i&&void 0!==i&&(i.push(s),u=i.join("")),new Rt(e,l).withValue(u)},e.prototype.advance=function(){++this.index>=this.length?this.peek=Nt:this.peek=this.input.charCodeAt(this.index)},e.prototype.error=function(e){var t=arguments.length<=1||void 0===arguments[1]?0:arguments[1],i=this.index+t;throw new Error("Lexer Error: "+e+" at column "+i+" in expression ["+this.input+"]")},e}(),Lt=["undefined","null","true","false","+","-","*","/","%","^","=","==","===","!=","!==","<",">","<=",">=","&&","||","&","|","!","?"],Nt=0,zt=9,Yt=10,Qt=11,Ht=12,qt=13,Ut=32,Vt=33,Gt=34,Wt=36,Jt=37,Xt=38,Zt=39,Kt=40,$t=41,ei=42,ti=43,ii=44,ni=45,oi=46,ri=47,ai=58,si=59,li=60,ui=61,ci=62,di=63,fi=48,pi=57,mi=65,hi=69,gi=90,bi=91,vi=92,Ai=93,wi=94,yi=95,xi=97,ki=101,Ci=102,Fi=110,Ei=114,_i=116,Si=117,Bi=118,Di=122,Ii=123,Ti=124,Oi=125,ji=160,Ri=new Rt(-1,null),Mi=e.Parser=function(){function e(){this.cache={},this.lexer=new Mt}return e.prototype.parse=function(e){return e=e||"",this.cache[e]||(this.cache[e]=new Pi(this.lexer,e).parseChain())},e}(),Pi=e.ParserImplementation=function(){function e(e,t){this.index=0,this.input=t,this.tokens=e.lex(t)}return e.prototype.parseChain=function(){for(var e=!1,t=[];this.optional(";");)e=!0;for(;this.index"))e=new Ft(">",e,this.parseAdditive());else if(this.optional("<="))e=new Ft("<=",e,this.parseAdditive());else{if(!this.optional(">="))return e;e=new Ft(">=",e,this.parseAdditive())}},e.prototype.parseAdditive=function(){for(var e=this.parseMultiplicative();;)if(this.optional("+"))e=new Ft("+",e,this.parseMultiplicative());else{if(!this.optional("-"))return e;e=new Ft("-",e,this.parseMultiplicative())}},e.prototype.parseMultiplicative=function(){for(var e=this.parsePrefix();;)if(this.optional("*"))e=new Ft("*",e,this.parsePrefix());else if(this.optional("%"))e=new Ft("%",e,this.parsePrefix());else{if(!this.optional("/"))return e;e=new Ft("/",e,this.parsePrefix())}},e.prototype.parsePrefix=function(){return this.optional("+")?this.parsePrefix():this.optional("-")?new Ft("-",new _t(0),this.parsePrefix()):this.optional("!")?new Et("!",this.parsePrefix()):this.parseAccessOrCallMember()},e.prototype.parseAccessOrCallMember=function(){for(var e=this.parsePrimary();;)if(this.optional(".")){var t=this.peek.text;if(this.advance(),this.optional("(")){var i=this.parseExpressionList(")");this.expect(")"),e=e instanceof vt?new xt(t,i,e.ancestor):new kt(e,t,i)}else e=e instanceof vt?new At(t,e.ancestor):new wt(e,t)}else if(this.optional("[")){var n=this.parseExpression();this.expect("]"),e=new yt(e,n)}else{if(!this.optional("("))return e;var o=this.parseExpressionList(")");this.expect(")"),e=new Ct(e,o)}},e.prototype.parsePrimary=function(){if(this.optional("(")){var e=this.parseExpression();return this.expect(")"),e}if(this.optional("null"))return new _t(null);if(this.optional("undefined"))return new _t(void 0);if(this.optional("true"))return new _t(!0);if(this.optional("false"))return new _t(!1);if(this.optional("[")){var t=this.parseExpressionList("]");return this.expect("]"),new Bt(t)}if("{"===this.peek.text)return this.parseObject();if(null!==this.peek.key&&void 0!==this.peek.key)return this.parseAccessOrCallScope();if(null!==this.peek.value&&void 0!==this.peek.value){var i=this.peek.value;return this.advance(),i instanceof String||"string"==typeof i?new St(i):new _t(i)}if(this.index>=this.tokens.length)throw new Error("Unexpected end of expression: "+this.input);this.error("Unexpected token "+this.peek.text)},e.prototype.parseAccessOrCallScope=function(){var e=this.peek.key;if(this.advance(),"$this"===e)return new vt(0);for(var t=0;"$parent"===e;)if(t++,this.optional("."))e=this.peek.key,this.advance();else{if(this.peek===Ri||"("===this.peek.text||"["===this.peek.text||"}"===this.peek.text)return new vt(t);this.error("Unexpected token "+this.peek.text)}if(this.optional("(")){var i=this.parseExpressionList(")");return this.expect(")"),new xt(e,i,t)}return new At(e,t)},e.prototype.parseObject=function(){ -var e=[],t=[];if(this.expect("{"),"}"!==this.peek.text)do{var i=this.peek,n=i.value;e.push("string"==typeof n?n:i.text),this.advance(),!i.key||","!==this.peek.text&&"}"!==this.peek.text?(this.expect(":"),t.push(this.parseExpression())):(--this.index,t.push(this.parseAccessOrCallScope()))}while(this.optional(","));return this.expect("}"),new Dt(e,t)},e.prototype.parseExpressionList=function(e){var t=[];if(this.peek.text!==e)do t.push(this.parseExpression());while(this.optional(","));return t},e.prototype.optional=function(e){return this.peek.text===e&&(this.advance(),!0)},e.prototype.expect=function(e){this.peek.text===e?this.advance():this.error("Missing expected "+e)},e.prototype.advance=function(){this.index++},e.prototype.error=function(e){var t=this.index").firstElementChild.nodeName&&ln.altGlyph&&(ln.altglyph=ln.altGlyph,delete ln.altGlyph,ln.altglyphdef=ln.altGlyphDef,delete ln.altGlyphDef,ln.altglyphitem=ln.altGlyphItem,delete ln.altGlyphItem,ln.glyphref=ln.glyphRef,delete ln.glyphRef)}return e.prototype.isStandardSvgAttribute=function(e,t){return un[e]&&cn[t]||ln[e]&&ln[e].indexOf(t)!==-1},e}(),fn=e.ObserverLocator=(Be=Se=function(){function e(e,t,i,n,o){this.taskQueue=e,this.eventManager=t,this.dirtyChecker=i,this.svgAnalyzer=n,this.parser=o,this.adapters=[],this.logger=je.getLogger("observer-locator")}return e.prototype.getObserver=function(e,t){var i=e.__observers__,n=void 0;return i&&t in i?i[t]:(n=this.createPropertyObserver(e,t),n.doNotCache||(void 0===i&&(i=this.getOrCreateObserversLookup(e)),i[t]=n),n)},e.prototype.getOrCreateObserversLookup=function(e){return e.__observers__||this.createObserversLookup(e)},e.prototype.createObserversLookup=function(e){var t={};return Reflect.defineProperty(e,"__observers__",{enumerable:!1,configurable:!1,writable:!1,value:t})||this.logger.warn("Cannot add observers to object",e),t},e.prototype.addAdapter=function(e){this.adapters.push(e)},e.prototype.getAdapterObserver=function(e,t,i){for(var n=0,o=this.adapters.length;n1?t.normalize(i.moduleId,i.resourcesRelativeTo[1]).then(function(e){return n(e)}):n(o)}function m(e,t,i){function n(t){var i=t.moduleId,n=h(i);return r(i)&&(i=a(i)),e.loader.normalize(i,t.relativeTo).then(function(e){return{name:t.moduleId,importId:r(t.moduleId)?s(e,n):e}})}function r(e){var t=h(e);return!!t&&(""!==t&&(".js"!==t&&".ts"!==t))}function a(e){return e.replace(A,"")}function s(e,t){return a(e)+"."+t}var l=e.container.get(o.ViewEngine);return Promise.all(Object.keys(t).map(function(e){ -return n(t[e])})).then(function(e){var t=[],n=[];return e.forEach(function(e){t.push(void 0),n.push(e.importId)}),l.importViewResources(n,t,i)})}function h(e){var t=e.match(A);if(t&&t.length>0)return t[0].split(".")[1]}function g(e){if(e.processed)throw new Error("This config instance has already been applied. To load more plugins or global resources, create a new FrameworkConfiguration instance.")}Object.defineProperty(e,"__esModule",{value:!0}),e.LogManager=e.FrameworkConfiguration=e.Aurelia=void 0,Object.keys(t).forEach(function(i){"default"!==i&&"__esModule"!==i&&Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[i]}})}),Object.keys(i).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return i[t]}})}),Object.keys(n).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return n[t]}})}),Object.keys(o).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}})}),Object.keys(r).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return r[t]}})}),Object.keys(a).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return a[t]}})}),Object.keys(s).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return s[t]}})}),Object.keys(l).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return l[t]}})});var b=c(u),v=(e.Aurelia=function(){function e(i,n,a){this.loader=i||new l.PLATFORM.Loader,this.container=n||(new t.Container).makeGlobal(),this.resources=a||new o.ViewResources,this.use=new w(this),this.logger=b.getLogger("aurelia"),this.hostConfigured=!1,this.host=null,this.use.instance(e,this),this.use.instance(r.Loader,this.loader),this.use.instance(o.ViewResources,this.resources)}return e.prototype.start=function(){var e=this;return this.started?Promise.resolve(this):(this.started=!0,this.logger.info("Aurelia Starting"),this.use.apply().then(function(){if(d(),!e.container.hasResolver(o.BindingLanguage)){var t="You must configure Aurelia with a BindingLanguage implementation.";throw e.logger.error(t),new Error(t)}e.logger.info("Aurelia Started");var i=l.DOM.createCustomEvent("aurelia-started",{bubbles:!0,cancelable:!0});return l.DOM.dispatchEvent(i),e}))},e.prototype.enhance=function(){var e=this,t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],i=arguments.length<=1||void 0===arguments[1]?null:arguments[1];return this._configureHost(i||l.DOM.querySelectorAll("body")[0]),new Promise(function(i){var n=e.container.get(o.TemplatingEngine);e.root=n.enhance({container:e.container,element:e.host,resources:e.resources,bindingContext:t}),e.root.attached(),e._onAureliaComposed(),i(e)})},e.prototype.setRoot=function(){var e=this,t=arguments.length<=0||void 0===arguments[0]?null:arguments[0],i=arguments.length<=1||void 0===arguments[1]?null:arguments[1],n={};this.root&&this.root.viewModel&&this.root.viewModel.router&&(this.root.viewModel.router.deactivate(),this.root.viewModel.router.reset()),this._configureHost(i);var r=this.container.get(o.TemplatingEngine),a=this.container.get(o.CompositionTransaction);return delete a.initialComposition,t||(t=this.configModuleId?(0,s.relativeToFile)("./app",this.configModuleId):"app"),n.viewModel=t,n.container=n.childContainer=this.container,n.viewSlot=this.hostSlot,n.host=this.host,r.compose(n).then(function(t){return e.root=t,n.viewSlot.attached(),e._onAureliaComposed(),e})},e.prototype._configureHost=function(e){if(!this.hostConfigured){if(e=e||this.host,e&&"string"!=typeof e?this.host=e:this.host=l.DOM.getElementById(e||"applicationHost"),!this.host)throw new Error("No applicationHost was specified.");this.hostConfigured=!0,this.host.aurelia=this,this.hostSlot=new o.ViewSlot(this.host,!0),this.hostSlot.transformChildNodesIntoView(),this.container.registerInstance(l.DOM.boundary,this.host)}},e.prototype._onAureliaComposed=function(){var e=l.DOM.createCustomEvent("aurelia-composed",{bubbles:!0,cancelable:!0});setTimeout(function(){return l.DOM.dispatchEvent(e)},1)},e}(),b.getLogger("aurelia")),A=/\.[^\/.]+$/,w=function(){function e(e){var t=this;this.aurelia=e,this.container=e.container,this.info=[],this.processed=!1,this.preTasks=[],this.postTasks=[],this.resourcesToLoad={},this.preTask(function(){return e.loader.normalize("aurelia-bootstrapper").then(function(e){return t.bootstrapperName=e})}),this.postTask(function(){return m(e,t.resourcesToLoad,e.resources)})}return e.prototype.instance=function(e,t){return this.container.registerInstance(e,t),this},e.prototype.singleton=function(e,t){return this.container.registerSingleton(e,t),this},e.prototype.transient=function(e,t){return this.container.registerTransient(e,t),this},e.prototype.preTask=function(e){return g(this),this.preTasks.push(e),this},e.prototype.postTask=function(e){return g(this),this.postTasks.push(e),this},e.prototype.feature=function(e,t){return h(e)?this.plugin({moduleId:e,resourcesRelativeTo:[e,""],config:t||{}}):this.plugin({moduleId:e+"/index",resourcesRelativeTo:[e,""],config:t||{}})},e.prototype.globalResources=function(e){g(this);for(var t=Array.isArray(e)?e:arguments,i=void 0,n=this.resourcesRelativeTo||["",""],o=0,r=t.length;o4?o-4:0),a=4;a element in "+i+' has no "from" attribute.');s[l]=new o((0,t.relativeToFile)(a,i),r.getAttribute("as")),r.parentNode&&r.parentNode.removeChild(r)}}},{key:"factory",get:function(){return this._factory},set:function(e){this._factory=e,this.factoryIsReady=!0}}]),e}();e.Loader=function(){function e(){this.templateRegistry={}}return e.prototype.map=function(e,t){throw new Error("Loaders must implement map(id, source).")},e.prototype.normalizeSync=function(e,t){throw new Error("Loaders must implement normalizeSync(moduleId, relativeTo).")},e.prototype.normalize=function(e,t){throw new Error("Loaders must implement normalize(moduleId: string, relativeTo: string): Promise.")},e.prototype.loadModule=function(e){throw new Error("Loaders must implement loadModule(id).")},e.prototype.loadAllModules=function(e){throw new Error("Loader must implement loadAllModules(ids).")},e.prototype.loadTemplate=function(e){throw new Error("Loader must implement loadTemplate(url).")},e.prototype.loadText=function(e){throw new Error("Loader must implement loadText(url).")},e.prototype.applyPluginToUrl=function(e,t){throw new Error("Loader must implement applyPluginToUrl(url, pluginName).")},e.prototype.addPlugin=function(e,t){throw new Error("Loader must implement addPlugin(pluginName, implementation).")},e.prototype.getOrCreateTemplateRegistryEntry=function(e){return this.templateRegistry[e]||(this.templateRegistry[e]=new r(e))},e}()}),define("aurelia-loader-default",["exports","aurelia-loader","aurelia-pal","aurelia-metadata"],function(e,t,i,n){"use strict";function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t){var i=e,o=void 0,r=void 0;i.__useDefault&&(i=i.default),n.Origin.set(i,new n.Origin(t,"default"));for(o in i)r=i[o],"function"==typeof r&&n.Origin.set(r,new n.Origin(t,o));return e}Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultLoader=e.TextTemplateLoader=void 0;var s=e.TextTemplateLoader=function(){function e(){}return e.prototype.loadTemplate=function(e,t){return e.loadText(t.address).then(function(e){t.template=i.DOM.createTemplateFromMarkup(e)})},e}(),l=e.DefaultLoader=function(e){function t(){var t=o(this,e.call(this));t.textPluginName="text",t.moduleRegistry=Object.create(null),t.useTemplateLoader(new s);var i=t;return t.addPlugin("template-registry-entry",{fetch:function(e){var t=i.getOrCreateTemplateRegistryEntry(e);return t.templateIsLoaded?t:i.templateLoader.loadTemplate(i,t).then(function(e){return t})}}),t}return r(t,e),t.prototype.useTemplateLoader=function(e){this.templateLoader=e},t.prototype.loadAllModules=function(e){for(var t=[],i=0,n=e.length;i1?i-1:0),o=1;o1?i-1:0),o=1;o1?i-1:0),o=1;o1?i-1:0),o=1;o0;)r=n[o],t.setAttribute(r.name,r.value),e.removeAttribute(r.name);return e.parentNode.removeChild(e),i(t)}function i(e){for(var t=e.content=document.createDocumentFragment(),i=void 0;i=e.firstChild;)t.appendChild(i);return e}function n(n){for(var o=i(n).content,r=o.querySelectorAll("template"),a=0,s=r.length;a element e.g. ");return d.ensureHTMLTemplateElement(i)},appendNode:function(e,t){(t||document.body).appendChild(e)},replaceNode:function(e,t,i){t.parentNode?t.parentNode.replaceChild(e,t):null!==f?f.unwrap(i).replaceChild(f.unwrap(e),f.unwrap(t)):i.replaceChild(e,t)},removeNode:function(e,t){e.parentNode?e.parentNode.removeChild(e):t&&(null!==f?f.unwrap(t).removeChild(f.unwrap(e)):t.removeChild(e))},injectStyles:function(e,t,i){var n=document.createElement("style");return n.innerHTML=e,n.type="text/css",t=t||document.head,i&&t.childNodes.length>0?t.insertBefore(n,t.childNodes[0]):t.appendChild(n),n}},m=!1}),define("aurelia-path",["exports"],function(e){"use strict";function t(e){for(var t=0;t0&&(e.splice(t-1,2),t-=2)}}}function i(e,i){var n=i&&i.split("/"),o=e.trim().split("/");if("."===o[0].charAt(0)&&n){var r=n.slice(0,n.length-1);o.unshift.apply(o,r)}return t(o),o.join("/")}function n(e,t){if(!e)return t;if(!t)return e;var i=e.match(/^([^\/]*?:)\//),n=i&&i.length>0?i[1]:"";e=e.substr(n.length);var o=void 0;o=0===e.indexOf("///")&&"file:"===n?"///":0===e.indexOf("//")?"//":0===e.indexOf("/")?"/":"";for(var r="/"===t.slice(-1)?"/":"",a=e.split("/"),s=t.split("/"),l=[],u=0,c=a.length;u=2){var f=r[1]?decodeURIComponent(r[1]):"";d?s(t,c,f):t[l]=a(t[l],f,u)}else t[l]=!0}}return t}Object.defineProperty(e,"__esModule",{value:!0}),e.relativeToFile=i,e.join=n,e.buildQueryString=r,e.parseQueryString=l;var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},c=encodeURIComponent,d=function(e){return c(e).replace("%24","$")}}),define("aurelia-polyfills",["aurelia-pal"],function(e){"use strict";var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};!function(t,i){if(!(i in t)){var n,o=e.PLATFORM.global,r=0,a=""+Math.random(),s="__symbol:",l=s.length,u="__symbol@@"+a,c="defineProperty",d="defineProperties",f="getOwnPropertyNames",p="getOwnPropertyDescriptor",m="propertyIsEnumerable",h=t[f],g=t[p],b=t.create,v=t.keys,A=t[c],w=t[d],y=g(t,f),x=t.prototype,k=x.hasOwnProperty,C=x[m],F=x.toString,E=(Array.prototype.indexOf||function(e){for(var t=this.length;t--&&this[t]!==e;);return t},function(e,t,i){k.call(e,u)||A(e,u,{enumerable:!1,configurable:!1,writable:!1,value:{}}),e[u]["@@"+t]=i}),_=function(e,t){var i=b(e);return h(t).forEach(function(e){T.call(t,e)&&L(i,e,t[e])}),i},S=function(e){var t=b(e);return t.enumerable=!1,t},B=function(){},D=function(e){return e!=u&&!k.call(R,e)},I=function(e){return e!=u&&k.call(R,e)},T=function(e){var t=""+e;return I(t)?k.call(this,t)&&this[u]["@@"+t]:C.call(this,e)},O=function(e){var i={enumerable:!1,configurable:!0,get:B,set:function(t){n(this,e,{enumerable:!1,configurable:!0,writable:!0,value:t}),E(this,e,!0)}};return A(x,e,i),R[e]=A(t(e),"constructor",M)},j=function(e){if(this&&this!==o)throw new TypeError("Symbol is not a constructor");return O(s.concat(e||"",a,++r))},R=b(null),M={value:j},P=function(e){return R[e]},L=function(e,t,i){var o=""+t;return I(o)?(n(e,o,i.enumerable?S(i):i),E(e,o,!!i.enumerable)):A(e,t,i),e},N=function(e){var i=F.call(e);return e="[object String]"===i?e.split(""):t(e),h(e).filter(I).map(P)};y.value=L,A(t,c,y),y.value=N,A(t,i,y),y.value=function(e){return h(e).filter(D)},A(t,f,y),y.value=function(e,t){var i=N(t);return i.length?v(t).concat(i).forEach(function(i){T.call(t,i)&&L(e,i,t[i])}):w(e,t),e},A(t,d,y),y.value=T,A(x,m,y),y.value=j,A(o,"Symbol",y),y.value=function(e){var t=s.concat(s,e,a);return t in x?R[t]:O(t)},A(j,"for",y),y.value=function(e){return k.call(R,e)?e.slice(2*l,-a.length):void 0},A(j,"keyFor",y),y.value=function(e,t){var i=g(e,t);return i&&I(t)&&(i.enumerable=T.call(e,t)),i},A(t,p,y),y.value=function(e,t){return 1===arguments.length?b(e):_(e,t)},A(t,"create",y),y.value=function(){var e=F.call(this);return"[object String]"===e&&I(this)?"[object Symbol]":e},A(x,"toString",y);try{n=b(A({},s,{get:function(){return A(this,s,{value:!1})[s]}}))[s]||A}catch(e){n=function(e,t,i){var n=g(x,t);delete x[t],A(e,t,i),A(x,t,n)}}}}(Object,"getOwnPropertySymbols"),function(e,t){var i,n=e.defineProperty,o=e.prototype,r=o.toString,a="toStringTag";["iterator","match","replace","search","split","hasInstance","isConcatSpreadable","unscopables","species","toPrimitive",a].forEach(function(t){if(!(t in Symbol))switch(n(Symbol,t,{value:Symbol(t)}),t){case a:i=e.getOwnPropertyDescriptor(o,"toString"),i.value=function(){var e=r.call(this),t="undefined"==typeof this||null===this?void 0:this[Symbol.toStringTag];return"undefined"==typeof t?e:"[object "+t+"]"},n(o,"toString",i)}})}(Object,Symbol),function(e,t,i){function n(){return this}t[e]||(t[e]=function(){var t=0,i=this,o={next:function(){var e=i.length<=t;return e?{done:e}:{done:e,value:i[t++]}}};return o[e]=n,o}),i[e]||(i[e]=function(){var t=String.fromCodePoint,i=this,o=0,r=i.length,a={next:function(){var e=r<=o,n=e?"":t(i.codePointAt(o));return o+=n.length,e?{done:e}:{done:e,value:n}}};return a[e]=n,a})}(Symbol.iterator,Array.prototype,String.prototype),Number.isNaN=Number.isNaN||function(e){return e!==e},Number.isFinite=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},String.prototype.endsWith&&!function(){try{return!"ab".endsWith("a",1)}catch(e){return!0}}()||(String.prototype.endsWith=function(e,t){var i=this.toString();("number"!=typeof t||!isFinite(t)||Math.floor(t)!==t||t>i.length)&&(t=i.length),t-=e.length;var n=i.indexOf(e,t);return n!==-1&&n===t}),String.prototype.startsWith&&!function(){try{return!"ab".startsWith("b",1)}catch(e){return!0}}()||(String.prototype.startsWith=function(e,t){return t=t||0,this.substr(t,e.length)===e}),Array.from||(Array.from=function(){var e=function(e){return isNaN(e=+e)?0:(e>0?Math.floor:Math.ceil)(e)},t=function(t){return t>0?Math.min(e(t),9007199254740991):0},i=function(e,t,i,n){try{return t(i,n)}catch(t){throw"function"==typeof e.return&&e.return(),t}};return function(e){var n,o,r,a,s=Object(e),l="function"==typeof this?this:Array,u=arguments.length,c=u>1?arguments[1]:void 0,d=void 0!==c,f=0,p=s[Symbol.iterator];if(d&&(c=c.bind(u>2?arguments[2]:void 0)),void 0==p||Array.isArray(e))for(n=t(s.length),o=new l(n);n>f;f++)o[f]=d?c(s[f],f):s[f];else for(a=p.call(s),o=new l;!(r=a.next()).done;f++)o[f]=d?i(a,c,r.value,f):r.value;return o.length=f,o}}()),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{configurable:!0,writable:!0,enumerable:!1,value:function e(t){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var e,i=Object(this),n=i.length>>>0,o=arguments[1],r=0;r>>0,o=arguments[1],r=0;r=0?n=o:(n=i+o,n<0&&(n=0));for(var r;n=t.length)break;o=t[n++]}else{if(n=t.next(),n.done)break;o=n.value}var r=o,a=r.charSpec.validChars===e.validChars&&r.charSpec.invalidChars===e.invalidChars;if(a)return r}},e.prototype.put=function(t){var i=this.get(t);return i?i:(i=new e(t),this.nextStates.push(i),t.repeat&&i.nextStates.push(i),i)},e.prototype.match=function(e){for(var t=this.nextStates,i=[],n=0,o=t.length;n1&&"/"===l.charAt(d-1)&&(l=l.substr(0,d-1),s=!0);for(var f=0,p=l.length;fe.maxInstructionCount)throw new Error("Maximum navigation attempts exceeded. Giving up.")}else e.events.publish("router:navigation:processing",{instruction:i});var n=e.pipelineProvider.createPipeline();return n.run(i).then(function(n){return I(i,n,t,e)}).catch(function(e){return{output:e instanceof Error?e:new Error(e)}}).then(function(n){return T(i,n,!!t,e)})}}})},t.prototype._findViewModel=function(e){if(this.container.viewModel)return this.container.viewModel;if(e.container)for(var t=e.container;t;){if(t.viewModel)return this.container.viewModel=t.viewModel,t.viewModel;t=t.parent}},t}(W)}),define("aurelia-task-queue",["exports","aurelia-pal"],function(e,t){"use strict";function i(e){var i=1,n=t.DOM.createMutationObserver(e),o=t.DOM.createTextNode("");return n.observe(o,{characterData:!0}),function(){i=-i,o.data=i}}function n(e){return function(){function t(){clearTimeout(i),clearInterval(n),e()}var i=setTimeout(t,0),n=setInterval(t,50)}}function o(e,t){"onError"in t?t.onError(e):r?setImmediate(function(){throw e}):setTimeout(function(){throw e},0)}Object.defineProperty(e,"__esModule",{value:!0}),e.TaskQueue=void 0;var r="function"==typeof setImmediate;e.TaskQueue=function(){function e(){var e=this;this.microTaskQueue=[],this.microTaskQueueCapacity=1024,this.taskQueue=[],t.FEATURE.mutationObserver?this.requestFlushMicroTaskQueue=i(function(){return e.flushMicroTaskQueue()}):this.requestFlushMicroTaskQueue=n(function(){return e.flushMicroTaskQueue()}),this.requestFlushTaskQueue=n(function(){return e.flushTaskQueue()})}return e.prototype.queueMicroTask=function(e){this.microTaskQueue.length<1&&this.requestFlushMicroTaskQueue(),this.microTaskQueue.push(e)},e.prototype.queueTask=function(e){this.taskQueue.length<1&&this.requestFlushTaskQueue(),this.taskQueue.push(e)},e.prototype.flushTaskQueue=function(){var e=this.taskQueue,t=0,i=void 0;this.taskQueue=[];try{for(;tt){for(var r=0,a=e.length-i;r-1&&i.splice(t,1)),e},e.prototype.publish=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=arguments.length<=2||void 0===arguments[2]||arguments[2],o=arguments.length<=3||void 0===arguments[3]||arguments[3],r=n.DOM.createCustomEvent(e,{cancelable:o,bubbles:i,detail:t});this.element.dispatchEvent(r)},e.prototype.subscribe=function(e,t){var i=this,n=arguments.length<=2||void 0===arguments[2]||arguments[2];if(t&&"function"==typeof t)return t.eventName=e,t.handler=t,t.bubbles=n,t.dispose=function(){i.element.removeEventListener(e,t,n),i._dequeueHandler(t)},this.element.addEventListener(e,t,n),this._enqueueHandler(t),t},e.prototype.subscribeOnce=function(e,t){var i=this,n=arguments.length<=2||void 0===arguments[2]||arguments[2];if(t&&"function"==typeof t){var o=function(){var o=function e(i){t(i),e.dispose()};return{v:i.subscribe(e,o,n)}}();if("object"===("undefined"==typeof o?"undefined":Le(o)))return o.v}},e.prototype.dispose=function(e){if(e&&"string"==typeof e){var t=this.subscriptions[e];if(t)for(;t.length;){var i=t.pop();i&&i.dispose()}}else this.disposeAll()},e.prototype.disposeAll=function(){for(var e in this.subscriptions)this.dispose(e)},e}(),Ve=e.ResourceLoadContext=function(){function e(){this.dependencies={}}return e.prototype.addDependency=function(e){this.dependencies[e]=!0},e.prototype.hasDependency=function(e){return e in this.dependencies},e}(),Ge=e.ViewCompileInstruction=function(){var e=!(arguments.length<=0||void 0===arguments[0])&&arguments[0],t=!(arguments.length<=1||void 0===arguments[1])&&arguments[1];this.targetShadowDOM=e,this.compileSurrogate=t,this.associatedModuleId=null};Ge.normal=new Ge;var We=e.BehaviorInstruction=function(){function e(){this.initiatedByBehavior=!1,this.enhance=!1,this.partReplacements=null,this.viewFactory=null,this.originalAttrName=null,this.skipContentProcessing=!1,this.contentFactory=null,this.viewModel=null,this.anchorIsContainer=!1,this.host=null,this.attributes=null,this.type=null,this.attrName=null,this.inheritBindingContext=!1}return e.enhance=function(){var t=new e;return t.enhance=!0,t},e.unitTest=function(t,i){var n=new e;return n.type=t,n.attributes=i||{},n},e.element=function(t,i){var n=new e;return n.type=i,n.attributes={},n.anchorIsContainer=!(t.hasAttribute("containerless")||i.containerless),n.initiatedByBehavior=!0,n},e.attribute=function(t,i){var n=new e;return n.attrName=t,n.type=i||null,n.attributes={},n},e.dynamic=function(t,i,n){var o=new e;return o.host=t,o.viewModel=i,o.viewFactory=n,o.inheritBindingContext=!0,o},e}();We.normal=new We;var Je=e.TargetInstruction=(ae=re=function(){function e(){this.injectorId=null,this.parentInjectorId=null,this.shadowSlot=!1,this.slotName=null,this.slotFallbackFactory=null,this.contentExpression=null,this.expressions=null,this.behaviorInstructions=null,this.providers=null,this.viewFactory=null,this.anchorIsContainer=!1,this.elementInstruction=null,this.lifting=!1,this.values=null}return e.shadowSlot=function(t){var i=new e;return i.parentInjectorId=t,i.shadowSlot=!0,i},e.contentExpression=function(t){var i=new e;return i.contentExpression=t,i},e.lifting=function(t,i){var n=new e;return n.parentInjectorId=t,n.expressions=e.noExpressions,n.behaviorInstructions=[i],n.viewFactory=i.viewFactory,n.providers=[i.type.target],n.lifting=!0,n},e.normal=function(t,i,n,o,r,a){var s=new e;return s.injectorId=t,s.parentInjectorId=i,s.providers=n,s.behaviorInstructions=o,s.expressions=r,s.anchorIsContainer=!a||a.anchorIsContainer,s.elementInstruction=a,s},e.surrogate=function(t,i,n,o){var r=new e;return r.expressions=n,r.behaviorInstructions=i,r.providers=t,r.values=o,r},e}(),re.noExpressions=Object.freeze([]),ae),Xe=e.viewStrategy=i.protocol.create("aurelia:view-strategy",{validate:function(e){return"function"==typeof e.loadViewFactory||"View strategies must implement: loadViewFactory(viewEngine: ViewEngine, compileInstruction: ViewCompileInstruction, loadContext?: ResourceLoadContext): Promise"},compose:function(e){"function"!=typeof e.makeRelativeTo&&(e.makeRelativeTo=n.PLATFORM.noop)}}),Ze=e.RelativeViewStrategy=(se=Xe(),se(le=function(){function e(e){this.path=e,this.absolutePath=null}return e.prototype.loadViewFactory=function(e,t,i,n){return null===this.absolutePath&&this.moduleId&&(this.absolutePath=(0,o.relativeToFile)(this.path,this.moduleId)),t.associatedModuleId=this.moduleId,e.loadViewFactory(this.absolutePath||this.path,t,i,n)},e.prototype.makeRelativeTo=function(e){null===this.absolutePath&&(this.absolutePath=(0,o.relativeToFile)(this.path,e))},e}())||le),Ke=e.ConventionalViewStrategy=(ue=Xe(),ue(ce=function(){function e(e,t){this.moduleId=t.moduleId,this.viewUrl=e.convertOriginToViewUrl(t)}return e.prototype.loadViewFactory=function(e,t,i,n){return t.associatedModuleId=this.moduleId,e.loadViewFactory(this.viewUrl,t,i,n)},e}())||ce),$e=e.NoViewStrategy=(de=Xe(),de(fe=function(){function e(e,t){this.dependencies=e||null,this.dependencyBaseUrl=t||""}return e.prototype.loadViewFactory=function(e,t,i,n){var o=this.entry,a=this.dependencies;if(o&&o.factoryIsReady)return Promise.resolve(null);if(this.entry=o=new r.TemplateRegistryEntry(this.moduleId||this.dependencyBaseUrl),o.dependencies=[],o.templateIsLoaded=!0,null!==a)for(var s=0,l=a.length;s=n&&s!==e))return r.splice(l,0,t),c}return o.auProjectionChildren.push(t),o}}return this.anchor},e.prototype.projectTo=function(e){this.destinationSlots=e},e.prototype.projectFrom=function(e,t){var i=n.DOM.createComment("anchor"),o=this.anchor.parentNode;i.auSlotProjectFrom=t,i.auOwnerView=e,i.auProjectionChildren=[],o.insertBefore(i,this.anchor),this.children.push(i),null===this.projectFromAnchors&&(this.projectFromAnchors=[]),this.projectFromAnchors.push(i)},e.prototype.renderFallbackContent=function(e,t,i,n){if(null===this.contentView&&(this.contentView=this.fallbackFactory.create(this.ownerView.container),this.contentView.bind(this.ownerView.bindingContext,this.ownerView.overrideContext),this.contentView.insertNodesBefore(this.anchor)),this.contentView.hasSlots){var o=this.contentView.slots,r=this.projectFromAnchors;if(null!==r)for(var a in o)for(var s=o[a],l=0,u=r.length;l=n?this.add(t):(t.insertNodesBefore(i[e].firstChild),i.splice(e,0,t),this.isAttached?(t.attached(),this.animateView(t,"enter")):void 0)},e.prototype.move=function(e,t){if(e!==t){var i=this.children,n=i[e];n.removeNodes(),n.insertNodesBefore(i[t].firstChild),i.splice(e,1),i.splice(t,0,n)}},e.prototype.remove=function(e,t,i){return this.removeAt(this.children.indexOf(e),t,i)},e.prototype.removeMany=function(e,t,i){var n=this,o=this.children,r=e.length,a=void 0,s=[];e.forEach(function(e){if(i)return void e.removeNodes();var t=n.animateView(e,"leave");t?s.push(t.then(function(){return e.removeNodes()})):e.removeNodes()});var l=function(){if(n.isAttached)for(a=0;a=0&&o.splice(i,1)}};return s.length>0?Promise.all(s).then(function(){return l()}):l()},e.prototype.removeAt=function(e,t,i){var n=this,o=this.children[e],r=function(){return e=n.children.indexOf(o),o.removeNodes(),n.children.splice(e,1),n.isAttached&&o.detached(),t&&o.returnToCache(),o};if(!i){var a=this.animateView(o,"leave");if(a)return a.then(function(){return r()})}return r()},e.prototype.removeAll=function(e,t){var i=this,n=this.children,o=n.length,r=void 0,a=[];n.forEach(function(e){if(t)return void e.removeNodes();var n=i.animateView(e,"leave");n?a.push(n.then(function(){return e.removeNodes()})):e.removeNodes()});var s=function(){if(i.isAttached)for(r=0;r0?Promise.all(a).then(function(){return s()}):s()},e.prototype.attached=function(){var e=void 0,t=void 0,i=void 0,n=void 0;if(!this.isAttached)for(this.isAttached=!0,i=this.children,e=0,t=i.length;e=this.children.length?this.add(t):(lt.distributeView(t,this.projectToSlots,this,e),this.children.splice(e,0,t),this.isAttached&&t.attached())},e.prototype._projectionMove=function(e,t){if(e!==t){var i=this.children,n=i[e];lt.undistributeView(n,this.projectToSlots,this),lt.distributeView(n,this.projectToSlots,this,t),i.splice(e,1),i.splice(t,0,n)}},e.prototype._projectionRemove=function(e,t){lt.undistributeView(e,this.projectToSlots,this),this.children.splice(this.children.indexOf(e),1),this.isAttached&&e.detached()},e.prototype._projectionRemoveAt=function(e,t){var i=this.children[e];lt.undistributeView(i,this.projectToSlots,this),this.children.splice(e,1),this.isAttached&&i.detached()},e.prototype._projectionRemoveMany=function(e,t){var i=this;e.forEach(function(e){return i.remove(e,t)})},e.prototype._projectionRemoveAll=function(e){lt.undistributeAll(this.projectToSlots,this);var t=this.children;if(this.isAttached)for(var i=0,n=t.length;i0?this.cache=[]:this.cache=null,this.isCaching=this.cacheSize>0},e.prototype.getCachedView=function(){return null!==this.cache?this.cache.pop()||null:null},e.prototype.returnViewToCache=function(e){e.isAttached&&e.detached(),e.isBound&&e.unbind(),null!==this.cache&&this.cache.length instead.')}function l(e){e.container.registerSingleton(n.BindingLanguage,C),e.container.registerAlias(n.BindingLanguage,C)}Object.defineProperty(e,"__esModule",{value:!0}),e.TemplatingBindingLanguage=e.SyntaxInterpreter=e.ChildInterpolationBinding=e.InterpolationBinding=e.InterpolationBindingExpression=e.AttributeMap=void 0,e.configure=l;var u,c,d,f,p,m,h,g,b=o(t),v=e.AttributeMap=(c=u=function(){function e(e){this.elements=Object.create(null),this.allElements=Object.create(null),this.svg=e,this.registerUniversal("accesskey","accessKey"),this.registerUniversal("contenteditable","contentEditable"),this.registerUniversal("tabindex","tabIndex"),this.registerUniversal("textcontent","textContent"),this.registerUniversal("innerhtml","innerHTML"),this.registerUniversal("scrolltop","scrollTop"),this.registerUniversal("scrollleft","scrollLeft"),this.registerUniversal("readonly","readOnly"),this.register("label","for","htmlFor"),this.register("input","maxlength","maxLength"),this.register("input","minlength","minLength"),this.register("input","formaction","formAction"),this.register("input","formenctype","formEncType"),this.register("input","formmethod","formMethod"),this.register("input","formnovalidate","formNoValidate"),this.register("input","formtarget","formTarget"),this.register("textarea","maxlength","maxLength"),this.register("td","rowspan","rowSpan"),this.register("td","colspan","colSpan"),this.register("th","rowspan","rowSpan"),this.register("th","colspan","colSpan")}return e.prototype.register=function(e,t,i){e=e.toLowerCase(),t=t.toLowerCase();var n=this.elements[e]=this.elements[e]||Object.create(null);n[t]=i},e.prototype.registerUniversal=function(e,t){e=e.toLowerCase(),this.allElements[e]=t},e.prototype.map=function(e,t){if(this.svg.isStandardSvgAttribute(e,t))return t;e=e.toLowerCase(),t=t.toLowerCase();var n=this.elements[e];return void 0!==n&&t in n?n[t]:t in this.allElements?this.allElements[t]:/(^data-)|(^aria-)|:/.test(t)?t:(0,i.camelCase)(t)},e}(),u.inject=[i.SVGAnalyzer],c),A=e.InterpolationBindingExpression=function(){function e(e,t,i,n,o,r){this.observerLocator=e,this.targetProperty=t,this.parts=i,this.mode=n,this.lookupFunctions=o,this.attribute=this.attrToRemove=r,this.discrete=!1}return e.prototype.createBinding=function(e){return 3===this.parts.length?new y(e,this.observerLocator,this.parts[1],this.mode,this.lookupFunctions,this.targetProperty,this.parts[0],this.parts[2]):new w(this.observerLocator,this.parts,e,this.targetProperty,this.mode,this.lookupFunctions)},e}(),w=e.InterpolationBinding=function(){function e(e,t,i,n,o,r){s(i,n),this.observerLocator=e,this.parts=t,this.target=i,this.targetProperty=n,this.targetAccessor=e.getAccessor(i,n),this.mode=o,this.lookupFunctions=r}return e.prototype.interpolate=function(){if(this.isBound){for(var e="",t=this.parts,i=0,n=t.length;i=i.bindingMode.oneTime?n.attributes[t].defaultBindingMode:i.bindingMode.oneWay},e.prototype.bind=function(e,t,o,r,a){var s=r||n.BehaviorInstruction.attribute(o.attrName);return s.attributes[o.attrName]=new i.BindingExpression(this.observerLocator,this.attributeMap.map(t.tagName,o.attrName),this.parser.parse(o.attrValue),o.defaultBindingMode||this.determineDefaultBindingMode(t,o.attrName,a),e.lookupFunctions),s},e.prototype.trigger=function(e,t,n){return new i.ListenerExpression(this.eventManager,n.attrName,this.parser.parse(n.attrValue),!1,!0,e.lookupFunctions)},e.prototype.delegate=function(e,t,n){return new i.ListenerExpression(this.eventManager,n.attrName,this.parser.parse(n.attrValue),!0,!0,e.lookupFunctions)},e.prototype.call=function(e,t,o,r){var a=r||n.BehaviorInstruction.attribute(o.attrName);return a.attributes[o.attrName]=new i.CallExpression(this.observerLocator,o.attrName,this.parser.parse(o.attrValue),e.lookupFunctions),a},e.prototype.options=function(e,t,i,o,r){var a=o||n.BehaviorInstruction.attribute(i.attrName),s=i.attrValue,l=this.language,u=null,c="",d=void 0,f=void 0,p=void 0,m=!1,h=!1;for(f=0,p=s.length;f=0&&i0&&i").addClass(t.dropdownClassName).attr("id","textcomplete-dropdown-"+t._oid).css({display:"none",left:0,position:"absolute",zIndex:t.zIndex}).appendTo(i);return n}}),e.extend(t.prototype,{$el:null,$inputEl:null,completer:null,footer:null,header:null,id:null,maxCount:null,placement:"",shown:!1,data:[],className:"",destroy:function(){this.deactivate(),this.$el.off("."+this.id),this.$inputEl.off("."+this.id),this.clear(),this.$el.remove(),this.$el=this.$inputEl=this.completer=null,delete o[this.id]},render:function(t){var i=this._buildContents(t),n=e.map(t,function(e){return e.value});if(t.length){var o=t[0].strategy;o.id?this.$el.attr("data-strategy",o.id):this.$el.removeAttr("data-strategy"),this._renderHeader(n),this._renderFooter(n),i&&(this._renderContents(i),this._fitToBottom(),this._fitToRight(),this._activateIndexedItem()),this._setScroll()}else this.noResultsMessage?this._renderNoResultsMessage(n):this.shown&&this.deactivate()},setPosition:function(t){var n="absolute";return this.$inputEl.add(this.$inputEl.parents()).each(function(){return"absolute"!==e(this).css("position")&&("fixed"===e(this).css("position")?(t.top-=i.scrollTop(),t.left-=i.scrollLeft(),n="fixed",!1):void 0)}),this.$el.css(this._applyPlacement(t)),this.$el.css({position:n}),this},clear:function(){this.$el.html(""),this.data=[],this._index=0,this._$header=this._$footer=this._$noResultsMessage=null},activate:function(){return this.shown||(this.clear(),this.$el.show(),this.className&&this.$el.addClass(this.className),this.completer.fire("textComplete:show"),this.shown=!0),this},deactivate:function(){return this.shown&&(this.$el.hide(),this.className&&this.$el.removeClass(this.className),this.completer.fire("textComplete:hide"),this.shown=!1),this},isUp:function(e){return 38===e.keyCode||e.ctrlKey&&80===e.keyCode},isDown:function(e){return 40===e.keyCode||e.ctrlKey&&78===e.keyCode},isEnter:function(e){var t=e.ctrlKey||e.altKey||e.metaKey||e.shiftKey;return!t&&(13===e.keyCode||9===e.keyCode||this.option.completeOnSpace===!0&&32===e.keyCode)},isPageup:function(e){return 33===e.keyCode},isPagedown:function(e){return 34===e.keyCode},isEscape:function(e){return 27===e.keyCode},_data:null,_index:null,_$header:null,_$noResultsMessage:null,_$footer:null,_bindEvents:function(){this.$el.on("mousedown."+this.id,".textcomplete-item",e.proxy(this._onClick,this)),this.$el.on("touchstart."+this.id,".textcomplete-item",e.proxy(this._onClick,this)),this.$el.on("mouseover."+this.id,".textcomplete-item",e.proxy(this._onMouseover,this)),this.$inputEl.on("keydown."+this.id,e.proxy(this._onKeydown,this))},_onClick:function(t){var i=e(t.target);t.preventDefault(),t.originalEvent.keepTextCompleteDropdown=this.id,i.hasClass("textcomplete-item")||(i=i.closest(".textcomplete-item"));var n=this.data[parseInt(i.data("index"),10)];this.completer.select(n.value,n.strategy,t);var o=this;setTimeout(function(){o.deactivate(),"touchstart"===t.type&&o.$inputEl.focus()},0)},_onMouseover:function(t){var i=e(t.target);t.preventDefault(),i.hasClass("textcomplete-item")||(i=i.closest(".textcomplete-item")),this._index=parseInt(i.data("index"),10),this._activateIndexedItem()},_onKeydown:function(t){if(this.shown){var i;switch(e.isFunction(this.option.onKeydown)&&(i=this.option.onKeydown(t,r)),null==i&&(i=this._defaultKeydown(t)),i){case r.KEY_UP:t.preventDefault(),this._up();break;case r.KEY_DOWN:t.preventDefault(),this._down();break;case r.KEY_ENTER:t.preventDefault(),this._enter(t);break;case r.KEY_PAGEUP:t.preventDefault(),this._pageup();break;case r.KEY_PAGEDOWN:t.preventDefault(),this._pagedown();break;case r.KEY_ESCAPE:t.preventDefault(),this.deactivate()}}},_defaultKeydown:function(e){return this.isUp(e)?r.KEY_UP:this.isDown(e)?r.KEY_DOWN:this.isEnter(e)?r.KEY_ENTER:this.isPageup(e)?r.KEY_PAGEUP:this.isPagedown(e)?r.KEY_PAGEDOWN:this.isEscape(e)?r.KEY_ESCAPE:void 0},_up:function(){0===this._index?this._index=this.data.length-1:this._index-=1,this._activateIndexedItem(),this._setScroll()},_down:function(){this._index===this.data.length-1?this._index=0:this._index+=1,this._activateIndexedItem(),this._setScroll()},_enter:function(e){var t=this.data[parseInt(this._getActiveElement().data("index"),10)];this.completer.select(t.value,t.strategy,e),this.deactivate()},_pageup:function(){var t=0,i=this._getActiveElement().position().top-this.$el.innerHeight();this.$el.children().each(function(n){if(e(this).position().top+e(this).outerHeight()>i)return t=n,!1}),this._index=t,this._activateIndexedItem(),this._setScroll()},_pagedown:function(){var t=this.data.length-1,i=this._getActiveElement().position().top+this.$el.innerHeight();this.$el.children().each(function(n){if(e(this).position().top>i)return t=n,!1}),this._index=t,this._activateIndexedItem(),this._setScroll()},_activateIndexedItem:function(){this.$el.find(".textcomplete-item.active").removeClass("active"),this._getActiveElement().addClass("active")},_getActiveElement:function(){return this.$el.children(".textcomplete-item:nth("+this._index+")")},_setScroll:function(){var e=this._getActiveElement(),t=e.position().top,i=e.outerHeight(),n=this.$el.innerHeight(),o=this.$el.scrollTop();0===this._index||this._index==this.data.length-1||t<0?this.$el.scrollTop(t+o):t+i>n&&this.$el.scrollTop(t+i+o-n)},_buildContents:function(e){var t,i,o,r="";for(i=0;i',r+=t.strategy.template(t.value,t.term),r+="");return r},_renderHeader:function(t){if(this.header){this._$header||(this._$header=e('
  • ').prependTo(this.$el));var i=e.isFunction(this.header)?this.header(t):this.header;this._$header.html(i)}},_renderFooter:function(t){if(this.footer){this._$footer||(this._$footer=e('').appendTo(this.$el));var i=e.isFunction(this.footer)?this.footer(t):this.footer;this._$footer.html(i)}},_renderNoResultsMessage:function(t){if(this.noResultsMessage){this._$noResultsMessage||(this._$noResultsMessage=e('
  • ').appendTo(this.$el));var i=e.isFunction(this.noResultsMessage)?this.noResultsMessage(t):this.noResultsMessage;this._$noResultsMessage.html(i)}},_renderContents:function(e){this._$footer?this._$footer.before(e):this.$el.append(e)},_fitToBottom:function(){var e=i.scrollTop()+i.height(),t=this.$el.height();this.$el.position().top+t>e&&(this.completer.$iframe||this.$el.offset({top:e-t}))},_fitToRight:function(){for(var e,t=this.option.rightEdgeOffset,n=this.$el.offset().left,o=this.$el.width(),r=i.width()-t;n+o>r&&(this.$el.offset({left:n-t}),e=this.$el.offset().left,!(e>=n));)n=e},_applyPlacement:function(e){return this.placement.indexOf("top")!==-1?e={top:"auto",bottom:this.$el.parent().height()-e.top+e.lineHeight,left:e.left}:(e.bottom="auto",delete e.lineHeight),this.placement.indexOf("absleft")!==-1?e.left=0:this.placement.indexOf("absright")!==-1&&(e.right=0,e.left="auto"),e}}),e.fn.textcomplete.Dropdown=t,e.extend(e.fn.textcomplete,r)}(e),+function(e){"use strict";function t(t){e.extend(this,t),this.cache&&(this.search=i(this.search))}var i=function(e){var t={};return function(i,n){t[i]?n(t[i]):e.call(this,i,function(e){t[i]=(t[i]||[]).concat(e),n.apply(null,arguments)})}};t.parse=function(i,n){return e.map(i,function(e){var i=new t(e);return i.el=n.el,i.$el=n.$el,i})},e.extend(t.prototype,{match:null,replace:null,search:null,id:null,cache:!1,context:function(){return!0},index:2,template:function(e){return e},idProperty:null}),e.fn.textcomplete.Strategy=t}(e),+function(e){"use strict";function t(){}var i=Date.now||function(){return(new Date).getTime()},n=function(e,t){var n,o,r,a,s,l=function(){var u=i()-a;u"+i+"").css({position:"absolute",top:-9999,left:-9999}).insertBefore(t)}var i="吶";e.extend(t.prototype,e.fn.textcomplete.Textarea.prototype,{select:function(t,i,n){var o,r=this.getTextFromHeadToCaret(),a=this.el.value.substring(r.length),s=i.replace(t,n);if("undefined"!=typeof s){e.isArray(s)&&(a=s[1]+a,s=s[0]),o=e.isFunction(i.match)?i.match(r):i.match,r=r.replace(o,s),this.$el.val(r+a),this.el.focus();var l=this.el.createTextRange();l.collapse(!0),l.moveEnd("character",r.length),l.moveStart("character",r.length),l.select()}},getTextFromHeadToCaret:function(){this.el.focus();var e=document.selection.createRange();e.moveStart("character",-this.el.value.length);var t=e.text.split(i);return 1===t.length?t[0]:t[1]}}),e.fn.textcomplete.IETextarea=t}(e),+function(e){"use strict";function t(e,t,i){this.initialize(e,t,i)}e.extend(t.prototype,e.fn.textcomplete.Adapter.prototype,{select:function(t,i,n){var o=this.getTextFromHeadToCaret(),r=this.el.ownerDocument.getSelection(),a=r.getRangeAt(0),s=a.cloneRange();s.selectNodeContents(a.startContainer);var l,u=s.toString(),c=u.substring(a.startOffset),d=i.replace(t,n);if("undefined"!=typeof d){e.isArray(d)&&(c=d[1]+c,d=d[0]),l=e.isFunction(i.match)?i.match(o):i.match,o=o.replace(l,d).replace(/ $/," "),a.selectNodeContents(a.startContainer),a.deleteContents();var f=this.el.ownerDocument.createElement("div");f.innerHTML=o;var p=this.el.ownerDocument.createElement("div");p.innerHTML=c;for(var m,h,g=this.el.ownerDocument.createDocumentFragment();m=f.firstChild;)h=g.appendChild(m);for(;m=p.firstChild;)g.appendChild(m);a.insertNode(g),a.setStartAfter(h),a.collapse(!0),r.removeAllRanges(),r.addRange(a)}},_getCaretRelativePosition:function(){var t=this.el.ownerDocument.getSelection().getRangeAt(0).cloneRange(),i=this.el.ownerDocument.createElement("span");t.insertNode(i),t.selectNodeContents(i),t.deleteContents();var n=e(i),o=n.offset();if(o.left-=this.$el.offset().left,o.top+=n.height()-this.$el.offset().top,o.lineHeight=n.height(),this.completer.$iframe){var r=this.completer.$iframe.offset();o.top+=r.top,o.left+=r.left,o.top-=this.$el.scrollTop()}return n.remove(),o},getTextFromHeadToCaret:function(){var e=this.el.ownerDocument.getSelection().getRangeAt(0),t=e.cloneRange();return t.selectNodeContents(e.startContainer),t.toString().substring(0,e.startOffset)}}),e.fn.textcomplete.ContentEditable=t}(e),+function(e){"use strict";function t(e,t,i){this.initialize(e,t,i)}e.extend(t.prototype,e.fn.textcomplete.ContentEditable.prototype,{_bindEvents:function(){var t=this;this.option.ckeditor_instance.on("key",function(e){var i=e.data;if(t._onKeyup(i),t.completer.dropdown.shown&&t._skipSearch(i))return!1},null,null,1),this.$el.on("keyup."+this.id,e.proxy(this._onKeyup,this))}}),e.fn.textcomplete.CKEditor=t}(e),function(e){function t(e,t,r){if(!n)throw new Error("textarea-caret-position#getCaretCoordinates should only be called in a browser");var a=r&&r.debug||!1;if(a){var s=document.querySelector("#input-textarea-caret-position-mirror-div");s&&s.parentNode.removeChild(s)}var l=document.createElement("div");l.id="input-textarea-caret-position-mirror-div",document.body.appendChild(l);var u=l.style,c=window.getComputedStyle?getComputedStyle(e):e.currentStyle;u.whiteSpace="pre-wrap","INPUT"!==e.nodeName&&(u.wordWrap="break-word"),u.position="absolute",a||(u.visibility="hidden"),i.forEach(function(e){u[e]=c[e]}),o?e.scrollHeight>parseInt(c.height)&&(u.overflowY="scroll"):u.overflow="hidden",l.textContent=e.value.substring(0,t),"INPUT"===e.nodeName&&(l.textContent=l.textContent.replace(/\s/g," "));var d=document.createElement("span");d.textContent=e.value.substring(t)||".",l.appendChild(d);var f={top:d.offsetTop+parseInt(c.borderTopWidth),left:d.offsetLeft+parseInt(c.borderLeftWidth)};return a?d.style.backgroundColor="#aaa":document.body.removeChild(l),f}var i=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"],n="undefined"!=typeof window,o=n&&null!=window.mozInnerScreenX;e.fn.textcomplete.getCaretCoordinates=t}(e),e}),define("textcomplete",["textcomplete/dist/jquery.textcomplete"],function(e){return e}),define("wurl",["require","exports","module"],function(e,t,i){i.exports=function(e,t){function i(){return new RegExp(/(.*?)\.?([^\.]*?)\.?(com|net|org|biz|ws|in|me|co\.uk|co|org\.uk|ltd\.uk|plc\.uk|me\.uk|edu|mil|br\.com|cn\.com|eu\.com|hu\.com|no\.com|qc\.com|sa\.com|se\.com|se\.net|us\.com|uy\.com|ac|co\.ac|gv\.ac|or\.ac|ac\.ac|af|am|as|at|ac\.at|co\.at|gv\.at|or\.at|asn\.au|com\.au|edu\.au|org\.au|net\.au|id\.au|be|ac\.be|adm\.br|adv\.br|am\.br|arq\.br|art\.br|bio\.br|cng\.br|cnt\.br|com\.br|ecn\.br|eng\.br|esp\.br|etc\.br|eti\.br|fm\.br|fot\.br|fst\.br|g12\.br|gov\.br|ind\.br|inf\.br|jor\.br|lel\.br|med\.br|mil\.br|net\.br|nom\.br|ntr\.br|odo\.br|org\.br|ppg\.br|pro\.br|psc\.br|psi\.br|rec\.br|slg\.br|tmp\.br|tur\.br|tv\.br|vet\.br|zlg\.br|br|ab\.ca|bc\.ca|mb\.ca|nb\.ca|nf\.ca|ns\.ca|nt\.ca|on\.ca|pe\.ca|qc\.ca|sk\.ca|yk\.ca|ca|cc|ac\.cn|com\.cn|edu\.cn|gov\.cn|org\.cn|bj\.cn|sh\.cn|tj\.cn|cq\.cn|he\.cn|nm\.cn|ln\.cn|jl\.cn|hl\.cn|js\.cn|zj\.cn|ah\.cn|gd\.cn|gx\.cn|hi\.cn|sc\.cn|gz\.cn|yn\.cn|xz\.cn|sn\.cn|gs\.cn|qh\.cn|nx\.cn|xj\.cn|tw\.cn|hk\.cn|mo\.cn|cn|cx|cz|de|dk|fo|com\.ec|tm\.fr|com\.fr|asso\.fr|presse\.fr|fr|gf|gs|co\.il|net\.il|ac\.il|k12\.il|gov\.il|muni\.il|ac\.in|co\.in|org\.in|ernet\.in|gov\.in|net\.in|res\.in|is|it|ac\.jp|co\.jp|go\.jp|or\.jp|ne\.jp|ac\.kr|co\.kr|go\.kr|ne\.kr|nm\.kr|or\.kr|li|lt|lu|asso\.mc|tm\.mc|com\.mm|org\.mm|net\.mm|edu\.mm|gov\.mm|ms|nl|no|nu|pl|ro|org\.ro|store\.ro|tm\.ro|firm\.ro|www\.ro|arts\.ro|rec\.ro|info\.ro|nom\.ro|nt\.ro|se|si|com\.sg|org\.sg|net\.sg|gov\.sg|sk|st|tf|ac\.th|co\.th|go\.th|mi\.th|net\.th|or\.th|tm|to|com\.tr|edu\.tr|gov\.tr|k12\.tr|net\.tr|org\.tr|com\.tw|org\.tw|net\.tw|ac\.uk|uk\.com|uk\.net|gb\.com|gb\.net|vg|sh|kz|ch|info|ua|gov|name|pro|ie|hk|com\.hk|org\.hk|net\.hk|edu\.hk|us|tk|cd|by|ad|lv|eu\.lv|bz|es|jp|cl|ag|mobi|eu|co\.nz|org\.nz|net\.nz|maori\.nz|iwi\.nz|io|la|md|sc|sg|vc|tw|travel|my|se|tv|pt|com\.pt|edu\.pt|asia|fi|com\.ve|net\.ve|fi|org\.ve|web\.ve|info\.ve|co\.ve|tel|im|gr|ru|net\.ru|org\.ru|hr|com\.hr|ly|xyz)$/)}function n(e){return decodeURIComponent(e.replace(/\+/g," "))}function o(e,t){var i=e.charAt(0),n=t.split(i);return i===e?n:(e=parseInt(e.substring(1),10),n[e<0?n.length+e:e-1])}function r(e,t){var i=e.charAt(0),o=t.split("&"),r=[],a={},s=[],l=e.substring(1);for(var u in o)if(r=o[u].split(/=(.*)/),""!==r[0].replace(/\s/g,"")){if(r[1]=n(r[1]||""),l===r[0])return r[1];s=r[0].match(/(.*)\[([0-9]+)\]/),s?(a[s[1]]=a[s[1]]||[],a[s[1]][s[2]]=r[1]):a[r[0]]=r[1]}return i===e?a:a[l]}var a,s,l={};if("tld?"===e)return i();if(t=t||window.location.toString(),!e)return t;if(e=e.toString(),t.match(/^mailto:[^\/]/))l.protocol="mailto",l.email=t.split(/mailto\:/)[1];else{if(a=t.split(/#(.*)/),l.hash=a[1]?a[1]:void 0,l.hash&&e.match(/^#/))return r(e,l.hash);if(a=a[0].split(/\?(.*)/),l.query=a[1]?a[1]:void 0,l.query&&e.match(/^\?/))return r(e,l.query);if(a=a[0].split(/\:?\/\//),l.protocol=a[1]?a[0].toLowerCase():void 0,a=(a[1]?a[1]:a[0]).split(/(\/.*)/),l.path=a[1]?a[1]:"",l.path=l.path.replace(/^([^\/])/,"/$1").replace(/\/$/,""),e.match(/^[\-0-9]+$/)&&(e=e.replace(/^([^\/])/,"/$1")),e.match(/^\//))return o(e,l.path.substring(1));if(s=o("/-1",l.path.substring(1)),s=s.split(/\.(.*)/),s[1]&&(l.file=s[0]+"."+s[1],l.filename=s[0],l.fileext=s[1]),a=a[0].split(/\:([0-9]+)$/),l.port=a[1]?a[1]:void 0,a=a[0].split(/@/),l.auth=a[1]?a[0]:void 0,l.auth&&(s=l.auth.split(/\:(.*)/),l.user=s[0],l.pass=s[1]),l.hostname=(a[1]?a[1]:a[0]).toLowerCase(),"."===e.charAt(0))return o(e,l.hostname);i()&&(a=l.hostname.match(i()),a&&(l.tld=a[3],l.domain=a[2]?a[2]+"."+a[3]:void 0,l.sub=a[1]||void 0)),l.port=l.port||("https"===l.protocol?"443":"80"),l.protocol=l.protocol||("443"===l.port?"https":"http")}return e in l?l[e]:"{}"===e?l:void 0}}),function(e){"use strict";function t(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function i(e){return"string"!=typeof e&&(e=String(e)),e}function n(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return h.iterable&&(t[Symbol.iterator]=function(){return t}),t}function o(e){this.map={},e instanceof o?e.forEach(function(e,t){this.append(t,e)},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function r(e){return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function a(e){return new Promise(function(t,i){e.onload=function(){t(e.result)},e.onerror=function(){i(e.error)}})}function s(e){var t=new FileReader;return t.readAsArrayBuffer(e),a(t)}function l(e){var t=new FileReader;return t.readAsText(e),a(t)}function u(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,"string"==typeof e)this._bodyText=e;else if(h.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(h.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(h.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else if(e){ -if(!h.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e))throw new Error("unsupported BodyInit type")}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):h.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},h.blob?(this.blob=function(){var e=r(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this.blob().then(s)},this.text=function(){var e=r(this);if(e)return e;if(this._bodyBlob)return l(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)}):this.text=function(){var e=r(this);return e?e:Promise.resolve(this._bodyText)},h.formData&&(this.formData=function(){return this.text().then(f)}),this.json=function(){return this.text().then(JSON.parse)},this}function c(e){var t=e.toUpperCase();return g.indexOf(t)>-1?t:e}function d(e,t){t=t||{};var i=t.body;if(d.prototype.isPrototypeOf(e)){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new o(e.headers)),this.method=e.method,this.mode=e.mode,i||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=e;if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new o(t.headers)),this.method=c(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function f(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var i=e.split("="),n=i.shift().replace(/\+/g," "),o=i.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(o))}}),t}function p(e){var t=new o,i=(e.getAllResponseHeaders()||"").trim().split("\n");return i.forEach(function(e){var i=e.trim().split(":"),n=i.shift().trim(),o=i.join(":").trim();t.append(n,o)}),t}function m(e,t){t||(t={}),this.type="default",this.status=t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText,this.headers=t.headers instanceof o?t.headers:new o(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var h={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};o.prototype.append=function(e,n){e=t(e),n=i(n);var o=this.map[e];o||(o=[],this.map[e]=o),o.push(n)},o.prototype.delete=function(e){delete this.map[t(e)]},o.prototype.get=function(e){var i=this.map[t(e)];return i?i[0]:null},o.prototype.getAll=function(e){return this.map[t(e)]||[]},o.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},o.prototype.set=function(e,n){this.map[t(e)]=[i(n)]},o.prototype.forEach=function(e,t){Object.getOwnPropertyNames(this.map).forEach(function(i){this.map[i].forEach(function(n){e.call(t,n,i,this)},this)},this)},o.prototype.keys=function(){var e=[];return this.forEach(function(t,i){e.push(i)}),n(e)},o.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),n(e)},o.prototype.entries=function(){var e=[];return this.forEach(function(t,i){e.push([i,t])}),n(e)},h.iterable&&(o.prototype[Symbol.iterator]=o.prototype.entries);var g=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];d.prototype.clone=function(){return new d(this)},u.call(d.prototype),u.call(m.prototype),m.prototype.clone=function(){return new m(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new o(this.headers),url:this.url})},m.error=function(){var e=new m(null,{status:0,statusText:""});return e.type="error",e};var b=[301,302,303,307,308];m.redirect=function(e,t){if(b.indexOf(t)===-1)throw new RangeError("Invalid status code");return new m(null,{status:t,headers:{location:e}})},e.Headers=o,e.Request=d,e.Response=m,e.fetch=function(e,t){return new Promise(function(i,n){function o(){return"responseURL"in a?a.responseURL:/^X-Request-URL:/m.test(a.getAllResponseHeaders())?a.getResponseHeader("X-Request-URL"):void 0}var r;r=d.prototype.isPrototypeOf(e)&&!t?e:new d(e,t);var a=new XMLHttpRequest;a.onload=function(){var e={status:a.status,statusText:a.statusText,headers:p(a),url:o()},t="response"in a?a.response:a.responseText;i(new m(t,e))},a.onerror=function(){n(new TypeError("Network request failed"))},a.ontimeout=function(){n(new TypeError("Network request failed"))},a.open(r.method,r.url,!0),"include"===r.credentials&&(a.withCredentials=!0),"responseType"in a&&h.blob&&(a.responseType="blob"),r.headers.forEach(function(e,t){a.setRequestHeader(t,e)}),a.send("undefined"==typeof r._bodyInit?null:r._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!=typeof self?self:this),define("whatwg-fetch",[],function(){}),define("isomorphic-fetch/fetch-npm-browserify",["require","exports","module","whatwg-fetch"],function(e,t,i){e("whatwg-fetch"),i.exports=self.fetch.bind(self)}),define("isomorphic-fetch",["isomorphic-fetch/fetch-npm-browserify"],function(e){return e}),function(){function e(e,t){return e.set(t[0],t[1]),e}function t(e,t){return e.add(t),e}function i(e,t,i){switch(i.length){case 0:return e.call(t);case 1:return e.call(t,i[0]);case 2:return e.call(t,i[0],i[1]);case 3:return e.call(t,i[0],i[1],i[2])}return e.apply(t,i)}function n(e,t,i,n){for(var o=-1,r=e?e.length:0;++o-1}function u(e,t,i){for(var n=-1,o=e?e.length:0;++n-1;);return i}function j(e,t){for(var i=e.length;i--&&A(t,e[i],0)>-1;);return i}function R(e,t){for(var i=e.length,n=0;i--;)e[i]===t&&n++;return n}function M(e){return"\\"+Pi[e]}function P(e,t){return null==e?$:e[t]}function L(e){return Si.test(e)}function N(e){return Bi.test(e)}function z(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function Y(e){for(var t,i=[];!(t=e.next()).done;)i.push(t.value);return i}function Q(e){var t=-1,i=Array(e.size);return e.forEach(function(e,n){i[++t]=[n,e]}),i}function H(e,t){return function(i){return e(t(i))}}function q(e,t){for(var i=-1,n=e.length,o=0,r=[];++i-1}function ti(e,t){var i=this.__data__,n=yi(i,e);return n<0?i.push([e,t]):i[n][1]=t,this}function ii(e){var t=-1,i=e?e.length:0;for(this.clear();++t=t?e:t)),e}function Si(e,t,i,n,r,a,s){var l;if(n&&(l=a?n(e,r,a,s):n(e)),l!==$)return l;if(!Ms(e))return e;var u=Qd(e);if(u){if(l=dr(e),!t)return Fo(e,l)}else{var c=$c(e),d=c==Pe||c==Le;if(qd(e))return po(e,t);if(c==Ye||c==Te||d&&!a){if(z(e))return a?e:{};if(l=fr(d?{}:e),!t)return _o(e,ki(l,e))}else{if(!Oi[c])return a?e:{};l=pr(e,c,Si,t)}}s||(s=new di);var f=s.get(e);if(f)return f;if(s.set(e,l),!u)var p=i?er(e):vl(e);return o(p||e,function(o,r){p&&(r=o,o=e[r]),wi(l,r,Si(o,t,i,n,r,e,s))}),l}function Bi(e){var t=vl(e);return function(i){return ji(i,e,t)}}function ji(e,t,i){var n=i.length;if(null==e)return!n;for(e=Nu(e);n--;){var o=i[n],r=t[o],a=e[o];if(a===$&&!(o in e)||!r(a))return!1}return!0}function Ri(e){return Ms(e)?ac(e):{}}function Mi(e,t,i){if("function"!=typeof e)throw new Qu(ie);return id(function(){e.apply($,i)},t)}function Pi(e,t,i,n){var o=-1,r=l,a=!0,s=e.length,d=[],f=t.length;if(!s)return d;i&&(t=c(t,D(i))),n?(r=u,a=!1):t.length>=te&&(r=T,a=!1,t=new li(t));e:for(;++oo?0:o+i),n=n===$||n>o?o:el(n),n<0&&(n+=o),n=i>n?0:tl(n);i0&&i(s)?t>1?Vi(s,t-1,i,n,o):d(o,s):n||(o[o.length]=s)}return o}function Gi(e,t){return e&&Uc(e,t,vl)}function en(e,t){return e&&Vc(e,t,vl)}function an(e,t){return s(t,function(t){return Os(e[t])})}function sn(e,t){t=vr(t,e)?[t]:co(t);for(var i=0,n=t.length;null!=e&&it}function dn(e,t){return null!=e&&Ju.call(e,t)}function fn(e,t){return null!=e&&t in Nu(e)}function pn(e,t,i){return e>=yc(t,i)&&e=120&&p.length>=120)?new li(a&&p):$}p=e[0];var m=-1,h=s[0];e:for(;++m-1;)s!==e&&lc.call(s,l,1),lc.call(e,l,1);return e}function Qn(e,t){for(var i=e?t.length:0,n=i-1;i--;){var o=t[i];if(i==n||o!==r){var r=o;if(gr(o))lc.call(e,o,1);else if(vr(o,e))delete e[Dr(o)];else{var a=co(o),s=Sr(e,a);null!=s&&delete s[Dr(Kr(a))]}}}return e}function Hn(e,t){return e+mc(kc()*(t-e+1))}function qn(e,t,i,n){for(var o=-1,r=wc(pc((t-e)/(i||1)),0),a=ju(r);r--;)a[n?r:++o]=e,e+=i;return a}function Un(e,t){var i="";if(!e||t<1||t>Fe)return i;do t%2&&(i+=e),t=mc(t/2),t&&(e+=e);while(t);return i}function Vn(e,t){return t=wc(t===$?e.length-1:t,0),function(){for(var n=arguments,o=-1,r=wc(n.length-t,0),a=ju(r);++oo?0:o+t),i=i>o?o:i,i<0&&(i+=o),o=t>i?0:i-t>>>0,t>>>=0;for(var r=ju(o);++n>>1,a=e[r];null!==a&&!Ws(a)&&(i?a<=t:a=te){var d=t?null:Jc(e);if(d)return U(d);a=!1,o=T,c=new li}else c=t?[]:s;e:for(;++n=n?e:Wn(e,t,i)}function po(e,t){if(t)return e.slice();var i=new e.constructor(e.length);return e.copy(i),i}function mo(e){var t=new e.constructor(e.byteLength);return new nc(t).set(new nc(e)),t}function ho(e,t){var i=t?mo(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.byteLength)}function go(t,i,n){var o=i?n(Q(t),!0):Q(t);return f(o,e,new t.constructor)}function bo(e){var t=new e.constructor(e.source,It.exec(e));return t.lastIndex=e.lastIndex,t}function vo(e,i,n){var o=i?n(U(e),!0):U(e);return f(o,t,new e.constructor)}function Ao(e){return Yc?Nu(Yc.call(e)):{}}function wo(e,t){var i=t?mo(e.buffer):e.buffer;return new e.constructor(i,e.byteOffset,e.length)}function yo(e,t){if(e!==t){var i=e!==$,n=null===e,o=e===e,r=Ws(e),a=t!==$,s=null===t,l=t===t,u=Ws(t);if(!s&&!u&&!r&&e>t||r&&a&&l&&!s&&!u||n&&a&&l||!i&&l||!o)return 1;if(!n&&!r&&!u&&e=s)return l;var u=i[n];return l*("desc"==u?-1:1)}}return e.index-t.index}function ko(e,t,i,n){for(var o=-1,r=e.length,a=i.length,s=-1,l=t.length,u=wc(r-a,0),c=ju(l+u),d=!n;++s1?i[o-1]:$,a=o>2?i[2]:$;for(r=e.length>3&&"function"==typeof r?(o--,r):$,a&&br(i[0],i[1],a)&&(r=o<3?$:r,o=1),t=Nu(t);++n-1?o[r?t[a]:a]:$}}function Lo(e){return Vn(function(t){t=Vi(t,1);var i=t.length,n=i,o=X.prototype.thru;for(e&&t.reverse();n--;){var r=t[n];if("function"!=typeof r)throw new Qu(ie);if(o&&!a&&"wrapper"==ir(r))var a=new X([],!0)}for(n=a?n:i;++n=te)return a.plant(n).value();for(var o=0,r=i?t[o].apply(this,e):n;++o1&&v.reverse(),d&&ls))return!1;var u=r.get(e);if(u&&r.get(t))return u==t;var c=-1,d=!0,f=o&he?new li:$;for(r.set(e,t),r.set(t,e);++c1?"& ":"")+t[n],t=t.join(i>2?", ":" "),e.replace(Ft,"{\n/* [wrapped with "+t+"] */\n")}function hr(e){return Qd(e)||ks(e)||!!(uc&&e&&e[uc])}function gr(e,t){return t=null==t?Fe:t,!!t&&("number"==typeof e||Pt.test(e))&&e>-1&&e%1==0&&e=this.__values__.length,t=e?$:this.__values__[this.__index__++];return{done:e,value:t}}function Oa(){return this}function ja(e){for(var t,i=this;i instanceof J;){var n=Or(i);n.__index__=0,n.__values__=$,t?o.__wrapped__=n:t=n;var o=n;i=i.__wrapped__}return o.__wrapped__=e,t}function Ra(){var e=this.__wrapped__;if(e instanceof St){var t=e;return this.__actions__.length&&(t=new St(this)),t=t.reverse(),t.__actions__.push({func:Ba,args:[ra],thisArg:$}),new X(t,this.__chain__)}return this.thru(ra)}function Ma(){return ro(this.__wrapped__,this.__actions__)}function Pa(e,t,i){var n=Qd(e)?a:zi;return i&&br(e,t,i)&&(t=$),n(e,or(t,3))}function La(e,t){var i=Qd(e)?s:qi;return i(e,or(t,3))}function Na(e,t){return Vi(Ua(e,t),1)}function za(e,t){return Vi(Ua(e,t),Ce)}function Ya(e,t,i){return i=i===$?1:el(i),Vi(Ua(e,t),i)}function Qa(e,t){var i=Qd(e)?o:Hc;return i(e,or(t,3))}function Ha(e,t){var i=Qd(e)?r:qc;return i(e,or(t,3))}function qa(e,t,i,n){e=Cs(e)?e:Il(e),i=i&&!n?el(i):0;var o=e.length;return i<0&&(i=wc(o+i,0)),Gs(e)?i<=o&&e.indexOf(t,i)>-1:!!o&&A(e,t,i)>-1}function Ua(e,t){var i=Qd(e)?c:In;return i(e,or(t,3))}function Va(e,t,i,n){return null==e?[]:(Qd(t)||(t=null==t?[]:[t]),i=n?$:i,Qd(i)||(i=null==i?[]:[i]),Pn(e,t,i))}function Ga(e,t,i){var n=Qd(e)?f:F,o=arguments.length<3;return n(e,or(t,4),i,o,Hc)}function Wa(e,t,i){var n=Qd(e)?p:F,o=arguments.length<3;return n(e,or(t,4),i,o,qc)}function Ja(e,t){var i=Qd(e)?s:qi;return i(e,us(or(t,3)))}function Xa(e){var t=Cs(e)?e:Il(e),i=t.length;return i>0?t[Hn(0,i-1)]:$}function Za(e,t,i){var n=-1,o=Ks(e),r=o.length,a=r-1;for(t=(i?br(e,t,i):t===$)?1:_i(el(t),0,r);++n0&&(i=t.apply(this,arguments)),e<=1&&(t=$),i}}function os(e,t,i){t=i?$:t;var n=Xo(e,le,$,$,$,$,$,t);return n.placeholder=os.placeholder,n}function rs(e,t,i){t=i?$:t;var n=Xo(e,ue,$,$,$,$,$,t);return n.placeholder=rs.placeholder,n}function as(e,t,i){function n(t){var i=f,n=p;return f=p=$,v=t,h=e.apply(n,i)}function o(e){return v=e,g=id(s,t),A?n(e):h}function r(e){var i=e-b,n=e-v,o=t-i;return w?yc(o,m-n):o}function a(e){var i=e-b,n=e-v;return b===$||i>=t||i<0||w&&n>=m}function s(){var e=Id();return a(e)?l(e):void(g=id(s,r(e)))}function l(e){return g=$,y&&f?n(e):(f=p=$,h)}function u(){g!==$&&Wc(g),v=0,f=b=p=g=$}function c(){return g===$?h:l(Id())}function d(){var e=Id(),i=a(e);if(f=arguments,p=this,b=e,i){if(g===$)return o(b);if(w)return g=id(s,t),n(b)}return g===$&&(g=id(s,t)),h}var f,p,m,h,g,b,v=0,A=!1,w=!1,y=!0;if("function"!=typeof e)throw new Qu(ie);return t=il(t)||0,Ms(i)&&(A=!!i.leading,w="maxWait"in i,m=w?wc(il(i.maxWait)||0,t):m,y="trailing"in i?!!i.trailing:y),d.cancel=u,d.flush=c,d}function ss(e){return Xo(e,me)}function ls(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new Qu(ie);var i=function(){var n=arguments,o=t?t.apply(this,n):n[0],r=i.cache;if(r.has(o))return r.get(o);var a=e.apply(this,n);return i.cache=r.set(o,a),a};return i.cache=new(ls.Cache||ii),i}function us(e){if("function"!=typeof e)throw new Qu(ie);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function cs(e){return ns(2,e)}function ds(e,t){if("function"!=typeof e)throw new Qu(ie);return t=t===$?t:el(t),Vn(e,t)}function fs(e,t){if("function"!=typeof e)throw new Qu(ie);return t=t===$?0:wc(el(t),0),Vn(function(n){var o=n[t],r=fo(n,0,t);return o&&d(r,o),i(e,this,r)})}function ps(e,t,i){var n=!0,o=!0;if("function"!=typeof e)throw new Qu(ie);return Ms(i)&&(n="leading"in i?!!i.leading:n,o="trailing"in i?!!i.trailing:o),as(e,t,{leading:n,maxWait:t,trailing:o})}function ms(e){return is(e,1)}function hs(e,t){return t=null==t?lu:t,Pd(t,e)}function gs(){if(!arguments.length)return[];var e=arguments[0];return Qd(e)?e:[e]}function bs(e){return Si(e,!1,!0)}function vs(e,t){return Si(e,!1,!0,t)}function As(e){return Si(e,!0,!0)}function ws(e,t){return Si(e,!0,!0,t)}function ys(e,t){return null==t||ji(e,t,vl(t))}function xs(e,t){return e===t||e!==e&&t!==t}function ks(e){return Fs(e)&&Ju.call(e,"callee")&&(!sc.call(e,"callee")||Ku.call(e)==Te)}function Cs(e){return null!=e&&Rs(e.length)&&!Os(e)}function Fs(e){return Ps(e)&&Cs(e)}function Es(e){return e===!0||e===!1||Ps(e)&&Ku.call(e)==je}function _s(e){return!!e&&1===e.nodeType&&Ps(e)&&!Us(e)}function Ss(e){if(Cs(e)&&(Qd(e)||"string"==typeof e||"function"==typeof e.splice||qd(e)||ks(e)))return!e.length;var t=$c(e);if(t==Ne||t==qe)return!e.size;if(Oc||xr(e))return!Ac(e).length;for(var i in e)if(Ju.call(e,i))return!1;return!0}function Bs(e,t){return An(e,t)}function Ds(e,t,i){i="function"==typeof i?i:$;var n=i?i(e,t):$;return n===$?An(e,t,i):!!n}function Is(e){return!!Ps(e)&&(Ku.call(e)==Me||"string"==typeof e.message&&"string"==typeof e.name)}function Ts(e){return"number"==typeof e&&bc(e)}function Os(e){var t=Ms(e)?Ku.call(e):"";return t==Pe||t==Le}function js(e){return"number"==typeof e&&e==el(e)}function Rs(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=Fe}function Ms(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Ps(e){return!!e&&"object"==typeof e}function Ls(e,t){return e===t||xn(e,t,ar(t))}function Ns(e,t,i){return i="function"==typeof i?i:$,xn(e,t,ar(t),i)}function zs(e){return qs(e)&&e!=+e}function Ys(e){if(ed(e))throw new Mu("This method is not supported with core-js. Try https://github.com/es-shims.");return kn(e)}function Qs(e){return null===e}function Hs(e){return null==e}function qs(e){return"number"==typeof e||Ps(e)&&Ku.call(e)==ze}function Us(e){if(!Ps(e)||Ku.call(e)!=Ye||z(e))return!1;var t=oc(e);if(null===t)return!0;var i=Ju.call(t,"constructor")&&t.constructor;return"function"==typeof i&&i instanceof i&&Wu.call(i)==Zu}function Vs(e){return js(e)&&e>=-Fe&&e<=Fe}function Gs(e){return"string"==typeof e||!Qd(e)&&Ps(e)&&Ku.call(e)==Ue}function Ws(e){return"symbol"==typeof e||Ps(e)&&Ku.call(e)==Ve}function Js(e){return e===$}function Xs(e){return Ps(e)&&$c(e)==Ge}function Zs(e){return Ps(e)&&Ku.call(e)==We}function Ks(e){if(!e)return[];if(Cs(e))return Gs(e)?W(e):Fo(e);if(rc&&e[rc])return Y(e[rc]());var t=$c(e),i=t==Ne?Q:t==qe?U:Il;return i(e)}function $s(e){if(!e)return 0===e?e:0;if(e=il(e),e===Ce||e===-Ce){var t=e<0?-1:1;return t*Ee}return e===e?e:0}function el(e){var t=$s(e),i=t%1;return t===t?i?t-i:t:0}function tl(e){return e?_i(el(e),0,Se):0}function il(e){if("number"==typeof e)return e;if(Ws(e))return _e;if(Ms(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ms(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(xt,"");var i=jt.test(e);return i||Mt.test(e)?Ni(e.slice(2),i?2:8):Ot.test(e)?_e:+e}function nl(e){return Eo(e,Al(e))}function ol(e){return _i(el(e),-Fe,Fe)}function rl(e){return null==e?"":eo(e)}function al(e,t){var i=Ri(e);return t?ki(i,t):i}function sl(e,t){return b(e,or(t,3),Gi)}function ll(e,t){return b(e,or(t,3),en)}function ul(e,t){return null==e?e:Uc(e,or(t,3),Al)}function cl(e,t){return null==e?e:Vc(e,or(t,3),Al)}function dl(e,t){return e&&Gi(e,or(t,3))}function fl(e,t){return e&&en(e,or(t,3))}function pl(e){return null==e?[]:an(e,vl(e))}function ml(e){return null==e?[]:an(e,Al(e))}function hl(e,t,i){var n=null==e?$:sn(e,t);return n===$?i:n}function gl(e,t){return null!=e&&cr(e,t,dn)}function bl(e,t){return null!=e&&cr(e,t,fn)}function vl(e){return Cs(e)?bi(e):Sn(e)}function Al(e){return Cs(e)?bi(e,!0):Bn(e)}function wl(e,t){var i={};return t=or(t,3),Gi(e,function(e,n,o){i[t(e,n,o)]=e}),i}function yl(e,t){var i={};return t=or(t,3),Gi(e,function(e,n,o){i[n]=t(e,n,o)}),i}function xl(e,t){return kl(e,us(or(t)))}function kl(e,t){return null==e?{}:Nn(e,tr(e),or(t))}function Cl(e,t,i){t=vr(t,e)?[t]:co(t);var n=-1,o=t.length;for(o||(e=$,o=1);++nt){var n=e;e=t,t=n}if(i||e%1||t%1){var o=kc();return yc(e+o*(t-e+Li("1e-"+((o+"").length-1))),t)}return Hn(e,t)}function Ml(e){return xf(rl(e).toLowerCase())}function Pl(e){return e=rl(e),e&&e.replace(Lt,tn).replace(Fi,"")}function Ll(e,t,i){e=rl(e),t=eo(t);var n=e.length;i=i===$?n:_i(el(i),0,n);var o=i;return i-=t.length,i>=0&&e.slice(i,o)==t}function Nl(e){return e=rl(e),e&&ft.test(e)?e.replace(ct,nn):e}function zl(e){return e=rl(e),e&&yt.test(e)?e.replace(wt,"\\$&"):e}function Yl(e,t,i){e=rl(e),t=el(t);var n=t?G(e):0;if(!t||n>=t)return e;var o=(t-n)/2;return Ho(mc(o),i)+e+Ho(pc(o),i)}function Ql(e,t,i){e=rl(e),t=el(t);var n=t?G(e):0;return t&&n>>0)?(e=rl(e),e&&("string"==typeof t||null!=t&&!Gd(t))&&(t=eo(t),!t&&L(e))?fo(W(e),0,i):e.split(t,i)):[]}function Wl(e,t,i){return e=rl(e),i=_i(el(i),0,e.length),t=eo(t),e.slice(i,i+t.length)==t}function Jl(e,t,i){var n=C.templateSettings;i&&br(e,t,i)&&(t=$),e=rl(e),t=ef({},t,n,vi);var o,r,a=ef({},t.imports,n.imports,vi),s=vl(a),l=I(a,s),u=0,c=t.interpolate||Nt,d="__p += '",f=zu((t.escape||Nt).source+"|"+c.source+"|"+(c===ht?Dt:Nt).source+"|"+(t.evaluate||Nt).source+"|$","g"),p="//# sourceURL="+("sourceURL"in t?t.sourceURL:"lodash.templateSources["+ ++Ii+"]")+"\n";e.replace(f,function(t,i,n,a,s,l){return n||(n=a),d+=e.slice(u,l).replace(zt,M),i&&(o=!0,d+="' +\n__e("+i+") +\n'"),s&&(r=!0,d+="';\n"+s+";\n__p += '"),n&&(d+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),u=l+t.length,t}),d+="';\n";var m=t.variable;m||(d="with (obj) {\n"+d+"\n}\n"),d=(r?d.replace(at,""):d).replace(st,"$1").replace(lt,"$1;"),d="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(r?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var h=kf(function(){return Pu(s,p+"return "+d).apply($,l)});if(h.source=d,Is(h))throw h;return h}function Xl(e){return rl(e).toLowerCase()}function Zl(e){return rl(e).toUpperCase()}function Kl(e,t,i){if(e=rl(e),e&&(i||t===$))return e.replace(xt,"");if(!e||!(t=eo(t)))return e;var n=W(e),o=W(t),r=O(n,o),a=j(n,o)+1;return fo(n,r,a).join("")}function $l(e,t,i){if(e=rl(e),e&&(i||t===$))return e.replace(Ct,"");if(!e||!(t=eo(t)))return e;var n=W(e),o=j(n,W(t))+1;return fo(n,0,o).join("")}function eu(e,t,i){if(e=rl(e),e&&(i||t===$))return e.replace(kt,"");if(!e||!(t=eo(t)))return e;var n=W(e),o=O(n,W(t));return fo(n,o).join("")}function tu(e,t){var i=be,n=ve;if(Ms(t)){var o="separator"in t?t.separator:o;i="length"in t?el(t.length):i,n="omission"in t?eo(t.omission):n}e=rl(e);var r=e.length;if(L(e)){var a=W(e);r=a.length}if(i>=r)return e;var s=i-G(n);if(s<1)return n;var l=a?fo(a,0,s).join(""):e.slice(0,s);if(o===$)return l+n;if(a&&(s+=l.length-s),Gd(o)){if(e.slice(s).search(o)){var u,c=l;for(o.global||(o=zu(o.source,rl(It.exec(o))+"g")),o.lastIndex=0;u=o.exec(c);)var d=u.index;l=l.slice(0,d===$?s:d)}}else if(e.indexOf(eo(o),s)!=s){var f=l.lastIndexOf(o);f>-1&&(l=l.slice(0,f))}return l+n}function iu(e){return e=rl(e),e&&dt.test(e)?e.replace(ut,on):e}function nu(e,t,i){return e=rl(e),t=i?$:t,t===$?N(e)?Z(e):g(e):e.match(t)||[]}function ou(e){var t=e?e.length:0,n=or();return e=t?c(e,function(e){if("function"!=typeof e[1])throw new Qu(ie);return[n(e[0]),e[1]]}):[],Vn(function(n){for(var o=-1;++oFe)return[];var i=Se,n=yc(e,Se);t=or(t),e-=Se;for(var o=S(n,t);++i2?e:$}(),Tc=Bc&&new Bc,Oc=!sc.call({valueOf:1},"valueOf"),jc={},Rc=Ir(Fc),Mc=Ir(Ec),Pc=Ir(_c),Lc=Ir(Sc),Nc=Ir(Bc),zc=ic?ic.prototype:$,Yc=zc?zc.valueOf:$,Qc=zc?zc.toString:$;C.templateSettings={escape:pt,evaluate:mt,interpolate:ht,variable:"",imports:{_:C}},C.prototype=J.prototype,C.prototype.constructor=C,X.prototype=Ri(J.prototype),X.prototype.constructor=X,St.prototype=Ri(J.prototype),St.prototype.constructor=St,qt.prototype.clear=Ut,qt.prototype.delete=Vt,qt.prototype.get=Gt,qt.prototype.has=Wt,qt.prototype.set=Jt,Xt.prototype.clear=Zt,Xt.prototype.delete=Kt,Xt.prototype.get=$t,Xt.prototype.has=ei,Xt.prototype.set=ti,ii.prototype.clear=ni,ii.prototype.delete=oi,ii.prototype.get=ri,ii.prototype.has=ai,ii.prototype.set=si,li.prototype.add=li.prototype.push=ui,li.prototype.has=ci,di.prototype.clear=fi,di.prototype.delete=pi,di.prototype.get=mi,di.prototype.has=hi,di.prototype.set=gi;var Hc=Do(Gi),qc=Do(en,!0),Uc=Io(),Vc=Io(!0),Gc=Tc?function(e,t){return Tc.set(e,t),e}:lu,Wc=cc||function(e){return Qi.clearTimeout(e)},Jc=Sc&&1/U(new Sc([,-0]))[1]==Ce?function(e){return new Sc(e)}:mu,Xc=Tc?function(e){return Tc.get(e)}:mu,Zc=hc?H(hc,Nu):vu,Kc=hc?function(e){for(var t=[];e;)d(t,Zc(e)),e=oc(e);return t}:vu,$c=un;(Fc&&$c(new Fc(new ArrayBuffer(1)))!=Xe||Ec&&$c(new Ec)!=Ne||_c&&$c(_c.resolve())!=Qe||Sc&&$c(new Sc)!=qe||Bc&&$c(new Bc)!=Ge)&&($c=function(e){var t=Ku.call(e),i=t==Ye?e.constructor:$,n=i?Ir(i):$;if(n)switch(n){case Rc:return Xe;case Mc:return Ne;case Pc:return Qe;case Lc:return qe;case Nc:return Ge}return t});var ed=Vu?Os:Au,td=function(){var e=0,t=0;return function(i,n){var o=Id(),r=we-(o-t);if(t=o,r>0){if(++e>=Ae)return i}else e=0;return Gc(i,n)}}(),id=fc||function(e,t){return Qi.setTimeout(e,t)},nd=Ic?function(e,t,i){var n=t+"";return Ic(e,"toString",{configurable:!0,enumerable:!1,value:au(mr(n,Tr(ur(n),i)))})}:lu,od=ls(function(e){e=rl(e);var t=[];return vt.test(e)&&t.push(""),e.replace(At,function(e,i,n,o){t.push(n?o.replace(Bt,"$1"):i||e)}),t}),rd=Vn(function(e,t){return Fs(e)?Pi(e,Vi(t,1,Fs,!0)):[]}),ad=Vn(function(e,t){var i=Kr(t);return Fs(i)&&(i=$),Fs(e)?Pi(e,Vi(t,1,Fs,!0),or(i,2)):[]}),sd=Vn(function(e,t){var i=Kr(t);return Fs(i)&&(i=$),Fs(e)?Pi(e,Vi(t,1,Fs,!0),$,i):[]}),ld=Vn(function(e){var t=c(e,lo);return t.length&&t[0]===e[0]?mn(t):[]}),ud=Vn(function(e){var t=Kr(e),i=c(e,lo);return t===Kr(i)?t=$:i.pop(),i.length&&i[0]===e[0]?mn(i,or(t,2)):[]}),cd=Vn(function(e){var t=Kr(e),i=c(e,lo);return t===Kr(i)?t=$:i.pop(),i.length&&i[0]===e[0]?mn(i,$,t):[]}),dd=Vn(ta),fd=Vn(function(e,t){t=Vi(t,1);var i=e?e.length:0,n=Ei(e,t);return Qn(e,c(t,function(e){return gr(e,i)?+e:e}).sort(yo)),n}),pd=Vn(function(e){return to(Vi(e,1,Fs,!0))}),md=Vn(function(e){var t=Kr(e);return Fs(t)&&(t=$),to(Vi(e,1,Fs,!0),or(t,2))}),hd=Vn(function(e){var t=Kr(e);return Fs(t)&&(t=$),to(Vi(e,1,Fs,!0),$,t)}),gd=Vn(function(e,t){return Fs(e)?Pi(e,t):[]}),bd=Vn(function(e){return ao(s(e,Fs))}),vd=Vn(function(e){var t=Kr(e);return Fs(t)&&(t=$),ao(s(e,Fs),or(t,2))}),Ad=Vn(function(e){var t=Kr(e);return Fs(t)&&(t=$),ao(s(e,Fs),$,t)}),wd=Vn(ka),yd=Vn(function(e){var t=e.length,i=t>1?e[t-1]:$;return i="function"==typeof i?(e.pop(),i):$,Ca(e,i)}),xd=Vn(function(e){e=Vi(e,1);var t=e.length,i=t?e[0]:0,n=this.__wrapped__,o=function(t){return Ei(t,e)};return!(t>1||this.__actions__.length)&&n instanceof St&&gr(i)?(n=n.slice(i,+i+(t?1:0)),n.__actions__.push({func:Ba,args:[o],thisArg:$}),new X(n,this.__chain__).thru(function(e){return t&&!e.length&&e.push($),e})):this.thru(o)}),kd=So(function(e,t,i){Ju.call(e,i)?++e[i]:e[i]=1}),Cd=Po(Qr),Fd=Po(Hr),Ed=So(function(e,t,i){Ju.call(e,i)?e[i].push(t):e[i]=[t]}),_d=Vn(function(e,t,n){var o=-1,r="function"==typeof t,a=vr(t),s=Cs(e)?ju(e.length):[];return Hc(e,function(e){var l=r?t:a&&null!=e?e[t]:$;s[++o]=l?i(l,e,n):gn(e,t,n)}),s}),Sd=So(function(e,t,i){e[i]=t}),Bd=So(function(e,t,i){e[i?0:1].push(t)},function(){return[[],[]]}),Dd=Vn(function(e,t){if(null==e)return[];var i=t.length;return i>1&&br(e,t[0],t[1])?t=[]:i>2&&br(t[0],t[1],t[2])&&(t=[t[0]]),Pn(e,Vi(t,1),[])}),Id=dc||function(){return Qi.Date.now()},Td=Vn(function(e,t,i){var n=re;if(i.length){var o=q(i,nr(Td));n|=ce}return Xo(e,n,t,i,o)}),Od=Vn(function(e,t,i){var n=re|ae;if(i.length){var o=q(i,nr(Od));n|=ce}return Xo(t,n,e,i,o)}),jd=Vn(function(e,t){return Mi(e,1,t)}),Rd=Vn(function(e,t,i){return Mi(e,il(t)||0,i)});ls.Cache=ii;var Md=Vn(function(e,t){t=1==t.length&&Qd(t[0])?c(t[0],D(or())):c(Vi(t,1),D(or()));var n=t.length;return Vn(function(o){for(var r=-1,a=yc(o.length,n);++r=t}),Qd=ju.isArray,Hd=Wi?D(Wi):bn,qd=gc||Au,Ud=Ji?D(Ji):vn,Vd=Xi?D(Xi):yn,Gd=Zi?D(Zi):Cn,Wd=Ki?D(Ki):Fn,Jd=$i?D($i):En,Xd=Vo(Dn),Zd=Vo(function(e,t){return e<=t}),Kd=Bo(function(e,t){if(Oc||xr(t)||Cs(t))return void Eo(t,vl(t),e);for(var i in t)Ju.call(t,i)&&wi(e,i,t[i])}),$d=Bo(function(e,t){Eo(t,Al(t),e)}),ef=Bo(function(e,t,i,n){Eo(t,Al(t),e,n)}),tf=Bo(function(e,t,i,n){Eo(t,vl(t),e,n)}),nf=Vn(function(e,t){return Ei(e,Vi(t,1))}),of=Vn(function(e){return e.push($,vi),i(ef,$,e)}),rf=Vn(function(e){return e.push($,Er),i(cf,$,e)}),af=zo(function(e,t,i){e[t]=i},au(lu)),sf=zo(function(e,t,i){Ju.call(e,t)?e[t].push(i):e[t]=[i]},or),lf=Vn(gn),uf=Bo(function(e,t,i){jn(e,t,i)}),cf=Bo(function(e,t,i,n){jn(e,t,i,n)}),df=Vn(function(e,t){return null==e?{}:(t=c(Vi(t,1),Dr),Ln(e,Pi(tr(e),t)))}),ff=Vn(function(e,t){return null==e?{}:Ln(e,c(Vi(t,1),Dr))}),pf=Jo(vl),mf=Jo(Al),hf=jo(function(e,t,i){return t=t.toLowerCase(),e+(i?Ml(t):t)}),gf=jo(function(e,t,i){return e+(i?"-":"")+t.toLowerCase()}),bf=jo(function(e,t,i){return e+(i?" ":"")+t.toLowerCase()}),vf=Oo("toLowerCase"),Af=jo(function(e,t,i){return e+(i?"_":"")+t.toLowerCase()}),wf=jo(function(e,t,i){return e+(i?" ":"")+xf(t)}),yf=jo(function(e,t,i){return e+(i?" ":"")+t.toUpperCase()}),xf=Oo("toUpperCase"),kf=Vn(function(e,t){try{return i(e,$,t)}catch(e){return Is(e)?e:new Mu(e)}}),Cf=Vn(function(e,t){return o(Vi(t,1),function(t){t=Dr(t),e[t]=Td(e[t],e)}),e}),Ff=Lo(),Ef=Lo(!0),_f=Vn(function(e,t){return function(i){return gn(i,e,t)}}),Sf=Vn(function(e,t){return function(i){return gn(e,i,t)}}),Bf=Qo(c),Df=Qo(a),If=Qo(m),Tf=Uo(),Of=Uo(!0),jf=Yo(function(e,t){return e+t},0),Rf=Wo("ceil"),Mf=Yo(function(e,t){return e/t},1),Pf=Wo("floor"),Lf=Yo(function(e,t){return e*t},1),Nf=Wo("round"),zf=Yo(function(e,t){return e-t},0);return C.after=ts,C.ary=is,C.assign=Kd,C.assignIn=$d,C.assignInWith=ef,C.assignWith=tf,C.at=nf,C.before=ns,C.bind=Td,C.bindAll=Cf,C.bindKey=Od,C.castArray=gs,C.chain=_a,C.chunk=jr,C.compact=Rr,C.concat=Mr,C.cond=ou,C.conforms=ru,C.constant=au,C.countBy=kd,C.create=al,C.curry=os,C.curryRight=rs,C.debounce=as,C.defaults=of,C.defaultsDeep=rf,C.defer=jd,C.delay=Rd,C.difference=rd,C.differenceBy=ad,C.differenceWith=sd,C.drop=Pr,C.dropRight=Lr,C.dropRightWhile=Nr,C.dropWhile=zr,C.fill=Yr,C.filter=La,C.flatMap=Na,C.flatMapDeep=za,C.flatMapDepth=Ya,C.flatten=qr,C.flattenDeep=Ur,C.flattenDepth=Vr,C.flip=ss,C.flow=Ff,C.flowRight=Ef,C.fromPairs=Gr,C.functions=pl,C.functionsIn=ml,C.groupBy=Ed,C.initial=Xr,C.intersection=ld,C.intersectionBy=ud,C.intersectionWith=cd,C.invert=af,C.invertBy=sf,C.invokeMap=_d,C.iteratee=uu,C.keyBy=Sd,C.keys=vl,C.keysIn=Al,C.map=Ua,C.mapKeys=wl,C.mapValues=yl,C.matches=cu,C.matchesProperty=du,C.memoize=ls,C.merge=uf,C.mergeWith=cf,C.method=_f,C.methodOf=Sf,C.mixin=fu,C.negate=us,C.nthArg=hu,C.omit=df,C.omitBy=xl,C.once=cs,C.orderBy=Va,C.over=Bf,C.overArgs=Md,C.overEvery=Df,C.overSome=If,C.partial=Pd,C.partialRight=Ld,C.partition=Bd,C.pick=ff,C.pickBy=kl,C.property=gu,C.propertyOf=bu,C.pull=dd,C.pullAll=ta,C.pullAllBy=ia,C.pullAllWith=na,C.pullAt=fd,C.range=Tf,C.rangeRight=Of,C.rearg=Nd,C.reject=Ja,C.remove=oa,C.rest=ds,C.reverse=ra,C.sampleSize=Za,C.set=Fl,C.setWith=El,C.shuffle=Ka,C.slice=aa,C.sortBy=Dd,C.sortedUniq=pa,C.sortedUniqBy=ma,C.split=Gl,C.spread=fs,C.tail=ha,C.take=ga,C.takeRight=ba,C.takeRightWhile=va,C.takeWhile=Aa,C.tap=Sa,C.throttle=ps,C.thru=Ba,C.toArray=Ks,C.toPairs=pf,C.toPairsIn=mf,C.toPath=Cu,C.toPlainObject=nl,C.transform=_l,C.unary=ms,C.union=pd,C.unionBy=md,C.unionWith=hd,C.uniq=wa,C.uniqBy=ya,C.uniqWith=xa,C.unset=Sl,C.unzip=ka,C.unzipWith=Ca,C.update=Bl,C.updateWith=Dl,C.values=Il,C.valuesIn=Tl,C.without=gd,C.words=nu,C.wrap=hs,C.xor=bd,C.xorBy=vd,C.xorWith=Ad,C.zip=wd,C.zipObject=Fa,C.zipObjectDeep=Ea,C.zipWith=yd,C.entries=pf,C.entriesIn=mf,C.extend=$d,C.extendWith=ef,fu(C,C),C.add=jf,C.attempt=kf,C.camelCase=hf,C.capitalize=Ml,C.ceil=Rf,C.clamp=Ol,C.clone=bs,C.cloneDeep=As,C.cloneDeepWith=ws,C.cloneWith=vs,C.conformsTo=ys,C.deburr=Pl,C.defaultTo=su,C.divide=Mf,C.endsWith=Ll,C.eq=xs,C.escape=Nl,C.escapeRegExp=zl,C.every=Pa,C.find=Cd,C.findIndex=Qr,C.findKey=sl,C.findLast=Fd,C.findLastIndex=Hr,C.findLastKey=ll,C.floor=Pf,C.forEach=Qa,C.forEachRight=Ha,C.forIn=ul,C.forInRight=cl,C.forOwn=dl,C.forOwnRight=fl,C.get=hl,C.gt=zd,C.gte=Yd,C.has=gl,C.hasIn=bl,C.head=Wr,C.identity=lu,C.includes=qa,C.indexOf=Jr,C.inRange=jl,C.invoke=lf,C.isArguments=ks,C.isArray=Qd,C.isArrayBuffer=Hd,C.isArrayLike=Cs,C.isArrayLikeObject=Fs,C.isBoolean=Es,C.isBuffer=qd,C.isDate=Ud,C.isElement=_s,C.isEmpty=Ss,C.isEqual=Bs,C.isEqualWith=Ds,C.isError=Is,C.isFinite=Ts,C.isFunction=Os,C.isInteger=js,C.isLength=Rs,C.isMap=Vd,C.isMatch=Ls,C.isMatchWith=Ns,C.isNaN=zs,C.isNative=Ys,C.isNil=Hs,C.isNull=Qs,C.isNumber=qs,C.isObject=Ms,C.isObjectLike=Ps,C.isPlainObject=Us,C.isRegExp=Gd,C.isSafeInteger=Vs,C.isSet=Wd,C.isString=Gs,C.isSymbol=Ws,C.isTypedArray=Jd,C.isUndefined=Js,C.isWeakMap=Xs,C.isWeakSet=Zs,C.join=Zr,C.kebabCase=gf,C.last=Kr,C.lastIndexOf=$r,C.lowerCase=bf,C.lowerFirst=vf,C.lt=Xd,C.lte=Zd,C.max=Eu,C.maxBy=_u,C.mean=Su,C.meanBy=Bu,C.min=Du,C.minBy=Iu,C.stubArray=vu,C.stubFalse=Au,C.stubObject=wu,C.stubString=yu,C.stubTrue=xu,C.multiply=Lf,C.nth=ea,C.noConflict=pu,C.noop=mu,C.now=Id,C.pad=Yl,C.padEnd=Ql,C.padStart=Hl,C.parseInt=ql,C.random=Rl,C.reduce=Ga,C.reduceRight=Wa,C.repeat=Ul,C.replace=Vl,C.result=Cl,C.round=Nf,C.runInContext=K, -C.sample=Xa,C.size=$a,C.snakeCase=Af,C.some=es,C.sortedIndex=sa,C.sortedIndexBy=la,C.sortedIndexOf=ua,C.sortedLastIndex=ca,C.sortedLastIndexBy=da,C.sortedLastIndexOf=fa,C.startCase=wf,C.startsWith=Wl,C.subtract=zf,C.sum=Tu,C.sumBy=Ou,C.template=Jl,C.times=ku,C.toFinite=$s,C.toInteger=el,C.toLength=tl,C.toLower=Xl,C.toNumber=il,C.toSafeInteger=ol,C.toString=rl,C.toUpper=Zl,C.trim=Kl,C.trimEnd=$l,C.trimStart=eu,C.truncate=tu,C.unescape=iu,C.uniqueId=Fu,C.upperCase=yf,C.upperFirst=xf,C.each=Qa,C.eachRight=Ha,C.first=Wr,fu(C,function(){var e={};return Gi(C,function(t,i){Ju.call(C.prototype,i)||(e[i]=t)}),e}(),{chain:!1}),C.VERSION=ee,o(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){C[e].placeholder=C}),o(["drop","take"],function(e,t){St.prototype[e]=function(i){var n=this.__filtered__;if(n&&!t)return new St(this);i=i===$?1:wc(el(i),0);var o=this.clone();return n?o.__takeCount__=yc(i,o.__takeCount__):o.__views__.push({size:yc(i,Se),type:e+(o.__dir__<0?"Right":"")}),o},St.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),o(["filter","map","takeWhile"],function(e,t){var i=t+1,n=i==ye||i==ke;St.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:or(e,3),type:i}),t.__filtered__=t.__filtered__||n,t}}),o(["head","last"],function(e,t){var i="take"+(t?"Right":"");St.prototype[e]=function(){return this[i](1).value()[0]}}),o(["initial","tail"],function(e,t){var i="drop"+(t?"":"Right");St.prototype[e]=function(){return this.__filtered__?new St(this):this[i](1)}}),St.prototype.compact=function(){return this.filter(lu)},St.prototype.find=function(e){return this.filter(e).head()},St.prototype.findLast=function(e){return this.reverse().find(e)},St.prototype.invokeMap=Vn(function(e,t){return"function"==typeof e?new St(this):this.map(function(i){return gn(i,e,t)})}),St.prototype.reject=function(e){return this.filter(us(or(e)))},St.prototype.slice=function(e,t){e=el(e);var i=this;return i.__filtered__&&(e>0||t<0)?new St(i):(e<0?i=i.takeRight(-e):e&&(i=i.drop(e)),t!==$&&(t=el(t),i=t<0?i.dropRight(-t):i.take(t-e)),i)},St.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},St.prototype.toArray=function(){return this.take(Se)},Gi(St.prototype,function(e,t){var i=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),o=C[n?"take"+("last"==t?"Right":""):t],r=n||/^find/.test(t);o&&(C.prototype[t]=function(){var t=this.__wrapped__,a=n?[1]:arguments,s=t instanceof St,l=a[0],u=s||Qd(t),c=function(e){var t=o.apply(C,d([e],a));return n&&f?t[0]:t};u&&i&&"function"==typeof l&&1!=l.length&&(s=u=!1);var f=this.__chain__,p=!!this.__actions__.length,m=r&&!f,h=s&&!p;if(!r&&u){t=h?t:new St(this);var g=e.apply(t,a);return g.__actions__.push({func:Ba,args:[c],thisArg:$}),new X(g,f)}return m&&h?e.apply(this,a):(g=this.thru(c),m?n?g.value()[0]:g.value():g)})}),o(["pop","push","shift","sort","splice","unshift"],function(e){var t=Hu[e],i=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);C.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var o=this.value();return t.apply(Qd(o)?o:[],e)}return this[i](function(i){return t.apply(Qd(i)?i:[],e)})}}),Gi(St.prototype,function(e,t){var i=C[t];if(i){var n=i.name+"",o=jc[n]||(jc[n]=[]);o.push({name:t,func:i})}}),jc[No($,ae).name]=[{name:"wrapper",func:$}],St.prototype.clone=Yt,St.prototype.reverse=Qt,St.prototype.value=Ht,C.prototype.at=xd,C.prototype.chain=Da,C.prototype.commit=Ia,C.prototype.next=Ta,C.prototype.plant=ja,C.prototype.reverse=Ra,C.prototype.toJSON=C.prototype.valueOf=C.prototype.value=Ma,C.prototype.first=C.prototype.head,rc&&(C.prototype[rc]=Oa),C}var $,ee="4.15.0",te=200,ie="Expected a function",ne="__lodash_hash_undefined__",oe="__lodash_placeholder__",re=1,ae=2,se=4,le=8,ue=16,ce=32,de=64,fe=128,pe=256,me=512,he=1,ge=2,be=30,ve="...",Ae=150,we=16,ye=1,xe=2,ke=3,Ce=1/0,Fe=9007199254740991,Ee=1.7976931348623157e308,_e=NaN,Se=4294967295,Be=Se-1,De=Se>>>1,Ie=[["ary",fe],["bind",re],["bindKey",ae],["curry",le],["curryRight",ue],["flip",me],["partial",ce],["partialRight",de],["rearg",pe]],Te="[object Arguments]",Oe="[object Array]",je="[object Boolean]",Re="[object Date]",Me="[object Error]",Pe="[object Function]",Le="[object GeneratorFunction]",Ne="[object Map]",ze="[object Number]",Ye="[object Object]",Qe="[object Promise]",He="[object RegExp]",qe="[object Set]",Ue="[object String]",Ve="[object Symbol]",Ge="[object WeakMap]",We="[object WeakSet]",Je="[object ArrayBuffer]",Xe="[object DataView]",Ze="[object Float32Array]",Ke="[object Float64Array]",$e="[object Int8Array]",et="[object Int16Array]",tt="[object Int32Array]",it="[object Uint8Array]",nt="[object Uint8ClampedArray]",ot="[object Uint16Array]",rt="[object Uint32Array]",at=/\b__p \+= '';/g,st=/\b(__p \+=) '' \+/g,lt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ut=/&(?:amp|lt|gt|quot|#39|#96);/g,ct=/[&<>"'`]/g,dt=RegExp(ut.source),ft=RegExp(ct.source),pt=/<%-([\s\S]+?)%>/g,mt=/<%([\s\S]+?)%>/g,ht=/<%=([\s\S]+?)%>/g,gt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,bt=/^\w*$/,vt=/^\./,At=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,wt=/[\\^$.*+?()[\]{}|]/g,yt=RegExp(wt.source),xt=/^\s+|\s+$/g,kt=/^\s+/,Ct=/\s+$/,Ft=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Et=/\{\n\/\* \[wrapped with (.+)\] \*/,_t=/,? & /,St=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Bt=/\\(\\)?/g,Dt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,It=/\w*$/,Tt=/^0x/i,Ot=/^[-+]0x[0-9a-f]+$/i,jt=/^0b[01]+$/i,Rt=/^\[object .+?Constructor\]$/,Mt=/^0o[0-7]+$/i,Pt=/^(?:0|[1-9]\d*)$/,Lt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Nt=/($^)/,zt=/['\n\r\u2028\u2029\\]/g,Yt="\\ud800-\\udfff",Qt="\\u0300-\\u036f\\ufe20-\\ufe23",Ht="\\u20d0-\\u20f0",qt="\\u2700-\\u27bf",Ut="a-z\\xdf-\\xf6\\xf8-\\xff",Vt="\\xac\\xb1\\xd7\\xf7",Gt="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Wt="\\u2000-\\u206f",Jt=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Xt="A-Z\\xc0-\\xd6\\xd8-\\xde",Zt="\\ufe0e\\ufe0f",Kt=Vt+Gt+Wt+Jt,$t="['’]",ei="["+Yt+"]",ti="["+Kt+"]",ii="["+Qt+Ht+"]",ni="\\d+",oi="["+qt+"]",ri="["+Ut+"]",ai="[^"+Yt+Kt+ni+qt+Ut+Xt+"]",si="\\ud83c[\\udffb-\\udfff]",li="(?:"+ii+"|"+si+")",ui="[^"+Yt+"]",ci="(?:\\ud83c[\\udde6-\\uddff]){2}",di="[\\ud800-\\udbff][\\udc00-\\udfff]",fi="["+Xt+"]",pi="\\u200d",mi="(?:"+ri+"|"+ai+")",hi="(?:"+fi+"|"+ai+")",gi="(?:"+$t+"(?:d|ll|m|re|s|t|ve))?",bi="(?:"+$t+"(?:D|LL|M|RE|S|T|VE))?",vi=li+"?",Ai="["+Zt+"]?",wi="(?:"+pi+"(?:"+[ui,ci,di].join("|")+")"+Ai+vi+")*",yi=Ai+vi+wi,xi="(?:"+[oi,ci,di].join("|")+")"+yi,ki="(?:"+[ui+ii+"?",ii,ci,di,ei].join("|")+")",Ci=RegExp($t,"g"),Fi=RegExp(ii,"g"),Ei=RegExp(si+"(?="+si+")|"+ki+yi,"g"),_i=RegExp([fi+"?"+ri+"+"+gi+"(?="+[ti,fi,"$"].join("|")+")",hi+"+"+bi+"(?="+[ti,fi+mi,"$"].join("|")+")",fi+"?"+mi+"+"+gi,fi+"+"+bi,ni,xi].join("|"),"g"),Si=RegExp("["+pi+Yt+Qt+Ht+Zt+"]"),Bi=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Di=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ii=-1,Ti={};Ti[Ze]=Ti[Ke]=Ti[$e]=Ti[et]=Ti[tt]=Ti[it]=Ti[nt]=Ti[ot]=Ti[rt]=!0,Ti[Te]=Ti[Oe]=Ti[Je]=Ti[je]=Ti[Xe]=Ti[Re]=Ti[Me]=Ti[Pe]=Ti[Ne]=Ti[ze]=Ti[Ye]=Ti[He]=Ti[qe]=Ti[Ue]=Ti[Ge]=!1;var Oi={};Oi[Te]=Oi[Oe]=Oi[Je]=Oi[Xe]=Oi[je]=Oi[Re]=Oi[Ze]=Oi[Ke]=Oi[$e]=Oi[et]=Oi[tt]=Oi[Ne]=Oi[ze]=Oi[Ye]=Oi[He]=Oi[qe]=Oi[Ue]=Oi[Ve]=Oi[it]=Oi[nt]=Oi[ot]=Oi[rt]=!0,Oi[Me]=Oi[Pe]=Oi[Ge]=!1;var ji={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"ss"},Ri={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Mi={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Pi={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Li=parseFloat,Ni=parseInt,zi="object"==typeof global&&global&&global.Object===Object&&global,Yi="object"==typeof self&&self&&self.Object===Object&&self,Qi=zi||Yi||Function("return this")(),Hi="object"==typeof exports&&exports&&!exports.nodeType&&exports,qi=Hi&&"object"==typeof module&&module&&!module.nodeType&&module,Ui=qi&&qi.exports===Hi,Vi=Ui&&zi.process,Gi=function(){try{return Vi&&Vi.binding("util")}catch(e){}}(),Wi=Gi&&Gi.isArrayBuffer,Ji=Gi&&Gi.isDate,Xi=Gi&&Gi.isMap,Zi=Gi&&Gi.isRegExp,Ki=Gi&&Gi.isSet,$i=Gi&&Gi.isTypedArray,en=k("length"),tn=C(ji),nn=C(Ri),on=C(Mi),rn=K();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Qi._=rn,define("lodash",[],function(){return rn})):qi?((qi.exports=rn)._=rn,Hi._=rn):Qi._=rn}.call(this),function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function i(e){var t=!!e&&"length"in e&&e.length,i=pe.type(e);return"function"!==i&&!pe.isWindow(e)&&("array"===i||0===t||"number"==typeof t&&t>0&&t-1 in e)}function n(e,t,i){if(pe.isFunction(t))return pe.grep(e,function(e,n){return!!t.call(e,n,e)!==i});if(t.nodeType)return pe.grep(e,function(e){return e===t!==i});if("string"==typeof t){if(ke.test(t))return pe.filter(t,e,i);t=pe.filter(t,e)}return pe.grep(e,function(e){return pe.inArray(e,t)>-1!==i})}function o(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function r(e){var t={};return pe.each(e.match(Be)||[],function(e,i){t[i]=!0}),t}function a(){ne.addEventListener?(ne.removeEventListener("DOMContentLoaded",s),e.removeEventListener("load",s)):(ne.detachEvent("onreadystatechange",s),e.detachEvent("onload",s))}function s(){(ne.addEventListener||"load"===e.event.type||"complete"===ne.readyState)&&(a(),pe.ready())}function l(e,t,i){if(void 0===i&&1===e.nodeType){var n="data-"+t.replace(je,"-$1").toLowerCase();if(i=e.getAttribute(n),"string"==typeof i){try{i="true"===i||"false"!==i&&("null"===i?null:+i+""===i?+i:Oe.test(i)?pe.parseJSON(i):i)}catch(e){}pe.data(e,t,i)}else i=void 0}return i}function u(e){var t;for(t in e)if(("data"!==t||!pe.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function c(e,t,i,n){if(Te(e)){var o,r,a=pe.expando,s=e.nodeType,l=s?pe.cache:e,u=s?e[a]:e[a]&&a;if(u&&l[u]&&(n||l[u].data)||void 0!==i||"string"!=typeof t)return u||(u=s?e[a]=ie.pop()||pe.guid++:a),l[u]||(l[u]=s?{}:{toJSON:pe.noop}),"object"!=typeof t&&"function"!=typeof t||(n?l[u]=pe.extend(l[u],t):l[u].data=pe.extend(l[u].data,t)),r=l[u],n||(r.data||(r.data={}),r=r.data),void 0!==i&&(r[pe.camelCase(t)]=i),"string"==typeof t?(o=r[t],null==o&&(o=r[pe.camelCase(t)])):o=r,o}}function d(e,t,i){if(Te(e)){var n,o,r=e.nodeType,a=r?pe.cache:e,s=r?e[pe.expando]:pe.expando;if(a[s]){if(t&&(n=i?a[s]:a[s].data)){pe.isArray(t)?t=t.concat(pe.map(t,pe.camelCase)):t in n?t=[t]:(t=pe.camelCase(t),t=t in n?[t]:t.split(" ")),o=t.length;for(;o--;)delete n[t[o]];if(i?!u(n):!pe.isEmptyObject(n))return}(i||(delete a[s].data,u(a[s])))&&(r?pe.cleanData([e],!0):de.deleteExpando||a!=a.window?delete a[s]:a[s]=void 0)}}}function f(e,t,i,n){var o,r=1,a=20,s=n?function(){return n.cur()}:function(){return pe.css(e,t,"")},l=s(),u=i&&i[3]||(pe.cssNumber[t]?"":"px"),c=(pe.cssNumber[t]||"px"!==u&&+l)&&Me.exec(pe.css(e,t));if(c&&c[3]!==u){u=u||c[3],i=i||[],c=+l||1;do r=r||".5",c/=r,pe.style(e,t,c+u);while(r!==(r=s()/l)&&1!==r&&--a)}return i&&(c=+c||+l||0,o=i[1]?c+(i[1]+1)*i[2]:+i[2],n&&(n.unit=u,n.start=c,n.end=o)),o}function p(e){var t=qe.split("|"),i=e.createDocumentFragment();if(i.createElement)for(;t.length;)i.createElement(t.pop());return i}function m(e,t){var i,n,o=0,r="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):void 0;if(!r)for(r=[],i=e.childNodes||e;null!=(n=i[o]);o++)!t||pe.nodeName(n,t)?r.push(n):pe.merge(r,m(n,t));return void 0===t||t&&pe.nodeName(e,t)?pe.merge([e],r):r}function h(e,t){for(var i,n=0;null!=(i=e[n]);n++)pe._data(i,"globalEval",!t||pe._data(t[n],"globalEval"))}function g(e){ze.test(e.type)&&(e.defaultChecked=e.checked)}function b(e,t,i,n,o){for(var r,a,s,l,u,c,d,f=e.length,b=p(t),v=[],A=0;A"!==d[1]||Ge.test(a)?0:l:l.firstChild,r=a&&a.childNodes.length;r--;)pe.nodeName(c=a.childNodes[r],"tbody")&&!c.childNodes.length&&a.removeChild(c);for(pe.merge(v,l.childNodes),l.textContent="";l.firstChild;)l.removeChild(l.firstChild);l=b.lastChild}else v.push(t.createTextNode(a));for(l&&b.removeChild(l),de.appendChecked||pe.grep(m(v,"input"),g),A=0;a=v[A++];)if(n&&pe.inArray(a,n)>-1)o&&o.push(a);else if(s=pe.contains(a.ownerDocument,a),l=m(b.appendChild(a),"script"),s&&h(l),i)for(r=0;a=l[r++];)Qe.test(a.type||"")&&i.push(a);return l=null,b}function v(){return!0}function A(){return!1}function w(){try{return ne.activeElement}catch(e){}}function y(e,t,i,n,o,r){var a,s;if("object"==typeof t){"string"!=typeof i&&(n=n||i,i=void 0);for(s in t)y(e,s,i,n,t[s],r);return e}if(null==n&&null==o?(o=i,n=i=void 0):null==o&&("string"==typeof i?(o=n,n=void 0):(o=n,n=i,i=void 0)),o===!1)o=A;else if(!o)return e;return 1===r&&(a=o,o=function(e){return pe().off(e),a.apply(this,arguments)},o.guid=a.guid||(a.guid=pe.guid++)),e.each(function(){pe.event.add(this,t,o,n,i)})}function x(e,t){return pe.nodeName(e,"table")&&pe.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function k(e){return e.type=(null!==pe.find.attr(e,"type"))+"/"+e.type,e}function C(e){var t=ot.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function F(e,t){if(1===t.nodeType&&pe.hasData(e)){var i,n,o,r=pe._data(e),a=pe._data(t,r),s=r.events;if(s){delete a.handle,a.events={};for(i in s)for(n=0,o=s[i].length;n1&&"string"==typeof p&&!de.checkClone&&nt.test(p))return e.each(function(o){var r=e.eq(o);h&&(t[0]=p.call(this,o,r.html())),_(r,t,i,n)});if(d&&(u=b(t,e[0].ownerDocument,!1,e,n),o=u.firstChild,1===u.childNodes.length&&(u=o),o||n)){for(s=pe.map(m(u,"script"),k),a=s.length;c")).appendTo(t.documentElement),t=(lt[0].contentWindow||lt[0].contentDocument).document,t.write(),t.close(),i=B(e,t),lt.detach()),ut[e]=i),i}function I(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function T(e){if(e in Ct)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),i=kt.length;i--;)if(e=kt[i]+t,e in Ct)return e}function O(e,t){for(var i,n,o,r=[],a=0,s=e.length;a=0&&i=0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},isPlainObject:function(e){var t;if(!e||"object"!==pe.type(e)||e.nodeType||pe.isWindow(e))return!1;try{if(e.constructor&&!ce.call(e,"constructor")&&!ce.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(e){return!1}if(!de.ownFirst)for(t in e)return ce.call(e,t);for(t in e);return void 0===t||ce.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?le[ue.call(e)]||"object":typeof e},globalEval:function(t){t&&pe.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(he,"ms-").replace(ge,be)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var n,o=0;if(i(e))for(n=e.length;ox.cacheLength&&delete e[t.shift()],e[i+" "]=n}var t=[];return e}function n(e){return e[N]=!0,e}function o(e){var t=T.createElement("div");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function r(e,t){for(var i=e.split("|"),n=i.length;n--;)x.attrHandle[i[n]]=t}function a(e,t){var i=t&&e,n=i&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||G)-(~e.sourceIndex||G);if(n)return n;if(i)for(;i=i.nextSibling;)if(i===t)return-1;return e?1:-1}function s(e){return function(t){var i=t.nodeName.toLowerCase();return"input"===i&&t.type===e}}function l(e){return function(t){var i=t.nodeName.toLowerCase();return("input"===i||"button"===i)&&t.type===e}}function u(e){return n(function(t){return t=+t,n(function(i,n){for(var o,r=e([],i.length,t),a=r.length;a--;)i[o=r[a]]&&(i[o]=!(n[o]=i[o]))})})}function c(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function d(){}function f(e){for(var t=0,i=e.length,n="";t1?function(t,i,n){for(var o=e.length;o--;)if(!e[o](t,i,n))return!1;return!0}:e[0]}function h(e,i,n){for(var o=0,r=i.length;o-1&&(n[u]=!(a[u]=d))}}else A=g(A===a?A.splice(m,A.length):A),r?r(null,a,A,l):K.apply(a,A)})}function v(e){for(var t,i,n,o=e.length,r=x.relative[e[0].type],a=r||x.relative[" "],s=r?1:0,l=p(function(e){return e===t},a,!0),u=p(function(e){return ee(t,e)>-1},a,!0),c=[function(e,i,n){var o=!r&&(n||i!==S)||((t=i).nodeType?l(e,i,n):u(e,i,n));return t=null,o}];s1&&m(c),s>1&&f(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(se,"$1"),i,s0,r=e.length>0,a=function(n,a,s,l,u){var c,d,f,p=0,m="0",h=n&&[],b=[],v=S,A=n||r&&x.find.TAG("*",u),w=Y+=null==v?1:Math.random()||.1,y=A.length;for(u&&(S=a===T||a||u);m!==y&&null!=(c=A[m]);m++){if(r&&c){for(d=0,a||c.ownerDocument===T||(I(c),s=!j);f=e[d++];)if(f(c,a||T,s)){l.push(c);break}u&&(Y=w)}o&&((c=!f&&c)&&p--,n&&h.push(c))}if(p+=m,o&&m!==p){for(d=0;f=i[d++];)f(h,b,a,s);if(n){if(p>0)for(;m--;)h[m]||b[m]||(b[m]=X.call(l));b=g(b)}K.apply(l,b),u&&!n&&b.length>0&&p+i.length>1&&t.uniqueSort(l)}return u&&(Y=w,S=v),h};return o?n(a):a}var w,y,x,k,C,F,E,_,S,B,D,I,T,O,j,R,M,P,L,N="sizzle"+1*new Date,z=e.document,Y=0,Q=0,H=i(),q=i(),U=i(),V=function(e,t){return e===t&&(D=!0),0},G=1<<31,W={}.hasOwnProperty,J=[],X=J.pop,Z=J.push,K=J.push,$=J.slice,ee=function(e,t){for(var i=0,n=e.length;i+~]|"+ie+")"+ie+"*"),ce=new RegExp("="+ie+"*([^\\]'\"]*?)"+ie+"*\\]","g"),de=new RegExp(re),fe=new RegExp("^"+ne+"$"),pe={ID:new RegExp("^#("+ne+")"),CLASS:new RegExp("^\\.("+ne+")"),TAG:new RegExp("^("+ne+"|[*])"),ATTR:new RegExp("^"+oe),PSEUDO:new RegExp("^"+re),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ie+"*(even|odd|(([+-]|)(\\d*)n|)"+ie+"*(?:([+-]|)"+ie+"*(\\d+)|))"+ie+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ie+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ie+"*((?:-\\d)?\\d*)"+ie+"*\\)|)(?=[^-]|$)","i")},me=/^(?:input|select|textarea|button)$/i,he=/^h\d$/i,ge=/^[^{]+\{\s*\[native \w/,be=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ve=/[+~]/,Ae=/'|\\/g,we=new RegExp("\\\\([\\da-f]{1,6}"+ie+"?|("+ie+")|.)","ig"),ye=function(e,t,i){var n="0x"+t-65536;return n!==n||i?t:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)},xe=function(){I()};try{K.apply(J=$.call(z.childNodes),z.childNodes),J[z.childNodes.length].nodeType}catch(e){K={apply:J.length?function(e,t){Z.apply(e,$.call(t))}:function(e,t){for(var i=e.length,n=0;e[i++]=t[n++];);e.length=i-1}}}y=t.support={},C=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},I=t.setDocument=function(e){var t,i,n=e?e.ownerDocument||e:z;return n!==T&&9===n.nodeType&&n.documentElement?(T=n,O=T.documentElement,j=!C(T),(i=T.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",xe,!1):i.attachEvent&&i.attachEvent("onunload",xe)),y.attributes=o(function(e){return e.className="i",!e.getAttribute("className")}),y.getElementsByTagName=o(function(e){return e.appendChild(T.createComment("")),!e.getElementsByTagName("*").length}),y.getElementsByClassName=ge.test(T.getElementsByClassName),y.getById=o(function(e){return O.appendChild(e).id=N,!T.getElementsByName||!T.getElementsByName(N).length}),y.getById?(x.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&j){var i=t.getElementById(e);return i?[i]:[]}},x.filter.ID=function(e){var t=e.replace(we,ye);return function(e){return e.getAttribute("id")===t}}):(delete x.find.ID,x.filter.ID=function(e){var t=e.replace(we,ye);return function(e){var i="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return i&&i.value===t}}),x.find.TAG=y.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):y.qsa?t.querySelectorAll(e):void 0}:function(e,t){var i,n=[],o=0,r=t.getElementsByTagName(e);if("*"===e){for(;i=r[o++];)1===i.nodeType&&n.push(i);return n}return r},x.find.CLASS=y.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&j)return t.getElementsByClassName(e)},M=[],R=[],(y.qsa=ge.test(T.querySelectorAll))&&(o(function(e){O.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&R.push("[*^$]="+ie+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||R.push("\\["+ie+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+N+"-]").length||R.push("~="),e.querySelectorAll(":checked").length||R.push(":checked"),e.querySelectorAll("a#"+N+"+*").length||R.push(".#.+[+~]")}),o(function(e){var t=T.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&R.push("name"+ie+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||R.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),R.push(",.*:")})),(y.matchesSelector=ge.test(P=O.matches||O.webkitMatchesSelector||O.mozMatchesSelector||O.oMatchesSelector||O.msMatchesSelector))&&o(function(e){y.disconnectedMatch=P.call(e,"div"),P.call(e,"[s!='']:x"),M.push("!=",re)}),R=R.length&&new RegExp(R.join("|")),M=M.length&&new RegExp(M.join("|")),t=ge.test(O.compareDocumentPosition),L=t||ge.test(O.contains)?function(e,t){var i=9===e.nodeType?e.documentElement:e,n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},V=t?function(e,t){if(e===t)return D=!0,0;var i=!e.compareDocumentPosition-!t.compareDocumentPosition;return i?i:(i=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&i||!y.sortDetached&&t.compareDocumentPosition(e)===i?e===T||e.ownerDocument===z&&L(z,e)?-1:t===T||t.ownerDocument===z&&L(z,t)?1:B?ee(B,e)-ee(B,t):0:4&i?-1:1)}:function(e,t){if(e===t)return D=!0,0;var i,n=0,o=e.parentNode,r=t.parentNode,s=[e],l=[t];if(!o||!r)return e===T?-1:t===T?1:o?-1:r?1:B?ee(B,e)-ee(B,t):0;if(o===r)return a(e,t);for(i=e;i=i.parentNode;)s.unshift(i);for(i=t;i=i.parentNode;)l.unshift(i);for(;s[n]===l[n];)n++;return n?a(s[n],l[n]):s[n]===z?-1:l[n]===z?1:0},T):T},t.matches=function(e,i){return t(e,null,null,i)},t.matchesSelector=function(e,i){if((e.ownerDocument||e)!==T&&I(e),i=i.replace(ce,"='$1']"),y.matchesSelector&&j&&!U[i+" "]&&(!M||!M.test(i))&&(!R||!R.test(i)))try{var n=P.call(e,i);if(n||y.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){}return t(i,T,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==T&&I(e),L(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==T&&I(e);var i=x.attrHandle[t.toLowerCase()],n=i&&W.call(x.attrHandle,t.toLowerCase())?i(e,t,!j):void 0;return void 0!==n?n:y.attributes||!j?e.getAttribute(t):(n=e.getAttributeNode(t))&&n.specified?n.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,i=[],n=0,o=0;if(D=!y.detectDuplicates,B=!y.sortStable&&e.slice(0),e.sort(V),D){for(;t=e[o++];)t===e[o]&&(n=i.push(o));for(;n--;)e.splice(i[n],1)}return B=null,e},k=t.getText=function(e){var t,i="",n=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)i+=k(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[n++];)i+=k(t);return i},x=t.selectors={cacheLength:50,createPseudo:n,match:pe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(we,ye),e[3]=(e[3]||e[4]||e[5]||"").replace(we,ye),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,i=!e[6]&&e[2];return pe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":i&&de.test(i)&&(t=F(i,!0))&&(t=i.indexOf(")",i.length-t)-i.length)&&(e[0]=e[0].slice(0,t),e[2]=i.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(we,ye).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=H[e+" "];return t||(t=new RegExp("(^|"+ie+")"+e+"("+ie+"|$)"))&&H(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,i,n){return function(o){var r=t.attr(o,e);return null==r?"!="===i:!i||(r+="","="===i?r===n:"!="===i?r!==n:"^="===i?n&&0===r.indexOf(n):"*="===i?n&&r.indexOf(n)>-1:"$="===i?n&&r.slice(-n.length)===n:"~="===i?(" "+r.replace(ae," ")+" ").indexOf(n)>-1:"|="===i&&(r===n||r.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,i,n,o){var r="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===n&&0===o?function(e){return!!e.parentNode}:function(t,i,l){var u,c,d,f,p,m,h=r!==a?"nextSibling":"previousSibling",g=t.parentNode,b=s&&t.nodeName.toLowerCase(),v=!l&&!s,A=!1;if(g){if(r){for(;h;){for(f=t;f=f[h];)if(s?f.nodeName.toLowerCase()===b:1===f.nodeType)return!1;m=h="only"===e&&!m&&"nextSibling"}return!0}if(m=[a?g.firstChild:g.lastChild],a&&v){for(f=g,d=f[N]||(f[N]={}),c=d[f.uniqueID]||(d[f.uniqueID]={}),u=c[e]||[],p=u[0]===Y&&u[1],A=p&&u[2],f=p&&g.childNodes[p];f=++p&&f&&f[h]||(A=p=0)||m.pop();)if(1===f.nodeType&&++A&&f===t){c[e]=[Y,p,A];break}}else if(v&&(f=t,d=f[N]||(f[N]={}),c=d[f.uniqueID]||(d[f.uniqueID]={}),u=c[e]||[],p=u[0]===Y&&u[1],A=p),A===!1)for(;(f=++p&&f&&f[h]||(A=p=0)||m.pop())&&((s?f.nodeName.toLowerCase()!==b:1!==f.nodeType)||!++A||(v&&(d=f[N]||(f[N]={}),c=d[f.uniqueID]||(d[f.uniqueID]={}),c[e]=[Y,A]),f!==t)););return A-=o,A===n||A%n===0&&A/n>=0}}},PSEUDO:function(e,i){var o,r=x.pseudos[e]||x.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return r[N]?r(i):r.length>1?(o=[e,e,"",i],x.setFilters.hasOwnProperty(e.toLowerCase())?n(function(e,t){for(var n,o=r(e,i),a=o.length;a--;)n=ee(e,o[a]),e[n]=!(t[n]=o[a])}):function(e){return r(e,0,o)}):r}},pseudos:{not:n(function(e){var t=[],i=[],o=E(e.replace(se,"$1"));return o[N]?n(function(e,t,i,n){for(var r,a=o(e,null,n,[]),s=e.length;s--;)(r=a[s])&&(e[s]=!(t[s]=r))}):function(e,n,r){return t[0]=e,o(t,null,r,i),t[0]=null,!i.pop()}}),has:n(function(e){return function(i){return t(e,i).length>0}}),contains:n(function(e){return e=e.replace(we,ye),function(t){return(t.textContent||t.innerText||k(t)).indexOf(e)>-1}}),lang:n(function(e){return fe.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(we,ye).toLowerCase(),function(t){var i;do if(i=j?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return i=i.toLowerCase(),i===e||0===i.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var i=e.location&&e.location.hash;return i&&i.slice(1)===t.id},root:function(e){return e===O},focus:function(e){return e===T.activeElement&&(!T.hasFocus||T.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!x.pseudos.empty(e)},header:function(e){return he.test(e.nodeName)},input:function(e){return me.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:u(function(){return[0]}),last:u(function(e,t){return[t-1]}),eq:u(function(e,t,i){return[i<0?i+t:i]}),even:u(function(e,t){for(var i=0;i=0;)e.push(n);return e}),gt:u(function(e,t,i){for(var n=i<0?i+t:i;++n2&&"ID"===(a=r[0]).type&&y.getById&&9===t.nodeType&&j&&x.relative[r[1].type]){if(t=(x.find.ID(a.matches[0].replace(we,ye),t)||[])[0],!t)return i;u&&(t=t.parentNode),e=e.slice(r.shift().value.length)}for(o=pe.needsContext.test(e)?0:r.length;o--&&(a=r[o],!x.relative[s=a.type]);)if((l=x.find[s])&&(n=l(a.matches[0].replace(we,ye),ve.test(r[0].type)&&c(t.parentNode)||t))){if(r.splice(o,1),e=n.length&&f(r),!e)return K.apply(i,n),i;break}}return(u||E(e,d))(n,t,!j,i,!t||ve.test(e)&&c(t.parentNode)||t),i},y.sortStable=N.split("").sort(V).join("")===N,y.detectDuplicates=!!D,I(),y.sortDetached=o(function(e){return 1&e.compareDocumentPosition(T.createElement("div"))}),o(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||r("type|href|height|width",function(e,t,i){if(!i)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),y.attributes&&o(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||r("value",function(e,t,i){if(!i&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),o(function(e){return null==e.getAttribute("disabled")})||r(te,function(e,t,i){var n;if(!i)return e[t]===!0?t.toLowerCase():(n=e.getAttributeNode(t))&&n.specified?n.value:null}),t}(e);pe.find=ve,pe.expr=ve.selectors,pe.expr[":"]=pe.expr.pseudos,pe.uniqueSort=pe.unique=ve.uniqueSort,pe.text=ve.getText,pe.isXMLDoc=ve.isXML,pe.contains=ve.contains;var Ae=function(e,t,i){for(var n=[],o=void 0!==i;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(o&&pe(e).is(i))break;n.push(e)}return n},we=function(e,t){for(var i=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&i.push(e);return i},ye=pe.expr.match.needsContext,xe=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,ke=/^.[^:#\[\.,]*$/;pe.filter=function(e,t,i){var n=t[0];return i&&(e=":not("+e+")"),1===t.length&&1===n.nodeType?pe.find.matchesSelector(n,e)?[n]:[]:pe.find.matches(e,pe.grep(t,function(e){return 1===e.nodeType}))},pe.fn.extend({find:function(e){var t,i=[],n=this,o=n.length;if("string"!=typeof e)return this.pushStack(pe(e).filter(function(){for(t=0;t1?pe.unique(i):i),i.selector=this.selector?this.selector+" "+e:e,i},filter:function(e){return this.pushStack(n(this,e||[],!1))},not:function(e){return this.pushStack(n(this,e||[],!0))},is:function(e){return!!n(this,"string"==typeof e&&ye.test(e)?pe(e):e||[],!1).length}});var Ce,Fe=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,Ee=pe.fn.init=function(e,t,i){var n,o;if(!e)return this;if(i=i||Ce,"string"==typeof e){if(n="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:Fe.exec(e),!n||!n[1]&&t)return!t||t.jquery?(t||i).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof pe?t[0]:t,pe.merge(this,pe.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:ne,!0)),xe.test(n[1])&&pe.isPlainObject(t))for(n in t)pe.isFunction(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}if(o=ne.getElementById(n[2]),o&&o.parentNode){if(o.id!==n[2])return Ce.find(e);this.length=1,this[0]=o}return this.context=ne,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):pe.isFunction(e)?"undefined"!=typeof i.ready?i.ready(e):e(pe):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),pe.makeArray(e,this))};Ee.prototype=pe.fn,Ce=pe(ne);var _e=/^(?:parents|prev(?:Until|All))/,Se={children:!0,contents:!0,next:!0,prev:!0};pe.fn.extend({has:function(e){var t,i=pe(e,this),n=i.length;return this.filter(function(){for(t=0;t-1:1===i.nodeType&&pe.find.matchesSelector(i,e))){r.push(i);break}return this.pushStack(r.length>1?pe.uniqueSort(r):r)},index:function(e){return e?"string"==typeof e?pe.inArray(this[0],pe(e)):pe.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(pe.uniqueSort(pe.merge(this.get(),pe(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),pe.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Ae(e,"parentNode")},parentsUntil:function(e,t,i){return Ae(e,"parentNode",i)},next:function(e){return o(e,"nextSibling")},prev:function(e){return o(e,"previousSibling")},nextAll:function(e){return Ae(e,"nextSibling")},prevAll:function(e){return Ae(e,"previousSibling")},nextUntil:function(e,t,i){return Ae(e,"nextSibling",i)},prevUntil:function(e,t,i){return Ae(e,"previousSibling",i)},siblings:function(e){return we((e.parentNode||{}).firstChild,e)},children:function(e){return we(e.firstChild)},contents:function(e){return pe.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:pe.merge([],e.childNodes)}},function(e,t){pe.fn[e]=function(i,n){var o=pe.map(this,t,i);return"Until"!==e.slice(-5)&&(n=i),n&&"string"==typeof n&&(o=pe.filter(n,o)),this.length>1&&(Se[e]||(o=pe.uniqueSort(o)),_e.test(e)&&(o=o.reverse())),this.pushStack(o)}});var Be=/\S+/g;pe.Callbacks=function(e){e="string"==typeof e?r(e):pe.extend({},e);var t,i,n,o,a=[],s=[],l=-1,u=function(){for(o=e.once,n=t=!0;s.length;l=-1)for(i=s.shift();++l-1;)a.splice(i,1),i<=l&&l--}),this},has:function(e){return e?pe.inArray(e,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return o=s=[],a=i="",this},disabled:function(){return!a},lock:function(){return o=!0,i||c.disable(),this},locked:function(){return!!o},fireWith:function(e,i){return o||(i=i||[],i=[e,i.slice?i.slice():i],s.push(i),t||u()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!n}};return c},pe.extend({Deferred:function(e){var t=[["resolve","done",pe.Callbacks("once memory"),"resolved"],["reject","fail",pe.Callbacks("once memory"),"rejected"],["notify","progress",pe.Callbacks("memory")]],i="pending",n={state:function(){return i},always:function(){return o.done(arguments).fail(arguments),this},then:function(){var e=arguments;return pe.Deferred(function(i){pe.each(t,function(t,r){var a=pe.isFunction(e[t])&&e[t];o[r[1]](function(){var e=a&&a.apply(this,arguments);e&&pe.isFunction(e.promise)?e.promise().progress(i.notify).done(i.resolve).fail(i.reject):i[r[0]+"With"](this===n?i.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?pe.extend(e,n):n}},o={};return n.pipe=n.then,pe.each(t,function(e,r){var a=r[2],s=r[3];n[r[1]]=a.add,s&&a.add(function(){i=s},t[1^e][2].disable,t[2][2].lock),o[r[0]]=function(){return o[r[0]+"With"](this===o?n:this,arguments),this},o[r[0]+"With"]=a.fireWith}),n.promise(o),e&&e.call(o,o),o},when:function(e){var t,i,n,o=0,r=oe.call(arguments),a=r.length,s=1!==a||e&&pe.isFunction(e.promise)?a:0,l=1===s?e:pe.Deferred(),u=function(e,i,n){return function(o){i[e]=this,n[e]=arguments.length>1?oe.call(arguments):o,n===t?l.notifyWith(i,n):--s||l.resolveWith(i,n)}};if(a>1)for(t=new Array(a),i=new Array(a),n=new Array(a);o0||(De.resolveWith(ne,[pe]),pe.fn.triggerHandler&&(pe(ne).triggerHandler("ready"),pe(ne).off("ready"))))}}),pe.ready.promise=function(t){if(!De)if(De=pe.Deferred(),"complete"===ne.readyState||"loading"!==ne.readyState&&!ne.documentElement.doScroll)e.setTimeout(pe.ready);else if(ne.addEventListener)ne.addEventListener("DOMContentLoaded",s),e.addEventListener("load",s);else{ne.attachEvent("onreadystatechange",s),e.attachEvent("onload",s);var i=!1;try{i=null==e.frameElement&&ne.documentElement}catch(e){}i&&i.doScroll&&!function t(){if(!pe.isReady){try{i.doScroll("left")}catch(i){return e.setTimeout(t,50)}a(),pe.ready()}}()}return De.promise(t)},pe.ready.promise();var Ie;for(Ie in pe(de))break;de.ownFirst="0"===Ie,de.inlineBlockNeedsLayout=!1,pe(function(){var e,t,i,n;i=ne.getElementsByTagName("body")[0],i&&i.style&&(t=ne.createElement("div"),n=ne.createElement("div"),n.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",i.appendChild(n).appendChild(t),"undefined"!=typeof t.style.zoom&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",de.inlineBlockNeedsLayout=e=3===t.offsetWidth,e&&(i.style.zoom=1)),i.removeChild(n))}),function(){var e=ne.createElement("div");de.deleteExpando=!0;try{delete e.test}catch(e){de.deleteExpando=!1}e=null}();var Te=function(e){var t=pe.noData[(e.nodeName+" ").toLowerCase()],i=+e.nodeType||1;return(1===i||9===i)&&(!t||t!==!0&&e.getAttribute("classid")===t)},Oe=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,je=/([A-Z])/g;pe.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?pe.cache[e[pe.expando]]:e[pe.expando],!!e&&!u(e)},data:function(e,t,i){return c(e,t,i)},removeData:function(e,t){return d(e,t)},_data:function(e,t,i){return c(e,t,i,!0)},_removeData:function(e,t){return d(e,t,!0)}}),pe.fn.extend({data:function(e,t){var i,n,o,r=this[0],a=r&&r.attributes;if(void 0===e){if(this.length&&(o=pe.data(r),1===r.nodeType&&!pe._data(r,"parsedAttrs"))){for(i=a.length;i--;)a[i]&&(n=a[i].name,0===n.indexOf("data-")&&(n=pe.camelCase(n.slice(5)),l(r,n,o[n])));pe._data(r,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){pe.data(this,e)}):arguments.length>1?this.each(function(){pe.data(this,e,t)}):r?l(r,e,pe.data(r,e)):void 0},removeData:function(e){return this.each(function(){pe.removeData(this,e)})}}),pe.extend({queue:function(e,t,i){var n;if(e)return t=(t||"fx")+"queue",n=pe._data(e,t),i&&(!n||pe.isArray(i)?n=pe._data(e,t,pe.makeArray(i)):n.push(i)),n||[]},dequeue:function(e,t){t=t||"fx";var i=pe.queue(e,t),n=i.length,o=i.shift(),r=pe._queueHooks(e,t),a=function(){pe.dequeue(e,t)};"inprogress"===o&&(o=i.shift(),n--),o&&("fx"===t&&i.unshift("inprogress"),delete r.stop,o.call(e,a,r)),!n&&r&&r.empty.fire()},_queueHooks:function(e,t){var i=t+"queueHooks";return pe._data(e,i)||pe._data(e,i,{empty:pe.Callbacks("once memory").add(function(){pe._removeData(e,t+"queue"),pe._removeData(e,i)})})}}),pe.fn.extend({queue:function(e,t){var i=2;return"string"!=typeof e&&(t=e,e="fx",i--),arguments.length
    a",de.leadingWhitespace=3===e.firstChild.nodeType,de.tbody=!e.getElementsByTagName("tbody").length,de.htmlSerialize=!!e.getElementsByTagName("link").length,de.html5Clone="<:nav>"!==ne.createElement("nav").cloneNode(!0).outerHTML,i.type="checkbox",i.checked=!0,t.appendChild(i),de.appendChecked=i.checked,e.innerHTML="",de.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue,t.appendChild(e),i=ne.createElement("input"),i.setAttribute("type","radio"),i.setAttribute("checked","checked"),i.setAttribute("name","t"),e.appendChild(i),de.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,de.noCloneEvent=!!e.addEventListener,e[pe.expando]=1,de.attributes=!e.getAttribute(pe.expando)}();var Ue={option:[1,""],legend:[1,"
    ","
    "],area:[1,"",""],param:[1,"",""],thead:[1,"","
    "],tr:[2,"","
    "],col:[2,"","
    "],td:[3,"","
    "],_default:de.htmlSerialize?[0,"",""]:[1,"X
    ","
    "]};Ue.optgroup=Ue.option,Ue.tbody=Ue.tfoot=Ue.colgroup=Ue.caption=Ue.thead,Ue.th=Ue.td;var Ve=/<|&#?\w+;/,Ge=/-1&&(m=p.split("."),p=m.shift(),m.sort()),a=p.indexOf(":")<0&&"on"+p,t=t[pe.expando]?t:new pe.Event(p,"object"==typeof t&&t),t.isTrigger=o?2:3,t.namespace=m.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=n),i=null==i?[t]:pe.makeArray(i,[t]),u=pe.event.special[p]||{},o||!u.trigger||u.trigger.apply(n,i)!==!1)){if(!o&&!u.noBubble&&!pe.isWindow(n)){for(l=u.delegateType||p,Ze.test(l+p)||(s=s.parentNode);s;s=s.parentNode)f.push(s),c=s;c===(n.ownerDocument||ne)&&f.push(c.defaultView||c.parentWindow||e)}for(d=0;(s=f[d++])&&!t.isPropagationStopped();)t.type=d>1?l:u.bindType||p,r=(pe._data(s,"events")||{})[t.type]&&pe._data(s,"handle"),r&&r.apply(s,i),r=a&&s[a],r&&r.apply&&Te(s)&&(t.result=r.apply(s,i),t.result===!1&&t.preventDefault());if(t.type=p,!o&&!t.isDefaultPrevented()&&(!u._default||u._default.apply(f.pop(),i)===!1)&&Te(n)&&a&&n[p]&&!pe.isWindow(n)){c=n[a],c&&(n[a]=null),pe.event.triggered=p;try{n[p]()}catch(e){} -pe.event.triggered=void 0,c&&(n[a]=c)}return t.result}},dispatch:function(e){e=pe.event.fix(e);var t,i,n,o,r,a=[],s=oe.call(arguments),l=(pe._data(this,"events")||{})[e.type]||[],u=pe.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!u.preDispatch||u.preDispatch.call(this,e)!==!1){for(a=pe.event.handlers.call(this,e,l),t=0;(o=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=o.elem,i=0;(r=o.handlers[i++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(r.namespace)||(e.handleObj=r,e.data=r.data,n=((pe.event.special[r.origType]||{}).handle||r.handler).apply(o.elem,s),void 0!==n&&(e.result=n)===!1&&(e.preventDefault(),e.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,e),e.result}},handlers:function(e,t){var i,n,o,r,a=[],s=t.delegateCount,l=e.target;if(s&&l.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(n=[],i=0;i-1:pe.find(o,this,null,[l]).length),n[o]&&n.push(r);n.length&&a.push({elem:l,handlers:n})}return s]","i"),tt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,it=/\s*$/g,at=p(ne),st=at.appendChild(ne.createElement("div"));pe.extend({htmlPrefilter:function(e){return e.replace(tt,"<$1>")},clone:function(e,t,i){var n,o,r,a,s,l=pe.contains(e.ownerDocument,e);if(de.html5Clone||pe.isXMLDoc(e)||!et.test("<"+e.nodeName+">")?r=e.cloneNode(!0):(st.innerHTML=e.outerHTML,st.removeChild(r=st.firstChild)),!(de.noCloneEvent&&de.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||pe.isXMLDoc(e)))for(n=m(r),s=m(e),a=0;null!=(o=s[a]);++a)n[a]&&E(o,n[a]);if(t)if(i)for(s=s||m(e),n=n||m(r),a=0;null!=(o=s[a]);a++)F(o,n[a]);else F(e,r);return n=m(r,"script"),n.length>0&&h(n,!l&&m(e,"script")),n=s=o=null,r},cleanData:function(e,t){for(var i,n,o,r,a=0,s=pe.expando,l=pe.cache,u=de.attributes,c=pe.event.special;null!=(i=e[a]);a++)if((t||Te(i))&&(o=i[s],r=o&&l[o])){if(r.events)for(n in r.events)c[n]?pe.event.remove(i,n):pe.removeEvent(i,n,r.handle);l[o]&&(delete l[o],u||"undefined"==typeof i.removeAttribute?i[s]=void 0:i.removeAttribute(s),ie.push(o))}}}),pe.fn.extend({domManip:_,detach:function(e){return S(this,e,!0)},remove:function(e){return S(this,e)},text:function(e){return Ne(this,function(e){return void 0===e?pe.text(this):this.empty().append((this[0]&&this[0].ownerDocument||ne).createTextNode(e))},null,e,arguments.length)},append:function(){return _(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=x(this,e);t.appendChild(e)}})},prepend:function(){return _(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=x(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return _(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return _(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&pe.cleanData(m(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&pe.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return pe.clone(this,e,t)})},html:function(e){return Ne(this,function(e){var t=this[0]||{},i=0,n=this.length;if(void 0===e)return 1===t.nodeType?t.innerHTML.replace($e,""):void 0;if("string"==typeof e&&!it.test(e)&&(de.htmlSerialize||!et.test(e))&&(de.leadingWhitespace||!He.test(e))&&!Ue[(Ye.exec(e)||["",""])[1].toLowerCase()]){e=pe.htmlPrefilter(e);try{for(;it",u.childNodes[0].style.borderCollapse="separate",t=u.getElementsByTagName("td"),t[0].style.cssText="margin:0;border:0;padding:0;display:none",r=0===t[0].offsetHeight,r&&(t[0].style.display="",t[1].style.display="none",r=0===t[0].offsetHeight)),d.removeChild(l)}var i,n,o,r,a,s,l=ne.createElement("div"),u=ne.createElement("div");u.style&&(u.style.cssText="float:left;opacity:.5",de.opacity="0.5"===u.style.opacity,de.cssFloat=!!u.style.cssFloat,u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",de.clearCloneStyle="content-box"===u.style.backgroundClip,l=ne.createElement("div"),l.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",u.innerHTML="",l.appendChild(u),de.boxSizing=""===u.style.boxSizing||""===u.style.MozBoxSizing||""===u.style.WebkitBoxSizing,pe.extend(de,{reliableHiddenOffsets:function(){return null==i&&t(),r},boxSizingReliable:function(){return null==i&&t(),o},pixelMarginRight:function(){return null==i&&t(),n},pixelPosition:function(){return null==i&&t(),i},reliableMarginRight:function(){return null==i&&t(),a},reliableMarginLeft:function(){return null==i&&t(),s}}))}();var mt,ht,gt=/^(top|right|bottom|left)$/;e.getComputedStyle?(mt=function(t){var i=t.ownerDocument.defaultView;return i&&i.opener||(i=e),i.getComputedStyle(t)},ht=function(e,t,i){var n,o,r,a,s=e.style;return i=i||mt(e),a=i?i.getPropertyValue(t)||i[t]:void 0,""!==a&&void 0!==a||pe.contains(e.ownerDocument,e)||(a=pe.style(e,t)),i&&!de.pixelMarginRight()&&dt.test(a)&&ct.test(t)&&(n=s.width,o=s.minWidth,r=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=i.width,s.width=n,s.minWidth=o,s.maxWidth=r),void 0===a?a:a+""}):pt.currentStyle&&(mt=function(e){return e.currentStyle},ht=function(e,t,i){var n,o,r,a,s=e.style;return i=i||mt(e),a=i?i[t]:void 0,null==a&&s&&s[t]&&(a=s[t]),dt.test(a)&&!gt.test(t)&&(n=s.left,o=e.runtimeStyle,r=o&&o.left,r&&(o.left=e.currentStyle.left),s.left="fontSize"===t?"1em":a,a=s.pixelLeft+"px",s.left=n,r&&(o.left=r)),void 0===a?a:a+""||"auto"});var bt=/alpha\([^)]*\)/i,vt=/opacity\s*=\s*([^)]*)/i,At=/^(none|table(?!-c[ea]).+)/,wt=new RegExp("^("+Re+")(.*)$","i"),yt={position:"absolute",visibility:"hidden",display:"block"},xt={letterSpacing:"0",fontWeight:"400"},kt=["Webkit","O","Moz","ms"],Ct=ne.createElement("div").style;pe.extend({cssHooks:{opacity:{get:function(e,t){if(t){var i=ht(e,"opacity");return""===i?"1":i}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:de.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,i,n){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,r,a,s=pe.camelCase(t),l=e.style;if(t=pe.cssProps[s]||(pe.cssProps[s]=T(s)||s),a=pe.cssHooks[t]||pe.cssHooks[s],void 0===i)return a&&"get"in a&&void 0!==(o=a.get(e,!1,n))?o:l[t];if(r=typeof i,"string"===r&&(o=Me.exec(i))&&o[1]&&(i=f(e,t,o),r="number"),null!=i&&i===i&&("number"===r&&(i+=o&&o[3]||(pe.cssNumber[s]?"":"px")),de.clearCloneStyle||""!==i||0!==t.indexOf("background")||(l[t]="inherit"),!(a&&"set"in a&&void 0===(i=a.set(e,i,n)))))try{l[t]=i}catch(e){}}},css:function(e,t,i,n){var o,r,a,s=pe.camelCase(t);return t=pe.cssProps[s]||(pe.cssProps[s]=T(s)||s),a=pe.cssHooks[t]||pe.cssHooks[s],a&&"get"in a&&(r=a.get(e,!0,i)),void 0===r&&(r=ht(e,t,n)),"normal"===r&&t in xt&&(r=xt[t]),""===i||i?(o=parseFloat(r),i===!0||isFinite(o)?o||0:r):r}}),pe.each(["height","width"],function(e,t){pe.cssHooks[t]={get:function(e,i,n){if(i)return At.test(pe.css(e,"display"))&&0===e.offsetWidth?ft(e,yt,function(){return M(e,t,n)}):M(e,t,n)},set:function(e,i,n){var o=n&&mt(e);return j(e,i,n?R(e,t,n,de.boxSizing&&"border-box"===pe.css(e,"boxSizing",!1,o),o):0)}}}),de.opacity||(pe.cssHooks.opacity={get:function(e,t){return vt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var i=e.style,n=e.currentStyle,o=pe.isNumeric(t)?"alpha(opacity="+100*t+")":"",r=n&&n.filter||i.filter||"";i.zoom=1,(t>=1||""===t)&&""===pe.trim(r.replace(bt,""))&&i.removeAttribute&&(i.removeAttribute("filter"),""===t||n&&!n.filter)||(i.filter=bt.test(r)?r.replace(bt,o):r+" "+o)}}),pe.cssHooks.marginRight=I(de.reliableMarginRight,function(e,t){if(t)return ft(e,{display:"inline-block"},ht,[e,"marginRight"])}),pe.cssHooks.marginLeft=I(de.reliableMarginLeft,function(e,t){if(t)return(parseFloat(ht(e,"marginLeft"))||(pe.contains(e.ownerDocument,e)?e.getBoundingClientRect().left-ft(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}):0))+"px"}),pe.each({margin:"",padding:"",border:"Width"},function(e,t){pe.cssHooks[e+t]={expand:function(i){for(var n=0,o={},r="string"==typeof i?i.split(" "):[i];n<4;n++)o[e+Pe[n]+t]=r[n]||r[n-2]||r[0];return o}},ct.test(e)||(pe.cssHooks[e+t].set=j)}),pe.fn.extend({css:function(e,t){return Ne(this,function(e,t,i){var n,o,r={},a=0;if(pe.isArray(t)){for(n=mt(e),o=t.length;a1)},show:function(){return O(this,!0)},hide:function(){return O(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Le(this)?pe(this).show():pe(this).hide()})}}),pe.Tween=P,P.prototype={constructor:P,init:function(e,t,i,n,o,r){this.elem=e,this.prop=i,this.easing=o||pe.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=n,this.unit=r||(pe.cssNumber[i]?"":"px")},cur:function(){var e=P.propHooks[this.prop];return e&&e.get?e.get(this):P.propHooks._default.get(this)},run:function(e){var t,i=P.propHooks[this.prop];return this.options.duration?this.pos=t=pe.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):P.propHooks._default.set(this),this}},P.prototype.init.prototype=P.prototype,P.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=pe.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){pe.fx.step[e.prop]?pe.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[pe.cssProps[e.prop]]&&!pe.cssHooks[e.prop]?e.elem[e.prop]=e.now:pe.style(e.elem,e.prop,e.now+e.unit)}}},P.propHooks.scrollTop=P.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},pe.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},pe.fx=P.prototype.init,pe.fx.step={};var Ft,Et,_t=/^(?:toggle|show|hide)$/,St=/queueHooks$/;pe.Animation=pe.extend(H,{tweeners:{"*":[function(e,t){var i=this.createTween(e,t);return f(i.elem,e,Me.exec(t),i),i}]},tweener:function(e,t){pe.isFunction(e)?(t=e,e=["*"]):e=e.match(Be);for(var i,n=0,o=e.length;n
    a",e=i.getElementsByTagName("a")[0],t.setAttribute("type","checkbox"),i.appendChild(t),e=i.getElementsByTagName("a")[0],e.style.cssText="top:1px",de.getSetAttribute="t"!==i.className,de.style=/top/.test(e.getAttribute("style")),de.hrefNormalized="/a"===e.getAttribute("href"),de.checkOn=!!t.value,de.optSelected=o.selected,de.enctype=!!ne.createElement("form").enctype,n.disabled=!0,de.optDisabled=!o.disabled,t=ne.createElement("input"),t.setAttribute("value",""),de.input=""===t.getAttribute("value"),t.value="t",t.setAttribute("type","radio"),de.radioValue="t"===t.value}();var Bt=/\r/g,Dt=/[\x20\t\r\n\f]+/g;pe.fn.extend({val:function(e){var t,i,n,o=this[0];{if(arguments.length)return n=pe.isFunction(e),this.each(function(i){var o;1===this.nodeType&&(o=n?e.call(this,i,pe(this).val()):e,null==o?o="":"number"==typeof o?o+="":pe.isArray(o)&&(o=pe.map(o,function(e){return null==e?"":e+""})),t=pe.valHooks[this.type]||pe.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,o,"value")||(this.value=o))});if(o)return t=pe.valHooks[o.type]||pe.valHooks[o.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(i=t.get(o,"value"))?i:(i=o.value,"string"==typeof i?i.replace(Bt,""):null==i?"":i)}}}),pe.extend({valHooks:{option:{get:function(e){var t=pe.find.attr(e,"value");return null!=t?t:pe.trim(pe.text(e)).replace(Dt," ")}},select:{get:function(e){for(var t,i,n=e.options,o=e.selectedIndex,r="select-one"===e.type||o<0,a=r?null:[],s=r?o+1:n.length,l=o<0?s:r?o:0;l-1)try{n.selected=i=!0}catch(e){n.scrollHeight}else n.selected=!1;return i||(e.selectedIndex=-1),o}}}}),pe.each(["radio","checkbox"],function(){pe.valHooks[this]={set:function(e,t){if(pe.isArray(t))return e.checked=pe.inArray(pe(e).val(),t)>-1}},de.checkOn||(pe.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var It,Tt,Ot=pe.expr.attrHandle,jt=/^(?:checked|selected)$/i,Rt=de.getSetAttribute,Mt=de.input;pe.fn.extend({attr:function(e,t){return Ne(this,pe.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){pe.removeAttr(this,e)})}}),pe.extend({attr:function(e,t,i){var n,o,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return"undefined"==typeof e.getAttribute?pe.prop(e,t,i):(1===r&&pe.isXMLDoc(e)||(t=t.toLowerCase(),o=pe.attrHooks[t]||(pe.expr.match.bool.test(t)?Tt:It)),void 0!==i?null===i?void pe.removeAttr(e,t):o&&"set"in o&&void 0!==(n=o.set(e,i,t))?n:(e.setAttribute(t,i+""),i):o&&"get"in o&&null!==(n=o.get(e,t))?n:(n=pe.find.attr(e,t),null==n?void 0:n))},attrHooks:{type:{set:function(e,t){if(!de.radioValue&&"radio"===t&&pe.nodeName(e,"input")){var i=e.value;return e.setAttribute("type",t),i&&(e.value=i),t}}}},removeAttr:function(e,t){var i,n,o=0,r=t&&t.match(Be);if(r&&1===e.nodeType)for(;i=r[o++];)n=pe.propFix[i]||i,pe.expr.match.bool.test(i)?Mt&&Rt||!jt.test(i)?e[n]=!1:e[pe.camelCase("default-"+i)]=e[n]=!1:pe.attr(e,i,""),e.removeAttribute(Rt?i:n)}}),Tt={set:function(e,t,i){return t===!1?pe.removeAttr(e,i):Mt&&Rt||!jt.test(i)?e.setAttribute(!Rt&&pe.propFix[i]||i,i):e[pe.camelCase("default-"+i)]=e[i]=!0,i}},pe.each(pe.expr.match.bool.source.match(/\w+/g),function(e,t){var i=Ot[t]||pe.find.attr;Mt&&Rt||!jt.test(t)?Ot[t]=function(e,t,n){var o,r;return n||(r=Ot[t],Ot[t]=o,o=null!=i(e,t,n)?t.toLowerCase():null,Ot[t]=r),o}:Ot[t]=function(e,t,i){if(!i)return e[pe.camelCase("default-"+t)]?t.toLowerCase():null}}),Mt&&Rt||(pe.attrHooks.value={set:function(e,t,i){return pe.nodeName(e,"input")?void(e.defaultValue=t):It&&It.set(e,t,i)}}),Rt||(It={set:function(e,t,i){var n=e.getAttributeNode(i);if(n||e.setAttributeNode(n=e.ownerDocument.createAttribute(i)),n.value=t+="","value"===i||t===e.getAttribute(i))return t}},Ot.id=Ot.name=Ot.coords=function(e,t,i){var n;if(!i)return(n=e.getAttributeNode(t))&&""!==n.value?n.value:null},pe.valHooks.button={get:function(e,t){var i=e.getAttributeNode(t);if(i&&i.specified)return i.value},set:It.set},pe.attrHooks.contenteditable={set:function(e,t,i){It.set(e,""!==t&&t,i)}},pe.each(["width","height"],function(e,t){pe.attrHooks[t]={set:function(e,i){if(""===i)return e.setAttribute(t,"auto"),i}}})),de.style||(pe.attrHooks.style={get:function(e){return e.style.cssText||void 0},set:function(e,t){return e.style.cssText=t+""}});var Pt=/^(?:input|select|textarea|button|object)$/i,Lt=/^(?:a|area)$/i;pe.fn.extend({prop:function(e,t){return Ne(this,pe.prop,e,t,arguments.length>1)},removeProp:function(e){return e=pe.propFix[e]||e,this.each(function(){try{this[e]=void 0,delete this[e]}catch(e){}})}}),pe.extend({prop:function(e,t,i){var n,o,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&pe.isXMLDoc(e)||(t=pe.propFix[t]||t,o=pe.propHooks[t]),void 0!==i?o&&"set"in o&&void 0!==(n=o.set(e,i,t))?n:e[t]=i:o&&"get"in o&&null!==(n=o.get(e,t))?n:e[t]},propHooks:{tabIndex:{get:function(e){var t=pe.find.attr(e,"tabindex");return t?parseInt(t,10):Pt.test(e.nodeName)||Lt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),de.hrefNormalized||pe.each(["href","src"],function(e,t){pe.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),de.optSelected||(pe.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),pe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){pe.propFix[this.toLowerCase()]=this}),de.enctype||(pe.propFix.enctype="encoding");var Nt=/[\t\r\n\f]/g;pe.fn.extend({addClass:function(e){var t,i,n,o,r,a,s,l=0;if(pe.isFunction(e))return this.each(function(t){pe(this).addClass(e.call(this,t,q(this)))});if("string"==typeof e&&e)for(t=e.match(Be)||[];i=this[l++];)if(o=q(i),n=1===i.nodeType&&(" "+o+" ").replace(Nt," ")){for(a=0;r=t[a++];)n.indexOf(" "+r+" ")<0&&(n+=r+" ");s=pe.trim(n),o!==s&&pe.attr(i,"class",s)}return this},removeClass:function(e){var t,i,n,o,r,a,s,l=0;if(pe.isFunction(e))return this.each(function(t){pe(this).removeClass(e.call(this,t,q(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(Be)||[];i=this[l++];)if(o=q(i),n=1===i.nodeType&&(" "+o+" ").replace(Nt," ")){for(a=0;r=t[a++];)for(;n.indexOf(" "+r+" ")>-1;)n=n.replace(" "+r+" "," ");s=pe.trim(n),o!==s&&pe.attr(i,"class",s)}return this},toggleClass:function(e,t){var i=typeof e;return"boolean"==typeof t&&"string"===i?t?this.addClass(e):this.removeClass(e):pe.isFunction(e)?this.each(function(i){pe(this).toggleClass(e.call(this,i,q(this),t),t)}):this.each(function(){var t,n,o,r;if("string"===i)for(n=0,o=pe(this),r=e.match(Be)||[];t=r[n++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==i||(t=q(this),t&&pe._data(this,"__className__",t),pe.attr(this,"class",t||e===!1?"":pe._data(this,"__className__")||""))})},hasClass:function(e){var t,i,n=0;for(t=" "+e+" ";i=this[n++];)if(1===i.nodeType&&(" "+q(i)+" ").replace(Nt," ").indexOf(t)>-1)return!0;return!1}}),pe.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){pe.fn[t]=function(e,i){return arguments.length>0?this.on(t,null,e,i):this.trigger(t)}}),pe.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}});var zt=e.location,Yt=pe.now(),Qt=/\?/,Ht=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;pe.parseJSON=function(t){if(e.JSON&&e.JSON.parse)return e.JSON.parse(t+"");var i,n=null,o=pe.trim(t+"");return o&&!pe.trim(o.replace(Ht,function(e,t,o,r){return i&&t&&(n=0),0===n?e:(i=o||t,n+=!r-!o,"")}))?Function("return "+o)():pe.error("Invalid JSON: "+t)},pe.parseXML=function(t){var i,n;if(!t||"string"!=typeof t)return null;try{e.DOMParser?(n=new e.DOMParser,i=n.parseFromString(t,"text/xml")):(i=new e.ActiveXObject("Microsoft.XMLDOM"),i.async="false",i.loadXML(t))}catch(e){i=void 0}return i&&i.documentElement&&!i.getElementsByTagName("parsererror").length||pe.error("Invalid XML: "+t),i};var qt=/#.*$/,Ut=/([?&])_=[^&]*/,Vt=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Gt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Wt=/^(?:GET|HEAD)$/,Jt=/^\/\//,Xt=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Zt={},Kt={},$t="*/".concat("*"),ei=zt.href,ti=Xt.exec(ei.toLowerCase())||[];pe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ei,type:"GET",isLocal:Gt.test(ti[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":$t,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":pe.parseJSON,"text xml":pe.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?G(G(e,pe.ajaxSettings),t):G(pe.ajaxSettings,e)},ajaxPrefilter:U(Zt),ajaxTransport:U(Kt),ajax:function(t,i){function n(t,i,n,o){var r,d,v,A,y,k=i;2!==w&&(w=2,l&&e.clearTimeout(l),c=void 0,s=o||"",x.readyState=t>0?4:0,r=t>=200&&t<300||304===t,n&&(A=W(f,x,n)),A=J(f,A,x,r),r?(f.ifModified&&(y=x.getResponseHeader("Last-Modified"),y&&(pe.lastModified[a]=y),y=x.getResponseHeader("etag"),y&&(pe.etag[a]=y)),204===t||"HEAD"===f.type?k="nocontent":304===t?k="notmodified":(k=A.state,d=A.data,v=A.error,r=!v)):(v=k,!t&&k||(k="error",t<0&&(t=0))),x.status=t,x.statusText=(i||k)+"",r?h.resolveWith(p,[d,k,x]):h.rejectWith(p,[x,k,v]),x.statusCode(b),b=void 0,u&&m.trigger(r?"ajaxSuccess":"ajaxError",[x,f,r?d:v]),g.fireWith(p,[x,k]),u&&(m.trigger("ajaxComplete",[x,f]), ---pe.active||pe.event.trigger("ajaxStop")))}"object"==typeof t&&(i=t,t=void 0),i=i||{};var o,r,a,s,l,u,c,d,f=pe.ajaxSetup({},i),p=f.context||f,m=f.context&&(p.nodeType||p.jquery)?pe(p):pe.event,h=pe.Deferred(),g=pe.Callbacks("once memory"),b=f.statusCode||{},v={},A={},w=0,y="canceled",x={readyState:0,getResponseHeader:function(e){var t;if(2===w){if(!d)for(d={};t=Vt.exec(s);)d[t[1].toLowerCase()]=t[2];t=d[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===w?s:null},setRequestHeader:function(e,t){var i=e.toLowerCase();return w||(e=A[i]=A[i]||e,v[e]=t),this},overrideMimeType:function(e){return w||(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(w<2)for(t in e)b[t]=[b[t],e[t]];else x.always(e[x.status]);return this},abort:function(e){var t=e||y;return c&&c.abort(t),n(0,t),this}};if(h.promise(x).complete=g.add,x.success=x.done,x.error=x.fail,f.url=((t||f.url||ei)+"").replace(qt,"").replace(Jt,ti[1]+"//"),f.type=i.method||i.type||f.method||f.type,f.dataTypes=pe.trim(f.dataType||"*").toLowerCase().match(Be)||[""],null==f.crossDomain&&(o=Xt.exec(f.url.toLowerCase()),f.crossDomain=!(!o||o[1]===ti[1]&&o[2]===ti[2]&&(o[3]||("http:"===o[1]?"80":"443"))===(ti[3]||("http:"===ti[1]?"80":"443")))),f.data&&f.processData&&"string"!=typeof f.data&&(f.data=pe.param(f.data,f.traditional)),V(Zt,f,i,x),2===w)return x;u=pe.event&&f.global,u&&0===pe.active++&&pe.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Wt.test(f.type),a=f.url,f.hasContent||(f.data&&(a=f.url+=(Qt.test(a)?"&":"?")+f.data,delete f.data),f.cache===!1&&(f.url=Ut.test(a)?a.replace(Ut,"$1_="+Yt++):a+(Qt.test(a)?"&":"?")+"_="+Yt++)),f.ifModified&&(pe.lastModified[a]&&x.setRequestHeader("If-Modified-Since",pe.lastModified[a]),pe.etag[a]&&x.setRequestHeader("If-None-Match",pe.etag[a])),(f.data&&f.hasContent&&f.contentType!==!1||i.contentType)&&x.setRequestHeader("Content-Type",f.contentType),x.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+$t+"; q=0.01":""):f.accepts["*"]);for(r in f.headers)x.setRequestHeader(r,f.headers[r]);if(f.beforeSend&&(f.beforeSend.call(p,x,f)===!1||2===w))return x.abort();y="abort";for(r in{success:1,error:1,complete:1})x[r](f[r]);if(c=V(Kt,f,i,x)){if(x.readyState=1,u&&m.trigger("ajaxSend",[x,f]),2===w)return x;f.async&&f.timeout>0&&(l=e.setTimeout(function(){x.abort("timeout")},f.timeout));try{w=1,c.send(v,n)}catch(e){if(!(w<2))throw e;n(-1,e)}}else n(-1,"No Transport");return x},getJSON:function(e,t,i){return pe.get(e,t,i,"json")},getScript:function(e,t){return pe.get(e,void 0,t,"script")}}),pe.each(["get","post"],function(e,t){pe[t]=function(e,i,n,o){return pe.isFunction(i)&&(o=o||n,n=i,i=void 0),pe.ajax(pe.extend({url:e,type:t,dataType:o,data:i,success:n},pe.isPlainObject(e)&&e))}}),pe._evalUrl=function(e){return pe.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},pe.fn.extend({wrapAll:function(e){if(pe.isFunction(e))return this.each(function(t){pe(this).wrapAll(e.call(this,t))});if(this[0]){var t=pe(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return pe.isFunction(e)?this.each(function(t){pe(this).wrapInner(e.call(this,t))}):this.each(function(){var t=pe(this),i=t.contents();i.length?i.wrapAll(e):t.append(e)})},wrap:function(e){var t=pe.isFunction(e);return this.each(function(i){pe(this).wrapAll(t?e.call(this,i):e)})},unwrap:function(){return this.parent().each(function(){pe.nodeName(this,"body")||pe(this).replaceWith(this.childNodes)}).end()}}),pe.expr.filters.hidden=function(e){return de.reliableHiddenOffsets()?e.offsetWidth<=0&&e.offsetHeight<=0&&!e.getClientRects().length:Z(e)},pe.expr.filters.visible=function(e){return!pe.expr.filters.hidden(e)};var ii=/%20/g,ni=/\[\]$/,oi=/\r?\n/g,ri=/^(?:submit|button|image|reset|file)$/i,ai=/^(?:input|select|textarea|keygen)/i;pe.param=function(e,t){var i,n=[],o=function(e,t){t=pe.isFunction(t)?t():null==t?"":t,n[n.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=pe.ajaxSettings&&pe.ajaxSettings.traditional),pe.isArray(e)||e.jquery&&!pe.isPlainObject(e))pe.each(e,function(){o(this.name,this.value)});else for(i in e)K(i,e[i],t,o);return n.join("&").replace(ii,"+")},pe.fn.extend({serialize:function(){return pe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=pe.prop(this,"elements");return e?pe.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!pe(this).is(":disabled")&&ai.test(this.nodeName)&&!ri.test(e)&&(this.checked||!ze.test(e))}).map(function(e,t){var i=pe(this).val();return null==i?null:pe.isArray(i)?pe.map(i,function(e){return{name:t.name,value:e.replace(oi,"\r\n")}}):{name:t.name,value:i.replace(oi,"\r\n")}}).get()}}),pe.ajaxSettings.xhr=void 0!==e.ActiveXObject?function(){return this.isLocal?ee():ne.documentMode>8?$():/^(get|post|head|put|delete|options)$/i.test(this.type)&&$()||ee()}:$;var si=0,li={},ui=pe.ajaxSettings.xhr();e.attachEvent&&e.attachEvent("onunload",function(){for(var e in li)li[e](void 0,!0)}),de.cors=!!ui&&"withCredentials"in ui,ui=de.ajax=!!ui,ui&&pe.ajaxTransport(function(t){if(!t.crossDomain||de.cors){var i;return{send:function(n,o){var r,a=t.xhr(),s=++si;if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(r in t.xhrFields)a[r]=t.xhrFields[r];t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(r in n)void 0!==n[r]&&a.setRequestHeader(r,n[r]+"");a.send(t.hasContent&&t.data||null),i=function(e,n){var r,l,u;if(i&&(n||4===a.readyState))if(delete li[s],i=void 0,a.onreadystatechange=pe.noop,n)4!==a.readyState&&a.abort();else{u={},r=a.status,"string"==typeof a.responseText&&(u.text=a.responseText);try{l=a.statusText}catch(e){l=""}r||!t.isLocal||t.crossDomain?1223===r&&(r=204):r=u.text?200:404}u&&o(r,l,u,a.getAllResponseHeaders())},t.async?4===a.readyState?e.setTimeout(i):a.onreadystatechange=li[s]=i:i()},abort:function(){i&&i(void 0,!0)}}}}),pe.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return pe.globalEval(e),e}}}),pe.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),pe.ajaxTransport("script",function(e){if(e.crossDomain){var t,i=ne.head||pe("head")[0]||ne.documentElement;return{send:function(n,o){t=ne.createElement("script"),t.async=!0,e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(e,i){(i||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,i||o(200,"success"))},i.insertBefore(t,i.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}});var ci=[],di=/(=)\?(?=&|$)|\?\?/;pe.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=ci.pop()||pe.expando+"_"+Yt++;return this[e]=!0,e}}),pe.ajaxPrefilter("json jsonp",function(t,i,n){var o,r,a,s=t.jsonp!==!1&&(di.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&di.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return o=t.jsonpCallback=pe.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(di,"$1"+o):t.jsonp!==!1&&(t.url+=(Qt.test(t.url)?"&":"?")+t.jsonp+"="+o),t.converters["script json"]=function(){return a||pe.error(o+" was not called"),a[0]},t.dataTypes[0]="json",r=e[o],e[o]=function(){a=arguments},n.always(function(){void 0===r?pe(e).removeProp(o):e[o]=r,t[o]&&(t.jsonpCallback=i.jsonpCallback,ci.push(o)),a&&pe.isFunction(r)&&r(a[0]),a=r=void 0}),"script"}),pe.parseHTML=function(e,t,i){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(i=t,t=!1),t=t||ne;var n=xe.exec(e),o=!i&&[];return n?[t.createElement(n[1])]:(n=b([e],t,o),o&&o.length&&pe(o).remove(),pe.merge([],n.childNodes))};var fi=pe.fn.load;pe.fn.load=function(e,t,i){if("string"!=typeof e&&fi)return fi.apply(this,arguments);var n,o,r,a=this,s=e.indexOf(" ");return s>-1&&(n=pe.trim(e.slice(s,e.length)),e=e.slice(0,s)),pe.isFunction(t)?(i=t,t=void 0):t&&"object"==typeof t&&(o="POST"),a.length>0&&pe.ajax({url:e,type:o||"GET",dataType:"html",data:t}).done(function(e){r=arguments,a.html(n?pe("
    ").append(pe.parseHTML(e)).find(n):e)}).always(i&&function(e,t){a.each(function(){i.apply(this,r||[e.responseText,t,e])})}),this},pe.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){pe.fn[t]=function(e){return this.on(t,e)}}),pe.expr.filters.animated=function(e){return pe.grep(pe.timers,function(t){return e===t.elem}).length},pe.offset={setOffset:function(e,t,i){var n,o,r,a,s,l,u,c=pe.css(e,"position"),d=pe(e),f={};"static"===c&&(e.style.position="relative"),s=d.offset(),r=pe.css(e,"top"),l=pe.css(e,"left"),u=("absolute"===c||"fixed"===c)&&pe.inArray("auto",[r,l])>-1,u?(n=d.position(),a=n.top,o=n.left):(a=parseFloat(r)||0,o=parseFloat(l)||0),pe.isFunction(t)&&(t=t.call(e,i,pe.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+o),"using"in t?t.using.call(e,f):d.css(f)}},pe.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){pe.offset.setOffset(this,e,t)});var t,i,n={top:0,left:0},o=this[0],r=o&&o.ownerDocument;if(r)return t=r.documentElement,pe.contains(t,o)?("undefined"!=typeof o.getBoundingClientRect&&(n=o.getBoundingClientRect()),i=te(r),{top:n.top+(i.pageYOffset||t.scrollTop)-(t.clientTop||0),left:n.left+(i.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):n},position:function(){if(this[0]){var e,t,i={top:0,left:0},n=this[0];return"fixed"===pe.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),pe.nodeName(e[0],"html")||(i=e.offset()),i.top+=pe.css(e[0],"borderTopWidth",!0),i.left+=pe.css(e[0],"borderLeftWidth",!0)),{top:t.top-i.top-pe.css(n,"marginTop",!0),left:t.left-i.left-pe.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&!pe.nodeName(e,"html")&&"static"===pe.css(e,"position");)e=e.offsetParent;return e||pt})}}),pe.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var i=/Y/.test(t);pe.fn[e]=function(n){return Ne(this,function(e,n,o){var r=te(e);return void 0===o?r?t in r?r[t]:r.document.documentElement[n]:e[n]:void(r?r.scrollTo(i?pe(r).scrollLeft():o,i?o:pe(r).scrollTop()):e[n]=o)},e,n,arguments.length,null)}}),pe.each(["top","left"],function(e,t){pe.cssHooks[t]=I(de.pixelPosition,function(e,i){if(i)return i=ht(e,t),dt.test(i)?pe(e).position()[t]+"px":i})}),pe.each({Height:"height",Width:"width"},function(e,t){pe.each({padding:"inner"+e,content:t,"":"outer"+e},function(i,n){pe.fn[n]=function(n,o){var r=arguments.length&&(i||"boolean"!=typeof n),a=i||(n===!0||o===!0?"margin":"border");return Ne(this,function(t,i,n){var o;return pe.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===n?pe.css(t,i,a):pe.style(t,i,n,a)},t,r?n:void 0,r,null)}})}),pe.fn.extend({bind:function(e,t,i){return this.on(e,null,t,i)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,i,n){return this.on(t,e,i,n)},undelegate:function(e,t,i){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",i)}}),pe.fn.size=function(){return this.length},pe.fn.andSelf=pe.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return pe});var pi=e.jQuery,mi=e.$;return pe.noConflict=function(t){return e.$===pe&&(e.$=mi),t&&e.jQuery===pe&&(e.jQuery=pi),pe},t||(e.jQuery=e.$=pe),pe}),function(e){"use strict";"function"==typeof define&&define.amd?define("jquery.scrollto",["jquery"],e):"undefined"!=typeof module&&module.exports?module.exports=e(require("jquery")):e(jQuery)}(function(e){"use strict";function t(t){return!t.nodeName||e.inArray(t.nodeName.toLowerCase(),["iframe","#document","html","body"])!==-1}function i(t){return e.isFunction(t)||e.isPlainObject(t)?t:{top:t,left:t}}var n=e.scrollTo=function(t,i,n){return e(window).scrollTo(t,i,n)};return n.defaults={axis:"xy",duration:0,limit:!0},e.fn.scrollTo=function(o,r,a){"object"==typeof r&&(a=r,r=0),"function"==typeof a&&(a={onAfter:a}),"max"===o&&(o=9e9),a=e.extend({},n.defaults,a),r=r||a.duration;var s=a.queue&&a.axis.length>1;return s&&(r/=2),a.offset=i(a.offset),a.over=i(a.over),this.each(function(){function l(t){var i=e.extend({},a,{queue:!0,duration:r,complete:t&&function(){t.call(d,p,a)}});f.animate(m,i)}if(null!==o){var u,c=t(this),d=c?this.contentWindow||window:this,f=e(d),p=o,m={};switch(typeof p){case"number":case"string":if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(p)){p=i(p);break}p=c?e(p):e(p,d);case"object":if(0===p.length)return;(p.is||p.style)&&(u=(p=e(p)).offset())}var h=e.isFunction(a.offset)&&a.offset(d,p)||a.offset;e.each(a.axis.split(""),function(e,t){var i="x"===t?"Left":"Top",o=i.toLowerCase(),r="scroll"+i,g=f[r](),b=n.max(d,t);if(u)m[r]=u[o]+(c?0:g-f.offset()[o]),a.margin&&(m[r]-=parseInt(p.css("margin"+i),10)||0,m[r]-=parseInt(p.css("border"+i+"Width"),10)||0),m[r]+=h[o]||0,a.over[o]&&(m[r]+=p["x"===t?"width":"height"]()*a.over[o]);else{var v=p[o];m[r]=v.slice&&"%"===v.slice(-1)?parseFloat(v)/100*b:v}a.limit&&/^\d+$/.test(m[r])&&(m[r]=m[r]<=0?0:Math.min(m[r],b)),!e&&a.axis.length>1&&(g===m[r]?m={}:s&&(l(a.onAfterFirst),m={}))}),l(a.onAfter)}})},n.max=function(i,n){var o="x"===n?"Width":"Height",r="scroll"+o;if(!t(i))return i[r]-e(i)[o.toLowerCase()]();var a="client"+o,s=i.ownerDocument||i.document,l=s.documentElement,u=s.body;return Math.max(l[r],u[r])-Math.min(l[a],u[a])},e.Tween.propHooks.scrollLeft=e.Tween.propHooks.scrollTop={get:function(t){return e(t.elem)[t.prop]()},set:function(t){var i=this.get(t);if(t.options.interrupt&&t._last&&t._last!==i)return e(t.elem).stop();var n=Math.round(t.now);i!==n&&(e(t.elem)[t.prop](n),t._last=this.get(t))}},n}),!function(e,t,i,n){e.site=e.fn.site=function(o){var r,a,s=(new Date).getTime(),l=[],u=arguments[0],c="string"==typeof u,d=[].slice.call(arguments,1),f=e.isPlainObject(o)?e.extend(!0,{},e.site.settings,o):e.extend({},e.site.settings),p=f.namespace,m=f.error,h="module-"+p,g=e(i),b=g,v=this,A=b.data(h);return r={initialize:function(){r.instantiate()},instantiate:function(){r.verbose("Storing instance of site",r),A=r,b.data(h,r)},normalize:function(){r.fix.console(),r.fix.requestAnimationFrame()},fix:{console:function(){r.debug("Normalizing window.console"),console!==n&&console.log!==n||(r.verbose("Console not available, normalizing events"),r.disable.console()),"undefined"!=typeof console.group&&"undefined"!=typeof console.groupEnd&&"undefined"!=typeof console.groupCollapsed||(r.verbose("Console group not available, normalizing events"),t.console.group=function(){},t.console.groupEnd=function(){},t.console.groupCollapsed=function(){}),"undefined"==typeof console.markTimeline&&(r.verbose("Mark timeline not available, normalizing events"),t.console.markTimeline=function(){})},consoleClear:function(){r.debug("Disabling programmatic console clearing"),t.console.clear=function(){}},requestAnimationFrame:function(){r.debug("Normalizing requestAnimationFrame"),t.requestAnimationFrame===n&&(r.debug("RequestAnimationFrame not available, normalizing event"),t.requestAnimationFrame=t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,0)})}},moduleExists:function(t){return e.fn[t]!==n&&e.fn[t].settings!==n},enabled:{modules:function(t){var i=[];return t=t||f.modules,e.each(t,function(e,t){r.moduleExists(t)&&i.push(t)}),i}},disabled:{modules:function(t){var i=[];return t=t||f.modules,e.each(t,function(e,t){r.moduleExists(t)||i.push(t)}),i}},change:{setting:function(t,i,o,a){o="string"==typeof o?"all"===o?f.modules:[o]:o||f.modules,a=a===n||a,e.each(o,function(n,o){var s,l=!r.moduleExists(o)||e.fn[o].settings.namespace||!1;r.moduleExists(o)&&(r.verbose("Changing default setting",t,i,o),e.fn[o].settings[t]=i,a&&l&&(s=e(":data(module-"+l+")"),s.length>0&&(r.verbose("Modifying existing settings",s),s[o]("setting",t,i))))})},settings:function(t,i,o){i="string"==typeof i?[i]:i||f.modules,o=o===n||o,e.each(i,function(i,n){var a;r.moduleExists(n)&&(r.verbose("Changing default setting",t,n),e.extend(!0,e.fn[n].settings,t),o&&p&&(a=e(":data(module-"+p+")"),a.length>0&&(r.verbose("Modifying existing settings",a),a[n]("setting",t))))})}},enable:{console:function(){r.console(!0)},debug:function(e,t){e=e||f.modules,r.debug("Enabling debug for modules",e),r.change.setting("debug",!0,e,t)},verbose:function(e,t){e=e||f.modules,r.debug("Enabling verbose debug for modules",e),r.change.setting("verbose",!0,e,t)}},disable:{console:function(){r.console(!1)},debug:function(e,t){e=e||f.modules,r.debug("Disabling debug for modules",e),r.change.setting("debug",!1,e,t)},verbose:function(e,t){e=e||f.modules,r.debug("Disabling verbose debug for modules",e),r.change.setting("verbose",!1,e,t)}},console:function(e){if(e){if(A.cache.console===n)return void r.error(m.console);r.debug("Restoring console function"),t.console=A.cache.console}else r.debug("Disabling console function"),A.cache.console=t.console,t.console={clear:function(){},error:function(){},group:function(){},groupCollapsed:function(){},groupEnd:function(){},info:function(){},log:function(){},markTimeline:function(){},warn:function(){}}},destroy:function(){r.verbose("Destroying previous site for",b),b.removeData(h)},cache:{},setting:function(t,i){if(e.isPlainObject(t))e.extend(!0,f,t);else{if(i===n)return f[t];f[t]=i}},internal:function(t,i){if(e.isPlainObject(t))e.extend(!0,r,t);else{if(i===n)return r[t];r[t]=i}},debug:function(){f.debug&&(f.performance?r.performance.log(arguments):(r.debug=Function.prototype.bind.call(console.info,console,f.name+":"),r.debug.apply(console,arguments)))},verbose:function(){f.verbose&&f.debug&&(f.performance?r.performance.log(arguments):(r.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),r.verbose.apply(console,arguments)))},error:function(){r.error=Function.prototype.bind.call(console.error,console,f.name+":"),r.error.apply(console,arguments)},performance:{log:function(e){var t,i,n;f.performance&&(t=(new Date).getTime(),n=s||t,i=t-n,s=t,l.push({Element:v,Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":i})),clearTimeout(r.performance.timer),r.performance.timer=setTimeout(r.performance.display,500)},display:function(){var t=f.name+":",i=0;s=!1,clearTimeout(r.performance.timer),e.each(l,function(e,t){i+=t["Execution Time"]}),t+=" "+i+"ms",(console.group!==n||console.table!==n)&&l.length>0&&(console.groupCollapsed(t),console.table?console.table(l):e.each(l,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),l=[]}},invoke:function(t,i,o){var s,l,u,c=A;return i=i||d,o=v||o,"string"==typeof t&&c!==n&&(t=t.split(/[\. ]/),s=t.length-1,e.each(t,function(i,o){var a=i!=s?o+t[i+1].charAt(0).toUpperCase()+t[i+1].slice(1):t;if(e.isPlainObject(c[a])&&i!=s)c=c[a];else{if(c[a]!==n)return l=c[a],!1;if(!e.isPlainObject(c[o])||i==s)return c[o]!==n?(l=c[o],!1):(r.error(m.method,t),!1);c=c[o]}})),e.isFunction(l)?u=l.apply(o,i):l!==n&&(u=l),e.isArray(a)?a.push(u):a!==n?a=[a,u]:u!==n&&(a=u),l}},c?(A===n&&r.initialize(),r.invoke(u)):(A!==n&&r.destroy(),r.initialize()),a!==n?a:this},e.site.settings={name:"Site",namespace:"site",error:{console:"Console cannot be restored, most likely it was overwritten outside of module",method:"The method you called is not defined."},debug:!1,verbose:!1,performance:!0,modules:["accordion","api","checkbox","dimmer","dropdown","embed","form","modal","nag","popup","rating","shape","sidebar","state","sticky","tab","transition","visit","visibility"],siteNamespace:"site",namespaceStub:{cache:{},config:{},sections:{},section:{},utilities:{}}},e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,n){return!!e.data(t,n[3])}})}(jQuery,window,document),function(e,t,i,n){"use strict";t="undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.form=function(t){var o,r=e(this),a=r.selector||"",s=(new Date).getTime(),l=[],u=arguments[0],c=arguments[1],d="string"==typeof u,f=[].slice.call(arguments,1);return r.each(function(){var p,m,h,g,b,v,A,w,y,x,k,C,F,E,_,S,B,D,I=e(this),T=this,O=[],j=!1;D={initialize:function(){D.get.settings(),d?(B===n&&D.instantiate(),D.invoke(u)):(B!==n&&B.invoke("destroy"),D.verbose("Initializing form validation",I,w),D.bindEvents(),D.set.defaults(),D.instantiate())},instantiate:function(){D.verbose("Storing instance of module",D),B=D,I.data(_,D)},destroy:function(){D.verbose("Destroying previous module",B),D.removeEvents(),I.removeData(_)},refresh:function(){D.verbose("Refreshing selector cache"),p=I.find(k.field),m=I.find(k.group),h=I.find(k.message),g=I.find(k.prompt),b=I.find(k.submit),v=I.find(k.clear),A=I.find(k.reset)},submit:function(){D.verbose("Submitting form",I),I.submit()},attachEvents:function(t,i){i=i||"submit",e(t).on("click"+S,function(e){D[i](),e.preventDefault()})},bindEvents:function(){D.verbose("Attaching form events"),I.on("submit"+S,D.validate.form).on("blur"+S,k.field,D.event.field.blur).on("click"+S,k.submit,D.submit).on("click"+S,k.reset,D.reset).on("click"+S,k.clear,D.clear),w.keyboardShortcuts&&I.on("keydown"+S,k.field,D.event.field.keydown),p.each(function(){var t=e(this),i=t.prop("type"),n=D.get.changeEvent(i,t);e(this).on(n+S,D.event.field.change)})},clear:function(){p.each(function(){var t=e(this),i=t.parent(),n=t.closest(m),o=n.find(k.prompt),r=t.data(x.defaultValue)||"",a=i.is(k.uiCheckbox),s=i.is(k.uiDropdown),l=n.hasClass(C.error);l&&(D.verbose("Resetting error on field",n),n.removeClass(C.error),o.remove()),s?(D.verbose("Resetting dropdown value",i,r),i.dropdown("clear")):a?t.prop("checked",!1):(D.verbose("Resetting field value",t,r),t.val(""))})},reset:function(){p.each(function(){var t=e(this),i=t.parent(),o=t.closest(m),r=o.find(k.prompt),a=t.data(x.defaultValue),s=i.is(k.uiCheckbox),l=i.is(k.uiDropdown),u=o.hasClass(C.error);a!==n&&(u&&(D.verbose("Resetting error on field",o),o.removeClass(C.error),r.remove()),l?(D.verbose("Resetting dropdown value",i,a),i.dropdown("restore defaults")):s?(D.verbose("Resetting checkbox value",i,a),t.prop("checked",a)):(D.verbose("Resetting field value",t,a),t.val(a)))})},is:{bracketedRule:function(e){return e.type&&e.type.match(w.regExp.bracket)},empty:function(e){return!e||0===e.length||(e.is('input[type="checkbox"]')?!e.is(":checked"):D.is.blank(e))},blank:function(t){return""===e.trim(t.val())},valid:function(){var t=!0;return D.verbose("Checking if form is valid"),e.each(y,function(e,i){D.validate.field(i,e)||(t=!1)}),t}},removeEvents:function(){I.off(S),p.off(S),b.off(S),p.off(S)},event:{field:{keydown:function(t){var i=e(this),n=t.which,o=i.is(k.input),r=i.is(k.checkbox),a=i.closest(k.uiDropdown).length>0,s={enter:13,escape:27};n==s.escape&&(D.verbose("Escape key pressed blurring field"),i.blur()),t.ctrlKey||n!=s.enter||!o||a||r||(j||(i.one("keyup"+S,D.event.field.keyup),D.submit(),D.debug("Enter pressed on input submitting form")),j=!0)},keyup:function(){j=!1},blur:function(t){var i=e(this),n=i.closest(m),o=D.get.validation(i);n.hasClass(C.error)?(D.debug("Revalidating field",i,o),o&&D.validate.field(o)):"blur"!=w.on&&"change"!=w.on||o&&D.validate.field(o)},change:function(t){var i=e(this),n=i.closest(m),o=D.get.validation(i);("change"==w.on||n.hasClass(C.error)&&w.revalidate)&&(clearTimeout(D.timer),D.timer=setTimeout(function(){D.debug("Revalidating field",i,D.get.validation(i)),D.validate.field(o)},w.delay))}}},get:{ancillaryValue:function(e){return!(!e.type||!e.value&&!D.is.bracketedRule(e))&&(e.value!==n?e.value:e.type.match(w.regExp.bracket)[1]+"")},ruleName:function(e){return D.is.bracketedRule(e)?e.type.replace(e.type.match(w.regExp.bracket)[0],""):e.type},changeEvent:function(e,t){return"checkbox"==e||"radio"==e||"hidden"==e||t.is("select")?"change":D.get.inputEvent()},inputEvent:function(){return i.createElement("input").oninput!==n?"input":i.createElement("input").onpropertychange!==n?"propertychange":"keyup"},prompt:function(e,t){var i,n,o,r=D.get.ruleName(e),a=D.get.ancillaryValue(e),s=e.prompt||w.prompt[r]||w.text.unspecifiedRule,l=s.search("{value}")!==-1,u=s.search("{name}")!==-1;return(u||l)&&(n=D.get.field(t.identifier)),l&&(s=s.replace("{value}",n.val())),u&&(i=n.closest(k.group).find("label").eq(0),o=1==i.length?i.text():n.prop("placeholder")||w.text.unspecifiedField,s=s.replace("{name}",o)),s=s.replace("{identifier}",t.identifier),s=s.replace("{ruleValue}",a),e.prompt||D.verbose("Using default validation prompt for type",s,r),s},settings:function(){if(e.isPlainObject(t)){var i,o=Object.keys(t),r=o.length>0&&t[o[0]].identifier!==n&&t[o[0]].rules!==n;r?(w=e.extend(!0,{},e.fn.form.settings,c),y=e.extend({},e.fn.form.settings.defaults,t),D.error(w.error.oldSyntax,T),D.verbose("Extending settings from legacy parameters",y,w)):(t.fields&&(i=Object.keys(t.fields),("string"==typeof t.fields[i[0]]||e.isArray(t.fields[i[0]]))&&e.each(t.fields,function(i,n){"string"==typeof n&&(n=[n]),t.fields[i]={rules:[]},e.each(n,function(e,n){t.fields[i].rules.push({type:n})})})),w=e.extend(!0,{},e.fn.form.settings,t),y=e.extend({},e.fn.form.settings.defaults,w.fields),D.verbose("Extending settings",y,w))}else w=e.fn.form.settings,y=e.fn.form.settings.defaults,D.verbose("Using default form validation",y,w);E=w.namespace,x=w.metadata,k=w.selector,C=w.className,F=w.error,_="module-"+E,S="."+E,B=I.data(_),D.refresh()},field:function(t){return D.verbose("Finding field with identifier",t),p.filter("#"+t).length>0?p.filter("#"+t):p.filter('[name="'+t+'"]').length>0?p.filter('[name="'+t+'"]'):p.filter('[name="'+t+'[]"]').length>0?p.filter('[name="'+t+'[]"]'):p.filter("[data-"+x.validate+'="'+t+'"]').length>0?p.filter("[data-"+x.validate+'="'+t+'"]'):e("")},fields:function(t){var i=e();return e.each(t,function(e,t){i=i.add(D.get.field(t))}),i},validation:function(t){var i,n;return!!y&&(e.each(y,function(e,o){n=o.identifier||e,D.get.field(n)[0]==t[0]&&(o.identifier=n,i=o)}),i||!1)},value:function(e){var t,i=[];return i.push(e),t=D.get.values.call(T,i),t[e]},values:function(t){var i=e.isArray(t)?D.get.fields(t):p,n={};return i.each(function(t,i){var o=e(i),r=(o.prop("type"),o.prop("name")),a=o.val(),s=o.is(k.checkbox),l=o.is(k.radio),u=r.indexOf("[]")!==-1,c=!!s&&o.is(":checked");r&&(u?(r=r.replace("[]",""),n[r]||(n[r]=[]),s?c?n[r].push(a||!0):n[r].push(!1):n[r].push(a)):l?c&&(n[r]=a):s?c?n[r]=a||!0:n[r]=!1:n[r]=a)}),n}},has:{field:function(e){return D.verbose("Checking for existence of a field with identifier",e),"string"!=typeof e&&D.error(F.identifier,e),p.filter("#"+e).length>0||p.filter('[name="'+e+'"]').length>0||p.filter("[data-"+x.validate+'="'+e+'"]').length>0}},add:{prompt:function(t,i){var o=D.get.field(t),r=o.closest(m),a=r.children(k.prompt),s=0!==a.length;i="string"==typeof i?[i]:i,D.verbose("Adding field error state",t),r.addClass(C.error),w.inline&&(s||(a=w.templates.prompt(i),a.appendTo(r)),a.html(i[0]),s?D.verbose("Inline errors are disabled, no inline error added",t):w.transition&&e.fn.transition!==n&&I.transition("is supported")?(D.verbose("Displaying error with css transition",w.transition),a.transition(w.transition+" in",w.duration)):(D.verbose("Displaying error with fallback javascript animation"),a.fadeIn(w.duration)))},errors:function(e){D.debug("Adding form error messages",e),D.set.error(),h.html(w.templates.error(e))}},remove:{prompt:function(t){var i=D.get.field(t),o=i.closest(m),r=o.children(k.prompt);o.removeClass(C.error),w.inline&&r.is(":visible")&&(D.verbose("Removing prompt for field",t),w.transition&&e.fn.transition!==n&&I.transition("is supported")?r.transition(w.transition+" out",w.duration,function(){r.remove()}):r.fadeOut(w.duration,function(){r.remove()}))}},set:{success:function(){I.removeClass(C.error).addClass(C.success)},defaults:function(){p.each(function(){var t=e(this),i=t.filter(k.checkbox).length>0,n=i?t.is(":checked"):t.val();t.data(x.defaultValue,n)})},error:function(){I.removeClass(C.success).addClass(C.error)},value:function(e,t){var i={};return i[e]=t,D.set.values.call(T,i)},values:function(t){e.isEmptyObject(t)||e.each(t,function(t,i){var n,o=D.get.field(t),r=o.parent(),a=e.isArray(i),s=r.is(k.uiCheckbox),l=r.is(k.uiDropdown),u=o.is(k.radio)&&s,c=o.length>0;c&&(a&&s?(D.verbose("Selecting multiple",i,o),r.checkbox("uncheck"),e.each(i,function(e,t){n=o.filter('[value="'+t+'"]'),r=n.parent(),n.length>0&&r.checkbox("check")})):u?(D.verbose("Selecting radio value",i,o),o.filter('[value="'+i+'"]').parent(k.uiCheckbox).checkbox("check")):s?(D.verbose("Setting checkbox value",i,r),i===!0?r.checkbox("check"):r.checkbox("uncheck")):l?(D.verbose("Setting dropdown value",i,r),r.dropdown("set selected",i)):(D.verbose("Setting field value",i,o),o.val(i)))})}},validate:{form:function(e,t){var i=D.get.values();if(j)return!1;if(O=[],D.is.valid()){if(D.debug("Form has no validation errors, submitting"),D.set.success(),t!==!0)return w.onSuccess.call(T,e,i)}else if(D.debug("Form has errors"),D.set.error(),w.inline||D.add.errors(O),I.data("moduleApi")!==n&&e.stopImmediatePropagation(),t!==!0)return w.onFailure.call(T,O,i)},field:function(t,i){var o=t.identifier||i,r=D.get.field(o),a=!!t.depends&&D.get.field(t.depends),s=!0,l=[];return t.identifier||(D.debug("Using field name as identifier",o),t.identifier=o),r.prop("disabled")?(D.debug("Field is disabled. Skipping",o),s=!0):t.optional&&D.is.blank(r)?(D.debug("Field is optional and blank. Skipping",o),s=!0):t.depends&&D.is.empty(a)?(D.debug("Field depends on another value that is not present or empty. Skipping",a),s=!0):t.rules!==n&&e.each(t.rules,function(e,i){D.has.field(o)&&!D.validate.rule(t,i)&&(D.debug("Field is invalid",o,i.type),l.push(D.get.prompt(i,t)),s=!1)}),s?(D.remove.prompt(o,l),w.onValid.call(r),!0):(O=O.concat(l),D.add.prompt(o,l),w.onInvalid.call(r,l),!1)},rule:function(t,i){var o=D.get.field(t.identifier),r=(i.type,o.val()),a=D.get.ancillaryValue(i),s=D.get.ruleName(i),l=w.rules[s];return e.isFunction(l)?(r=r===n||""===r||null===r?"":e.trim(r+""),l.call(o,r,a)):void D.error(F.noRule,s)}},setting:function(t,i){if(e.isPlainObject(t))e.extend(!0,w,t);else{if(i===n)return w[t];w[t]=i}},internal:function(t,i){if(e.isPlainObject(t))e.extend(!0,D,t);else{if(i===n)return D[t];D[t]=i}},debug:function(){!w.silent&&w.debug&&(w.performance?D.performance.log(arguments):(D.debug=Function.prototype.bind.call(console.info,console,w.name+":"),D.debug.apply(console,arguments)))},verbose:function(){!w.silent&&w.verbose&&w.debug&&(w.performance?D.performance.log(arguments):(D.verbose=Function.prototype.bind.call(console.info,console,w.name+":"),D.verbose.apply(console,arguments)))},error:function(){w.silent||(D.error=Function.prototype.bind.call(console.error,console,w.name+":"),D.error.apply(console,arguments))},performance:{log:function(e){var t,i,n;w.performance&&(t=(new Date).getTime(),n=s||t,i=t-n,s=t,l.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:T,"Execution Time":i})),clearTimeout(D.performance.timer),D.performance.timer=setTimeout(D.performance.display,500)},display:function(){var t=w.name+":",i=0;s=!1,clearTimeout(D.performance.timer),e.each(l,function(e,t){i+=t["Execution Time"]}),t+=" "+i+"ms",a&&(t+=" '"+a+"'"),r.length>1&&(t+=" ("+r.length+")"),(console.group!==n||console.table!==n)&&l.length>0&&(console.groupCollapsed(t),console.table?console.table(l):e.each(l,function(e,t){ -console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),l=[]}},invoke:function(t,i,r){var a,s,l,u=B;return i=i||f,r=T||r,"string"==typeof t&&u!==n&&(t=t.split(/[\. ]/),a=t.length-1,e.each(t,function(i,o){var r=i!=a?o+t[i+1].charAt(0).toUpperCase()+t[i+1].slice(1):t;if(e.isPlainObject(u[r])&&i!=a)u=u[r];else{if(u[r]!==n)return s=u[r],!1;if(!e.isPlainObject(u[o])||i==a)return u[o]!==n&&(s=u[o],!1);u=u[o]}})),e.isFunction(s)?l=s.apply(r,i):s!==n&&(l=s),e.isArray(o)?o.push(l):o!==n?o=[o,l]:l!==n&&(o=l),s}},D.initialize()}),o!==n?o:this},e.fn.form.settings={name:"Form",namespace:"form",debug:!1,verbose:!1,performance:!0,fields:!1,keyboardShortcuts:!0,on:"submit",inline:!1,delay:200,revalidate:!0,transition:"scale",duration:200,onValid:function(){},onInvalid:function(){},onSuccess:function(){return!0},onFailure:function(){return!1},metadata:{defaultValue:"default",validate:"validate"},regExp:{bracket:/\[(.*)\]/i,decimal:/^\d*(\.)\d+/,email:/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,escape:/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,flags:/^\/(.*)\/(.*)?/,integer:/^\-?\d+$/,number:/^\-?\d*(\.\d+)?$/,url:/(https?:\/\/(?:www\.|(?!www))[^\s\.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/i},text:{unspecifiedRule:"Please enter a valid value",unspecifiedField:"This field"},prompt:{empty:"{name} must have a value",checked:"{name} must be checked",email:"{name} must be a valid e-mail",url:"{name} must be a valid url",regExp:"{name} is not formatted correctly",integer:"{name} must be an integer",decimal:"{name} must be a decimal number",number:"{name} must be set to a number",is:'{name} must be "{ruleValue}"',isExactly:'{name} must be exactly "{ruleValue}"',not:'{name} cannot be set to "{ruleValue}"',notExactly:'{name} cannot be set to exactly "{ruleValue}"',contain:'{name} cannot contain "{ruleValue}"',containExactly:'{name} cannot contain exactly "{ruleValue}"',doesntContain:'{name} must contain "{ruleValue}"',doesntContainExactly:'{name} must contain exactly "{ruleValue}"',minLength:"{name} must be at least {ruleValue} characters",length:"{name} must be at least {ruleValue} characters",exactLength:"{name} must be exactly {ruleValue} characters",maxLength:"{name} cannot be longer than {ruleValue} characters",match:"{name} must match {ruleValue} field",different:"{name} must have a different value than {ruleValue} field",creditCard:"{name} must be a valid credit card number",minCount:"{name} must have at least {ruleValue} choices",exactCount:"{name} must have exactly {ruleValue} choices",maxCount:"{name} must have {ruleValue} or less choices"},selector:{checkbox:'input[type="checkbox"], input[type="radio"]',clear:".clear",field:"input, textarea, select",group:".field",input:"input",message:".error.message",prompt:".prompt.label",radio:'input[type="radio"]',reset:'.reset:not([type="reset"])',submit:'.submit:not([type="submit"])',uiCheckbox:".ui.checkbox",uiDropdown:".ui.dropdown"},className:{error:"error",label:"ui prompt label",pressed:"down",success:"success"},error:{identifier:"You must specify a string identifier for each field",method:"The method you called is not defined.",noRule:"There is no rule matching the one you specified",oldSyntax:"Starting in 2.0 forms now only take a single settings object. Validation settings converted to new syntax automatically."},templates:{error:function(t){var i='
      ';return e.each(t,function(e,t){i+="
    • "+t+"
    • "}),i+="
    ",e(i)},prompt:function(t){return e("
    ").addClass("ui basic red pointing prompt label").html(t[0])}},rules:{empty:function(t){return!(t===n||""===t||e.isArray(t)&&0===t.length)},checked:function(){return e(this).filter(":checked").length>0},email:function(t){return e.fn.form.settings.regExp.email.test(t)},url:function(t){return e.fn.form.settings.regExp.url.test(t)},regExp:function(t,i){if(i instanceof RegExp)return t.match(i);var n,o=i.match(e.fn.form.settings.regExp.flags);return o&&(i=o.length>=2?o[1]:i,n=o.length>=3?o[2]:""),t.match(new RegExp(i,n))},integer:function(t,i){var o,r,a,s=e.fn.form.settings.regExp.integer;return i&&["",".."].indexOf(i)===-1&&(i.indexOf("..")==-1?s.test(i)&&(o=r=i-0):(a=i.split("..",2),s.test(a[0])&&(o=a[0]-0),s.test(a[1])&&(r=a[1]-0))),s.test(t)&&(o===n||t>=o)&&(r===n||t<=r)},decimal:function(t){return e.fn.form.settings.regExp.decimal.test(t)},number:function(t){return e.fn.form.settings.regExp.number.test(t)},is:function(e,t){return t="string"==typeof t?t.toLowerCase():t,e="string"==typeof e?e.toLowerCase():e,e==t},isExactly:function(e,t){return e==t},not:function(e,t){return e="string"==typeof e?e.toLowerCase():e,t="string"==typeof t?t.toLowerCase():t,e!=t},notExactly:function(e,t){return e!=t},contains:function(t,i){return i=i.replace(e.fn.form.settings.regExp.escape,"\\$&"),t.search(new RegExp(i,"i"))!==-1},containsExactly:function(t,i){return i=i.replace(e.fn.form.settings.regExp.escape,"\\$&"),t.search(new RegExp(i))!==-1},doesntContain:function(t,i){return i=i.replace(e.fn.form.settings.regExp.escape,"\\$&"),t.search(new RegExp(i,"i"))===-1},doesntContainExactly:function(t,i){return i=i.replace(e.fn.form.settings.regExp.escape,"\\$&"),t.search(new RegExp(i))===-1},minLength:function(e,t){return e!==n&&e.length>=t},length:function(e,t){return e!==n&&e.length>=t},exactLength:function(e,t){return e!==n&&e.length==t},maxLength:function(e,t){return e!==n&&e.length<=t},match:function(t,i){var o;return e(this),e('[data-validate="'+i+'"]').length>0?o=e('[data-validate="'+i+'"]').val():e("#"+i).length>0?o=e("#"+i).val():e('[name="'+i+'"]').length>0?o=e('[name="'+i+'"]').val():e('[name="'+i+'[]"]').length>0&&(o=e('[name="'+i+'[]"]')),o!==n&&t.toString()==o.toString()},different:function(t,i){var o;return e(this),e('[data-validate="'+i+'"]').length>0?o=e('[data-validate="'+i+'"]').val():e("#"+i).length>0?o=e("#"+i).val():e('[name="'+i+'"]').length>0?o=e('[name="'+i+'"]').val():e('[name="'+i+'[]"]').length>0&&(o=e('[name="'+i+'[]"]')),o!==n&&t.toString()!==o.toString()},creditCard:function(t,i){var n,o,r={visa:{pattern:/^4/,length:[16]},amex:{pattern:/^3[47]/,length:[15]},mastercard:{pattern:/^5[1-5]/,length:[16]},discover:{pattern:/^(6011|622(12[6-9]|1[3-9][0-9]|[2-8][0-9]{2}|9[0-1][0-9]|92[0-5]|64[4-9])|65)/,length:[16]},unionPay:{pattern:/^(62|88)/,length:[16,17,18,19]},jcb:{pattern:/^35(2[89]|[3-8][0-9])/,length:[16]},maestro:{pattern:/^(5018|5020|5038|6304|6759|676[1-3])/,length:[12,13,14,15,16,17,18,19]},dinersClub:{pattern:/^(30[0-5]|^36)/,length:[14]},laser:{pattern:/^(6304|670[69]|6771)/,length:[16,17,18,19]},visaElectron:{pattern:/^(4026|417500|4508|4844|491(3|7))/,length:[16]}},a={},s=!1,l="string"==typeof i&&i.split(",");if("string"==typeof t&&0!==t.length){if(l&&(e.each(l,function(i,n){o=r[n],o&&(a={length:e.inArray(t.length,o.length)!==-1,pattern:t.search(o.pattern)!==-1},a.length&&a.pattern&&(s=!0))}),!s))return!1;if(n={number:e.inArray(t.length,r.unionPay.length)!==-1,pattern:t.search(r.unionPay.pattern)!==-1},n.number&&n.pattern)return!0;for(var u=t.length,c=0,d=[[0,1,2,3,4,5,6,7,8,9],[0,2,4,6,8,1,3,5,7,9]],f=0;u--;)f+=d[c][parseInt(t.charAt(u),10)],c^=1;return f%10===0&&f>0}},minCount:function(e,t){return 0==t||(1==t?""!==e:e.split(",").length>=t)},exactCount:function(e,t){return 0==t?""===e:1==t?""!==e&&e.search(",")===-1:e.split(",").length==t},maxCount:function(e,t){return 0!=t&&(1==t?e.search(",")===-1:e.split(",").length<=t)}}}}(jQuery,window,document),function(e,t,i,n){"use strict";t="undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.accordion=function(i){var o,r=e(this),a=(new Date).getTime(),s=[],l=arguments[0],u="string"==typeof l,c=[].slice.call(arguments,1);return t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,0)},r.each(function(){var d,f,p=e.isPlainObject(i)?e.extend(!0,{},e.fn.accordion.settings,i):e.extend({},e.fn.accordion.settings),m=p.className,h=p.namespace,g=p.selector,b=p.error,v="."+h,A="module-"+h,w=r.selector||"",y=e(this),x=y.find(g.title),k=y.find(g.content),C=this,F=y.data(A);f={initialize:function(){f.debug("Initializing",y),f.bind.events(),p.observeChanges&&f.observeChanges(),f.instantiate()},instantiate:function(){F=f,y.data(A,f)},destroy:function(){f.debug("Destroying previous instance",y),y.off(v).removeData(A)},refresh:function(){x=y.find(g.title),k=y.find(g.content)},observeChanges:function(){"MutationObserver"in t&&(d=new MutationObserver(function(e){f.debug("DOM tree modified, updating selector cache"),f.refresh()}),d.observe(C,{childList:!0,subtree:!0}),f.debug("Setting up mutation observer",d))},bind:{events:function(){f.debug("Binding delegated events"),y.on(p.on+v,g.trigger,f.event.click)}},event:{click:function(){f.toggle.call(this)}},toggle:function(t){var i=t!==n?"number"==typeof t?x.eq(t):e(t).closest(g.title):e(this).closest(g.title),o=i.next(k),r=o.hasClass(m.animating),a=o.hasClass(m.active),s=a&&!r,l=!a&&r;f.debug("Toggling visibility of content",i),s||l?p.collapsible?f.close.call(i):f.debug("Cannot close accordion content collapsing is disabled"):f.open.call(i)},open:function(t){var i=t!==n?"number"==typeof t?x.eq(t):e(t).closest(g.title):e(this).closest(g.title),o=i.next(k),r=o.hasClass(m.animating),a=o.hasClass(m.active),s=a||r;return s?void f.debug("Accordion already open, skipping",o):(f.debug("Opening accordion content",i),p.onOpening.call(o),p.exclusive&&f.closeOthers.call(i),i.addClass(m.active),o.stop(!0,!0).addClass(m.animating),p.animateChildren&&(e.fn.transition!==n&&y.transition("is supported")?o.children().transition({animation:"fade in",queue:!1,useFailSafe:!0,debug:p.debug,verbose:p.verbose,duration:p.duration}):o.children().stop(!0,!0).animate({opacity:1},p.duration,f.resetOpacity)),void o.slideDown(p.duration,p.easing,function(){o.removeClass(m.animating).addClass(m.active),f.reset.display.call(this),p.onOpen.call(this),p.onChange.call(this)}))},close:function(t){var i=t!==n?"number"==typeof t?x.eq(t):e(t).closest(g.title):e(this).closest(g.title),o=i.next(k),r=o.hasClass(m.animating),a=o.hasClass(m.active),s=!a&&r,l=a&&r;!a&&!s||l||(f.debug("Closing accordion content",o),p.onClosing.call(o),i.removeClass(m.active),o.stop(!0,!0).addClass(m.animating),p.animateChildren&&(e.fn.transition!==n&&y.transition("is supported")?o.children().transition({animation:"fade out",queue:!1,useFailSafe:!0,debug:p.debug,verbose:p.verbose,duration:p.duration}):o.children().stop(!0,!0).animate({opacity:0},p.duration,f.resetOpacity)),o.slideUp(p.duration,p.easing,function(){o.removeClass(m.animating).removeClass(m.active),f.reset.display.call(this),p.onClose.call(this),p.onChange.call(this)}))},closeOthers:function(t){var i,o,r,a=t!==n?x.eq(t):e(this).closest(g.title),s=a.parents(g.content).prev(g.title),l=a.closest(g.accordion),u=g.title+"."+m.active+":visible",c=g.content+"."+m.active+":visible";p.closeNested?(i=l.find(u).not(s),r=i.next(k)):(i=l.find(u).not(s),o=l.find(c).find(u).not(s),i=i.not(o),r=i.next(k)),i.length>0&&(f.debug("Exclusive enabled, closing other content",i),i.removeClass(m.active),r.removeClass(m.animating).stop(!0,!0),p.animateChildren&&(e.fn.transition!==n&&y.transition("is supported")?r.children().transition({animation:"fade out",useFailSafe:!0,debug:p.debug,verbose:p.verbose,duration:p.duration}):r.children().stop(!0,!0).animate({opacity:0},p.duration,f.resetOpacity)),r.slideUp(p.duration,p.easing,function(){e(this).removeClass(m.active),f.reset.display.call(this)}))},reset:{display:function(){f.verbose("Removing inline display from element",this),e(this).css("display",""),""===e(this).attr("style")&&e(this).attr("style","").removeAttr("style")},opacity:function(){f.verbose("Removing inline opacity from element",this),e(this).css("opacity",""),""===e(this).attr("style")&&e(this).attr("style","").removeAttr("style")}},setting:function(t,i){if(f.debug("Changing setting",t,i),e.isPlainObject(t))e.extend(!0,p,t);else{if(i===n)return p[t];e.isPlainObject(p[t])?e.extend(!0,p[t],i):p[t]=i}},internal:function(t,i){return f.debug("Changing internal",t,i),i===n?f[t]:void(e.isPlainObject(t)?e.extend(!0,f,t):f[t]=i)},debug:function(){!p.silent&&p.debug&&(p.performance?f.performance.log(arguments):(f.debug=Function.prototype.bind.call(console.info,console,p.name+":"),f.debug.apply(console,arguments)))},verbose:function(){!p.silent&&p.verbose&&p.debug&&(p.performance?f.performance.log(arguments):(f.verbose=Function.prototype.bind.call(console.info,console,p.name+":"),f.verbose.apply(console,arguments)))},error:function(){p.silent||(f.error=Function.prototype.bind.call(console.error,console,p.name+":"),f.error.apply(console,arguments))},performance:{log:function(e){var t,i,n;p.performance&&(t=(new Date).getTime(),n=a||t,i=t-n,a=t,s.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:C,"Execution Time":i})),clearTimeout(f.performance.timer),f.performance.timer=setTimeout(f.performance.display,500)},display:function(){var t=p.name+":",i=0;a=!1,clearTimeout(f.performance.timer),e.each(s,function(e,t){i+=t["Execution Time"]}),t+=" "+i+"ms",w&&(t+=" '"+w+"'"),(console.group!==n||console.table!==n)&&s.length>0&&(console.groupCollapsed(t),console.table?console.table(s):e.each(s,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),s=[]}},invoke:function(t,i,r){var a,s,l,u=F;return i=i||c,r=C||r,"string"==typeof t&&u!==n&&(t=t.split(/[\. ]/),a=t.length-1,e.each(t,function(i,o){var r=i!=a?o+t[i+1].charAt(0).toUpperCase()+t[i+1].slice(1):t;if(e.isPlainObject(u[r])&&i!=a)u=u[r];else{if(u[r]!==n)return s=u[r],!1;if(!e.isPlainObject(u[o])||i==a)return u[o]!==n?(s=u[o],!1):(f.error(b.method,t),!1);u=u[o]}})),e.isFunction(s)?l=s.apply(r,i):s!==n&&(l=s),e.isArray(o)?o.push(l):o!==n?o=[o,l]:l!==n&&(o=l),s}},u?(F===n&&f.initialize(),f.invoke(l)):(F!==n&&F.invoke("destroy"),f.initialize())}),o!==n?o:this},e.fn.accordion.settings={name:"Accordion",namespace:"accordion",silent:!1,debug:!1,verbose:!1,performance:!0,on:"click",observeChanges:!0,exclusive:!0,collapsible:!0,closeNested:!1,animateChildren:!0,duration:350,easing:"easeOutQuad",onOpening:function(){},onOpen:function(){},onClosing:function(){},onClose:function(){},onChange:function(){},error:{method:"The method you called is not defined"},className:{active:"active",animating:"animating"},selector:{accordion:".accordion",title:".title",trigger:".title",content:".content"}},e.extend(e.easing,{easeOutQuad:function(e,t,i,n,o){return-n*(t/=o)*(t-2)+i}})}(jQuery,window,document),function(e,t,i,n){"use strict";t="undefined"!=typeof t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.checkbox=function(o){var r,a=e(this),s=a.selector||"",l=(new Date).getTime(),u=[],c=arguments[0],d="string"==typeof c,f=[].slice.call(arguments,1);return a.each(function(){var a,p,m=e.extend(!0,{},e.fn.checkbox.settings,o),h=m.className,g=m.namespace,b=m.selector,v=m.error,A="."+g,w="module-"+g,y=e(this),x=e(this).children(b.label),k=e(this).children(b.input),C=k[0],F=!1,E=!1,_=y.data(w),S=this;p={initialize:function(){p.verbose("Initializing checkbox",m),p.create.label(),p.bind.events(),p.set.tabbable(),p.hide.input(),p.observeChanges(),p.instantiate(),p.setup()},instantiate:function(){p.verbose("Storing instance of module",p),_=p,y.data(w,p)},destroy:function(){p.verbose("Destroying module"),p.unbind.events(),p.show.input(),y.removeData(w)},fix:{reference:function(){y.is(b.input)&&(p.debug("Behavior called on adjusting invoked element"),y=y.closest(b.checkbox),p.refresh())}},setup:function(){p.set.initialLoad(),p.is.indeterminate()?(p.debug("Initial value is indeterminate"),p.indeterminate()):p.is.checked()?(p.debug("Initial value is checked"),p.check()):(p.debug("Initial value is unchecked"),p.uncheck()),p.remove.initialLoad()},refresh:function(){x=y.children(b.label),k=y.children(b.input),C=k[0]},hide:{input:function(){p.verbose("Modifying z-index to be unselectable"),k.addClass(h.hidden)}},show:{input:function(){p.verbose("Modifying z-index to be selectable"),k.removeClass(h.hidden)}},observeChanges:function(){"MutationObserver"in t&&(a=new MutationObserver(function(e){p.debug("DOM tree modified, updating selector cache"),p.refresh()}),a.observe(S,{childList:!0,subtree:!0}),p.debug("Setting up mutation observer",a))},attachEvents:function(t,i){var n=e(t);i=e.isFunction(p[i])?p[i]:p.toggle,n.length>0?(p.debug("Attaching checkbox events to element",t,i),n.on("click"+A,i)):p.error(v.notFound)},event:{click:function(t){var i=e(t.target);return i.is(b.input)?void p.verbose("Using default check action on initialized checkbox"):i.is(b.link)?void p.debug("Clicking link inside checkbox, skipping toggle"):(p.toggle(),k.focus(),void t.preventDefault())},keydown:function(e){var t=e.which,i={enter:13,space:32,escape:27};t==i.escape?(p.verbose("Escape key pressed blurring field"),k.blur(),E=!0):e.ctrlKey||t!=i.space&&t!=i.enter?E=!1:(p.verbose("Enter/space key pressed, toggling checkbox"),p.toggle(),E=!0)},keyup:function(e){E&&e.preventDefault()}},check:function(){p.should.allowCheck()&&(p.debug("Checking checkbox",k),p.set.checked(),p.should.ignoreCallbacks()||(m.onChecked.call(C),m.onChange.call(C)))},uncheck:function(){p.should.allowUncheck()&&(p.debug("Unchecking checkbox"),p.set.unchecked(),p.should.ignoreCallbacks()||(m.onUnchecked.call(C),m.onChange.call(C)))},indeterminate:function(){return p.should.allowIndeterminate()?void p.debug("Checkbox is already indeterminate"):(p.debug("Making checkbox indeterminate"),p.set.indeterminate(),void(p.should.ignoreCallbacks()||(m.onIndeterminate.call(C),m.onChange.call(C))))},determinate:function(){return p.should.allowDeterminate()?void p.debug("Checkbox is already determinate"):(p.debug("Making checkbox determinate"),p.set.determinate(),void(p.should.ignoreCallbacks()||(m.onDeterminate.call(C),m.onChange.call(C))))},enable:function(){return p.is.enabled()?void p.debug("Checkbox is already enabled"):(p.debug("Enabling checkbox"),p.set.enabled(),m.onEnable.call(C),void m.onEnabled.call(C))},disable:function(){return p.is.disabled()?void p.debug("Checkbox is already disabled"):(p.debug("Disabling checkbox"),p.set.disabled(),m.onDisable.call(C),void m.onDisabled.call(C))},get:{radios:function(){var t=p.get.name();return e('input[name="'+t+'"]').closest(b.checkbox)},otherRadios:function(){return p.get.radios().not(y)},name:function(){return k.attr("name")}},is:{initialLoad:function(){return F},radio:function(){return k.hasClass(h.radio)||"radio"==k.attr("type")},indeterminate:function(){return k.prop("indeterminate")!==n&&k.prop("indeterminate")},checked:function(){return k.prop("checked")!==n&&k.prop("checked")},disabled:function(){return k.prop("disabled")!==n&&k.prop("disabled")},enabled:function(){return!p.is.disabled()},determinate:function(){return!p.is.indeterminate()},unchecked:function(){return!p.is.checked()}},should:{allowCheck:function(){return p.is.determinate()&&p.is.checked()&&!p.should.forceCallbacks()?(p.debug("Should not allow check, checkbox is already checked"),!1):m.beforeChecked.apply(C)!==!1||(p.debug("Should not allow check, beforeChecked cancelled"),!1)},allowUncheck:function(){return p.is.determinate()&&p.is.unchecked()&&!p.should.forceCallbacks()?(p.debug("Should not allow uncheck, checkbox is already unchecked"),!1):m.beforeUnchecked.apply(C)!==!1||(p.debug("Should not allow uncheck, beforeUnchecked cancelled"),!1)},allowIndeterminate:function(){return p.is.indeterminate()&&!p.should.forceCallbacks()?(p.debug("Should not allow indeterminate, checkbox is already indeterminate"),!1):m.beforeIndeterminate.apply(C)!==!1||(p.debug("Should not allow indeterminate, beforeIndeterminate cancelled"),!1)},allowDeterminate:function(){return p.is.determinate()&&!p.should.forceCallbacks()?(p.debug("Should not allow determinate, checkbox is already determinate"),!1):m.beforeDeterminate.apply(C)!==!1||(p.debug("Should not allow determinate, beforeDeterminate cancelled"),!1)},forceCallbacks:function(){return p.is.initialLoad()&&m.fireOnInit},ignoreCallbacks:function(){return F&&!m.fireOnInit}},can:{change:function(){return!(y.hasClass(h.disabled)||y.hasClass(h.readOnly)||k.prop("disabled")||k.prop("readonly"))},uncheck:function(){return"boolean"==typeof m.uncheckable?m.uncheckable:!p.is.radio()}},set:{initialLoad:function(){F=!0},checked:function(){return p.verbose("Setting class to checked"),y.removeClass(h.indeterminate).addClass(h.checked),p.is.radio()&&p.uncheckOthers(),!p.is.indeterminate()&&p.is.checked()?void p.debug("Input is already checked, skipping input property change"):(p.verbose("Setting state to checked",C),k.prop("indeterminate",!1).prop("checked",!0),void p.trigger.change())},unchecked:function(){return p.verbose("Removing checked class"),y.removeClass(h.indeterminate).removeClass(h.checked),!p.is.indeterminate()&&p.is.unchecked()?void p.debug("Input is already unchecked"):(p.debug("Setting state to unchecked"),k.prop("indeterminate",!1).prop("checked",!1),void p.trigger.change())},indeterminate:function(){return p.verbose("Setting class to indeterminate"),y.addClass(h.indeterminate),p.is.indeterminate()?void p.debug("Input is already indeterminate, skipping input property change"):(p.debug("Setting state to indeterminate"),k.prop("indeterminate",!0),void p.trigger.change())},determinate:function(){return p.verbose("Removing indeterminate class"),y.removeClass(h.indeterminate),p.is.determinate()?void p.debug("Input is already determinate, skipping input property change"):(p.debug("Setting state to determinate"),void k.prop("indeterminate",!1))},disabled:function(){return p.verbose("Setting class to disabled"),y.addClass(h.disabled),p.is.disabled()?void p.debug("Input is already disabled, skipping input property change"):(p.debug("Setting state to disabled"),k.prop("disabled","disabled"),void p.trigger.change())},enabled:function(){return p.verbose("Removing disabled class"),y.removeClass(h.disabled),p.is.enabled()?void p.debug("Input is already enabled, skipping input property change"):(p.debug("Setting state to enabled"),k.prop("disabled",!1),void p.trigger.change())},tabbable:function(){p.verbose("Adding tabindex to checkbox"),k.attr("tabindex")===n&&k.attr("tabindex",0)}},remove:{initialLoad:function(){F=!1}},trigger:{change:function(){var e=i.createEvent("HTMLEvents"),t=k[0];t&&(p.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},create:{label:function(){k.prevAll(b.label).length>0?(k.prev(b.label).detach().insertAfter(k),p.debug("Moving existing label",x)):p.has.label()||(x=e("