diff --git a/dist/js/app.js b/dist/js/app.js index 5622dbb5..e43d2399 100644 --- a/dist/js/app.js +++ b/dist/js/app.js @@ -17,74 +17,30 @@ * see: http://github.com/requirejs/domReady for details */ +// PTN Ninja by Craig Laparo is licensed under a Creative Commons + +// http://creativecommons.org/licenses/by-nc-sa/4.0/ + // PTN Ninja by Craig Laparo is licensed under a Creative Commons // Attribution-NonCommercial-ShareAlike 4.0 International License. // http://creativecommons.org/licenses/by-nc-sa/4.0/ /*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */ -// Updated to use the 2014 proposed W3C DOM events: -// http://www.w3.org/TR/DOM-Level-3-Events/ -// http://www.w3.org/TR/DOM-Level-3-Events-key/ -// See https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent.key for how it is currently (2015) implemented -// -// Version: 3.0 // Copyright (c) 2015 Daniel Wachsstock -// MIT license: -// Permission is hereby granted, free of charge, to any person -// obtaining a copy of this software and associated documentation -// files (the "Software"), to deal in the Software without -// restriction, including without limitation the rights to use, -// copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following -// conditions: - -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// Cross-broswer implementation of text ranges and selections -// documentation: http://bililite.com/blog/2011/01/17/cross-browser-text-ranges-and-selections/ -// Version: 2.6 -// Copyright (c) 2013 Daniel Wachsstock // MIT license: -// Permission is hereby granted, free of charge, to any person -// obtaining a copy of this software and associated documentation -// files (the "Software"), to deal in the Software without -// restriction, including without limitation the rights to use, -// copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following -// conditions: -// Copyright (c) 2013 Daniel Wachsstock -// MIT license: -// Permission is hereby granted, free of charge, to any person -// obtaining a copy of this software and associated documentation -// files (the "Software"), to deal in the Software without -// restriction, including without limitation the rights to use, // copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following -// conditions: -// Turn a textarea element into a pre element that can use a highlighter -// Designed for use with Prism (prismjs.com) -// usage: editor = bililiteRange.fancytext(element, Prism.highlightElement, threshold); -// the element should have the appropriate class=language-* for Prism. -// Version: 1.0 -// Documentation: http://bililite.com/blog/2013/12/16/simple-syntax-highlighting-editor-with-prism/ -// Copyright (c) 2013 Daniel Wachsstock -// depends: bililiteRange.js, bililiteRange.utils.js (the latter is only for autoindenting; if that's not used it is not necessary) +// The above copyright notice and this permission notice shall be -// MIT license: -// Permission is hereby granted, free of charge, to any person -// obtaining a copy of this software and associated documentation -// files (the "Software"), to deal in the Software without -// restriction, including without limitation the rights to use, -// copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the -// Software is furnished to do so, subject to the following -// conditions: +// Copyright (c) 2013 Daniel Wachsstock -(function(){"use strict";function t(e,t,n,r,i,s){t[e]&&(n.push(e),(t[e]===!0||t[e]===1)&&r.push(i+e+"/"+s))}function n(e,t,n,r,i){var s=r+t+"/"+i;require._fileExists(e.toUrl(s+".js"))&&n.push(s)}function r(e,t,n){var i;for(i in t)t.hasOwnProperty(i)&&(!e.hasOwnProperty(i)||n)?e[i]=t[i]:typeof t[i]=="object"&&(!e[i]&&t[i]&&(e[i]={}),r(e[i],t[i],n))}var e=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/;define("i18n",["module"],function(i){var s=i.config?i.config():{};return{version:"2.0.6",load:function(i,o,u,a){a=a||{},a.locale&&(s.locale=a.locale);var f,l=e.exec(i),c=l[1],h=l[4],p=l[5],d=h.split("-"),v=[],m={},g,y,b="";l[5]?(c=l[1],f=c+p):(f=i,p=l[4],h=s.locale,h||(h=s.locale=typeof navigator=="undefined"?"root":(navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage||"root").toLowerCase()),d=h.split("-"));if(a.isBuild){v.push(f),n(o,"root",v,c,p);for(g=0;g-1&&n[t];t--){s=n[t],i=e[s];if(i===!0||i===1)i=o(c+s+"/"+p);r(m,i)}u(m)})})}}})})(),define("nls/main",{root:{App_Title:"PTN Ninja",Clock:"Clock",Date:"Date",Download:"Download",Edit_Mode:"Edit Mode",Event:"Event",First_Ply:"First Ply",Last_Ply:"Last Ply",Next_Ply:"Next Ply",Open:"Open",Permalink:"Permalink",Play_Mode:"Play Mode",PlayPause:"Play/Pause",Player1:"Player1",Player2:"Player2",Points:"Points",Previous_Ply:"Previous Ply",Rating1:"Rating1",Rating2:"Rating2",Result:"Result",Round:"Round",Share:"Share",ShowHide_Errors:"Show/Hide Errors",Site:"Site",Size:"Size",TPS:"TPS",Tak:"Tak",Time:"Time",n_characters:"<%=n%> characters",result:{1:"<%=player%> wins by default",F:"<%=player%> wins by flats",R:"<%=player%> wins by building a road",tie:"It's a tie"},success:{},warning:{long_url:"The permalink is over 2000 characters long, which might not work in some browsers."},error:{illegal_ply:'Illegal ply: "<%=ply%>"',invalid_movetext:'Invalid movetext: "<%=text%>"',invalid_file_format:"Invalid file format",invalid_header:"Invalid header",invalid_ply:'Invalid ply: "<%=ply%>"',invalid_square:'Invalid square: "<%=square%>"',invalid_tag:'Invalid tag: "<%=tag%>"',invalid_tag_value:'Invalid <%=tag%>: "<%=value%>"',invalid_TPS_dimensions:"Invalid TPS dimensions",missing_tags:"Missing required tag(s): <%=_.map(tags, _.upperFirst).join(', ')%>"},help:{},info:{}}}),!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(a,b){function s(e){var t=!!e&&"length"in e&&e.length,r=n.type(e);return"function"===r||n.isWindow(e)?!1:"array"===r||0===t||"number"==typeof t&&t>0&&t-1 in e}function z(e,t,r){if(n.isFunction(t))return n.grep(e,function(e,n){return!!t.call(e,n,e)!==r});if(t.nodeType)return n.grep(e,function(e){return e===t!==r});if("string"==typeof t){if(y.test(t))return n.filter(t,e,r);t=n.filter(t,e)}return n.grep(e,function(e){return h.call(t,e)>-1!==r})}function F(e,t){while((e=e[t])&&1!==e.nodeType);return e}function H(e){var t={};return n.each(e.match(G)||[],function(e,n){t[n]=!0}),t}function J(){d.removeEventListener("DOMContentLoaded",J),a.removeEventListener("load",J),n.ready()}function M(){this.expando=n.expando+M.uid++}function R(e,t,r){var i;if(void 0===r&&1===e.nodeType)if(i="data-"+t.replace(Q,"-$&").toLowerCase(),r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:P.test(r)?n.parseJSON(r):r}catch(s){}O.set(e,t,r)}else r=void 0;return r}function W(e,t,r,i){var s,o=1,u=20,a=i?function(){return i.cur()}:function(){return n.css(e,t,"")},f=a(),l=r&&r[3]||(n.cssNumber[t]?"":"px"),c=(n.cssNumber[t]||"px"!==l&&+f)&&T.exec(n.css(e,t));if(c&&c[3]!==l){l=l||c[3],r=r||[],c=+f||1;do o=o||".5",c/=o,n.style(e,t,c+l);while(o!==(o=a()/f)&&1!==o&&--u)}return r&&(c=+c||+f||0,s=r[1]?c+(r[1]+1)*r[2]:+r[2],i&&(i.unit=l,i.start=c,i.end=s)),s}function _(e,t){var r="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&n.nodeName(e,t)?n.merge([e],r):r}function aa(e,t){for(var n=0,r=e.length;r>n;n++)N.set(e[n],"globalEval",!t||N.get(t[n],"globalEval"))}function ca(e,t,r,i,s){for(var o,u,a,f,l,c,h=t.createDocumentFragment(),p=[],d=0,v=e.length;v>d;d++)if(o=e[d],o||0===o)if("object"===n.type(o))n.merge(p,o.nodeType?[o]:o);else if(ba.test(o)){u=u||h.appendChild(t.createElement("div")),a=(Y.exec(o)||["",""])[1].toLowerCase(),f=$[a]||$._default,u.innerHTML=f[1]+n.htmlPrefilter(o)+f[2],c=f[0];while(c--)u=u.lastChild;n.merge(p,u.childNodes),u=h.firstChild,u.textContent=""}else p.push(t.createTextNode(o));h.textContent="",d=0;while(o=p[d++])if(i&&n.inArray(o,i)>-1)s&&s.push(o);else if(l=n.contains(o.ownerDocument,o),u=_(h.appendChild(o),"script"),l&&aa(u),r){c=0;while(o=u[c++])Z.test(o.type||"")&&r.push(o)}return h}function ga(){return!0}function ha(){return!1}function ia(){try{return d.activeElement}catch(e){}}function ja(e,t,r,i,s,o){var u,a;if("object"==typeof t){"string"!=typeof r&&(i=i||r,r=void 0);for(a in t)ja(e,a,r,i,t[a],o);return e}if(null==i&&null==s?(s=r,i=r=void 0):null==s&&("string"==typeof r?(s=i,i=void 0):(s=i,i=r,r=void 0)),s===!1)s=ha;else if(!s)return e;return 1===o&&(u=s,s=function(e){return n().off(e),u.apply(this,arguments)},s.guid=u.guid||(u.guid=n.guid++)),e.each(function(){n.event.add(this,t,s,i,r)})}function pa(e,t){return n.nodeName(e,"table")&&n.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function qa(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function ra(e){var t=na.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function sa(e,t){var r,i,s,o,u,a,f,l;if(1===t.nodeType){if(N.hasData(e)&&(o=N.access(e),u=N.set(t,o),l=o.events)){delete u.handle,u.events={};for(s in l)for(r=0,i=l[s].length;i>r;r++)n.event.add(t,s,l[s][r])}O.hasData(e)&&(a=O.access(e),f=n.extend({},a),O.set(t,f))}}function ta(e,t){var n=t.nodeName.toLowerCase();"input"===n&&X.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function ua(e,t,r,i){t=f.apply([],t);var s,o,u,a,c,h,p=0,d=e.length,v=d-1,m=t[0],g=n.isFunction(m);if(g||d>1&&"string"==typeof m&&!l.checkClone&&ma.test(m))return e.each(function(n){var s=e.eq(n);g&&(t[0]=m.call(this,n,s.html())),ua(s,t,r,i)});if(d&&(s=ca(t,e[0].ownerDocument,!1,e,i),o=s.firstChild,1===s.childNodes.length&&(s=o),o||i)){for(u=n.map(_(s,"script"),qa),a=u.length;d>p;p++)c=s,p!==v&&(c=n.clone(c,!0,!0),a&&n.merge(u,_(c,"script"))),r.call(e[p],c,p);if(a)for(h=u[u.length-1].ownerDocument,n.map(u,ra),p=0;a>p;p++)c=u[p],Z.test(c.type||"")&&!N.access(c,"globalEval")&&n.contains(h,c)&&(c.src?n._evalUrl&&n._evalUrl(c.src):n.globalEval(c.textContent.replace(oa,"")))}return e}function va(e,t,r){for(var i,s=t?n.filter(t,e):e,o=0;null!=(i=s[o]);o++)r||1!==i.nodeType||n.cleanData(_(i)),i.parentNode&&(r&&n.contains(i.ownerDocument,i)&&aa(_(i,"script")),i.parentNode.removeChild(i));return e}function ya(e,t){var r=n(t.createElement(e)).appendTo(t.body),i=n.css(r[0],"display");return r.detach(),i}function za(e){var t=d,r=xa[e];return r||(r=ya(e,t),"none"!==r&&r||(wa=(wa||n("