UNPKG

@zalando/zally-web-ui

Version:
1 lines 786 kB
!function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=40)}([function(e,t,n){"use strict";e.exports=n(48)},function(e,t,n){"use strict";var i=function(){};e.exports=i},function(e,t,n){e.exports=n(66)()},function(e,t,n){"use strict";e.exports=function(e,t,n,i,r,o,s,a){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,i,r,o,s,a],u=0;(l=new Error(t.replace(/%s/g,function(){return c[u++]}))).name="Invariant Violation"}throw l.framesToPop=1,l}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(65);n.d(t,"BrowserRouter",function(){return i.a});var r=n(70);n.d(t,"HashRouter",function(){return r.a});var o=n(28);n.d(t,"Link",function(){return o.a});var s=n(72);n.d(t,"MemoryRouter",function(){return s.a});var a=n(75);n.d(t,"NavLink",function(){return a.a});var l=n(78);n.d(t,"Prompt",function(){return l.a});var c=n(80);n.d(t,"Redirect",function(){return c.a});var u=n(29);n.d(t,"Route",function(){return u.a});var h=n(12);n.d(t,"Router",function(){return h.a});var d=n(86);n.d(t,"StaticRouter",function(){return d.a});var f=n(88);n.d(t,"Switch",function(){return f.a});var p=n(90);n.d(t,"matchPath",function(){return p.a});var g=n(91);n.d(t,"withRouter",function(){return g.a})},function(e,t,n){"use strict";t.__esModule=!0;t.addLeadingSlash=function(e){return"/"===e.charAt(0)?e:"/"+e},t.stripLeadingSlash=function(e){return"/"===e.charAt(0)?e.substr(1):e};var i=t.hasBasename=function(e,t){return new RegExp("^"+t+"(\\/|\\?|#|$)","i").test(e)};t.stripBasename=function(e,t){return i(e,t)?e.substr(t.length):e},t.stripTrailingSlash=function(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e},t.parsePath=function(e){var t=e||"/",n="",i="",r=t.indexOf("#");-1!==r&&(i=t.substr(r),t=t.substr(0,r));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===i?"":i}},t.createPath=function(e){var t=e.pathname,n=e.search,i=e.hash,r=t||"/";return n&&"?"!==n&&(r+="?"===n.charAt(0)?n:"?"+n),i&&"#"!==i&&(r+="#"===i.charAt(0)?i:"#"+i),r}},function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"f",function(){return r}),n.d(t,"c",function(){return o}),n.d(t,"e",function(){return s}),n.d(t,"g",function(){return a}),n.d(t,"d",function(){return l}),n.d(t,"b",function(){return c});var i=function(e){return"/"===e.charAt(0)?e:"/"+e},r=function(e){return"/"===e.charAt(0)?e.substr(1):e},o=function(e,t){return new RegExp("^"+t+"(\\/|\\?|#|$)","i").test(e)},s=function(e,t){return o(e,t)?e.substr(t.length):e},a=function(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e},l=function(e){var t=e||"/",n="",i="",r=t.indexOf("#");-1!==r&&(i=t.substr(r),t=t.substr(0,r));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===i?"":i}},c=function(e){var t=e.pathname,n=e.search,i=e.hash,r=t||"/";return n&&"?"!==n&&(r+="?"===n.charAt(0)?n:"?"+n),i&&"#"!==i&&(r+="#"===i.charAt(0)?i:"#"+i),r}},function(e,t,n){"use strict";function i(e){return function(){return e}}var r=function(){};r.thatReturns=i,r.thatReturnsFalse=i(!1),r.thatReturnsTrue=i(!0),r.thatReturnsNull=i(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,t,n){"use strict";n.d(t,"a",function(){return a}),n.d(t,"b",function(){return l});var i=n(25),r=n(26),o=n(6),s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},a=function(e,t,n,r){var a=void 0;"string"==typeof e?(a=Object(o.d)(e)).state=t:(void 0===(a=s({},e)).pathname&&(a.pathname=""),a.search?"?"!==a.search.charAt(0)&&(a.search="?"+a.search):a.search="",a.hash?"#"!==a.hash.charAt(0)&&(a.hash="#"+a.hash):a.hash="",void 0!==t&&void 0===a.state&&(a.state=t));try{a.pathname=decodeURI(a.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+a.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(a.key=n),r?a.pathname?"/"!==a.pathname.charAt(0)&&(a.pathname=Object(i.default)(a.pathname,r.pathname)):a.pathname=r.pathname:a.pathname||(a.pathname="/"),a},l=function(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&Object(r.default)(e.state,t.state)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.refreshToken=function(){return(0,r.default)("/auth/refresh-token",{method:"POST",credentials:"same-origin",headers:{Accept:"application/json","Content-Type":"application/json"}}).then(function(e){return e.json().then(function(t){return{response:e,body:t}})}).then(function(e){var t=e.response,n=e.body;return(0,o.debug)("token refreshed",n),{response:t,body:n}}).catch(function(e){return console.warn("Can't refresh the token, an error occurred",e),Promise.reject(e)})},t.me=function(){return i.client.fetch("/auth/me",{method:"POST",credentials:"same-origin",headers:{Accept:"application/json","Content-Type":"application/json"}}).then(function(e){return e.json()}).catch(function(e){return console.error(e),e.message=e.message||"invalid access token",Promise.reject(e)})},t.createAnonymousUser=function(){return{username:"anonymous",authenticated:!1}},t.logout=function(){window.location.href="/auth/logout"},t.login=function(){window.location.href="/auth/login"};var i=n(22),r=function(e){return e&&e.__esModule?e:{default:e}}(n(23)),o=n(24)},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.locationsAreEqual=t.createLocation=void 0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},o=i(n(25)),s=i(n(26)),a=n(5);t.createLocation=function(e,t,n,i){var s=void 0;"string"==typeof e?(s=(0,a.parsePath)(e)).state=t:(void 0===(s=r({},e)).pathname&&(s.pathname=""),s.search?"?"!==s.search.charAt(0)&&(s.search="?"+s.search):s.search="",s.hash?"#"!==s.hash.charAt(0)&&(s.hash="#"+s.hash):s.hash="",void 0!==t&&void 0===s.state&&(s.state=t));try{s.pathname=decodeURI(s.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+s.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(s.key=n),i?s.pathname?"/"!==s.pathname.charAt(0)&&(s.pathname=(0,o.default)(s.pathname,i.pathname)):s.pathname=i.pathname:s.pathname||(s.pathname="/"),s},t.locationsAreEqual=function(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&(0,s.default)(e.state,t.state)}},function(e,t,n){"use strict";t.__esModule=!0;var i=function(e){return e&&e.__esModule?e:{default:e}}(n(1));t.default=function(){var e=null,t=[];return{setPrompt:function(t){return(0,i.default)(null==e,"A history supports only one prompt at a time"),e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var s="function"==typeof e?e(t,n):e;"string"==typeof s?"function"==typeof r?r(s,o):((0,i.default)(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),o(!0)):o(!1!==s)}else o(!0)},appendListener:function(e){var n=!0,i=function(){n&&e.apply(void 0,arguments)};return t.push(i),function(){n=!1,t=t.filter(function(e){return e!==i})}},notifyListeners:function(){for(var e=arguments.length,n=Array(e),i=0;i<e;i++)n[i]=arguments[i];t.forEach(function(e){return e.apply(void 0,n)})}}}},function(e,t,n){"use strict";var i=n(13);t.a=i.a},function(e,t,n){"use strict";function i(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}var r=n(1),o=n.n(r),s=n(3),a=n.n(s),l=n(0),c=n.n(l),u=n(2),h=n.n(u),d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},f=function(e){function t(){var n,r,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var s=arguments.length,a=Array(s),l=0;l<s;l++)a[l]=arguments[l];return n=r=i(this,e.call.apply(e,[this].concat(a))),r.state={match:r.computeMatch(r.props.history.location.pathname)},o=n,i(r,o)}return function(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)}(t,e),t.prototype.getChildContext=function(){return{router:d({},this.context.router,{history:this.props.history,route:{location:this.props.history.location,match:this.state.match}})}},t.prototype.computeMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}},t.prototype.componentWillMount=function(){var e=this,t=this.props,n=t.children,i=t.history;a()(null==n||1===c.a.Children.count(n),"A <Router> may have only one child element"),this.unlisten=i.listen(function(){e.setState({match:e.computeMatch(i.location.pathname)})})},t.prototype.componentWillReceiveProps=function(e){o()(this.props.history===e.history,"You cannot change <Router history>")},t.prototype.componentWillUnmount=function(){this.unlisten()},t.prototype.render=function(){var e=this.props.children;return e?c.a.Children.only(e):null},t}(c.a.Component);f.propTypes={history:h.a.object.isRequired,children:h.a.node},f.contextTypes={router:h.a.object},f.childContextTypes={router:h.a.object.isRequired},t.a=f},function(e,t,n){"use strict";var i=n(76),r=n.n(i),o={},s=0;t.a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"string"==typeof t&&(t={path:t});var n=t,i=n.path,a=void 0===i?"/":i,l=n.exact,c=void 0!==l&&l,u=n.strict,h=void 0!==u&&u,d=n.sensitive,f=function(e,t){var n=""+t.end+t.strict+t.sensitive,i=o[n]||(o[n]={});if(i[e])return i[e];var a=[],l={re:r()(e,a,t),keys:a};return s<1e4&&(i[e]=l,s++),l}(a,{end:c,strict:h,sensitive:void 0!==d&&d}),p=f.re,g=f.keys,m=p.exec(e);if(!m)return null;var v=m[0],y=m.slice(1),b=e===v;return c&&!b?null:{path:a,url:"/"===a&&""===v?"/":v,isExact:b,params:g.reduce(function(e,t,n){return e[t.name]=y[n],e},{})}}},function(e,t,n){"use strict";var i=n(1),r=n.n(i);t.a=function(){var e=null,t=[];return{setPrompt:function(t){return r()(null==e,"A history supports only one prompt at a time"),e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,i,o){if(null!=e){var s="function"==typeof e?e(t,n):e;"string"==typeof s?"function"==typeof i?i(s,o):(r()(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),o(!0)):o(!1!==s)}else o(!0)},appendListener:function(e){var n=!0,i=function(){n&&e.apply(void 0,arguments)};return t.push(i),function(){n=!1,t=t.filter(function(e){return e!==i})}},notifyListeners:function(){for(var e=arguments.length,n=Array(e),i=0;i<e;i++)n[i]=arguments[i];t.forEach(function(e){return e.apply(void 0,n)})}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Msg=void 0;var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(e){return e&&e.__esModule?e:{default:e}}(n(0));t.Msg=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(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}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return function(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)}(t,r.default.Component),i(t,[{key:"render",value:function(){var e=this.props.type||"info";return r.default.createElement("div",{className:"dc-msg dc-msg--"+e},r.default.createElement("div",{className:"dc-msg__inner"},r.default.createElement("div",{className:"dc-msg__icon-frame"},r.default.createElement("i",{className:"dc-icon dc-msg__icon dc-icon--"+e})),r.default.createElement("div",{className:"dc-msg__bd"},r.default.createElement("h1",{className:"dc-msg__title"},this.props.title),r.default.createElement("p",{className:"dc-msg__text"},this.props.text)),"function"==typeof this.props.onCloseButton?r.default.createElement("div",{className:"dc-msg__close",onClick:this.props.onCloseButton},r.default.createElement("i",{className:"dc-icon dc-icon--close dc-msg__close__icon"})):""))}}]),t}()},function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(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 o(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)}Object.defineProperty(t,"__esModule",{value:!0}),t.WindowResizeListener=void 0;var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=n(0),l=function(e){return e&&e.__esModule?e:{default:e}}(a),c=n(100),u=t.WindowResizeListener=function(e){function t(){return i(this,t),r(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,a.Component),s(t,[{key:"shouldComponentUpdate",value:function(e){return e.onResize!==this.props.onResize}},{key:"componentDidMount",value:function(){t._listeners.length||(t._debouncedResize=(0,c.debounce)(t._onResize,t.DEBOUNCE_TIME),window.addEventListener("resize",t._debouncedResize,!1)),t._listeners.push(this.props.onResize),t._debouncedResize()}},{key:"componentWillUnmount",value:function(){var e=t._listeners.indexOf(this.props.onResize);t._listeners.splice(e,1),t._listeners.length||window.removeEventListener("resize",t._debouncedResize,!1)}},{key:"componentWillReceiveProps",value:function(e){if(e.onResize!==this.props.onResize){var n=t._listeners.indexOf(this.props.onResize);t._listeners.splice(n,1,e.onResize)}}},{key:"render",value:function(){return null}}]),t}();u.DEBOUNCE_TIME=100,u._listeners=[],u._onResize=function(){var e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,t=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;u._listeners.forEach(function(n){return n({windowWidth:e,windowHeight:t})})};var h=function(e){function t(e){i(this,t);var n=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={childOffset:null},n.updateOffSet=n.updateOffSet.bind(n),n}return o(t,a.Component),s(t,[{key:"componentDidMount",value:function(){this.baseSize=parseFloat(getComputedStyle(document.body).fontSize)||1,this.updateOffSet()}},{key:"componentDidUpdate",value:function(e){e.children!==this.props.children&&this.updateOffSet()}},{key:"updateOffSet",value:function(){if(this.child){var e=0;if(null!==this.child.offsetParent){var t=getComputedStyle(this.child.offsetParent,null);e=parseFloat(t.getPropertyValue("padding-top"))-parseFloat(t.getPropertyValue("padding-bottom"))}var n=this.child.offsetTop-e;n!==this.state.childOffset&&this.setState({childOffset:n})}}},{key:"render",value:function(){var e=this,t={};return null!==this.state.childOffset&&(t.position="relative",t.height="calc(100% - "+this.state.childOffset/this.baseSize+"em"),l.default.createElement("div",{ref:function(t){return e.child=t},style:t},l.default.createElement(u,{onResize:this.updateOffSet}),this.props.children)}}]),t}();t.default=h},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){!function(){var e=function(){return this}();e||"undefined"==typeof window||(e=window);var t=function(e,n,i){"string"==typeof e?(2==arguments.length&&(i=n),t.modules[e]||(t.payloads[e]=i,t.modules[e]=null)):t.original?t.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};t.modules={},t.payloads={};var n=function(e,t,n){if("string"==typeof t){var r=o(e,t);if(void 0!=r)return n&&n(),r}else if("[object Array]"===Object.prototype.toString.call(t)){for(var s=[],a=0,l=t.length;a<l;++a){var c=o(e,t[a]);if(void 0==c&&i.original)return;s.push(c)}return n&&n.apply(null,s)||!0}},i=function(e,t){var r=n("",e,t);return void 0==r&&i.original?i.original.apply(this,arguments):r},r=function(e,t){if(-1!==t.indexOf("!")){var n=t.split("!");return r(e,n[0])+"!"+r(e,n[1])}if("."==t.charAt(0)){for(t=e.split("/").slice(0,-1).join("/")+"/"+t;-1!==t.indexOf(".")&&i!=t;){var i=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return t},o=function(e,i){i=r(e,i);var o=t.modules[i];if(!o){if("function"==typeof(o=t.payloads[i])){var s={},a={id:i,uri:"",exports:s,packaged:!0};s=o(function(e,t){return n(i,e,t)},s,a)||a.exports,t.modules[i]=s,delete t.payloads[i]}o=t.modules[i]=s||o}return o};!function(n){var r=e;n&&(e[n]||(e[n]={}),r=e[n]),r.define&&r.define.packaged||(t.original=r.define,r.define=t,r.define.packaged=!0),r.acequire&&r.acequire.packaged||(i.original=r.acequire,r.acequire=i,r.acequire.packaged=!0)}("ace")}(),ace.define("ace/lib/regexp",["require","exports","module"],function(e,t,n){"use strict";var i={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},r=void 0===i.exec.call(/()??/,"")[1],o=function(){var e=/^/g;return i.test.call(e,""),!e.lastIndex}();o&&r||(RegExp.prototype.exec=function(e){var t,n,s=i.exec.apply(this,arguments);if("string"==typeof e&&s){if(!r&&s.length>1&&function(e,t,n){if(Array.prototype.indexOf)return e.indexOf(t,n);for(var i=n||0;i<e.length;i++)if(e[i]===t)return i;return-1}(s,"")>-1&&(n=RegExp(this.source,i.replace.call(function(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":"")}(this),"g","")),i.replace.call(e.slice(s.index),n,function(){for(var e=1;e<arguments.length-2;e++)void 0===arguments[e]&&(s[e]=void 0)})),this._xregexp&&this._xregexp.captureNames)for(var a=1;a<s.length;a++)(t=this._xregexp.captureNames[a-1])&&(s[t]=s[a]);!o&&this.global&&!s[0].length&&this.lastIndex>s.index&&this.lastIndex--}return s},o||(RegExp.prototype.test=function(e){var t=i.exec.call(this,e);return t&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--,!!t}))}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(e,t,n){function i(){}function r(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(e){}}function o(e){return(e=+e)!=e?e=0:0!==e&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError("Function.prototype.bind called on incompatible "+t);var n=p.call(arguments,1),r=function(){if(this instanceof r){var i=t.apply(this,n.concat(p.call(arguments)));return Object(i)===i?i:this}return t.apply(e,n.concat(p.call(arguments)))};return t.prototype&&(i.prototype=t.prototype,r.prototype=new i,i.prototype=null),r});var s,a,l,c,u,h=Function.prototype.call,d=Array.prototype,f=Object.prototype,p=d.slice,g=h.bind(f.toString),m=h.bind(f.hasOwnProperty);if((u=m(f,"__defineGetter__"))&&(s=h.bind(f.__defineGetter__),a=h.bind(f.__defineSetter__),l=h.bind(f.__lookupGetter__),c=h.bind(f.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t,n=[];if(n.splice.apply(n,e(20)),n.splice.apply(n,e(26)),t=n.length,n.splice(5,0,"XXX"),n.length,t+1==n.length)return!0}()){var v=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?v.apply(this,[void 0===e?0:e,void 0===t?this.length-e:t].concat(p.call(arguments,2))):[]}}else Array.prototype.splice=function(e,t){var n=this.length;e>0?e>n&&(e=n):void 0==e?e=0:e<0&&(e=Math.max(n+e,0)),e+t<n||(t=n-e);var i=this.slice(e,e+t),r=p.call(arguments,2),o=r.length;if(e===n)o&&this.push.apply(this,r);else{var s=Math.min(t,n-e),a=e+s,l=a+o-s,c=n-a,u=n-s;if(l<a)for(var h=0;h<c;++h)this[l+h]=this[a+h];else if(l>a)for(h=c;h--;)this[l+h]=this[a+h];if(o&&e===u)this.length=u,this.push.apply(this,r);else for(this.length=u+o,h=0;h<o;++h)this[e+h]=r[h]}return i};Array.isArray||(Array.isArray=function(e){return"[object Array]"==g(e)});var y=Object("a"),b="a"!=y[0]||!(0 in y);if(Array.prototype.forEach||(Array.prototype.forEach=function(e){var t=B(this),n=b&&"[object String]"==g(this)?this.split(""):t,i=arguments[1],r=-1,o=n.length>>>0;if("[object Function]"!=g(e))throw new TypeError;for(;++r<o;)r in n&&e.call(i,n[r],r,t)}),Array.prototype.map||(Array.prototype.map=function(e){var t=B(this),n=b&&"[object String]"==g(this)?this.split(""):t,i=n.length>>>0,r=Array(i),o=arguments[1];if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");for(var s=0;s<i;s++)s in n&&(r[s]=e.call(o,n[s],s,t));return r}),Array.prototype.filter||(Array.prototype.filter=function(e){var t,n=B(this),i=b&&"[object String]"==g(this)?this.split(""):n,r=i.length>>>0,o=[],s=arguments[1];if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");for(var a=0;a<r;a++)a in i&&(t=i[a],e.call(s,t,a,n)&&o.push(t));return o}),Array.prototype.every||(Array.prototype.every=function(e){var t=B(this),n=b&&"[object String]"==g(this)?this.split(""):t,i=n.length>>>0,r=arguments[1];if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");for(var o=0;o<i;o++)if(o in n&&!e.call(r,n[o],o,t))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(e){var t=B(this),n=b&&"[object String]"==g(this)?this.split(""):t,i=n.length>>>0,r=arguments[1];if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");for(var o=0;o<i;o++)if(o in n&&e.call(r,n[o],o,t))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(e){var t=B(this),n=b&&"[object String]"==g(this)?this.split(""):t,i=n.length>>>0;if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");if(!i&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var r,o=0;if(arguments.length>=2)r=arguments[1];else for(;;){if(o in n){r=n[o++];break}if(++o>=i)throw new TypeError("reduce of empty array with no initial value")}for(;o<i;o++)o in n&&(r=e.call(void 0,r,n[o],o,t));return r}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(e){var t=B(this),n=b&&"[object String]"==g(this)?this.split(""):t,i=n.length>>>0;if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");if(!i&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var r,o=i-1;if(arguments.length>=2)r=arguments[1];else for(;;){if(o in n){r=n[o--];break}if(--o<0)throw new TypeError("reduceRight of empty array with no initial value")}do{o in this&&(r=e.call(void 0,r,n[o],o,t))}while(o--);return r}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(e){var t=b&&"[object String]"==g(this)?this.split(""):B(this),n=t.length>>>0;if(!n)return-1;var i=0;for(arguments.length>1&&(i=o(arguments[1])),i=i>=0?i:Math.max(0,n+i);i<n;i++)if(i in t&&t[i]===e)return i;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(e){var t=b&&"[object String]"==g(this)?this.split(""):B(this),n=t.length>>>0;if(!n)return-1;var i=n-1;for(arguments.length>1&&(i=Math.min(i,o(arguments[1]))),i=i>=0?i:n-Math.abs(i);i>=0;i--)if(i in t&&e===t[i])return i;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__||(e.constructor?e.constructor.prototype:f)}),!Object.getOwnPropertyDescriptor){Object.getOwnPropertyDescriptor=function(e,t){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.getOwnPropertyDescriptor called on a non-object: "+e);if(m(e,t)){var n;if(n={enumerable:!0,configurable:!0},u){var i=e.__proto__;e.__proto__=f;var r=l(e,t),o=c(e,t);if(e.__proto__=i,r||o)return r&&(n.get=r),o&&(n.set=o),n}return n.value=e[t],n}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)}),!Object.create){var w;w=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(e,t){var n;if(null===e)n=w();else{if("object"!=typeof e)throw new TypeError("typeof prototype["+typeof e+"] != 'object'");var i=function(){};i.prototype=e,(n=new i).__proto__=e}return void 0!==t&&Object.defineProperties(n,t),n}}if(Object.defineProperty){var C=r({}),A="undefined"==typeof document||r(document.createElement("div"));if(!C||!A)var E=Object.defineProperty}if(!Object.defineProperty||E){Object.defineProperty=function(e,t,n){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.defineProperty called on non-object: "+e);if("object"!=typeof n&&"function"!=typeof n||null===n)throw new TypeError("Property description must be an object: "+n);if(E)try{return E.call(Object,e,t,n)}catch(e){}if(m(n,"value"))if(u&&(l(e,t)||c(e,t))){var i=e.__proto__;e.__proto__=f,delete e[t],e[t]=n.value,e.__proto__=i}else e[t]=n.value;else{if(!u)throw new TypeError("getters & setters can not be defined on this javascript engine");m(n,"get")&&s(e,t,n.get),m(n,"set")&&a(e,t,n.set)}return e}}Object.defineProperties||(Object.defineProperties=function(e,t){for(var n in t)m(t,n)&&Object.defineProperty(e,n,t[n]);return e}),Object.seal||(Object.seal=function(e){return e}),Object.freeze||(Object.freeze=function(e){return e});try{Object.freeze(function(){})}catch(e){Object.freeze=function(e){return function(t){return"function"==typeof t?t:e(t)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(e){return e}),Object.isSealed||(Object.isSealed=function(e){return!1}),Object.isFrozen||(Object.isFrozen=function(e){return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)===e)throw new TypeError;for(var t="";m(e,t);)t+="?";e[t]=!0;var n=m(e,t);return delete e[t],n}),!Object.keys){var F=!0,x=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],_=x.length;for(var S in{toString:null})F=!1;Object.keys=function(e){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.keys called on a non-object");var t=[];for(var n in e)m(e,n)&&t.push(n);if(F)for(var i=0,r=_;i<r;i++){var o=x[i];m(e,o)&&t.push(o)}return t}}Date.now||(Date.now=function(){return(new Date).getTime()});var k="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff";if(!String.prototype.trim||k.trim()){k="["+k+"]";var $=new RegExp("^"+k+k+"*"),R=new RegExp(k+k+"*$");String.prototype.trim=function(){return String(this).replace($,"").replace(R,"")}}var B=function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return Object(e)}}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],function(e,t,n){"use strict";e("./regexp"),e("./es5-shim")}),ace.define("ace/lib/dom",["require","exports","module"],function(e,t,n){"use strict";t.getDocumentHead=function(e){return e||(e=document),e.head||e.getElementsByTagName("head")[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||"http://www.w3.org/1999/xhtml",e):document.createElement(e)},t.hasCssClass=function(e,t){return-1!==(e.className+"").split(/\s+/g).indexOf(t)},t.addCssClass=function(e,n){t.hasCssClass(e,n)||(e.className+=" "+n)},t.removeCssClass=function(e,t){for(var n=e.className.split(/\s+/g);;){var i=n.indexOf(t);if(-1==i)break;n.splice(i,1)}e.className=n.join(" ")},t.toggleCssClass=function(e,t){for(var n=e.className.split(/\s+/g),i=!0;;){var r=n.indexOf(t);if(-1==r)break;i=!1,n.splice(r,1)}return i&&n.push(t),e.className=n.join(" "),i},t.setCssClass=function(e,n,i){i?t.addCssClass(e,n):t.removeCssClass(e,n)},t.hasCssString=function(e,t){var n,i=0;if((t=t||document).createStyleSheet&&(n=t.styleSheets)){for(;i<n.length;)if(n[i++].owningElement.id===e)return!0}else if(n=t.getElementsByTagName("style"))for(;i<n.length;)if(n[i++].id===e)return!0;return!1},t.importCssString=function(e,n,i){if(i=i||document,n&&t.hasCssString(n,i))return null;var r;n&&(e+="\n/*# sourceURL=ace/css/"+n+" */"),i.createStyleSheet?((r=i.createStyleSheet()).cssText=e,n&&(r.owningElement.id=n)):((r=t.createElement("style")).appendChild(i.createTextNode(e)),n&&(r.id=n),t.getDocumentHead(i).appendChild(r))},t.importCssStylsheet=function(e,n){if(n.createStyleSheet)n.createStyleSheet(e);else{var i=t.createElement("link");i.rel="stylesheet",i.href=e,t.getDocumentHead(n).appendChild(i)}},t.getInnerWidth=function(e){return parseInt(t.computedStyle(e,"paddingLeft"),10)+parseInt(t.computedStyle(e,"paddingRight"),10)+e.clientWidth},t.getInnerHeight=function(e){return parseInt(t.computedStyle(e,"paddingTop"),10)+parseInt(t.computedStyle(e,"paddingBottom"),10)+e.clientHeight},t.scrollbarWidth=function(e){var n=t.createElement("ace_inner");n.style.width="100%",n.style.minWidth="0px",n.style.height="200px",n.style.display="block";var i=t.createElement("ace_outer"),r=i.style;r.position="absolute",r.left="-10000px",r.overflow="hidden",r.width="200px",r.minWidth="0px",r.height="150px",r.display="block",i.appendChild(n);var o=e.documentElement;o.appendChild(i);var s=n.offsetWidth;r.overflow="scroll";var a=n.offsetWidth;return s==a&&(a=i.clientWidth),o.removeChild(i),s-a},"undefined"!=typeof document?(void 0!==window.pageYOffset?(t.getPageScrollTop=function(){return window.pageYOffset},t.getPageScrollLeft=function(){return window.pageXOffset}):(t.getPageScrollTop=function(){return document.body.scrollTop},t.getPageScrollLeft=function(){return document.body.scrollLeft}),window.getComputedStyle?t.computedStyle=function(e,t){return t?(window.getComputedStyle(e,"")||{})[t]||"":window.getComputedStyle(e,"")||{}}:t.computedStyle=function(e,t){return t?e.currentStyle[t]:e.currentStyle},t.setInnerHtml=function(e,t){var n=e.cloneNode(!1);return n.innerHTML=t,e.parentNode.replaceChild(n,e),n},"textContent"in document.documentElement?(t.setInnerText=function(e,t){e.textContent=t},t.getInnerText=function(e){return e.textContent}):(t.setInnerText=function(e,t){e.innerText=t},t.getInnerText=function(e){return e.innerText}),t.getParentWindow=function(e){return e.defaultView||e.parentWindow}):t.importCssString=function(){}}),ace.define("ace/lib/oop",["require","exports","module"],function(e,t,n){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop"],function(e,t,n){"use strict";e("./fixoldbrowsers");var i=e("./oop"),r=function(){var e,t,n={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",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:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};for(t in n.FUNCTION_KEYS)e=n.FUNCTION_KEYS[t].toLowerCase(),n[e]=parseInt(t,10);for(t in n.PRINTABLE_KEYS)e=n.PRINTABLE_KEYS[t].toLowerCase(),n[e]=parseInt(t,10);return i.mixin(n,n.MODIFIER_KEYS),i.mixin(n,n.PRINTABLE_KEYS),i.mixin(n,n.FUNCTION_KEYS),n.enter=n.return,n.escape=n.esc,n.del=n.delete,n[173]="-",function(){for(var e=["cmd","ctrl","alt","shift"],t=Math.pow(2,e.length);t--;)n.KEY_MODS[t]=e.filter(function(e){return t&n.KEY_MODS[e]}).join("-")+"-"}(),n.KEY_MODS[0]="",n.KEY_MODS[-1]="input-",n}();i.mixin(t,r),t.keyCodeToString=function(e){var t=r[e];return"string"!=typeof t&&(t=String.fromCharCode(e)),t.toLowerCase()}}),ace.define("ace/lib/useragent",["require","exports","module"],function(e,t,n){"use strict";if(t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS},"object"==typeof navigator){var i=(navigator.platform.match(/mac|win|linux/i)||["other"])[0].toLowerCase(),r=navigator.userAgent;t.isWin="win"==i,t.isMac="mac"==i,t.isLinux="linux"==i,t.isIE="Microsoft Internet Explorer"==navigator.appName||navigator.appName.indexOf("MSAppHost")>=0?parseFloat((r.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((r.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=(window.Controllers||window.controllers)&&"Gecko"===window.navigator.product,t.isOldGecko=t.isGecko&&parseInt((r.match(/rv:(\d+)/)||[])[1],10)<4,t.isOpera=window.opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(r.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(r.split(" Chrome/")[1])||void 0,t.isAIR=r.indexOf("AdobeAIR")>=0,t.isIPad=r.indexOf("iPad")>=0,t.isChromeOS=r.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(r)&&!window.MSStream,t.isIOS&&(t.isMac=!0)}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,n){"use strict";function i(e,t,n){var i=c(t);if(!s.isMac&&a){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(i|=8),a.altGr){if(3==(3&i))return;a.altGr=0}if(18===n||17===n){var r="location"in t?t.location:t.keyLocation;if(17===n&&1===r)1==a[n]&&(l=t.timeStamp);else if(18===n&&3===i&&2===r){t.timeStamp-l<50&&(a.altGr=!0)}}}if(n in o.MODIFIER_KEYS&&(n=-1),8&i&&n>=91&&n<=93&&(n=-1),!i&&13===n){if(3===(r="location"in t?t.location:t.keyLocation)&&(e(t,i,-n),t.defaultPrevented))return}if(s.isChromeOS&&8&i){if(e(t,i,n),t.defaultPrevented)return;i&=-9}return!!(i||n in o.FUNCTION_KEYS||n in o.PRINTABLE_KEYS)&&e(t,i,n)}function r(){a=Object.create(null)}var o=e("./keys"),s=e("./useragent"),a=null,l=0;t.addListener=function(e,t,n){if(e.addEventListener)return e.addEventListener(t,n,!1);if(e.attachEvent){var i=function(){n.call(e,window.event)};n._wrapper=i,e.attachEvent("on"+t,i)}},t.removeListener=function(e,t,n){if(e.removeEventListener)return e.removeEventListener(t,n,!1);e.detachEvent&&e.detachEvent("on"+t,n._wrapper||n)},t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},t.preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},t.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||s.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.preventDefault?e.button:{1:0,2:2,4:1}[e.button]},t.capture=function(e,n,i){function r(e){n&&n(e),i&&i(e),t.removeListener(document,"mousemove",n,!0),t.removeListener(document,"mouseup",r,!0),t.removeListener(document,"dragstart",r,!0)}return t.addListener(document,"mousemove",n,!0),t.addListener(document,"mouseup",r,!0),t.addListener(document,"dragstart",r,!0),r},t.addTouchMoveListener=function(e,n){var i,r;t.addListener(e,"touchstart",function(e){var t=e.touches[0];i=t.clientX,r=t.clientY}),t.addListener(e,"touchmove",function(e){var t=e.touches;if(!(t.length>1)){var o=t[0];e.wheelX=i-o.clientX,e.wheelY=r-o.clientY,i=o.clientX,r=o.clientY,n(e)}})},t.addMouseWheelListener=function(e,n){"onmousewheel"in e?t.addListener(e,"mousewheel",function(e){void 0!==e.wheelDeltaX?(e.wheelX=-e.wheelDeltaX/8,e.wheelY=-e.wheelDeltaY/8):(e.wheelX=0,e.wheelY=-e.wheelDelta/8),n(e)}):"onwheel"in e?t.addListener(e,"wheel",function(e){switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=.35*e.deltaX||0,e.wheelY=.35*e.deltaY||0;break;case e.DOM_DELTA_LINE:case e.DOM_DELTA_PAGE:e.wheelX=5*(e.deltaX||0),e.wheelY=5*(e.deltaY||0)}n(e)}):t.addListener(e,"DOMMouseScroll",function(e){e.axis&&e.axis==e.HORIZONTAL_AXIS?(e.wheelX=5*(e.detail||0),e.wheelY=0):(e.wheelX=0,e.wheelY=5*(e.detail||0)),n(e)})},t.addMultiMouseDownListener=function(e,n,i,r){function o(e){if(0!==t.getButton(e)?h=0:e.detail>1?++h>4&&(h=1):h=1,s.isIE){var o=Math.abs(e.clientX-l)>5||Math.abs(e.clientY-c)>5;u&&!o||(h=1),u&&clearTimeout(u),u=setTimeout(function(){u=null},n[h-1]||600),1==h&&(l=e.clientX,c=e.clientY)}if(e._clicks=h,i[r]("mousedown",e),h>4)h=0;else if(h>1)return i[r](d[h],e)}function a(e){h=2,u&&clearTimeout(u),u=setTimeout(function(){u=null},n[h-1]||600),i[r]("mousedown",e),i[r](d[h],e)}var l,c,u,h=0,d={2:"dblclick",3:"tripleclick",4:"quadclick"};Array.isArray(e)||(e=[e]),e.forEach(function(e){t.addListener(e,"mousedown",o),s.isOldIE&&t.addListener(e,"dblclick",a)})};var c=!s.isMac||!s.isOpera||"KeyboardEvent"in window?function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)}:function(e){return 0|(e.metaKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.ctrlKey?8:0)};if(t.getModifierString=function(e){return o.KEY_MODS[c(e)]},t.addCommandKeyListener=function(e,n){var o=t.addListener;if(s.isOldGecko||s.isOpera&&!("KeyboardEvent"in window)){var l=null;o(e,"keydown",function(e){l=e.keyCode}),o(e,"keypress",function(e){return i(n,e,l)})}else{var c=null;o(e,"keydown",function(e){a[e.keyCode]=(a[e.keyCode]||0)+1;var t=i(n,e,e.keyCode);return c=e.defaultPrevented,t}),o(e,"keypress",function(e){c&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),c=null)}),o(e,"keyup",function(e){a[e.keyCode]=null}),a||(r(),o(window,"focus",r))}},"object"==typeof window&&window.postMessage&&!s.isOldIE){t.nextTick=function(e,n){n=n||window;var i="zero-timeout-message-1";t.addListener(n,"message",function r(o){o.data==i&&(t.stopPropagation(o),t.removeListener(n,"message",r),e())}),n.postMessage(i,"*")}}t.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}}),ace.define("ace/lib/lang",["require","exports","module"],function(e,t,n){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){for(var n="";t>0;)1&t&&(n+=e),(t>>=1)&&(e+=e);return n};var i=/^\s\s*/,r=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(i,"")},t.stringTrimRight=function(e){return e.replace(r,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){for(var t=[],n=0,i=e.length;n<i;n++)e[n]&&"object"==typeof e[n]?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=function e(t){if("object"!=typeof t||!t)return t;var n;if(Array.isArray(t)){n=[];for(var i=0;i<t.length;i++)n[i]=e(t[i]);return n}if("[object Object]"!==Object.prototype.toString.call(t))return t;n={};for(var i in t)n[i]=e(t[i]);return n},t.arrayToMap=function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return e.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},i=function(e){return i.cancel(),t=setTimeout(n,e||0),i};return i.schedule=i,i.call=function(){return this.cancel(),e(),i},i.cancel=function(){return clearTimeout(t),t=null,i},i.isPending=function(){return t},i},t.delayedCall=function(e,t){var n=null,i=function(){n=null,e()},r=function(e){null==n&&(n=setTimeout(i,e||t))};return r.delay=function(e){n&&clearTimeout(n),n=setTimeout(i,e||t)},r.schedule=r,r.call=function(){this.cancel(),e()},r.cancel=function(){n&&clearTimeout(n),n=null},r.isPending=function(){return n},r}}),ace.define("ace/keyboard/textinput_ios",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/lib/keys"],function(e,t,n){"use strict";var i=e("../lib/event"),r=e("../lib/useragent"),o=e("../lib/dom"),s=e("../lib/lang"),a=e("../lib/keys"),l=a.KEY_MODS,c=r.isChrome<18,u=r.isIE;t.TextInput=function(e,t){function n(e){if(!y){if(y=!0,F)t=0,n=e?0:f.value.length-1;else var t=4,n=5;try{f.setSelectionRange(t,n)}catch(e){}y=!1}}function h(){y||(f.value=p,r.isWebKit&&E.schedule())}function d(){clearTimeout(L),L=setTimeout(function(){b&&(f.style.cssText=b,b=""),null==t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=!0,t.renderer.$moveTextAreaToCursor())},0)}var f=o.createElement("textarea");f.className=r.isIOS?"ace_text-input ace_text-input-ios":"ace_text-input",r.isTouchPad&&f.setAttribute("x-palm-disable-auto-cap",!0),f.setAttribute("wrap","off"),f.setAttribute("autocorrect","off"),f.setAttribute("autocapitalize","off"),f.setAttribute("spellcheck",!1),f.style.opacity="0",e.insertBefore(f,e.firstChild);var p="\n aaaa a\n",g=!1,m=!1,v=!1,y=!1,b="",w=!0;try{var C=document.activeElement===f}catch(e){}i.addListener(f,"blur",function(e){t.onBlur(e),C=!1}),i.addListener(f,"focus",function(e){C=!0,t.onFocus(e),n()}),this.focus=function(){if(b)return f.focus();f.style.position="fixed",f.focus()},this.blur=function(){f.blur()},this.isFocused=function(){return C};var A=s.delayedCall(function(){C&&n(w)}),E=s.delayedCall(function(){y||(f.value=p,C&&n())});r.isWebKit||t.addEventListener("changeSelection",function(){t.selection.isEmpty()!=w&&(w=!w,A.schedule())}),h(),C&&t.onFocus();var F=null;this.setInputHandler=function(e){F=e},this.getInputHandler=function(){return F};var x=!1,_=function(e){4===f.selectionStart&&5===f.selectionEnd||(F&&(e=F(e),F=null),v?(n(),e&&t.onPaste(e),v=!1):e==p.substr(0)&&4===f.selectionStart?x?t.execCommand("del",{source:"ace"}):t.execCommand("backspace",{source:"ace"}):g||(e.substring(0,9)==p&&e.length>p.length?e=e.substr(9):e.substr(0,4)==p.substr(0,4)?e=e.substr(4,e.length-p.length+1):e.charAt(e.length-1)==p.charAt(0)&&(e=e.slice(0,-1)),e==p.charAt(0)||e.charAt(e.length-1)==p.charAt(0)&&(e=e.slice(0,-1)),e&&t.onTextInput(e)),g&&(g=!1),x&&(x=!1))},S=function(e){if(!y){var t=f.value;_(t),h()}},k=function(e,t,n){var i=e.clipboardData||window.clipboardData;if(i&&!c){var r=u||n?"Text":"text/plain";try{return t?!1!==i.setData(r,t):i.getData(r)}catch(e){if(!n)return k(e,t,!0)}}},$=function(e,o){var s=t.getCopyText();if(!s)return i.preventDefault(e);k(e,s)?(r.isIOS&&(m=o,f.value="\n aa"+s+"a a\n",f.setSelectionRange(4,4+s.length),g={value:s}),o?t.onCut():t.onCopy(),r.isIOS||i.preventDefault(e)):(g=!0,f.value=s,f.select(),setTimeout(function(){g=!1,h(),n(),o?t.onCut():t.onCopy()}))};i.addCommandKeyListener(f,t.onCommandKey.bind(t)),i.addListener(f,"select",function(e){!function(e){return 0===e.selectionStart&&e.selectionEnd===e.value.length}(f)?F&&n(t.selection.isEmpty()):(t.selectAll(),n())}),i.addListener(f,"input",S),i.addListener(f,"cut",function(e){$(e,!0)}),i.addListener(f,"copy",function(e){$(e,!1)}),i.addListener(f,"paste",function(e){var o=k(e);"string"==typeof o?(o&&t.onPaste(o,e),r.isIE&&setTimeout(n),i.preventDefault(e)):(f.value="",v=!0)});var R=function(){if(y&&t.onCompositionUpdate&&!t.$readOnly){var e=f.value.replace(/\x01/g,"");if(y.lastValue!==e&&(t.onCompositionUpdate(e),y.lastValue&&t.undo(),y.canUndo&&(y.lastValue=e),y.lastValue)){var n=t.selection.getRange();t.insert(y.lastValue),t.session.markUndoGroup(),y.range=t.selection.getRange(),t.selection.setRange(n),t.selection.clearSelection()}}},B=function(e){if(t.onCompositionEnd&&!t.$readOnly){var n=y;y=!1;var i=setTimeout(function(){i=null;var e=f.value.replace(/\x01/g,"");y||(e==n.lastValue?h():!n.lastValue&&e&&(h(),_(e)))});F=function(e){return i&&clearTimeout(i),(e=e.replace(/\x01/g,""))==n.lastValue?"":(n.lastValue&&i&&t.undo(),e)},t.onCompositionEnd(),t.removeListener("mousedown",B),"compositionend"==e.type&&n.range&&t.selection.setRange(n.range),(r.isChrome&&r.isChrome>=53||r.isWebKit&&r.isWebKit>=603)&&S()}},D=s.delayedCall(R,50);i.addListener(f,"compositionstart",function(e){y||!t.onCompositionStart||t.$readOnly||((y={}).canUndo=t.session.$undoManager,t.onCompositionStart(),setTimeout(R,0),t.on("mousedown",B),y.canUndo&&!t.selection.isEmpty()&&(t.insert(""),t.session.markUndoGroup(),t.selection.clearSelection()),t.session.markUndoGroup())}),r.isGecko?i.addListener(f,"text",function(){D.schedule()}):(i.addListener(f,"keyup",function(){D.schedule()}),i.addListener(f,"keydown",function(){D.schedule()})),i.addListener(f,"compositionend",B),this.getElement=function(){return f},this.setReadOnly=function(e){f.readOnly=e},this.onContextMenu=function(e){x=!0,n(t.selection.isEmpty()),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,n){b||(b=f.style.cssText),f.style.cssText=(n?"z-index:100000;":"")+"height:"+f.style.height+";"+(r.isIE?"opacity:0.1;":"");var s=t.container.getBoundingClientRect(),a=o.computedStyle(t.container),l=s.top+(parseInt(a.borderTopWidth)||0),c=s.left+(parseInt(s.borderLeftWidth)||0),u=s.bottom-l-f.clientHeight-2,h=function(e){f.style.left=e.clientX-c-2+"px",f.style.top=Math.min(e.clientY-l-2,u)+"px"};h(e),"mousedown"==e.type&&(t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=null),clearTimeout(L),r.isWin&&i.capture(t.container,h,d))},this.onContextMenuClose=d;var L,T=function(e){t.textInput.onContextMenu(e),d()};if(i.addListener(f,"mouseup",T),i.addListener(f,"mousedown",function(e){e.preventDefault(),d()}),i.addListener(t.renderer.scroller,"contextmenu",T),i.addListener(f,"contextmenu",T),r.isIOS){var O=null,M=!1;e.addEventListener("keydown",function(e){O&&clearTimeout(O),M=!0}),e.addEventListener("keyup",function(e){O=setTimeout(function(){M=!1},100)});var P=function(e){if(document.activeElement===f&&!M){if(m)return setTimeout(function(){m=!1},100);var n=f.selectionStart,i=f.selectionEnd;if(f.setSelectionRange(4,5),n==i)switch(n){case 0:t.onCommandKey(null,0,a.up);break;case 1:t.onCommandKey(null,0,a.home);break;case 2:t.onCommandKey(null,l.option,a.left);break;case 4:t.onCommandKey(null,0,a.left);break;case 5:t.onCommandKey(null,0,a.right);break;case 7:t.onCommandKey(null,l.option,a.right);break;case 8:t.onCommandKey(null,0,a.end);break;case 9:t.onCommandKey(null,0,a.down)}else{switch(i){case 6:t.onCommandKey(null,l.shift,a.right);break;case 7:t.onCommandKey(null,l.shift|l.option,a.right);break;case 8:t.onCommandKey(null,l.shift,a.end);break;case 9:t.onCommandKey(null,l.shift,a.down)}switch(n){case 0:t.onCommandKey(null,l.shift,a.up);break;case 1:t.onCommandKey(null,l.shift,a.home);break;case 2:t.onCommandKey(null,l.shift|l.option,a.left);break;case 3:t.onCommandKey(null,l.shift,a.left)}}}};document.addEventListener("selectionchange",P),t.on("destroy",function(){document.removeEventListener("selectionchange",P)})}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/keyboard/textinput_ios"],function(e,t,n){"use strict";var i=e("../lib/event"),r=e("../lib/useragent"),o=e("../lib/dom"),s=e("../lib/lang"),a=r.isChrome<18,l=r.isIE,c=e("./textinput_ios").TextInput;t.TextInput=function(e,t){function n(e){if(!m){if(m=!0,A)var t=0,n=e?0:d.value.length-1;else t=e?2:1,n=2;try{d.setSelectionRange(t,n)}catch(e){}m=!1}}function u(){m||(d.value=f,r.isWebKit&&C.schedule())}function h(){clearTimeout(T),T=setTimeout(function(){v&&(d.style.cssText=v,v=""),null==t.renderer.$keepTextAreaAtCursor&&(t.renderer.$keepTextAreaAtCursor=!0,t.renderer.$moveTextAreaToCursor())},0)}if(r.isIOS)return c.call(this,e,t);var d=o.createElement("textarea");d.className="a