/*! (c) 2024 gays.com */
define("lib/Fingerprint",["Deferred"],function(r){var e=require("/lib/fingerprintjs2.js-1.6.1/fingerprint2.min.js");return e=e.then(function(e){var n=new r;try{new e({swfPath:"/lib/fingerprintjs2.js-1.6.1/FontList.swf",excludeUserAgent:!0}).get(function(r,e){n.resolve({hash:r,parts:e})})}catch(r){return{error:r}}return n.promise},function(r){return{error:r}})});
define("tnc/core/utils",["exports"],function(n){var t,r=function(){return this}.call(),e=r.console,o={},i=Object.prototype.toString,u=Object.prototype.hasOwnProperty,c=Array.prototype.slice,a=function(r,e,i,c){if(!r||!l(e))return r;var a,p;if(f(i)?(c=i,i=t):(c=!0===c,i=null==i?t:i),n.isArrayLike(r))for(a=0,p=r.length;a<p&&!1!==e.call(t===i?r[a]:i,c?r[a]:a,c?a:r[a],r);a++);else for(a in r)if(!u.call(o,a)&&!1===e.call(t===i?r[a]:i,c?r[a]:a,c?a:r[a],r))break;return r},l=function(n){switch(i.call(n)){case"[object Function]":case"[object AsyncFunction]":return!0}return!1},f=function(n){return"[object Boolean]"===i.call(n)},p=function(n){return"[object Number]"===i.call(n)},s=function(n){return"[object String]"===i.call(n)},y=function(n){return"[object Array]"===i.call(n)},h=function(n){return null!=n&&n==n.window};!function n(t){r.TNC_ERR_SAVE=!0===r.TNC_ERR_SAVE,r.TNC_TPL_SHOW=!0===r.TNC_TPL_SHOW,r.TNC_LOG_SHOW=!!e&&(f(r.TNC_LOG_SHOW)?r.TNC_LOG_SHOW:/\( FLAG \)/.test(String(n)))}(),function(){function o(){o.prototype=null}n.log=function(){!0===r.TNC_LOG_SHOW&&Function.prototype.apply.call(e.log,e,arguments)},n.info=function(){!0===r.TNC_LOG_SHOW&&Function.prototype.apply.call(e.info,e,arguments)},n.warn=function(){!0===r.TNC_LOG_SHOW&&Function.prototype.apply.call(e.warn,e,arguments)};var g=/^(Boolean|Number|String|Function|Array|Date|RegExp|Object|Error)$/;n.type=function(n){return null==n?String(n):g.test(n=i.call(n).slice(8,-1))?n.toLowerCase():"object"},n.hasOwn=function(n,t){return u.call(n,t)},n.isFunction=l,n.isBoolean=f,n.isNumber=p,n.isString=s,n.isArray=y,n.isNull=function(n){return null===n},n.isUndefined=function(n){return t===n},n.isWindow=h,n.isArrayLike=function(t){return!h(t)&&(y(t)||"object"===n.type(t)&&isFinite(t.length)&&!isFinite(t.nodeType)&&(0===t.length||0<t.length&&t.length-1 in t))},n.isEmptyObject=function(n){for(var t in n)if(u.call(n,t))return!1;return!0};var v=function(){function n(){n.prototype.a=1,this.b=1}for(var t in new n)return"b"!==t}();n.isPlainObject=function(r){var e;if(!r||"object"!==n.type(r)||r.nodeType||n.isWindow(r))return!1;try{if(r.constructor&&!u.call(r,"constructor")&&!u.call(r.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}if(v)for(e in r)return u.call(r,e);for(e in r);return t===e||u.call(r,e)},n.isNumeric=function(n){return!y(n)&&n-parseFloat(n)>=0},n.inRange=function(n,t,r,e){return e?n>=t&&n<=r:n>t&&n<r},n.each=a,n.any=function(n,t,r,e){var o=!1,i=t;return l(t)||(i=function(n,r){return t===(!0===e?n:r)}),a(n,function(){if(!0===Boolean(i.apply(this,arguments)))return o=!0,!1},r,e),o},n.map=function(n,t,r,e){var o=[];return a(n,function(){o.push(t.apply(this,arguments))},r,e),o},n.grep=function(n,r,e,o){if(!n||"object"!=typeof n)return n;var i=t===n.length,u=i?{}:[];return f(e)?(o=e,e=t):(o=!0===o,e=null==e?t:e),a(n,i?function(n,t){!0===Boolean(r.apply(this,arguments))&&(u[o?t:n]=o?n:t)}:function(n,t){!0===Boolean(r.apply(this,arguments))&&u.push(o?n:t)},e,o),u},n.reduce=function(t,r,e){var o;return 2<arguments.length&&(o=e),n.each(t,function(n,e){o=null==o?e:r.call(this,o,e,n,t)}),o},n.merge=function(n,r){var e=+r.length,o=n.length,i=0;if(e===e)for(;i<e;)n[o++]=r[i++];else for(;t!==r[i];)n[o++]=r[i++];return n.length=o,n},n.mix=function(n,t){return n=n||{},a(t,function(t,r){t in n||(n[t]=r)}),n},n.extend=function(n,t){return n=n||{},a(t,function(t,r){n[t]=r}),n},n.slice=function(n,t,r){return c.call.apply(c,arguments)},n.inherit=Object.create||function(n){if(arguments.length>1)throw new Error("Object.create implementation only accepts the first parameter.");return o.prototype=n||null,new o};var d=Array.prototype.indexOf||function(n,t){var r=this.length;for(t=t?t<0?Math.max(0,r+t):t:0;t<r;t++)if(t in this&&n===this[t])return t;return-1};n.indexOf=function(n,t,r){return t?d.call(t,n,r):-1},n.keys=Object.keys||function(t){return n.map(t,function(n){return""+n})},n.timestamp=function(){return(new Date).valueOf()};var m=1;n.guid=function(n){return(n||"")+m++},n.visible=function(n){return n&&0<n.offsetWidth&&0<n.offsetHeight&&"none"!==n.style.display&&"hidden"!==n.style.visibility}}(),function(){n.call=function(t,r){if(l(t))try{return t.apply(null,c.call(arguments,1))}catch(t){n.error(t)}},n.proxy=function(t,r,e){if(l(t))try{return t.apply(r,c.call(arguments,2))}catch(t){n.error(t)}}}(),function(){var t=e&&(e.error||e.log),i=[],l={},f={},p={};n.error=function(n){return!0===r.TNC_ERR_SAVE&&i.push(n),!0===r.TNC_LOG_SHOW&&Function.prototype.apply.call(t,e,[n.stack||n.stacktrace||n].concat(c.call(arguments,1))),n},n.errors=function(n){return!0===n?i.splice(0,i.length):[].concat(i)},n.config=function(n,t){if(n)if(s(n)){if(!t)return l[n]||"";l[n]=t}else a(n,function(n,t){l[n]=t})},n.lock=function(n,t){var r=f[n];return 2===arguments.length&&(f[n]=t),r},n.i18n=function(t,r){if(t){if(s(t)){if(s(r))return p[t]=r;if(!u.call(o,t)){if(r&&r.i18n&&t in r.i18n){for(var e in r)if("i18n"!==e&&!u.call(o,t))return n.template(r.i18n[t],r);return r.i18n[t]}if(t in p)return r?n.template(p[t],r):p[t]}return t}return a(t,function(n,t){p[n]=t})}return n.inherit(p)}}(),function(){function e(r,e,o,i){var u;switch(r){case"":return u=o[e],u||0===u?""+u:"";case"HTML":return u=o[e],n.escapeHTML(u||0===u?""+u:"");case"I18N":return u=o.i18n&&o.i18n[e]||n.i18n(e),n.template(u,o,i)}return n.tplHooks&&n.hasOwn(n.tplHooks,r)?n.tplHooks[r](e,o,i):t}var o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;n.trim=function(n){return null==n?"":(""+n).replace(o,"")};var i=/#([\dA-Z_\-]+)?(?:\{|%7[bB])((?:[^\s\{\}]| )+)(?:\}|%7[dD])/g;n.tplHooks={},n.template=function(n,t,o){var u=t,c=o;l(u)?(c=u,u={}):u=u||{};var a=e;return l(c)&&(a=function(n,t,r){return c(n,t,r,function(n,t,r){return e(n,t,r,c)})}),(n||"").replace(i,function(n,t,e){var o=a(t||"",e,u);return null==o?!0===r.TNC_TPL_SHOW?n:"":o})},n.escapeHTML=function(n,t){return(""+n).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,t?"$&":"&apos;").replace(/"/g,t?"$&":"&quot;").replace(/&amp;([a-z]+|(#\d+)|(#x[\da-f]+));/i,"&$1;")},n.unescapeHTML=function(n){return(""+n).replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&apos;/g,"'").replace(/&quot;/g,'"')};var u=/[-+*.^$?|(){}\[\]\\]/g,c=/[\s\uFEFF\xA0]+/g,a=c.source.replace(u,"\\$&");n.escapeRegExp=function(n,t){return n=(""+n).replace(u,"\\$&"),!0===t&&(n=n.replace(c,a)),n},n.evaluate=function(n){return r.eval(n)};var f=/^-ms-/,p=/-([\da-z])/gi,y=function(n,t){return t.toUpperCase()};n.camelCase=function(n){return s(n)?n.replace(f,"ms-").replace(p,y):""}}(),function(){n.toArray=function(t){if(null==t)return[];if(s(t))return t.split("");try{return c.call(t)}catch(r){return n.merge([],t)}},n.toQueryString=function(n,t){if("object"==typeof n){var r=[];return a(n,function(n,t){r.push(encodeURIComponent(""+n)+"="+encodeURIComponent(""+t))}),r.join(t||"&")}return""+n};var t=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g,e=r.JSON&&r.JSON.parse||function(r){var e,o=null,i=n.trim(r);switch(i){case"":throw new SyntaxError("Unexpected end of input");case"[]":return[];case"{}":return{}}if(i&&!n.trim(i.replace(t,function(n,t,r,i){return e&&t&&(o=0),0===o?n:(e=r||t,o+=!i-!r,"")})))return new Function("return "+i)();throw new SyntaxError("Invalid JSON: "+r)};n.parseJSON=function(t,r){try{return e(t)}catch(t){if(r)throw t;return n.error(t),null}};var o=/([^&=]+)=?([^&]*)/g,i=/\+/g;n.parseParams=function(n){var t,r=[];if(n=""+n)for(;t=o.exec(n);)r.push({name:decodeURIComponent(t[1].replace(i," ")),value:decodeURIComponent(t[2].replace(i," "))});return r},n.words=function(t){return n.trim(t).split(/\s+/)}}(),function(){var r=function(){},e=/^[A-Z]/,o=n.mix,i=function(n){var t=i.caller.__super__,r=t&&t[n];if(l(r))return r.apply(this,c.call(arguments,1));throw new Error('function "'+n+'" does not exist')},u=function(n,r,i){a(r,function(r,u){var c=n[r],a=typeof u;if(t!==c&&a!==typeof c)throw new Error("inherit type error: "+[r,typeof u,typeof c]);"function"===a?e.test(r)||(u.__super__=i):"object"===a&&null!==u&&(u=o(u,c)),n[r]=u})},f=function(t,e){var o=function(){return this.init.apply(this,arguments)},c=(e||r).prototype,a=o.prototype=n.inherit(c);return u(a,t,c),a.constructor=o,a.$super=i,o};n.createClass=function(n){return f(n)},n.inheritClass=function(n,t){return f(t,n)}}()});
define("tnc/core/url",["tnc/core/utils","exports"],function(e,t){var o,r,n,i=function(){return this}.call(),a=/^\/|^[^:]+:\/\//,c=/\/\.\//g,l=/\.\.?/,s=/^([\w.+-]+:)?(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,u=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/;if(i.location)try{o=i.location.href,n=i.location.hostname,r=i.location.protocol}catch(e){i.document&&(o=document.createElement("a"),o.href="/",o.href=o.href,r=o.protocol,n=o.hostname,o=o.href)}t.isLocalProtocol=function(e){return u.test(String(e).toLowerCase())},t.isCrossDomain=function(e,t){if(!(t=null==t?o:t)||!e)return!1;var i=s.exec(t),a=s.exec(e);return!(!a||(a[1]||r).toLowerCase()===(i[1]||r).toLowerCase()&&(a[2]||n).toLowerCase()===(i[2]||n).toLowerCase()&&(a[3]||("http:"===(a[1]||r).toLowerCase()?"80":"443"))===(i[3]||("http:"===(i[1]||r).toLowerCase()?"80":"443")))},t.getFullUrl=function(e,t){var r=s.exec(t=null==t?o:t);return String(e||t).replace(/#.*$/,"").replace(/^\/\//,r[1]+"//")},t.normalize=function(t){if(!t)return t;a.test(t)||0===t.indexOf("./")&&(t=t.substring(2));do{t=t.replace(c,"/")}while(t.indexOf("/./")>-1);for(var o,r=1,n=t.split("/");0<(o=e.indexOf("..",n,r));)l.test(n[o-=1])?r++:n.splice(o,2);return n.join("/")}});
define("tnc/core/cookie",["exports"],function(e){e.has=function(e){return new RegExp(" "+e+"=([^;]+)(?:;|$)").test(document.cookie)},e.get=function(e){var t=document.cookie.match(new RegExp("(?:^| )"+e+"=([^;]+)(?:;|$)"));return t?unescape(t[1]):""},e.set=function(e,t,n,o){var c,i="";isNaN(n)?o=o||n:(c=new Date,c.setTime(c.getTime()+parseInt(n,10)),i=";expires="+c.toGMTString()),o=o?";domain="+o:"",document.cookie=e+"="+escape(t)+i+";path=/"+o},e.del=function(t,n){e.set(t,"",-1,n)}});
define("app/sys/timer",["exports"],function(n){var t=window.clearInterval,e=window.clearTimeout,l=window.setInterval,o=window.setTimeout;return n.clearInterval=function(){return Function.prototype.apply.call(t,null,arguments)},n.clearTimeout=function(){return Function.prototype.apply.call(e,null,arguments)},n.setInterval=function(){return Function.prototype.apply.call(l,null,arguments)},n.setTimeout=function(){return Function.prototype.apply.call(o,null,arguments)},n});
define("web/i18n/general",["tnc/core/utils"],function(_){_.i18n({I_SITE_NAME:"Gays.com",L_AGE:"Age",L_CITY:"City",L_DETAILS:"Details",L_TOTAL:"Total",L_ZIP_CODE:"Post/ZIP code",T_OF:"of",H_ACTIONS:"Actions",L_GENDER:"Gender",L_GENDER_M:"Male",L_GENDER_F:"Female",L_GENDER_W:"Female",L_GENDER_P:"Couple",L_GENDER_TV:"Non-binary",L_GENDER_TS:"Trans",L_GENDER_FTM:"Transgender Man",L_GENDER_MTF:"Transgender Woman",L_ONLINE_REASON:"Online reason",L_ONLINE_REASON_ADMIN:"Questions & Support",L_ONLINE_REASON_0:"Chat",L_ONLINE_REASON_1:"Flirt",L_ONLINE_REASON_2:"Date",L_ONLINE_REASON_3:"Have Fun",L_ONLINE_REASON_4:"Find Friends",L_SEARCH_FOR:"Looking for",T_UNREAD_INBOX:"new message",T_UNREAD_INBOXS:"new messages",T_UNREAD_POKE:"New flirt",T_UNREAD_POKES:"New flirts",T_UNREAD_VISITOR:"new profile visitors",T_UNREAD_VISITORS:"new profile visitors"})});
define("web/i18n/action",["tnc/core/utils"],function(A){A.i18n({A_CLOSE:"Close",A_CANCEL:"Cancel",A_CONFIRM:"Confirm",A_COLLAPSE:"Collapse",A_DELETE:"Delete",A_EDIT:"Edit",A_OK:"OK",A_SAVE:"Save",A_UPLOAD:"Upload Photos"})});
define("web/i18n/comment",["tnc/core/utils"],function(e){e.i18n({T_COMMENT:"· Reply",T_REPLY_COMMENT:"Reply",T_LOAD_MORE_COMMENT:"Show other comments",T_LOAD_MORE_SUB_COMMENT:"reply",T_LOAD_MORE_SUB_COMMENTS:"replies",T_REPORT_COMMENT:"Report comment",T_DELETE_COMMENT:"Delete comment",T_SHARE_COMMENT:"· Share via WhatsApp",T_COMMENT_ADD_PLACEHOLDER:"\tWrite a comment",T_COMMENT_EDITOR_INFO_MESSAGE:"Write something… remember, insults and contact information don’t belong here.",A_SEND:"Send"})});
define("web/i18n/editor",["tnc/core/utils"],function(T){T.i18n({T_TEXT_STRONG:"bold text",T_TEXT_EMPHASIZED:"emphasized text",T_TEXT_HEADING:"heading text",T_TEXT_LIST_HERE:"list text",T_TEXT_QUOTE_HERE:"quote text"})});
define("web/i18n/error",["tnc/core/utils"],function(o){o.i18n({E_INVALID_CSRF_TOKEN:'Wrong username/password combination.<br>Please pay attention to your password\'s upper and lower case and check your <strong>caps lock key<strong>!<br>You can request a new password here: <strong><a href="/forgot_password">Forgot password</a></strong>',T_YOU_HAVE_COOKIE_DISABLED_IN_YOUR_BROWSER:'<strong>Your Browser doesn’t accept Cookies</strong><br>In order to access Gays.com you have to accept cookies. Cookies are required for many internet services. <strong><a href="https://www.google.com/?gws_rd=ssl#q=how+do+i+enable+cookies+on+my+browser">How do I activate cookies on my browser?</a></strong>'})});
define("web/i18n/like",["tnc/core/utils"],function(e){e.i18n({T_LIKE:"Members",T_LIKES:" · #{NUM} Members",T_LIKES_OTHERS:" and  #{NUM} more…",T_LIKES_LIKED:" · #{NUM} Members",T_LIKE_LIKED:" · 1 member",H_LIKE_MEMBERS:"#{NUM} Members",T_ALREADY_LIKE:"You like this",T_TO_LIKE:"I like it",T_THUMB:"Like",T_THUMBED:"You like this"})});
define("web/i18n/modal",["tnc/core/utils"],function(i){i.i18n({H_DIALOG_ALERT:"Notification",H_DIALOG_CHOSE:"Important",H_DIALOG_CONFIRM:"Are you sure?",H_WEBCAM:"Webcam"})});
define("web/i18n/time",["tnc/core/utils"],function(_){_.i18n({T_TIME_REAL:"#{YEAR}-#{MONTH}-#{DAY} #{HOUR}:#{MINUTE}",T_TIME_PAST_MIN:"Just now",T_TIME_NEXT_MIN:"Just now",T_TIME_PAST_MAX:"It's been a while.",T_TIME_NEXT_MAX:"In the distant future.",T_TIME_PAST:"#{TIME} ago",T_TIME_NEXT:"in #{TIME}",T_TIME_P_SECOND:"one minute",T_TIME_S_SECOND:"one minute",T_TIME_P_MINUTE:"#{NUM} minutes",T_TIME_S_MINUTE:"one minute",T_TIME_P_HOUR:"#{NUM} hours",T_TIME_S_HOUR:"one hour",T_TIME_P_DAY:"#{NUM} days",T_TIME_S_DAY:"one day",T_TIME_P_WEEK:"#{NUM} weeks",T_TIME_S_WEEK:"one week",T_TIME_P_MONTH:"#{NUM} months",T_TIME_S_MONTH:"one month",T_TIME_P_YEAR:"#{NUM} years",T_TIME_S_YEAR:"one year"})});
define("web/main",["web/i18n/general","web/i18n/action","web/i18n/comment","web/i18n/editor","web/i18n/error","web/i18n/like","web/i18n/modal","web/i18n/time"],function(){});
define("app/sys/config",["tnc/core/utils","tnc/core/config","app/sys/timer","web/main"],function(n,e){var t=n.inherit(e);t.SUCCESS=0,t.user=function(n,e){var i=t.get("user");return"name"===n&&(n="nickname"),null==n?i:null==i?e:t.get(n,e,i)},t.language=function(){return t.user("culture")||document.documentElement.lang||"de"},n.tplHooks.URL_USER=function(n,e){return"/p/"+e[n]};var i={},r=n.i18n();if(n.i18n=function(e,u){var a=t.get("i18n")||{};if(e){if(n.isString(e)){if(n.isString(u))return a[e]=u;if(!n.hasOwn(i,e)){if(u&&u.i18n&&e in u.i18n){for(var f in u)if("i18n"!==f&&!n.hasOwn(i,e))return n.template(u.i18n[e],u);return u.i18n[e]}if(e in a)return u?n.template(a[e],u):a[e];if(e in r)return u?n.template(r[e],u):r[e]}return e}return n.each(e,function(n,e){a[n]=e})}return n.inherit(n.extend(r,a))},!isNaN(t.get("server.time","O"))){var u=+new Date,a=window.performance;"undefined"!=typeof document&&(u=+new Date(document.lastModified)||u,void 0!==a&&a.timing&&(u=+new Date(a.timing.responseStart)||u));var f=t.get("server.time")-u;n.log("time.diff",f),n.timestamp=function(){return+new Date+f}}return t});
define("lib/jQuery/onrequest",["jquery","lib/Fingerprint","tnc/core/url","tnc/core/utils","tnc/core/cookie","app/sys/config"],function(t,e,a,n,s,r){t(document).on("submit","form",function(n){if("post"===this.method.toLowerCase()&&!a.isCrossDomain(this.action)){if(!t(this).is('[data-jobs~="native"]')){if(n.isDefaultPrevented())return;if(n.isPropagationStopped())return}var s=t('meta[name="token"]').last().attr("content");if(s){var r=t('input[name="_csrf_token_"]',this);r.size()||(r=t('<input type="hidden" name="_csrf_token_" />').appendTo(this)),r.val(s)}if(e.hash){var i=t('input[name="_fingerprint_"]',this);i.size()||(i=t('<input type="hidden" name="_fingerprint_" />').appendTo(this)),i.val(e.hash)}}}),t.ajaxPrefilter(function(i,o,c){if(i.crossDomain=a.isCrossDomain(i.url,location.href),!i.crossDomain){c.setRequestHeader("Cache-Control","no-cache");var d=r.get("user.id");d&&c.setRequestHeader("X-User-ID",d)}if(!i.crossDomain&&/^post$/i.test(i.type)){var p=s.get("csrf")||t('meta[name="token"]').last().attr("content");if(i.data&&n.isFunction(i.data.set||i.data.append))i.data.set?(p&&i.data.set("_csrf_token_",p),e.hash&&i.data.set("_csrf_token_",e.hash)):(p&&i.data.append("_csrf_token_",p),e.hash&&i.data.append("_csrf_token_",e.hash));else{if(i.headers&&/multipart\/form-data/.test(i.headers["Content-Type"]))throw new Error("no implementation.");i.headers&&/application\/json/.test(i.headers["Content-Type"])||(p&&(i.data=(i.data||"").replace(/(^|&)_csrf_token_(=[a-z0-9-_]*)?/,""),i.data+=(i.data?"&":"")+"_csrf_token_="+p),e.hash&&(i.data=(i.data||"").replace(/(^|&)_fingerprint_(=[a-z0-9-_]*)?/,""),i.data+=(i.data?"&":"")+"_fingerprint_="+e.hash))}}i.data instanceof window.FormData&&(i.processData=!1,i.contentType=!1)}),t.each(t.ajaxSettings.converters,function(e,a){t.ajaxSettings.converters[e]=function(t){if(/^\s*INVALID CSRF-TOKEN\s*$/.test(t))throw new Error(n.i18n("E_INVALID_CSRF_TOKEN"));return!0===a?t:a(t)}})});
define("lib/jQuery/onrespond",["jquery","tnc/core/utils"],function(e,r){e.ajaxSettings.converters["text df-json"]=function(n){if(/^\s*INVALID CSRF-TOKEN\s*$/.test(n))throw new Error(r.i18n("E_INVALID_CSRF_TOKEN"));var t=e.parseJSON(n);if(!t||0!==t.code)throw t;return t}});
define("lib/jQuery/oninput",["jquery"],function(t){"oninput"in window||(t.event.special.input={setup:function(){if(t.nodeName(this,"input")&&!/button|image|submit/.test(this.type))return t.event.add(this,"propertychange._input",function(e){"value"===e.originalEvent.propertyName&&"on"!==this.getAttribute("data-disable-simulate")&&t.event.simulate("input",this,e,!0)}),!1;t.event.add(this,"beforeactivate._input",function(e){var i=e.target;t.nodeName(i,"input")&&!/button|image|submit/.test(i.type)&&(t._data(i,"inputBubbles")||(t.event.add(i,"input._input",function(e){!this.parentNode||e.isSimulated||e.isTrigger||"on"===this.getAttribute("data-disable-simulate")||t.event.simulate("input",this.parentNode,e,!0)}),t._data(i,"inputBubbles",!0)))})},handle:function(t){if(this!==t.target||t.isSimulated||t.isTrigger||/button|image|submit|checkbox|radio/.test(this.type))return t.handleObj.handler.apply(this,arguments)},teardown:function(){return t.event.remove(this,"._input"),t.nodeName(this,"input")}})});
define("tnc/core/browser",["exports"],function(exports){function cssClass(o,e){return(o?"s-":"n-")+e}var global=window,root=document,html=root.documentElement,style=root.createElement("div").style,ieLt11=eval("/*@cc_on!@*/!1");exports.opera="opera"in global,exports.safari=/constructor/i.test(global.HTMLElement),exports.ie="number"==typeof root.documentMode||ieLt11,exports.edge=!exports.ie&&!!global.StyleMedia,exports.ios=/iPhone|iPad|iPod/.test(navigator.userAgent),exports.android=/^Linux/.test(navigator.platform)&&/Android/.test(navigator.userAgent),exports.wphone=/IEMobile|Windows Phone/.test(navigator.userAgent),exports.mobile=exports.ios||exports.android||exports.wphone,exports.useTouch="ontouchend"in root,exports.usePointer=navigator.msPointerEnabled||navigator.pointerEnabled||!1,exports.EV_TOUCH_DOWN=exports.useTouch?"touchstart":navigator.msPointerEnabled?"MSPointerDown":navigator.pointerEnabled?"pointerdown":"mousedown",exports.EV_TOUCH_OVER=exports.useTouch?"touchstart":navigator.msPointerEnabled?"MSPointerOver":navigator.pointerEnabled?"pointerover":"mouseover",exports.EV_TOUCH_MOVE=exports.useTouch?"touchmove":navigator.msPointerEnabled?"MSPointerMove":navigator.pointerEnabled?"pointermove":"mousemove",exports.EV_TOUCH_OUT=exports.useTouch?"touchend":navigator.msPointerEnabled?"MSPointerOut":navigator.pointerEnabled?"pointerout":"mouseout",exports.EV_TOUCH_UP=exports.useTouch?"touchend":navigator.msPointerEnabled?"MSPointerUp":navigator.pointerEnabled?"pointerup":"mouseup",exports.EV_TOUCH_CANCEL=exports.useTouch?"touchcancel":navigator.msPointerEnabled?"MSPointerCancel":navigator.pointerEnabled?"pointercancel":"mousecancel",exports.EV_GESTURE_START=exports.useTouch||navigator.pointerEnabled?"gesturestart":navigator.msPointerEnabled?"MSGestureStart":"",exports.EV_GESTURE_CHANGE=exports.useTouch||navigator.pointerEnabled?"gesturechange":navigator.msPointerEnabled?"MSGestureChange":"",exports.EV_GESTURE_END=exports.useTouch||navigator.pointerEnabled?"gestureend":navigator.msPointerEnabled?"MSGestureEnd":"";for(var vendor,vendors=["OT","msT","MozT","webkitT","t"];(vendor=vendors.pop())&&!(vendor+"ransform"in style););exports.cssTransform=vendor+"ransform"in style,exports.cssTransition=vendor+"ransition"in style,exports.PROP_VENDOR=vendor?vendor.slice(0,-1).toLowerCase():"",exports.PROP_TRANSFORM=vendor?vendor+"ransform":"",exports.PROP_TRANSITION=vendor?vendor+"ransition":"",exports.CSS_VENDOR=exports.PROP_VENDOR&&"-"+exports.PROP_VENDOR+"-",exports.CSS_TRANSFORM=exports.CSS_VENDOR+"transform",exports.CSS_TRANSITION=exports.CSS_VENDOR+"transition",exports.EV_TRANSITION_END={"":"transitionend",moz:"transitionend",o:"otransitionend",ms:"MSTransitionEnd",webkit:"webkitTransitionEnd"}[exports.PROP_VENDOR],vendors=["OA","msA","MozA","webkitA","a"];for(;(vendor=vendors.pop())&&!(vendor+"nimation"in style););exports.cssAnimation=vendor+"nimation"in style,exports.PROP_ANIMATION=vendor?vendor+"nimation":"",exports.CSS_ANIMATION=("a"===vendor?"":exports.CSS_VENDOR)+"animation",exports.EV_ANIMATION_START={a:"animationstart",OA:"oanimationstart",msA:"MSAnimationStart",MozA:"animationstart",webkitA:"webkitAnimationStart"}[vendor],exports.EV_ANIMATION_ITERATION={a:"animationiteration",OA:"oanimationiteration",msA:"MSAnimationIteration",MozA:"animationiteration",webkitA:"webkitAnimationIteration"}[vendor],exports.EV_ANIMATION_END={a:"animationend",OA:"oanimationend",msA:"MSAnimationEnd",MozA:"animationend",webkitA:"webkitAnimationEnd"}[vendor],vendors=["-o-","-moz-","-webkit-",""];for(;null==(vendor=vendors.pop())&&(style.cssText=exports.CSS_TRANSFORM+":translateX("+vendor+"calc(1px))",!(style[exports.PROP_TRANSFORM].length>20)););return exports.cssCalc=null!=vendor,exports.CSS_CALC=vendor+"calc",exports.XHR2="FormData"in global,exports.WebSocket="Blob"in global&&("WebSocket"in global||"MozWebSocket"in global)&&(!exports.android||4.4<=parseFloat((/Android (\d+(?:.\d+)?)/.exec(navigator.userAgent)||["5.0"]).pop())),exports.WebP=exports.WebSocket&&(exports.android||"Google Inc."===navigator.vendor),exports.matchesSelector=(html.webkitMatchesSelector||html.mozMatchesSelector||html.msMatchesSelector||html.oMatchesSelector||html.matchesSelector)instanceof Function,exports.fixedPosition=exports.opera||exports.XHR2||exports.matchesSelector||!exports.useTouch&&exports.safari||ieLt11&&root.all&&global.XMLHttpRequest||!1,exports.overflowScroll=exports.XHR2||exports.opera||ieLt11||!exports.useTouch&&exports.safari||!1,html.className+=" "+[cssClass(exports.cssTransform,"transform"),cssClass(exports.useTouch||exports.usePointer,"touchable"),cssClass(exports.fixedPosition,"position-fixed"),cssClass(exports.overflowScroll,"overflow-scroll")].join(" "),exports.KEY={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CONTROL:17,ALT:18,CAPS_LOCK:20,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,RIGHT:39,UP:38,DOWN:40,INSERT:45,DELETE:46,NUMPAD_MULTIPLY:106,NUMPAD_ADD:107,NUMPAD_ENTER:108,NUMPAD_SUBTRACT:109,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,COMMA:188,PERIOD:190,WINDOWS:91,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,MENU:93},exports});
define("tnc/class/view/Touchable",["exports","tnc/core/utils","tnc/core/browser"],function(t,i,n){function e(t,i){var n=i.clientX-t.clientX,e=i.clientY-t.clientY;return 180*Math.atan2(e,n)/Math.PI}function a(t,i){var n=i.clientX-t.clientX,e=i.clientY-t.clientY;return Math.sqrt(n*n+e*e)}function r(t,i){return t.length>=2&&i.length>=2?a(i[0],i[1])/a(t[0],t[1]):1}function s(t,i){return t.length>=2&&i.length>=2?e(i[1],i[0])-e(t[1],t[0]):0}function c(t,n){this.index=n,this.timestamp=t.timeStamp||i.timestamp(),this.target=t.target,this.clientX=t.clientX,this.clientY=t.clientY,this.screenX=t.screenX,this.screenY=t.screenY}return t=t=i.createClass({init:function(t){this.config=i.mix(t&&t.config,this.config)},config:{draggable:!1,rotatable:!1,scalable:!1,swipeable:!1,swipeMaxDistance:150,swipeMinDistance:60,swipeMinDuration:200,tapMaxDistance:10,tapMaxDuration:250},enableDragX:!1,enableDragY:!1,dragging:!1,swiping:!1,gesturing:!1,touchMaps:null,touchStack:null,eventHandler:function(t){t=t.originalEvent||t;var i=this.eventTarget(t,t.target||t.srcElement);switch(t.type){case n.EV_TOUCH_DOWN:this.updateTouches(t),this.filterTouchStart(t,i);break;case n.EV_TOUCH_MOVE:this.touchStack&&this.touchStack.length&&(this.updateTouches(t),this.filterTouchMove(t,i));break;case n.EV_TOUCH_OUT:if(!this.touchStack||!this.touchStack.length)return;case n.EV_TOUCH_UP:this.updateTouches(t),this.filterTouchEnd(t,i),this.removeTouches(t);break;case n.EV_TOUCH_CANCEL:this.filterTouchCancel(t,i)}},eventTarget:function(t,i){return i},updateTouches:function(t){var n=t.changedTouches||[t],e=this.touchStack||[],a=this.touchMaps||{};i.each(n,function(t,n){var r=new c(n,n.identifier||n.pointerId||0);i.hasOwn(a,r.index)?a[r.index].point=r:e.push(a[r.index]={index:r.index,point:r,start:r})}),t.changedTouches=n,this.touchStack=e,this.touchMaps=a},removeTouches:function(t){var n=t.changedTouches||[t],e=this.touchStack||[],a=this.touchMaps||{};i.each(n,function(t,n){var r=n.identifier||n.pointerId||0;delete a[r],e=i.grep(e,function(t,i){return i.index!==r})}),this.touchStack=e,this.touchMaps=a},canTap:function(t){return null!=t},canDrag:function(t){return null!=t&&this.config.draggable},canSwipe:function(t){return null!=t&&this.config.swipeable},canGesture:function(t){return null!=t&&(this.config.rotatable||this.config.scalable)},filterTouchStart:function(t,i){if(1<this.touchStack.length)return this.filterGestureStart(t,i);if(this.filterDragStart(t,i)||this.filterSwipeStart(t,i))return!0;var n=this.touchStack[0];return this.onTouchStart(t,i,{index:n.index,start:n.start,point:n.point}),!1},filterTouchMove:function(t,i){switch((this.swiping||this.dragging||this.gesturing)&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation?t.stopPropagation():t.cancelBubble=!0),!0){case this.swiping:return this.filterSwipeMove(t,i);case this.dragging:return this.filterDragMove(t,i);case this.gesturing:return this.filterGestureChange(t,i)}var n=this.touchStack[0];return this.onTouchMove(t,i,{index:n.index,start:n.start,point:n.point}),!1},filterTouchEnd:function(t,i){switch(!0){case this.swiping:return this.filterSwipeEnd(t,i);case this.dragging:return this.filterDragEnd(t,i);case this.gesturing:return this.filterGestureEnd(t,i)}var n=this.touchStack[0];if(this.onTouchEnd(t,i,{index:n.index,start:n.start,point:n.point}),1!==this.touchStack.length||!this.canTap(i))return!1;var e=n.start,a=n.point,r=a.timestamp-e.timestamp,s=Math.max(Math.abs(a.clientX-e.clientX),Math.abs(a.clientY-e.clientY));return this.config.tapMaxDuration>=r&&this.config.tapMaxDistance>=s&&this.onTouchTap(t,i,{index:n.index,start:n.start,point:n.point}),!1},filterTouchCancel:function(t,i){var n=this.touchStack[0];return this.onTouchCancel(t,i,{index:n.index,start:n.start,point:n.point}),delete this.touchStack,delete this.touchMaps,!1},filterGestureStart:function(t,i){return this.swiping&&this.filterSwipeEnd(t,i),this.dragging&&this.filterDragEnd(t,i),!!this.canGesture(i)&&(this.gesturing=!0,this.onGestureStart(t,i,{starts:[this.touchStack[0].start,this.touchStack[1].start],points:[this.touchStack[0].point,this.touchStack[1].point]}),!0)},filterGestureChange:function(t,i){var n=[this.touchStack[0].start,this.touchStack[1].start],e=[this.touchStack[0].point,this.touchStack[1].point];return this.onGestureChange(t,i,{starts:n,points:e,rotation:t.rotation||s(n,e),scale:t.scale||r(n,e)}),!0},filterGestureEnd:function(t,i){return this.onGestureEnd(t,i,{starts:[this.touchStack[0].start,this.touchStack[1].start],points:[this.touchStack[0].point,this.touchStack[1].point]}),this.gesturing=!1,!0},filterDragStart:function(t,i){if(this.canDrag(i)){var n=i.getBoundingClientRect(),e=n.width||n.right-n.left,a=n.height||n.bottom-n.top,r=e>i.offsetParent.offsetWidth,s=a>i.offsetParent.offsetHeight;if(r||s){this.dragging=!0,this.enableDragX=r,this.enableDragY=s;var c=this.touchStack[0];return this.onDragStart(t,i,{index:c.index,start:c.start,point:c.point}),!0}}return!1},filterDragMove:function(t,i){var n=this.touchStack[0];return this.onDragMove(t,i,{index:n.index,start:n.start,point:n.point}),!0},filterDragEnd:function(t,i,n){var e=this.touchStack[0];return this.onDragEnd(t,i,{index:e.index,start:e.start,point:e.point,ignored:!0===n}),this.dragging=!1,this.enableDragX=!1,this.enableDragY=!1,!0},filterSwipeStart:function(t,i){if(this.canSwipe(i)){var n=this.touchStack[0];return this.swiping=!0,this.onSwipeStart(t,i,{index:n.index,start:n.start,point:n.point}),!0}return!1},filterSwipeMove:function(t,i){var n=this.touchStack[0],e=n.start,a=n.point,r=a.clientX-e.clientX,s=a.clientY-e.clientY;return this.onSwipeMove(t,i,{index:n.index,start:n.start,point:n.point,deltaX:r,deltaY:s}),!0},filterSwipeEnd:function(n,e,a){var r,s,c,o,h,u=this.touchStack[0],l=u.start,g=u.point,f=!1,p=0;return a||(s=g.clientX-l.clientX,c=g.clientY-l.clientY,o=Math.abs(s),h=Math.abs(c),r=Math.max(o,h),p=i.timestamp()-l.timestamp,(this.config.swipeMaxDistance<=r||this.config.swipeMinDistance<=r&&this.config.swipeMinDuration>=p)&&(f=o<h?0<c?t.SWIPE_DOWN:t.SWIPE_UP:0<s?t.SWIPE_RIGHT:t.SWIPE_LEFT)),this.onSwipeEnd(n,e,{index:u.index,start:u.start,point:u.point,duration:p,direction:f,ignored:!0===a}),this.swiping=!1,!0},onTouchStart:function(t,i,n){},onTouchMove:function(t,i,n){},onTouchEnd:function(t,i,n){},onTouchCancel:function(t,i,n){},onTouchTap:function(t,i,n){},onGestureStart:function(t,i,n){},onGestureChange:function(t,i,n){},onGestureEnd:function(t,i,n){},onDragStart:function(t,i,n){},onDragMove:function(t,i,n){},onDragEnd:function(t,i,n){},onSwipeStart:function(t,i,n){},onSwipeMove:function(t,i,n){},onSwipeEnd:function(t,i,n){}}),t.SWIPE_UP="up",t.SWIPE_DOWN="down",t.SWIPE_LEFT="left",t.SWIPE_RIGHT="right",t});
define("lib/jQuery/ontouch",["jquery","tnc/class/view/Touchable","tnc/core/browser","tnc/core/utils"],function(e,t,n,r){function i(t,n,i){return new e.Event(n,r.reduce(a,function(e,n){return e[n]=t[n],e},i||{}))}var o=new t({config:{rotatable:!0,scalable:!0,swipeable:!0}}),a="button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),u=0;o.canDrag=function(){return!1},o.canTap=function(t){return!e(t).is(".swipeable, .gesturable")},o.canSwipe=function(t){return 0<e(t).closest(".swipeable").size()},o.canGesture=function(t){return 0<e(t).closest(".gesturable").size()},o.onTouchTap=function(t,n,o){var a=t.timeStamp||r.timestamp();250<a-u?e.event.trigger(i(t,"t-tap",{isSimulated:!0}),null,n):e.event.trigger(i(t,"t-double-tap",{isSimulated:!0}),null,n),u=a},o.onSwipeEnd=function(t,n,r){if(!r.ignored&&!1!==r.direction){var o=r.start.target||r.start.srcElement;e.event.trigger(i(t,"t-swipe-"+r.direction,{direction:r.direction,duration:r.duration,isSimulated:!0}),null,o),e.event.trigger(i(t,"t-swipe",{direction:r.direction,duration:r.duration,isSimulated:!0}),null,o)}},o.onGestureChange=function(t,n,r){var o=r.starts[0].target||r.starts[0].srcElement;e.event.trigger(i(t,"t-gesture",{rotation:r.rotation,scale:r.scale,isSimulated:!0}),null,o)},e(document).on([n.EV_TOUCH_DOWN,n.EV_TOUCH_MOVE,n.EV_TOUCH_UP,n.EV_TOUCH_OUT,n.EV_TOUCH_CANCEL].join(" "),o.eventHandler=function(){return t.prototype.eventHandler.apply(o,arguments)})});
define("lib/jQuery/deferred",["jquery"],function(e){"use strict";function n(){return Array.prototype.slice.call(this)}function t(e){return e}function r(e){throw e}function i(n,t,r){var i;try{n&&e.isFunction(i=n.then)?i.call(n,t,r):t.call(void 0,n)}catch(n){r.call(void 0,n)}}return e.extend({Deferred:function(n){var i=[["notify","progress",e.Callbacks("memory"),e.Callbacks("memory"),2],["resolve","done",e.Callbacks("once memory"),e.Callbacks("once memory"),0,"resolved"],["reject","fail",e.Callbacks("once memory"),e.Callbacks("once memory"),1,"rejected"]],o="pending",c={state:function(){return o},always:function(){return a.done(arguments).fail(arguments),this},catch:function(e){return c.then(null,e)},pipe:function(){var n=arguments;return e.Deferred(function(t){e.each(i,function(r,i){var o=e.isFunction(n[i[4]])&&n[i[4]];a[i[1]](function(){var n=o&&o.apply(this,arguments);n&&e.isFunction(n.promise)?n.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[i[0]+"With"](this,o?[n]:arguments)})}),n=null}).promise()},then:function(n,o,c){function a(n,i,o,c){return function(){var l=this,f=arguments,s=function(){var s,d;if(!(n<u)){if((s=o.apply(l,f))===i.promise())throw new TypeError("Thenable self-resolution");d=s&&("object"==typeof s||"function"==typeof s)&&s.then,e.isFunction(d)?c?d.call(s,a(u,i,t,c),a(u,i,r,c)):(u++,d.call(s,a(u,i,t,c),a(u,i,r,c),a(u,i,t,i.notifyWith))):(o!==t&&(l=void 0,f=[s]),(c||i.resolveWith)(l,f))}},d=c?s:function(){try{s()}catch(t){e.Deferred.exceptionHook&&e.Deferred.exceptionHook(t,d.stackTrace),n+1>=u&&(o!==r&&(l=void 0,f=[t]),i.rejectWith(l,f))}};n?d():(e.Deferred.getStackHook&&(d.stackTrace=e.Deferred.getStackHook()),window.setTimeout(d))}}var u=0;return e.Deferred(function(u){i[0][3].add(a(0,u,e.isFunction(c)?c:t,u.notifyWith)),i[1][3].add(a(0,u,e.isFunction(n)?n:t)),i[2][3].add(a(0,u,e.isFunction(o)?o:r))}).promise()},promise:function(n){return null!=n?e.extend(n,c):c}},a={};return e.each(i,function(e,n){var t=n[2],r=n[5];c[n[1]]=t.add,r&&t.add(function(){o=r},i[3-e][2].disable,i[0][2].lock),t.add(n[3].fire),a[n[0]]=function(){return a[n[0]+"With"](this===a?void 0:this,arguments),this},a[n[0]+"With"]=t.fireWith}),c.promise(a),n&&n.call(a,a),a},when:function(t){var r=arguments.length,o=r,c=Array(o),a=n.call(arguments),u=e.Deferred(),l=function(e){return function(t){c[e]=this,a[e]=arguments.length>1?n.call(arguments):t,--r||u.resolveWith(c,a)}};if(r<=1&&(i(t,u.done(l(o)).resolve,u.reject),"pending"===u.state()||e.isFunction(a[o]&&a[o].then)))return u.then();for(;o--;)i(a[o],l(o),u.reject);return u.promise()}}),e});
define("lib/jQuery/pagevisibility",["jquery"],function(i){"use strict";for(var e,t,n=Object.defineProperty||i.noop,d=!1,o=["ms","moz","webkit",""];o.length;)if(e=o.pop(),(t=e?e+"Hidden":"hidden")in document){d=!0;break}if(d)e&&(i.event.special.visibilitychange={bindType:e+"visibilitychange"},n(document,"hidden",{get:function(){return document[t]}}),n(document,"visibilityState",{get:function(){return document[e+"VisibilityState"]}}));else{var u=document.hidden=!1,c=document.visibilityState="visible";try{n(document,"hidden",{get:function(){return u},set:i.noop}),n(document,"visibilityState",{get:function(){return c},set:i.noop})}catch(i){}i(window).bind("focus blur",function(e){var t="blur"===e.type;u!==t&&(document.hidden=u=t,document.visibilityState=c=t?"hidden":"visible",i(document).trigger("visibilitychange"))})}});
define("lib/jQuery/values",["jquery","exports"],function(r,e){var n=[];return e.get=function(r){for(var e=0;e<n.length;e++)if(!0===n[e][0](r))return n[e][1](r);return""},e.set=function(r,e){for(var t=0;t<n.length;t++)if(!0===n[t][0](r)){n[t][2](r,e);break}},e.register=function(r,e,t){n.push([r,e,t])},r.valHooks.div=e});
define("lib/jQuery/history",["jquery"],function(i){"use strict";if(window.History){var n=window.History;void 0===n.Adapter&&(n.Adapter={bind:function(n,t,r){i(n).bind(t,r)},trigger:function(n,t,r){i(n).trigger(t,r)},extractEventData:function(i,n,t){return n&&n.originalEvent&&n.originalEvent[i]||t&&t[i]||void 0},onDomLoad:function(n){i(n)}})}});
define("lib/jQuery",["jquery","lib/jQuery/onrequest","lib/jQuery/onrespond","lib/jQuery/ontouch","lib/jQuery/deferred","lib/jQuery/pagevisibility","lib/jQuery/values","lib/jQuery/history"],function(e){return e});
define("tnc/class/Promise",[],function(){var t,e,n="function"==typeof Promise&&/^\n?function \w+\(\) \{\s+\[native code\]\s+\}\n?$/.test(Promise.toString()),o=function(){};return o.prototype.toString=function(){return"[object Promise]"},o.prototype.then=function(t,e,n){throw new Error("no implementation")},o.prototype.always=function(t){return this.then(t,t)},n?(o.Original=e=Promise,"function"!=typeof Promise.prototype.always&&(Promise.prototype.always=o.prototype.always)):(o.Polyfill=t=function(t){"function"==typeof t&&(this.then=t)},t.prototype.then=o.prototype.then,t.prototype.always=o.prototype.always,t.prototype.toString=o.prototype.toString),o.thenable=function(t){return"function"==typeof(t&&t.then)},o.resolve=function(t){return o.thenable(t)?t:o.resolved(t)},o.resolved=n?e.resolve.bind(e):function(e){return new t(function(t){try{return o.resolve(t?t(e):e)}catch(t){return o.rejected(t)}})},o.rejected=n?e.reject.bind(e):function(e){return new t(function(t,n){try{return n?o.resolve(n(e)):o.rejected(e)}catch(t){return o.rejected(t)}})},o.when=function(t,e,n,r){return o.resolve(t).then(e,n,r)},o});
define("tnc/class/Deferred",["tnc/class/Promise"],function(e,n){function t(){return new Error("deferred promise settled.")}var r=e.Original,o=e.Polyfill,i=r?function(){var e,n,t=this,o="pending",i=new r(function(t,r){e=t,n=r});t.promise=i,t.resolve=function(n){return e(n),i},t.reject=function(e){return n(e),i},t.state=function(){return o},i.then(function(){o="resolved"},function(){o="rejected"})}:function r(){var i=this,u=new o(null),c=[],f="pending",s=function(e,n,t){var o=i;return(e||n)&&(o=new r,c.push(function(t){t.then(e,n).then(o.resolve,o.reject)})),o.promise},l=function(t){var r,o,i=e.resolve(t);for(i.then(function(){f="resolved"},function(){f="rejected"}),s=i.then,r=0,o=c.length;r<o;r++)c[r](i);return l=c=n,i};i.promise=u,u.then=function(e,n,t){return s(e,n,t)},i.resolve=function(e){if(l)return l(e);throw t()},i.reject=function(n){if(l)return l(e.rejected(n));throw t()},i.state=function(){return f}};return i.prototype.resolve=function(e){throw new Error("no implementation")},i.prototype.reject=function(e){throw new Error("no implementation")},i.prototype.state=function(){throw new Error("no implementation")},i.prototype.toString=function(){return"[object Deferred]"},i});
define("lib/browser/rAF",["tnc/class/Deferred"],function(n){for(var e=0,i=["ms","moz","webkit","o"],o=0;o<i.length&&!window.requestAnimationFrame;++o)window.requestAnimationFrame=window[i[o]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[i[o]+"CancelAnimationFrame"]||window[i[o]+"CancelRequestAnimationFrame"];return window.requestAnimationFrame||(window.requestAnimationFrame=function(n,i){var o=(new Date).getTime(),a=Math.max(0,16-(o-e)),t=window.setTimeout(function(){n(o+a)},a);return e=o+a,t},window.requestAnimationFrame.polyfill=!0),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(n){clearTimeout(n)},window.cancelAnimationFrame.polyfill=!0),function(){var e=new n;return window.requestAnimationFrame(e.resolve),e.promise}});
define("tnc/view/input/cursor",["exports"],function(e){function t(e){return e.replace(/\r\n/g,"\n")}function n(e,t){return e.slice(0,t).split("\n").length-1}function r(e,t){return t-n(e,t)}function a(e){return"selectionStart"in e&&"selectionEnd"in e}function c(e){return e===document.activeElement}function o(e){var r=0,c=0;if(a(e))r=e.selectionStart,c=e.selectionEnd;else{var o=document.selection.createRange(),s=e.createTextRange(),i=e.value,u=i.length;if(u&&o&&s&&e===o.parentElement()){var l=e.createTextRange();l.collapse(!1),s.moveToBookmark(o.getBookmark()),-1<s.compareEndPoints("StartToEnd",l)?r=c=u:(i=t(i),r=-s.moveStart("character",-u),r+=n(i,r),-1<s.compareEndPoints("EndToEnd",l)?c=u:(c=-s.moveEnd("character",-u),c+=n(i,c)))}}return{start:r,end:c}}function s(e,t){return t=t||o(e),e.setAttribute(i,[t.start,t.end].join(",")),t}var i="data-cursor";e.handleEvent=function(t){switch(t.type){case"focus":e.restore(this);break;case"mouseup":s(this);break;case"keyup":9!==t.keyCode&&s(this);break;case"keydown":9===t.keyCode&&s(this)}},e.get=function(e){var t;return c(e)?s(e):(t=e.getAttribute(i))?(t=t.split(","),{start:~~t[0],end:~~t[1]}):{start:0,end:0}},e.set=function(n,c,o){return e.focus(n,function(){if(c=isNaN(c)?n.value.length:c,o=isNaN(o)?c:o,a(n))n.selectionStart=c,n.selectionEnd=o;else{var e=n.createTextRange(),i=t(n.value);e.collapse(!0),c===o?e.move("character",r(i,c)):(e.moveEnd("character",r(i,o)),e.moveStart("character",r(i,c))),e.select()}return s(n,{start:c,end:o})})},e.restore=function(t){var n=t.getAttribute(i);n&&(n=n.split(","),e.set(t,n[0],n[1]))},e.focus=function(t,n,r){return c(t)||!r?n():arguments.callee.caller!==arguments.callee?(t.focus(),e.restore(t),e.focus(t,n)):void 0},e.insert=function(t,n,r,c){return e.focus(t,function(){var c=e.get(t),o=t.value;if(c.start>c.end&&(c.temp=c.start,c.start=c.end,c.end=c.temp),a(t))t.value=o.slice(0,c.start)+n+o.slice(c.end,o.length);else{document.selection.createRange().text=n}return c.end=c.start+n.length,c.start=r?c.start:c.end,e.set(t,c.start,c.end)},r||c)}});
define("tnc/core/context",[],function(){var t,n=t=function(){return this}();try{for(;n!=n.parent&&n.parent.document;)n=n.parent}catch(t){}return{now:t,top:n}});
define("app/view/screen",["tnc/core/context","exports"],function(e,t){var n=e.top,r=n.document.documentElement;return t.match=function(e){var t=n.innerWidth||r.clientWidth;if(t)switch(String(e).toLowerCase()){case"xs":return 480>t;case"ss":return 480<=t;case"sm":return 768<=t;case"md":return 992<=t;case"lg":return 1200<=t}return!1},t.current=function(){var e=n.innerWidth||r.clientWidth;return 1200<=e?"lg":992<=e?"md":768<=e?"sm":480<=e?"ss":"xs"},t});
define("tnc/core/tasks",[],function(){function e(e){return o[c]=n.call.apply(n,e),c++}function n(){var e=arguments,n=this;return"function"!=typeof n&&(n=new Function(String(n))),function(){n.apply(i,e)}}function t(e){if(u)setTimeout(n.call(t,e),0);else{var r=o[e];if(r){u=!0;try{r()}finally{a(e),u=!1}}}}function a(e){delete o[e]}var r=function(){return this}();if(r.setImmediate)return{run:r.setImmediate.bind(r),cancel:r.clearImmediate.bind(r)};var i,s,c=1,o={},u=!1,f=r.document;return"[object process]"==={}.toString.call(r.process)?function(){s=function(){var a=e(arguments);return process.nextTick(n.call(t,a)),a}}():function(){if(r.postMessage&&!r.importScripts){var e=!0,n=r.onmessage;return r.onmessage=function(){e=!1},r.postMessage("","*"),r.onmessage=n,e}}()?function(){var n="setImmediate$"+Math.random()+"$",a=function(e){r===e.source&&"string"==typeof e.data&&0===e.data.indexOf(n)&&t(+e.data.slice(n.length))};r.addEventListener?r.addEventListener("message",a,!1):r.attachEvent("onmessage",a),s=function(){var t=e(arguments);return r.postMessage(n+t,"*"),t}}():r.MessageChannel?function(){var n=new MessageChannel;n.port1.onmessage=function(e){t(e.data)},s=function(){var t=e(arguments);return n.port2.postMessage(t),t}}():f&&"onreadystatechange"in f.createElement("script")?function(){var n=f.documentElement;s=function(){var a=e(arguments),r=f.createElement("script");return r.onreadystatechange=function(){t(a),r.onreadystatechange=null,n.removeChild(r),r=null},n.appendChild(r),a}}():function(){s=function(){var a=e(arguments);return setTimeout(n.call(t,a),0),a}}(),{run:s,cancel:a}});
define("app/view/settings",["lib/jQuery","exports"],function(t,e){var n=/^\s*(on|true)\s*$/i,r=/^\s*@\s*/,s=/^\s*[<^]\s*/,u=/^\s*<\s*/,i=/(\s*)([<^@])(\s*)/g,c=/^\s*\^\s*/,a=/^\s*(((@\s*)?[+<>~^]\s*)|@\s+|@\s*$)/;return e.key=function(t,e){return"data-"+(t?t+(e?"-":""):"")+(e||"")},e.get=function(t,n,r,s){var u=t&&(n||r)&&t.getAttribute(e.key(n,r));return null==u?null==s?"":""+s:u},e.has=function(t,n,r){return!(!t||!n&&!r)&&t.hasAttribute(e.key(n,r))},e.set=function(t,n,r,s){return t&&(n||r)?(t.setAttribute(e.key(n,r),""+s),""+s):""},e.isOn=function(t,r,s,u){return n.test(e.get(t,r,s,u))},e.isOff=function(t,n,r,s){return!e.isOn(t,n,r,s)},e.query=function(n,o,f){if(!o)return t(f&&f.apply&&f.call(null,n,o)||"",n.ownerDocument);var l,p,h,y,v,g="",w=[],b=o.replace(i,function(t,e,n,r){return w.push(n),e+"[_]"+r});try{p=t.find.tokenize(b).concat()}catch(t){throw new SyntaxError("unrecognized expression: "+o)}if(1<p.length){for(y=[];l=p.shift();)h=e.query(n,t.map(l,function(t){return"[_]"===t.value?w.shift():t.value}).join(""),f).get(),y=y.concat(h);return t(y)}if(s.test(o)){for(l=p.shift().concat(),b=t.map(l,function(t){return"[_]"===t.value?w.shift():t.value}).join("").replace(s,"");v=l.shift();)if("[_]"!==v.value&&(""!==g||" "!==v.type)){if(g&&/[ >+~]/.test(v.type))break;g+=v.value}if(g){switch(!0){case u.test(o):y=t(n).closest(g).not(n);break;case c.test(o):y=t(n).prevAll(g)}return/\S/.test(g=b.substr(g.length))?y.find(g):y}return t("",n.ownerDocument)}if(a.test(o))switch(o=o.replace(r,""),!0){case""===o:return t(n);case s.test(o):return e.query(n,o,f);default:return t(n).find(o)}return t(o,n.ownerDocument)},e});
define("app/view/jobs",["lib/jQuery","tnc/core/utils","tnc/core/tasks","tnc/class/Deferred","tnc/class/Promise","app/view/settings","exports"],function(e,t,n,r,a,s,i){function o(e,t,n,r,a,s){var i={event:e.type,name:r,state:s,value:a};return n.push(i),[i,n].concat(t)}function u(e){return t.reduce(e,function(e,t){if(0===e&&3!==t.nodeType)for(;t;){if(t.parentNode===t.ownerDocument)return this;if(!(t=t.parentNode))break}return e},0)}var c=e("html"),l=/^\s*(on|true)\s*$/i,f=/^[^#\s]*(?:#(.*))?\s*$/,d={};return i.has=function(e,t){var n=e.getAttribute("data-jobs");return null!=(n=n&&" "+n+" ")&&-1!==n.toLowerCase().indexOf(" "+t.toLowerCase()+" ")},i.prev=function(e,t){var n=e.getAttribute("data-jobs"),r=n&&n.match(new RegExp("(\\S+)\\s+"+t+"(?:\\s+|$)"));return r?r[1]:""},i.next=function(e,t){var n=e.getAttribute("data-jobs"),r=n&&n.match(new RegExp("(?:\\s+|^)"+t+"\\s+(\\S+)"));return r?r[1]:""},i.anchor=function(e){var t=(e.href||"").replace(f,"#$1");return t&&("#"===t?"":t)},i.option=function(e,t,n,r,a){var i;return null!=t&&(r||n)in t?i=t[r||n]:null!=e&&(i=e.getAttribute(s.key(n,r)),r&&null==i&&new RegExp("^\\s*"+n+"\\s*$").test(e.getAttribute("data-jobs"))&&(i=e.getAttribute("data-"+r))),null==i?null==a?"":a:i},i.feature=function(e,t,n,r,a){var i;return null!=t&&(r||n)in t?i=t[r||n]:null!=e&&(i=e.getAttribute(s.key(n,r)),r&&null==i&&new RegExp("^\\s*"+n+"\\s*$").test(e.getAttribute("data-jobs"))&&(i=e.getAttribute(s.key("",r)))),l.test(null==i?a:i)},i.target=function(e,t,n,r,a){return e&&s.query(e,i.option(e,t,n,null==r?"target":r),i.anchor).get(!0===a?null:0)},i.hasOption=function(e,t,n,r){return null!=t&&(r||n)in t||null!=e&&(null!=e.getAttribute(s.key(n,r))||!(!r||!new RegExp("^\\s*"+n+"\\s*$").test(e.getAttribute("data-jobs")))&&!!e.getAttribute(s.key("",r)))},i.hasTarget=function(e,t,n,r){return!!e&&i.hasOption(e,t,n,null==r?"target":r)||!!i.anchor(e)},i.trigger=function(n,a,s,i){function o(e,t,r){r===f&&this===n&&(c.off("passed."+s,o),c.off("failed."+s,u),l.resolve(t.value))}function u(e,t,r){r===f&&this===n&&(c.off("passed."+s,o),c.off("failed."+s,u),l.reject(t.value))}var c=e(n),l=new r,f=[];return c.on("passed."+s,o),c.on("failed."+s,u),c.trigger(new e.Event(a+"."+s,{_jobs_outputs:f}),t.slice(arguments,3)),l.promise},i.emit=function(t,n,r){var a=new e.Event(n);return t.setAttribute("data-disable-simulate","on"),e.event.trigger(a,r,t),t.removeAttribute("data-disable-simulate"),a},i.resolved=function(e){var t=new r;return n.run(function(){t.resolve(e)}),t.promise},i.rejected=function(e){var t=new r;return n.run(function(){t.reject(e)}),t.promise},i.ready=function(n,s){function i(){--o||s()}var o=0,u=n;t.isString(n)||(u=e(n).add("[data-jobs]").addBack("[data-jobs]").map(function(){return this.getAttribute("data-jobs")||""}).get().join(" ")),u=t.reduce(t.words(u),function(e,n){return t.hasOwn(e,n)||(o+=e[n]=1),e},{}),t.each(u,function(e){var n=d[e];t.hasOwn(d,e)||(n=d[e]=new r,n.promise.then(function(){d[e]=a.resolved()})),n instanceof r?n.promise.then(i):n.then(i)})},i.output=function(e,n,r,a){if(!e)return a;var s=/^\s*(\S+)(?:\s+(\S+))?\s*$/i.exec(n);if(!s)return a;var i=s[1];r=null==r?!/^failed$/.test(s[2])&&(!!/^passed$/.test(s[2])||r):r;var o={},u=t.reduce(e,function(e,t){return i!==t.name||null!=r&&r!==t.state?e:t},o);return o===u?a:u},i.bind=function(n,s,o,u,l,f,g){var v=s.replace(/(\S)(\s+|$)/g,"$1."+n+"$2"),p='[data-jobs~="'+n+'"]';t.hasOwn(d,n)?d[n]instanceof r&&d[n].resolve():d[n]=a.resolved(),c.on(v,o,function(t){var r=this;if(t.namespace||e.find.matchesSelector(r,p)){if(r!==t._jobs_emitter){if(null!=t._jobs_emitter)return;t._jobs_emitter=r}var a=" "+r.getAttribute("data-jobs")+" ";if(!t.namespace&&!t._jobs_checked&&/\S\s+\S/.test(a)&&(e.each(e._data(t.delegateTarget,"events")[t.type],function(t,n){var s=" "+n.namespace+" ";-1!==a.indexOf(s)&&e.find.matchesSelector(r,n.selector)&&(a=a.replace(" "+n.namespace+" "," "))}),/\S/.test(a)))return void(t._jobs_checked=!0);t._jobs_checked=!0,("click"===t.type&&e.nodeName(this,"a")||"submit"===t.type&&e.nodeName(this,"form"))&&t.preventDefault(),i.pipe(n,t,arguments,u,l,f,g)}})},i.pipe=function(r,s,c,l,f,d,g){function v(e,t,n){try{var r=l.call(_,w,t,n);a.when(r,function(r){p(e,t,r,n)},function(r){b(e,t,r,n)})}catch(r){b(e,t,r,n)}}function p(n,a,s,i){t.proxy(f,_,w,a,s,i),t.log("passed",r,s);var c=u(y),l=o(w,j,A,r,s,!0);e.event.trigger("passed."+r,l,_),_===c||e.event.trigger(new e.Event("passed."+r,{target:_}),l,c),x||e.event.trigger("passed.jobs",[A].concat(j),_),x||_===c||e.event.trigger(new e.Event("passed.jobs",{target:_}),[A].concat(j),c)}function b(n,a,s,i){var c=s;if(d)try{c=d.call(_,w,a,s,i)||s}catch(e){c=e}t.log("failed",r,c&&(c.stack||c.message||c));var l=u(y),f=o(w,j,A,r,c,!1);e.event.trigger("failed."+r,f,_),_===l||e.event.trigger(new e.Event("failed."+r,{target:_}),f,l),x||e.event.trigger("failed.jobs",[A].concat(j),_),x||_===l||e.event.trigger(new e.Event("failed.jobs",{target:_}),[A].concat(j),l)}function h(t,r,a){A===a&&_===t.currentTarget&&(k&&(e(_).off("failed."+k,m),e(_).off("passed."+k,h)),n.run(v,t,r,a))}function m(t,r,a){A===a&&_===t.currentTarget&&(k&&(e(_).off("failed."+k,m),e(_).off("passed."+k,h)),!0===g?n.run(v,t,r,a):n.run(b,t,r,r.value,a))}var j=t.slice(c,1),w=e.event.fix(s.originalEvent||s),_=s.currentTarget||s.srcElement||s.target,y=e(_).parents().andSelf().get().reverse(),A=s._jobs_outputs=s._jobs_outputs||[],k=s.namespace?"":i.prev(_,r),x=s.namespace?"":i.next(_,r);!0===s.isSimulated&&(w=e.extend(w,s),delete w._jobs_checked,delete w._jobs_emitter,delete w._jobs_outputs),k?(e(_).on("failed."+k,m),e(_).on("passed."+k,h)):(e.event.trigger("before.jobs",[A].concat(j),_),n.run(v,w,null,A))},i});
define("app/view/ViewError",["tnc/core/utils"],function(t){var r=function(t,r){this.message=t||"",this.emitter=r};return r.prototype=t.inherit(Error.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return"[object ViewError]"},r});
define("tnc/core/templates",["tnc/core/utils","exports"],function(t,n){function e(n,e,r,i){return t.hasOwn(u,n)?u[n](e,r):i(n,e,r)}var r=document.getElementById("templates"),i=r&&r.getElementsByTagName("textarea"),u={I18N:function(n,e){return e.i18n&&e.i18n[n]||t.i18n(n)},TPL:function(t,e){return n.fill(e.tpl&&e.tpl[t]||n.get(t),e)},LOOP:function(e,r){var i=t.words(e);if(2!==i.length)return"";var u=r.tpl&&r.tpl[i[1]]||n.get(i[1]);return t.map(r[i[0]],function(t,e){return n.fill(u,e)}).join("")},DEEP:function(n,e){for(var r,i=t.trim(n).split(/\./g);null!=e&&(r=i.shift());)e=r in e?e[r]:null;return null==e?"":e}},l={},o={};return n.get=function(n){if(l.hasOwnProperty(n))return l[n];var e=document.getElementById("templates");if(e!==r&&(i=(r=e)&&r.getElementsByTagName("textarea"),o={}),o.hasOwnProperty(n))return o[n];if(i){for(e=i.item(0);e&&(1!==e.nodeType||n!==e.name);e=e.nextSibling);if(e)return o[n]=t.trim(e.value)}return""},n.set=function(t,n){return l[t]=n},n.register=function(n,e){return t.isFunction(e)&&(n=(""+n).toUpperCase(),t.hasOwn(u,n)||(u[n]=e)),e},n.fill=function(n,r,i){var u=r,l=i;t.isFunction(u)&&(l=u,u=null);var o=e;return t.isFunction(l)&&(o=function(t,n,r,i){return l(t,n,r,function(t,n,r){return e(t,n,r,i)})}),t.template(n,u,o)},n});
define("app/tpl/general",["tnc/core/templates","app/sys/config"],function(i,e){return i.set("ico/edit",'<i aria-hidden="true" class="fa fa-edit"></i>'),i.set("ico/load",'<div aria-hidden="true" class="col-xs-12 df-load"></div>'),i.set("ico/emoji-v2/path","/images/smileys/v2/smiley_#{hash}.gif"),i.set("ico/emoji-v2",'<img class="df-emoji df-emoji-v2" height="#{height}" width="#{width}" alt="#{code}" title="#{code}" src="#TPL{ico/emoji-v2/path}" />'),i.set("ico/emoji-v3/path",e.get("emojis.path")||"/community/uploads/emoticons/#{hash}"),i.set("ico/emoji-v3",'<img class="df-emoji df-emoji-v3" width="20" height="20" alt="#{code}" title="#{code}" src="#TPL{ico/emoji-v3/path}" />'),i});
define("app/tpl/notice",["app/tpl/general"],function(n){return n.set("notice",'<div class="notice fade"><button type="button" class="close" data-dismiss="notice"><i aria-hidden="true" class="fa fa-close"></i></button><span class="notice-icon"></span><span class="notice-content"></span></div>'),n});
define("app/view/job/dismiss",["exports","lib/jQuery","tnc/class/Promise","tnc/core/utils","app/view/jobs"],function(i,e,s,n,t){function r(e,s,n){return i.execute(this,null,n)}var u=[],o={};return i.register=function(i,e){if(n.hasOwn(o,i))throw new Error('dismiss "'+i+'" is registered.');return u.push("."+i),o[i]=e,e},i.execute=function(i,r,d){var c=e(i).closest(u.join(", "));if(!c.size())return s.rejected(!1);var l=t.option(i,r,"dismiss","always",!1),a=d&&d[d.length-1];return!a||a.state||l?n.reduce(o,function(i,e,s){return i||(c.hasClass(s)?e:i)},!1)(c.get(0),i,r):s.rejected(!1)},t.bind("dismiss","click",":not(form, :input), :button:enabled",r,null,null,!0),t.bind("dismiss","change",":input:enabled",r,null,null,!0),t.bind("dismiss","submit","form",r,null,null,!0),e(document).on("click.dismiss submit.dismiss","[data-dismiss]",function(i){var s=n.words(this.getAttribute("data-dismiss"));if(s.join("")){if(-1!==n.reduce(o,function(i,e,t){return-1===i?n.indexOf(t,s):i},-1)){var t=e(this).closest("."+s.join(", ."));if(t.size()){e.nodeName(this,"a")&&i.preventDefault();n.reduce(s,function(i,e){return i||(n.hasOwn(o,e)?o[e]:i)},!1)(t.get(0),this)}}}}),i});
define("app/view/job/notice",["lib/jQuery","tnc/core/utils","tnc/core/browser","tnc/class/Deferred","tnc/class/Promise","app/view/ViewError","app/tpl/notice","app/view/jobs","app/view/job/dismiss","app/view/settings","exports"],function(e,n,t,i,o,r,s,a,c,u,l){function d(e,n,t){return l.execute(this,null,t)}var p={success:"fa fa-check-circle",warning:"fa fa-exclamation-triangle",danger:"fa fa-times-circle",info:"fa fa-info-circle"};return l.show=function(c,d,f){if(!c||!c.ownerDocument&&!c.length)return o.rejected(!1);var g=a.option(f,d,"notice","target","body, body > .df-content, #df-content");if(g=n.isString(g)?u.query(f||document,g):e(g),!g.size())return o.rejected(new r("No found of notice container."));var v=e(s.get("notice")),m=a.option(f,d,"notice","type","success");v.addClass("notice-"+m),!1===a.feature(f,d,"notice","dismiss",!0)?v.find("button.close").remove():v.addClass("notice-dismissible"),v.addClass(a.option(f,d,"notice","css",""));var b=a.option(f,d,"notice","icon",p[m]);b=b&&'<i aria-hidden="true" class="'+b+'"></i>',v.find(".notice-icon").append(b),v.find(".notice-content").append(n.isString(c)?c:e(c).clone(!0,!0));var h=~~a.option(f,d,"notice","timeout",20);switch(3<=h?(h*=1e3,v.addClass("timeout")):h=!1,g=g.last(),a.option(f,d,"notice","method","prepend")){case"before":g.before(v.get(0));break;case"prepend":g.prepend(v.get(0));break;case"append":g.append(v.get(0));break;case"after":g.after(v.get(0))}var w=new i;return t.cssTransition&&v.hasClass("fade")?(v.one(t.EV_TRANSITION_END,function(){w.resolve(v.get(0))}),setTimeout(function(){v.trigger(t.EV_TRANSITION_END)},1e3*parseFloat(v.css(t.PROP_TRANSITION+"Duration"))),v.addClass("in")):w.resolve(v.removeClass("fade").get(0)),w.promise.then(function(e){v.trigger("notice:show",[f]),h&&function(n){setTimeout(function(){l.hide(e,e)},n)}(h)}),w.promise},l.hide=function(n,o){var r=e(n),s=new i;return t.cssTransition&&r.hasClass("fade")?(r.one(t.EV_TRANSITION_END,function(){s.resolve(r.get(0))}),setTimeout(function(){r.trigger(t.EV_TRANSITION_END)},1e3*parseFloat(r.css(t.PROP_TRANSITION+"Duration"))),r.removeClass("in")):s.resolve(r.hide().get(0)),s.promise.then(function(){r.trigger("notice:hide",[o]).remove()}),s.promise},l.execute=function(e,t,i){var r=a.option(e,t,"notice","","");if(r)return l.show(r,t,e);var s=a.option(e,t,"notice","pipe",""),c=i&&i[i.length-1];if(!s||!c)return o.rejected(!1);c=c.state?o.resolved(c.value):o.rejected(c.value),s=a.output(i,s);var u=s&&(s.value.message||s.value);return u&&n.isString(u)?(t=t||{},t.type=s.state?"success":"danger",l.show(u,t,e).always(function(){return c})):c},c.register("notice",function(e,n){return l.hide(e,n)}),a.bind("notice","click",":not(form, :input), :button:enabled",d,null,null,!0),a.bind("notice","change",":input:enabled",d,null,null,!0),a.bind("notice","submit","form",d,null,null,!0),l});
define("app/view/job/collapse",["lib/jQuery","tnc/class/Deferred","tnc/class/Promise","tnc/core/browser","app/view/jobs","app/view/settings","app/view/job/dismiss","exports"],function(e,s,t,a,r,i,l,n){function o(a){if(a.preventDefault(),!r.hasTarget(this,null,"collapse",""))return t.reject(!1);var i=e(r.target(this,null,"collapse","",r.feature(this,null,"collapse","all",!1)));if(!i.size())return t.rejected(!1);if(r.feature(this,null,"collapse","all",!1)){var l=new s,o=i.size();return i.each(function(e){n.execute(this,e).always(function(){0==--o&&l.resolve(i.toArray())})},this),l.promise}return n.execute(i.get(0),this)}function c(e,s){return r.option(e,s,"collapse","size")||e.scrollHeight}return n.hide=function(r,i,l){var n=e(r);if(!n.size())return t.rejected(!1);if(!n.hasClass("in"))return t.resolved(n.get(0));var o=e(i),p=new s;return n.height(c(n.get(0),l)),n.addClass("collapsing"),n.removeClass("collapse in"),n.attr("aria-expanded",!1),o.addClass("collapsed"),o.attr("aria-expanded",!1),a.cssTransition?(n.one(a.EV_TRANSITION_END,function(){p.resolve(n.get(0))}),setTimeout(function(){n.trigger(a.EV_TRANSITION_END)},1e3*parseFloat(n.css(a.PROP_TRANSITION+"Duration")))):p.resolve(n.get(0)),n.height(0),p.promise.then(function(){n.removeClass("collapsing"),n.addClass("collapse"),n.trigger("collapse:hide",[i])}),p.promise},n.show=function(r,i,l){var n=e(r);if(!n.size())return t.rejected(!1);if(n.hasClass("in"))return t.resolved(n.get(0));var o=e(i),p=new s;return n.removeClass("collapse"),n.addClass("collapsing"),n.height(0),n.attr("aria-expanded",!0),o.removeClass("collapsed"),o.attr("aria-expanded",!0),n.one("collapse:hide",function(){o.addClass("collapsed"),o.attr("aria-expanded",!1)}),a.cssTransition?(n.one(a.EV_TRANSITION_END,function(){p.resolve(n.get(0))}),setTimeout(function(){n.trigger(a.EV_TRANSITION_END)},1e3*parseFloat(n.css(a.PROP_TRANSITION+"Duration")))):p.resolve(n.get(0)),n.height(c(n.get(0),l)),p.promise.then(function(){n.removeClass("collapsing"),n.addClass("collapse in"),n.height(""),n.trigger("collapse:show",[i])}),p.promise},n.execute=function(s,a,r){var i=e(s),l=e(a);return i.size()?(l.is("select")?!l.val():i.hasClass("in"))?n.hide(i.get(0),a,r):n.show(i.get(0),a,r):t.rejected(!1)},l.register("collapse",function(e,s,t){return n.hide(e,s,t)}),r.bind("collapse","click",":not(form, select, :input:disabled)",o),r.bind("collapse","change","select:enabled",o),n});
define("app/view/job/modals",["top!lib/jQuery","top!app/view/job/modals","tnc/class/Deferred","tnc/class/Promise","app/view/ViewError","app/view/jobs","app/view/scroll","app/view/values","app/view/settings","app/view/job/dismiss","app/tpl/modals","tnc/core/browser","tnc/core/utils","tnc/core/url"],function(e,t,o,n,i,r,a,l,s,d,c,m,u,f){function p(e,o,n,i,a){var l=e.hasClass("fade")?"fade":"",s=e.find(".modal-backdrop");return s.size()||(e.prepend('<div class="modal-backdrop '+l+'" />'),s=e.find(".modal-backdrop")),s.prependTo(e).off("click.modal").on("click.modal",function(i){this===i.target&&r.feature(o,n,"modal","dismissible",!1)&&t.hide(e.get(0),this)}),s.toggleClass("in",i),m.cssTransition&&l?(s.one(m.EV_TRANSITION_END,function(){a(s,!0)}),setTimeout(function(){s.trigger(m.EV_TRANSITION_END)},1e3*parseFloat(s.css(m.PROP_TRANSITION+"Duration")))):a(s,!1),s}if(r.bind("alert","click",":not(form, select, :input:disabled)",function(){return t.alert(r.option(this,null,"alert","",""),this)}),r.bind("alert","change","select:enabled",function(){return t.alert(r.option(this,null,"alert","",""),this)}),r.bind("alert","submit","form",function(){return t.alert(r.option(this,null,"alert","",""),this)}),r.bind("confirm","click",":not(form, select, :input:disabled)",function(){return t.confirm(r.option(this,null,"confirm","",""),this)}),r.bind("confirm","change","select:enabled",function(){return t.confirm(r.option(this,null,"confirm","",""),this)}),r.bind("confirm","submit","form",function(){return t.confirm(r.option(this,null,"confirm","",""),this)}),r.bind("chose","click",":not(form, select, :input:disabled)",function(){return t.chose(e(r.target(this,null,"chose","","")).html(),this)}),r.bind("chose","change","select:enabled",function(){return t.chose(e(r.target(this,null,"chose","","")).html(),this)}),r.bind("chose","submit","form",function(){return t.chose(e(r.target(this,null,"chose","","")).html(),this)}),r.bind("modal","click",":not(form, select, :input:disabled)",function(){return t.execute(this)}),r.bind("modal","change","select:enabled",function(){return t.execute(this)}),r.bind("modal","submit","form",function(){return t.execute(this)}),d.register("modal",function(e,o,n){return t.hide(e,o,n)}),t)return t;t={};var h,g=/^\s*(-|\d+(?:\.\d+)?(?:px|em|%))(?:\s+)(-|\d+(?:\.\d+)?(?:px|em|%))\s*$/i,b=/^([^#]*)#.*/,v=Array.prototype.slice,w=e(window),T=e("html"),y=e("body"),N=e("body, #df-page").last();return w.off(".modal").on("pjax:start.modal",function(){h&&t.hide(h.get(0),this)}),t.decorate=function(t,o,n){var i=e(t);if(i.size()){o=o||{};var a=i.find(".modal-title");if(a.is(":empty")){var l=r.option(n,o,"modal","title",n&&(n.title||n.dataset.hint)||"");l&&a.text(l)}if(i.find(".modal-body").append(r.option(n,o,"modal","content","")),!e.contains(N.get(0),i.get(0)))try{N.append(i.get(0))}catch(e){u.error(e)}var s=r.option(n,o,"modal","size","");if(s=s&&g.exec(s)){var d=i.find(".modal-dialog");"%"===s[2].slice(-1)&&(m.cssCalc?s[2]=m.CSS_VENDOR+"calc("+[s[2],d.css("margin-bottom"),d.css("margin-top")].join(" - ")+")":s[2]=w.innerHeight()*s[2].slice(0,-1)/100),"-"===s[1]||d.css("width",s[1]),"-"===s[2]||d.css("height",s[2])}return i.get(0)}},t.execute=function(a,s){function d(e){return e.one("modal:hide",function(e,t){w.resolve(t)}),t.show(e.get(0),a)}var m,p,h,g,v=e(a),w=new o,T=!!a&&e.nodeName(a,"form"),y=!!a&&e.nodeName(a,"a"),N=T?v.attr("action"):y?v.attr("href"):"";if(g=r.option(a,s,"modal","remote",N).replace(b,"$1")){if(r.feature(a,s,"modal","iframe",!1)||f.isCrossDomain(g))return T&&v.attr("target",u.guid("submit")),m=e(t.decorate(c.get("modals/default"),{content:'<iframe src="'+g+'"'+(T?'id="'+v.attr("target")+'" name="'+v.attr("target")+'"':"")+"></iframe>"},a)),d(m).then(T&&function(){a.submit()}),w.promise;m=e(t.decorate(c.get("modals/default"),{title:"Loading...",content:c.get("ico/load")},a)),d(m).then(function(){m.trigger("modal:ready",[a])}),w.promise.then(null,function(){setTimeout(function(){t.hide(m.get(0))},0)});var z={},j=(T?l.serialize(a):[]).concat(u.parseParams(r.option(a,s,"modal","req-params",""))),I=r.emit(a,"modal:request",[z,j]).result;return e.ajax(g,{type:r.option(a,s,"modal","req-method",T?v.attr("method"):"get"),data:null==I?j:I,dataType:r.option(a,s,"modal","req-expect","text"),error:function(e,t,o){w.reject(o||t)},success:function(o,n,l){try{var s=r.emit(a,"modal:respond",[z,o,n,l])}catch(e){return w.reject(e)}if(!1===s.result)return w.reject(o);if(null!=s.result&&!0!==s.result&&(o=s.result),!/\S+/.test(o=o.data||o))return w.reject(new i("No content form server."));var d=e("<div>").html(o).contents(),c="";d.hasClass("modal")&&(c=d.find(".modal-title").html(),d=d.find(".modal-body").contents()),m.find(".modal-title").html(c),m.find(".modal-body").empty().append(d),t.decorate(m.get(0),null,a),require(["top!lib/jQuery"],function(){m.trigger("modal:ready",[a])})}}),w.promise}return m=p=e(r.target(a,s,"modal","target")),m.size()?(m.hasClass("modal")?t.decorate(m.get(0),null,a):(h=e('<br style="display: none;" />'),p.parent().get(0).replaceChild(h.get(0),p.get(0)),m=e(t.decorate(c.get("modals/default"),{content:p.get(0)},a)),w.promise.always(function(){h.parent().get(0).replaceChild(p.get(0),h.get(0))})),d(m).then(function(){require(["top!lib/jQuery"],function(){m.trigger("modal:ready",[a])})}),w.promise):n.rejected(new i("No found of target modal."))},t.hide=function(t,i,r){var l=e(t);if(!l.size())return n.rejected(!1);var s=new o;l.trigger("modal:before-hide"),w.off("resize.modal-backdrop"),l.removeClass("in").attr("aria-hidden",!0);var d=l.find(".modal-dialog");return d.one(m.EV_TRANSITION_END+".modal",function(){p(l,i,r,!1,function(){s.resolve(l.get(0))})}),m.cssTransition&&l.hasClass("fade")?setTimeout(function(){d.trigger(m.EV_TRANSITION_END)},1e3*parseFloat(d.css(m.PROP_TRANSITION+"Duration"))):d.trigger(m.EV_TRANSITION_END+".modal"),s.promise.then(function(){a.free(y.get(0),"modal"),y.removeClass("modal-open"),l.css("display","").trigger("modal:hide",[i]),"true"===l.attr("data-modal-erase")?setTimeout(function(){l.remove()},0):l.css({"padding-left":"","padding-right":""}),setTimeout(function(){h=null},0)}),s.promise},t.show=function(i,r,l){var s;if(r&&r.ownerDocument&&(s=e(i,r&&r.ownerDocument)),s&&s.size()||(s=e(i)),!s.size())return n.rejected(!1);var d=s,c=new o;if(h)return t.hide(h.get(0),r).always(function(){setTimeout(function(){t.show(i,r).then(c.resolve,c.reject)},0)}),c.promise;d.size()&&T.prop("ownerDocument")!==d.prop("ownerDocument")&&(d=e(d.get(0).outerHTML||e("<div>",document).append(d.clone()).html()),N.append(d),d.attr("data-modal-erase","true"),d.one("modal:show",function(){s.trigger("modal:show",v.call(arguments,1))}),d.one("modal:hide",function(){s.trigger("modal:hide",v.call(arguments,1))}),d.one("modal:before-show",function(){s.trigger("modal:before-show",v.call(arguments,1))}),d.one("modal:before-hide",function(){s.trigger("modal:before-hide",v.call(arguments,1))})),d.one("modal:ready",function(){d.find(".modal-body, .modal-footer").find(["a:visible:first","textarea:enabled:first",":button:enabled:first"].join(",")).first().focus()}),d.one("modal:hide",function(){e(r).focus()}),d.trigger("modal:before-show");var u=a.lock(y.get(0),"modal");return y.addClass("modal-open"),d.css("display","block").scrollTop(0),p(d,r,l,!0,function(e,t){if(w.off("resize.modal-backdrop"),w.on("resize.modal-backdrop",function(){e.css("height",0).css("height",d.prop("scrollHeight"));var t=d.prop("scrollHeight")>T.prop("clientHeight");d.css({"padding-left":!u&&t?a.size:"","padding-right":u&&!t?a.size:""})}).trigger("resize.modal-backdrop"),d.prop("offsetWidth"),d.addClass("in").attr("aria-hidden",!1),t){var o=d.find(".modal-dialog");o.one(m.EV_TRANSITION_END,function(){c.resolve(d.get(0))}),setTimeout(function(){o.trigger(m.EV_TRANSITION_END)},1e3*parseFloat(o.css(m.PROP_TRANSITION+"Duration")))}else c.resolve(d.show().get(0))}),c.promise.then(function(){d.trigger("modal:show",r)}),h=d,c.promise},t.alert=function(n,i,a){var l=e("#modal-alert"),s=new o;return l.size()||(l=N.append(c.fill("#TPL{modals/alert}")).find("#modal-alert")),l.css("z-index",r.option(i,a,"alert","zindex","")),l.find(".modal-body").html(n),l.one("modal:hide",function(){s.resolve(!0)}),t.show(l.get(0),i,a),s.promise},t.confirm=function(n,i,a){var l=e("#modal-confirm"),s=new o;return l.size()||(l=N.append(c.fill("#TPL{modals/confirm}")).find("#modal-confirm")),l.css("z-index",r.option(i,a,"confirm","zindex","")),l.find(".modal-body").html(n),l.one("modal:hide",function(t,o){e(o).is(".btn-primary")?s.resolve(!0):s.reject(!1)}),t.show(l.get(0),i,a),s.promise},t.chose=function(n,i,a){var l=e("#modal-chose"),s=new o;return l.size()||(l=N.append(c.fill("#TPL{modals/chose}")).find("#modal-chose")),l.css("z-index",r.option(i,a,"chose","zindex","")),l.find(".modal-body").html(n),l.one("modal:hide",function(t,o){var n=l.find("select"),i=e(o),r=!1;0<n.size()&&i.is(".btn-primary")?r=n.val()||r:i.is("[data-value]")&&(r=i.attr("data-value")),!1!==r?s.resolve(r):s.reject(!1)}),t.show(l.get(0),i,a),s.promise},t});
define("app/view/scroll",["lib/jQuery","tnc/core/utils","exports"],function(e,i,d){var r=e('<div style="height:30px; width:30px; overflow-x:hidden;overflow-y:auto;"><div style="height:60px; width:100%;"></div></div>');r=r.appendTo(document.body||document.documentElement).get(0);var t={};return d.size=r.offsetWidth-r.firstChild.offsetWidth,d.lock=function(i,r){var n=e(i).first();if(0<d.size&&n.prop("scrollHeight")>n.prop("clientHeight")){var o=parseInt(n.css("padding-right")||0,10);return n.css({overflow:"hidden","padding-right":d.size+o}).is("body")&&n.children(".df-header").css("padding-right",d.size),t[r]=n,!0}return!1},d.free=function(r,n){if(0<d.size){if(!i.reduce(t,function(e,i,d){return e||n!==d&&i.is(r)},!1)){var o=e(r);o.css({overflow:"","padding-right":""}).is("body")&&o.children(".df-header").css("padding-right","")}delete t[n]}},e(r).remove(),d});
define("app/view/values",["lib/jQuery","tnc/core/utils","tnc/class/Promise","lib/jQuery/values","exports"],function(e,t,a,r,n){function s(e,a){var r=e.getAttribute("placeholder");return r&&new RegExp(t.escapeRegExp(r,!0),"i").test(a)}n.get=function(e){if(e)switch(e.tagName.toLowerCase()){case"input":switch(e.type){case"checkbox":case"radio":return e.checked?e.value:"";default:return e.value}break;case"textarea":return s(e,e.value)?"":e.value;case"select":switch(e.type){case"select-one":return e.options[e.selectedIndex].value;case"select-multiple":for(var t=[],a=e.options,r=0,n=a.length;r<n;r++)a[r].selected&&t.push(a[r].value);return t}break;case"button":case"option":return e.value;case"fieldset":case"datalist":case"keygen":case"output":return null;default:return e.getAttribute("data-value")||null}},n.set=function(a,r){if(a&&null!=r){switch(a.setAttribute("data-input-ignore","on"),a.tagName.toLowerCase()){case"input":switch(a.type){case"checkbox":case"radio":t.isArray(r)?a.checked=e.inArray(a.value,r):t.isString(r)?a.checked=a.value===r:a.checked=!0===r;break;case"file":break;default:a.value=r}break;case"textarea":s(a,r)||(a.value=r);break;case"select":switch(a.type){case"select-one":a.value=r;break;case"select-multiple":t.each(a.options,function(e,a){a.selected=-1<t.indexOf(r,a.value)})}break;case"button":case"option":a.value=r;break;case"fieldset":case"datalist":case"keygen":case"output":break;default:a.setAttribute("data-value",""+r)}a.removeAttribute("data-input-ignore")}};var u=/\r?\n/g,c=/^(?:checkbox|radio)$/i;return n.serialize=function(a){var r=/^(form|fieldset)$/i.test(a.tagName)?t.toArray(a.elements):t.isArray(a)?a:[a];return t.reduce(r,function(a,r){var s;return r.name&&e.find.matchesSelector(r,":enabled:not(fieldset, input:file)")&&(!c.test(r.type)||r.checked)&&null!=(s=n.get(r))&&(t.isArray(s)?e.each(s,function(e){a.push({name:r.name,value:e.replace(u,"\r\n")})}):a.push({name:r.name,value:s.replace(u,"\r\n")})),a},[])},n.unserialize=function(r,s,u){var i=a.resolved(),l=/^(form|fieldset)$/i.test(r.tagName)?t.toArray(r.elements):t.isArray(r)?r:[r];return e.each(l,function(a,r){/^(fieldset|datalist|keygen|output)$/i.test(r.tagName)||(i=i.then(function(){var a,i=e.nodeName(r,"input")&&c.test(r.type),l=!1;return s=t.grep(s,function(e,s){if(s.name!==r.name)return!0;if(i){if(s.value!==r.value)return l=l||!1,!0;l=!0}else n.set(r,s.value),a=t.call(u,r,s.value);return!1}),i&&(n.set(r,l),a=t.call(u,r,l)),a}))}),i},n.register=r.register,n});
define("app/tpl/modals",["app/tpl/general"],function(a){return a.set("modals/default",'<div class="modal fade" id="modal-default" data-modal-erase="true"><div class="modal-dialog" role="dialog"><div class="modal-content"><div class="modal-header"><h4 class="modal-title"></h4><button type="button" class="close" data-dismiss="modal"><i aria-hidden="true" class="fa fa-close"></i><span class="sr-only">#I18N{A_CLOSE}</span></button></div><div class="modal-body"></div></div></div></div>'),a.set("modals/alert",'<div class="modal fade" id="modal-alert"><div class="modal-dialog" role="dialog"><div class="modal-content"><div class="modal-header"><h4 class="modal-title">#I18N{H_DIALOG_ALERT}</h4><button type="button" class="close" data-dismiss="modal"><i aria-hidden="true" class="fa fa-close"></i><span class="sr-only">#I18N{A_CLOSE}</span></button></div><div class="modal-body"></div><div class="modal-footer"><div class="modal-tail btns text-center"><button type="button" class="btn btn-primary" data-dismiss="modal">#I18N{A_OK}</button></div></div></div></div></div>'),a.set("modals/confirm",'<div class="modal fade" id="modal-confirm"><div class="modal-dialog" role="dialog"><div class="modal-content"><div class="modal-header"><h4 class="modal-title">#I18N{H_DIALOG_CONFIRM}</h4><button type="button" class="close" data-dismiss="modal"><i aria-hidden="true" class="fa fa-close"></i><span class="sr-only">#I18N{A_CLOSE}</span></button></div><div class="modal-body"></div><div class="modal-footer"><div class="modal-tail btns text-center"><button type="button" class="btn btn-default" data-dismiss="modal">#I18N{A_CANCEL}</button><button type="button" class="btn btn-primary" data-dismiss="modal">#I18N{A_CONFIRM}</button></div></div></div></div></div>'),a.set("modals/chose",'<div class="modal fade" id="modal-chose"><div class="modal-dialog" role="dialog"><div class="modal-content"><div class="modal-header"><h4 class="modal-title">#I18N{H_DIALOG_CHOSE}</h4><button type="button" class="close" data-dismiss="modal"><i aria-hidden="true" class="fa fa-close"></i><span class="sr-only">#I18N{A_CLOSE}</span></button></div><div class="modal-body"></div></div></div></div>'),a});
define("app/view/job/ajax",["lib/jQuery","tnc/core/utils","tnc/class/Deferred","app/view/jobs","app/view/settings","app/view/values","exports"],function(e,t,a,s,n,r,i){return i.execute=function(n,i){var o,c,u,l,p=e(n),d=new a,f=n.nodeName.toLocaleLowerCase();switch(n=p.get(0),p.addClass("sending"),d.promise.always(function(){p.removeClass("sending")}),f){case"form":c=p.attr("action"),o=r.serialize(n),u=p.attr("method");break;case"button":case"input":case"select":n.name&&!(o=r.serialize(n)).length&&(o=null);break;case"a":"a"!==f||/^\s*(#|javascript:)/i.test(p.attr("href"))||(c=n.href)}c=s.option(n,i,"ajax","href",c),o=s.option(n,i,"ajax","params",o),u=s.option(n,i,"ajax","method",u),function(){var t=s.option(n,i,"ajax","loading");if(t){var a=t.split(";;"),r=a.pop();switch(a.pop()||"find"){case"find":l=e.find(r);break;case"closest":l=p.closest("div:has(>"+r+")").find(r);break;case"siblings":l=p.siblings(r)}}}(),t.isString(o)&&(o=t.parseParams(o));var j={},x=s.emit(n,"ajax:request",[j,o]);return l&&l.show(),e.ajax(c,t.mix({type:u||"get",data:null==x.result?o:x.result,dataType:s.option(n,i,"ajax","expect","*"),error:function(e,t,a){d.reject(a||t)},success:function(e,t,a){l&&l.hide();try{var r=s.emit(n,"ajax:respond",[j,e,t,a])}catch(e){return d.reject(e)}!1===r.result?d.reject(e):(/^(form|input|select)$/.test(f)&&s.feature(n,i,"ajax","reset",!1)&&n.reset(),null!=r.result&&!0!==r.result?d.resolve(r.result):d.resolve(e))}},i)),d.promise},s.bind("ajax","click",":not(form, :input), :button:enabled",function(){return i.execute(this)}),s.bind("ajax","change",":input:enabled",function(){return i.execute(this)}),s.bind("ajax","submit","form",function(){return i.execute(this)}),i});
define("app/view/job/animate",["lib/jQuery","tnc/core/utils","tnc/core/browser","tnc/class/Deferred","tnc/class/Promise","app/view/jobs","app/view/settings","exports"],function(e,t,n,o,i,a,r,u){var f=["bounce","flash","pulse","rubberBand","shake","swing","tada","wobble","jello","bounceIn","bounceInDown","bounceInLeft","bounceInRight","bounceInUp","bounceOut","bounceOutDown","bounceOutLeft","bounceOutRight","bounceOutUp","fadeIn","fadeInDown","fadeInDownBig","fadeInLeft","fadeInLeftBig","fadeInRight","fadeInRightBig","fadeInUp","fadeInUpBig","fadeOut","fadeOutDown","fadeOutDownBig","fadeOutLeft","fadeOutLeftBig","fadeOutRight","fadeOutRightBig","fadeOutUp","fadeOutUpBig","flipInX","flipInY","flipOutX","flipOutY","lightSpeedIn","lightSpeedOut","rotateIn","rotateInDownLeft","rotateInDownRight","rotateInUpLeft","rotateInUpRight","rotateOut","rotateOutDownLeft","rotateOutDownRight","rotateOutUpLeft","rotateOutUpRight","hinge","rollIn","rollOut","zoomIn","zoomInDown","zoomInLeft","zoomInRight","zoomInUp","zoomOut","zoomOutDown","zoomOutLeft","zoomOutRight","zoomOutUp","slideInDown","slideInLeft","slideInRight","slideInUp","slideOutDown","slideOutLeft","slideOutRight","slideOutUp"],s=["scrollTop","scrollLeft"];return u.execute=function(u,l){var d=e(u),p=a.option(u,l,"animate",""),c=!1;if(a.hasTarget(u,l,"animate","target")&&(d=r.query(u,a.option(u,l,"animate","target")),c=a.feature(u,l,"animate","all",c)),!1===c&&(d=d.first()),!d.size())return i.rejected(!1);if(t.indexOf(p,-1!==s)){var I=a.option(u,l,"animate","offset");return this.scroll(d.first()[0],p,I)}if(d.removeClass("animated infinite "+f.join(" ")),d.addClass("animated "+p),!n.cssAnimation||d.hasClass("infinite"))return i.resolve(c?d.toArray():d.get(0));var O=new o;return d.one(n.EV_ANIMATION_END,function(){O.resolve(c?d.toArray():d.get(0)),!1===a.feature(u,l,"animate","keep",!1)&&d.removeClass("animated "+p)}),O.promise},u.scroll=function(t,n,i){var a=e(t),r=new o,u="scrollLeft"===n?"left":"top",f={};return f[n]=~~a.offset()[u]+~~i,e("html, body").animate(f,function(){r.resolve(t)}),r.promise},a.bind("animate","click",":not(form, select, :input:disabled)",function(e){return e.preventDefault(),u.execute(this)}),u});
define("app/view/job/clipboard",["lib/jQuery","tnc/class/Promise","app/view/job/notice","app/view/jobs","tnc/core/utils","exports"],function(e,t,o,n,i,d){var r=document.createElement("textarea");return d.execute=function(o,i){var d,a=n.option(o,i,"clipboard","text","");if(a?(document.body.appendChild(d=r),r.value=a):d=o?n.target(o,i,"clipboard","from"):n.option(o,i,"clipboard","from"),!(d=e(d).get(0)))return t.rejected(!1);if("INPUT"===d.nodeName||"TEXTAREA"===d.nodeName)d.focus(),d.setSelectionRange(0,d.value.length),a=d.value;else{d.hasAttribute("contenteditable")&&d.focus();var c=document.createRange(),l=window.getSelection();c.selectNodeContents(d),l.removeAllRanges(),l.addRange(c),a=l.toString()}return document.execCommand("copy")?(r===d&&document.body.removeChild(r),t.resolve(a)):(r===d&&document.body.removeChild(r),t.rejected(!1))},n.bind("clipboard","click",":not(form, :input), :button:enabled",function(){return d.execute(this)}),e("body").on("failed.clipboard passed.clipboard",function(e){var t=e.type="passed";o.show(i.i18n(t?"M_COPY_TO_CLIPBOARD_PASS":"M_COPY_TO_CLIPBOARD_FAIL"),{type:t?"success":"danger"})}),r.setAttribute("readonly",""),r.style.fontSize="12pt",r.style.border="0",r.style.padding="0",r.style.margin="0",r.style.position="fixed",r.style.top="-100px",r.style.left="-100px",r.style.width="50px",r.style.height="50px",d});
define("app/view/job/display",["lib/jQuery","tnc/class/Deferred","tnc/class/Promise","tnc/core/utils","app/view/jobs","exports"],function(e,t,n,i,o,u){return u.execute=function(i,u,r){var c=e(o.hasTarget(i,r,u,"")?o.target(i,r,u,"",o.feature(i,r,u,"all",!1)):i),l=c.size();if(!l)return n.rejected(!1);var s=new t;switch(u){case"hide":c.hide(o.option(i,r,u,"speed",0),function(){--l||s.resolve(c.get(o.feature(i,r,u,"all",!1)?null:0))});break;case"show":c.show(o.option(i,r,u,"speed",0),function(){--l||s.resolve(c.get(o.feature(i,r,u,"all",!1)?null:0))});break;case"toggle":c.toggle(o.option(i,r,u,"speed",0),function(){--l||s.resolve(c.get(o.feature(i,r,u,"all",!1)?null:0))})}return s.promise},o.bind("show","click",":not(form, :input), :enabled:button",function(){return u.execute(this,"show")}),o.bind("show","change","select:enabled",function(){return u.execute(this,"show")}),o.bind("show","submit","form",function(){return u.execute(this,"show")}),o.bind("hide","click",":not(form, :input), :enabled:button",function(){return u.execute(this,"hide")}),o.bind("hide","change","select:enabled",function(){return u.execute(this,"hide")}),o.bind("hide","submit","form",function(){return u.execute(this,"hide")}),o.bind("toggle","click",":not(form, :input), :enabled:button",function(){return u.execute(this,"toggle")}),o.bind("toggle","change","select:enabled",function(){return u.execute(this,"toggle")}),o.bind("toggle","change",":checkbox:enabled, :radio:enabled",function(){return u.execute(this,"toggle")}),o.bind("toggle","submit","form",function(){return u.execute(this,"toggle")}),u});
define("app/view/job/dropdown",["lib/jQuery","app/view/jobs","app/view/values","app/view/job/collapse","exports"],function(e,n,t,d,o){return o.hide=function(n,t){var o=e(n),i=o.find(">span"),a=o.find(">dl");return i.attr("aria-expanded",!1),d.hide(a.get(0),n,t)},o.show=function(t,i){var a=e(t),r=a.find(">span"),c=a.find(">dl"),s=a.find(">input");return c.off(".dropdown").one("click.dropdown","dd, dt",function(n){e.nodeName(this,"dd")&&(o.set(t,this)&&e.event.trigger("change",null,s.get(0)),o.hide(t)),n.stopPropagation()}),e(document.body).on("click",function(d){if(e(document.body).off("click",arguments.callee),t!==d.target&&!e.contains(t,d.target)){var a=e(d.target).closest('[data-jobs~="dropdown"]');a.size()&&t===n.target(a.get(0),i,"dropdown","")||o.hide(t,i)}}),r.attr("aria-expanded",!0),d.show(c.get(0),t,i)},o.get=function(n){return e(n).find(">input").val()},o.set=function(n,d){var o;return d&&e.nodeName(d,"dd")?t.get(n)!==t.get(d)&&e.contains(n,d)&&(o=d):d!==t.get(n)&&(o=e(n).find('dd[data-value="'+d+'"]').get(0)),null!=o&&(e(n).find(">input").val(t.get(o)).end().find(">span").html(o.innerHTML).end().find("dd.selected").removeClass("selected"),e(o).addClass("selected"),!0)},o.execute=function(n){return e(n).hasClass("collapsed")?o.show(n):o.hide(n)},e("html").on("click.dropdown",".df-com-dropdown",function(n){e(n.target).is("a, .fa-caret, a *")&&n.preventDefault(),o.execute(this)}),n.bind("dropdown","click",":not(.df-com-dropdown)",function(){return o.execute(n.target(this,null,"dropdown",""))}),t.register(function(n){return e(n).hasClass("df-com-dropdown")},o.get,o.set),o});
define("app/view/job/attribute",["lib/jQuery","tnc/class/Promise","tnc/core/utils","app/view/jobs","exports"],function(e,t,n,s,r){return r.execute=function(n,r,c){var a=e(s.target(n,c,r,"target",s.feature(n,c,r,"all",!1)));if(!a.size())return t.rejected(!1);switch(r){case"aclass":a.addClass(s.option(n,c,r,"",""));break;case"rclass":a.removeClass(s.option(n,c,r,"",""));break;case"tclass":a.toggleClass(s.option(n,c,r,"",""));break;case"remove-attr":a.removeAttr(s.option(n,c,r,"",""))}return t.resolved(a.get(s.feature(n,c,r,"all",!1)?null:0))},s.bind("aclass","click",":not(form, :input), :enabled:button",function(){return r.execute(this,"aclass")}),s.bind("aclass","change","select:enabled",function(){return r.execute(this,"aclass")}),s.bind("aclass","submit","form",function(){return r.execute(this,"aclass")}),s.bind("rclass","click",":not(form, :input), :enabled:button",function(){return r.execute(this,"rclass")}),s.bind("rclass","change","select:enabled",function(){return r.execute(this,"rclass")}),s.bind("rclass","submit","form",function(){return r.execute(this,"rclass")}),s.bind("tclass","click",":not(form, :input), :enabled:button",function(){return r.execute(this,"tclass")}),s.bind("tclass","change","select:enabled",function(){return r.execute(this,"tclass")}),s.bind("tclass","submit","form",function(){return r.execute(this,"tclass")}),s.bind("remove-attr","click",":not(form, :input), :enabled:button",function(){return r.execute(this,"remove-attr")}),s.bind("remove-attr","change","select:enabled",function(){return r.execute(this,"remove-attr")}),s.bind("remove-attr","submit","form",function(){return r.execute(this,"remove-attr")}),r});
define("app/view/job/manipulation",["lib/jQuery","tnc/class/Promise","tnc/core/utils","app/view/jobs","exports"],function(e,n,t,l,u){return u.execute=function(u,i,r,c){var a=l.feature(u,r,i,"all",!1),s=e(l.hasTarget(u,r,i,"")?l.target(u,r,i,"",a):u),d=s.size()&&l.output(c,"ajax",!0,"");if(s.size())try{switch(i){case"remove":s.remove();break;case"replace":d&&s.replaceWith(d.value.data||d.value);break;case"fill":d&&s.html(d.value.data||d.value);break;case"prepend":d&&s.prepend(d.value.data||d.value);break;case"append":d&&s.append(d.value.data||d.value);break;case"lock":s.addClass("sending")}}catch(e){t.error(e)}return n.resolved(s.get(a?null:0))},l.bind("remove","click",":not(form, select, :input:disabled)",function(e,e,n){return u.execute(this,"remove",null,n)}),l.bind("remove","change","select:enabled",function(e,e,n){return u.execute(this,"remove",null,n)}),l.bind("remove","submit","form",function(e,e,n){return u.execute(this,"remove",null,n)}),l.bind("replace","click",":not(form, select, :input:disabled)",function(e,e,n){return u.execute(this,"replace",null,n)}),l.bind("replace","change","select:enabled",function(e,e,n){return u.execute(this,"replace",null,n)}),l.bind("replace","submit","form",function(e,e,n){return u.execute(this,"replace",null,n)}),l.bind("fill","click",":not(form, select, :input:disabled)",function(e,e,n){return u.execute(this,"fill",null,n)}),l.bind("fill","change","select:enabled",function(e,e,n){return u.execute(this,"fill",null,n)}),l.bind("fill","submit","form",function(e,e,n){return u.execute(this,"fill",null,n)}),l.bind("prepend","click",":not(form, select, :input:disabled)",function(e,e,n){return u.execute(this,"prepend",null,n)}),l.bind("prepend","change","select:enabled",function(e,e,n){return u.execute(this,"prepend",null,n)}),l.bind("prepend","submit","form",function(e,e,n){return u.execute(this,"prepend",null,n)}),l.bind("append","click",":not(form, select, :input:disabled)",function(e,e,n){return u.execute(this,"append",null,n)}),l.bind("append","change","select:enabled",function(e,e,n){return u.execute(this,"append",null,n)}),l.bind("append","submit","form",function(e,e,n){return u.execute(this,"append",null,n)}),l.bind("lock","submit","form",function(e,e,n){return u.execute(this,"lock",null,n)}),u});
define("app/view/job/native",["tnc/core/context","app/view/jobs","exports"],function(e,t,n){return n.execute=function(n,o){switch(n.nodeName.toLowerCase()){case"a":e.top.open(t.option(n,o,"native","href",n.href),t.option(n,o,"native","target",n.target||"_self"));break;case"button":case"input":n.form&&/submit/.test(n.type)&&n.form.submit();break;case"form":n.submit()}return n},t.bind("native","click",":not(form, select, :input:disabled)",function(){return n.execute(this)}),t.bind("native","change","select:enabled",function(){return n.execute(this)}),t.bind("native","submit","form",function(){return n.execute(this)}),t.bind("reload","click",":not(form, select, :input:disabled)",function(){setTimeout("location.reload()",~~t.option(this,null,"reload","delay",0))}),t.bind("reload","change","select:enabled",function(){setTimeout("location.reload()",~~t.option(this,null,"reload","delay",0))}),t.bind("reload","submit","form",function(){setTimeout("location.reload()",~~t.option(this,null,"reload","delay",0))}),n});
define("app/tpl/rating",["app/tpl/general"],function(a){return a.set("rating","<div #{attrs}>#{field}#{stars}</div>"),a.set("rating/star-full",'<i aria-hidden="true" class="fa fa-star"></i>'),a.set("rating/star-half",'<i aria-hidden="true" class="fa fa-star-half-full"></i>'),a.set("rating/star-null",'<i aria-hidden="true" class="fa fa-star-o"></i>'),a});
define("app/view/job/rating",["lib/jQuery","tnc/class/Deferred","tnc/class/Promise","app/view/ViewError","tnc/core/utils","app/view/jobs","app/view/values","app/tpl/rating","exports"],function(e,r,t,a,n,i,s,o,c){return c.disable=function(r){e(r).children("input").prop("disabled",!0)},c.enable=function(r){e(r).children("input").prop("disabled",!1)},c.get=function(r){var t=e(r).children("input");return t.prop("disabled")?0:parseFloat(s.get(t.get(0)))},c.set=function(o,u,l){var p=e(o).children("input");if(p.prop("disabled"))return t.rejected(!1);var d=e(o).children("i"),f=d.size();if(f<u)return t.rejected(new a("Wrong rating score."));var g=c.get(o);s.set(p.get(0),u),d.first().before(c.stars(f,f,u,i.feature(o,l,"rating","half",!0))).end().remove();var m=i.option(o,l,"rating","href");if(!m)return e(o).trigger("change",[{score:u}]),t.resolved({score:u});var h={},v=s.serialize(p.get(0)).concat(n.parseParams(i.option(o,l,"rating","params"))),b=i.emit(o,"rating:request",[h,v]).result,j=new r;e.ajax(m,{type:i.option(o,l,"rating","method","post"),data:null==b?v:b,dataType:i.option(o,l,"rating","expect","json"),error:function(e,r,t){j.reject(t||r)},success:function(e,r,t){try{var a=i.emit(o,"rating:respond",[h,e,r,t])}catch(e){return j.reject(e)}!1===a.result&&j.reject(e);var n=null!=a.result&&!0!==a.result?a.result:e.data;n&&"score"in n?j.resolve(n):j.reject(e)}});var w=i.feature(o,l,"rating","half",!0);return j.promise.then(function(r){var t=e(o).children("i");s.set(p.get(0),r.score),t.first().before(c.stars(f,f,r.score,w)).end().remove(),i.feature(o,l,"rating","once")&&e(o).removeAttr("data-jobs"),e(o).trigger("change")},function(){e(o).children("i").first().before(c.stars(f,f,g,w)).end().remove(),s.set(p.get(0),g)}),j.promise},c.reset=function(e){return c.set(e,0)},c.stars=function(e,r,t,a){e=parseInt(e,10)||5,r=parseInt(r,10)||5;for(var n=parseFloat((t/r*e).toFixed(2)),i="";e--;)i+=1<=n?o.get("rating/star-full"):!0===a&&.5<=n?o.get("rating/star-half"):o.get("rating/star-null"),n-=1;return i},o.register("RATING",function(e,r){var t=r&&r[e];if(!t)return"";var a=t.attrs||{};return a.class=n.trim("df-com-rating "+(a.class||"")),a.type=a.type||"button",(t.href||!0===t.editable)&&(a["data-jobs"]=n.trim("rating "+(a["data-jobs"]||"")),t.href&&(a["data-rating-href"]=t.href,t.params&&(a["data-rating-params"]=t.params)),t.name&&(a.name=t.name)),o.fill("#TPL{rating}",{score:t.score,stars:c.stars(t.amount,t.total,t.score,t.half),field:'<input type="hidden"'+(t.name?'name="'+t.name+'"':"")+' value="'+t.score+'" />',attrs:n.map(a,function(e,r){return e+'="'+r+'"'}).join(" ")})}),i.bind("rating","click",".df-com-rating",function(r){if(e.nodeName(this,"div")){var n=e(this).children("i");return c.set(this,n.index(r.target)+1)}return t.reject(new a("Unknown rating target."))}),s.register(function(r){return e(r).hasClass("df-com-rating")},c.get,c.set),c});
define("app/view/job/suggest",["lib/jQuery","tnc/class/Deferred","tnc/class/Promise","app/view/ViewError","tnc/core/utils","tnc/core/browser","app/view/jobs","app/view/job/collapse","app/view/settings","app/view/values","app/tpl/general","exports"],function(e,t,s,a,r,n,i,g,u,l,o,c){function d(t,s,r,n){n=n.sort(function(e,a){return parseInt(i.emit(t,"suggest:sort",[s,e,a]).result,10)||0}),c.show(t,c.generate(t,s,n)).then(function(t){if("pending"===r.state())var s=e(t).one("collapse:hide",function(){if("pending"===r.state()){var e=s.find(".suggest-item.selected");e.size()?r.resolve(e.data("suggest-data")):r.reject(new a("No selected option."))}})},r.reject),i.emit(t,"suggest:matched",[s,n])}function f(e,t,s,a){c.show(e,"").always(function(){s.reject(a)}),i.emit(e,"suggest:no-match",[t])}function p(t,s){var a=e(t),r=e(s);if(t.scrollHeight>a.outerHeight()){var n=parseFloat(a.css("border-top-width"))||0,i=parseFloat(a.css("padding-top"))||0,g=a.scrollTop(),u=a.height(),l=r.outerHeight(),o=r.offset().top-a.offset().top-n-i;o<0?a.scrollTop(g+o):o+l>u&&a.scrollTop(g+o-u+l)}}return c.execute=function(s,n){var g=e(s),u=r.trim(n||l.get(s)),p=g.data("suggest");p instanceof t&&p.reject(new a("Cancelled.")),g.data("suggest-term",u);var m=parseInt(i.option(s,null,"suggest","chars"),10);if(u.length<Math.max(0,isNaN(m)?1:m))return c.hide(s,!1).always(function(){throw new a("Unreached minimal length.")});e(s).hasClass("loading")||(c.show(s,o.get("ico/load")),e(s).addClass("loading"));var h=new t;e(s).data("suggest",h),h.promise.always(function(){e(s).removeData("suggest")});var v=setTimeout(function(){var t=c.search(s,u);t.always(function(){e(s).removeClass("loading")}),t.then(function(e){"pending"===h.state()&&(e.length?d(s,u,h,e):f(s,u,h,new a("No matched option.")))},function(e){"pending"===h.state()&&f(s,u,h,e)})},1<arguments.length?0:Math.max(parseInt(i.option(s,null,"suggest","delay"),10)||0,300));return h.promise.always(function(){clearTimeout(v)}),h.promise},c.search=function(n,g){var l,o,c=new t;if(i.feature(n,null,"suggest","cache",!1)){var d=e(n).data("suggest-caches");if(d&&r.hasOwn(d,g))return d[g];(d=d||{})[g]=c.promise,e(n).data("suggest-caches",d)}if(o=i.option(n,null,"suggest","remote")){var f={},p={term:g},m=i.emit(n,"suggest:request",[f,p]).result;return e.ajax(o,{type:i.option(n,null,"suggest","req-method","get"),data:null==m?p:m,dataType:i.option(n,null,"suggest","req-expect","json"),error:function(e,t,s){"pending"===c.state()&&c.reject(s||t)},success:function(e,t,s){var a=i.emit(n,"suggest:respond",[f,e,t,s]);e=null==a.result?e:a.result,r.isArray(e.data||e)?c.resolve(e.data||e):c.reject(e)}}),c.promise}if(o=i.option(n,null,"suggest","options"))return(o=u.query(n,o)).size()?(l=new RegExp(r.escapeRegExp(g,!0),"i"),c.resolve(r.grep(o,function(e,t){return!i.emit(n,"suggest:filter",[g,l,t,e]).isDefaultPrevented()}))):c.reject(new a("No found of data element.")),c.promise;if(r.isArray(o=r.parseJSON(i.option(n,null,"suggest","array"))))return l=new RegExp(r.escapeRegExp(g,!0),"i"),c.resolve(r.grep(o,function(e,t){return!i.emit(n,"suggest:filter",[g,l,t,e]).isDefaultPrevented()})),c.promise;var h=i.emit(n,"suggest:search",[g]).result;return r.isArray(h)||r.isFunction(h&&h.then)?(s.when(h,c.resolve,c.reject),c.promise):s.rejected(new a("No source to suggest."))},c.generate=function(t,s,a){var n=e('<ul class="suggest-list"></ul>').data("suggest-term",s);return r.each(a,function(a,g){var u=e('<li class="suggest-item"></li>');null!=g&&r.isString(g.label||g)&&u.text(r.isString(g)?g:g.label),n.append(u.data("suggest-data",g).get(0)),i.emit(t,"suggest:generate",[s,g,u.get(0)])}),n.one("click.suggest",".suggest-item",function(){c.hide(t,this)}).get(0)},c.hide=function(t,r){var n=e(i.target(t,null,"suggest","target")),u=n.find(".suggest-item"),l=u.filter(".selected").get(0);return n.off(".suggest"),!l&&r&&(l=c.select(t,r)),n.is(":visible")?g.hide(n.get(0),t).then(function(){if(l)return l;throw new a("No selected option.")}):l?s.resolved(l):s.rejected(new a("No selected option."))},c.show=function(t,n){var l=e(i.target(t,null,"suggest","target"));if(!l.size()){if(!(1<arguments.length))return s.rejected(new a("No container for suggestion."));l=e('<div class="suggest-results collapse"></div>'),l.attr("id",u.set(t,"suggest","target",r.guid("#suggest-")).slice(1)).insertAfter(t)}return l.addClass("suggest-results"),1<arguments.length&&l.empty().append(n),l.is(":visible")?s.resolved(l.get(0)):g.show(l.get(0),t)},c.mark=function(t,s){var a=e(i.target(t,null,"suggest","target")),n=a.find(".suggest-item");if(n.size()){var g,u=n.filter(".mark");switch(!0){case r.isString(s):switch(s.toLowerCase()){case"prev":u.size()?(g=u.prev(".suggest-item"),g.size()||(g=e(t))):g=n.last();break;case"next":u.size()?(g=u.next(".suggest-item"),g.size()||(g=e(t))):g=n.first()}break;case r.isNumber(s):g=n.eq(s);break;case-1<r.indexOf(s,n):g=e(s)}if(g&&g.size()&&!i.emit(t,"suggest:mark",[g.data("suggest-data"),g.get(0),u.get(0)]).isDefaultPrevented()){if(u.removeClass("mark selected"),t===g.get(0))l.set(g.get(0),g.data("suggest-term"));else{g.addClass("mark"),p(a.get(0),g.get(0));var o=g.data("suggest-data");null!=o&&r.isString(o.label||o)&&l.set(t,o.label||o)}return g.get(0)}}},c.select=function(t,s){var a=e(i.target(t,null,"suggest","target")),n=a.find(".suggest-item");if(n.size()){var g,u=g=n.filter(".mark");switch(!0){case r.isString(s):switch(s.toLowerCase()){case"prev":u.size()?(g=u.prev(".suggest-item"),g.size()||(g=e(t))):g=n.last();break;case"next":u.size()?(g=u.next(".suggest-item"),g.size()||(g=e(t))):g=n.first()}break;case r.isBoolean(s):s?g.size()||(g=n.first()):g=!1;break;case r.isNumber(s):g=n.eq(s);break;case-1<r.indexOf(s,n):g=e(s)}if(g&&g.size()&&!i.emit(t,"suggest:select",[g.data("suggest-data"),g.get(0),u.get(0)]).isDefaultPrevented()){if(u.get(0)!==g.get(0)&&g.removeClass("mark selected"),t===g.get(0))l.set(t,g.data("suggest-term"));else{var o=g.data("suggest-data");null!=o&&r.isString(o.label||o)&&l.set(t,o.label||o),g.addClass("mark selected")}return g.get(0)}}},i.bind("suggest","input","input[type=text]:enabled",function(){return c.execute(this)}),i.bind("suggest","focus","input[type=text]:enabled",function(){clearTimeout(e(this).data("blur.suggest"))}),i.bind("suggest","blur","input[type=text]:enabled",function(){var s=new t,a=this;return e(a).data("blur.suggest",setTimeout(function(){var t=c.hide(a,!1);t.then(null,function(){l.set(a,i.feature(a,null,"suggest","force",!1)?"":e(a).data("suggest-term"))}),t.then(s.resolve,s.reject)},300)),s.promise}),e("body").on("keydown.suggest","input[type=text][data-jobs~=suggest]",function(t){var s=this;switch(u.set(s,"suggest","press","off"),(t.originalEvent||t).keyCode){case n.KEY.PAGE_UP:case n.KEY.UP:u.set(s,"suggest","press","on"),e(i.target(s,null,"suggest","target")).is(":visible")?c.mark(s,"prev"):(c.show(s),c.mark(s,-1));break;case n.KEY.PAGE_DOWN:case n.KEY.DOWN:u.set(s,"suggest","press","on"),e(i.target(s,null,"suggest","target")).is(":visible")?c.mark(s,"next"):(c.show(s),c.mark(s,0));break;case n.KEY.TAB:case n.KEY.ENTER:case n.KEY.NUMPAD_ENTER:e(i.target(s,null,"suggest","target")).is(":visible")&&(u.set(s,"suggest","press","on"),c.hide(s,!0).then(null,function(){l.set(s,i.feature(s,null,"suggest","force",!1)?"":e(s).data("suggest-term"))}));break;case n.KEY.ESCAPE:e(i.target(s,null,"suggest","target")).is(":visible")&&(u.set(s,"suggest","press","on"),c.hide(s,!1).then(null,function(){l.set(s,i.feature(s,null,"suggest","force",!1)?"":e(s).data("suggest-term"))}))}u.isOn(s,"suggest","press","off")&&t.preventDefault()}),e("body").on("keypress.suggest","input[type=text][data-jobs~=suggest]",function(e){u.isOn(this,"suggest","press","off")&&e.preventDefault()}),c});
define("app/view/job/tab",["lib/jQuery","tnc/class/Deferred","tnc/class/Promise","app/view/ViewError","tnc/core/browser","tnc/core/utils","app/view/jobs","app/tpl/general","exports"],function(e,t,r,a,n,o,s,i,l){return l.execute=function(l,c){var u,p=e(l).closest(".nav > li");if(!(u=p.get(0)))return r.rejected(new a("No found of tab element."));var f,d=e();if(s.hasTarget(u,c,"tab","target")){if(!(f=s.target(u,c,"tab","target")))return r.rejected(new a("No found of panel element."));if(d=e(f),!d.is(".tab-content .tab-pane"))return r.rejected(new a("Wrong structure of panel element."))}var b=r.resolved(d.get(0)),v=d.parents(".tab-content").find(".tab-pane");if(p.siblings("li").removeClass("active"),p.addClass("active"),v.not(f).removeClass("active in"),d.addClass("active"),s.hasOption(u,c,"tab","remote")){d.html(i.get("ico/load"));var m={},g=o.parseParams(s.option(u,c,"tab","req-params")),w=s.emit(u,"tab:request",[m,g]).result;b=e.ajax(s.option(u,c,"tab","remote"),{type:s.option(u,c,"tab","req-method","get"),data:null==w?g:w,dataType:s.option(u,c,"tab","req-expect","text")}).then(function(e,t,r){var n=s.emit(u,"tab:respond",[m,e,t,r]);if(!1===n.result)throw e;if(null!=n.result&&!0!==n.result&&(e=n.result),!/\S+/.test(e))throw new a("No content form server.");try{d.html(e)}catch(e){o.error(e)}return d.get(0)},function(e,t,r){throw r||t})}var h=new t;return n.cssTransition&&d.hasClass("fade")?(d.one(n.EV_TRANSITION_END,function(){h.resolve(b)}),setTimeout(function(){d.trigger(n.EV_TRANSITION_END)},1e3*parseFloat(d.css(n.PROP_TRANSITION+"Duration"))),d.addClass("in")):(d.removeClass("fade"),h.resolve(b)),h.promise},s.bind("tab","click",".nav > li",function(){return l.execute(this)}),l});
define("app/view/job/validation",["lib/jQuery","tnc/core/utils","tnc/class/Deferred","tnc/class/Promise","app/view/ViewError","app/view/settings","app/view/values","app/view/jobs","exports"],function(e,t,n,i,r,a,l,s,o){function u(){return o.execute(this,!0,!1)}function c(e,r,a,l,s,o){function u(){if(0===p)o(h);else{try{f=a(e.shift())}catch(e){f=i.rejected(e)}i.when(f,l,s),i.when(f,c,d)}}function c(){0==--p?o(h):!0===r&&u()}function d(){0!=--p&&!0!==r||o(h)}var f,h=new n;e=t.toArray(e);var p=e.length;do{u()}while(!0!==r&&0<e.length);return h.promise}var d=/^\s*hint(?:-(\S*))?/,f=/^\s*rule-(\S+)/,h=/^\s*(on|true)?\s*$/i,p=/\s*\|\s*|\s+/;return o.FORM_OPTIONS={autofocus:!0,interrupt:!1},o.HINTS={},o.RULES={},o.addHint=function(e,t){e&&(o.HINTS[e]=""+t)},o.addRule=function(e,n,i){e&&t.isFunction(n)&&(o.RULES[e]={getter:i&&i.apply&&i,runner:n,name:e})},o.hasOption=function(e,t){return a.has(e,"validate",t)},o.getOption=function(e,n,i){switch(!0){case d.test(n):return o.getHint(e,n.replace(d,"$1"),i);case f.test(n):return a.get(e,"rule",n.replace(f,"$1"),i);default:n="rules"===n?"":n;var r=a.get(e,"validate",n,i);return t.isBoolean(i)&&(r=h.test(String(r))),r}},o.setOption=function(e,n,i){switch(!0){case d.test(n):return a.set(e,"hint",n.replace(d,"$1"),i);case f.test(n):return a.set(e,"rule",n.replace(f,"$1"),i);default:return n="rules"===n?"":n,t.isBoolean(i)&&(i=i?"on":"off"),a.set(e,"validate",n,i)}},o.setOptions=function(e,n){t.each(n,function(t,n){o.setOption(e,t,n)})},o.getHint=function(e,n,i){return a.has(e,"hint",n)?a.get(e,"hint",n):e.form&&a.has(e.form,"hint",n)?a.get(e.form,"hint",n):t.hasOwn(o.HINTS,n)?o.HINTS[n]:a.has(e,"hint","")?a.get(e,"hint",""):e.form&&a.has(e.form,"hint","")?a.get(e.form,"hint",""):null==i?"":""+i},o.renderHint=function(e,n,i){var l=e.getAttribute("name")||e.getAttribute("id"),s=a.query(e,o.getOption(e,"prompter"),l&&function(){return"#error_for_"+l.replace(/\[([^\[\]]*)\]/g,function(e,t){return t&&("_"+t).replace(/\s+/g,"_")})});s.size()&&(t.isString(n)?i instanceof r?s.html(i.message):s.html(o.getHint(e,n)):s.empty(),s.is(".has-feedback .rule-hint")||s.toggle(t.isString(n)))},o.renderState=function(n,i,r){var a=e(n);a.toggleClass("valid-fail",t.isString(i)),a.toggleClass("valid-pass",!0===i);var l=a.closest(".form-group");l.size()||(l=a.closest(".checkbox, .radio, .checkbox-inline, .radio-inline")),l.size()&&(l.toggleClass("has-error",t.isString(i)),l.toggleClass("has-success",!0===i),l.hasClass("has-feedback")&&!a.is(":button")&&(/radio|checkbox/i.test(n.type)&&a.is(".checkbox input")&&(a=a.parents(".checkbox")),a.next(".form-control-feedback").remove(),!1!==i&&a.after(!0===i?'<i aria-hidden="true" class="fa fa-check-circle form-control-feedback"></i>':'<i aria-hidden="true" class="fa fa-info-circle form-control-feedback"></i>'))),o.renderHint(n,i,r)},o.testRule=function(e,t,n,r,a){if(!(t=t&&o.RULES[t]))return i.rejected(!1);var s,u,c=2===arguments.length?l.get(e):n;try{s=t.getter?t.getter(e,"rule-"+t.name,o.getOption):o.getOption(e,"rule-"+t.name),u=t.runner.call(e,c,s,r,a)}catch(e){u=e}return!u||u instanceof Error?i.rejected(u):i.resolve(u)},o.testField=function(n,r,a,s){if(!a&&(n.disabled||e.find.matchesSelector(n,":hidden:not(input[type=hidden]), :hidden input[type=hidden], fieldset[data-validate] :input")))return i.resolved(!1);var u,d=t.trim(o.getOption(n,"")),f=l.get(n),h=!0;if(t.isFunction(s))try{d=s(n,d)||""}catch(u){i.rejected(u)}return d=/\S/.test(d)?d.toLowerCase().split(p):[],c(d,!0,function(e){return o.testRule(n,h=e,f,r,a)},function(e){h=!0},function(e){u=e},function(e){var t={field:n,value:f,rules:d,state:h,error:u};if(!0===r)try{o.renderState(n,h,u)}catch(t){e.reject(t)}!0===h?e.resolve(t):e.reject(t)})},o.testForm=function(e,n,r,a){var l=e.elements,s=[];if(1>l.length||!r&&(e.disabled||!t.visible(e)))return i.resolve(s);var u=o.getOption(e,"autofocus",!0),d=o.getOption(e,"interrupt",!1),f=[],h=[];return c(l,d,function(e){return o.testField(e,n,r,a)},function(e){e&&(h.push(e),s.push(e))},function(e){e&&(f.push(e),s.push(e))},function(t){var i=0===f.length;!0===n&&o.renderState(e,i),i?t.resolve(s):(n&&u&&f[0].field.focus(),t.reject(s))})},o.execute=function(t,n,i,r){return e.nodeName(t,"form")?o.testForm(t,n,i,r):o.testField(t,n,i,r)},s.bind("validate","submit","form",u,null,null,!0),s.bind("validate","click","fieldset",u,null,null,!0),s.bind("validate","click",":button:enabled, :image:enabled, :submit:enabled",u,null,null,!0),s.bind("validate","change",":checkbox:enabled, :radio:enabled",u,null,null,!0),s.bind("validate","change","select:enabled, :file:enabled",u,null,null,!0),s.bind("validate","blur input","textarea:enabled, input:enabled:not(:checkbox, :radio, :file, :button, :image, :submit), select:enabled",function(e){return"input"!==e.type||s.feature(this,null,"validate","live",!1)?o.execute(this,!0,!1):(o.renderState(this,!1),i.resolved(!1))},null,null,!0),o});
define("app/view/job/validators",["lib/jQuery","tnc/core/utils","tnc/class/Deferred","tnc/class/Promise","app/view/ViewError","app/view/settings","app/view/values","app/view/jobs","app/view/job/validation","app/view/job/suggest"],function(e,t,r,n,a,i,u,s,l,o){function c(e,t,r){if(r&&r.message&&!(r instanceof Error))throw new a(r.message);throw r}l.addRule("min-length",function(e,t){if((e=e||"")&&0<(t=parseInt(t,10)||0))return e.length>=t},function(e,t,r){return e.getAttribute("minlength")||r(e,t)}),l.addRule("max-length",function(e,t){return!((e=e||"")&&0<(t=parseInt(t,10)||0))||e.length<=t},function(e,t,r){return e.getAttribute("maxlength")||r(e,t)}),l.addRule("min-value",function(e,t){return!isNaN(e)&&(isNaN(t)||parseFloat(e)>=parseFloat(t))},function(e,t,r){return e.getAttribute("min")||r(e,t)}),l.addRule("max-value",function(e,t){return!isNaN(e)&&(isNaN(t)||parseFloat(e)<=parseFloat(t))},function(e,t,r){return e.getAttribute("max")||r(e,t)}),l.addRule("min-value-with-comma",function(e,t){var r=e.replace(/,/g,"."),n=t.replace(/,/g,".");return!isNaN(r)&&(isNaN(n)||parseFloat(r)>=parseFloat(n))},function(e,t,r){return e.getAttribute("min-num")||r(e,t)}),l.addRule("max-value-with-comma",function(e,t){var r=e.replace(/,/g,"."),n=t.replace(/,/g,".");return!isNaN(r)&&(isNaN(n)||parseFloat(r)<=parseFloat(n))},function(e,t,r){return e.getAttribute("max-num")||r(e,t)}),l.addRule("equal",function(e,t){var r,n,a=i.query(this,t),s=u.get(a.get(0));if(e instanceof Array&&s instanceof Array){if(e.length!==s.length)return!1;for(r=0,n=e.length;r<n;r++)if(e[r]!==s[r])return!1;return!0}return e===s}),l.addRule("not-equal",function(e,t){var r,n,a=i.query(this,t),s=u.get(a.get(0));if(e instanceof Array&&s instanceof Array){if(e.length!==s.length)return!0;for(r=0,n=e.length;r<n;r++)if(e[r]!==s[r])return!0;return!1}return e!==s}),l.addRule("pair",function(e,t,r,n){var a=i.query(this,t);return!a.size()||l.execute(a.get(0),r,n)}),l.addRule("pattern",function(e,t){return!t||t.test(e)},function(e,t,r){var n=e.getAttribute("pattern")||r(e,t);return n&&new RegExp(n)}),l.addRule("require",function(e,r){if(""!=""+e&&(r=t.trim(r))){var n=i.query(this,r);return!!n.size()&&0===n.filter(function(){return""==""+u.get(this)}).size()}return!0}),l.addRule("required",function(e){return!!e&&(isNaN(e.length)||e.length>0)}),l.addRule("min-select",function(t,r){return!!(0<(r=~~r)&&this.getAttribute("name"))&&r<=e(this).find('[name="'+this.getAttribute("name")+'"]:checked').size()}),l.addRule("max-select",function(t,r){return!!(1<(r=~~r)&&this.getAttribute("name"))&&r>=e(this).find('[name="'+this.getAttribute("name")+'"]:checked').size()}),l.addRule("ajax",function(t,r){if(!r)throw new a("Internal Error.");return e.post(r,{value:t},null,"df-json").then(null,c)}),l.addRule("email",function(r,n){if(r=t.trim(r),e(this).val(r),/^[\w\-+.]+@[\w\-.]+[a-z]+$/i.test(r)){if(!n)return!0;return e.post(n,{email:r},null,"df-json").then(null,c)}return!1}),l.addRule("nickname",function(n){n=t.trim(n);var a=e(this);if(a.val(n),!/^[\da-zäöüß]+[\d\w\-äöüß]{2,15}$/i.test(n)||/\s/.test(n)||/^[0-9]+$/.test(n))return!1;var i=new r;return a.off("suggest:request").on("suggest:request",function(e,t){return{nickname:n}}),a.off("suggest:respond").on("suggest:respond",function(e,t,r){r.data&&r.data.length||i.resolve(!0)}),a.off("suggest:generate").on("suggest:generate",function(t,r,n,i){var u=e(i);u.prev().size()||u.before('<li class="instruction">'+a.attr("data-nickname-hint")+"</li>"),u.html('<span style="text-decoration: underline; cursor: pointer">'+n+"</span>")}),a.off("suggest:select").one("suggest:select",function(e,t,r){r===this?i.reject(!1):i.resolve(!0)}),o.execute(this,n),i.promise});var d=/^\s*(\d{4}-\d{1,2}-\d{1,2}|\d{1,2}-\d{1,2}-\d{4}|\d{4}\.\d{1,2}\.\d{1,2}|\d{1,2}\.\d{1,2}\.\d{4})?\s*$/,A=/^\d{4}-\d{1,2}-\d{1,2}$/;l.addRule("date",function(e){if(d.test(e)){var t=this.getAttribute("min");if(A.test(t)&&new Date(t)>new Date(e))return!1;var r=this.getAttribute("max");return!(A.test(r)&&new Date(r)<new Date(e))}return!1}),l.addRule("number",function(e){if(!isNaN(e)){var t=this.getAttribute("min");if(!isNaN(t)&&parseFloat(t)>parseFloat(e))return!1;var r=this.getAttribute("max");return!(!isNaN(r)&&parseFloat(r)<parseFloat(e))}return!1}),l.addRule("suggest",function(t){if(!t)return!0;var n=e(s.target(this,null,"suggest","target"));if(!n.is(":visible"))return!0;var a=new r;return n.trigger("collapse:hide.validator",[this,!0]),n.off("collapse:hide.validator","**"),n.one("collapse:hide.validator",function(e,t,r){!0===r?a.reject(!1):a.resolve(!0)}),a.promise}),l.addRule("iban",function(e,r){var n={AD:"AD[0-9]{2}[0-9]{4}[0-9]{4}[A-Z0-9]{12}",AE:"AE[0-9]{2}[0-9]{3}[0-9]{16}",AL:"AL[0-9]{2}[0-9]{8}[A-Z0-9]{16}",AO:"AO[0-9]{2}[0-9]{21}",AT:"AT[0-9]{2}[0-9]{5}[0-9]{11}",AZ:"AZ[0-9]{2}[A-Z]{4}[A-Z0-9]{20}",BA:"BA[0-9]{2}[0-9]{3}[0-9]{3}[0-9]{8}[0-9]{2}",BE:"BE[0-9]{2}[0-9]{3}[0-9]{7}[0-9]{2}",BF:"BF[0-9]{2}[0-9]{23}",BG:"BG[0-9]{2}[A-Z]{4}[0-9]{4}[0-9]{2}[A-Z0-9]{8}",BH:"BH[0-9]{2}[A-Z]{4}[A-Z0-9]{14}",BI:"BI[0-9]{2}[0-9]{12}",BJ:"BJ[0-9]{2}[A-Z]{1}[0-9]{23}",BR:"BR[0-9]{2}[0-9]{8}[0-9]{5}[0-9]{10}[A-Z][A-Z0-9]",CH:"CH[0-9]{2}[0-9]{5}[A-Z0-9]{12}",CI:"CI[0-9]{2}[A-Z]{1}[0-9]{23}",CM:"CM[0-9]{2}[0-9]{23}",CR:"CR[0-9]{2}[0-9]{3}[0-9]{14}",CV:"CV[0-9]{2}[0-9]{21}",CY:"CY[0-9]{2}[0-9]{3}[0-9]{5}[A-Z0-9]{16}",CZ:"CZ[0-9]{2}[0-9]{20}",DE:"DE[0-9]{2}[0-9]{8}[0-9]{10}",DK:"DK[0-9]{2}[0-9]{14}",DO:"DO[0-9]{2}[A-Z0-9]{4}[0-9]{20}",DZ:"DZ[0-9]{2}[0-9]{20}",EE:"EE[0-9]{2}[0-9]{2}[0-9]{2}[0-9]{11}[0-9]{1}",ES:"ES[0-9]{2}[0-9]{4}[0-9]{4}[0-9]{1}[0-9]{1}[0-9]{10}",FI:"FI[0-9]{2}[0-9]{6}[0-9]{7}[0-9]{1}",FO:"FO[0-9]{2}[0-9]{4}[0-9]{9}[0-9]{1}",FR:"FR[0-9]{2}[0-9]{5}[0-9]{5}[A-Z0-9]{11}[0-9]{2}",GB:"GB[0-9]{2}[A-Z]{4}[0-9]{6}[0-9]{8}",GE:"GE[0-9]{2}[A-Z]{2}[0-9]{16}",GI:"GI[0-9]{2}[A-Z]{4}[A-Z0-9]{15}",GL:"GL[0-9]{2}[0-9]{4}[0-9]{9}[0-9]{1}",GR:"GR[0-9]{2}[0-9]{3}[0-9]{4}[A-Z0-9]{16}",GT:"GT[0-9]{2}[A-Z0-9]{4}[A-Z0-9]{20}",HR:"HR[0-9]{2}[0-9]{7}[0-9]{10}",HU:"HU[0-9]{2}[0-9]{3}[0-9]{4}[0-9]{1}[0-9]{15}[0-9]{1}",IE:"IE[0-9]{2}[A-Z]{4}[0-9]{6}[0-9]{8}",IL:"IL[0-9]{2}[0-9]{3}[0-9]{3}[0-9]{13}",IR:"IR[0-9]{2}[0-9]{22}",IS:"IS[0-9]{2}[0-9]{4}[0-9]{2}[0-9]{6}[0-9]{10}",IT:"IT[0-9]{2}[A-Z]{1}[0-9]{5}[0-9]{5}[A-Z0-9]{12}",JO:"JO[0-9]{2}[A-Z]{4}[0-9]{4}[0]{8}[A-Z0-9]{10}",KW:"KW[0-9]{2}[A-Z]{4}[0-9]{22}",KZ:"KZ[0-9]{2}[0-9]{3}[A-Z0-9]{13}",LB:"LB[0-9]{2}[0-9]{4}[A-Z0-9]{20}",LI:"LI[0-9]{2}[0-9]{5}[A-Z0-9]{12}",LT:"LT[0-9]{2}[0-9]{5}[0-9]{11}",LU:"LU[0-9]{2}[0-9]{3}[A-Z0-9]{13}",LV:"LV[0-9]{2}[A-Z]{4}[A-Z0-9]{13}",MC:"MC[0-9]{2}[0-9]{5}[0-9]{5}[A-Z0-9]{11}[0-9]{2}",MD:"MD[0-9]{2}[A-Z0-9]{20}",ME:"ME[0-9]{2}[0-9]{3}[0-9]{13}[0-9]{2}",MG:"MG[0-9]{2}[0-9]{23}",MK:"MK[0-9]{2}[0-9]{3}[A-Z0-9]{10}[0-9]{2}",ML:"ML[0-9]{2}[A-Z]{1}[0-9]{23}",MR:"MR13[0-9]{5}[0-9]{5}[0-9]{11}[0-9]{2}",MT:"MT[0-9]{2}[A-Z]{4}[0-9]{5}[A-Z0-9]{18}",MU:"MU[0-9]{2}[A-Z]{4}[0-9]{2}[0-9]{2}[0-9]{12}[0-9]{3}[A-Z]{3}",MZ:"MZ[0-9]{2}[0-9]{21}",NL:"NL[0-9]{2}[A-Z]{4}[0-9]{10}",NO:"NO[0-9]{2}[0-9]{4}[0-9]{6}[0-9]{1}",PK:"PK[0-9]{2}[A-Z]{4}[A-Z0-9]{16}",PL:"PL[0-9]{2}[0-9]{8}[0-9]{16}",PS:"PS[0-9]{2}[A-Z]{4}[A-Z0-9]{21}",PT:"PT[0-9]{2}[0-9]{4}[0-9]{4}[0-9]{11}[0-9]{2}",QA:"QA[0-9]{2}[A-Z]{4}[A-Z0-9]{21}",RO:"RO[0-9]{2}[A-Z]{4}[A-Z0-9]{16}",RS:"RS[0-9]{2}[0-9]{3}[0-9]{13}[0-9]{2}",SA:"SA[0-9]{2}[0-9]{2}[A-Z0-9]{18}",SE:"SE[0-9]{2}[0-9]{3}[0-9]{16}[0-9]{1}",SI:"SI[0-9]{2}[0-9]{5}[0-9]{8}[0-9]{2}",SK:"SK[0-9]{2}[0-9]{4}[0-9]{6}[0-9]{10}",SM:"SM[0-9]{2}[A-Z]{1}[0-9]{5}[0-9]{5}[A-Z0-9]{12}",SN:"SN[0-9]{2}[A-Z]{1}[0-9]{23}",TL:"TL38[0-9]{3}[0-9]{14}[0-9]{2}",TN:"TN59[0-9]{2}[0-9]{3}[0-9]{13}[0-9]{2}",TR:"TR[0-9]{2}[0-9]{5}[A-Z0-9]{1}[A-Z0-9]{16}",VG:"VG[0-9]{2}[A-Z]{4}[0-9]{16}",XK:"XK[0-9]{2}[0-9]{4}[0-9]{10}[0-9]{2}"},a=e.replace(/[^a-zA-Z0-9]/g,"").toUpperCase(),i=a.substr(0,2);if(!n[i])return!1;if(r&&"string"==typeof r){var u=r.split(",");if(!t.any(u,i))return!1}if(!new RegExp("^"+n[i]+"$").test(a))return!1;a=a.substr(4)+a.substr(0,4),a=t.map(a.split(""),function(e,t){var r=t.charCodeAt(0);return r>="A".charCodeAt(0)&&r<="Z".charCodeAt(0)?r-"A".charCodeAt(0)+10:t}),a=a.join("");for(var s=parseInt(a.substr(0,1),10),l=a.length,o=1;l>o;++o)s=(10*s+parseInt(a.substr(o,1),10))%97;return 1===s}),l.addRule("bic",function(e){return/^[a-zA-Z]{6}[a-zA-Z0-9]{2}([a-zA-Z0-9]{3})?$/.test(e)}),l.addRule("wl-zip",function(e){if(e){var t=i.query(this,'select[name="COUNTRY"]').val();return"CH"===t?/^\d{4}$/.test(e):"DE"===t?/^\d{5}$/.test(e):"NL"!==t||/^\d{4}\s?([A-Za-z]{2})/.test(e)}return!1});var f,g;return l.addRule("recaptcha",function(){var a=e(this),i=a.data("recaptcha-token");if(i)return n.resolved(i);var u=new r;return null!=f&&grecaptcha.reset(f),null!=g&&e(g).remove(),g=this.appendChild(document.createElement("div")),g.id="g-recaptcha-"+t.timestamp(),f=grecaptcha.render(g,{sitekey:config.get("recaptcha.sitekey"),size:"invisible",action:"login",callback:function(e){a.data("recaptcha-token",e),u.resolve(e)}}),grecaptcha.execute(f),u.promise}),l.addRule("street",function(e){return[/[aeiou]/i,/[a-z\d]{4,}/i].reduce(function(t,r){return t&&r.test(e)},!0)}),l.addRule("max-date-length",function(e,t){var r=new Date(t.startDate).getTime(),n=new Date(e).getTime();return n-r<=24*parseInt(t.length)*60*60*1e3&&n-r>=0},function(e,t,r){return{length:e.dataset.maxDateLength,startDate:i.query(e,e.dataset.ruleRequire).val()}||r(e,t)}),l});
define("app/view/job/input-remain",["lib/jQuery","app/view/jobs","exports"],function(e,n,t){return t.execute=function(n){var t=e(n).next(".input-remain");if(t.size()||(t=e(n).closest(".form-group").find(".input-remain")),t.size()){var i=Math.max(0,n.maxLength-n.value.length);return t.find(".n-count").text(i),i}},e("body").on("input.input-remain","textarea[maxlength]",function(){t.execute(this)}),e(document).ready(function(){e("textarea[maxlength]").each(function(){t.execute(this)})}),t});
define("app/view/job/set-value",["tnc/class/Promise","app/view/values","app/view/jobs","exports"],function(e,t,n,u){return u.execute=function(u,i){var r=n.target(u,i,"set-value","",u);if(!r)return e.rejected(!1);var a=n.option(u,i,"set-value","data","");return t.set(r,a)},n.bind("set-value","click",":not(form, :input), :enabled:button",function(){return u.execute(this)}),n.bind("set-value","change","select:enabled",function(){return u.execute(this)}),n.bind("set-value","submit","form",function(){return u.execute(this)}),u});
define("app/view/geo/location",["lib/jQuery"],function(o){o("body").off(".df-geo").on("change.df-geo",".df-geo-country",function(){o(this).closest(".form-location-wrapper, .form-horizontal, .form-inline, form").find(".df-geo-id, .df-geo-zip, .df-geo-location").val("")}).on("input.df-geo",".df-geo-location",function(){o(this).siblings(".df-geo-id, .df-geo-zip").val("")}).on("suggest:request.df-geo",".df-geo-location",function(i,i,e){var n=o(this).closest(".form-location-wrapper, .form-horizontal, .form-inline, form"),t=n.find(".df-geo-country");return{input:e.term,iso:t.val()}}).on("suggest:generate.df-geo",".df-geo-location",function(i,e,n,t){o(t).text(n.value)}).on("suggest:mark.df-geo",".df-geo-location",function(i,e,n){n!==this&&o(this).val(e.value)}).on("suggest:select.df-geo",".df-geo-location",function(i,e,n){n!==this&&(o(this).val(e.value),o(this).siblings(".df-geo-id").val(e.id),o(this).siblings(".df-geo-zip").val(e.zip),o(this).siblings(".df-geo-lat").val(e.lat),o(this).siblings(".df-geo-lon").val(e.lon))}).on("focus.df-geo",".df-geo-location",function(){o(this).select()})});
define("app/tpl/avatar",["app/tpl/general"],function(a){return a.set("avatar/img",'<img class="df-avatar" src="/images/blank.gif" style="background-image: url(#{src});" />'),a.set("avatar/div",'<div class="df-avatar"><div><img alt="" src="#{src}" data-plc="#{plc}" data-src="#{src}" onerror="if(this.getAttribute(\'src\')!=this.getAttribute(\'data-plc\'))this.src=this.getAttribute(\'data-plc\');" /></div></div>'),a});
define("app/tpl/media",["app/tpl/general"],function(t){return t.set("image/img",'<img loading="lazy" class="df-preview df-image" alt="#{alt}" src="#{src}" data-plc="#{plc}" data-src="#{src}" onerror="if(this.getAttribute(\'src\')!=this.getAttribute(\'data-plc\'))this.src=this.getAttribute(\'data-plc\');" /><div></div>'),t.set("image/div",'<div class="df-preview df-image"><div><img loading="lazy" alt="#{alt}" src="#{src}" data-plc="#{plc}" data-src="#{src}" onerror="if(this.getAttribute(\'src\')!=this.getAttribute(\'data-plc\'))this.src=this.getAttribute(\'data-plc\');" /></div></div>'),t.set("video/img",'<img loading="lazy" class="df-preview df-video" alt="" src="#{src}" data-plc="#{plc}" data-src="#{src}" onerror="if(this.getAttribute(\'src\')!=this.getAttribute(\'data-plc\'))this.src=this.getAttribute(\'data-plc\');" />'),t.set("video/div",'<div class="df-preview df-video"><div><img loading="lazy" alt="" src="#{src}" data-plc="#{plc}" data-src="#{src}" onerror="if(this.getAttribute(\'src\')!=this.getAttribute(\'data-plc\'))this.src=this.getAttribute(\'data-plc\');" /></div></div>'),t.set("video/player",'<div class="df-player"><div data-src="#{src}"><img loading="lazy" alt="" src="#{plc}" /><span class="play-btn"><i aria-hidden="true" class="fa fa-play"></i></span></div></div>'),t});
define("app/view/media",["lib/jQuery","tnc/core/utils","app/sys/config","app/tpl/media","exports"],function(e,r,t,i,a){var l=document.createElement("a");a._url=function(e){var r="",i="";if(l.href=e,e=l.pathname.replace(/^[^\/]/,"/$&"),params=l.search||"",location.hostname!==l.hostname||-1<e.indexOf("/images/plc/"))return i="http:"===l.protocol&&"80"===l.port||"https:"===l.protocol&&"443"===l.port?l.hostname:l.host,(l.host?l.protocol+"//"+i:"")+e+params;var a=t.get("image.servers",{});return r=e.split("/").pop()||r,i=r.replace(/^\d+-/,"")[0]||i,i=a[i.toLowerCase()]||a[isNaN(i)?2:1],[i,e,params].join("")},a.url=function(e,t,i,l){return r.trim(t)?this._url(t):a.plc(e,"null",i,l)},a.plc=function(e,r,i,a){return"direct"===a&&(a=300),"/images/plc/"+("de"===t.language()?"de":"en")+"/"+[e,r,this.gender(i),a||300].join("_").replace(/_{2,}/,"_")+".svg"},a.gender=function(e){return t.get("image.genders",{})[e]||e},a.reason=function(e,i,a,l){var s="video"===e;return s&&0<i.indexOf("#check")?"PERMISSION_NOT_CHECKED_MEDIA_VIDEO":l===t.user("id")?"":s&&!t.user("is.paying",!1)?"PERMISSION_NOT_VISIBLE_FOR_NORMAL":a&&0<i.indexOf("fsk18")&&(!t.user("is.fsk18",!1)||-1===r.indexOf((s?"videos_":"images_")+a,t.user("fsk18")))?t.user("is.fsk18",!1)?"PERMISSION_FSK18_MEDIA_DISABLED":"PERMISSION_FSK18_MEDIA":void 0},i.register("ATTACH",function(e,r){if(null==r)return"";var a=e.match(/([a-z]+)\((\S+)\s*(\S*)\)/),l=r[a[2]];return i.fill(i.get("image/"+a[1]),{plc:"/images/plc/"+t.language()+"/msg_img_error_300.svg",src:l})}),i.register("IMAGE",function(e,r){if(null==r)return"";var t=e.match(/([a-z]+)\((\S+)\s+(\S+)\s+(\S+)\s*(\S*)\)/),l=r[t[2]],s=r[t[3]],n=r[t[4]]||"",o=r[t[5]]||(/^\d+/.test(t[5])?t[5]:"");return i.fill(i.get("image/"+t[1]),{plc:a.plc("image","null",s,o),src:a.url("image",l,s,o),alt:n})}),i.register("VIDEO",function(e,r){if(null==r)return"";var t=e.match(/([a-z]+)\((\S+)\s+(\S+)\s*(\S*)\)/),l=r[t[2]],s=r[t[3]],n=r[t[4]]||(/^\d+/.test(t[4])?t[4]:"");return l&&s?i.fill(i.get("video/"+t[1]),{plc:a.plc("video","null","",n),src:a.url("video",l,"",n)}):""}),i.register("PLAYER",function(e,r){if(null==r)return"";var t=e.match(/(\S+)\s+(\S+)\s+(\S+)\s*(\S*)/),l=r[t[1]],s=r[t[2]],n=r[t[3]],o=r[t[4]];return s&&l&&n?i.fill(i.get("video/player"),{plc:r.preview_orig||a.url("video",s,"",o),src:l}):""}),e("body").on("click.df-player",".df-player > div",function(){var r=e(this),t=r.attr("data-src");!t||r.closest(".tnc-gallery-item").find('.gallery-permission[data-value!=""]').size()||r.siblings("iframe").size()||r.after('<iframe class="play-box" src="'+t+'" allowfullscreen="true" allowtransparency="true" frameborder="0" scrolling="no" allow="autoplay;fullscreen;"></iframe>')})});
define("app/view/avatar",["exports","app/tpl/avatar","app/view/media"],function(r,n,t){return r.url=function(r,n,a){return t.url("image",r,n,a)},r.plc=function(r,n){return t.plc("image","null",r,n)},r.img=function(t,a,i){return n.fill(n.get("avatar/img"),{src:r.url(t,a,i),plc:r.plc(a,i)})},r.div=function(t,a,i){return n.fill(n.get("avatar/div"),{src:r.url(t,a,i),plc:r.plc(a,i)})},n.register("AVATAR",function(n,t){if(null==t)return"";var a=n.match(/([a-z]+)\((\S+)\s+(\S+)\s*(\S*)\)/);return a[1]in r?r[a[1]](t[a[2]],t[a[3]],t[a[4]]):""}),r});
define("tnc/core/uuid",["exports"],function(x){x.generate=function(){var x=(new Date).valueOf();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var n=(x+16*Math.random())%16|0;return x=Math.floor(x/16),("x"===e?n:7&n|8).toString(16)})}});
define("tnc/class/LinkedListNode",["tnc/core/uuid"],function(t){var e=function(r){return r instanceof e?r.clone():this instanceof e?(0<arguments.length&&(this.uuid=t.generate(),this.data=r),this):new e(r)};return e.prototype.uuid=void 0,e.prototype.data=void 0,e.prototype.prev=void 0,e.prototype.next=void 0,e.prototype.clone=function(){return new this.constructor(this.data)},e.prototype.getData=function(){return this.data},e.prototype.getPrev=function(){return this.prev},e.prototype.getNext=function(){return this.prev},e.prototype.getHead=function(){for(var t=this;void 0!==t.prev;)t=t.prev;return t},e.prototype.getTail=function(){for(var t=this;void 0!==t.next;)t=t.next;return t},e.prototype.setData=function(t){return this.data=t,this},e.prototype.setPrev=function(t){if(!(this!==t&&t instanceof e))throw new TypeError;return this.prev=t,this},e.prototype.setNext=function(t){if(!(this!==t&&t instanceof e))throw new TypeError;return this.next=t,this},e.prototype.prevOf=function(t){for(var r=this;void 0!==(r=r.prev);)if(t instanceof e){if(t===r)return r}else if(t===r.data)return r},e.prototype.nextOf=function(t){for(var r=this;void 0!==(r=r.next);)if(t instanceof e){if(t===r)return r}else if(t===r.data)return r},e.prototype.toSource=function(){return this.data},e.prototype.toString=function(){return String(this.data)},e.prototype.valueOf=function(){return this.data},e});
define("tnc/class/LinkedListIterator",[],function(){var t=function(t,r,e){return this.source=t,this.cursor=e,this.reverse=!0===r,this};return t.prototype.source=void 0,t.prototype.cursor=void 0,t.prototype.reverse=void 0,t.prototype.head=function(){return this.reverse?this.source.tail:this.source.head},t.prototype.tail=function(){return this.reverse?this.source.head:this.source.tail},t.prototype.at=function(t){return t===this.cursor},t.prototype.atHead=function(){return this.at(this.head())},t.prototype.atTail=function(){return this.at(this.tail())},t.prototype.toHead=function(){return this.cursor=this.head()},t.prototype.toTail=function(){return this.cursor=this.tail()},t.prototype.prev=function(){if(this.at(void 0))return this.cursor=this.head();if(!this.atHead())return this.cursor=this.reverse?this.cursor.next:this.cursor.prev},t.prototype.next=function(){if(this.at(void 0))return this.cursor=this.head();if(!this.atTail())return this.cursor=this.reverse?this.cursor.prev:this.cursor.next},t});
define("tnc/class/RemoteListIterator",["tnc/core/utils","tnc/class/LinkedListIterator","tnc/class/Deferred","tnc/class/Promise"],function(r,t,e,o){var s=function(r,e,o){t.apply(this,arguments)};return s.prototype=r.inherit(t.prototype),s.prototype.constructor=s,s.prototype.load=function(t,e){return r.isFunction(this.source.load)?this.source.load(t,e):o.rejected(void 0)},s.prototype.prev=function(r){var t=this;return t.at(void 0)&&void 0!==t.tail()?o.resolved(t.toTail()):t.at(void 0)||t.atHead()?this.load(r,!t.reverse).then(function(){if(t.at(void 0))return t.toTail();if(t.atHead())throw void 0;return t.cursor=t.reverse?t.cursor.next:t.cursor.prev}):o.resolved(t.cursor=t.reverse?t.cursor.next:t.cursor.prev)},s.prototype.next=function(r){var t=this;return t.at(void 0)&&void 0!==t.head()?o.resolved(t.toHead()):t.at(void 0)||t.atTail()?this.load(r,t.reverse).then(function(){if(t.at(void 0))return t.toHead();if(t.atTail())throw void 0;return t.cursor=t.reverse?t.cursor.prev:t.cursor.next}):o.resolved(t.cursor=t.reverse?t.cursor.prev:t.cursor.next)},s});
define("tnc/class/Callbacks",["tnc/core/utils"],function(i,t){function n(t){var n=r[t]={};return i.each(t.split(/\s+/),function(i,t){n[t]=!0}),n}var r={};return i.createClass({Options:{},_opts:{},_list:t,_memory:t,_stack:t,_fired:!1,_firing:!1,_firingStart:0,_firingLength:0,_firingIndex:0,toString:function(){return"[object Callbacks]"},init:function(t){this._opts="string"==typeof t?r[t]||n(t):i.extend(this.Options,t),this._list=[],this._stack=!this._opts.once&&[]},add:function(){var t,n=this;return n._list&&(t=n._list.length,function t(r){i.each(r,function(r,s){i.isFunction(s)?n._opts.unique&&n.has(s)||n._list.push(s):s&&s.length&&t(s)})}(arguments),n._firing?n._firingLength=n._list.length:n._memory&&(n._firingStart=t,n._fire(n._memory))),n},remove:function(){var t=this;return t._list&&i.each(arguments,function(n,r){for(var s=0;(s=i.indexOf(r,t._list,s))>-1;)t._list.splice(s,1),t._firing&&(s<=t._firingLength&&t._firingLength--,s<=t._firingIndex&&t._firingIndex--)}),this},has:function(t){return i.indexOf(t,this._list)>-1},empty:function(){return this._list=[],this},disable:function(){return this._list=this._stack=this._memory=t,this},disabled:function(){return!this._list},lock:function(){return this._stack=t,this._memory||this.disable(),this},locked:function(){return!this._stack},fireWith:function(i,t){return t=t||[],t=[i,t.slice?t.slice():t],!this._list||this._fired&&!this._stack||(this._firing?this._stack.push(t):this._fire(t)),this},fire:function(i){return this.fireWith(this,arguments)},fired:function(){return!!this._fired},_fire:function(n){var r=this;r._memory=r._opts.memory&&n,r._fired=!0,r._firingIndex=r._firingStart||0,r._firingLength=r._list.length,r._firingStart=0;try{for(r._firing=!0;r._list&&r._firingIndex<r._firingLength;r._firingIndex++)if(!1===r._list[r._firingIndex].apply(n[0],n[1])&&r._opts.stopOnFalse){r._memory=t;break}}catch(t){i.error(t)}r._firing=!1,r._list&&(r._stack?r._stack.length&&r._fire(r._stack.shift()):r._memory?r._list=[]:r.disable())}})});
define("tnc/class/EventEmitter",["tnc/core/utils","tnc/class/Callbacks"],function(t,e){var n=function(t){this.eventsHandlers={},this.eventsOptions=t||{}};return n.prototype.eventsOptions=void 0,n.prototype.eventsHandlers=void 0,n.prototype.addListener=function(t,n){if(t&&n){var s=this.eventsHandlers[t]||new e(this.eventsOptions[t]);this.eventsHandlers[t]=s,s.add(n)}return this},n.prototype.removeListener=function(t,e){if(t&&e){var n=this.eventsHandlers[t];n&&n.remove(e)}return this},n.prototype.clearListeners=function(t){return t?delete this.eventsHandlers[t]:delete this.eventsHandlers,this},n.prototype.fireEventWith=function(t,e,n){if(e){var s=this.eventsHandlers[e];s&&s.fireWith(t,n)}return this},n.prototype.fireEvent=function(e,n){return e&&this.fireEventWith(this,e,t.slice(arguments,1)),this},n});
define("tnc/class/io/IOError",["tnc/core/utils"],function(t){var r=function(t,r){this.message=t||"",this.emitter=r};return r.prototype=t.inherit(Error.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return"[object IOError]"},r});
define("tnc/class/io/Request",["tnc/core/utils","tnc/core/url","tnc/class/Deferred","tnc/class/EventEmitter","tnc/class/io/IOError"],function(t,e,o,r,n){var i=function(n,i,s,p){var a,c=this;o.call(c),c.emitter=s||new r(c.constructor.Events),c.mapping=p,c._opts=a=t.mix(i,c.constructor.Options),c._path=e.getFullUrl(n),a.isLocal=a.isLocal||e.isLocalProtocol(c._path),a.isCross=a.isCross||e.isCrossDomain(c._path),c.promise.then(function(t){c.resolved=!0,c.fireEvent("success",t)},function(t){c.rejected=!0,c.fireEvent("error",t)}),c.promise.always(function(){c.constructor.destroyOrigin(c),c.fireEvent("done")})};return i.prototype=t.inherit(o.prototype),i.prototype.constructor=i,i.Events={start:"memory stopOnFalse",open:"memory stopOnFalse",send:"memory stopOnFalse",sent:"memory stopOnFalse",done:"memory stopOnFalse",abort:"memory stopOnFalse",error:"memory stopOnFalse",progress:"memory stopOnFalse",success:"memory stopOnFalse"},i.Options={},i.createOrigin=function(t){throw new n("No implementation")},i.destroyOrigin=function(t){throw new n("no implementation")},i.prototype._path=void 0,i.prototype._opts=void 0,i.prototype._origin=void 0,i.prototype._reqData=void 0,i.prototype._resData=void 0,i.prototype.reqData=void 0,i.prototype.resData=void 0,i.prototype.emitter=void 0,i.prototype.sent=!1,i.prototype.aborted=!1,i.prototype.resolved=!1,i.prototype.rejected=!1,i.prototype.addListener=function(t,e){return this.emitter.addListener(this.mapping&&this.mapping[t]||t,e),this},i.prototype.removeListener=function(t,e){return this.emitter.removeListener(this.mapping&&this.mapping[t]||t,e),this},i.prototype.fireEventWith=function(t,e,o){return this.emitter.fireEventWith(t,this.mapping&&this.mapping[e]||e,o),this},i.prototype.fireEvent=function(e,o){return this.fireEventWith(this._opts.context||this,e,t.slice(arguments,1))},i.prototype.open=function(){if(!t.hasOwn(this,"_origin")){this.fireEvent("start");try{this._origin=this.constructor.createOrigin(this),this._origin=this._open()||this._origin}catch(t){this.reject(t)}}return this},i.prototype.send=function(e){if(!t.hasOwn(this,"_reqData")&&(this._reqData=this.reqConvert(this.reqData=e||this.reqData),this.open(),this._origin))try{this._send()}catch(t){this.reject(t)}return this},i.prototype.abort=function(e){if(t.hasOwn(this,"_origin")&&t.hasOwn(this,"_reqData")&&!1===this.resolved&&!1===this.rejected){e=e||new n("request abort.",this);try{this._abort(e),this.fireEvent("abort",this._origin)}catch(t){e=t}finally{this.reject(e)}}return this},i.prototype.reqConvert=function(t){throw new n("no implementation")},i.prototype.resConvert=function(t){throw new n("no implementation")},i.prototype._open=function(){throw new n("no implementation")},i.prototype._send=function(){throw new n("no implementation")},i.prototype._abort=function(){throw new n("no implementation")},i.prototype._handler=function(){throw new n("no implementation")},i.prototype.onStart=function(t){return this.addListener("start",t)},i.prototype.onOpen=function(t){return this.addListener("open",t)},i.prototype.onSend=function(t){return this.addListener("send",t)},i.prototype.onSent=function(t){return this.addListener("sent",t)},i.prototype.onDone=function(t){return this.addListener("done",t)},i.prototype.onProgress=function(t){return this.addListener("progress",t)},i.prototype.onSuccess=function(t){return this.addListener("success",t)},i.prototype.onError=function(t){return this.addListener("error",t)},i.prototype.onAbort=function(t){return this.addListener("abort",t)},i});
define("tnc/class/io/Connection",["tnc/core/utils","tnc/core/url","tnc/class/Deferred","tnc/class/EventEmitter","tnc/class/io/IOError","tnc/class/io/Request"],function(t,e,o,r,n,s){function i(){return!0}var p=function(o,n){var s,i=this;r.call(i,i.constructor.Events),i._opts=s=t.mix(n,i.constructor.Options),i._path=e.getFullUrl(o),s.isLocal=s.isLocal||e.isLocalProtocol(i._path),s.isCross=s.isCross||e.isCrossDomain(i._path),i._queue=[]};return t.mix(p.prototype,r.prototype),p.prototype.constructor=p,p.Events={start:"stopOnFalse",open:"stopOnFalse",send:"stopOnFalse",sent:"stopOnFalse",data:"stopOnFalse",close:"stopOnFalse",error:"stopOnFalse"},p.EventsMap={success:"data"},p.Options=t.extend(t.inherit(s.Options),{queue:!1}),p.Request=s,p.prototype._path=void 0,p.prototype._opts=void 0,p.prototype._origin=void 0,p.prototype._queue=void 0,p.prototype.open=function(){if(!t.hasOwn(this,"_origin")){var e=this._request();this._origin=e._origin}return this},p.prototype.send=function(e){var o=this,r=o._queue,n=o._request();return n.reqData=e,n.promise.always(function(){var e,r=o._queue,s=t.indexOf(n,r);s>-1&&r.splice(s,1),(e=r[0])&&e.send(e.reqData)}),r.push(n),1!==r.length&&o._opts.queue||n.send(n.reqData),n.promise},p.prototype.close=function(e,o){var r=this,n=r._origin;return e=e||new this.Error("connection close."),o=t.isFunction(o)?o:i,r._queue=t.grep(r._queue,function(t,r){return!0!==o(r)||(r.abort(e),!1)}),0===r._queue.length&&r._origin&&r.fireEvent("close",n),this},p.prototype.reqConvert=s.prototype.reqConvert,p.prototype.resConvert=s.prototype.resConvert,p.prototype._request=function(t){var e=new this.constructor.Request(this._path,this._opts,this,this.constructor.EventsMap);return e.reqConvert=this.reqConvert,e.resConvert=this.resConvert,this._origin&&(e._origin=this._origin),e},p.prototype.onOpen=function(t){return this.addListener("open",t)},p.prototype.onSend=function(t){return this.addListener("send",t)},p.prototype.onSent=function(t){return this.addListener("sent",t)},p.prototype.onData=function(t){return this.addListener("data",t)},p.prototype.onError=function(t){return this.addListener("error",t)},p.prototype.onAbort=function(t){return this.addListener("abort",t)},p.prototype.onProgress=function(t){return this.addListener("progress",t)},p.prototype.onClose=function(t){return this.addListener("close",t)},p});
define("tnc/class/io/AjaxRequest",["tnc/core/utils","tnc/class/Promise","tnc/class/io/IOError","tnc/class/io/Request"],function(e,t,r,o){function s(e){try{return new i.XMLHttpRequest}catch(t){if(!e)throw t}}function n(e){try{return new i.ActiveXObject("Microsoft.XMLHTTP")}catch(t){if(!e)throw t}}var i=function(){return this}(),a=s(!0)||n(!0),p=!(a&&"withCredentials"in a),d=!a,c=function(t,r){if(d)throw new Error("No support of AJAX.");var s=this;if(o.apply(s,arguments),p&&s._opts.isCross)throw new Error("No support of cross domain AJAX.");s._opts.method=(s._opts.method||s.constructor.Options.method).toUpperCase(),s.reqHeaders=e.mix(s._opts.headers,s.constructor.Headers),s.readyState=-1};return e.mix(c,o),c.prototype=e.inherit(o.prototype),c.prototype.constructor=c,c.MTime={},c.Etag={},c.Events=e.extend(e.inherit(o.Events),{}),c.Options=e.extend(e.inherit(o.Options),{method:"POST",user:"",pwd:"",headers:{},timeout:0,sync:!1,isLocal:!1,isCross:!1,ifModified:!1,withCredentials:!1}),c.Headers={"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},c.createOrigin=i.ActiveXObject?function(e){return!e._opts.isLocal&&/^(get|post|head|put|delete|options)$/i.test(e._opts.method)&&s(!0)||n(!1)}:function(e){return s(!1)},c.destroyOrigin=function(e){e._origin&&(e._origin.onreadystatechange=null)},c.prototype.reqHeaders=void 0,c.prototype.resHeaders=void 0,c.prototype._resHeaders=void 0,c.prototype.readyState=void 0,c.prototype.statusCode=void 0,c.prototype.statusText=void 0,c.prototype.getResponseHeader=function(e){return 4===this.readyState?this.resHeaders[e.toLowerCase()]||null:null},c.prototype.getAllResponseHeaders=function(){return this._resHeaders||""},c.prototype.setRequestHeader=function(e,t){return-1===this.readyState&&(this.reqHeaders[e]=t),this},c.prototype.overrideMimeType=function(e){return-1===this.readyState&&(this._opts.mimeType=e),this},c.prototype.reqConvert=function(t){return e.toQueryString(t)},c.prototype.resConvert=function(e,t){return e},c.prototype._open=function(){return this.fireEvent("open",this._origin),this._origin},c.prototype._send=function(){var t=this,r=!1,o=t._opts,s=t._path,n=t._reqData,i=t._origin;return i.onreadystatechange=function(){r=!0,t._handler()},/^(?:GET|HEAD)$/.test(o.method)&&(s+=(/\?/.test(t._path)?"&":"?")+e.toQueryString(n),n=null),o.user?i.open(o.method,s,!o.sync,o.user,o.pwd):i.open(o.method,s,!o.sync),o.isCross&&o.withCredentials&&(i.withCredentials=!0),o.mimeType&&i.overrideMimeType&&i.overrideMimeType(o.mimeType),o.isCross||o.headers["X-Requested-With"]||(o.headers["X-Requested-With"]="XMLHttpRequest"),o.ifModified&&(c.constructor.MTime[t._path]&&(o.headers["If-Modified-Since"]=c.constructor.MTime[t._path]),c.constructor.Etag[t._path]&&(o.headers["If-None-Match"]=c.constructor.Etag[t._path])),e.each(t.reqHeaders,function(e,t){"Content-Type"===e&&null==n||i.setRequestHeader(e,t)}),t.fireEvent("send",t.reqData),t.readyState=0,i.send(n),r||i.onreadystatechange(),i},c.prototype._abort=function(){return this._origin&&(this._origin.onreadystatechange=null,this._origin.abort()),this._origin},c.prototype._handler=function(){var e,o,s,n,i,a,p=this,d=p._opts,u=p._origin,h=p.readyState=u.readyState;if(p.sent||(!d.sync&&isFinite(d.timeout)&&d.timeout&&(p.timer=setTimeout(function(){p.abort(new r("request timeout.",p))},1e3*d.timeout)),p.fireEvent("sent",p.reqData)),4===h&&!p.rejected){clearTimeout(p.timer),p.resHeaders={},(p._resHeaders=u.getAllResponseHeaders()).replace(/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,function(e,t,r){p.resHeaders[t.toLowerCase()]=r});try{e=u.status}catch(e){}try{o=u.statusText}catch(e){}try{n=u.responseText}catch(e){}try{i=u.responseXML}catch(e){}e||!d.isLocal||d.isCross?1223===e&&(e=204):e=n?200:404,200<=e&&300>e||304===e?(d.ifModified&&((a=p.getResponseHeader("Last-Modified"))&&(c.constructor.MTime[p._path]=a),(a=p.getResponseHeader("etag"))&&(c.constructor.Etag[p._path]=a)),o=204===status||"HEAD"===d.method?"nocontent":304===e?"notmodified":"success",s=!0):o="error",p.statusCode=e,p.statusText=o,s?(p._resData=n,p.resData=p.resConvert(n,i&&i.documentElement&&i),p.resolve(t.resolved(p))):p.reject(new r("response error.",p))}},c});
define("tnc/class/io/AjaxConnection",["tnc/core/utils","tnc/class/io/IOError","tnc/class/io/Connection","tnc/class/io/AjaxRequest"],function(t,e,n,o){var r=function(t,e){n.apply(this,arguments)};return t.mix(r,n),r.prototype=t.inherit(n.prototype),r.prototype.constructor=r,r.Events=t.extend(t.inherit(n.Events),{}),r.EventsMap=t.extend(t.inherit(n.EventsMap),{done:"close"}),r.Headers=t.extend(t.inherit(o.Headers),{}),r.Options=t.mix(t.inherit(o.Options),n.Options),r.Request=o,r.prototype.open=function(){return this},r.prototype.reqConvert=o.prototype.reqConvert,r.prototype.resConvert=o.prototype.resConvert,r});
define("tnc/class/LinkedList",["tnc/class/LinkedListNode","tnc/class/LinkedListIterator"],function(t,e){var r=void 0,i=function(t){this.hash={};var e=0,r=t&&t.length;if("number"==typeof e&&!isNaN(e))for(;r>e;)this.push(t[e++]);return this};return i.prototype.hash=r,i.prototype.head=r,i.prototype.tail=r,i.prototype.getHead=function(){return this.head},i.prototype.getTail=function(){return this.tail},i.prototype.isEmpty=function(){return r===this.head&&r===this.tail},i.prototype.createNode=function(e){return new t(e)},i.prototype.iterator=function(t){return new e(this,t)},i.prototype.size=function(){for(var t=this.iterator(),e=0;r!==t.next();)e++;return e},i.prototype.item=function(t){if(isNaN(t=parseInt(t,10)))throw new TypeError;var e;if(0<=t)for(e=this.head;0<=--t;){if(r===e)throw new RangeError;e=e.next}else for(e=this.tail;0>++t;){if(r===e)throw new RangeError;e=e.prev}if(r===e)throw new RangeError;return e},i.prototype.indexOf=function(e){var i,n=this.iterator(),h=!1,o=0;for(e instanceof t&&(h=!0);r!==(i=n.next());){if(e===(h?i:i.data))return o;o++}return-1},i.prototype.lastIndexOf=function(e){var i,n=this.iterator(!1),h=!1,o=0,s=0;for(e instanceof t&&(h=!0);r!==(i=n.next());)s++,0===o?e===(h?i:i.data)&&o++:o++;return s-o},i.prototype.contains=function(t){return-1!==this.indexOf(t)},i.prototype.prevOf=function(e,i){if(i instanceof t){if(e instanceof t){if(e===i)return i}else if(e===i.data)return i;return i.prevOf(e)}return r===this.head?r:this.prevOf(e,this.head)},i.prototype.nextOf=function(e,i){if(i instanceof t){if(e instanceof t){if(e===i)return i}else if(e===i.data)return i;return i.nextOf(e)}return r===this.head?r:this.nextOf(e,this.head)},i.prototype.remove=function(t,e){var i=this.nextOf(t);return r!==i&&(i===this.head&&(this.head=i.next),i===this.tail&&(this.tail=i.prev),r!==i.prev&&(i.prev.next=i.next),r!==i.next&&(i.next.prev=i.prev),delete i.prev,delete i.next,delete this.hash[i.uuid],!0===e&&this.remove.apply(this,arguments)),this},i.prototype.unshift=function(t){if(1===arguments.length){var e=this.createNode(t),i=this.head;r===i?this.head=this.tail=e:(e.next=i,i.prev=e,this.head=e),this.hash[e.uuid]=e}else if(1<arguments.length)for(var n=arguments.length;0<n--;)this.unshift(arguments[n]);return this.head},i.prototype.push=function(t){if(1===arguments.length){var e=this.createNode(t),i=this.tail;r===i?this.tail=this.head=e:(e.prev=i,i.next=e,this.tail=e),this.hash[e.uuid]=e}else if(1<arguments.length)for(var n=0,h=arguments.length;n<h;)this.push(arguments[n++]);return this.tail},i.prototype.shift=function(){var t=this.head;return r!==t&&(t===this.tail?(delete this.head,delete this.tail):(this.head=t.next,delete t.next.prev),delete this.hash[t.uuid]),t},i.prototype.pop=function(){var t=this.tail;return r!==t&&(t===this.head?(delete this.head,delete this.tail):(this.tail=t.prev,delete t.prev.next),delete this.hash[t.uuid]),t},i.prototype.reverse=function(){if(r!==this.head&&this.tail!==this.head){var t,e,i=this.tail,n=this.head;for(this.tail=n,t=n.next;r!==t&&(r===(e=t.next)?delete t.prev.next:(t.prev.next=t.next,t.next.prev=t.prev),r!==n.prev&&(t.prev=n.prev),n.prev=t,t.next=n,this.head=n=t,i!==t);)t=e}return this},i.prototype.empty=function(){for(var t,e=this.head;r!==e&&(t=e.next,delete e.prev,delete e.next,e!==this.tail);)e=t;return delete this.head,delete this.tail,this.hash={},this},i.prototype.clone=function(){for(var t,e=new this.constructor,i=this.iterator();r!==(t=i.next());)e.push(t.clone());return e},i.prototype.forEach=function(t,e){var i,n=this.iterator();for(e=1<arguments.length?e:this;r!==(i=n.next());)t.call(e,i,this);return this},i.prototype.filter=function(t,e){var i,n=new this.constructor,h=this.iterator();for(e=1<arguments.length?e:this;r!==(i=h.next());)t.call(e,i,this)&&n.push(i.clone());return n},i.prototype.map=function(t,e){var i,n=new this.constructor,h=this.iterator();for(e=1<arguments.length?e:this;r!==(i=h.next());)n.push(n.createNode(t.call(e,i,this)));return n},i.prototype.toArray=function(){for(var t,e=this.iterator(),i=[];r!==(t=e.next());)i.push(t.getData());return i},i.prototype.toSource=function(){return this.valueOf()},i.prototype.toString=function(){return String(this.toArray())},i.prototype.valueOf=function(){return this.toArray()},i});
define("tnc/class/RemoteList",["tnc/core/utils","tnc/class/io/AjaxConnection","tnc/class/Deferred","tnc/class/Promise","tnc/class/LinkedList","tnc/class/RemoteListIterator"],function(o,t,n,e,r,s){var i=function(n,s){return this.hash={},this.opts=s=s||{},o.isArrayLike(n)?(this.conn={send:function(){return e.resolved(n)}},this.onRequest=function(o,t,n){return o},this.onResponse=function(){return[]},r.call(this,n),this):(this.conn=new t(n,s),o.isFunction(s.onError)&&(this.onError=s.onError),o.isFunction(s.onLoaded)&&(this.onLoaded=s.onLoaded),o.isFunction(s.onRequest)&&(this.onRequest=s.onRequest),o.isFunction(s.onResponse)&&(this.onResponse=s.onResponse),this)};return i.prototype=o.inherit(r.prototype),i.prototype.constructor=i,i.prototype.conn=void 0,i.prototype.headPromise=void 0,i.prototype.tailPromise=void 0,i.prototype.ERR_HIT_BOUNDARY=new Error("loading meets the boundary."),i.prototype.ERR_RESULTS_EMPTY=new Error("results is an empty array."),i.prototype.ERR_RESULTS_WRONG=new Error("results is not an array."),i.prototype.remoteIterator=function(o,t){return new s(this,o,t)},i.prototype.onRequest=function(o,t,n){return t},i.prototype.onResponse=function(o,t,n){return[]},i.prototype.onError=function(o,t,n){throw o},i.prototype.onLoaded=function(o,t,n){return o},i.prototype.load=function(t,r){var s,i=this,c=new n;return r=!0===r,s=!0===r?i.headPromise:i.tailPromise,e.thenable(s)?s:(t=i.onRequest(c.promise,t,r),s=c.promise===t?e.rejected(i.ERR_HIT_BOUNDARY):i.conn.send(t),!0===r?i.headPromise=s:i.tailPromise=s,s.always(function(){!0===r?i.headPromise=void 0:i.tailPromise=void 0}),s=s.then(function(o){return i.onResponse(o,t,r)}),s=s.then(function(t){if(o.isArrayLike(t)){var n=0,e=t.length;if(n===e)throw i.ERR_RESULTS_EMPTY;if(!0===r)for(;0<e;)i.unshift(t[--e]);else for(;e>n;)i.push(t[n++]);return t}throw i.ERR_RESULTS_WRONG}),s=s.then(function(o){return i.onLoaded(o,t,r)},function(o){return i.onError(o,t,r)}),s.then(c.resolve,c.reject),s)},i.prototype.clone=function(){for(var o,t=new this.constructor(this.conn._path,this.conn._opts),n=this.iterator();void 0!==(o=n.next());)t.push(o.clone());return t},i});
define("tnc/gallery/Source",["tnc/core/utils","tnc/class/EventEmitter","tnc/class/RemoteList"],function(t,e,o){var r=function(r,p){var n=this;o.apply(n,arguments),e.call(n),p=p||{},n.headParams=t.mix(p.headParams||{},p.params),n.tailParams=t.mix(p.tailParams||{},p.params)};return r.prototype=t.inherit(o.prototype),t.mix(r.prototype,e.prototype),r.prototype.constructor=r,delete r.prototype.init,delete r.prototype.$super,r.prototype.load=function(t,e){return o.prototype.load.apply(this,0===arguments.length?[this.tailParams,!1]:arguments)},r.prototype.onError=function(t){this.fireEvent("error",t),o.prototype.onError.apply(this,arguments)},r.prototype.onRequest=function(t,e,r){return this.fireEvent("request",t,e,r),o.prototype.onRequest.apply(this,arguments)},r.prototype.onResponse=function(t){return this.fireEvent("response",t),o.prototype.onResponse.apply(this,arguments)},r.prototype.onLoaded=function(t,e,r){return this.fireEvent("loaded",t,e,r),o.prototype.onLoaded.apply(this,arguments)},r});
define("tnc/gallery/View",["tnc/core/utils","tnc/core/browser","tnc/class/LinkedListNode","tnc/class/RemoteListIterator","tnc/class/EventEmitter","tnc/class/view/Touchable","tnc/class/Deferred","tnc/class/Promise","tnc/dom/main","tnc/gallery/Source"],function(e,t,i,o,n,r,s,a,c,p){function l(){return!0}var d=function(i,r,s){if(!(i instanceof p))throw new Error("source is in wrong type.");var a=this;n.call(a),o.call(a,i),a.config=e.mix(s,a.config),a.eventHandler=function(){d.prototype.eventHandler.apply(a,arguments)},a.wrapper=c(r).get(0),a.payload=c(a.wrapper).find(".tnc-gallery-payload").get(0),i.addListener("prev",function(){a.prev()}),i.addListener("next",function(){a.next()}),a.config.vertical?c(a.wrapper).addClass("vertical"):c(a.wrapper).removeClass("vertical"),c(a.payload).on([t.EV_TOUCH_DOWN,t.EV_TOUCH_MOVE,t.EV_TOUCH_UP,t.EV_TOUCH_OUT,t.EV_TOUCH_CANCEL].join(" "),a.eventHandler)};return d.prototype=e.inherit(o.prototype),e.mix(d.prototype,n.prototype),e.mix(d.prototype,r.prototype),d.prototype.constructor=d,delete d.prototype.init,delete d.prototype.$super,d.prototype.config={draggable:!1,rotatable:!1,scalable:!1,swipeable:!1,swipeMaxDistance:150,swipeMinDistance:60,swipeMinDuration:200,swipingDuration:.3,zoomIn:.5,zoomOut:10,vertical:!1,capacity:1},d.prototype.index=1,d.prototype.items=void 0,d.prototype.init=function(t,i){return i=e.isBoolean(t)&&t,t=e.isFunction(t)?t:l,this.cursor=void 0,this.setPayloadIndex(this.index=1),this.capacity(this.config.capacity,t,i)},d.prototype.capacity=function(t,i,o){if(void 0===t)return t=this.config.capacity,isFinite(t)?Math.max(1,t):1;var n=this,r=n.config.capacity;if(n.config.capacity=t,t=n.capacity(),n.config.capacity=t,r===t&&!i)return a.resolved(n.cursor);i&&(c(n.payload).empty(),n.items=[]);var p=new s,d=c(n.payload).children(),f=t+2-d.size(),u=n.index-1;return 0<f?(n.items=n.items.concat(f=c.parseHTML(new Array(f+1).join('<div class="tnc-gallery-item loading"></div>'))),e.each(n.items,function(e,i){n.setItemOffset(i,t,u+e),n.setItemSize(i,t)}),c(n.payload).append(f),i=e.isFunction(i)?i:l,a.when(n.cursor||n.next(!0),function(e){!0===i(e)?!0===o?p.resolve(e):n.moveToNode(e).then(function(){p.resolve(e)},p.reject):n.next(!0,e).then(arguments.callee,p.reject)},p.reject)):0>f?(c(n.items.splice(n.items.length+f,-f)).remove(),e.each(n.items,function(e,i){n.setItemOffset(i,t,u+e),n.setItemSize(i,t)}),n.setPayloadIndex(n.index),p.resolve(n.cursor)):p.resolve(n.cursor),n.fireEvent("capacity",r,t),p.promise},d.prototype.canRender=function(e){return!0},d.prototype.generate=function(e,t){},d.prototype.fillItem=function(e,t){this.fireEvent("update",e,t),c(e).empty(),t?(c(e).attr("data-uuid",t.uuid),c(e).append(this.generate(t,e)),c(e).removeClass("loading empty")):(c(e).removeAttr("data-uuid"),c(e).removeClass("loading"),c(e).addClass("empty"))},d.prototype.setPayloadOffset=function(e,t){!0===t?c(this.payload).addClass("animate"):c(this.payload).removeClass("animate"),this.payload.style[this.config.vertical?"top":"left"]=e},d.prototype.setPayloadIndex=function(e,t){this.setPayloadOffset(Number((-(this.index=e)*(100/this.capacity())).toFixed(2))+"%",t)},d.prototype.setItemOffset=function(e,t,i){e.style[this.config.vertical?"top":"left"]=Number(100/t*i).toFixed(2)+"%"},d.prototype.setItemSize=function(e,t){e.style[this.config.vertical?"height":"width"]=Number(100/t).toFixed(2)+"%"},d.prototype.moveToNode=function(t,o){function n(e){m.canRender(e)&&v.push(e),x>v.length?m.next(!0,e).then(n,r):I.resolve(v)}function r(e){e&&e===m.source.ERR_HIT_BOUNDARY&&v.length?m.prev(!0,v[0]).then(p,l):I.reject(e)}function p(e){m.canRender(e)&&v.unshift(e),x>v.length?m.prev(!0,e).then(p,l):I.resolve(v)}function l(e){e&&e!==m.source.ERR_HIT_BOUNDARY?I.reject(e):I.resolve(v)}var d=a.thenable(t);if(!(d||t instanceof i))return a.rejected(void 0);var f,u,y,h,m=this,v=[],g=[].concat(m.items),x=m.capacity(),I=new s,w=d?t:a.resolved(t);return o=d&&isFinite(o)?Number(o):0,w.then(n,I.reject),0===o?(y=g[1],h=m.index):0>o?(u=m.items.pop(),f=m.items.pop(),y=g[0],h=--m.index):(u=m.items.shift(),f=m.items.shift(),y=g[g.length-1],h=++m.index),c(y).addClass("loading"),m.setPayloadIndex(h,!0),0>o?(m.setItemOffset(u,x,h-1),m.items.push(f),m.items.unshift(u)):0<o&&(m.setItemOffset(u,x,h+x),m.items.unshift(f),m.items.push(u)),w=I.promise.then(function(t){if(0!==o&&m.cursor===t[0])throw void 0;return e.each(m.items.slice(1,-1),function(e,i){m.fillItem(i,t[e])}),0===o?m.fireEvent("to",m.items[1],t[0]):0>o?m.fireEvent("prev",m.items[1],t[0]):m.fireEvent("next",m.items[1],t[0]),m.cursor=t[0]},function(e){throw e}),0!==o&&w.then(null,function(){m.items=g,0>o?(m.setItemOffset(u,x,h+x+1),m.setPayloadIndex(++m.index,!0)):0<o&&(m.setItemOffset(u,x,h-2),m.setPayloadIndex(--m.index,!0))}),w.then(function(){f&&m.fillItem(f,void 0),u&&m.fillItem(u,void 0)},function(){c(y).removeClass("loading")}),w},d.prototype.prev=function(e,t){var i,o,n=this;return i=n.source.remoteIterator(n.reverse,t||n.cursor),o=i.prev(n.source.headParams),e?o:this.moveToNode(o,-1)},d.prototype.next=function(e,t){var i,o,n=this;return i=n.source.remoteIterator(n.reverse,t||n.cursor),o=i.next(n.source.tailParams),e?o:this.moveToNode(o,1)},d.prototype.onSwipeStart=function(){this.payloadOffset=this.payload[this.config.vertical?"offsetTop":"offsetLeft"]},d.prototype.onSwipeMove=function(e,t,i){this.setPayloadOffset(this.payloadOffset+(this.config.vertical?i.deltaY:i.deltaX)+"px",!1)},d.prototype.onSwipeEnd=function(e,t,i){switch(delete this.payloadOffset,i.direction){case this.config.vertical?r.SWIPE_UP:r.SWIPE_LEFT:this.next();break;case this.config.vertical?r.SWIPE_DOWN:r.SWIPE_RIGHT:this.prev();break;default:this.setPayloadIndex(this.index,!0)}},d});
define("app/tpl/gallery/media",["app/tpl/general"],function(a){return a.set("gallery/media/box",'<div class="gallery-box" id="#{box-id}" style="display: none;"><div class="gallery-wrapper"><div class="gallery-main-wrapper"><div class="gallery-preview-wrapper"><div class="tnc-gallery-view no-select"><div class="tnc-gallery-payload"></div></div><button type="button" class="btn-prev fa fa-3x fa-chevron-left"><span class="sr-only">Previous</span></button><button type="button" class="btn-next fa fa-3x fa-chevron-right"><span class="sr-only">Next</span></button></div><div class="gallery-thumbs-wrapper"><div class="tnc-gallery-view no-select"><div class="tnc-gallery-payload"></div></div><button type="button" class="btn-thumbs fa fa-3x fa-plus"><span class="sr-only">Toggle thumbnails</span></button><button type="button" class="btn-prev fa fa-3x fa-chevron-left"><span class="sr-only">Previous</span></button><button type="button" class="btn-next fa fa-3x fa-chevron-right"><span class="sr-only">Next</span></button></div></div><div class="gallery-side-wrapper"></div></div><button type="button" class="btn-close fa fa-2x fa-close"><span class="sr-only">#I18N{A_CLOSE}</span></button></div>'),a.set("gallery/media/preview/photo",'<div class="gallery-permission" data-value="#DEEP{reason.name}"><div class="content">#DEEP{reason.value}</div></div><div class="tnc-gallery-canvas">#IMAGE{img(source gender alt filter)}</div>'),a.set("gallery/media/preview/video",'<div class="gallery-permission" data-value="#DEEP{reason.name}"><div class="content">#DEEP{reason.value}</div></div><div class="tnc-gallery-canvas">#PLAYER{source preview gender}</div>'),a.set("gallery/media/thumbnail/photo","#IMAGE{div(preview gender alt)}"),a.set("gallery/media/thumbnail/video","#VIDEO{div(preview gender)}"),a});
define("app/view/gallery",["lib/jQuery","app/view/ViewError","tnc/gallery/View","tnc/gallery/Source","tnc/class/Promise","tnc/core/utils","tnc/core/browser","app/sys/config","app/view/media","app/view/scroll","app/tpl/gallery/media","exports"],function(e,a,t,r,i,n,s,o,l,d,c,u){function f(){v.hasClass("show-thumbs")&&w.is(":visible")&&(delete b.cursor,b.capacity(Math.floor(b.payload.offsetWidth/120),function(){return!0},!0).then(function(){u.moveToNode(y.cursor)}))}var h=new r([]),p=e(window),v=e(c.fill("#TPL{gallery/media/box}",{"box-id":"media-box"})),g=v.find(".gallery-side-wrapper");e("body, #df-page").last().append("<div>\x3c!-- against ad blocker --\x3e</div>"),e("body, #df-page").last().append(v.get(0)),v.on("gallery:update",function(e,a,t){t&&n.hasOwn(h.hash,a)&&n.extend(u.dataOf(h.hash[a]),t)}),v.on("click",function(e){this===e.target&&u.hide()});var m=v.find(".gallery-preview-wrapper"),y=new t(h,m.get(0),{capacity:1,swipeable:!0});y.generate=function(a){var t=o.user(),r=u.dataOf(a),i=v.hasClass("no-detail"),n=u.isAd(a);if(v.data("current-uuid",a.uuid),v.toggleClass("at-head",a===h.head),v.toggleClass("at-tail",a===h.tail),v.toggleClass("no-detail",n||!r.detail||!t),i!==v.hasClass("no-detail")&&f(),t&&r.detail?(clearTimeout(g.data("timer")),g.html(c.get("ico/load")),g.data("timer",setTimeout(function(){y.at(a)&&e.get(r.detail,function(e){if(y.at(a)){g.html(e);var t=v.hasClass("no-detail");v.toggleClass("no-detail",g.is(":empty")),t!==v.hasClass("no-detail")&&f()}},"text")},200))):g.empty(),n)return a.data.content;var s,l=e(a.data);return(l.hasClass("df-image")||l.hasClass("df-cms-image")||"df-image"===r.type||"df-cms-image"===r.type)&&(s=c.fill("#TPL{gallery/media/preview/photo}",r)),(l.hasClass("df-video")||"df-video"===r.type)&&(s=c.fill("#TPL{gallery/media/preview/video}",r)),"direct"===r.filter&&0<r.source.indexOf("check")&&(s=s.replace(/tnc-gallery-canvas/,"$& watermark")),r.is_private&&(s=s.replace(/tnc-gallery-canvas/,"$& is-private")),s};var w=v.find(".gallery-thumbs-wrapper"),b=new t(h,w.get(0),{swipeable:!0});return b.generate=function(a){var t,r=u.dataOf(a),i=e(a.data);return(i.hasClass("df-image")||i.hasClass("df-cms-image")||"df-image"===r.type||"df-cms-image"===r.type)&&(t=c.fill("#TPL{gallery/media/thumbnail/photo}",r)),(i.hasClass("df-video")||"df-video"===r.type)&&(t=c.fill("#TPL{gallery/media/thumbnail/video}",r)),r.is_private&&(t=t.replace(/\bdf-preview\b/,"$& is-private")),t},b.canRender=function(e){return!u.isAd(e)},p.on("pjax:start.gallery",function(){u.hide()}),v.on("click","button",function(){var a=e(this);switch(!0){case a.hasClass("btn-next"):u.next(0===a.closest(".gallery-preview-wrapper").size());break;case a.hasClass("btn-prev"):u.prev(0===a.closest(".gallery-preview-wrapper").size());break;case a.hasClass("btn-close"):u.hide();break;case a.hasClass("btn-thumbs"):v.toggleClass("show-thumbs"),v.hasClass("show-thumbs")?(p.on("resize.gallery",f),f()):p.off("resize.gallery",f)}}),w.on("click",".tnc-gallery-item",function(){var e=h.hash[this.getAttribute("data-uuid")];e&&u.show(e.data)}),g.on("passed.rating",".df-com-rating",function(){u.next()}),g.on("passed.thumb",".df-com-thumb",function(){u.next()}),e(document).on("keydown",function(a){if(!(a.altKey||a.ctrlKey||a.metaKey||a.shiftKey)&&!e(a.target).is(":input")&&v.is(":visible"))switch(a.keyCode){case s.KEY.LEFT:u.prev();break;case s.KEY.RIGHT:u.next();break;case s.KEY.ESCAPE:u.hide()}}).on("click",".df-preview",function(e){e.isDefaultPrevented()||e.isPropagationStopped()||u.show(this)}),u.hide=function(){p.off("resize.gallery",f),v.hide().removeClass("show-thumbs").find("iframe").remove(),d.free(document.body,"gallery")},u.show=function(a){var t,i,n=e(a);if(!e.isPlainObject(a)){if(!n.attr("data-source")&&!n.attr("data-uuid"))return;if(1>n.closest("body").size())return;if(0<n.closest(".tnc-gallery-view").size())return;if(0<n.parent().closest("a").size())return}if(d.lock(document.body,"gallery"),v.show(),t=h.nextOf(a))u.moveToNode(t);else{var s=n.data("gallery-source");s instanceof r?t=(h=s).hash[n.attr("data-uuid")]:(i=n.closest("ul"),i=i.size()?i.find(".df-preview"):n,h=new r(i),t=h.nextOf(a)),y.source=b.source=h,v.toggleClass("no-loop",h.head===h.tail),b.init(!0),y.init(function(e){return e===t})}},u.prev=function(e){function a(e){return--i?b.prev(!0,r=e).then(a,t):e}function t(e){if(r&&h.ERR_HIT_BOUNDARY===e)return r;throw e}if(e){var r,i=b.capacity();return b.moveToNode(b.prev(!0).then(a,t),-1)}return u.moveToNode(y.prev(!0).then(function(e){return e},function(e){if(h.ERR_HIT_BOUNDARY===e)return h.tail;throw e}),-1)},u.next=function(e){function a(e){return--i?b.next(!0,r=e).then(a,t):e}function t(e){if(r&&h.ERR_HIT_BOUNDARY===e)return r;throw e}if(e){var r,i=b.capacity();return b.moveToNode(b.next(!0).then(a,t),1)}return u.moveToNode(y.next(!0).then(function(e){return e},function(e){if(h.ERR_HIT_BOUNDARY===e)return h.head;throw e}),1)},u.moveToNode=function(e,a){var t=i.resolve(e);return t.then(function(e){if(e!==y.cursor){var t=null==a?y.cursor?e.prevOf(y.cursor)?1:-1:0:a;y.moveToNode(i.resolved(e),t)}}),v.hasClass("show-thumbs")&&w.is(":visible")?(t.then(function(e){function a(e){return--n?b.prev(!0,r=e).then(a,t):e}function t(e){if(r&&h.ERR_HIT_BOUNDARY===e)return r;throw e}var r=e,n=Math.floor(b.capacity()/2);b.prev(!0,r).then(a,t).then(function(e){if(e!==b.cursor){var a=b.cursor?e.prevOf(b.cursor)?1:-1:0;b.moveToNode(i.resolved(e),a)}})}),t):t},u.dataOf=function(a){if(u.isAd(a))return{};var t=e(a.data);if(!t.hasClass("df-preview"))return a.data;if(t.data("gallery-data"))return t.data("gallery-data");var r={mid:t.attr("data-mid"),oid:t.attr("data-oid"),gender:t.attr("data-gender"),detail:t.attr("data-detail"),filter:"1"===t.attr("data-direct")?"direct":300,source:t.attr("data-source"),preview:t.attr("data-preview"),is_private:t.hasClass("is-private")};if(r.oid&&r.gender){var i=t.hasClass("df-video"),s=l.reason(i?"video":"image",i?r.preview:r.source,r.gender,r.oid);s&&(r.reason={name:s,value:n.i18n(s)})}return t.data("gallery-data",r),r},u.isAd=function(e){return!!e.data&&Boolean(e.data.adid)},u});
define("tnc/core/convert",["tnc/core/utils"],function(n,e){function r(n){return n}var t={escape:function(e){return n.escapeHTML(e)},lines:function(e,r){r=Object(r).valueOf();var t=!0===r||!0===r.merge,c=r.code||r;return(""+e).replace(t?/(\r?\n){1,}|\r{1,}/g:/\r?\n|\r/g,n.isString(c)?c:"<br />")},slice:function(n,e){return(""+n).slice(0,e)},strip:function(n,e){return(""+n).replace(e,"")},"num.max":function(n,e){return n=Math.max(0,parseInt(n,10)||0),n?e<n?e+"+":""+n:"0"},"num.tel":function(n){return(""+n).replace(/\d[\d\-]{3,}\d/,'<a href="tel:$&">$&</a>')},content:function(e){return(""+e).replace(/#\{T_BLACK_WORD\}/g,n.i18n("T_BLACK_WORD"))},preview:function(n){return""+n}};return e=function(e,r){return null==e&&""==""+e?"":(n.each(r,function(r,c){e=n.call(t[c.name],e,c.param)}),e)},e.get=function(e){return n.hasOwn(t,e)?t[e]:r},e.set=function(e,r){n.isFunction(r)&&(t[e]=r)},e});
define("tnc/core/time",["exports","tnc/core/utils"],function(_,T){return _.diff=function(_){var e,M,a,E,t,i=T.timestamp(),n=new Date(_.from),I=new Date(_.to),r=_.i18n&&{i18n:_.i18n};switch(isNaN(n)&&(n=i),isNaN(I)&&(I=i),e=n-I,t=isFinite(_.min)&&_.min&&Math.abs(_.min)>=Math.abs(e)?T.i18n(e>0?"T_TIME_PAST_MIN":"T_TIME_NEXT_MIN",r):isFinite(_.max)&&_.max&&Math.abs(_.max)<=Math.abs(e)?T.i18n(e>0?"T_TIME_PAST_MAX":"T_TIME_NEXT_MAX",r):T.i18n(e>0?"T_TIME_PAST":"T_TIME_NEXT",r),e=Math.abs(e),60>(a=Math.floor(e/(M=1e3)))||60>(a=Math.floor(e/(M=6e4)))||24>(a=Math.floor(e/(M=36e5)))||7>(a=Math.floor(e/(M=864e5)))||4>(a=Math.floor(e/(M=6048e5)))||12>(a=Math.floor(e/(M=2592e6)))||(a=Math.floor(e/(M=31536e6))),M){case 1e3:E=T.i18n(a>1?"T_TIME_P_SECOND":"T_TIME_S_SECOND",r);break;case 6e4:E=T.i18n(a>1?"T_TIME_P_MINUTE":"T_TIME_S_MINUTE",r);break;case 36e5:E=T.i18n(a>1?"T_TIME_P_HOUR":"T_TIME_S_HOUR",r);break;case 864e5:E=T.i18n(a>1?"T_TIME_P_DAY":"T_TIME_S_DAY",r);break;case 6048e5:E=T.i18n(a>1?"T_TIME_P_WEEK":"T_TIME_S_WEEK",r);break;case 2592e6:E=T.i18n(a>1?"T_TIME_P_MONTH":"T_TIME_S_MONTH",r);break;case 31536e6:E=T.i18n(a>1?"T_TIME_P_YEAR":"T_TIME_S_YEAR",r)}return T.template(t,{TIME:T.template(E,{NUM:a})})},_});
define("app/view/time",["lib/jQuery","tnc/core/utils","tnc/core/convert","tnc/core/time","app/sys/config","app/sys/timer","exports"],function(t,e,i,n,o,r,u){function a(t){return 10>t?"0"+t:String(t)}var f;return u.update=function(i){i||(r.clearTimeout(f),f=r.setTimeout(u.update,6e4));var a=t(i||"body").find("span.time");if(a.size()){var c=e.mix({form:e.timestamp()},o.get("time.diff"));a.each(function(){c.to=parseInt(this.getAttribute("data-time"),10),c.to&&(10===String(c.to).length&&(c.to*=1e3),this.innerHTML=n.diff(c))})}},i.set("time.diff",function(t,i){return n.diff(e.mix({to:t,form:i},o.get("time.diff")))}),i.set("time.real",function(t,i){var n=new Date(t);return e.i18n(i||"T_TIME_REAL",{YEAR:n.getFullYear(),MONTH:a(n.getMonth()+1),DAY:a(n.getDate()),HOUR:a(n.getHours()),MINUTE:a(n.getMinutes())})}),t(document).ready(function(){u.update()}).on("time:update",function(t){u.update(t.target)}),t(window).on("pjax:done",function(){u.update()}),u});
define("app/commons.normal",["lib/jQuery","lib/browser/rAF","tnc/core/utils","tnc/core/browser","tnc/view/input/cursor","app/view/screen","app/view/jobs","app/view/job/notice","app/view/job/collapse","app/view/job/modals","app/view/job/ajax","app/view/job/animate","app/view/job/clipboard","app/view/job/display","app/view/job/dropdown","app/view/job/attribute","app/view/job/manipulation","app/view/job/native","app/view/job/rating","app/view/job/suggest","app/view/job/tab","app/view/job/validators","app/view/job/input-remain","app/view/job/set-value","app/view/geo/location","app/view/avatar","app/view/gallery","app/view/time"],function(e,t,a,o,n,i,s,r){var l=e(window),d=e(document),c=e("body"),p=e("#df-page");d.ready(function(){e("html").addClass("page-ready")}),d.on("keydown",function(t){8!==t.keyCode||e.find.matchesSelector(t.target,':input, object, embed, [contenteditable="true"]')||t.preventDefault()}),d.on("click.prevent",'a[href="#"]',function(e){e.preventDefault()}),d.on("passed.ajax",'form[data-jobs~="validate"]',function(t){this===t.target&&e(".has-error, .has-success",this).removeClass("has-error has-success")}),d.on("failed.ajax",":checkbox, :radio",function(){this.checked=!this.checked}),d.on("click.df-menu",".df-touch .df-menu > a",function(){var t=e(this);t.attr("aria-expanded",t.parent().toggleClass("active").hasClass("active")),t.parent().siblings(".df-menu").removeClass("active").find("> a").attr("aria-expanded",!1)}),d.on("click.df-menu",".df-mouse .df-menu > ul",function(){var a=e(this).attr("aria-expanded",!1).css("display","none");t().then(t).then(function(){a.css("display","")})}),d.on("click.df-menu",".df-touch .df-menu > ul",function(){e(this).attr("aria-expanded",!1).removeClass("active")}),d.on("click.bs-tabs",".df-mouse .nav-justified",function(t){e(t.target).closest(".nav-tabs > li").size()||e(this).toggleClass("nav-expend")}),d.on("t-tap.bs-tabs",".df-touch .nav-justified",function(t){e(t.target).closest(".nav-tabs > li").size()||e(this).toggleClass("nav-expend")}),d.on("failed.tab passed.tab",".nav-justified",function(){e(this).removeClass("nav-expend")}),c.on("submit","form.sending",function(e){e.stopPropagation(),e.preventDefault()}),l.on("scroll.scroll-redirect",function(e){p.trigger("page-scroll",[e])}),c.on("click",'.ajax.pagination a[href][href!="#"]',function(t){var a=e(this).closest(".ajax-page, .modal-body");a.size()&&(t.preventDefault(),a.load(this.href,function(){a.closest(".modal").size()||e("html, body").animate({scrollTop:0},600),a.trigger("time:update")}))}),c.on("pjax:done",function(){window.google&&window.google.maps&&window.google.maps.event.trigger(window,"resize",{})}),l.on("scroll.top",function(){c.hasClass("df-mouse")&&(300<l.scrollTop()?e("#go-to-top").fadeIn():e("#go-to-top").fadeOut())}),d.on("click.top",'a[href="#page-top"]',function(){return e("html, body").animate({scrollTop:0},600),!1}),l.on("unhandledrejection",function(e){e.isDefaultPrevented()||e.preventDefault(),!1!==e.originalEvent.reason&&a.error("Unhandled rejection: ",e.originalEvent.reason)}),s.bind("settings","click",":not(form)",function(e){return i.match(s.option(this,null,"settings","breakpoint","sm"))?s.trigger(this,e.type,"modal"):s.trigger(this,e.type,"collapse")}),!1===navigator.cookieEnabled&&r.show(a.i18n("T_YOU_HAVE_COOKIE_DISABLED_IN_YOUR_BROWSER"),{type:"warning",target:"#no-support",dismiss:!1,timeout:0}),c.on("focus.comment",".status-input-container textarea",function(){var t=e(this);e(this).autosize(),t.on({mouseup:n.handleEvent,keydown:n.handleEvent,keyup:function(e){var t=this;setTimeout(function(){n.handleEvent.call(t,e)},0)}})}),c.on("modal:show",".modal",function(){this.getAttribute("data-ga")&&gtag("event","page_view",{page_path:this.getAttribute("data-ga")})}),e(document).on("click",'[data-jobs~="modal"][href^="#modal-"]',function(){var t=e(this);switch(t.attr("href")){case"#modal-reg":return void t.attr("href","#modal-signup");case"#modal-login":return void t.attr("href","#modal-signin")}}),o.fixedPosition&&o.overflowScroll&&(/iPhone|iPod/.test(navigator.platform)&&e("#df-header").find(".df-header-sub").slice(0,-1).prev("a").removeAttr("aria-haspopup aria-expanded"),c.on("click.df-header",".df-header .df-mobile-menu-logout-icon",function(e){c.addClass("df-slide-right df-slide")}),c.on("click.df-header",".df-mobile-menu-logout button.close",function(e){c.removeClass("df-slide-right df-slide"),e.preventDefault()}),c.on("click.df-header",".df-mobile-menu-logout .df-header-nav > li > a",function(t){t.preventDefault(),e(this).closest("li").toggleClass("in-active").siblings().removeClass("in-active")}))});
define("app/view/guest-gdpr",["lib/jQuery","app/view/job/validation"],function(e,n){e(document).on("change.gdpr",'[name="regGender"]',function(){var n=e(this).closest("form"),i=n.closest(".pane-signup"),o=n.find(".box-gdpr"),t=this.value;i.find(".box-gdpr").not(o.get(0)).hide(),e.when().then(function(){o.toggle(!!t).toggleClass("is-pair","p"===t)})})});
define("app/view/cms/map-edit",["lib/jQuery","tnc/class/Promise","tnc/class/Deferred"],function(e,t,o){var n=function(t,o){var n=this,s={mapTypeId:google.maps.MapTypeId.ROADMAP,draggable:!0,scrollwheel:!1,zoomControl:!0,mapTypeControl:!1,streetViewControl:!1,fullscreenControl:!1,zoom:15},a=e.extend(s,o);n.map=new google.maps.Map(e(t.uiMap).get(0),a),n.info=new google.maps.InfoWindow,n.marker=new google.maps.Marker({map:n.map,draggable:!0}),n.opts=t,google.maps.event.addListener(n.marker,"dragstart",function(){n.info.close()}),google.maps.event.addListener(n.marker,"dragend",function(e){n.onMarkerMoved(e.latLng)}),google.maps.event.addListener(n.marker,"click",function(e){n.info.setContent(e.latLng.lat()+", "+e.latLng.lng()),n.info.open(n.map,n.marker)}),t.latitude&&t.longitude?n.setCenter(new google.maps.LatLng(t.latitude,t.longitude)):n.findAddress(t.address),google.maps.event.trigger(n.map,"resize")};return n.addCondition=function(t,o){var n=e(o),s=n.prop("disabled")?"":n.val();s&&t.push(s)},n.prototype.findAddress=function(e,t){var n=new o,s=t?t instanceof google.maps.LatLng?t:new google.maps.LatLng(t):null;if(/\S/.test(e)){(new google.maps.Geocoder).geocode({address:e},function(e,t){t===google.maps.GeocoderStatus.OK?n.resolve(e[0].geometry.location):s?n.resolve(s):n.reject()})}else s?n.resolved(s):n.reject();var a=this;return n.promise.then(function(e){a.setCenter(e),a.setResult(e)}),n.promise},n.prototype.updatePoint=function(e){var t=e?e instanceof google.maps.LatLng?e:new google.maps.LatLng(e):null;this.setCenter(t),this.setResult(t)},n.prototype.update=function(e,t){if(e&&/\S/.test(e))return this.findAddress(e,t);var o=[];return n.addCondition(o,this.opts.uiCountry),n.addCondition(o,this.opts.uiLocation),n.addCondition(o,this.opts.uiAddress),this.findAddress(o.join(","),t)},n.prototype.setResult=function(t){e(this.opts.uiLat).val(t.lat()),e(this.opts.uiLng).val(t.lng()),e(this.opts.uiMap).trigger("map-update",t)},n.prototype.setCenter=function(e){if(this.map.setCenter(e),this.marker.setPosition(e),this.marker.anchorPoint)this.onMapUpdated(e);else{var t=this;this.marker.set=function(o){google.maps.Marker.prototype.set.apply(this,arguments),"anchorPoint"===o&&(t.onMapUpdated(e),delete this.set)}}},n.prototype.onMapUpdated=function(e){!1!==this.opts.canDragMarker?this.info.close():this.opts.txtWarning&&(this.info.setContent(this.opts.txtWarning),this.info.open(this.map,this.marker))},n.prototype.onMarkerMoved=function(e){this.setResult(e)},n});
define("lib/Markdown",["tnc/core/utils","tnc/core/convert","app/sys/config","/lib/markdown.js-0.5.0/markdown.min.js"],function(n,r,i){function t(r){return n.isString(r)?r:n.isArray(r)?e(r,this):r}function e(r,i){return"a"!==r[0]||r[1]&&a(r[1].href,i.domains)?"img"!==r[0]||r[1]&&a(r[1].src,i.domains)?n.map(r,t,i,!0):"":r[2]||""}function a(r,i){var t=(""+r).match(/^((https?:)?\/\/|\/)\w/i);if(!t)return!1;var e=r.slice(t[0].length-1).split("/").shift();return!i||-1!==n.indexOf(e,i)}if(void 0===window.markdown)throw new Error("Markdown load failed!");var o=window.markdown;return o.Markdown.prototype.processInline=function(n){var r=this.dialect.inline.__call__.call(this,String(n));return n.trailing?r.concat(n.trailing.split(/\n/g).slice(1).map(function(){return["linebreak"]})):r},r.set("markdown",function(r,e){var a=r.replace(/\r\n|\r/g,"\n").replace(/(\S+)[^\S\n]*\n/gm,"$1  \n"),c=o.toHTMLTree(a);return c=n.map(c,t,e||i.get("markdown",{}),!0),o.toHTML(c)}),o});
define("lib/jQuery-At",["lib/jQuery"],function(e){return require(["css!/lib/jquery-atwho-1.5.4/jquery.atwho.min.css","/lib/jquery-caret-0.3.1/jquery.caret.min.js","/lib/jquery-atwho-1.5.4/jquery.atwho.min.js"],function(r){return r.setAttribute("data-type","main"),e})});
define("app/view/emojis",["exports","lib/jQuery","tnc/core/utils","tnc/core/convert","app/sys/config","app/tpl/general","app/data/emojis/v2","app/data/emojis/v3","lib/jQuery-At"],function(n,t,e,i,r,a,o,c){var u=/\*|\(|\)|\[|\]|\.|\+|\||\?|\^|\$|\\|\//g,s=new RegExp(""),d={},l={},f=[];n.data=function(){return c},n.cats=function(){return e.map(n.data(),function(n,t){return t.name})},n.html=function(n){return e.hasOwn(l,n)?l[n]:""},n.list=function(t,i){return e.map(t,i?function(t,e){return"<span>"+n.html(e.code)+"</span>"}:function(t,e){return n.html(e.code)}).join("")},n.group=function(t,e){var i=n.data();return i&&(i=i[t])?'<dl class="df-emojis-list">'+(e&&i.name?"<dt>"+i.name+"</dt>":"")+"<dd>"+n.list(i.data,!0)+"</dd></dl>":""},n.recent=function(t){return t?[].concat(f):'<dl class="df-emojis-list"><dd>'+e.map(f,function(t,e){var i=n.html(e);return i?"<span>"+i+"</span>":i}).join("")+"</dd></dl>"},n.overview=function(){return'<dl class="df-emojis-list">'+e.map(n.data(),function(t,i){var r=e.map(i.data,function(t,e){return 19<t?"":"<span>"+n.html(e.code)+"</span>"}).join("");return"<dt>"+i.name+"</dt><dd>"+r+"</dd>"}).join("")+"</dl>"},n.build=function(n,t,i){e.each(n,function(n,r){e.each(r.data,function(n,e){l[e.code]=a.fill(t,e),i?d[e.code]=1:delete d[e.code]})});var r=e.keys(l);r=e.grep(r,function(n,t){return!/^:[^\s:]+:$/.test(t)}),r=r.sort(function(n,t){return t.length-n.length}),r=e.map(r,function(n,t){return t.replace(u,"\\$&")}),r.unshift(":[^\\s:]+:"),s=new RegExp(r.join("|"),"g")},n.search=function(n,t){var i=new RegExp(e.trim(n).replace(u,"\\$&"),"i"),r=e.grep(l,function(n){return!(n in d)&&i.test(n)});return t?r:'<dl class="df-emojis-list">'+e.map(r,function(n,t){return t}).join("")+"</dl>"},n.convert=function(t,i){var r=[],a=String(t).replace(s,function(n,t,i){return e.hasOwn(l,n)?t>0&&!/\s/.test(i[t-1])?n:t+n.length<i.length&&!/\s/.test(i[t+n.length])?n:(e.hasOwn(d,n)||r.push(n),l[n]):n});return!0===i&&n.count(t,r),a},n.count=function(i,a){a&&a.length&&r.get("emojis.count")&&(f=t.unique(a.concat(n.recent(!0))),f=e.grep(f,function(n,t){return t in l}),t.post(r.get("emojis.count"),{smiley:f.join(",")}))},n.bind=function(i){return t(i).filter(":input:not(.df-emojis-ac)").addClass("df-emojis-ac").atwho({displayTpl:'<li data-value="${code}">${html} ${match}</li>',insertTpl:"${code}",searchKey:"code",at:":",callbacks:{highlighter:function(n){return n},filter:function(i){var r=n.search(i,!0);return e.map(r,function(n,e){return{code:n,html:e,match:t.fn.atwho.default.callbacks.highlighter(n,i)}})}}})},i.set("emojis",n.convert);var p=e.map(o.codes,function(n,t){return{data:t}});return n.build(p,a.get("ico/emoji-v2"),!0),n.build(c,a.get("ico/emoji-v3"),!1),function(n){n&&n.indexOf("_")<0&&(f=t.unique(String(n).split(",")),f=e.grep(f,function(n,t){return t in l}))}(r.get("emojis.recent")),n});
define("app/view/rich-editor",["exports","lib/jQuery","lib/Markdown","tnc/core/utils","tnc/core/convert","tnc/view/input/cursor","app/view/job/collapse","app/view/job/tab","app/view/emojis"],function(e,i,t,n,s,r,d,a,o){function l(t,s,d,a,o){var l,c,v=i(t).val(),f=r.get(t),h=v.slice(f.start,f.end);if(s?(/\n\s*$/.test(h)||((c=v.indexOf("\n",f.end))?f.end=c:f.end=v.length),/^\s*\n/.test(h)||((l=v.lastIndexOf("\n",f.start))?f.start=l+1:f.start=0),h=v.slice(f.start,f.end)):a.test(h)||(c=v.indexOf(d,f.end),l=v.lastIndexOf(d,f.start),-1!==c&&c<v.indexOf("\n",f.end)&&-1!==l&&l>v.lastIndexOf("\n",f.start)&&(f.end=c+d.length,f.start=l-d.length+1,h=v.slice(f.start,f.end))),!/\S/.test(h))return h=d+(s?" ":"")+o+(s?"":d),void e.replace(t,f.start,f.end,h);h=h.replace(/^\s+/,function(e){return f.start+=e.length,""}),h=h.replace(/\s+$/,function(e){return f.end-=e.length,""}),h=n.map(h.split("\n"),function(e,i){var t=i.match(a);return s?t?i.slice(t[0].length):d+" "+i:t?t[1]:d+i+d}).join("\n"),e.replace(t,f.start,f.end,h)}return e.execute=function(e){var t=e.getAttribute("data-cmd");if(t){var r=i(e).closest(".df-rich-editor"),a=r.find("textarea"),c=r.find(".df-rich-emojis");if("emojis"===t){var v=c.find(".df-menu");if(!v.find("ul").size()){var f=n.map(o.cats(),function(e,i){return"<li>"+i+"</li>"}).join("");v.append("<ul><li>Overview</li>"+f+"</ul>")}var h=c.find(".df-rich-emojis-list");return h.is(":empty")&&h.html(o.overview()),void d.execute(c.get(0),e)}return"html"===t?(d.hide(c.get(0),e),i(e).closest(".btn").removeClass("active").siblings().addClass("active"),r.find(".df-rich-html").addClass("active in").siblings().removeClass("active in"),r.find(".df-rich-html").html(s(a.val(),[{name:"markdown"},{name:"emojis"}])),void i(e).closest(".btn-group").nextAll().hide()):"edit"===t?(i(e).closest(".btn").removeClass("active").siblings().addClass("active"),r.find(".df-rich-text").addClass("active in").siblings().removeClass("active in"),void i(e).closest(".btn-group").nextAll().show()):"bold"===t?void l(a.get(0),!1,"**",/\*\*(.*)\*\*/,n.i18n("T_TEXT_STRONG")):"italic"===t?void l(a.get(0),!1,"_",/_(.*)_/,n.i18n("T_TEXT_EMPHASIZED")):"header"===t?void l(a.get(0),!0,"#",/^\s*#+\s+/,n.i18n("T_TEXT_HEADING")):"list-ul"===t?void l(a.get(0),!0,"-",/^\s*-\s+/,n.i18n("T_TEXT_LIST_HERE")):"list-ol"===t?void l(a.get(0),!0,"1.",/^\s*\d+\.\s+/,n.i18n("T_TEXT_LIST_HERE")):"quote"===t?void l(a.get(0),!0,">",/^\s*>\s+/,n.i18n("T_TEXT_QUOTE_HERE")):void 0}},e.replace=function(e,i,t,n){var s=e.value;e.value=s.slice(0,i)+n+s.slice(t),r.set(e,i,i+n.length)},i("body").on("passed.tab.rich-editor",".df-rich-nav-html",function(e,t){var n=i(this).closest(".df-rich-editor").find("textarea");i(t.value).html(s(n.val(),[{name:"escape"},{name:"lines"},{name:"emojis"}]))}).on("passed.toggle.rich-editor",'[data-cmd="emojis"]',function(e,t){var s=i(t.value),r=s.find(".df-rich-emojis-list"),d=s.find(".df-menu");if(!d.find("ul").size()){var a=n.map(o.cats(),function(e,i){return"<li>"+i+"</li>"}).join("");d.append("<ul><li>Overview</li>"+a+"</ul>")}r.is(":empty")&&r.html(o.overview())}).on("click.rich-editor",".df-rich-emojis .df-menu li",function(){var e=i(this).closest(".df-rich-emojis").find(".df-rich-emojis-list"),t=i(this).index(),n=t?o.group(t-1):o.overview();e.html(n)}).on("input.rich-editor",".df-rich-emojis-search input",function(){var e=i.trim(i(this).val()),t=e?o.search(e):o.overview();i(this).closest(".df-rich-emojis").find(".df-rich-emojis-list").html(t)}).on("keydown.rich-editor",".df-rich-editor textarea",r.handleEvent).on("keyup.rich-editor",".df-rich-editor textarea",r.handleEvent).on("mouseup.rich-editor",function(e){i(document.activeElement).is(".df-rich-editor textarea")&&r.handleEvent.call(document.activeElement,e)}).on("click.rich-editor",".btn[data-cmd]",function(){e.execute(this)}).on("click.rich-editor",".df-rich-emojis .df-emoji",function(){var e=i(this).closest(".df-rich-editor").find("textarea");r.insert(e.get(0)," "+this.title+" ",!1)}),e});
define("tnc/core/events",["exports","tnc/core/utils","tnc/class/Promise","tnc/class/Deferred"],function(n,r,e,t,o,c,i,u,s,a){function f(n){return o&&o(n)||r.hasOwn(F,n)}function h(n){var t=e.resolve(c&&c(n));return t=r.reduce(y[n.name],function(r,e){return r.then(function(){var r=e(n);if(!1===r)throw w;return r})},t)}function l(n,e){i&&i(n),r.each(E[n.name],function(t,o){try{o(n,e)}catch(n){r.error(n)}})}function p(n){function o(){0==--s&&i.resolve()}function c(n){r.error(n),o()}var i=new t,s=u?2:1;return u&&u(n).then(o,c),r.each(O[n.name],function(t,i){try{var u=i(n);e.thenable(u)&&(s+=1,u.then(o,c))}catch(n){r.error(n)}}),o(),i.promise}function v(n){if(o&&o(n.name))return n.promise=s(n);if(!r.hasOwn(F,n.name))return n.promise=e.resolved(n.data);try{return n.promise=e.resolve(F[n.name].call(null,n))}catch(t){return n.promise=e.rejected(r.error(t))}}function m(n,e){a&&a(n,e),r.each(r.slice(b[n.name]||[]),function(t,o){try{o(n,e)}catch(e){r.error(n,e)}})}var d=arguments.callee,w=new Error("EVENT-PREVENTED"),y={},E={},O={},F={},b={},P={},x={};return n.isolate=function(n){var f,h=r.trim(n);return P.hasOwnProperty(h)?f=P[h]:(f=d({},r,e,t,o,c,i,u,s,a),h&&(P[h]=f)),f},n.inherit=function(n){var o,c=r.trim(n);return x.hasOwnProperty(c)?o=x[c]:(o=d({},r,e,t,f,h,l,p,v,m),c&&(x[c]=o)),o},n.filter=function(n,e){return r.isFunction(e)&&(y[n]||(y[n]=[])).push(e),e},n.bypass=function(n,e){return r.isFunction(e)&&(E[n]||(E[n]=[])).push(e),e},n.prepare=function(n,e){return r.isFunction(e)&&(O[n]||(O[n]=[])).push(e),e},n.process=function(n,e){if(f(n))throw new Error('"'+n+'" event processor exists.');return r.isFunction(e)&&(F[n]=e),e},n.on=function(n,e){return r.isFunction(e)&&(b[n]||(b[n]=[])).push(e),e},n.off=function(n,e){if(r.hasOwn(b,n)){var t=r.indexOf(b[n],e);-1<t&&b[n].splice(t,1)}return e},n.fire=function(n,e){r.log("event:",n,e);var t={data:e,name:n},o=h(t),c=o.then(function(){return p(t)}),i=c.then(function(){return v(t)}),u=c.then(function(){m(t,i)});return o.then(null,function(n){l(t,n)}),r.isFunction(u.catch)&&u.catch(function(){}),i.then(function(n){return n})},n.load=function(r){return r instanceof Object&&(F=r.processes||F,E=r.bypasses||E,O=r.prepares||O,b=r.handlers||b,y=r.filters||y),n},n.unload=function(){var n={processes:F,bypasses:E,prepares:O,handlers:b,filters:y};return F={},E={},O={},b={},y={},n},n});
define("lib/v2_guest",["/static/v2/legacy/js/v2_guest.1ec34c90.js","css!/static/v2/legacy/css/v2_guest.5c126dcd.css"],function(t,s){return s&&s.setAttribute("data-type","main"),t});
define("app/view/v2_guest",["exports","lib/jQuery","app/sys/config","tnc/core/utils","tnc/core/events","lib/v2_guest"],function(t,e,a,i,r,n){function s(){e(".v2_guest_partial").each(function(){var t=this.getAttribute("data-v2_guest_partial-name"),a=i.parseJSON(this.getAttribute("data-v2_guest_partial-props"));e(this).data("v2_guest_partial",n.renderPartial(this,{partialName:t,partialProps:a}))})}e("body");e("body, #df-page").last().append(['<div id="df-bridge-global-container" class="df-bridge-global-container"></div>'].join("")),n.updateAxios(a.get("v2_guest.axios")),n.renderGlobal(document.getElementById("df-bridge-global-container"),r),e(document).ready(s),Object.assign(t,{renderPartials:s})});
define("app/view/guest-banner",["exports","lib/jQuery","app/tpl/modals","app/view/screen","app/view/job/modals"],function(n,o,i,e,a){var s=o(i.get("modals/default")).addClass("df-banner df-banner-popup"),t=o('<div class="df-banner df-banner-rail"></div>'),l=o([s.get(0),t.get(0)]),r=o(window),d=o("body"),p=null,c=!1;return n.run=function(o){n.stop(o.force),c||(p=o.delay?setTimeout(function(){n.popup(o)},1e3*o.delay):null,t.html(o.banner),o.scroll&&n.rail(o))},n.stop=function(n){c=c?!n:c,p=clearTimeout(p),t.removeClass("show"),r.off(".guest-banner")},n.rail=function(n){n.rail_banner&&(o("body, #df-page").last().append(t.html(n.rail_banner).get(0)),r.on("resize.guest-banner scroll.guest-banner",function(){t.toggleClass("show",e.match("sm")&&n.scroll<r.scrollTop())}))},n.popup=function(i){!c&&i.popup_banner&&(n.stop(),s.find(".modal-content").html(i.popup_banner),o("body, #df-page").last().append(s.get(0)),a.show(s.get(0)))},l.on("click",'a[href="#modal-signup"], a[href="#modal-reg"]',function(){if(!o("#modal-signup").size()){var n=o("#landing-hero");n.find(".hero-caption").addClass("hide"),n.find(".register-login").addClass("show").find("#tab-signup").click(),o(this).closest(".modal").size()&&a.hide(s.get(0),this);var i=n.offset();return i&&o("html, body").animate({scrollTop:i.top},500),!1}}),l.on("click",'a[href="#modal-signin"], a[href="#modal-login"]',function(){if(!o("#modal-signin").size()){var n=o("#landing-hero");n.find(".hero-caption").addClass("hide"),n.find(".register-login").addClass("show").find("#tab-signin").click(),o(this).closest(".modal").size()&&a.hide(s.get(0),this);var i=n.offset();return i&&o("html, body").animate({scrollTop:i.top},500),!1}}),t.on("click",'[data-jobs="dismiss"]',function(){return n.stop(),!1}),d.on("modal:show","#modal-signin, #modal-signup",function(){n.stop()}),d.on("click","form",function(){return 2===o('input[name="nickname"], input[name="password"]',this).size()?void n.stop():2===o('input[name="regNickname"], input[name="regPassword1"]',this).size()?void n.stop():void 0}),o("#landing-hero .hero-caption").on("click.landing",".btn",function(){return void n.stop()}),n});
self.jQuery && self.jQuery(document).trigger('runtime');