2013-07-30 23:17:13 +02:00
|
|
|
/** vim: et:ts=4:sw=4:sts=4
|
|
|
|
* @license RequireJS 2.1.8 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
|
|
|
|
* Available via the MIT or new BSD license.
|
|
|
|
* see: http://github.com/jrburke/requirejs for details
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* jQuery JavaScript Library v1.8.3
|
|
|
|
* http://jquery.com/
|
|
|
|
*
|
|
|
|
* Includes Sizzle.js
|
|
|
|
* http://sizzlejs.com/
|
|
|
|
*
|
|
|
|
* Copyright 2012 jQuery Foundation and other contributors
|
|
|
|
* Released under the MIT license
|
|
|
|
* http://jquery.org/license
|
|
|
|
*
|
|
|
|
* Date: Tue Nov 13 2012 08:20:33 GMT-0500 (Eastern Standard Time)
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Sizzle CSS Selector Engine
|
|
|
|
* Copyright 2012 jQuery Foundation and other contributors
|
|
|
|
* Released under the MIT license
|
|
|
|
* http://sizzlejs.com/
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
jed.js
|
|
|
|
v0.5.0beta
|
|
|
|
|
|
|
|
https://github.com/SlexAxton/Jed
|
|
|
|
-----------
|
|
|
|
A gettext compatible i18n library for modern JavaScript Applications
|
|
|
|
|
|
|
|
by Alex Sexton - AlexSexton [at] gmail - @SlexAxton
|
|
|
|
WTFPL license for use
|
|
|
|
Dojo CLA for contributions
|
|
|
|
|
|
|
|
Jed offers the entire applicable GNU gettext spec'd set of
|
|
|
|
functions, but also offers some nicer wrappers around them.
|
|
|
|
The api for gettext was written for a language with no function
|
|
|
|
overloading, so Jed allows a little more of that.
|
|
|
|
|
|
|
|
Many thanks to Joshua I. Miller - unrtst@cpan.org - who wrote
|
|
|
|
gettext.js back in 2008. I was able to vet a lot of my ideas
|
|
|
|
against his. I also made sure Jed passed against his tests
|
|
|
|
in order to offer easy upgrades -- jsgettext.berlios.de
|
|
|
|
*/
|
|
|
|
|
|
|
|
// Underscore 1.3.0 was used to port and is licensed
|
|
|
|
|
|
|
|
/**
|
|
|
|
sprintf() for JavaScript 0.7-beta1
|
|
|
|
http://www.diveintojavascript.com/projects/javascript-sprintf
|
|
|
|
|
|
|
|
Copyright (c) Alexandru Marasteanu <alexaholic [at) gmail (dot] com>
|
|
|
|
All rights reserved.
|
|
|
|
|
|
|
|
Redistribution and use in source and binary forms, with or without
|
|
|
|
modification, are permitted provided that the following conditions are met:
|
|
|
|
* Redistributions of source code must retain the above copyright
|
|
|
|
notice, this list of conditions and the following disclaimer.
|
|
|
|
* Redistributions in binary form must reproduce the above copyright
|
|
|
|
notice, this list of conditions and the following disclaimer in the
|
|
|
|
documentation and/or other materials provided with the distribution.
|
|
|
|
* Neither the name of sprintf() for JavaScript nor the
|
|
|
|
names of its contributors may be used to endorse or promote products
|
|
|
|
derived from this software without specific prior written permission.
|
|
|
|
|
|
|
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
|
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
|
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
|
|
DISCLAIMED. IN NO EVENT SHALL Alexandru Marasteanu BE LIABLE FOR ANY
|
|
|
|
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
|
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
|
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
|
|
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
|
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
*/
|
|
|
|
|
|
|
|
// Underscore.js 1.5.1
|
|
|
|
// http://underscorejs.org
|
|
|
|
// (c) 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
|
|
// Underscore may be freely distributed under the MIT license.
|
|
|
|
|
|
|
|
// (c) 2010-2013 Jeremy Ashkenas, DocumentCloud Inc.
|
|
|
|
// Backbone may be freely distributed under the MIT license.
|
|
|
|
// For all details and documentation:
|
|
|
|
// http://backbonejs.org
|
|
|
|
|
|
|
|
/*! TinySort 1.5.5
|
|
|
|
* Copyright (c) 2008-2013 Ron Valstar http://tinysort.sjeiti.com/
|
|
|
|
*
|
|
|
|
* Dual licensed under the MIT and GPL licenses:
|
|
|
|
* http://www.opensource.org/licenses/mit-license.php
|
|
|
|
* http://www.gnu.org/licenses/gpl.html
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined
|
|
|
|
* in FIPS PUB 180-1
|
|
|
|
* Version 2.1a Copyright Paul Johnston 2000 - 2002.
|
|
|
|
* Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
|
|
|
|
* Distributed under the BSD License
|
|
|
|
* See http://pajhome.org.uk/crypt/md5 for details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
|
|
|
|
* Digest Algorithm, as defined in RFC 1321.
|
|
|
|
* Version 2.1 Copyright (C) Paul Johnston 1999 - 2002.
|
|
|
|
* Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
|
|
|
|
* Distributed under the BSD License
|
|
|
|
* See http://pajhome.org.uk/crypt/md5 for more info.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
This program is distributed under the terms of the MIT license.
|
|
|
|
Please see the LICENSE file for details.
|
|
|
|
|
|
|
|
Copyright 2006-2008, OGG, LLC
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
Copyright 2010, François de Metz <francois@2metz.fr>
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Converse.js (Web-based XMPP instant messaging client)
|
|
|
|
* http://conversejs.org
|
|
|
|
*
|
|
|
|
* Copyright (c) 2012, Jan-Carel Brand <jc@opkode.com>
|
|
|
|
* Dual licensed under the MIT and GPL Licenses
|
|
|
|
*/
|
|
|
|
|
2013-08-20 22:53:19 +02:00
|
|
|
function q(e){throw e}function y(e,t,n){4!==t.length&&q(new sjcl.exception.invalid("invalid aes block size"));var r=e.a[n],i=t[0]^r[0],s=t[n?3:1]^r[1],o=t[2]^r[2];t=t[n?1:3]^r[3];var u,a,f,l=r.length/4-2,c,h=4,p=[0,0,0,0];u=e.j[n],e=u[0];var d=u[1],v=u[2],m=u[3],g=u[4];for(c=0;c<l;c++)u=e[i>>>24]^d[s>>16&255]^v[o>>8&255]^m[t&255]^r[h],a=e[s>>>24]^d[o>>16&255]^v[t>>8&255]^m[i&255]^r[h+1],f=e[o>>>24]^d[t>>16&255]^v[i>>8&255]^m[s&255]^r[h+2],t=e[t>>>24]^d[i>>16&255]^v[s>>8&255]^m[o&255]^r[h+3],h+=4,i=u,s=a,o=f;for(c=0;4>c;c++)p[n?3&-c:c]=g[i>>>24]<<24^g[s>>16&255]<<16^g[o>>8&255]<<8^g[t&255]^r[h++],u=i,i=s,s=o,o=t,t=u;return p}function z(e,t){var n,r,i,s=t.slice(0),o=e.q,u=e.a,a=o[0],f=o[1],l=o[2],c=o[3],h=o[4],p=o[5],d=o[6],v=o[7];for(n=0;64>n;n++)16>n?r=s[n]:(r=s[n+1&15],i=s[n+14&15],r=s[n&15]=(r>>>7^r>>>18^r>>>3^r<<25^r<<14)+(i>>>17^i>>>19^i>>>10^i<<15^i<<13)+s[n&15]+s[n+9&15]|0),r=r+v+(h>>>6^h>>>11^h>>>25^h<<26^h<<21^h<<7)+(d^h&(p^d))+u[n],v=d,d=p,p=h,h=c+r|0,c=l,l=f,f=a,a=r+(f&l^c&(f^l))+(f>>>2^f>>>13^f>>>22^f<<30^f<<19^f<<10)|0;o[0]=o[0]+a|0,o[1]=o[1]+f|0,o[2]=o[2]+l|0,o[3]=o[3]+c|0,o[4]=o[4]+h|0,o[5]=o[5]+p|0,o[6]=o[6]+d|0,o[7]=o[7]+v|0}function C(e,t){var n,r=sjcl.random.z[e],i=[];for(n in r)r.hasOwnProperty(n)&&i.push(r[n]);for(n=0;n<i.length;n++)i[n](t)}function A(e){e.a=B(e).concat(B(e)),e.A=new sjcl.cipher.aes(e.a)}function B(e){for(var t=0;4>t&&(e.e[t]=e.e[t]+1|0,!e.e[t]);t++);return e.A.encrypt(e.e)}function hex_sha1(e){return binb2hex(core_sha1(str2binb(e),e.length*chrsz))}function b64_sha1(e){return binb2b64(core_sha1(str2binb(e),e.length*chrsz))}function str_sha1(e){return binb2str(core_sha1(str2binb(e),e.length*chrsz))}function hex_hmac_sha1(e,t){return binb2hex(core_hmac_sha1(e,t))}function b64_hmac_sha1(e,t){return binb2b64(core_hmac_sha1(e,t))}function str_hmac_sha1(e,t){return binb2str(core_hmac_sha1(e,t))}function sha1_vm_test(){return hex_sha1("abc")=="a9993e364706816aba3e25717850c26c9cd0d89d"}function core_sha1(e,t){e[t>>5]|=128<<24-t%32,e[(t+64>>9<<4)+15]=t;var n=new Array(80),r=1732584193,i=-271733879,s=-1732584194,o=271733878,u=-1009589776,a,f,l,c,h,p,d,v;for(a=0;a<e.length;a+=16){c=r,h=i,p=s,d=o,v=u;for(f=0;f<80;f++)f<16?n[f]=e[a+f]:n[f]=rol(n[f-3]^n[f-8]^n[f-14]^n[f-16],1),l=safe_add(safe_add(rol(r,5),sha1_ft(f,i,s,o)),safe_add(safe_add(u,n[f]),sha1_kt(f))),u=o,o=s,s=rol(i,30),i=r,r=l;r=safe_add(r,c),i=safe_add(i,h),s=safe_add(s,p),o=safe_add(o,d),u=safe_add(u,v)}return[r,i,s,o,u]}function sha1_ft(e,t,n,r){return e<20?t&n|~t&r:e<40?t^n^r:e<60?t&n|t&r|n&r:t^n^r}function sha1_kt(e){return e<20?1518500249:e<40?1859775393:e<60?-1894007588:-899497514}function core_hmac_sha1(e,t){var n=str2binb(e);n.length>16&&(n=core_sha1(n,e.length*chrsz));var r=new Array(16),i=new Array(16);for(var s=0;s<16;s++)r[s]=n[s]^909522486,i[s]=n[s]^1549556828;var o=core_sha1(r.concat(str2binb(t)),512+t.length*chrsz);return core_sha1(i.concat(o),672)}function safe_add(e,t){var n=(e&65535)+(t&65535),r=(e>>16)+(t>>16)+(n>>16);return r<<16|n&65535}function rol(e,t){return e<<t|e>>>32-t}function str2binb(e){var t=[],n=(1<<chrsz)-1;for(var r=0;r<e.length*chrsz;r+=chrsz)t[r>>5]|=(e.charCodeAt(r/chrsz)&n)<<32-chrsz-r%32;return t}function binb2str(e){var t="",n=(1<<chrsz)-1;for(var r=0;r<e.length*32;r+=chrsz)t+=String.fromCharCode(e[r>>5]>>>32-chrsz-r%32&n);return t}function binb2hex(e){var t=hexcase?"0123456789ABCDEF":"0123456789abcdef",n="";for(var r=0;r<e.length*4;r++)n+=t.charAt(e[r>>2]>>(3-r%4)*8+4&15)+t.charAt(e[r>>2]>>(3-r%4)*8&15);return n}function binb2b64(e){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n="",r,i;for(var s=0;s<e.length*4;s+=3){r=(e[s>>2]>>8*(3-s%4)&255)<<16|(e[s+1>>2]>>8*(3-(s+1)%4)&255)<<8|e[s+2>>2]>>8*(3-(s+2)%4)&255;for(i=0;i<4;i++)s*8+i*6>e.length*32?n+=b64pad:n+=t.charAt(r>>6*(3-i)&63)}return n}var requirejs,require,define;(function(global){function isFunction(e){return ostring.call(e)==="[object Function]"}function isArray(e){return ostring.call(e)==="[object Array]"}function each(e,t){if(e){var n;for(n=0;n<e.length;n+=1)if(e[n]&&t(e[n],n,e))break}}function eachReverse(e,
|