From 27db45f05afdeb821c0ee3c701b1b5464eb926b9 Mon Sep 17 00:00:00 2001 From: John McLear Date: Tue, 29 Jan 2013 17:35:40 +0000 Subject: [PATCH] first commit --- .cache.json | 1 + .ep_initialized | 1 + ep.json | 12 + node_modules/buffertools/.mailmap | 2 + node_modules/buffertools/.npmignore | 1 + node_modules/buffertools/AUTHORS | 4 + node_modules/buffertools/BoyerMoore.h | 127 ++ node_modules/buffertools/README.md | 119 ++ node_modules/buffertools/binding.gyp | 8 + node_modules/buffertools/buffertools.cc | 350 ++++++ node_modules/buffertools/buffertools.js | 90 ++ node_modules/buffertools/build/Makefile | 334 +++++ .../Release/.deps/Release/buffertools.node.d | 1 + .../Release/obj.target/buffertools.node.d | 1 + .../obj.target/buffertools/buffertools.o.d | 34 + .../build/Release/buffertools.node | Bin 0 -> 25867 bytes .../buffertools/build/Release/linker.lock | 0 .../build/Release/obj.target/buffertools.node | Bin 0 -> 25867 bytes .../obj.target/buffertools/buffertools.o | Bin 0 -> 19132 bytes .../buffertools/build/binding.Makefile | 6 + .../buffertools/build/buffertools.target.mk | 122 ++ node_modules/buffertools/build/config.gypi | 105 ++ node_modules/buffertools/package.json | 48 + node_modules/buffertools/test.js | 118 ++ node_modules/buffertools/wscript | 14 + node_modules/emailjs/LICENSE | 19 + node_modules/emailjs/Readme.md | 154 +++ node_modules/emailjs/email.js | 3 + .../node_modules/bufferjs/add-chunk.js | 29 + .../emailjs/node_modules/bufferjs/concat.js | 31 + .../emailjs/node_modules/bufferjs/index.js | 7 + .../emailjs/node_modules/bufferjs/indexOf.js | 30 + .../node_modules/bufferjs/package.json | 37 + .../emailjs/node_modules/moment/.jshintrc | 26 + .../emailjs/node_modules/moment/.npmignore | 2 + .../emailjs/node_modules/moment/.travis.yml | 5 + .../emailjs/node_modules/moment/LICENSE | 22 + .../emailjs/node_modules/moment/Makefile | 71 ++ .../emailjs/node_modules/moment/ender.js | 1 + .../emailjs/node_modules/moment/lang/bg.js | 66 + .../emailjs/node_modules/moment/lang/ca.js | 64 + .../emailjs/node_modules/moment/lang/cv.js | 54 + .../emailjs/node_modules/moment/lang/da.js | 54 + .../emailjs/node_modules/moment/lang/de.js | 54 + .../emailjs/node_modules/moment/lang/en-ca.js | 58 + .../emailjs/node_modules/moment/lang/en-gb.js | 58 + .../emailjs/node_modules/moment/lang/es.js | 64 + .../emailjs/node_modules/moment/lang/eu.js | 54 + .../emailjs/node_modules/moment/lang/fi.js | 98 ++ .../emailjs/node_modules/moment/lang/fr-ca.js | 54 + .../emailjs/node_modules/moment/lang/fr.js | 54 + .../emailjs/node_modules/moment/lang/gl.js | 64 + .../emailjs/node_modules/moment/lang/hu.js | 108 ++ .../emailjs/node_modules/moment/lang/is.js | 132 ++ .../emailjs/node_modules/moment/lang/it.js | 54 + .../emailjs/node_modules/moment/lang/ja.js | 61 + .../emailjs/node_modules/moment/lang/jp.js | 64 + .../emailjs/node_modules/moment/lang/ko.js | 58 + .../emailjs/node_modules/moment/lang/kr.js | 61 + .../emailjs/node_modules/moment/lang/nb.js | 54 + .../emailjs/node_modules/moment/lang/nl.js | 62 + .../emailjs/node_modules/moment/lang/pl.js | 76 ++ .../emailjs/node_modules/moment/lang/pt-br.js | 58 + .../emailjs/node_modules/moment/lang/pt.js | 58 + .../emailjs/node_modules/moment/lang/ru.js | 133 ++ .../emailjs/node_modules/moment/lang/sv.js | 58 + .../emailjs/node_modules/moment/lang/tr.js | 88 ++ .../emailjs/node_modules/moment/lang/zh-cn.js | 67 + .../emailjs/node_modules/moment/lang/zh-tw.js | 67 + .../node_modules/moment/min/lang-all.min.js | 5 + .../node_modules/moment/min/lang/bg.js | 4 + .../node_modules/moment/min/lang/ca.js | 4 + .../node_modules/moment/min/lang/cv.js | 4 + .../node_modules/moment/min/lang/da.js | 4 + .../node_modules/moment/min/lang/de.js | 4 + .../node_modules/moment/min/lang/en-ca.js | 4 + .../node_modules/moment/min/lang/en-gb.js | 4 + .../node_modules/moment/min/lang/es.js | 4 + .../node_modules/moment/min/lang/eu.js | 4 + .../node_modules/moment/min/lang/fi.js | 4 + .../node_modules/moment/min/lang/fr-ca.js | 4 + .../node_modules/moment/min/lang/fr.js | 4 + .../node_modules/moment/min/lang/gl.js | 4 + .../node_modules/moment/min/lang/hu.js | 4 + .../node_modules/moment/min/lang/is.js | 4 + .../node_modules/moment/min/lang/it.js | 4 + .../node_modules/moment/min/lang/ja.js | 4 + .../node_modules/moment/min/lang/jp.js | 6 + .../node_modules/moment/min/lang/ko.js | 4 + .../node_modules/moment/min/lang/kr.js | 6 + .../node_modules/moment/min/lang/nb.js | 4 + .../node_modules/moment/min/lang/nl.js | 4 + .../node_modules/moment/min/lang/pl.js | 4 + .../node_modules/moment/min/lang/pt-br.js | 4 + .../node_modules/moment/min/lang/pt.js | 4 + .../node_modules/moment/min/lang/ru.js | 4 + .../node_modules/moment/min/lang/sv.js | 4 + .../node_modules/moment/min/lang/tr.js | 5 + .../node_modules/moment/min/lang/zh-cn.js | 4 + .../node_modules/moment/min/lang/zh-tw.js | 4 + .../node_modules/moment/min/moment.min.js | 6 + .../moment/min/moment.min.pretty.js | 440 +++++++ .../emailjs/node_modules/moment/moment.js | 1106 +++++++++++++++++ .../emailjs/node_modules/moment/package.json | 60 + .../emailjs/node_modules/moment/readme.md | 228 ++++ .../node_modules/moment/test/filesize-diff.js | 55 + .../moment/test/filesize-history.js | 108 ++ .../node_modules/moment/test/lang/bg.js | 265 ++++ .../node_modules/moment/test/lang/ca.js | 221 ++++ .../node_modules/moment/test/lang/cv.js | 246 ++++ .../node_modules/moment/test/lang/da.js | 183 +++ .../node_modules/moment/test/lang/de.js | 241 ++++ .../node_modules/moment/test/lang/en-ca.js | 248 ++++ .../node_modules/moment/test/lang/en-gb.js | 248 ++++ .../node_modules/moment/test/lang/en.js | 248 ++++ .../node_modules/moment/test/lang/es.js | 218 ++++ .../node_modules/moment/test/lang/eu.js | 248 ++++ .../node_modules/moment/test/lang/fi.js | 248 ++++ .../node_modules/moment/test/lang/fr-ca.js | 241 ++++ .../node_modules/moment/test/lang/fr.js | 241 ++++ .../node_modules/moment/test/lang/gl.js | 232 ++++ .../node_modules/moment/test/lang/hu.js | 250 ++++ .../node_modules/moment/test/lang/is.js | 254 ++++ .../node_modules/moment/test/lang/it.js | 241 ++++ .../node_modules/moment/test/lang/ja.js | 208 ++++ .../node_modules/moment/test/lang/jp.js | 208 ++++ .../node_modules/moment/test/lang/ko.js | 247 ++++ .../node_modules/moment/test/lang/kr.js | 247 ++++ .../node_modules/moment/test/lang/nb.js | 248 ++++ .../node_modules/moment/test/lang/nl.js | 258 ++++ .../node_modules/moment/test/lang/pl.js | 249 ++++ .../node_modules/moment/test/lang/pt-br.js | 241 ++++ .../node_modules/moment/test/lang/pt.js | 241 ++++ .../node_modules/moment/test/lang/ru.js | 280 +++++ .../node_modules/moment/test/lang/sv.js | 248 ++++ .../node_modules/moment/test/lang/tr.js | 259 ++++ .../node_modules/moment/test/lang/zh-cn.js | 227 ++++ .../node_modules/moment/test/lang/zh-tw.js | 227 ++++ .../moment/test/moment/add_subtract.js | 128 ++ .../node_modules/moment/test/moment/create.js | 319 +++++ .../moment/test/moment/days_in_month.js | 28 + .../node_modules/moment/test/moment/diff.js | 94 ++ .../moment/test/moment/duration.js | 212 ++++ .../node_modules/moment/test/moment/format.js | 111 ++ .../moment/test/moment/getters_setters.js | 103 ++ .../moment/test/moment/humanize_duration.js | 52 + .../moment/test/moment/is_moment.js | 27 + .../moment/test/moment/is_valid.js | 118 ++ .../node_modules/moment/test/moment/lang.js | 197 +++ .../moment/test/moment/leapyear.js | 13 + .../moment/test/moment/mutable.js | 56 + .../moment/test/moment/sod_eod.js | 232 ++++ .../node_modules/moment/test/moment/utc.js | 63 + .../emailjs/node_modules/moment/test/zone.js | 181 +++ node_modules/emailjs/package.json | 54 + node_modules/emailjs/smtp/address.js | 416 +++++++ node_modules/emailjs/smtp/client.js | 177 +++ node_modules/emailjs/smtp/error.js | 21 + node_modules/emailjs/smtp/message.js | 596 +++++++++ node_modules/emailjs/smtp/response.js | 72 ++ node_modules/emailjs/smtp/smtp.js | 592 +++++++++ node_modules/emailjs/smtp/tls.js | 64 + package.json | 18 + server_invite_via_email.js | 31 + static/js/invite_via_email.js | 34 + update.js | 59 + 166 files changed, 17652 insertions(+) create mode 100644 .cache.json create mode 100644 .ep_initialized create mode 100644 ep.json create mode 100644 node_modules/buffertools/.mailmap create mode 100644 node_modules/buffertools/.npmignore create mode 100644 node_modules/buffertools/AUTHORS create mode 100644 node_modules/buffertools/BoyerMoore.h create mode 100644 node_modules/buffertools/README.md create mode 100644 node_modules/buffertools/binding.gyp create mode 100644 node_modules/buffertools/buffertools.cc create mode 100644 node_modules/buffertools/buffertools.js create mode 100644 node_modules/buffertools/build/Makefile create mode 100644 node_modules/buffertools/build/Release/.deps/Release/buffertools.node.d create mode 100644 node_modules/buffertools/build/Release/.deps/Release/obj.target/buffertools.node.d create mode 100644 node_modules/buffertools/build/Release/.deps/Release/obj.target/buffertools/buffertools.o.d create mode 100755 node_modules/buffertools/build/Release/buffertools.node create mode 100644 node_modules/buffertools/build/Release/linker.lock create mode 100755 node_modules/buffertools/build/Release/obj.target/buffertools.node create mode 100644 node_modules/buffertools/build/Release/obj.target/buffertools/buffertools.o create mode 100644 node_modules/buffertools/build/binding.Makefile create mode 100644 node_modules/buffertools/build/buffertools.target.mk create mode 100644 node_modules/buffertools/build/config.gypi create mode 100644 node_modules/buffertools/package.json create mode 100644 node_modules/buffertools/test.js create mode 100644 node_modules/buffertools/wscript create mode 100644 node_modules/emailjs/LICENSE create mode 100644 node_modules/emailjs/Readme.md create mode 100644 node_modules/emailjs/email.js create mode 100644 node_modules/emailjs/node_modules/bufferjs/add-chunk.js create mode 100644 node_modules/emailjs/node_modules/bufferjs/concat.js create mode 100644 node_modules/emailjs/node_modules/bufferjs/index.js create mode 100644 node_modules/emailjs/node_modules/bufferjs/indexOf.js create mode 100644 node_modules/emailjs/node_modules/bufferjs/package.json create mode 100644 node_modules/emailjs/node_modules/moment/.jshintrc create mode 100644 node_modules/emailjs/node_modules/moment/.npmignore create mode 100644 node_modules/emailjs/node_modules/moment/.travis.yml create mode 100644 node_modules/emailjs/node_modules/moment/LICENSE create mode 100644 node_modules/emailjs/node_modules/moment/Makefile create mode 100644 node_modules/emailjs/node_modules/moment/ender.js create mode 100644 node_modules/emailjs/node_modules/moment/lang/bg.js create mode 100644 node_modules/emailjs/node_modules/moment/lang/ca.js create mode 100644 node_modules/emailjs/node_modules/moment/lang/cv.js create mode 100644 node_modules/emailjs/node_modules/moment/lang/da.js create mode 100644 node_modules/emailjs/node_modules/moment/lang/de.js create mode 100644 node_modules/emailjs/node_modules/moment/lang/en-ca.js create mode 100644 node_modules/emailjs/node_modules/moment/lang/en-gb.js create mode 100644 node_modules/emailjs/node_modules/moment/lang/es.js create mode 100644 node_modules/emailjs/node_modules/moment/lang/eu.js create mode 100644 node_modules/emailjs/node_modules/moment/lang/fi.js create mode 100644 node_modules/emailjs/node_modules/moment/lang/fr-ca.js create mode 100644 node_modules/emailjs/node_modules/moment/lang/fr.js create mode 100644 node_modules/emailjs/node_modules/moment/lang/gl.js create mode 100644 node_modules/emailjs/node_modules/moment/lang/hu.js create mode 100644 node_modules/emailjs/node_modules/moment/lang/is.js create mode 100644 node_modules/emailjs/node_modules/moment/lang/it.js create mode 100644 node_modules/emailjs/node_modules/moment/lang/ja.js create mode 100644 node_modules/emailjs/node_modules/moment/lang/jp.js create mode 100644 node_modules/emailjs/node_modules/moment/lang/ko.js create mode 100644 node_modules/emailjs/node_modules/moment/lang/kr.js create mode 100644 node_modules/emailjs/node_modules/moment/lang/nb.js create mode 100644 node_modules/emailjs/node_modules/moment/lang/nl.js create mode 100644 node_modules/emailjs/node_modules/moment/lang/pl.js create mode 100644 node_modules/emailjs/node_modules/moment/lang/pt-br.js create mode 100644 node_modules/emailjs/node_modules/moment/lang/pt.js create mode 100644 node_modules/emailjs/node_modules/moment/lang/ru.js create mode 100644 node_modules/emailjs/node_modules/moment/lang/sv.js create mode 100644 node_modules/emailjs/node_modules/moment/lang/tr.js create mode 100644 node_modules/emailjs/node_modules/moment/lang/zh-cn.js create mode 100644 node_modules/emailjs/node_modules/moment/lang/zh-tw.js create mode 100644 node_modules/emailjs/node_modules/moment/min/lang-all.min.js create mode 100644 node_modules/emailjs/node_modules/moment/min/lang/bg.js create mode 100644 node_modules/emailjs/node_modules/moment/min/lang/ca.js create mode 100644 node_modules/emailjs/node_modules/moment/min/lang/cv.js create mode 100644 node_modules/emailjs/node_modules/moment/min/lang/da.js create mode 100644 node_modules/emailjs/node_modules/moment/min/lang/de.js create mode 100644 node_modules/emailjs/node_modules/moment/min/lang/en-ca.js create mode 100644 node_modules/emailjs/node_modules/moment/min/lang/en-gb.js create mode 100644 node_modules/emailjs/node_modules/moment/min/lang/es.js create mode 100644 node_modules/emailjs/node_modules/moment/min/lang/eu.js create mode 100644 node_modules/emailjs/node_modules/moment/min/lang/fi.js create mode 100644 node_modules/emailjs/node_modules/moment/min/lang/fr-ca.js create mode 100644 node_modules/emailjs/node_modules/moment/min/lang/fr.js create mode 100644 node_modules/emailjs/node_modules/moment/min/lang/gl.js create mode 100644 node_modules/emailjs/node_modules/moment/min/lang/hu.js create mode 100644 node_modules/emailjs/node_modules/moment/min/lang/is.js create mode 100644 node_modules/emailjs/node_modules/moment/min/lang/it.js create mode 100644 node_modules/emailjs/node_modules/moment/min/lang/ja.js create mode 100644 node_modules/emailjs/node_modules/moment/min/lang/jp.js create mode 100644 node_modules/emailjs/node_modules/moment/min/lang/ko.js create mode 100644 node_modules/emailjs/node_modules/moment/min/lang/kr.js create mode 100644 node_modules/emailjs/node_modules/moment/min/lang/nb.js create mode 100644 node_modules/emailjs/node_modules/moment/min/lang/nl.js create mode 100644 node_modules/emailjs/node_modules/moment/min/lang/pl.js create mode 100644 node_modules/emailjs/node_modules/moment/min/lang/pt-br.js create mode 100644 node_modules/emailjs/node_modules/moment/min/lang/pt.js create mode 100644 node_modules/emailjs/node_modules/moment/min/lang/ru.js create mode 100644 node_modules/emailjs/node_modules/moment/min/lang/sv.js create mode 100644 node_modules/emailjs/node_modules/moment/min/lang/tr.js create mode 100644 node_modules/emailjs/node_modules/moment/min/lang/zh-cn.js create mode 100644 node_modules/emailjs/node_modules/moment/min/lang/zh-tw.js create mode 100644 node_modules/emailjs/node_modules/moment/min/moment.min.js create mode 100644 node_modules/emailjs/node_modules/moment/min/moment.min.pretty.js create mode 100644 node_modules/emailjs/node_modules/moment/moment.js create mode 100755 node_modules/emailjs/node_modules/moment/package.json create mode 100755 node_modules/emailjs/node_modules/moment/readme.md create mode 100644 node_modules/emailjs/node_modules/moment/test/filesize-diff.js create mode 100644 node_modules/emailjs/node_modules/moment/test/filesize-history.js create mode 100644 node_modules/emailjs/node_modules/moment/test/lang/bg.js create mode 100644 node_modules/emailjs/node_modules/moment/test/lang/ca.js create mode 100644 node_modules/emailjs/node_modules/moment/test/lang/cv.js create mode 100644 node_modules/emailjs/node_modules/moment/test/lang/da.js create mode 100644 node_modules/emailjs/node_modules/moment/test/lang/de.js create mode 100644 node_modules/emailjs/node_modules/moment/test/lang/en-ca.js create mode 100644 node_modules/emailjs/node_modules/moment/test/lang/en-gb.js create mode 100644 node_modules/emailjs/node_modules/moment/test/lang/en.js create mode 100644 node_modules/emailjs/node_modules/moment/test/lang/es.js create mode 100644 node_modules/emailjs/node_modules/moment/test/lang/eu.js create mode 100644 node_modules/emailjs/node_modules/moment/test/lang/fi.js create mode 100644 node_modules/emailjs/node_modules/moment/test/lang/fr-ca.js create mode 100644 node_modules/emailjs/node_modules/moment/test/lang/fr.js create mode 100644 node_modules/emailjs/node_modules/moment/test/lang/gl.js create mode 100644 node_modules/emailjs/node_modules/moment/test/lang/hu.js create mode 100644 node_modules/emailjs/node_modules/moment/test/lang/is.js create mode 100644 node_modules/emailjs/node_modules/moment/test/lang/it.js create mode 100644 node_modules/emailjs/node_modules/moment/test/lang/ja.js create mode 100644 node_modules/emailjs/node_modules/moment/test/lang/jp.js create mode 100644 node_modules/emailjs/node_modules/moment/test/lang/ko.js create mode 100644 node_modules/emailjs/node_modules/moment/test/lang/kr.js create mode 100644 node_modules/emailjs/node_modules/moment/test/lang/nb.js create mode 100644 node_modules/emailjs/node_modules/moment/test/lang/nl.js create mode 100644 node_modules/emailjs/node_modules/moment/test/lang/pl.js create mode 100644 node_modules/emailjs/node_modules/moment/test/lang/pt-br.js create mode 100644 node_modules/emailjs/node_modules/moment/test/lang/pt.js create mode 100644 node_modules/emailjs/node_modules/moment/test/lang/ru.js create mode 100644 node_modules/emailjs/node_modules/moment/test/lang/sv.js create mode 100644 node_modules/emailjs/node_modules/moment/test/lang/tr.js create mode 100644 node_modules/emailjs/node_modules/moment/test/lang/zh-cn.js create mode 100644 node_modules/emailjs/node_modules/moment/test/lang/zh-tw.js create mode 100644 node_modules/emailjs/node_modules/moment/test/moment/add_subtract.js create mode 100644 node_modules/emailjs/node_modules/moment/test/moment/create.js create mode 100644 node_modules/emailjs/node_modules/moment/test/moment/days_in_month.js create mode 100644 node_modules/emailjs/node_modules/moment/test/moment/diff.js create mode 100644 node_modules/emailjs/node_modules/moment/test/moment/duration.js create mode 100644 node_modules/emailjs/node_modules/moment/test/moment/format.js create mode 100644 node_modules/emailjs/node_modules/moment/test/moment/getters_setters.js create mode 100644 node_modules/emailjs/node_modules/moment/test/moment/humanize_duration.js create mode 100644 node_modules/emailjs/node_modules/moment/test/moment/is_moment.js create mode 100644 node_modules/emailjs/node_modules/moment/test/moment/is_valid.js create mode 100644 node_modules/emailjs/node_modules/moment/test/moment/lang.js create mode 100644 node_modules/emailjs/node_modules/moment/test/moment/leapyear.js create mode 100644 node_modules/emailjs/node_modules/moment/test/moment/mutable.js create mode 100644 node_modules/emailjs/node_modules/moment/test/moment/sod_eod.js create mode 100644 node_modules/emailjs/node_modules/moment/test/moment/utc.js create mode 100644 node_modules/emailjs/node_modules/moment/test/zone.js create mode 100644 node_modules/emailjs/package.json create mode 100644 node_modules/emailjs/smtp/address.js create mode 100644 node_modules/emailjs/smtp/client.js create mode 100644 node_modules/emailjs/smtp/error.js create mode 100644 node_modules/emailjs/smtp/message.js create mode 100644 node_modules/emailjs/smtp/response.js create mode 100644 node_modules/emailjs/smtp/smtp.js create mode 100644 node_modules/emailjs/smtp/tls.js create mode 100644 package.json create mode 100644 server_invite_via_email.js create mode 100644 static/js/invite_via_email.js create mode 100644 update.js diff --git a/.cache.json b/.cache.json new file mode 100644 index 0000000..fff0669 --- /dev/null +++ b/.cache.json @@ -0,0 +1 @@ +{"_id":"ep_disable_change_author_name","_rev":"3-e6170e5fa382f32e08d74f2d0087b9eb","name":"ep_disable_change_author_name","description":"A plugin to stop users from being able to change their names","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"ep_disable_change_author_name","description":"A plugin to stop users from being able to change their names","version":"0.0.1","author":{"name":"johnyma22","email":"john@mclear.co.uk","url":"John McLear"},"contributors":[],"dependencies":{},"engines":{"node":">= 0.4.1 < 0.7.0"},"_npmUser":{"name":"johnyma22","email":"john@mclear.co.uk"},"_id":"ep_disable_change_author_name@0.0.1","devDependencies":{},"optionalDependencies":{},"_engineSupported":true,"_npmVersion":"1.1.0-2","_nodeVersion":"v0.6.8","_defaultsLoaded":true,"dist":{"shasum":"02bb143797ba30b00a63fa79707ee322aba151f4","tarball":"http://registry.npmjs.org/ep_disable_change_author_name/-/ep_disable_change_author_name-0.0.1.tgz"},"readme":"","maintainers":[{"name":"johnyma22","email":"john@mclear.co.uk"}],"directories":{}}},"readme":"","maintainers":[{"name":"johnyma22","email":"john@mclear.co.uk"}],"time":{"0.0.1":"2012-04-05T09:57:28.556Z"},"author":{"name":"johnyma22","email":"john@mclear.co.uk","url":"John McLear"},"_etag":"\"83VMCMJ7WQURU3FO0V9K41UII\""} \ No newline at end of file diff --git a/.ep_initialized b/.ep_initialized new file mode 100644 index 0000000..348ebd9 --- /dev/null +++ b/.ep_initialized @@ -0,0 +1 @@ +done \ No newline at end of file diff --git a/ep.json b/ep.json new file mode 100644 index 0000000..56572ac --- /dev/null +++ b/ep.json @@ -0,0 +1,12 @@ +{ + "parts":[ + { + "name": "email_notifications", + "hooks": { + "padUpdate": "ep_email_notifications/update" + }, + "client_hooks": { + } + } + ] +} diff --git a/node_modules/buffertools/.mailmap b/node_modules/buffertools/.mailmap new file mode 100644 index 0000000..95c708b --- /dev/null +++ b/node_modules/buffertools/.mailmap @@ -0,0 +1,2 @@ +# update AUTHORS with: +# git log --all --reverse --format='%aN <%aE>' | perl -ne 'BEGIN{print "# Authors ordered by first contribution.\n"} print unless $h{$_}; $h{$_} = 1' > AUTHORS diff --git a/node_modules/buffertools/.npmignore b/node_modules/buffertools/.npmignore new file mode 100644 index 0000000..057457f --- /dev/null +++ b/node_modules/buffertools/.npmignore @@ -0,0 +1 @@ +buffertools.node diff --git a/node_modules/buffertools/AUTHORS b/node_modules/buffertools/AUTHORS new file mode 100644 index 0000000..c9d45f8 --- /dev/null +++ b/node_modules/buffertools/AUTHORS @@ -0,0 +1,4 @@ +# Authors ordered by first contribution. +Ben Noordhuis +Nathan Rajlich +Stefan Thomas diff --git a/node_modules/buffertools/BoyerMoore.h b/node_modules/buffertools/BoyerMoore.h new file mode 100644 index 0000000..830f4eb --- /dev/null +++ b/node_modules/buffertools/BoyerMoore.h @@ -0,0 +1,127 @@ +/* adapted from http://en.wikipedia.org/wiki/Boyer–Moore_string_search_algorithm */ +#ifndef BOYER_MOORE_H +#define BOYER_MOORE_H + +#include +#include +#include + +#define ALPHABET_SIZE (1 << CHAR_BIT) + +static void compute_prefix(const uint8_t* str, size_t size, int result[]) { + size_t q; + int k; + result[0] = 0; + + k = 0; + for (q = 1; q < size; q++) { + while (k > 0 && str[k] != str[q]) + k = result[k-1]; + + if (str[k] == str[q]) + k++; + + result[q] = k; + } +} + +static void prepare_badcharacter_heuristic(const uint8_t *str, size_t size, int result[ALPHABET_SIZE]) { + size_t i; + + for (i = 0; i < ALPHABET_SIZE; i++) + result[i] = -1; + + for (i = 0; i < size; i++) + result[str[i]] = i; +} + +void prepare_goodsuffix_heuristic(const uint8_t *normal, const size_t size, int result[]) { + const uint8_t *left = normal; + const uint8_t *right = left + size; + uint8_t * reversed = new uint8_t[size+1]; + uint8_t *tmp = reversed + size; + size_t i; + + /* reverse string */ + *tmp = 0; + while (left < right) + *(--tmp) = *(left++); + + int * prefix_normal = new int[size]; + int * prefix_reversed = new int[size]; + + compute_prefix(normal, size, prefix_normal); + compute_prefix(reversed, size, prefix_reversed); + + for (i = 0; i <= size; i++) { + result[i] = size - prefix_normal[size-1]; + } + + for (i = 0; i < size; i++) { + const int j = size - prefix_reversed[i]; + const int k = i - prefix_reversed[i]+1; + + if (result[j] > k) + result[j] = k; + } + + delete[] reversed; + delete[] prefix_normal; + delete[] prefix_reversed; +} + +/* +* Boyer-Moore search algorithm +*/ +const uint8_t *boyermoore_search(const uint8_t *haystack, size_t haystack_len, const uint8_t *needle, size_t needle_len) { + /* + * Simple checks + */ + if(haystack_len == 0) + return NULL; + if(needle_len == 0) + return NULL; + if(needle_len > haystack_len) + return NULL; + + /* + * Initialize heuristics + */ + int badcharacter[ALPHABET_SIZE]; + int * goodsuffix = new int[needle_len+1]; + + prepare_badcharacter_heuristic(needle, needle_len, badcharacter); + prepare_goodsuffix_heuristic(needle, needle_len, goodsuffix); + + /* + * Boyer-Moore search + */ + size_t s = 0; + while(s <= (haystack_len - needle_len)) + { + size_t j = needle_len; + while(j > 0 && needle[j-1] == haystack[s+j-1]) + j--; + + if(j > 0) + { + int k = badcharacter[haystack[s+j-1]]; + int m; + if(k < (int)j && (m = j-k-1) > goodsuffix[j]) + s+= m; + else + s+= goodsuffix[j]; + } + else + { + delete[] goodsuffix; + return haystack + s; + } + } + + delete[] goodsuffix; + /* not found */ + return NULL; +} + +#endif /* BoyerMoore.h */ diff --git a/node_modules/buffertools/README.md b/node_modules/buffertools/README.md new file mode 100644 index 0000000..929d0be --- /dev/null +++ b/node_modules/buffertools/README.md @@ -0,0 +1,119 @@ +# node-buffertools + +Utilities for manipulating buffers. + +## Installing the module + +Easy! With [npm](http://npmjs.org/): + + npm install buffertools + +From source: + + node-gyp configure + node-gyp build + +Now you can include the module in your project. + + require('buffertools'); + new Buffer(42).clear(); + +## Methods + +Note that most methods that take a buffer as an argument, will also accept a string. + +### Buffer.clear() + +Clear the buffer. This is equivalent to `Buffer.fill(0)`. +Returns the buffer object so you can chain method calls. + +### Buffer.compare(buffer|string) + +Lexicographically compare two buffers. Returns a number less than zero +if a < b, zero if a == b or greater than zero if a > b. + +Buffers are considered equal when they are of the same length and contain +the same binary data. + +Smaller buffers are considered to be less than larger ones. Some buffers +find this hurtful. + +### Buffer.concat(a, b, c, ...) +### buffertools.concat(a, b, c, ...) + +Concatenate two or more buffers/strings and return the result. Example: + + // identical to new Buffer('foobarbaz') + a = new Buffer('foo'); + b = new Buffer('bar'); + c = a.concat(b, 'baz'); + console.log(a, b, c); // "foo bar foobarbaz" + + // static variant + buffertools.concat('foo', new Buffer('bar'), 'baz'); + +### Buffer.equals(buffer|string) + +Returns true if this buffer equals the argument, false otherwise. + +Buffers are considered equal when they are of the same length and contain +the same binary data. + +Caveat emptor: If your buffers contain strings with different character encodings, +they will most likely *not* be equal. + +### Buffer.fill(integer|string|buffer) + +Fill the buffer (repeatedly if necessary) with the argument. +Returns the buffer object so you can chain method calls. + +### Buffer.fromHex() + +Assumes this buffer contains hexadecimal data (packed, no whitespace) +and decodes it into binary data. Returns a new buffer with the decoded +content. Throws an exception if non-hexadecimal data is encountered. + +### Buffer.indexOf(buffer|string, [start=0]) + +Search this buffer for the first occurrence of the argument, starting at +offset `start`. Returns the zero-based index or -1 if there is no match. + +### Buffer.reverse() + +Reverse the content of the buffer in place. Example: + + b = new Buffer('live'); + b.reverse(); + console.log(b); // "evil" + +### Buffer.toHex() + +Returns the contents of this buffer encoded as a hexadecimal string. + +## Classes + +Singular, actually. To wit: + +## WritableBufferStream + +This is a regular node.js [writable stream](http://nodejs.org/docs/v0.3.4/api/streams.html#writable_Stream) +that accumulates the data it receives into a buffer. + +Example usage: + + // slurp stdin into a buffer + process.stdin.resume(); + ostream = new WritableBufferStream(); + util.pump(process.stdin, ostream); + console.log(ostream.getBuffer()); + +The stream never emits 'error' or 'drain' events. + +### WritableBufferStream.getBuffer() + +Return the data accumulated so far as a buffer. + +## TODO + +* Logical operations on buffers (AND, OR, XOR). +* Add lastIndexOf() functions. diff --git a/node_modules/buffertools/binding.gyp b/node_modules/buffertools/binding.gyp new file mode 100644 index 0000000..17e337b --- /dev/null +++ b/node_modules/buffertools/binding.gyp @@ -0,0 +1,8 @@ +{ + 'targets': [ + { + 'target_name': 'buffertools', + 'sources': [ 'buffertools.cc' ] + } + ] +} diff --git a/node_modules/buffertools/buffertools.cc b/node_modules/buffertools/buffertools.cc new file mode 100644 index 0000000..ddfbf88 --- /dev/null +++ b/node_modules/buffertools/buffertools.cc @@ -0,0 +1,350 @@ +#include +#include +#include + +#include +#include +#include +#include + +#include "BoyerMoore.h" + +using namespace v8; +using namespace node; + +namespace { + +// this is an application of the Curiously Recurring Template Pattern +template struct UnaryAction { + Handle apply(Handle& buffer, const Arguments& args, HandleScope& scope); + + Handle operator()(const Arguments& args) { + HandleScope scope; + + Local self = args.This(); + if (!Buffer::HasInstance(self)) { + return ThrowException(Exception::TypeError(String::New( + "Argument should be a buffer object."))); + } + + return static_cast(this)->apply(self, args, scope); + } +}; + +template struct BinaryAction { + Handle apply(Handle& buffer, const uint8_t* data, size_t size, const Arguments& args, HandleScope& scope); + + Handle operator()(const Arguments& args) { + HandleScope scope; + + Local self = args.This(); + if (!Buffer::HasInstance(self)) { + return ThrowException(Exception::TypeError(String::New( + "Argument should be a buffer object."))); + } + + if (args[0]->IsString()) { + String::Utf8Value s(args[0]->ToString()); + return static_cast(this)->apply(self, (uint8_t*) *s, s.length(), args, scope); + } + if (Buffer::HasInstance(args[0])) { + Local other = args[0]->ToObject(); + return static_cast(this)->apply( + self, (const uint8_t*) Buffer::Data(other), Buffer::Length(other), args, scope); + } + + static Persistent illegalArgumentException = Persistent::New(String::New( + "Second argument must be a string or a buffer.")); + return ThrowException(Exception::TypeError(illegalArgumentException)); + } +}; + +// +// helper functions +// +Handle clear(Handle& buffer, int c) { + size_t length = Buffer::Length(buffer); + uint8_t* data = (uint8_t*) Buffer::Data(buffer); + memset(data, c, length); + return buffer; +} + +Handle fill(Handle& buffer, void* pattern, size_t size) { + size_t length = Buffer::Length(buffer); + uint8_t* data = (uint8_t*) Buffer::Data(buffer); + + if (size >= length) { + memcpy(data, pattern, length); + } else { + const int n_copies = length / size; + const int remainder = length % size; + for (int i = 0; i < n_copies; i++) { + memcpy(data + size * i, pattern, size); + } + memcpy(data + size * n_copies, pattern, remainder); + } + + return buffer; +} + +int compare(Handle& buffer, const uint8_t* data2, size_t length2) { + size_t length = Buffer::Length(buffer); + if (length != length2) { + return length > length2 ? 1 : -1; + } + + const uint8_t* data = (const uint8_t*) Buffer::Data(buffer); + return memcmp(data, data2, length); +} + +// +// actions +// +struct ClearAction: UnaryAction { + Handle apply(Handle& buffer, const Arguments& args, HandleScope& scope) { + return clear(buffer, 0); + } +}; + +struct FillAction: UnaryAction { + Handle apply(Handle& buffer, const Arguments& args, HandleScope& scope) { + if (args[0]->IsInt32()) { + int c = args[0]->ToInt32()->Int32Value(); + return clear(buffer, c); + } + + if (args[0]->IsString()) { + String::Utf8Value s(args[0]->ToString()); + return fill(buffer, *s, s.length()); + } + + if (Buffer::HasInstance(args[0])) { + Handle other = args[0]->ToObject(); + size_t length = Buffer::Length(other); + uint8_t* data = (uint8_t*) Buffer::Data(other); + return fill(buffer, data, length); + } + + static Persistent illegalArgumentException = Persistent::New(String::New( + "Second argument should be either a string, a buffer or an integer.")); + return ThrowException(Exception::TypeError(illegalArgumentException)); + } +}; + +struct ReverseAction: UnaryAction { + // O(n/2) for all cases which is okay, might be optimized some more with whole-word swaps + // XXX won't this trash the L1 cache something awful? + Handle apply(Handle& buffer, const Arguments& args, HandleScope& scope) { + uint8_t* head = (uint8_t*) Buffer::Data(buffer); + uint8_t* tail = head + Buffer::Length(buffer) - 1; + + // xor swap, just because I can + while (head < tail) *head ^= *tail, *tail ^= *head, *head ^= *tail, ++head, --tail; + + return buffer; + } +}; + +struct EqualsAction: BinaryAction { + Handle apply(Handle& buffer, const uint8_t* data, size_t size, const Arguments& args, HandleScope& scope) { + return compare(buffer, data, size) == 0 ? True() : False(); + } +}; + +struct CompareAction: BinaryAction { + Handle apply(Handle& buffer, const uint8_t* data, size_t size, const Arguments& args, HandleScope& scope) { + return scope.Close(Integer::New(compare(buffer, data, size))); + } +}; + +struct IndexOfAction: BinaryAction { + Handle apply(Handle& buffer, const uint8_t* data2, size_t size2, const Arguments& args, HandleScope& scope) { + const uint8_t* data = (const uint8_t*) Buffer::Data(buffer); + const size_t size = Buffer::Length(buffer); + + int32_t start = args[1]->Int32Value(); + + if (start < 0) + start = size - std::min(size, -start); + else if (static_cast(start) > size) + start = size; + + const uint8_t* p = boyermoore_search( + data + start, size - start, data2, size2); + + const ptrdiff_t offset = p ? (p - data) : -1; + return scope.Close(Integer::New(offset)); + } +}; + +static char toHexTable[] = "0123456789abcdef"; + +// CHECKME is this cache efficient? +static char fromHexTable[] = { + -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, + -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,-1,-1,-1,-1,-1,-1,-1, + 10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, + 10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, + -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, + -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, + -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, + -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 +}; + +inline Handle decodeHex(const uint8_t* const data, const size_t size, const Arguments& args, HandleScope& scope) { + if (size & 1) { + return ThrowException(Exception::Error(String::New( + "Odd string length, this is not hexadecimal data."))); + } + + if (size == 0) { + return String::Empty(); + } + + Handle& buffer = Buffer::New(size / 2)->handle_; + + uint8_t *src = (uint8_t *) data; + uint8_t *dst = (uint8_t *) (const uint8_t*) Buffer::Data(buffer); + + for (size_t i = 0; i < size; i += 2) { + int a = fromHexTable[*src++]; + int b = fromHexTable[*src++]; + + if (a == -1 || b == -1) { + return ThrowException(Exception::Error(String::New( + "This is not hexadecimal data."))); + } + + *dst++ = b | (a << 4); + } + + return buffer; +} + +struct FromHexAction: UnaryAction { + Handle apply(Handle& buffer, const Arguments& args, HandleScope& scope) { + const uint8_t* data = (const uint8_t*) Buffer::Data(buffer); + size_t length = Buffer::Length(buffer); + return decodeHex(data, length, args, scope); + } +}; + +struct ToHexAction: UnaryAction { + Handle apply(Handle& buffer, const Arguments& args, HandleScope& scope) { + const size_t size = Buffer::Length(buffer); + const uint8_t* data = (const uint8_t*) Buffer::Data(buffer); + + if (size == 0) { + return String::Empty(); + } + + std::string s(size * 2, 0); + for (size_t i = 0; i < size; ++i) { + const uint8_t c = (uint8_t) data[i]; + s[i * 2] = toHexTable[c >> 4]; + s[i * 2 + 1] = toHexTable[c & 15]; + } + + return scope.Close(String::New(s.c_str(), s.size())); + } +}; + +// +// V8 function callbacks +// +Handle Clear(const Arguments& args) { + return ClearAction()(args); +} + +Handle Fill(const Arguments& args) { + return FillAction()(args); +} + +Handle Reverse(const Arguments& args) { + return ReverseAction()(args); +} + +Handle Equals(const Arguments& args) { + return EqualsAction()(args); +} + +Handle Compare(const Arguments& args) { + return CompareAction()(args); +} + +Handle IndexOf(const Arguments& args) { + return IndexOfAction()(args); +} + +Handle FromHex(const Arguments& args) { + return FromHexAction()(args); +} + +Handle ToHex(const Arguments& args) { + return ToHexAction()(args); +} + +Handle Concat(const Arguments& args) { + HandleScope scope; + + size_t size = 0; + for (int index = 0, length = args.Length(); index < length; ++index) { + Local arg = args[index]; + if (arg->IsString()) { + // Utf8Length() because we need the length in bytes, not characters + size += arg->ToString()->Utf8Length(); + } + else if (Buffer::HasInstance(arg)) { + size += Buffer::Length(arg->ToObject()); + } + else { + std::stringstream s; + s << "Argument #" << index << " is neither a string nor a buffer object."; + return ThrowException( + Exception::TypeError( + String::New(s.str().c_str()))); + } + } + + Buffer& dst = *Buffer::New(size); + uint8_t* s = (uint8_t*) Buffer::Data(dst.handle_); + + for (int index = 0, length = args.Length(); index < length; ++index) { + Local arg = args[index]; + if (arg->IsString()) { + String::Utf8Value v(arg->ToString()); + memcpy(s, *v, v.length()); + s += v.length(); + } + else if (Buffer::HasInstance(arg)) { + Local b = arg->ToObject(); + const uint8_t* data = (const uint8_t*) Buffer::Data(b); + size_t length = Buffer::Length(b); + memcpy(s, data, length); + s += length; + } + else { + return ThrowException(Exception::Error(String::New( + "Congratulations! You have run into a bug: argument is neither a string nor a buffer object. " + "Please make the world a better place and report it."))); + } + } + + return scope.Close(dst.handle_); +} + +void RegisterModule(Handle target) { + target->Set(String::NewSymbol("concat"), FunctionTemplate::New(Concat)->GetFunction()); + target->Set(String::NewSymbol("fill"), FunctionTemplate::New(Fill)->GetFunction()); + target->Set(String::NewSymbol("clear"), FunctionTemplate::New(Clear)->GetFunction()); + target->Set(String::NewSymbol("reverse"), FunctionTemplate::New(Reverse)->GetFunction()); + target->Set(String::NewSymbol("equals"), FunctionTemplate::New(Equals)->GetFunction()); + target->Set(String::NewSymbol("compare"), FunctionTemplate::New(Compare)->GetFunction()); + target->Set(String::NewSymbol("indexOf"), FunctionTemplate::New(IndexOf)->GetFunction()); + target->Set(String::NewSymbol("fromHex"), FunctionTemplate::New(FromHex)->GetFunction()); + target->Set(String::NewSymbol("toHex"), FunctionTemplate::New(ToHex)->GetFunction()); +} + +} // anonymous namespace + +NODE_MODULE(buffertools, RegisterModule) diff --git a/node_modules/buffertools/buffertools.js b/node_modules/buffertools/buffertools.js new file mode 100644 index 0000000..e1736df --- /dev/null +++ b/node_modules/buffertools/buffertools.js @@ -0,0 +1,90 @@ +buffertools = require('./build/Release/buffertools.node'); +SlowBuffer = require('buffer').SlowBuffer; +Buffer = require('buffer').Buffer; + +// requires node 3.1 +events = require('events'); +util = require('util'); + +// extend object prototypes +for (var key in buffertools) { + var val = buffertools[key]; + SlowBuffer.prototype[key] = val; + Buffer.prototype[key] = val; + exports[key] = val; +} + +// bug fix, see https://github.com/bnoordhuis/node-buffertools/issues/#issue/6 +Buffer.prototype.concat = SlowBuffer.prototype.concat = function() { + var args = [this].concat(Array.prototype.slice.call(arguments)); + return buffertools.concat.apply(buffertools, args); +}; + +// +// WritableBufferStream +// +// - never emits 'error' +// - never emits 'drain' +// +function WritableBufferStream() { + this.writable = true; + this.buffer = null; +} + +util.inherits(WritableBufferStream, events.EventEmitter); + +WritableBufferStream.prototype._append = function(buffer, encoding) { + if (!this.writable) { + throw new Error('Stream is not writable.'); + } + + if (Buffer.isBuffer(buffer)) { + // no action required + } + else if (typeof buffer == 'string') { + // TODO optimize + buffer = new Buffer(buffer, encoding || 'utf8'); + } + else { + throw new Error('Argument should be either a buffer or a string.'); + } + + // FIXME optimize! + if (this.buffer) { + this.buffer = buffertools.concat(this.buffer, buffer); + } + else { + this.buffer = new Buffer(buffer.length); + buffer.copy(this.buffer); + } +}; + +WritableBufferStream.prototype.write = function(buffer, encoding) { + this._append(buffer, encoding); + + // signal that it's safe to immediately write again + return true; +}; + +WritableBufferStream.prototype.end = function(buffer, encoding) { + if (buffer) { + this._append(buffer, encoding); + } + + this.emit('close'); + + this.writable = false; +}; + +WritableBufferStream.prototype.getBuffer = function() { + if (this.buffer) { + return this.buffer; + } + return new Buffer(0); +}; + +WritableBufferStream.prototype.toString = function() { + return this.getBuffer().toString(); +}; + +exports.WritableBufferStream = WritableBufferStream; diff --git a/node_modules/buffertools/build/Makefile b/node_modules/buffertools/build/Makefile new file mode 100644 index 0000000..425f95a --- /dev/null +++ b/node_modules/buffertools/build/Makefile @@ -0,0 +1,334 @@ +# We borrow heavily from the kernel build setup, though we are simpler since +# we don't have Kconfig tweaking settings on us. + +# The implicit make rules have it looking for RCS files, among other things. +# We instead explicitly write all the rules we care about. +# It's even quicker (saves ~200ms) to pass -r on the command line. +MAKEFLAGS=-r + +# The source directory tree. +srcdir := .. +abs_srcdir := $(abspath $(srcdir)) + +# The name of the builddir. +builddir_name ?= . + +# The V=1 flag on command line makes us verbosely print command lines. +ifdef V + quiet= +else + quiet=quiet_ +endif + +# Specify BUILDTYPE=Release on the command line for a release build. +BUILDTYPE ?= Release + +# Directory all our build output goes into. +# Note that this must be two directories beneath src/ for unit tests to pass, +# as they reach into the src/ directory for data with relative paths. +builddir ?= $(builddir_name)/$(BUILDTYPE) +abs_builddir := $(abspath $(builddir)) +depsdir := $(builddir)/.deps + +# Object output directory. +obj := $(builddir)/obj +abs_obj := $(abspath $(obj)) + +# We build up a list of every single one of the targets so we can slurp in the +# generated dependency rule Makefiles in one pass. +all_deps := + + + +# C++ apps need to be linked with g++. +# +# Note: flock is used to seralize linking. Linking is a memory-intensive +# process so running parallel links can often lead to thrashing. To disable +# the serialization, override LINK via an envrionment variable as follows: +# +# export LINK=g++ +# +# This will allow make to invoke N linker processes as specified in -jN. +LINK ?= flock $(builddir)/linker.lock $(CXX) + +CC.target ?= $(CC) +CFLAGS.target ?= $(CFLAGS) +CXX.target ?= $(CXX) +CXXFLAGS.target ?= $(CXXFLAGS) +LINK.target ?= $(LINK) +LDFLAGS.target ?= $(LDFLAGS) +AR.target ?= $(AR) +ARFLAGS.target ?= crsT + +# N.B.: the logic of which commands to run should match the computation done +# in gyp's make.py where ARFLAGS.host etc. is computed. +# TODO(evan): move all cross-compilation logic to gyp-time so we don't need +# to replicate this environment fallback in make as well. +CC.host ?= gcc +CFLAGS.host ?= +CXX.host ?= g++ +CXXFLAGS.host ?= +LINK.host ?= g++ +LDFLAGS.host ?= +AR.host ?= ar +ARFLAGS.host := crsT + +# Define a dir function that can handle spaces. +# http://www.gnu.org/software/make/manual/make.html#Syntax-of-Functions +# "leading spaces cannot appear in the text of the first argument as written. +# These characters can be put into the argument value by variable substitution." +empty := +space := $(empty) $(empty) + +# http://stackoverflow.com/questions/1189781/using-make-dir-or-notdir-on-a-path-with-spaces +replace_spaces = $(subst $(space),?,$1) +unreplace_spaces = $(subst ?,$(space),$1) +dirx = $(call unreplace_spaces,$(dir $(call replace_spaces,$1))) + +# Flags to make gcc output dependency info. Note that you need to be +# careful here to use the flags that ccache and distcc can understand. +# We write to a dep file on the side first and then rename at the end +# so we can't end up with a broken dep file. +depfile = $(depsdir)/$(call replace_spaces,$@).d +DEPFLAGS = -MMD -MF $(depfile).raw + +# We have to fixup the deps output in a few ways. +# (1) the file output should mention the proper .o file. +# ccache or distcc lose the path to the target, so we convert a rule of +# the form: +# foobar.o: DEP1 DEP2 +# into +# path/to/foobar.o: DEP1 DEP2 +# (2) we want missing files not to cause us to fail to build. +# We want to rewrite +# foobar.o: DEP1 DEP2 \ +# DEP3 +# to +# DEP1: +# DEP2: +# DEP3: +# so if the files are missing, they're just considered phony rules. +# We have to do some pretty insane escaping to get those backslashes +# and dollar signs past make, the shell, and sed at the same time. +# Doesn't work with spaces, but that's fine: .d files have spaces in +# their names replaced with other characters. +define fixup_dep +# The depfile may not exist if the input file didn't have any #includes. +touch $(depfile).raw +# Fixup path as in (1). +sed -e "s|^$(notdir $@)|$@|" $(depfile).raw >> $(depfile) +# Add extra rules as in (2). +# We remove slashes and replace spaces with new lines; +# remove blank lines; +# delete the first line and append a colon to the remaining lines. +sed -e 's|\\||' -e 'y| |\n|' $(depfile).raw |\ + grep -v '^$$' |\ + sed -e 1d -e 's|$$|:|' \ + >> $(depfile) +rm $(depfile).raw +endef + +# Command definitions: +# - cmd_foo is the actual command to run; +# - quiet_cmd_foo is the brief-output summary of the command. + +quiet_cmd_cc = CC($(TOOLSET)) $@ +cmd_cc = $(CC.$(TOOLSET)) $(GYP_CFLAGS) $(DEPFLAGS) $(CFLAGS.$(TOOLSET)) -c -o $@ $< + +quiet_cmd_cxx = CXX($(TOOLSET)) $@ +cmd_cxx = $(CXX.$(TOOLSET)) $(GYP_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $< + +quiet_cmd_touch = TOUCH $@ +cmd_touch = touch $@ + +quiet_cmd_copy = COPY $@ +# send stderr to /dev/null to ignore messages when linking directories. +cmd_copy = ln -f "$<" "$@" 2>/dev/null || (rm -rf "$@" && cp -af "$<" "$@") + +quiet_cmd_alink = AR($(TOOLSET)) $@ +cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) $(ARFLAGS.$(TOOLSET)) $@ $(filter %.o,$^) + +# Due to circular dependencies between libraries :(, we wrap the +# special "figure out circular dependencies" flags around the entire +# input list during linking. +quiet_cmd_link = LINK($(TOOLSET)) $@ +cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS) + +# We support two kinds of shared objects (.so): +# 1) shared_library, which is just bundling together many dependent libraries +# into a link line. +# 2) loadable_module, which is generating a module intended for dlopen(). +# +# They differ only slightly: +# In the former case, we want to package all dependent code into the .so. +# In the latter case, we want to package just the API exposed by the +# outermost module. +# This means shared_library uses --whole-archive, while loadable_module doesn't. +# (Note that --whole-archive is incompatible with the --start-group used in +# normal linking.) + +# Other shared-object link notes: +# - Set SONAME to the library filename so our binaries don't reference +# the local, absolute paths used on the link command-line. +quiet_cmd_solink = SOLINK($(TOOLSET)) $@ +cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--whole-archive $(LD_INPUTS) -Wl,--no-whole-archive $(LIBS) + +quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@ +cmd_solink_module = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -o $@ -Wl,--start-group $(filter-out FORCE_DO_CMD, $^) -Wl,--end-group $(LIBS) + + +# Define an escape_quotes function to escape single quotes. +# This allows us to handle quotes properly as long as we always use +# use single quotes and escape_quotes. +escape_quotes = $(subst ','\'',$(1)) +# This comment is here just to include a ' to unconfuse syntax highlighting. +# Define an escape_vars function to escape '$' variable syntax. +# This allows us to read/write command lines with shell variables (e.g. +# $LD_LIBRARY_PATH), without triggering make substitution. +escape_vars = $(subst $$,$$$$,$(1)) +# Helper that expands to a shell command to echo a string exactly as it is in +# make. This uses printf instead of echo because printf's behaviour with respect +# to escape sequences is more portable than echo's across different shells +# (e.g., dash, bash). +exact_echo = printf '%s\n' '$(call escape_quotes,$(1))' + +# Helper to compare the command we're about to run against the command +# we logged the last time we ran the command. Produces an empty +# string (false) when the commands match. +# Tricky point: Make has no string-equality test function. +# The kernel uses the following, but it seems like it would have false +# positives, where one string reordered its arguments. +# arg_check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \ +# $(filter-out $(cmd_$@), $(cmd_$(1)))) +# We instead substitute each for the empty string into the other, and +# say they're equal if both substitutions produce the empty string. +# .d files contain ? instead of spaces, take that into account. +command_changed = $(or $(subst $(cmd_$(1)),,$(cmd_$(call replace_spaces,$@))),\ + $(subst $(cmd_$(call replace_spaces,$@)),,$(cmd_$(1)))) + +# Helper that is non-empty when a prerequisite changes. +# Normally make does this implicitly, but we force rules to always run +# so we can check their command lines. +# $? -- new prerequisites +# $| -- order-only dependencies +prereq_changed = $(filter-out FORCE_DO_CMD,$(filter-out $|,$?)) + +# Helper that executes all postbuilds, and deletes the output file when done +# if any of the postbuilds failed. +define do_postbuilds + @E=0;\ + for p in $(POSTBUILDS); do\ + eval $$p;\ + F=$$?;\ + if [ $$F -ne 0 ]; then\ + E=$$F;\ + fi;\ + done;\ + if [ $$E -ne 0 ]; then\ + rm -rf "$@";\ + exit $$E;\ + fi +endef + +# do_cmd: run a command via the above cmd_foo names, if necessary. +# Should always run for a given target to handle command-line changes. +# Second argument, if non-zero, makes it do asm/C/C++ dependency munging. +# Third argument, if non-zero, makes it do POSTBUILDS processing. +# Note: We intentionally do NOT call dirx for depfile, since it contains ? for +# spaces already and dirx strips the ? characters. +define do_cmd +$(if $(or $(command_changed),$(prereq_changed)), + @$(call exact_echo, $($(quiet)cmd_$(1))) + @mkdir -p "$(call dirx,$@)" "$(dir $(depfile))" + $(if $(findstring flock,$(word 1,$(cmd_$1))), + @$(cmd_$(1)) + @echo " $(quiet_cmd_$(1)): Finished", + @$(cmd_$(1)) + ) + @$(call exact_echo,$(call escape_vars,cmd_$(call replace_spaces,$@) := $(cmd_$(1)))) > $(depfile) + @$(if $(2),$(fixup_dep)) + $(if $(and $(3), $(POSTBUILDS)), + $(call do_postbuilds) + ) +) +endef + +# Declare the "all" target first so it is the default, +# even though we don't have the deps yet. +.PHONY: all +all: + +# make looks for ways to re-generate included makefiles, but in our case, we +# don't have a direct way. Explicitly telling make that it has nothing to do +# for them makes it go faster. +%.d: ; + +# Use FORCE_DO_CMD to force a target to run. Should be coupled with +# do_cmd. +.PHONY: FORCE_DO_CMD +FORCE_DO_CMD: + +TOOLSET := target +# Suffix rules, putting all outputs into $(obj). +$(obj).$(TOOLSET)/%.o: $(srcdir)/%.c FORCE_DO_CMD + @$(call do_cmd,cc,1) +$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cc FORCE_DO_CMD + @$(call do_cmd,cxx,1) +$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cpp FORCE_DO_CMD + @$(call do_cmd,cxx,1) +$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cxx FORCE_DO_CMD + @$(call do_cmd,cxx,1) +$(obj).$(TOOLSET)/%.o: $(srcdir)/%.S FORCE_DO_CMD + @$(call do_cmd,cc,1) +$(obj).$(TOOLSET)/%.o: $(srcdir)/%.s FORCE_DO_CMD + @$(call do_cmd,cc,1) + +# Try building from generated source, too. +$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD + @$(call do_cmd,cc,1) +$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cc FORCE_DO_CMD + @$(call do_cmd,cxx,1) +$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cpp FORCE_DO_CMD + @$(call do_cmd,cxx,1) +$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cxx FORCE_DO_CMD + @$(call do_cmd,cxx,1) +$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.S FORCE_DO_CMD + @$(call do_cmd,cc,1) +$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.s FORCE_DO_CMD + @$(call do_cmd,cc,1) + +$(obj).$(TOOLSET)/%.o: $(obj)/%.c FORCE_DO_CMD + @$(call do_cmd,cc,1) +$(obj).$(TOOLSET)/%.o: $(obj)/%.cc FORCE_DO_CMD + @$(call do_cmd,cxx,1) +$(obj).$(TOOLSET)/%.o: $(obj)/%.cpp FORCE_DO_CMD + @$(call do_cmd,cxx,1) +$(obj).$(TOOLSET)/%.o: $(obj)/%.cxx FORCE_DO_CMD + @$(call do_cmd,cxx,1) +$(obj).$(TOOLSET)/%.o: $(obj)/%.S FORCE_DO_CMD + @$(call do_cmd,cc,1) +$(obj).$(TOOLSET)/%.o: $(obj)/%.s FORCE_DO_CMD + @$(call do_cmd,cc,1) + + +ifeq ($(strip $(foreach prefix,$(NO_LOAD),\ + $(findstring $(join ^,$(prefix)),\ + $(join ^,buffertools.target.mk)))),) + include buffertools.target.mk +endif + +quiet_cmd_regen_makefile = ACTION Regenerating $@ +cmd_regen_makefile = /home/jose/.node-gyp/0.8.14/tools/gyp/gyp -fmake --ignore-environment "--toplevel-dir=." -I/home/jose/etherpad-lite-dev/node_modules/ep_invite_via_email/node_modules/buffertools/build/config.gypi -I/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi -I/home/jose/.node-gyp/0.8.14/common.gypi "--depth=." "-Goutput_dir=." "--generator-output=build" "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/home/jose/.node-gyp/0.8.14" "-Dmodule_root_dir=/home/jose/etherpad-lite-dev/node_modules/ep_invite_via_email/node_modules/buffertools" binding.gyp +Makefile: $(srcdir)/../../../../../.node-gyp/0.8.14/common.gypi $(srcdir)/../../../../../../../usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi $(srcdir)/build/config.gypi $(srcdir)/binding.gyp + $(call do_cmd,regen_makefile) + +# "all" is a concatenation of the "all" targets from all the included +# sub-makefiles. This is just here to clarify. +all: + +# Add in dependency-tracking rules. $(all_deps) is the list of every single +# target in our tree. Only consider the ones with .d (dependency) info: +d_files := $(wildcard $(foreach f,$(all_deps),$(depsdir)/$(f).d)) +ifneq ($(d_files),) + include $(d_files) +endif diff --git a/node_modules/buffertools/build/Release/.deps/Release/buffertools.node.d b/node_modules/buffertools/build/Release/.deps/Release/buffertools.node.d new file mode 100644 index 0000000..fe81a4c --- /dev/null +++ b/node_modules/buffertools/build/Release/.deps/Release/buffertools.node.d @@ -0,0 +1 @@ +cmd_Release/buffertools.node := ln -f "Release/obj.target/buffertools.node" "Release/buffertools.node" 2>/dev/null || (rm -rf "Release/buffertools.node" && cp -af "Release/obj.target/buffertools.node" "Release/buffertools.node") diff --git a/node_modules/buffertools/build/Release/.deps/Release/obj.target/buffertools.node.d b/node_modules/buffertools/build/Release/.deps/Release/obj.target/buffertools.node.d new file mode 100644 index 0000000..81802ce --- /dev/null +++ b/node_modules/buffertools/build/Release/.deps/Release/obj.target/buffertools.node.d @@ -0,0 +1 @@ +cmd_Release/obj.target/buffertools.node := flock ./Release/linker.lock g++ -shared -pthread -rdynamic -m32 -Wl,-soname=buffertools.node -o Release/obj.target/buffertools.node -Wl,--start-group Release/obj.target/buffertools/buffertools.o -Wl,--end-group diff --git a/node_modules/buffertools/build/Release/.deps/Release/obj.target/buffertools/buffertools.o.d b/node_modules/buffertools/build/Release/.deps/Release/obj.target/buffertools/buffertools.o.d new file mode 100644 index 0000000..cade435 --- /dev/null +++ b/node_modules/buffertools/build/Release/.deps/Release/obj.target/buffertools/buffertools.o.d @@ -0,0 +1,34 @@ +cmd_Release/obj.target/buffertools/buffertools.o := g++ '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' -I/home/jose/.node-gyp/0.8.14/src -I/home/jose/.node-gyp/0.8.14/deps/uv/include -I/home/jose/.node-gyp/0.8.14/deps/v8/include -Wall -pthread -m32 -O2 -fno-strict-aliasing -fno-tree-vrp -fno-tree-sink -fno-rtti -fno-exceptions -MMD -MF ./Release/.deps/Release/obj.target/buffertools/buffertools.o.d.raw -c -o Release/obj.target/buffertools/buffertools.o ../buffertools.cc +Release/obj.target/buffertools/buffertools.o: ../buffertools.cc \ + /home/jose/.node-gyp/0.8.14/deps/v8/include/v8.h \ + /home/jose/.node-gyp/0.8.14/deps/v8/include/v8stdint.h \ + /home/jose/.node-gyp/0.8.14/src/node.h \ + /home/jose/.node-gyp/0.8.14/deps/uv/include/uv.h \ + /home/jose/.node-gyp/0.8.14/deps/uv/include/ares.h \ + /home/jose/.node-gyp/0.8.14/deps/uv/include/ares_version.h \ + /home/jose/.node-gyp/0.8.14/deps/uv/include/uv-private/uv-unix.h \ + /home/jose/.node-gyp/0.8.14/deps/uv/include/uv-private/ngx-queue.h \ + /home/jose/.node-gyp/0.8.14/deps/uv/include/uv-private/ev.h \ + /home/jose/.node-gyp/0.8.14/deps/uv/include/uv-private/eio.h \ + /home/jose/.node-gyp/0.8.14/src/node_object_wrap.h \ + /home/jose/.node-gyp/0.8.14/src/node.h \ + /home/jose/.node-gyp/0.8.14/src/ev-emul.h \ + /home/jose/.node-gyp/0.8.14/src/eio-emul.h \ + /home/jose/.node-gyp/0.8.14/src/node_buffer.h ../BoyerMoore.h +../buffertools.cc: +/home/jose/.node-gyp/0.8.14/deps/v8/include/v8.h: +/home/jose/.node-gyp/0.8.14/deps/v8/include/v8stdint.h: +/home/jose/.node-gyp/0.8.14/src/node.h: +/home/jose/.node-gyp/0.8.14/deps/uv/include/uv.h: +/home/jose/.node-gyp/0.8.14/deps/uv/include/ares.h: +/home/jose/.node-gyp/0.8.14/deps/uv/include/ares_version.h: +/home/jose/.node-gyp/0.8.14/deps/uv/include/uv-private/uv-unix.h: +/home/jose/.node-gyp/0.8.14/deps/uv/include/uv-private/ngx-queue.h: +/home/jose/.node-gyp/0.8.14/deps/uv/include/uv-private/ev.h: +/home/jose/.node-gyp/0.8.14/deps/uv/include/uv-private/eio.h: +/home/jose/.node-gyp/0.8.14/src/node_object_wrap.h: +/home/jose/.node-gyp/0.8.14/src/node.h: +/home/jose/.node-gyp/0.8.14/src/ev-emul.h: +/home/jose/.node-gyp/0.8.14/src/eio-emul.h: +/home/jose/.node-gyp/0.8.14/src/node_buffer.h: +../BoyerMoore.h: diff --git a/node_modules/buffertools/build/Release/buffertools.node b/node_modules/buffertools/build/Release/buffertools.node new file mode 100755 index 0000000000000000000000000000000000000000..2d343d4b5c2cbc32c67828b879db82ad6f6a8a46 GIT binary patch literal 25867 zcmdUX4SW>Ux&CYtAZlch4;7(yMYK>fWg!F>QGqZ7G(egUL@`~L%@U$X7WadXYDBu( z%5=Ilty0_DYpb=rdRuR$x5&>AY6GF9wzeYDmI}9~7HeXtqH-$=HTQYWIkP)E2}myO z|NpxKlV{#@-t)fidCz-3W@hJX(97n#TrSNza=1Z}J~ zTI5^&#P8|y97JN6Ch|pEHPUg;gTPHV2dn%X;8Q5`6!Lf;1I?59dFtE;w9fIk=4s`9 z_VrjT$UcX?{7B^H;w)WUtv&jcvu{5B+h6(uNB;fwu6OTx?^A=Hyt)K=FhQG&vjFEb zoIEB-NdNr|u0Dx#2F|lp>KuiW6kZ9u0_Uf3o{MuF&TDX9g7b2mJm%uOR9tD=EZ}80 zuflmg&O)3#&cR8a+m9(AK82HYv5uLzI1eZN!DBW~A1`bN{WTfqMJnw=;6$8kBi5bA z2%N>@>L2@u?Q1{IvJ)S3eX%2d9_S$|jcs}@&I@oN%rrMn>&V9i+kZ69Q7X{`9E%g7 zr+IN+jng{DSQiS11Ba^X=?c*Wgx}dttP|ybV}!@0?QT1ZX|#pDtjf9k3(x%dYj@7o ze|vcC&e5OT*Ij;S|Lx1h<}Z)m^K|N+p>MwY_RvAEz4{ZdW*uv3m^xUW4OE~Gwr|9$ zIId~m6Kp(nkpDXt0VMsdqx@o9Lok1&BmV`PJjx&9pl#-99^_l`j!QwmYU8K9f3O89 z<>ff&`yBQ(JLspafJRx`+v1?ydOF2o8X|o-!$?2Y!G90?P7b3^`IL4rP48^-$1(X<@^+N1gX zb&cUBe>4_|#Qc8EU*A+8)BGy|$O^6t@G{U)|M`&Sziy4cB2-r&jfEm54S{Gh6xIAU zEuOMwhPQZryeSx~4>whX8do<2Vxg&vLu>W&`HL(4#R~#WwGE+#xSX~$&=3#lx?XWT zDBqk&UA!^W6pQM5&Eqd%dNhn59%-qxgy|W0Cr%IvGVye{@#oO941XiWfnHohSr5@mFoIX zR9^=_!}W6_k-++Sfmk3@O<9wosi#$}EYwsNTa_+M3)vu|3iDJIXs7g@Y`BcqeEPaz zXf>PGSG9h1NRLFq5r_L!Nn3LjRjrDI*QQH4_|suPFW8+Ybl<9clTkeFw3I3@B8tNYhF~OwexToaYeqn2%}WAu%` zAzW7<^oQt9#3Rb;H3>=#~SMf6*P83Rx??-c(ce?us6n}1ax!s@FYY>$c= z6@j%S4dG}=FE2+=nNi;)BT@AryDz+xA+9zQjYY!i(XG?2qU&WlPhW`s5SuzB(}g15)( zBO%2jM9ei3NZ*)gwV-D?As@EjZIJ_1V=}OpsYH`?whW|wE2Ms_}XfUqN)f6 zNsF2eZ-nYX5z#k9{8E&vgm*IQZSUZfu^IK@sDB02mPnUZRUzzVAOYcqX2S4@zo9_m z!XVPUK}3N+775hHq6l))d~DvTrIj(CECX@rZ5#8Ywf28^XargEeBacDB-Ri8QEB>9jwy-*{PL)+v z+zYGxRg?XCWwF2fddx4P2`j@5Q8^e@MvF0#V#Z_V5z}d9Oc`s9&9)|;$0miXh{0GG zGW?C<+IT}qTa7U#6sYwFIqNiN4fQLcvD)CINrlmHVKK?Z^i^FDVL-~ubXAb_WYR&& z=MU9lzQO#zA{vz|1I-_5swOS3Of}ZQg}V$A_q4JPb>Ts+Mo1hg}EL{ z->&dgg^SR>{0klmOmdok>!AKg@0D~S(Zoo&lFzCa-hGZ@GQhF>8V8ABOOs_ zTqfyq#3R#-5qHE(5kJJ25f{WS7D>Dh?MHeZ%j2Ps3vo_-kaBI2}^|^50M}0tD;alieq-Rn;a3O3X-bp)v-RK|0 z2I>Qjr5@l@ctA;$^||_If#WfXg9Ew@<>x2a3gta6U1W*uSGv6{g}e-=-;GY zL;og*uaS5u>j8QP^fWN0);90B(a3kdcU#2|F zBSTpaV3Wdg=zq|^qg>!^lndNSxxiY=1-?zWz)@F8yqNMqf1UDy(`n~<=-+H7;Ej|& zOw<0(`T;kP#)Hy(s0X-+^>J(3m#H5Qg|{f&r?83bjPwiGF2Jfe5_3KUL|uv$&QbWm z1esnVKdXGG0uQDk%r8zq=%yZMA$x<_5qg=(f5Y3y?~{RLtq*00s2^P z;FYr_`oZsl&;B|?Vk!JZ+E7>yzma}a;b`b4U8As*Eu#@?kqM#eC=(%JB;L9P@!b<^#XY{Ly%4!+hY2%m-e_eBiUp zM;l(nd|(grfwwUqxQF?dpuaF5_;=<5k24;D(^xOy-Q)+B(auk3T9W+0$4R3P{3~hT z3D}f_>uD?x{1od69K-eiCh6BaP5V6kfR*V6pzB=3jlvHU_9`r5yd!_6!W-Z_(v1qg zpm38ygXQuy?LSEa-vgb4v7r#4PzEGaWe0hjjRCrowT=T&x#}^Dr;N=ftm)#u%}TG;o{3&q7WP+Ta-?#-0ND z52r@|0jJLa!spu*ewp}bjBiUZww#0UhFF04lZZC>1#k$`Um$|6HeRnx9M0>4L~Z%T z_AM~OyzgjlZ*OvMY*5$5NbP!>f4&D_EnEJ4d+$&3K=wWYSBj(e5eU~-@w&Sc#d;qZ zMw;2(dq6_|(#o#?0J*Wf0>TrAhu!@w#s;j2YRtq5Dr$=jH4`I|V&skQ+Kv=6feLA< zpB(+Dw>Nd)5&WI_yB#0pB;IoQjzm4FZ7iK=a~XoI_x=PqWEtO)$X|9RDBhLWHEj9k zYT8-9F2pp{zl^3y93E-jcMSZf-Y7G1OzJ-;CDM$M<9qicc8y$K({7F(-`>gtF?HFyv_$d1S zEVDU3rSInuCHr}SxjHYgI}hDfB($`}%B*Xk(JoR`^KyHA?a|RITix4+O&PIi#FSy1 zh9$aOlSd@lUB326w=vx&6zYv*G+<|*ma5su0md3Iet`<4M-+XZbBxKP%#!ASq38Ro zhBbc8vgtAPKE}IS+ELlQ6?n{L>~<%IxG+(-xm!wsFLhZyF!Vj<>^zHdZyVu$?n@70 zDsykEbR|CMb#Hq{P%RTt%J}f^4|_ZG7wA%V%LPa=t6wl`UNDZE%`fy!qJIi5aBsW$ z0+;(aLkjs8fpS{9Q0VUCxOf#8JN}fH*qL+IA2#J<3h@1I?QXMrk2yEbtj;%bdgiwd z)Nd$fIdf#%by>d3S5dJOjk3nsE{9LET}(aSaul29+pQ^mpOs+h`-Jt(NILA_0Qo)N z&W^{#;R!~~QR7!e{Ft%ZXg*O9F8zn9WY zy%R%#F>Ac*eIo|%SyR5R=Fo;e8}FI%PWKZvhY;Jj@Ka2=*jiFlA2f5!>itGeV%IEV zj~KGh4EcgjS=RH4)MNGko7w4W^3CdDFex=Fm+L1;uY zWdBOM>GE}KI(zLqXy_fUlnfoPBb5Kxxc8h)5i~* z@k55*iGGvZ>)w`k&Ryrt$Q$8qakKwdJ#Zqqcf;E=neY+H86)pa>~Q(siSL7No~1nR zUNe5MgEBRvxzlVuq~sJ_3^@hoyIWpFj#;9!TtT`SwKL1sj?5gIE?$mu908^{p#g%|%-gX|uixM&sp) z$0lOD+Mg=8=c>`oImT!VKd*{%TVZJOZ?T~q`E}(WeP6N{DYLRt+G3X*dVXTp&1|%8 z&LpX=cme^h?R0g2h;=D(CXy9PYrCv}_f)dV@qFXq1z3ZN&QpMn#3n_Ls~MU6Tl_q4 zo4r@GuWU^oi1qmX7ujUoDYn$F*1l_sf)oFU@J295**7CtF>}c%kx5VPqtXZW3cFl3(RGCiT3n8 zKnv#1N$e1+0|O1cO?s%NEqTDux4T>3Mf0TeH=bkU!+`~+-sU~Pu?)24YU2oz(mOLc z5Zl|$1t-uT7o|pyNj|@Bq|7#|pOTVwa6Gl~jb6(8V8;h}?rp~1m{K%xd5CkZP|!r((0Z zGd1@p9)2KnK5x&|9rLNaD^sOi>3Q(ishYmyxHbHxm0JG9$lmWf-t$G?yK0Fy^ODcU zE=xS$d&IrtY~z<0i|(ywf2#fqX0G%Krn?$xW_f<Je$O97T&COCY%WOEyukU& zGNZK5OyzF*FQ_wb$WQLQYmHf&2d5d;ZC3pd1<8%fFU`kd>MJwR(B=(!=5XVs#Gi5# zAGq8t*CUBpTyLScz2FHX-F>y^29$TVJOJY13Ai>Po$WDle7A`lu20}kJ*`qrd8)fJ z3^%Zj(f~u)l1BlEHA`7`5zM^C4$Qo-zmJ}(Q~nvxua^I~+C8FHyBufRi~`xSqy^oz zuoUU2q3Ure{V(Ws+35()(tL9`CwI%0$tT%iE3gQy7?SvKgZtj^gHE>HwSaDw6;3rD zbkv!ioMqX7h(Ba5A`7bjH&oxs>b?qw^|iO>F%d5vdE?ngq6c!xTunRlHv5{StOOm> z8i7SDWAMAfN_m9sYM0VI93q51thB80Alp~YCTtc99aR-E1F6AgQ5zeyV7zG4OHirq zCJ65sM4dc(zG#bgJnwkHYAmz50E=wr%FNwz86$O3fjLKn^ah9km5T2&KbsZUDP%CP zFDAPXWmT7*;vo^+!)SxMKZ)=T54D5E;H=pY3!(F)N;ohcowvx8j?cvgnyyT!&%-XSSH9bMg( zPyoB^F(B^eG8#~%y8v7(TeIbK|CVhp)+<@eJ>PclU5CO}{Lzu=`1>*2*LEY>%HYeA z#VCCQRkvE?5jr0Mm=@FB2pRBXI`**0DN|3VYz<=x6=NQKFj93T(Sy_T9s2oB_^xZ} zd%|%S*o-lT&<~eETb3VW@=#V}5N+epy_`Ok>mhM}UdH?LkB`@B1B=(fQ^c!AQ&ha> z6;?eow8%MRQdViijm>=g?f%L!P+qJAQ=9XUXZ)0IHad*We2CrSZ#9!5;iKHudAKv*nRqQX@u4fW z-s)AH@{Js*N|GOoyTsdh_S-}=NvZ6uYC>`e6RvuY%A40G53D;!YVa+~-*BHPw5B`u zlPqfvW@)83evdgDbMEXRiDQ^^*D_lau_?Ajg;OcM^Bz;w)7(sdSo(~lc+j7D^OAEfSD3re-|}7WiyZpmKd3fOdfA=Y!UjLE&MiHC)v|o|muu3lvubbl z^|m`HR;)IU>zQJFX3)pi==G^2A1YeSZ6-PG&`cO;$}DSWNNpx(?oS1W64iYTk~r>~ zn?+;H&ErU7k76$V?X+{fzj+oFDsd0<=B6XbBwm@L_-3U;e;j|c-TD^I5Ekv$e~iSf zOzhB~lCWJu8^N4?6mt`AZ#CooK{Q&{L{^|fRFRpv<-CEB%`=U!smxL0wbPTsSY*Ck zh)7BDZ)!9D+KXOIP3EWz@z?mN&{ld>=}jdkgBi~45QdA|h}z-(5b8-u9&t4iSF-LG z;tEN~9h<)Lq_4)OuO_6gu25H^A}Qg|RFVQwIkrZJAf)snB-7B2(P zmg&3)`5;q`0kX=JhI@IzPfom)6r64L}3jt{ZOnrZ<{HX60ce0i8^n=uo;=L@Tx}vp!7UN51 z7?Um#k~4`cm3aV*WgBiy(Q|$6?j(M?2!rXIQ#Tn(_}Vj`btk_d#v9SxBhlPegG$Z) z28Scs5HgGh(FJ7S%V+7huKb6xTiqTDr`btr~K+aX9;t?eC_f31O$;7-PFVT^{8|5tiLoOIf#BJ6lRM@P{OD)=EENZhqKj8Gn zJDC>+Z+cGWJyrwa{O+rdECq+Vr5E`RAHy|`&A#{VHxSZRWew)rAWKt^IIK9sEmw*2 zR{T~3vHgDQCeXCaDr@cJb<>3~_9KeIcGh z7&|9bZ%-U^jcz+@C)?k$jApTYi^eOn@?ooyW8D^Zzs$Ikei`8ND<#=BOd+K^k(QU; zO3Y)&>F>FT3+_d_^NCLP{epjDM>iLYtynNK7(_MTq?W%jQWs@Crx3S_)(x+EPT_93 zgiN2_u$Vu)~fx4Je|s9VOY*2QD8E%ZP-jJDts&)34@3V!ZEoarziExT@9*~=TRYtNaN#xwxS(Y;i8r0*W?(-(h@3=+A)ZZ<rFbcK0gEcxJwQ;;V@Id`>E~3GE@;CDH4`t^DeO*i^m|LC+V~;4 z<5x1KCuhBu5bqIkH_a{RIe>R0V-Z0fOjbf@$6OgRGk51*qxI}+rDCu6%?yR{HV=mk z3+nD^vH3>T2fsJE`e1MG#`f2+x-%19@F0HZ6C0iS2`|;Sn|Ld)cMtAej`haz&R_mc z2yW@3c>E6PF%<2ZeW17ZM*QZ9X(u~^;ih09rmd`RXwZWAWGbRXLTf@1d^r`mJ&tdq zv|zZAU&d+m{6=!gN^NB%+_)gLPK$;4w`x^=)Pw&`;h1MtXkDN-6s&IyG~OL)TK zKF`HRzW63IdWq-8aNM&huqNb*#DxuEA-Zm6rV4DD(~<5e7oW>{8Uwe5;M9<3Z8(Bf zfTf`rK0x%~!{Q)X1m3}ilHo|qQy-)C_$J3YWops1;^{MdffYe~*eMcie=r&h=)jK^ zbMpob9+H2SDt7ic1?LWRpIpYr<)6Id|C1cLf{N_OYs^C8J0;?u@!pyESB3l@iZs7_ z8VbA;$l;9NmY)mYH{~43j^X_8k9xzNT)8jEc9g?UHnj%Oyf0dha`>sF_;w0O+I9@e zSW5_+H;(7wya4AB{Jxmi<@hrk_z((>0HV0~h8>_`#hF z7z?Zb#v&3|SyvdCLWOlr@xm4H`i9yo(a#07DiB?z71pkALP?3Sh|J;Ohu)P%_>qSX zO35!TRyV}7Lh-eJVJx%`*W#P~!bn(ryH^-mIG={XoAU;rzLV<)^gAfEEfyVkE z6ogR_e+q>(SrQ-pp-{My-{wmvoW|cV;6c-iw%rHhDdrg<55@`){FGT6gp)DA*x@+= zgq2U^$)5c;v@7`-TRh8D9zgJrZw5}r7x@@-Jj;ZKlwzZTbL;UphpnSaNR%ZShSePd|L*z0<~b3wU@wHeLw>&;}k~ zz-h^2-{%Pv(}$&Zlj382`3qg1x6mQ#@F=9OD35#(>GHH>kj1+G7hIE%BDfC}_k^-F zTbl1-8{gyLd;BDPkJL9;iF6+1EIaA6$AZgB|GS(&S7Bu5p z($X--ucW16j8jQ-W|Z+LY0i-HI|WJ0h+=$6dXzxMk)+QTXze$XD`sAqC-X1NYL`6h zPs18n_PNlq7lF3yb0KObfVS*&VdkC&nqvr$9Q1_ifz-$Lc0u1wz{8-~QlwV_J8k^- zxS;+R@*h+6r~ZwgIbQH^X>RRapj|(2W%tZsuGIfyc`5!a;0QvE^k+fy*ZbcCAL%=oKMws@(T{@WFW?_n{Ch$3H|h^7`XkW%6*+JF zSpL&U=kL6Kj&#yXLGzc`2NZob=!fP(IA|AEUf%`1WxOU{l#>4-=wYy@O6flj_3&Jd z^@*ZOLEnw?j2xD)V?N%cF|z6JZqWRt0?ZL~Judi`+RA?sG+z)~`BT}2Z28=8iSOpD z{9e#U(4JQLmFQx;@wW1R1=@;7SI#@Ve*$gAqYEGBz6E-V)xP)$@i^!U&^|nJatgHJ z=%UsdjpfIvzRi60mI@oqI^S=j*;{^SqsjjZ2Ytjwv;1dR5p|INb2gg!U$xPc|6>RJ zl8yEtztce`7b%>HyrdBIRpxcEPoYf`+il69r?G|Xv%-ULI1!(KkcCRg5EM)t_8=TKXlph zsh{6zSqJ5Rg7h5xL#E{M<&9{}l)A#uR3+@A+~{1E-ANA{#vpY2`MW@}mxVkBuh(n>L#Ihv1KW zf3(Y(sOAsucQ%Q%I(S*)ptWEm7L8#Gl|pQ~S+!w* zo!A4&FK(m!f%rP{RH`8q3)L1*^Uau|F~eV9yN*;59#P@m%U>IBY{Z^YQjflPo=`Kt zV$LGnZ&6fZU1zk2dp4oP@x%(-HDL><(y}FU=al*Vi~U}2k+mn=BC#2aW7Dz8erwkz zUF?OEUAP#JbMWYm8?t5XmDLYx(R@6fI~~SpC47W;I-JuhZXtL1L(mo8-y81k-!Y!5RO*_4ng}DRZ%zVr0Ga z0e3s}PLXjfQ*=GpPZt|tE&mBRPOBzURk!=6R^`l73Ri@Dje#eQLOk1#5hJEHYTKIL9_n6dh9Jlc0-&;joD*2e~_IsFYS zPh;o2J{oL0ym8Y$N4{-CLA5jC?Af+G)tvjc_Pa^zz&8PO7$NtAm3w1mwv^0fk{fBN zG_fh1+*@)$J9(aTKhQq=HlBK?$IOO{eK(ZsH*o%eJJzaQK>OPpGuva*KUR-BlZ|PW zckH{LazU4#4o_?IR$HX0tt+!4&9)M?HXf9lraGG3-h>0&4>xOHR_Pr3=9rl_b!-I6 zjJ_Margu{0M!o$yzEbRmnYHEZNjHDZQf}M96C1Mjk)7e4p0&&A$8M_mar?nTIKXCihEYa9qG<)mQjBS&x<&5m(eYXTZ c<=)A16ZD%F+d6XAHpc9BN^pATVbSRS1EzQ;l>h($ literal 0 HcmV?d00001 diff --git a/node_modules/buffertools/build/Release/linker.lock b/node_modules/buffertools/build/Release/linker.lock new file mode 100644 index 0000000..e69de29 diff --git a/node_modules/buffertools/build/Release/obj.target/buffertools.node b/node_modules/buffertools/build/Release/obj.target/buffertools.node new file mode 100755 index 0000000000000000000000000000000000000000..2d343d4b5c2cbc32c67828b879db82ad6f6a8a46 GIT binary patch literal 25867 zcmdUX4SW>Ux&CYtAZlch4;7(yMYK>fWg!F>QGqZ7G(egUL@`~L%@U$X7WadXYDBu( z%5=Ilty0_DYpb=rdRuR$x5&>AY6GF9wzeYDmI}9~7HeXtqH-$=HTQYWIkP)E2}myO z|NpxKlV{#@-t)fidCz-3W@hJX(97n#TrSNza=1Z}J~ zTI5^&#P8|y97JN6Ch|pEHPUg;gTPHV2dn%X;8Q5`6!Lf;1I?59dFtE;w9fIk=4s`9 z_VrjT$UcX?{7B^H;w)WUtv&jcvu{5B+h6(uNB;fwu6OTx?^A=Hyt)K=FhQG&vjFEb zoIEB-NdNr|u0Dx#2F|lp>KuiW6kZ9u0_Uf3o{MuF&TDX9g7b2mJm%uOR9tD=EZ}80 zuflmg&O)3#&cR8a+m9(AK82HYv5uLzI1eZN!DBW~A1`bN{WTfqMJnw=;6$8kBi5bA z2%N>@>L2@u?Q1{IvJ)S3eX%2d9_S$|jcs}@&I@oN%rrMn>&V9i+kZ69Q7X{`9E%g7 zr+IN+jng{DSQiS11Ba^X=?c*Wgx}dttP|ybV}!@0?QT1ZX|#pDtjf9k3(x%dYj@7o ze|vcC&e5OT*Ij;S|Lx1h<}Z)m^K|N+p>MwY_RvAEz4{ZdW*uv3m^xUW4OE~Gwr|9$ zIId~m6Kp(nkpDXt0VMsdqx@o9Lok1&BmV`PJjx&9pl#-99^_l`j!QwmYU8K9f3O89 z<>ff&`yBQ(JLspafJRx`+v1?ydOF2o8X|o-!$?2Y!G90?P7b3^`IL4rP48^-$1(X<@^+N1gX zb&cUBe>4_|#Qc8EU*A+8)BGy|$O^6t@G{U)|M`&Sziy4cB2-r&jfEm54S{Gh6xIAU zEuOMwhPQZryeSx~4>whX8do<2Vxg&vLu>W&`HL(4#R~#WwGE+#xSX~$&=3#lx?XWT zDBqk&UA!^W6pQM5&Eqd%dNhn59%-qxgy|W0Cr%IvGVye{@#oO941XiWfnHohSr5@mFoIX zR9^=_!}W6_k-++Sfmk3@O<9wosi#$}EYwsNTa_+M3)vu|3iDJIXs7g@Y`BcqeEPaz zXf>PGSG9h1NRLFq5r_L!Nn3LjRjrDI*QQH4_|suPFW8+Ybl<9clTkeFw3I3@B8tNYhF~OwexToaYeqn2%}WAu%` zAzW7<^oQt9#3Rb;H3>=#~SMf6*P83Rx??-c(ce?us6n}1ax!s@FYY>$c= z6@j%S4dG}=FE2+=nNi;)BT@AryDz+xA+9zQjYY!i(XG?2qU&WlPhW`s5SuzB(}g15)( zBO%2jM9ei3NZ*)gwV-D?As@EjZIJ_1V=}OpsYH`?whW|wE2Ms_}XfUqN)f6 zNsF2eZ-nYX5z#k9{8E&vgm*IQZSUZfu^IK@sDB02mPnUZRUzzVAOYcqX2S4@zo9_m z!XVPUK}3N+775hHq6l))d~DvTrIj(CECX@rZ5#8Ywf28^XargEeBacDB-Ri8QEB>9jwy-*{PL)+v z+zYGxRg?XCWwF2fddx4P2`j@5Q8^e@MvF0#V#Z_V5z}d9Oc`s9&9)|;$0miXh{0GG zGW?C<+IT}qTa7U#6sYwFIqNiN4fQLcvD)CINrlmHVKK?Z^i^FDVL-~ubXAb_WYR&& z=MU9lzQO#zA{vz|1I-_5swOS3Of}ZQg}V$A_q4JPb>Ts+Mo1hg}EL{ z->&dgg^SR>{0klmOmdok>!AKg@0D~S(Zoo&lFzCa-hGZ@GQhF>8V8ABOOs_ zTqfyq#3R#-5qHE(5kJJ25f{WS7D>Dh?MHeZ%j2Ps3vo_-kaBI2}^|^50M}0tD;alieq-Rn;a3O3X-bp)v-RK|0 z2I>Qjr5@l@ctA;$^||_If#WfXg9Ew@<>x2a3gta6U1W*uSGv6{g}e-=-;GY zL;og*uaS5u>j8QP^fWN0);90B(a3kdcU#2|F zBSTpaV3Wdg=zq|^qg>!^lndNSxxiY=1-?zWz)@F8yqNMqf1UDy(`n~<=-+H7;Ej|& zOw<0(`T;kP#)Hy(s0X-+^>J(3m#H5Qg|{f&r?83bjPwiGF2Jfe5_3KUL|uv$&QbWm z1esnVKdXGG0uQDk%r8zq=%yZMA$x<_5qg=(f5Y3y?~{RLtq*00s2^P z;FYr_`oZsl&;B|?Vk!JZ+E7>yzma}a;b`b4U8As*Eu#@?kqM#eC=(%JB;L9P@!b<^#XY{Ly%4!+hY2%m-e_eBiUp zM;l(nd|(grfwwUqxQF?dpuaF5_;=<5k24;D(^xOy-Q)+B(auk3T9W+0$4R3P{3~hT z3D}f_>uD?x{1od69K-eiCh6BaP5V6kfR*V6pzB=3jlvHU_9`r5yd!_6!W-Z_(v1qg zpm38ygXQuy?LSEa-vgb4v7r#4PzEGaWe0hjjRCrowT=T&x#}^Dr;N=ftm)#u%}TG;o{3&q7WP+Ta-?#-0ND z52r@|0jJLa!spu*ewp}bjBiUZww#0UhFF04lZZC>1#k$`Um$|6HeRnx9M0>4L~Z%T z_AM~OyzgjlZ*OvMY*5$5NbP!>f4&D_EnEJ4d+$&3K=wWYSBj(e5eU~-@w&Sc#d;qZ zMw;2(dq6_|(#o#?0J*Wf0>TrAhu!@w#s;j2YRtq5Dr$=jH4`I|V&skQ+Kv=6feLA< zpB(+Dw>Nd)5&WI_yB#0pB;IoQjzm4FZ7iK=a~XoI_x=PqWEtO)$X|9RDBhLWHEj9k zYT8-9F2pp{zl^3y93E-jcMSZf-Y7G1OzJ-;CDM$M<9qicc8y$K({7F(-`>gtF?HFyv_$d1S zEVDU3rSInuCHr}SxjHYgI}hDfB($`}%B*Xk(JoR`^KyHA?a|RITix4+O&PIi#FSy1 zh9$aOlSd@lUB326w=vx&6zYv*G+<|*ma5su0md3Iet`<4M-+XZbBxKP%#!ASq38Ro zhBbc8vgtAPKE}IS+ELlQ6?n{L>~<%IxG+(-xm!wsFLhZyF!Vj<>^zHdZyVu$?n@70 zDsykEbR|CMb#Hq{P%RTt%J}f^4|_ZG7wA%V%LPa=t6wl`UNDZE%`fy!qJIi5aBsW$ z0+;(aLkjs8fpS{9Q0VUCxOf#8JN}fH*qL+IA2#J<3h@1I?QXMrk2yEbtj;%bdgiwd z)Nd$fIdf#%by>d3S5dJOjk3nsE{9LET}(aSaul29+pQ^mpOs+h`-Jt(NILA_0Qo)N z&W^{#;R!~~QR7!e{Ft%ZXg*O9F8zn9WY zy%R%#F>Ac*eIo|%SyR5R=Fo;e8}FI%PWKZvhY;Jj@Ka2=*jiFlA2f5!>itGeV%IEV zj~KGh4EcgjS=RH4)MNGko7w4W^3CdDFex=Fm+L1;uY zWdBOM>GE}KI(zLqXy_fUlnfoPBb5Kxxc8h)5i~* z@k55*iGGvZ>)w`k&Ryrt$Q$8qakKwdJ#Zqqcf;E=neY+H86)pa>~Q(siSL7No~1nR zUNe5MgEBRvxzlVuq~sJ_3^@hoyIWpFj#;9!TtT`SwKL1sj?5gIE?$mu908^{p#g%|%-gX|uixM&sp) z$0lOD+Mg=8=c>`oImT!VKd*{%TVZJOZ?T~q`E}(WeP6N{DYLRt+G3X*dVXTp&1|%8 z&LpX=cme^h?R0g2h;=D(CXy9PYrCv}_f)dV@qFXq1z3ZN&QpMn#3n_Ls~MU6Tl_q4 zo4r@GuWU^oi1qmX7ujUoDYn$F*1l_sf)oFU@J295**7CtF>}c%kx5VPqtXZW3cFl3(RGCiT3n8 zKnv#1N$e1+0|O1cO?s%NEqTDux4T>3Mf0TeH=bkU!+`~+-sU~Pu?)24YU2oz(mOLc z5Zl|$1t-uT7o|pyNj|@Bq|7#|pOTVwa6Gl~jb6(8V8;h}?rp~1m{K%xd5CkZP|!r((0Z zGd1@p9)2KnK5x&|9rLNaD^sOi>3Q(ishYmyxHbHxm0JG9$lmWf-t$G?yK0Fy^ODcU zE=xS$d&IrtY~z<0i|(ywf2#fqX0G%Krn?$xW_f<Je$O97T&COCY%WOEyukU& zGNZK5OyzF*FQ_wb$WQLQYmHf&2d5d;ZC3pd1<8%fFU`kd>MJwR(B=(!=5XVs#Gi5# zAGq8t*CUBpTyLScz2FHX-F>y^29$TVJOJY13Ai>Po$WDle7A`lu20}kJ*`qrd8)fJ z3^%Zj(f~u)l1BlEHA`7`5zM^C4$Qo-zmJ}(Q~nvxua^I~+C8FHyBufRi~`xSqy^oz zuoUU2q3Ure{V(Ws+35()(tL9`CwI%0$tT%iE3gQy7?SvKgZtj^gHE>HwSaDw6;3rD zbkv!ioMqX7h(Ba5A`7bjH&oxs>b?qw^|iO>F%d5vdE?ngq6c!xTunRlHv5{StOOm> z8i7SDWAMAfN_m9sYM0VI93q51thB80Alp~YCTtc99aR-E1F6AgQ5zeyV7zG4OHirq zCJ65sM4dc(zG#bgJnwkHYAmz50E=wr%FNwz86$O3fjLKn^ah9km5T2&KbsZUDP%CP zFDAPXWmT7*;vo^+!)SxMKZ)=T54D5E;H=pY3!(F)N;ohcowvx8j?cvgnyyT!&%-XSSH9bMg( zPyoB^F(B^eG8#~%y8v7(TeIbK|CVhp)+<@eJ>PclU5CO}{Lzu=`1>*2*LEY>%HYeA z#VCCQRkvE?5jr0Mm=@FB2pRBXI`**0DN|3VYz<=x6=NQKFj93T(Sy_T9s2oB_^xZ} zd%|%S*o-lT&<~eETb3VW@=#V}5N+epy_`Ok>mhM}UdH?LkB`@B1B=(fQ^c!AQ&ha> z6;?eow8%MRQdViijm>=g?f%L!P+qJAQ=9XUXZ)0IHad*We2CrSZ#9!5;iKHudAKv*nRqQX@u4fW z-s)AH@{Js*N|GOoyTsdh_S-}=NvZ6uYC>`e6RvuY%A40G53D;!YVa+~-*BHPw5B`u zlPqfvW@)83evdgDbMEXRiDQ^^*D_lau_?Ajg;OcM^Bz;w)7(sdSo(~lc+j7D^OAEfSD3re-|}7WiyZpmKd3fOdfA=Y!UjLE&MiHC)v|o|muu3lvubbl z^|m`HR;)IU>zQJFX3)pi==G^2A1YeSZ6-PG&`cO;$}DSWNNpx(?oS1W64iYTk~r>~ zn?+;H&ErU7k76$V?X+{fzj+oFDsd0<=B6XbBwm@L_-3U;e;j|c-TD^I5Ekv$e~iSf zOzhB~lCWJu8^N4?6mt`AZ#CooK{Q&{L{^|fRFRpv<-CEB%`=U!smxL0wbPTsSY*Ck zh)7BDZ)!9D+KXOIP3EWz@z?mN&{ld>=}jdkgBi~45QdA|h}z-(5b8-u9&t4iSF-LG z;tEN~9h<)Lq_4)OuO_6gu25H^A}Qg|RFVQwIkrZJAf)snB-7B2(P zmg&3)`5;q`0kX=JhI@IzPfom)6r64L}3jt{ZOnrZ<{HX60ce0i8^n=uo;=L@Tx}vp!7UN51 z7?Um#k~4`cm3aV*WgBiy(Q|$6?j(M?2!rXIQ#Tn(_}Vj`btk_d#v9SxBhlPegG$Z) z28Scs5HgGh(FJ7S%V+7huKb6xTiqTDr`btr~K+aX9;t?eC_f31O$;7-PFVT^{8|5tiLoOIf#BJ6lRM@P{OD)=EENZhqKj8Gn zJDC>+Z+cGWJyrwa{O+rdECq+Vr5E`RAHy|`&A#{VHxSZRWew)rAWKt^IIK9sEmw*2 zR{T~3vHgDQCeXCaDr@cJb<>3~_9KeIcGh z7&|9bZ%-U^jcz+@C)?k$jApTYi^eOn@?ooyW8D^Zzs$Ikei`8ND<#=BOd+K^k(QU; zO3Y)&>F>FT3+_d_^NCLP{epjDM>iLYtynNK7(_MTq?W%jQWs@Crx3S_)(x+EPT_93 zgiN2_u$Vu)~fx4Je|s9VOY*2QD8E%ZP-jJDts&)34@3V!ZEoarziExT@9*~=TRYtNaN#xwxS(Y;i8r0*W?(-(h@3=+A)ZZ<rFbcK0gEcxJwQ;;V@Id`>E~3GE@;CDH4`t^DeO*i^m|LC+V~;4 z<5x1KCuhBu5bqIkH_a{RIe>R0V-Z0fOjbf@$6OgRGk51*qxI}+rDCu6%?yR{HV=mk z3+nD^vH3>T2fsJE`e1MG#`f2+x-%19@F0HZ6C0iS2`|;Sn|Ld)cMtAej`haz&R_mc z2yW@3c>E6PF%<2ZeW17ZM*QZ9X(u~^;ih09rmd`RXwZWAWGbRXLTf@1d^r`mJ&tdq zv|zZAU&d+m{6=!gN^NB%+_)gLPK$;4w`x^=)Pw&`;h1MtXkDN-6s&IyG~OL)TK zKF`HRzW63IdWq-8aNM&huqNb*#DxuEA-Zm6rV4DD(~<5e7oW>{8Uwe5;M9<3Z8(Bf zfTf`rK0x%~!{Q)X1m3}ilHo|qQy-)C_$J3YWops1;^{MdffYe~*eMcie=r&h=)jK^ zbMpob9+H2SDt7ic1?LWRpIpYr<)6Id|C1cLf{N_OYs^C8J0;?u@!pyESB3l@iZs7_ z8VbA;$l;9NmY)mYH{~43j^X_8k9xzNT)8jEc9g?UHnj%Oyf0dha`>sF_;w0O+I9@e zSW5_+H;(7wya4AB{Jxmi<@hrk_z((>0HV0~h8>_`#hF z7z?Zb#v&3|SyvdCLWOlr@xm4H`i9yo(a#07DiB?z71pkALP?3Sh|J;Ohu)P%_>qSX zO35!TRyV}7Lh-eJVJx%`*W#P~!bn(ryH^-mIG={XoAU;rzLV<)^gAfEEfyVkE z6ogR_e+q>(SrQ-pp-{My-{wmvoW|cV;6c-iw%rHhDdrg<55@`){FGT6gp)DA*x@+= zgq2U^$)5c;v@7`-TRh8D9zgJrZw5}r7x@@-Jj;ZKlwzZTbL;UphpnSaNR%ZShSePd|L*z0<~b3wU@wHeLw>&;}k~ zz-h^2-{%Pv(}$&Zlj382`3qg1x6mQ#@F=9OD35#(>GHH>kj1+G7hIE%BDfC}_k^-F zTbl1-8{gyLd;BDPkJL9;iF6+1EIaA6$AZgB|GS(&S7Bu5p z($X--ucW16j8jQ-W|Z+LY0i-HI|WJ0h+=$6dXzxMk)+QTXze$XD`sAqC-X1NYL`6h zPs18n_PNlq7lF3yb0KObfVS*&VdkC&nqvr$9Q1_ifz-$Lc0u1wz{8-~QlwV_J8k^- zxS;+R@*h+6r~ZwgIbQH^X>RRapj|(2W%tZsuGIfyc`5!a;0QvE^k+fy*ZbcCAL%=oKMws@(T{@WFW?_n{Ch$3H|h^7`XkW%6*+JF zSpL&U=kL6Kj&#yXLGzc`2NZob=!fP(IA|AEUf%`1WxOU{l#>4-=wYy@O6flj_3&Jd z^@*ZOLEnw?j2xD)V?N%cF|z6JZqWRt0?ZL~Judi`+RA?sG+z)~`BT}2Z28=8iSOpD z{9e#U(4JQLmFQx;@wW1R1=@;7SI#@Ve*$gAqYEGBz6E-V)xP)$@i^!U&^|nJatgHJ z=%UsdjpfIvzRi60mI@oqI^S=j*;{^SqsjjZ2Ytjwv;1dR5p|INb2gg!U$xPc|6>RJ zl8yEtztce`7b%>HyrdBIRpxcEPoYf`+il69r?G|Xv%-ULI1!(KkcCRg5EM)t_8=TKXlph zsh{6zSqJ5Rg7h5xL#E{M<&9{}l)A#uR3+@A+~{1E-ANA{#vpY2`MW@}mxVkBuh(n>L#Ihv1KW zf3(Y(sOAsucQ%Q%I(S*)ptWEm7L8#Gl|pQ~S+!w* zo!A4&FK(m!f%rP{RH`8q3)L1*^Uau|F~eV9yN*;59#P@m%U>IBY{Z^YQjflPo=`Kt zV$LGnZ&6fZU1zk2dp4oP@x%(-HDL><(y}FU=al*Vi~U}2k+mn=BC#2aW7Dz8erwkz zUF?OEUAP#JbMWYm8?t5XmDLYx(R@6fI~~SpC47W;I-JuhZXtL1L(mo8-y81k-!Y!5RO*_4ng}DRZ%zVr0Ga z0e3s}PLXjfQ*=GpPZt|tE&mBRPOBzURk!=6R^`l73Ri@Dje#eQLOk1#5hJEHYTKIL9_n6dh9Jlc0-&;joD*2e~_IsFYS zPh;o2J{oL0ym8Y$N4{-CLA5jC?Af+G)tvjc_Pa^zz&8PO7$NtAm3w1mwv^0fk{fBN zG_fh1+*@)$J9(aTKhQq=HlBK?$IOO{eK(ZsH*o%eJJzaQK>OPpGuva*KUR-BlZ|PW zckH{LazU4#4o_?IR$HX0tt+!4&9)M?HXf9lraGG3-h>0&4>xOHR_Pr3=9rl_b!-I6 zjJ_Margu{0M!o$yzEbRmnYHEZNjHDZQf}M96C1Mjk)7e4p0&&A$8M_mar?nTIKXCihEYa9qG<)mQjBS&x<&5m(eYXTZ c<=)A16ZD%F+d6XAHpc9BN^pATVbSRS1EzQ;l>h($ literal 0 HcmV?d00001 diff --git a/node_modules/buffertools/build/Release/obj.target/buffertools/buffertools.o b/node_modules/buffertools/build/Release/obj.target/buffertools/buffertools.o new file mode 100644 index 0000000000000000000000000000000000000000..c898a9c26f1f59f2ec5f0e97861ad5eacd2db33a GIT binary patch literal 19132 zcmdU13v^V~xjvJOGGb&9q7-WFXi=d;%!B|Lq*lR0KoW=~gD=u?m>ftn$)xk(QH^LP zQ#d`2rmd;H?bX(0+uPg6s$E6u+wdr()hbeMi$ayQsEna4Rw@YG=6>Hk`^=o2M1jlg zz3ZOU@ST6}fB&!j@8=o2My;9Sa=8@iaVf=0fl`zu6U>@Q0TYx`P^&G??8RCD9v15+#lE+ zAG@sEyJ2L-=yjtjMy?x~+UF`Co!aaQY>wsh={BKIuOFrXo7_sKaR(fam44*TBmG(RMN})^t}!Svf-mZgFX~5)&KLVG zWqeA;csDE=&rQ=5v;cy*m8)$0oUcI8$hxXqa5 zHi90#sBcd9$;J)stYDVrLpLB+9+?&Floif?84rt2q+blxV+D#`^I&&I-C-3N>JDK& zE7A`8KMVPN4-U-7)cy&2<3areJ$YE)s&^hU6#aLWtia~PIb(ZMdy0@`M&m&vdD!SY zrtfduY@D8F*`>d#Z+-9k-urvKU)?leoA;UCz8(7eg?vx#ucG|Tl>b}GFVbJO8ta=N zD7e=m4ZPltwXOl{mo+j@heqhti}jtbfVwjq;DwTTmj5CjQ~R%nd^idPSXH5+5Wx~; zRI1mlt9ca|SeIskd;QPr2lj<994ub_fZacKj;W<{%b;;1$AqD7vATM2i5$l4g9jY; zUbk3(2|Iw9Mx#d$?$*_v2#Dn@=xl)u9M#nw@q~Z7e)!OP>0Uj!4UXI~%?R%B_v^_$ z`s?~p{dcBxL*0WZK%Y6@bx2Pjde)L3XxzKzPx^aCa*y|?jeC*X#fVcvhS=It1a})n zMsTNIl-e>=-zKIkbc09mNz3|PGxb>Ge+dVDqsIu2gh`p1#TYy~Bv^jb?hPExlzQ~7 zTZ@$VD19f!Bga?j9akW`ZurV~(a{_KSfrPZ*MmFEi8r`|R8|oF?T=$bD_L$dlvL+l zm-kC52Yqt4k=(1RdoXU&+r1myXWnskm3y?e%ggcKaR0IN_BDTGu;OIPB??q`Qy^sHz_GI1b zps^o4a@Pmk7$^U-%>O*%@7*wSxL)!Yd+LRie=|hGiLWEQkqoBnB}i7RTxOP-MUU>F z(g$|pU)O7T&mO9&@7H^F|#%JV1d)T8RIkxE4a{`)8b;{Bf$!mCCs=6DI#`JU|%; z#t75od<0aF>u~Nl1YY``SLVw0^%xn^>UnS1cfny+!BI2kdvjkwp*6m0GU~R1&=TW% zcWQI~4A6zO^HL57Ie>w>+G|Fru{XU-SD*5B{SDodQQv-snU4UL7;3M77w0n2imR71 zL`L0H(1F~3%9wi$9WpLc`tkJht4hskJ@}X@Sp~;qcfH+Dc^_>2!0p|jQ`EYWkr-e` z9Y)Qn5t-l~%OTE4Z+kIxyc_Npe5K{7twn*x-j!cNRVKK_n0t`D%pG}+)xY^E)$Tr* zVk5XGGwa}IC@A>_d!_1FPt`32m$u~B!Cz+@2hZcy^p{s^#S=68kn4Egmma49sdwDz z=MxvDp6@^4-8fwT73QLQTR5JAZ(-%i?_hF4lo@rN%r*V`Tupbc0cdRg~-3Xc{i+0LDrx9cKiYHf*el}PC|5CJNa++tiiAh9#3U}B$7b|K1gmxJOv zBDa0uL2h5p+@63}k=SxuCX>?ELF{Zf5bejNZs@j7F$VGirj3Ge15zW-Az(|52xuDj z?@%g@qoRW9Ozmz8V4;S#LYH#@(#b5`T{Cd~^^O#xKQrNaX*LkvO1ufV#yWC|`+8R|{^7SI9N|PU(yVPIZ z_G6-vrc{nr8BLck;qnKlymNJW*Qzs34T0-DYrbX(t@(ldDBBvRv$a&5Tx(p3HTTM4 zsl!-vSF&0(u_?A@g^yBv`&vWzY4k82mOedw07luaoWw@UiqowKs2L;wE-Olfc$)Fb zeI3D+=Wh`=<54OY5Ib+zkHBP)-$OV!neiJCIpIBhmlGdHReC=xG{;pBU%B>jhq)Ew z&Eq;GY8Z>3P_5gHvN!VxJABtFuNmpfulIQGZp??y^4=I6ZEsraSZxtk3(a_EFeug- z^_es;6|L?z(p+|ECJZ#pDr;)U^pLaoX~7{y<*q;x=Ut;mbjB<-Gw*))szW}L&12U+#U_*dDgKBDNtqOI!BP`I9jS@kg!o-(1AU|e|+YZH&R zihkc|G}`pUbRa8SWMy$34=`r;OyzW8oKwm+kB(%MId&nUB+Y*_J^a_+^fT0CoWoJB zKP|LXAC!7C>2fe5xLIMi@J4vY&rMk&&nMnW!DjmYF}$G&wddvEeEGNW`L_xAw@LC% zIFb?Z%%mw0&apSLf-t35qL_we(^Yt*J!UIm3Kw*K_hRrGfmTwOE>jxL@`9h7{60WV zPDmD~k)~N$bvGq*BT>t_rib?EDrtVhbkLLYsC5NJ%ugv+SFpZfZ5RwapY*n~`#kLJcQ;gieW^Y;% z1~WJx-DPMI*j$LLH~mF1--zxmMR!{rYHA)bIUL!BlwoFxAz&uHneE8td^T}l6!Nz) zP^|dpzIsfquVx&qII*9`!@zvH=V#l&0Tfk39-niSkS^~<5P8fGq7Q>_@$R-^dPFc)U#9us31yX94>=Xex%A!F`6pH=Fc6l7VO8_qKG9x5Xe*US#E*tgYt z{}Wu-9D9P9gL}KO)UPP?Y@Y5T6cGI5fYbd#lo_);xKh%u@$_{S4*DU3;_d23y~sNnJMip3 zWFq9P8Zeog_wD8thc&I@$Tiz}6u$*YY(H<^2%1*jU|LzY!!XB=x+PP)hwCbisW8th z4B~QjFPEv{dR;Z|x5T;jDN&ue&EwLu-h2Maz|3~1_T^oNo^?0C^+48};;#bq!+soP z9y5aLi`A#Zr;8fovHkOfxQEa;T^f8Ub=Wnw_l!;Kf6FqO#r~}vFU|76R=vnN7Uq7# zyffo+lJ{3qvTd3|NiLO_H?Wsj$AL4{y@?CqMY;1vCwHIVpP0>Y!`O`tGlEsvcmJ80 zT07vL;yKh?o|)%7M6>H=M$y`Oi$%sJDffMd5&M1gDkmfA;Ph?{ZK#k(#sR&HYqCce zfqWW0f>+$XizthZ{?I=E7Bmd*^Y5XQecnU;qR-dkGW36_&-J3*JJ!5=XlLN?%2E1} ziJSCo6MvWcj^)38xbGdYPa4z@+_Np~Mn5#;rJL6<~T3TC`NUIi(DKTw@7K>|&_W5MEH4cWhj&MvC zx!Niv5#_%P%`I^s{?{H&_?op<;U+E8(iU#@HH8!5GUck+@?@LVp74E2DJ#2dX>!>z zEtZHzTjOPsh+-pQN1ip_98I=1`Ic(Fu+L=iMVH>9MG|Go!lou)JP~VYU+!zw+LtGq zC;1W|sULEehT|=fklAX+j8J_D4ueWY621k&ni^sFig0U76L{-2R5tm-memDQw3bA( z7K25mph-5{P}=TmX-{a&wOH9;8EwgU!gNMj9;F!5F|aElcn(nUHIm99_F^|!6}4hXPI-*jIHh~l)f$9RP4|H2FpGR3f+BO)bSBdxxZpc<e;hr_$FMf zEp5U0sw}H4n>x8_qWPjIW%1Q*iSSZjB4%Q<^%m1w%M#kEgi^*g&O=Js(s&$XR7^_X z^OyMtl9eVio0WxbTrj_4MODC>km4dj2{2W}?jE ztFrNZ67O6CPRAdgI{bBAC|<=sJj(LuWV;P?v zki~K~R-AeMwftCtcgnTo z-3fUcL0gX{FNOlUye`ONe~rQ)r#VX=Hy@NI%~Nj1mwq1$NKfxufadd!Od-(gGx1M4|Z5!)Z0CdqX+f%FzSN?|bZp8aKlvCa$=sf_sLDFH+ zOjMq5S#N)ek!km{9uNDQ@_zxEImFy{A$|cgvE~udkAwEv>OTozCV&PA{uEvqW2^l; zpgG>H`h~KKtojY0`EJ$YHUAV3^4ID;lciYk=6U%t@K@TTijvC9dxgQ zcH2^j?ay=2^$z;W4%+-ZlW76lzu~BV-$8$x!H^I6Z*b622mNga{ivilhh2#Lc)?Ns zx`TexLGPFJM$x`RIn6dn(Vj~j^c)8r0o@B3FCs5Tp$ER~sPA^r_k-@n1lle6A9d7c z9rW)V^x2$z6wpeJFiv>w`XrGvh~K{q?-6%N{P z&_8g{PdexW4*Fa!Ci0;@H#z8T2mQ2ze#t>AwmF;f7C7kZ9rP^@`ZfoBkEFSGI2-f# zL$-P!%Irr)o*c17^H+qbYZlJBswNa#5c2yg7ir5|;y9?(Mw^nYnz{fxxM_27Txr$j zEvPRKO%Q$tS`%bvBREC&D>>k$K!c5#DL4 zIFg?T>-5>?vHgU2=b1e8?LGn+LQ&_O0{kdva7HRgr+VIwI22H8g66%N8CCmu< zr`N?WvSW$WS0x~CX)qx9Ny&d8n$;_uf5G(GomUgWPjBQ$5TuTrl9jj^5(AP_%qB68d>!>KlH8%1*u{wmy zSln$#W8vjyiqyviM}YU-F%9EDz2z3`ekycheZn6Ig%XTSs5QDA_u?AEi5!L6imDDs z!%cr^c{JJ-M>e&r3N>rV81_{y5w5Lu%;fek1Jo3*W6t}hFO9C&Vr|hVn#Hl>i8PZD z8!iz=I-=eZDHs6PuyLymVRLkAs5u;?`({K2WJT4Y@XFb((YU78)nTMm@phe=Xzk+I zMtbTmhqxvUmwHjGr1B;X)eODa&(r5&JS3)66uLx~H$;al_m_)ebE**L6=YR4M9nPC z+ii{bU}9O7XabKvWN=GQ2emNAKq#^*99o`4OhVzv=aVh?;$lXoVsVwfs=7706dx(R zpe@qy2}R@B{;<&41mOadm--Ymzz4Y*wqieZ4!-kfd6z01VwfbY%ISy(KW&JyA*M2l zl1})`>9>7=*C(o4qVW*Ex@fb_kT*0S?W*jbVbEDxxNTkp<^Bk=Ae4xOTM}{Hp^A%C zPPz??>k|R94a5z_DyHV+GF7&;wcPM9hg(Ja8oG4 zRi{I1b-3k3CPd?yn*~(=Yl-0h4$Hy+J<{OcOa%Yy zEC>IeNQ3|HMDUM58Tm&8$?qqEzlP=byOuQgBSi4u&T{bIMH>9yCW8M7mgDbP(%^rE z2>y3i4*tKA2LD;Sp9KE|Ao(Yg2LES?;J=>b;BO=i{@aM)|2oUT|1Hws{|OQNTUieN z7f6FYM+E<9T)Y)cl=qXL#{CItblwc&Bt>Z^PDb2-E*$vpC5_L2{6S+8F71C#ELW6m zM9BFA5pv!oLe5bl>OufQU=~1w`u=6S+?7WsZ3I87zMCiYdcqP6Q5wC*ZK$lNZ-jekDk{*Y9 z7y5G* z5Mf_6@oGi6Q_}YUUC5DdN_>LlQx)YoBKZDHRFOx-Ip}Y%ss9q7=x-wQ&nH6vV&Y^) zi4q}at;BCj`~$ICQQjlY#khtqMe`t+2>vNR+EYdP8hq0yjlY{nmnljcalWF&SPs6` z67OJn4aOZ2AE_Q8)+)*~#7UUPi0F^EfNWQc3wOq43=wfzBJma=>sLtpBFisBKN8C^ zj}YPCFNm=BKZ)>X6h0i$pGm|8=szO-x(-PDL!@DUf{1o^6BjDVze@V&K=nAQ5qRnC0O6p~RoE9C3JoSg9z#Cn64iAtDaP zh={{E_|`Z^!4-1$VpC%%o+K9-fFA|YYUne5}9wH+D zo+M%(-%tFkq71`Y#PKkeh&-D}MBY^c8JC5m5tlF#dRGvk_g*6O{hP#RCGG;!-aVu- zevgudoZ<^WL(W*@d__4QNWP0CewyVqSVxE$zc&*xem+lx-D`;O|6=0.3.0" + }, + "scripts": { + "install": "node-gyp rebuild" + }, + "gypfile": true, + "contributors": [ + { + "name": "Ben Noordhuis", + "email": "info@bnoordhuis.nl" + }, + { + "name": "Nathan Rajlich", + "email": "nathan@tootallnate.net" + }, + { + "name": "Stefan Thomas", + "email": "justmoon@members.fsf.org" + } + ], + "readme": "# node-buffertools\n\nUtilities for manipulating buffers.\n\n## Installing the module\n\nEasy! With [npm](http://npmjs.org/):\n\n\tnpm install buffertools\n\nFrom source:\n\n\tnode-gyp configure\n\tnode-gyp build\n\nNow you can include the module in your project.\n\n\trequire('buffertools');\n\tnew Buffer(42).clear();\n\n## Methods\n\nNote that most methods that take a buffer as an argument, will also accept a string.\n\n### Buffer.clear()\n\nClear the buffer. This is equivalent to `Buffer.fill(0)`.\nReturns the buffer object so you can chain method calls.\n\n### Buffer.compare(buffer|string)\n\nLexicographically compare two buffers. Returns a number less than zero\nif a < b, zero if a == b or greater than zero if a > b.\n\nBuffers are considered equal when they are of the same length and contain\nthe same binary data.\n\nSmaller buffers are considered to be less than larger ones. Some buffers\nfind this hurtful.\n\n### Buffer.concat(a, b, c, ...)\n### buffertools.concat(a, b, c, ...)\n\nConcatenate two or more buffers/strings and return the result. Example:\n\n\t// identical to new Buffer('foobarbaz')\n\ta = new Buffer('foo');\n\tb = new Buffer('bar');\n\tc = a.concat(b, 'baz');\n\tconsole.log(a, b, c); // \"foo bar foobarbaz\"\n\n\t// static variant\n\tbuffertools.concat('foo', new Buffer('bar'), 'baz');\n\n### Buffer.equals(buffer|string)\n\nReturns true if this buffer equals the argument, false otherwise.\n\nBuffers are considered equal when they are of the same length and contain\nthe same binary data.\n\nCaveat emptor: If your buffers contain strings with different character encodings,\nthey will most likely *not* be equal.\n\n### Buffer.fill(integer|string|buffer)\n\nFill the buffer (repeatedly if necessary) with the argument.\nReturns the buffer object so you can chain method calls.\n\n### Buffer.fromHex()\n\nAssumes this buffer contains hexadecimal data (packed, no whitespace)\nand decodes it into binary data. Returns a new buffer with the decoded\ncontent. Throws an exception if non-hexadecimal data is encountered.\n\n### Buffer.indexOf(buffer|string, [start=0])\n\nSearch this buffer for the first occurrence of the argument, starting at\noffset `start`. Returns the zero-based index or -1 if there is no match.\n\n### Buffer.reverse()\n\nReverse the content of the buffer in place. Example:\n\n\tb = new Buffer('live');\n\tb.reverse();\n\tconsole.log(b); // \"evil\"\n\n### Buffer.toHex()\n\nReturns the contents of this buffer encoded as a hexadecimal string.\n\n## Classes\n\nSingular, actually. To wit:\n\n## WritableBufferStream\n\nThis is a regular node.js [writable stream](http://nodejs.org/docs/v0.3.4/api/streams.html#writable_Stream)\nthat accumulates the data it receives into a buffer.\n\nExample usage:\n\n\t// slurp stdin into a buffer\n\tprocess.stdin.resume();\n\tostream = new WritableBufferStream();\n\tutil.pump(process.stdin, ostream);\n\tconsole.log(ostream.getBuffer());\n\nThe stream never emits 'error' or 'drain' events.\n\n### WritableBufferStream.getBuffer()\n\nReturn the data accumulated so far as a buffer.\n\n## TODO\n\n* Logical operations on buffers (AND, OR, XOR).\n* Add lastIndexOf() functions.\n", + "readmeFilename": "README.md", + "_id": "buffertools@1.1.0", + "dist": { + "shasum": "97335a55f8347273aec0673bb981ab849e891416" + }, + "_from": "buffertools@>= 1.0.8" +} diff --git a/node_modules/buffertools/test.js b/node_modules/buffertools/test.js new file mode 100644 index 0000000..444504b --- /dev/null +++ b/node_modules/buffertools/test.js @@ -0,0 +1,118 @@ +buffertools = require('./buffertools'); +Buffer = require('buffer').Buffer; +assert = require('assert'); + +WritableBufferStream = buffertools.WritableBufferStream; + +// these trigger the code paths for UnaryAction and BinaryAction +assert.throws(function() { buffertools.clear({}); }); +assert.throws(function() { buffertools.equals({}, {}); }); + +a = new Buffer('abcd'), b = new Buffer('abcd'), c = new Buffer('efgh'); +assert.ok(a.equals(b)); +assert.ok(!a.equals(c)); +assert.ok(a.equals('abcd')); +assert.ok(!a.equals('efgh')); + +assert.ok(a.compare(a) == 0); +assert.ok(a.compare(c) < 0); +assert.ok(c.compare(a) > 0); + +assert.ok(a.compare('abcd') == 0); +assert.ok(a.compare('efgh') < 0); +assert.ok(c.compare('abcd') > 0); + +b = new Buffer('****'); +assert.equal(b, b.clear()); +assert.equal(b.inspect(), ''); // FIXME brittle test + +b = new Buffer(4); +assert.equal(b, b.fill(42)); +assert.equal(b.inspect(), ''); + +b = new Buffer(4); +assert.equal(b, b.fill('*')); +assert.equal(b.inspect(), ''); + +b = new Buffer(4); +assert.equal(b, b.fill('ab')); +assert.equal(b.inspect(), ''); + +b = new Buffer(4); +assert.equal(b, b.fill('abcd1234')); +assert.equal(b.inspect(), ''); + +b = new Buffer('Hello, world!'); +assert.equal(-1, b.indexOf(new Buffer('foo'))); +assert.equal(0, b.indexOf(new Buffer('Hell'))); +assert.equal(7, b.indexOf(new Buffer('world'))); +assert.equal(7, b.indexOf(new Buffer('world!'))); +assert.equal(-1, b.indexOf('foo')); +assert.equal(0, b.indexOf('Hell')); +assert.equal(7, b.indexOf('world')); +assert.equal(-1, b.indexOf('')); +assert.equal(-1, b.indexOf('x')); +assert.equal(7, b.indexOf('w')); +assert.equal(0, b.indexOf('Hello, world!')); +assert.equal(-1, b.indexOf('Hello, world!1')); +assert.equal(7, b.indexOf('world', 7)); +assert.equal(-1, b.indexOf('world', 8)); +assert.equal(7, b.indexOf('world', -256)); +assert.equal(7, b.indexOf('world', -6)); +assert.equal(-1, b.indexOf('world', -5)); +assert.equal(-1, b.indexOf('world', 256)); +assert.equal(-1, b.indexOf('', 256)); + +b = new Buffer("\t \r\n"); +assert.equal('09200d0a', b.toHex()); +assert.equal(b.toString(), new Buffer('09200d0a').fromHex().toString()); + +// https://github.com/bnoordhuis/node-buffertools/pull/9 +b = new Buffer(4); +b[0] = 0x98; +b[1] = 0x95; +b[2] = 0x60; +b[3] = 0x2f; +assert.equal('9895602f', b.toHex()); + +assert.equal('', buffertools.concat()); +assert.equal('', buffertools.concat('')); +assert.equal('foobar', new Buffer('foo').concat('bar')); +assert.equal('foobarbaz', buffertools.concat(new Buffer('foo'), 'bar', new Buffer('baz'))); +assert.throws(function() { buffertools.concat('foo', 123, 'baz'); }); +// assert that the buffer is copied, not returned as-is +a = new Buffer('For great justice.'), b = buffertools.concat(a); +assert.equal(a.toString(), b.toString()); +assert.notEqual(a, b); + +assert.equal('', new Buffer('').reverse()); +assert.equal('For great justice.', new Buffer('.ecitsuj taerg roF').reverse()); + +// bug fix, see http://github.com/bnoordhuis/node-buffertools/issues#issue/5 +endOfHeader = new Buffer('\r\n\r\n'); +assert.equal(0, endOfHeader.indexOf(endOfHeader)); +assert.equal(0, endOfHeader.indexOf('\r\n\r\n')); + +// feature request, see https://github.com/bnoordhuis/node-buffertools/issues#issue/8 +closed = false; +stream = new WritableBufferStream(); + +stream.on('close', function() { closed = true; }); +stream.write('Hello,'); +stream.write(' '); +stream.write('world!'); +stream.end(); + +assert.equal(true, closed); +assert.equal(false, stream.writable); +assert.equal('Hello, world!', stream.toString()); +assert.equal('Hello, world!', stream.getBuffer().toString()); + +// closed stream should throw +assert.throws(function() { stream.write('ZIG!'); }); + +// GH-10 indexOf sometimes incorrectly returns -1 +for (i = 0; i < 100; i++) { + buffer = new Buffer('9A8B3F4491734D18DEFC6D2FA96A2D3BC1020EECB811F037F977D039B4713B1984FBAB40FCB4D4833D4A31C538B76EB50F40FA672866D8F50D0A1063666721B8D8322EDEEC74B62E5F5B959393CD3FCE831CC3D1FA69D79C758853AFA3DC54D411043263596BAD1C9652970B80869DD411E82301DF93D47DCD32421A950EF3E555152E051C6943CC3CA71ED0461B37EC97C5A00EBACADAA55B9A7835F148DEF8906914617C6BD3A38E08C14735FC2EFE075CC61DFE5F2F9686AB0D0A3926604E320160FDC1A4488A323CB4308CDCA4FD9701D87CE689AF999C5C409854B268D00B063A89C2EEF6673C80A4F4D8D0A00163082EDD20A2F1861512F6FE9BB479A22A3D4ACDD2AA848254BA74613190957C7FCD106BF7441946D0E1A562DA68BC37752B1551B8855C8DA08DFE588902D44B2CAB163F3D7D7706B9CC78900D0AFD5DAE5492535A17DB17E24389F3BAA6F5A95B9F6FE955193D40932B5988BC53E49CAC81955A28B81F7B36A1EDA3B4063CBC187B0488FCD51FAE71E4FBAEE56059D847591B960921247A6B7C5C2A7A757EC62A2A2A2A2A2A2A25552591C03EF48994BD9F594A5E14672F55359EF1B38BF2976D1216C86A59847A6B7C4A5C585A0D0A2A6D9C8F8B9E999C2A836F786D577A79816F7C577A797D7E576B506B57A05B5B8C4A8D99989E8B8D9E644A6B9D9D8F9C9E4A504A6B968B93984A93984A988FA19D919C999F9A4A8B969E588C93988B9C938F9D588D8B9C9E9999989D58909C8F988D92588E0D0A3D79656E642073697A653D373035393620706172743D31207063726333323D33616230646235300D0A2E0D0A').fromHex(); + assert.equal(551, buffer.indexOf('=yend')); +} diff --git a/node_modules/buffertools/wscript b/node_modules/buffertools/wscript new file mode 100644 index 0000000..fba0661 --- /dev/null +++ b/node_modules/buffertools/wscript @@ -0,0 +1,14 @@ +#!/usr/bin/env python + +def set_options(ctx): + ctx.tool_options('compiler_cxx') + +def configure(ctx): + ctx.check_tool('compiler_cxx') + ctx.check_tool('node_addon') + ctx.env.set_variant('Release') + +def build(ctx): + t = ctx.new_task_gen('cxx', 'shlib', 'node_addon') + t.target = 'buffertools' + t.source = 'buffertools.cc' diff --git a/node_modules/emailjs/LICENSE b/node_modules/emailjs/LICENSE new file mode 100644 index 0000000..ce1a7e9 --- /dev/null +++ b/node_modules/emailjs/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) <2011> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/emailjs/Readme.md b/node_modules/emailjs/Readme.md new file mode 100644 index 0000000..72f2ff4 --- /dev/null +++ b/node_modules/emailjs/Readme.md @@ -0,0 +1,154 @@ +# emailjs (v0.3.3) [![Build Status](https://secure.travis-ci.org/eleith/emailjs.png)](http://travis-ci.org/eleith/emailjs) + +send emails, html and attachments (files, streams and strings) from node.js to any smtp server + +## INSTALLING + + npm install emailjs + +## FEATURES + - works with SSL and TLS smtp servers (ex: gmail) + - supports smtp authentication (PLAIN, LOGIN, CRAMMD5) + - emails are queued and the queue is sent asynchronously + - supports sending html emails and emails with multiple attachments (MIME) + - attachments can be added as strings, streams or file paths + - works with nodejs 3.8 and above + +## REQUIRES + - access to an SMTP Server (ex: gmail) + +## EXAMPLE USAGE - text only emails + +```javascript +var email = require("./path/to/emailjs/email"); +var server = email.server.connect({ + user: "username", + password:"password", + host: "smtp.gmail.com", + ssl: true + +}); + +// send the message and get a callback with an error or details of the message that was sent +server.send({ + text: "i hope this works", + from: "you ", + to: "someone , another ", + cc: "else ", + subject: "testing emailjs" +}, function(err, message) { console.log(err || message); }); +``` + +## EXAMPLE USAGE - html emails and attachments + +```javascript +var email = require("./path/to/emailjs/email"); +var server = email.server.connect({ + user: "username", + password:"password", + host: "smtp.gmail.com", + ssl: true +}); + +var message = { + text: "i hope this works", + from: "you ", + to: "someone , another ", + cc: "else ", + subject: "testing emailjs", + attachment: + [ + {data:"i hope this works!", alternative:true}, + {path:"path/to/file.zip", type:"application/zip", name:"renamed.zip"} + ] +}; + +// send the message and get a callback with an error or details of the message that was sent +server.send(message, function(err, message) { console.log(err || message); }); + +// you can continue to send more messages with successive calls to 'server.send', +// they will be queued on the same smtp connection + +// or you can create a new server connection with 'email.server.connect' +// to asynchronously send individual emails instead of a queue +``` +# API + +## email.server.connect(options) + + // options is an object with the following keys + options = + { + user // username for logging into smtp + password // password for logging into smtp + host // smtp host + port // smtp port (if null a standard port number will be used) + ssl // boolean or object {key, ca, cert} (if exists, ssl connection will be made) + tls // boolean (if true, starttls will be initiated) + timeout // max number of milliseconds to wait for smtp responses (defaults to 5000) + domain // domain to greet smtp with (defaults to os.hostname) + } + +## email.server.send(message, callback) + + // message can be a smtp.Message (as returned by email.message.create) + // or an object identical to the first argument accepted by email.message.create + + // callback will be executed with (err, message) + // either when message is sent or an error has occurred + +## message + + // headers is an object ('from' and 'to' are required) + // returns a Message object + + // you can actually pass more message headers than listed, the below are just the + // most common ones you would want to use + + headers = + { + text // text of the email + from // sender of the format (address or name
or "name"
) + to // recipients (same format as above), multiple recipients are separated by a comma + cc // carbon copied recipients (same format as above) + bcc // blind carbon copied recipients (same format as above) + subject // string subject of the email + attachment // one attachment or array of attachments + } + +## attachment + + // can be called multiple times, each adding a new attachment + // options is an object with the following possible keys: + + options = + { + // one of these fields is required + path // string to where the file is located + data // string of the data you want to attach + stream // binary stream that will provide attachment data (make sure it is in the paused state) + // better performance for binary streams is achieved if buffer.length % (76*6) == 0 + // current max size of buffer must be no larger than Message.BUFFERSIZE + + // optionally these fields are also accepted + type // string of the file mime type + name // name to give the file as perceived by the recipient + alternative // if true, will be attached inline as an alternative (also defaults type='text/html') + inline // if true, will be attached inline + encoded // set this to true if the data is already base64 encoded, (avoid this if possible) + headers // object containing header=>value pairs for inclusion in this attachment's header + related // an array of attachments that you want to be related to the parent attachment + } + +## Authors + +eleith + +## Testing + + npm install -d + npm test + +## Contributions + +issues and pull requests are welcome diff --git a/node_modules/emailjs/email.js b/node_modules/emailjs/email.js new file mode 100644 index 0000000..9e3966c --- /dev/null +++ b/node_modules/emailjs/email.js @@ -0,0 +1,3 @@ +exports.server = require('./smtp/client'); +exports.message = require('./smtp/message'); +exports.SMTP = require('./smtp/smtp'); diff --git a/node_modules/emailjs/node_modules/bufferjs/add-chunk.js b/node_modules/emailjs/node_modules/bufferjs/add-chunk.js new file mode 100644 index 0000000..a1f71c9 --- /dev/null +++ b/node_modules/emailjs/node_modules/bufferjs/add-chunk.js @@ -0,0 +1,29 @@ +(function () { + "use strict"; + + Buffer.prototype.__addchunk_index = 0; + + Buffer.prototype.addChunk = function (chunk) { + var len = Math.min(chunk.length, this.length - this.__addchunk_index); + + if (this.__addchunk_index === this.length) { + //throw new Error("Buffer is full"); + return false; + } + + chunk.copy(this, this.__addchunk_index, 0, len); + + this.__addchunk_index += len; + + if (len < chunk.length) { + //remnant = new Buffer(chunk.length - len); + //chunk.copy(remnant, 0, len, chunk.length); + // return remnant; + return chunk.slice(len, chunk.length); + } + + if (this.__addchunk_index === this.length) { + return true; + } + }; +}()); diff --git a/node_modules/emailjs/node_modules/bufferjs/concat.js b/node_modules/emailjs/node_modules/bufferjs/concat.js new file mode 100644 index 0000000..33dabc7 --- /dev/null +++ b/node_modules/emailjs/node_modules/bufferjs/concat.js @@ -0,0 +1,31 @@ +(function () { + "use strict"; + + function concat(bufs) { + if (!Array.isArray(bufs)) { + bufs = Array.prototype.slice.call(arguments); + } + + var bufsToConcat = [], length = 0; + bufs.forEach(function (buf) { + if (buf) { + if (!Buffer.isBuffer(buf)) { + buf = new Buffer(buf); + } + length += buf.length; + bufsToConcat.push(buf); + } + }); + + var concatBuf = new Buffer(length), index = 0; + bufsToConcat.forEach(function (buf) { + buf.copy(concatBuf, index, 0, buf.length); + index += buf.length; + }); + + return concatBuf; + } + + Buffer.concat = concat; + +}()); diff --git a/node_modules/emailjs/node_modules/bufferjs/index.js b/node_modules/emailjs/node_modules/bufferjs/index.js new file mode 100644 index 0000000..e234e3a --- /dev/null +++ b/node_modules/emailjs/node_modules/bufferjs/index.js @@ -0,0 +1,7 @@ +(function () { + "use strict"; + + require('./concat'); + require('./add-chunk'); + require('./indexOf'); +}()); diff --git a/node_modules/emailjs/node_modules/bufferjs/indexOf.js b/node_modules/emailjs/node_modules/bufferjs/indexOf.js new file mode 100644 index 0000000..7e45596 --- /dev/null +++ b/node_modules/emailjs/node_modules/bufferjs/indexOf.js @@ -0,0 +1,30 @@ +(function () { + "use strict"; + + /** + * A naiive 'Buffer.indexOf' function. Requires both the + * needle and haystack to be Buffer instances. + */ + function indexOf(haystack, needle, i) { + if (!Buffer.isBuffer(needle)) needle = new Buffer(needle); + if (typeof i === 'undefined') i = 0; + var l = haystack.length - needle.length + 1; + while (i=0.2.0" + }, + "_id": "bufferjs@1.1.0", + "readme": "ERROR: No README.md file found!", + "dist": { + "shasum": "870c7b1b3eb5e2fc1083bc2500f243b3cd7bb895" + }, + "_from": "bufferjs@=1.1.0" +} diff --git a/node_modules/emailjs/node_modules/moment/.jshintrc b/node_modules/emailjs/node_modules/moment/.jshintrc new file mode 100644 index 0000000..27ae76d --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/.jshintrc @@ -0,0 +1,26 @@ +{ + "node" : true, + "es5" : true, + "browser" : true, + "boss" : false, + "curly": true, + "debug": false, + "devel": false, + "eqeqeq": true, + "eqnull": true, + "evil": false, + "forin": false, + "immed": false, + "laxbreak": false, + "newcap": true, + "noarg": true, + "noempty": false, + "nonew": false, + "onevar": true, + "plusplus": false, + "regexp": false, + "undef": true, + "sub": true, + "strict": false, + "white": true +} diff --git a/node_modules/emailjs/node_modules/moment/.npmignore b/node_modules/emailjs/node_modules/moment/.npmignore new file mode 100644 index 0000000..12ac647 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/.npmignore @@ -0,0 +1,2 @@ +node_modules/ +.DS_Store \ No newline at end of file diff --git a/node_modules/emailjs/node_modules/moment/.travis.yml b/node_modules/emailjs/node_modules/moment/.travis.yml new file mode 100644 index 0000000..54dbb95 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: + - 0.4 + - 0.6 + - 0.8 \ No newline at end of file diff --git a/node_modules/emailjs/node_modules/moment/LICENSE b/node_modules/emailjs/node_modules/moment/LICENSE new file mode 100644 index 0000000..8beeefc --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2011-2012 Tim Wood + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/emailjs/node_modules/moment/Makefile b/node_modules/emailjs/node_modules/moment/Makefile new file mode 100644 index 0000000..cc2681c --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/Makefile @@ -0,0 +1,71 @@ +LANG_ALL = $(wildcard lang/*.js) +MIN_LANG_ALL = $(addprefix min/,$(LANG_ALL)) + + +.PHONY: all +all: moment langs + +min/: + mkdir min/ + +min/lang/: + mkdir -p min/lang/ + +.PHONY: moment pretty +moment: min/ min/moment.min.js pretty + +pretty: min/ min/moment.min.pretty.js + +min/moment.min.js: moment.js + node_modules/.bin/uglifyjs -o $@ $< + +min/moment.min.pretty.js: moment.js + node_modules/.bin/uglifyjs -b -o $@ $< + +min/lang/%: lang/% + node_modules/.bin/uglifyjs -o $@ $< + +min/lang-all.min.js: $(LANG_ALL) + cat $^ | node_modules/.bin/uglifyjs -o $@ + +.PHONY: langs +langs: min/lang/ $(MIN_LANG_ALL) min/lang-all.min.js + +.PHONY: size +size: moment langs + # FILESIZE FOR ALL LANGS + cp min/lang-all.min.js min/lang-all.min.gzip.js + gzip min/lang-all.min.gzip.js + gzip -l min/lang-all.min.gzip.js.gz + rm min/lang-all.min.gzip.js.gz + # FILESIZE FOR LIBRARY + cp min/moment.min.js min/moment.min.gzip.js + gzip min/moment.min.gzip.js + gzip -l min/moment.min.gzip.js.gz + rm min/moment.min.gzip.js.gz + +.PHONY: size-history +size-history: moment + node test/filesize-history.js + +size-diff: moment + node test/filesize-diff.js + + +.PHONY: test hint test-moment test-lang +test: hint test-moment test-lang +test-zone: + node test/zone + +hint: + node_modules/.bin/jshint moment.js + +test-moment: + node_modules/.bin/nodeunit ./test/moment + +test-lang: + node_modules/.bin/nodeunit ./test/lang + +.PHONY: clean +clean: + rm -rf min/ diff --git a/node_modules/emailjs/node_modules/moment/ender.js b/node_modules/emailjs/node_modules/moment/ender.js new file mode 100644 index 0000000..71462a7 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/ender.js @@ -0,0 +1 @@ +$.ender({ moment: require('moment') }) diff --git a/node_modules/emailjs/node_modules/moment/lang/bg.js b/node_modules/emailjs/node_modules/moment/lang/bg.js new file mode 100644 index 0000000..dc13ac9 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/lang/bg.js @@ -0,0 +1,66 @@ +// moment.js language configuration +// language : bulgarian (bg) +// author : Krasen Borisov : https://github.com/kraz +(function () { + var lang = { + months : "януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"), + monthsShort : "янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"), + weekdays : "неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"), + weekdaysShort : "нед_пон_вто_сря_чет_пет_съб".split("_"), + weekdaysMin : "нд_пн_вт_ср_чт_пт_сб".split("_"), + longDateFormat : { + LT : "h:mm", + L : "D.MM.YYYY", + LL : "D MMMM YYYY", + LLL : "D MMMM YYYY LT", + LLLL : "dddd, D MMMM YYYY LT" + }, + calendar : { + sameDay : '[Днес в] LT', + nextDay : '[Утре в] LT', + nextWeek : 'dddd [в] LT', + lastDay : '[Вчера в] LT', + lastWeek : function () { + switch (this.day()) { + case 0: + case 3: + case 6: + return '[В изминалата] dddd [в] LT'; + case 1: + case 2: + case 4: + case 5: + return '[В изминалия] dddd [в] LT'; + } + }, + sameElse : 'L' + }, + relativeTime : { + future : "след %s", + past : "преди %s", + s : "няколко секунди", + m : "минута", + mm : "%d минути", + h : "час", + hh : "%d часа", + d : "ден", + dd : "%d дни", + M : "месец", + MM : "%d месеца", + y : "година", + yy : "%d години" + }, + ordinal : function (number) { + return '.'; + } + }; + + // Node + if (typeof module !== 'undefined') { + module.exports = lang; + } + // Browser + if (typeof window !== 'undefined' && this.moment && this.moment.lang) { + this.moment.lang('bg', lang); + } +}()); diff --git a/node_modules/emailjs/node_modules/moment/lang/ca.js b/node_modules/emailjs/node_modules/moment/lang/ca.js new file mode 100644 index 0000000..5eae6e7 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/lang/ca.js @@ -0,0 +1,64 @@ +// moment.js language configuration +// language : catalan (ca) +// author : Juan G. Hurtado : https://github.com/juanghurtado +(function () { + var lang = { + months : "Gener_Febrer_Març_Abril_Maig_Juny_Juliol_Agost_Setembre_Octubre_Novembre_Desembre".split("_"), + monthsShort : "Gen._Febr._Mar._Abr._Mai._Jun._Jul._Ag._Set._Oct._Nov._Des.".split("_"), + weekdays : "Diumenge_Dilluns_Dimarts_Dimecres_Dijous_Divendres_Dissabte".split("_"), + weekdaysShort : "Dg._Dl._Dt._Dc._Dj._Dv._Ds.".split("_"), + weekdaysMin : "Dg_Dl_Dt_Dc_Dj_Dv_Ds".split("_"), + longDateFormat : { + LT : "H:mm", + L : "DD/MM/YYYY", + LL : "D MMMM YYYY", + LLL : "D MMMM YYYY LT", + LLLL : "dddd D MMMM YYYY LT" + }, + calendar : { + sameDay : function () { + return '[avui a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; + }, + nextDay : function () { + return '[demà a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; + }, + nextWeek : function () { + return 'dddd [a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; + }, + lastDay : function () { + return '[ahir a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; + }, + lastWeek : function () { + return '[el] dddd [passat a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; + }, + sameElse : 'L' + }, + relativeTime : { + future : "en %s", + past : "fa %s", + s : "uns segons", + m : "un minut", + mm : "%d minuts", + h : "una hora", + hh : "%d hores", + d : "un dia", + dd : "%d dies", + M : "un mes", + MM : "%d mesos", + y : "un any", + yy : "%d anys" + }, + ordinal : function (number) { + return 'º'; + } + }; + + // Node + if (typeof module !== 'undefined' && module.exports) { + module.exports = lang; + } + // Browser + if (typeof window !== 'undefined' && this.moment && this.moment.lang) { + this.moment.lang('ca', lang); + } +}()); diff --git a/node_modules/emailjs/node_modules/moment/lang/cv.js b/node_modules/emailjs/node_modules/moment/lang/cv.js new file mode 100644 index 0000000..a0598f4 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/lang/cv.js @@ -0,0 +1,54 @@ +// moment.js language configuration +// language : chuvash (cv) +// author : Anatoly Mironov : https://github.com/mirontoli +(function () { + var lang = { + months : "кăрлач_нарăс_пуш_ака_май_çĕртме_утă_çурла_авăн_юпа_чӳк_раштав".split("_"), + monthsShort : "кăр_нар_пуш_ака_май_çĕр_утă_çур_ав_юпа_чӳк_раш".split("_"), + weekdays : "вырсарникун_тунтикун_ытларикун_юнкун_кĕçнерникун_эрнекун_шăматкун".split("_"), + weekdaysShort : "выр_тун_ытл_юн_кĕç_эрн_шăм".split("_"), + weekdaysMin : "вр_тн_ыт_юн_кç_эр_шм".split("_"), + longDateFormat : { + LT : "HH:mm", + L : "DD-MM-YYYY", + LL : "YYYY çулхи MMMM уйăхĕн D-мĕшĕ", + LLL : "YYYY çулхи MMMM уйăхĕн D-мĕшĕ, LT", + LLLL : "dddd, YYYY çулхи MMMM уйăхĕн D-мĕшĕ, LT" + }, + calendar : { + sameDay: '[Паян] LT [сехетре]', + nextDay: '[Ыран] LT [сехетре]', + lastDay: '[Ĕнер] LT [сехетре]', + nextWeek: '[Çитес] dddd LT [сехетре]', + lastWeek: '[Иртнĕ] dddd LT [сехетре]', + sameElse: 'L' + }, + relativeTime : { + future : "%sран", + past : "%s каялла", + s : "пĕр-ик çеккунт", + m : "пĕр минут", + mm : "%d минут", + h : "пĕр сехет", + hh : "%d сехет", + d : "пĕр кун", + dd : "%d кун", + M : "пĕр уйăх", + MM : "%d уйăх", + y : "пĕр çул", + yy : "%d çул" + }, + ordinal : function (number) { + return '-мĕш'; + } + }; + + // Node + if (typeof module !== 'undefined' && module.exports) { + module.exports = lang; + } + // Browser + if (typeof window !== 'undefined' && this.moment && this.moment.lang) { + this.moment.lang('cv', lang); + } +}()); diff --git a/node_modules/emailjs/node_modules/moment/lang/da.js b/node_modules/emailjs/node_modules/moment/lang/da.js new file mode 100644 index 0000000..0c3c36c --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/lang/da.js @@ -0,0 +1,54 @@ +// moment.js language configuration +// language : danish (da) +// author : Ulrik Nielsen : https://github.com/mrbase +(function () { + var lang = { + months : "Januar_Februar_Marts_April_Maj_Juni_Juli_August_September_Oktober_November_December".split("_"), + monthsShort : "Jan_Feb_Mar_Apr_Maj_Jun_Jul_Aug_Sep_Okt_Nov_Dec".split("_"), + weekdays : "Søndag_Mandag_Tirsdag_Onsdag_Torsdag_Fredag_Lørdag".split("_"), + weekdaysShort : "Søn_Man_Tir_Ons_Tor_Fre_Lør".split("_"), + weekdaysMin : "Sø_Ma_Ti_On_To_Fr_Lø".split("_"), + longDateFormat : { + LT : "h:mm A", + L : "DD/MM/YYYY", + LL : "D MMMM YYYY", + LLL : "D MMMM YYYY h:mm A", + LLLL : "dddd D. MMMM, YYYY h:mm A" + }, + calendar : { + sameDay : '[I dag kl.] LT', + nextDay : '[I morgen kl.] LT', + nextWeek : 'dddd [kl.] LT', + lastDay : '[I går kl.] LT', + lastWeek : '[sidste] dddd [kl] LT', + sameElse : 'L' + }, + relativeTime : { + future : "om %s", + past : "%s siden", + s : "få sekunder", + m : "minut", + mm : "%d minutter", + h : "time", + hh : "%d timer", + d : "dag", + dd : "%d dage", + M : "månede", + MM : "%d måneder", + y : "år", + yy : "%d år" + }, + ordinal : function (number) { + return '.'; + } + }; + + // Node + if (typeof module !== 'undefined' && module.exports) { + module.exports = lang; + } + // Browser + if (typeof window !== 'undefined' && this.moment && this.moment.lang) { + this.moment.lang('da', lang); + } +}()); diff --git a/node_modules/emailjs/node_modules/moment/lang/de.js b/node_modules/emailjs/node_modules/moment/lang/de.js new file mode 100644 index 0000000..bbe4e13 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/lang/de.js @@ -0,0 +1,54 @@ +// moment.js language configuration +// language : german (de) +// author : lluchs : https://github.com/lluchs +(function () { + var lang = { + months : "Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"), + monthsShort : "Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"), + weekdays : "Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"), + weekdaysShort : "So._Mo._Di._Mi._Do._Fr._Sa.".split("_"), + weekdaysMin : "So_Mo_Di_Mi_Do_Fr_Sa".split("_"), + longDateFormat : { + LT: "H:mm U\\hr", + L : "DD.MM.YYYY", + LL : "D. MMMM YYYY", + LLL : "D. MMMM YYYY LT", + LLLL : "dddd, D. MMMM YYYY LT" + }, + calendar : { + sameDay: "[Heute um] LT", + sameElse: "L", + nextDay: '[Morgen um] LT', + nextWeek: 'dddd [um] LT', + lastDay: '[Gestern um] LT', + lastWeek: '[letzten] dddd [um] LT' + }, + relativeTime : { + future : "in %s", + past : "vor %s", + s : "ein paar Sekunden", + m : "einer Minute", + mm : "%d Minuten", + h : "einer Stunde", + hh : "%d Stunden", + d : "einem Tag", + dd : "%d Tagen", + M : "einem Monat", + MM : "%d Monaten", + y : "einem Jahr", + yy : "%d Jahren" + }, + ordinal : function (number) { + return '.'; + } + }; + + // Node + if (typeof module !== 'undefined' && module.exports) { + module.exports = lang; + } + // Browser + if (typeof window !== 'undefined' && this.moment && this.moment.lang) { + this.moment.lang('de', lang); + } +}()); diff --git a/node_modules/emailjs/node_modules/moment/lang/en-ca.js b/node_modules/emailjs/node_modules/moment/lang/en-ca.js new file mode 100644 index 0000000..efa6d03 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/lang/en-ca.js @@ -0,0 +1,58 @@ +// moment.js language configuration +// language : canadian english (en-ca) +// author : Jonathan Abourbih : https://github.com/jonbca +(function () { + var lang = { + months : "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), + monthsShort : "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"), + weekdays : "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), + weekdaysShort : "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), + weekdaysMin : "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), + longDateFormat : { + LT : "h:mm A", + L : "YYYY-MM-DD", + LL : "D MMMM, YYYY", + LLL : "D MMMM, YYYY LT", + LLLL : "dddd, D MMMM, YYYY LT" + }, + calendar : { + sameDay : '[Today at] LT', + nextDay : '[Tomorrow at] LT', + nextWeek : 'dddd [at] LT', + lastDay : '[Yesterday at] LT', + lastWeek : '[last] dddd [at] LT', + sameElse : 'L' + }, + relativeTime : { + future : "in %s", + past : "%s ago", + s : "a few seconds", + m : "a minute", + mm : "%d minutes", + h : "an hour", + hh : "%d hours", + d : "a day", + dd : "%d days", + M : "a month", + MM : "%d months", + y : "a year", + yy : "%d years" + }, + ordinal : function (number) { + var b = number % 10; + return (~~ (number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + } + }; + + // Node + if (typeof module !== 'undefined' && module.exports) { + module.exports = lang; + } + // Browser + if (typeof window !== 'undefined' && this.moment && this.moment.lang) { + this.moment.lang('en-gb', lang); + } +}()); diff --git a/node_modules/emailjs/node_modules/moment/lang/en-gb.js b/node_modules/emailjs/node_modules/moment/lang/en-gb.js new file mode 100644 index 0000000..a01a7d0 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/lang/en-gb.js @@ -0,0 +1,58 @@ +// moment.js language configuration +// language : great britain english (en-gb) +// author : Chris Gedrim : https://github.com/chrisgedrim +(function () { + var lang = { + months : "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), + monthsShort : "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"), + weekdays : "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), + weekdaysShort : "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), + weekdaysMin : "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), + longDateFormat : { + LT : "h:mm A", + L : "DD/MM/YYYY", + LL : "D MMMM YYYY", + LLL : "D MMMM YYYY LT", + LLLL : "dddd, D MMMM YYYY LT" + }, + calendar : { + sameDay : '[Today at] LT', + nextDay : '[Tomorrow at] LT', + nextWeek : 'dddd [at] LT', + lastDay : '[Yesterday at] LT', + lastWeek : '[last] dddd [at] LT', + sameElse : 'L' + }, + relativeTime : { + future : "in %s", + past : "%s ago", + s : "a few seconds", + m : "a minute", + mm : "%d minutes", + h : "an hour", + hh : "%d hours", + d : "a day", + dd : "%d days", + M : "a month", + MM : "%d months", + y : "a year", + yy : "%d years" + }, + ordinal : function (number) { + var b = number % 10; + return (~~ (number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + } + }; + + // Node + if (typeof module !== 'undefined' && module.exports) { + module.exports = lang; + } + // Browser + if (typeof window !== 'undefined' && this.moment && this.moment.lang) { + this.moment.lang('en-gb', lang); + } +}()); diff --git a/node_modules/emailjs/node_modules/moment/lang/es.js b/node_modules/emailjs/node_modules/moment/lang/es.js new file mode 100644 index 0000000..f093d1a --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/lang/es.js @@ -0,0 +1,64 @@ +// moment.js language configuration +// language : spanish (es) +// author : Julio Napurí : https://github.com/julionc +(function () { + var lang = { + months : "Enero_Febrero_Marzo_Abril_Mayo_Junio_Julio_Agosto_Septiembre_Octubre_Noviembre_Diciembre".split("_"), + monthsShort : "Ene._Feb._Mar._Abr._May._Jun._Jul._Ago._Sep._Oct._Nov._Dic.".split("_"), + weekdays : "Domingo_Lunes_Martes_Miércoles_Jueves_Viernes_Sábado".split("_"), + weekdaysShort : "Dom._Lun._Mar._Mié._Jue._Vie._Sáb.".split("_"), + weekdaysMin : "Do_Lu_Ma_Mi_Ju_Vi_Sá".split("_"), + longDateFormat : { + LT : "H:mm", + L : "DD/MM/YYYY", + LL : "D MMMM YYYY", + LLL : "D MMMM YYYY LT", + LLLL : "dddd D MMMM YYYY LT" + }, + calendar : { + sameDay : function () { + return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + nextDay : function () { + return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + nextWeek : function () { + return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + lastDay : function () { + return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + lastWeek : function () { + return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; + }, + sameElse : 'L' + }, + relativeTime : { + future : "en %s", + past : "hace %s", + s : "unos segundos", + m : "un minuto", + mm : "%d minutos", + h : "una hora", + hh : "%d horas", + d : "un día", + dd : "%d días", + M : "un mes", + MM : "%d meses", + y : "un año", + yy : "%d años" + }, + ordinal : function (number) { + return 'º'; + } + }; + + // Node + if (typeof module !== 'undefined' && module.exports) { + module.exports = lang; + } + // Browser + if (typeof window !== 'undefined' && this.moment && this.moment.lang) { + this.moment.lang('es', lang); + } +}()); diff --git a/node_modules/emailjs/node_modules/moment/lang/eu.js b/node_modules/emailjs/node_modules/moment/lang/eu.js new file mode 100644 index 0000000..79e224e --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/lang/eu.js @@ -0,0 +1,54 @@ +// moment.js language configuration +// language : euskara (eu) +// author : Eneko Illarramendi : https://github.com/eillarra +(function () { + var lang = { + months : "urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"), + monthsShort : "urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"), + weekdays : "igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"), + weekdaysShort : "ig._al._ar._az._og._ol._lr.".split("_"), + weekdaysMin : "ig_al_ar_az_og_ol_lr".split("_"), + longDateFormat : { + LT : "HH:mm", + L : "YYYY-MM-DD", + LL : "YYYYko MMMMren D[a]", + LLL : "YYYYko MMMMren D[a] LT", + LLLL : "dddd, YYYYko MMMMren D[a] LT" + }, + calendar : { + sameDay : '[gaur] LT[etan]', + nextDay : '[bihar] LT[etan]', + nextWeek : 'dddd LT[etan]', + lastDay : '[atzo] LT[etan]', + lastWeek : '[aurreko] dddd LT[etan]', + sameElse : 'L' + }, + relativeTime : { + future : "%s barru", + past : "duela %s", + s : "segundo batzuk", + m : "minutu bat", + mm : "%d minutu", + h : "ordu bat", + hh : "%d ordu", + d : "egun bat", + dd : "%d egun", + M : "hilabete bat", + MM : "%d hilabete", + y : "urte bat", + yy : "%d urte" + }, + ordinal : function (number) { + return '.'; + } + }; + + // Node + if (typeof module !== 'undefined' && module.exports) { + module.exports = lang; + } + // Browser + if (typeof window !== 'undefined' && this.moment && this.moment.lang) { + this.moment.lang('eu', lang); + } +}()); diff --git a/node_modules/emailjs/node_modules/moment/lang/fi.js b/node_modules/emailjs/node_modules/moment/lang/fi.js new file mode 100644 index 0000000..826259b --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/lang/fi.js @@ -0,0 +1,98 @@ +// moment.js language configuration +// language : finnish (fi) +// author : Tarmo Aidantausta : https://github.com/bleadof +(function () { + var numbers_past = ['nolla', 'yksi', 'kaksi', 'kolme', 'neljä', 'viisi', + 'kuusi', 'seitsemän', 'kahdeksan', 'yhdeksän']; + var numbers_future = ['nolla', 'yhden', 'kahden', 'kolmen', 'neljän', 'viiden', + 'kuuden', numbers_past[7], numbers_past[8], numbers_past[9]]; + + function translate(number, withoutSuffix, key, isFuture) { + var result = ""; + switch (key) { + case 's': + return isFuture ? 'muutaman sekunnin' : 'muutama sekunti'; + case 'm': + return isFuture ? 'minuutin' : 'minuutti'; + case 'mm': + result = isFuture ? 'minuutin' : 'minuuttia'; + break; + case 'h': + return isFuture ? 'tunnin' : 'tunti'; + case 'hh': + result = isFuture ? 'tunnin' : 'tuntia'; + break; + case 'd': + return isFuture ? 'päivän' : 'päivä'; + case 'dd': + result = isFuture ? 'päivän' : 'päivää'; + break; + case 'M': + return isFuture ? 'kuukauden' : 'kuukausi'; + case 'MM': + result = isFuture ? 'kuukauden' : 'kuukautta'; + break; + case 'y': + return isFuture ? 'vuoden' : 'vuosi'; + case 'yy': + result = isFuture ? 'vuoden' : 'vuotta'; + break; + } + result = verbal_number(number, isFuture) + " " + result; + return result; + } + + function verbal_number(number, isFuture) { + return number < 10 ? (isFuture ? numbers_future[number] : numbers_past[number]) : number; + } + + var lang = { + months : "tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"), + monthsShort : "tam_hel_maa_huh_tou_kes_hei_elo_syy_lok_mar_jou".split("_"), + weekdays : "sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"), + weekdaysShort : "su_ma_ti_ke_to_pe_la".split("_"), + weekdaysMin : "su_ma_ti_ke_to_pe_la".split("_"), + longDateFormat : { + LT : "HH.mm", + L : "DD.MM.YYYY", + LL : "Do MMMMt\\a YYYY", + LLL : "Do MMMMt\\a YYYY, klo LT", + LLLL : "dddd, Do MMMMt\\a YYYY, klo LT" + }, + calendar : { + sameDay : '[tänään] [klo] LT', + nextDay : '[huomenna] [klo] LT', + nextWeek : 'dddd [klo] LT', + lastDay : '[eilen] [klo] LT', + lastWeek : '[viime] dddd[na] [klo] LT', + sameElse : 'L' + }, + relativeTime : { + future : "%s päästä", + past : "%s sitten", + s : translate, + m : translate, + mm : translate, + h : translate, + hh : translate, + d : translate, + dd : translate, + M : translate, + MM : translate, + y : translate, + yy : translate + }, + ordinal : function (number) { + return "."; + } + }; + + // Node + if (typeof module !== 'undefined' && module.exports) { + module.exports = lang; + } + // Browser + if (typeof window !== 'undefined' && this.moment && this.moment.lang) { + this.moment.lang('fi', lang); + } +}()); diff --git a/node_modules/emailjs/node_modules/moment/lang/fr-ca.js b/node_modules/emailjs/node_modules/moment/lang/fr-ca.js new file mode 100644 index 0000000..062fd0f --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/lang/fr-ca.js @@ -0,0 +1,54 @@ +// moment.js language configuration +// language : canadian french (fr-ca) +// author : Jonathan Abourbih : https://github.com/jonbca +(function () { + var lang = { + months : "janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"), + monthsShort : "janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"), + weekdays : "dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"), + weekdaysShort : "dim._lun._mar._mer._jeu._ven._sam.".split("_"), + weekdaysMin : "Di_Lu_Ma_Me_Je_Ve_Sa".split("_"), + longDateFormat : { + LT : "HH:mm", + L : "YYYY-MM-DD", + LL : "D MMMM YYYY", + LLL : "D MMMM YYYY LT", + LLLL : "dddd D MMMM YYYY LT" + }, + calendar : { + sameDay: "[Aujourd'hui à] LT", + nextDay: '[Demain à] LT', + nextWeek: 'dddd [à] LT', + lastDay: '[Hier à] LT', + lastWeek: 'dddd [dernier à] LT', + sameElse: 'L' + }, + relativeTime : { + future : "dans %s", + past : "il y a %s", + s : "quelques secondes", + m : "une minute", + mm : "%d minutes", + h : "une heure", + hh : "%d heures", + d : "un jour", + dd : "%d jours", + M : "un mois", + MM : "%d mois", + y : "une année", + yy : "%d années" + }, + ordinal : function (number) { + return number === 1 ? 'er' : 'ème'; + } + }; + + // Node + if (typeof module !== 'undefined' && module.exports) { + module.exports = lang; + } + // Browser + if (typeof window !== 'undefined' && this.moment && this.moment.lang) { + this.moment.lang('fr', lang); + } +}()); diff --git a/node_modules/emailjs/node_modules/moment/lang/fr.js b/node_modules/emailjs/node_modules/moment/lang/fr.js new file mode 100644 index 0000000..819f48c --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/lang/fr.js @@ -0,0 +1,54 @@ +// moment.js language configuration +// language : french (fr) +// author : John Fischer : https://github.com/jfroffice +(function () { + var lang = { + months : "janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"), + monthsShort : "janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"), + weekdays : "dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"), + weekdaysShort : "dim._lun._mar._mer._jeu._ven._sam.".split("_"), + weekdaysMin : "Di_Lu_Ma_Me_Je_Ve_Sa".split("_"), + longDateFormat : { + LT : "HH:mm", + L : "DD/MM/YYYY", + LL : "D MMMM YYYY", + LLL : "D MMMM YYYY LT", + LLLL : "dddd D MMMM YYYY LT" + }, + calendar : { + sameDay: "[Aujourd'hui à] LT", + nextDay: '[Demain à] LT', + nextWeek: 'dddd [à] LT', + lastDay: '[Hier à] LT', + lastWeek: 'dddd [dernier à] LT', + sameElse: 'L' + }, + relativeTime : { + future : "dans %s", + past : "il y a %s", + s : "quelques secondes", + m : "une minute", + mm : "%d minutes", + h : "une heure", + hh : "%d heures", + d : "un jour", + dd : "%d jours", + M : "un mois", + MM : "%d mois", + y : "une année", + yy : "%d années" + }, + ordinal : function (number) { + return number === 1 ? 'er' : 'ème'; + } + }; + + // Node + if (typeof module !== 'undefined' && module.exports) { + module.exports = lang; + } + // Browser + if (typeof window !== 'undefined' && this.moment && this.moment.lang) { + this.moment.lang('fr', lang); + } +}()); diff --git a/node_modules/emailjs/node_modules/moment/lang/gl.js b/node_modules/emailjs/node_modules/moment/lang/gl.js new file mode 100644 index 0000000..51c8569 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/lang/gl.js @@ -0,0 +1,64 @@ +// moment.js language configuration +// language : galician (gl) +// author : Juan G. Hurtado : https://github.com/juanghurtado +(function () { + var lang = { + months : "Xaneiro_Febreiro_Marzo_Abril_Maio_Xuño_Xullo_Agosto_Setembro_Octubro_Novembro_Decembro".split("_"), + monthsShort : "Xan._Feb._Mar._Abr._Mai._Xuñ._Xul._Ago._Set._Out._Nov._Dec.".split("_"), + weekdays : "Domingo_Luns_Martes_Mércores_Xoves_Venres_Sábado".split("_"), + weekdaysShort : "Dom._Lun._Mar._Mér._Xov._Ven._Sáb.".split("_"), + weekdaysMin : "Do_Lu_Ma_Mé_Xo_Ve_Sá".split("_"), + longDateFormat : { + LT : "H:mm", + L : "DD/MM/YYYY", + LL : "D MMMM YYYY", + LLL : "D MMMM YYYY LT", + LLLL : "dddd D MMMM YYYY LT" + }, + calendar : { + sameDay : function () { + return '[hoxe ' + ((this.hours() !== 1) ? 'ás' : 'a') + '] LT'; + }, + nextDay : function () { + return '[mañá ' + ((this.hours() !== 1) ? 'ás' : 'a') + '] LT'; + }, + nextWeek : function () { + return 'dddd [' + ((this.hours() !== 1) ? 'ás' : 'a') + '] LT'; + }, + lastDay : function () { + return '[onte ' + ((this.hours() !== 1) ? 'á' : 'a') + '] LT'; + }, + lastWeek : function () { + return '[o] dddd [pasado ' + ((this.hours() !== 1) ? 'ás' : 'a') + '] LT'; + }, + sameElse : 'L' + }, + relativeTime : { + future : "en %s", + past : "fai %s", + s : "uns segundo", + m : "un minuto", + mm : "%d minutos", + h : "unha hora", + hh : "%d horas", + d : "un día", + dd : "%d días", + M : "un mes", + MM : "%d meses", + y : "un ano", + yy : "%d anos" + }, + ordinal : function (number) { + return 'º'; + } + }; + + // Node + if (typeof module !== 'undefined' && module.exports) { + module.exports = lang; + } + // Browser + if (typeof window !== 'undefined' && this.moment && this.moment.lang) { + this.moment.lang('gl', lang); + } +}()); diff --git a/node_modules/emailjs/node_modules/moment/lang/hu.js b/node_modules/emailjs/node_modules/moment/lang/hu.js new file mode 100644 index 0000000..4745cbb --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/lang/hu.js @@ -0,0 +1,108 @@ +// moment.js language configuration +// language : hungarian (hu) +// author : Adam Brunner : https://github.com/adambrunner +(function() +{ + function translate(number, withoutSuffix, key, isFuture) { + var num = number; + + switch (key) { + case 's': + return (isFuture || withoutSuffix) ? 'néhány másodperc' : 'néhány másodperce'; + + case 'm': + num = 'egy'; + case 'mm': + return num + (isFuture || withoutSuffix ? ' perc' : ' perce'); + break; + + case 'h': + num = 'egy'; + case 'hh': + return num + (isFuture || withoutSuffix ? ' óra' : ' órája'); + + case 'd': + num = 'egy'; + case 'dd': + return num + (isFuture || withoutSuffix ? ' nap' : ' napja'); + + case 'M': + num = 'egy'; + case 'MM': + return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja'); + + case 'y': + num = 'egy'; + case 'yy': + return num + (isFuture || withoutSuffix ? ' év' : ' éve'); + + default: + } + + return ''; + } + + function week(isFuture) { + var ending = ''; + switch (this.day()) { + case 0: ending = 'vasárnap'; break; + case 1: ending = 'hétfőn'; break; + case 2: ending = 'kedden'; break; + case 3: ending = 'szerdán'; break; + case 4: ending = 'csütörtökön'; break; + case 5: ending = 'pénteken'; break; + case 6: ending = 'szombaton'; break; + } + return (isFuture ? '' : 'múlt ')+'['+ending+'] LT[-kor]'; + } + + var lang = { + months : "január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"), + monthsShort : "jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec".split("_"), + weekdays : "vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"), + weekdaysShort : "v_h_k_sze_cs_p_szo".split("_"), + longDateFormat : { + LT : "H:mm", + L : "YYYY.MM.DD.", + LL : "YYYY. MMMM D.", + LLL : "YYYY. MMMM D., LT", + LLLL : "YYYY. MMMM D., dddd LT" + }, + calendar : { + sameDay : '[ma] LT[-kor]', + nextDay : '[holnap] LT[-kor]', + nextWeek : function(){return week.call(this, true);}, + lastDay : '[tegnap] LT[-kor]', + lastWeek : function(){return week.call(this, false);}, + sameElse : 'L' + }, + relativeTime : { + future : "%s múlva", + past : "%s", + s : translate, + m : translate, + mm : translate, + h : translate, + hh : translate, + d : translate, + dd : translate, + M : translate, + MM : translate, + y : translate, + yy : translate + }, + ordinal : function(number) { + return '.'; + } + }; + + // Node + if (typeof module !== 'undefined' && module.exports) { + module.exports = lang; + } + + // Browser + if (typeof window !== 'undefined' && this.moment && this.moment.lang) { + this.moment.lang('hu', lang); + } +}()); diff --git a/node_modules/emailjs/node_modules/moment/lang/is.js b/node_modules/emailjs/node_modules/moment/lang/is.js new file mode 100644 index 0000000..c845665 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/lang/is.js @@ -0,0 +1,132 @@ +// moment.js language configuration +// language : icelandic (is) +// author : Hinrik Örn Sigurðsson : https://github.com/hinrik +(function () { + var plural = function (n) { + if (n % 100 == 11) { + return true; + } else if (n % 10 == 1) { + return false; + } else { + return true; + } + }, + + translate = function (number, withoutSuffix, key, isFuture) { + var result = number + " "; + switch (key) { + case 's': + return withoutSuffix || isFuture ? 'nokkrar sekúndur' : 'nokkrum sekúndum'; + case 'm': + return withoutSuffix ? 'mínúta' : 'mínútu'; + case 'mm': + if (plural(number)) { + return result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum'); + } else if (withoutSuffix) { + return result + 'mínúta'; + } else { + return result + 'mínútu'; + } + case 'hh': + if (plural(number)) { + return result + (withoutSuffix || isFuture ? 'klukkustundir' : 'klukkustundum'); + } else { + return result + 'klukkustund'; + } + case 'd': + if (withoutSuffix) { + return 'dagur' + } else { + return isFuture ? 'dag' : 'degi'; + } + case 'dd': + if (plural(number)) { + if (withoutSuffix) { + return result + 'dagar' + } else { + return result + (isFuture ? 'daga' : 'dögum'); + } + } else if (withoutSuffix) { + return result + 'dagur' + } else { + return result + (isFuture ? 'dag' : 'degi'); + } + case 'M': + if (withoutSuffix) { + return 'mánuður' + } else { + return isFuture ? 'mánuð' : 'mánuði'; + } + case 'MM': + if (plural(number)) { + if (withoutSuffix) { + return result + 'mánuðir' + } else { + return result + (isFuture ? 'mánuði' : 'mánuðum'); + } + } else if (withoutSuffix) { + return result + 'mánuður'; + } else { + return result + (isFuture ? 'mánuð' : 'mánuði'); + } + case 'y': + return withoutSuffix || isFuture ? 'ár' : 'ári'; + case 'yy': + if (plural(number)) { + return result + (withoutSuffix || isFuture ? 'ár' : 'árum'); + } else { + return result + (withoutSuffix || isFuture ? 'ár' : 'ári'); + } + } + }, + + lang = { + months : "janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"), + monthsShort : "jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"), + weekdays : "sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"), + weekdaysShort : "sun_mán_þri_mið_fim_fös_lau".split("_"), + weekdaysMin : "Su_Má_Þr_Mi_Fi_Fö_La".split("_"), + longDateFormat : { + LT : "H:mm", + L : "DD/MM/YYYY", + LL : "D. MMMM YYYY", + LLL : "D. MMMM YYYY kl. LT", + LLLL : "dddd, D. MMMM YYYY kl. LT" + }, + calendar : { + sameDay : '[í dag kl.] LT', + nextDay : '[á morgun kl.] LT', + nextWeek : 'dddd [kl.] LT', + lastDay : '[í gær kl.] LT', + lastWeek : '[síðasta] dddd [kl.] LT', + sameElse : 'L' + }, + relativeTime : { + future : "eftir %s", + past : "fyrir %s síðan", + s : translate, + m : translate, + mm : translate, + h : "klukkustund", + hh : translate, + d : translate, + dd : translate, + M : translate, + MM : translate, + y : translate, + yy : translate, + }, + ordinal : function (number) { + return '.'; + } + }; + + // Node + if (typeof module !== 'undefined' && module.exports) { + module.exports = lang; + } + // Browser + if (typeof window !== 'undefined' && this.moment && this.moment.lang) { + this.moment.lang('is', lang); + } +}()); diff --git a/node_modules/emailjs/node_modules/moment/lang/it.js b/node_modules/emailjs/node_modules/moment/lang/it.js new file mode 100644 index 0000000..965f2ad --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/lang/it.js @@ -0,0 +1,54 @@ +// moment.js language configuration +// language : italian (it) +// author : Lorenzo : https://github.com/aliem +(function () { + var lang = { + months : "Gennaio_Febbraio_Marzo_Aprile_Maggio_Giugno_Luglio_Agosto_Settebre_Ottobre_Novembre_Dicembre".split("_"), + monthsShort : "Gen_Feb_Mar_Apr_Mag_Giu_Lug_Ago_Set_Ott_Nov_Dic".split("_"), + weekdays : "Domenica_Lunedì_Martedì_Mercoledì_Giovedì_Venerdì_Sabato".split("_"), + weekdaysShort : "Dom_Lun_Mar_Mer_Gio_Ven_Sab".split("_"), + weekdaysMin : "D_L_Ma_Me_G_V_S".split("_"), + longDateFormat : { + LT : "HH:mm", + L : "DD/MM/YYYY", + LL : "D MMMM YYYY", + LLL : "D MMMM YYYY LT", + LLLL : "dddd, D MMMM YYYY LT" + }, + calendar : { + sameDay: '[Oggi alle] LT', + nextDay: '[Domani alle] LT', + nextWeek: 'dddd [alle] LT', + lastDay: '[Ieri alle] LT', + lastWeek: '[lo scorso] dddd [alle] LT', + sameElse: 'L' + }, + relativeTime : { + future : "in %s", + past : "%s fa", + s : "secondi", + m : "un minuto", + mm : "%d minuti", + h : "un'ora", + hh : "%d ore", + d : "un giorno", + dd : "%d giorni", + M : "un mese", + MM : "%d mesi", + y : "un anno", + yy : "%d anni" + }, + ordinal: function () { + return 'º'; + } + }; + + // Node + if (typeof module !== 'undefined' && module.exports) { + module.exports = lang; + } + // Browser + if (typeof window !== 'undefined' && this.moment && this.moment.lang) { + this.moment.lang('it', lang); + } +}()); diff --git a/node_modules/emailjs/node_modules/moment/lang/ja.js b/node_modules/emailjs/node_modules/moment/lang/ja.js new file mode 100644 index 0000000..0a83027 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/lang/ja.js @@ -0,0 +1,61 @@ +// moment.js language configuration +// language : japanese (ja) +// author : LI Long : https://github.com/baryon +(function () { + var lang = { + months : "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"), + monthsShort : "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"), + weekdays : "日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"), + weekdaysShort : "日_月_火_水_木_金_土".split("_"), + weekdaysMin : "日_月_火_水_木_金_土".split("_"), + longDateFormat : { + LT : "Ah時m分", + L : "YYYY/MM/DD", + LL : "YYYY年M月D日", + LLL : "YYYY年M月D日LT", + LLLL : "YYYY年M月D日LT dddd" + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return "午前"; + } else { + return "午後"; + } + }, + calendar : { + sameDay : '[今日] LT', + nextDay : '[明日] LT', + nextWeek : '[来週]dddd LT', + lastDay : '[昨日] LT', + lastWeek : '[前週]dddd LT', + sameElse : 'L' + }, + relativeTime : { + future : "%s後", + past : "%s前", + s : "数秒", + m : "1分", + mm : "%d分", + h : "1時間", + hh : "%d時間", + d : "1日", + dd : "%d日", + M : "1ヶ月", + MM : "%dヶ月", + y : "1年", + yy : "%d年" + }, + ordinal : function (number) { + return ''; + } + }; + + // Node + if (typeof module !== 'undefined' && module.exports) { + module.exports = lang; + } + // Browser + if (typeof window !== 'undefined' && this.moment && this.moment.lang) { + this.moment.lang('ja', lang); + } +}()); diff --git a/node_modules/emailjs/node_modules/moment/lang/jp.js b/node_modules/emailjs/node_modules/moment/lang/jp.js new file mode 100644 index 0000000..53a85e5 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/lang/jp.js @@ -0,0 +1,64 @@ +// moment.js language configuration +// language : japanese (jp) +// author : LI Long : https://github.com/baryon + +// This language config was incorrectly named 'jp' instead of 'ja'. +// In version 2.0.0, this will be deprecated and you should use 'ja' instead. +(function () { + var lang = { + months : "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"), + monthsShort : "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"), + weekdays : "日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"), + weekdaysShort : "日_月_火_水_木_金_土".split("_"), + weekdaysMin : "日_月_火_水_木_金_土".split("_"), + longDateFormat : { + LT : "Ah時m分", + L : "YYYY/MM/DD", + LL : "YYYY年M月D日", + LLL : "YYYY年M月D日LT", + LLLL : "YYYY年M月D日LT dddd" + }, + meridiem : function (hour, minute, isLower) { + if (hour < 12) { + return "午前"; + } else { + return "午後"; + } + }, + calendar : { + sameDay : '[今日] LT', + nextDay : '[明日] LT', + nextWeek : '[来週]dddd LT', + lastDay : '[昨日] LT', + lastWeek : '[前週]dddd LT', + sameElse : 'L' + }, + relativeTime : { + future : "%s後", + past : "%s前", + s : "数秒", + m : "1分", + mm : "%d分", + h : "1時間", + hh : "%d時間", + d : "1日", + dd : "%d日", + M : "1ヶ月", + MM : "%dヶ月", + y : "1年", + yy : "%d年" + }, + ordinal : function (number) { + return ''; + } + }; + + // Node + if (typeof module !== 'undefined' && module.exports) { + module.exports = lang; + } + // Browser + if (typeof window !== 'undefined' && this.moment && this.moment.lang) { + this.moment.lang('jp', lang); + } +}()); diff --git a/node_modules/emailjs/node_modules/moment/lang/ko.js b/node_modules/emailjs/node_modules/moment/lang/ko.js new file mode 100644 index 0000000..74fcefe --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/lang/ko.js @@ -0,0 +1,58 @@ +// moment.js language configuration +// language : korean (ko) +// author : Kyungwook, Park : https://github.com/kyungw00k +(function () { + var lang = { + months : "1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"), + monthsShort : "1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"), + weekdays : "일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"), + weekdaysShort : "일_월_화_수_목_금_토".split("_"), + weekdaysMin : "일_월_화_수_목_금_토".split("_"), + longDateFormat : { + LT : "A h시 mm분", + L : "YYYY.MM.DD", + LL : "YYYY년 MMMM D일", + LLL : "YYYY년 MMMM D일 LT", + LLLL : "YYYY년 MMMM D일 dddd LT" + }, + meridiem : function (hour, minute, isUpper) { + return hour < 12 ? '오전' : '오후'; + }, + calendar : { + sameDay : '오늘 LT', + nextDay : '내일 LT', + nextWeek : 'dddd LT', + lastDay : '어제 LT', + lastWeek : '지난주 dddd LT', + sameElse : 'L' + }, + relativeTime : { + future : "%s 후", + past : "%s 전", + s : "몇초", + ss : "%d초", + m : "일분", + mm : "%d분", + h : "한시간", + hh : "%d시간", + d : "하루", + dd : "%d일", + M : "한달", + MM : "%d달", + y : "일년", + yy : "%d년" + }, + ordinal : function (number) { + return '일'; + } + }; + + // Node + if (typeof module !== 'undefined' && module.exports) { + module.exports = lang; + } + // Browser + if (typeof window !== 'undefined' && this.moment && this.moment.lang) { + this.moment.lang('ko', lang); + } +}()); diff --git a/node_modules/emailjs/node_modules/moment/lang/kr.js b/node_modules/emailjs/node_modules/moment/lang/kr.js new file mode 100644 index 0000000..5b932e2 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/lang/kr.js @@ -0,0 +1,61 @@ +// moment.js language configuration +// language : korean (kr) +// author : Kyungwook, Park : https://github.com/kyungw00k + +// This language config was incorrectly named 'kr' instead of 'ko'. +// In version 2.0.0, this will be deprecated and you should use 'ko' instead. +(function () { + var lang = { + months : "1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"), + monthsShort : "1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"), + weekdays : "일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"), + weekdaysShort : "일_월_화_수_목_금_토".split("_"), + weekdaysMin : "일_월_화_수_목_금_토".split("_"), + longDateFormat : { + LT : "A h시 mm분", + L : "YYYY.MM.DD", + LL : "YYYY년 MMMM D일", + LLL : "YYYY년 MMMM D일 LT", + LLLL : "YYYY년 MMMM D일 dddd LT" + }, + meridiem : function (hour, minute, isUpper) { + return hour < 12 ? '오전' : '오후'; + }, + calendar : { + sameDay : '오늘 LT', + nextDay : '내일 LT', + nextWeek : 'dddd LT', + lastDay : '어제 LT', + lastWeek : '지난주 dddd LT', + sameElse : 'L' + }, + relativeTime : { + future : "%s 후", + past : "%s 전", + s : "몇초", + ss : "%d초", + m : "일분", + mm : "%d분", + h : "한시간", + hh : "%d시간", + d : "하루", + dd : "%d일", + M : "한달", + MM : "%d달", + y : "일년", + yy : "%d년" + }, + ordinal : function (number) { + return '일'; + } + }; + + // Node + if (typeof module !== 'undefined' && module.exports) { + module.exports = lang; + } + // Browser + if (typeof window !== 'undefined' && this.moment && this.moment.lang) { + this.moment.lang('kr', lang); + } +}()); diff --git a/node_modules/emailjs/node_modules/moment/lang/nb.js b/node_modules/emailjs/node_modules/moment/lang/nb.js new file mode 100644 index 0000000..dd0a266 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/lang/nb.js @@ -0,0 +1,54 @@ +// moment.js language configuration +// language : norwegian bokmål (nb) +// author : Espen Hovlandsdal : https://github.com/rexxars +(function () { + var lang = { + months : "januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"), + monthsShort : "jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"), + weekdays : "søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"), + weekdaysShort : "søn_man_tir_ons_tor_fre_lør".split("_"), + weekdaysMin : "sø_ma_ti_on_to_fr_lø".split("_"), + longDateFormat : { + LT : "HH:mm", + L : "YYYY-MM-DD", + LL : "D MMMM YYYY", + LLL : "D MMMM YYYY LT", + LLLL : "dddd D MMMM YYYY LT" + }, + calendar : { + sameDay: '[I dag klokken] LT', + nextDay: '[I morgen klokken] LT', + nextWeek: 'dddd [klokken] LT', + lastDay: '[I går klokken] LT', + lastWeek: '[Forrige] dddd [klokken] LT', + sameElse: 'L' + }, + relativeTime : { + future : "om %s", + past : "for %s siden", + s : "noen sekunder", + m : "ett minutt", + mm : "%d minutter", + h : "en time", + hh : "%d timer", + d : "en dag", + dd : "%d dager", + M : "en måned", + MM : "%d måneder", + y : "ett år", + yy : "%d år" + }, + ordinal : function (number) { + return '.'; + } + }; + + // Node + if (typeof module !== 'undefined' && module.exports) { + module.exports = lang; + } + // Browser + if (typeof window !== 'undefined' && this.moment && this.moment.lang) { + this.moment.lang('nb', lang); + } +}()); diff --git a/node_modules/emailjs/node_modules/moment/lang/nl.js b/node_modules/emailjs/node_modules/moment/lang/nl.js new file mode 100644 index 0000000..53deafb --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/lang/nl.js @@ -0,0 +1,62 @@ +// moment.js language configuration +// language : dutch (nl) +// author : Joris Röling : https://github.com/jjupiter +(function () { + var monthsShortWithDots = "jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"); + var monthsShortWithoutDots = "jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"); + var lang = { + months : "januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"), + monthsShort : function (m, format) { + if (/-MMM-/.test(format)) { + return monthsShortWithoutDots[m.month()]; + } else { + return monthsShortWithDots[m.month()]; + } + }, + weekdays : "zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"), + weekdaysShort : "zo._ma._di._wo._do._vr._za.".split("_"), + weekdaysMin : "Zo_Ma_Di_Wo_Do_Vr_Za".split("_"), + longDateFormat : { + LT : "HH:mm", + L : "DD-MM-YYYY", + LL : "D MMMM YYYY", + LLL : "D MMMM YYYY LT", + LLLL : "dddd D MMMM YYYY LT" + }, + calendar : { + sameDay: '[Vandaag om] LT', + nextDay: '[Morgen om] LT', + nextWeek: 'dddd [om] LT', + lastDay: '[Gisteren om] LT', + lastWeek: '[afgelopen] dddd [om] LT', + sameElse: 'L' + }, + relativeTime : { + future : "over %s", + past : "%s geleden", + s : "een paar seconden", + m : "één minuut", + mm : "%d minuten", + h : "één uur", + hh : "%d uur", + d : "één dag", + dd : "%d dagen", + M : "één maand", + MM : "%d maanden", + y : "één jaar", + yy : "%d jaar" + }, + ordinal : function (number) { + return (number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'; + } + }; + + // Node + if (typeof module !== 'undefined' && module.exports) { + module.exports = lang; + } + // Browser + if (typeof window !== 'undefined' && this.moment && this.moment.lang) { + this.moment.lang('nl', lang); + } +}()); diff --git a/node_modules/emailjs/node_modules/moment/lang/pl.js b/node_modules/emailjs/node_modules/moment/lang/pl.js new file mode 100644 index 0000000..5c4193c --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/lang/pl.js @@ -0,0 +1,76 @@ +// moment.js language configuration +// language : polish (pl) +// author : Rafal Hirsz : https://github.com/evoL +(function () { + var plural = function (n) { + return (n % 10 < 5) && (n % 10 > 1) && (~~(n / 10) !== 1); + }, + + translate = function (number, withoutSuffix, key) { + var result = number + " "; + switch (key) { + case 'm': + return withoutSuffix ? 'minuta' : 'minutę'; + case 'mm': + return result + (plural(number) ? 'minuty' : 'minut'); + case 'h': + return withoutSuffix ? 'godzina' : 'godzinę'; + case 'hh': + return result + (plural(number) ? 'godziny' : 'godzin'); + case 'MM': + return result + (plural(number) ? 'miesiące' : 'miesięcy'); + case 'yy': + return result + (plural(number) ? 'lata' : 'lat'); + } + }, + + lang = { + months : "styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"), + monthsShort : "sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"), + weekdays : "niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"), + weekdaysShort : "nie_pon_wt_śr_czw_pt_sb".split("_"), + weekdaysMin : "N_Pn_Wt_Śr_Cz_Pt_So".split("_"), + longDateFormat : { + LT : "HH:mm", + L : "DD-MM-YYYY", + LL : "D MMMM YYYY", + LLL : "D MMMM YYYY LT", + LLLL : "dddd, D MMMM YYYY LT" + }, + calendar : { + sameDay: '[Dziś o] LT', + nextDay: '[Jutro o] LT', + nextWeek: '[W] dddd [o] LT', + lastDay: '[Wczoraj o] LT', + lastWeek: '[W zeszły/łą] dddd [o] LT', + sameElse: 'L' + }, + relativeTime : { + future : "za %s", + past : "%s temu", + s : "kilka sekund", + m : translate, + mm : translate, + h : translate, + hh : translate, + d : "1 dzień", + dd : '%d dni', + M : "miesiąc", + MM : translate, + y : "rok", + yy : translate + }, + ordinal : function (number) { + return '.'; + } + }; + + // Node + if (typeof module !== 'undefined' && module.exports) { + module.exports = lang; + } + // Browser + if (typeof window !== 'undefined' && this.moment && this.moment.lang) { + this.moment.lang('pl', lang); + } +}()); diff --git a/node_modules/emailjs/node_modules/moment/lang/pt-br.js b/node_modules/emailjs/node_modules/moment/lang/pt-br.js new file mode 100644 index 0000000..c83d4ac --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/lang/pt-br.js @@ -0,0 +1,58 @@ +// moment.js language configuration +// language : brazilian portuguese (pt-br) +// author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira +(function () { + var lang = { + months : "Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"), + monthsShort : "Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"), + weekdays : "Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"), + weekdaysShort : "Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"), + weekdaysMin : "Dom_2ª_3ª_4ª_5ª_6ª_Sáb".split("_"), + longDateFormat : { + LT : "HH:mm", + L : "DD/MM/YYYY", + LL : "D \\de MMMM \\de YYYY", + LLL : "D \\de MMMM \\de YYYY LT", + LLLL : "dddd, D \\de MMMM \\de YYYY LT" + }, + calendar : { + sameDay: '[Hoje às] LT', + nextDay: '[Amanhã às] LT', + nextWeek: 'dddd [às] LT', + lastDay: '[Ontem às] LT', + lastWeek: function () { + return (this.day() === 0 || this.day() === 6) ? + '[Último] dddd [às] LT' : // Saturday + Sunday + '[Última] dddd [às] LT'; // Monday - Friday + }, + sameElse: 'L' + }, + relativeTime : { + future : "em %s", + past : "%s atrás", + s : "segundos", + m : "um minuto", + mm : "%d minutos", + h : "uma hora", + hh : "%d horas", + d : "um dia", + dd : "%d dias", + M : "um mês", + MM : "%d meses", + y : "um ano", + yy : "%d anos" + }, + ordinal : function (number) { + return 'º'; + } + }; + + // Node + if (typeof module !== 'undefined' && module.exports) { + module.exports = lang; + } + // Browser + if (typeof window !== 'undefined' && this.moment && this.moment.lang) { + this.moment.lang('pt-br', lang); + } +}()); diff --git a/node_modules/emailjs/node_modules/moment/lang/pt.js b/node_modules/emailjs/node_modules/moment/lang/pt.js new file mode 100644 index 0000000..55eb540 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/lang/pt.js @@ -0,0 +1,58 @@ +// moment.js language configuration +// language : portuguese (pt) +// author : Jefferson : https://github.com/jalex79 +(function () { + var lang = { + months : "Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"), + monthsShort : "Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"), + weekdays : "Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"), + weekdaysShort : "Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"), + weekdaysMin : "Dom_2ª_3ª_4ª_5ª_6ª_Sáb".split("_"), + longDateFormat : { + LT : "HH:mm", + L : "DD/MM/YYYY", + LL : "D \\de MMMM \\de YYYY", + LLL : "D \\de MMMM \\de YYYY LT", + LLLL : "dddd, D \\de MMMM \\de YYYY LT" + }, + calendar : { + sameDay: '[Hoje às] LT', + nextDay: '[Amanhã às] LT', + nextWeek: 'dddd [às] LT', + lastDay: '[Ontem às] LT', + lastWeek: function () { + return (this.day() === 0 || this.day() === 6) ? + '[Último] dddd [às] LT' : // Saturday + Sunday + '[Última] dddd [às] LT'; // Monday - Friday + }, + sameElse: 'L' + }, + relativeTime : { + future : "em %s", + past : "%s atrás", + s : "segundos", + m : "um minuto", + mm : "%d minutos", + h : "uma hora", + hh : "%d horas", + d : "um dia", + dd : "%d dias", + M : "um mês", + MM : "%d meses", + y : "um ano", + yy : "%d anos" + }, + ordinal : function (number) { + return 'º'; + } + }; + + // Node + if (typeof module !== 'undefined' && module.exports) { + module.exports = lang; + } + // Browser + if (typeof window !== 'undefined' && this.moment && this.moment.lang) { + this.moment.lang('pt', lang); + } +}()); diff --git a/node_modules/emailjs/node_modules/moment/lang/ru.js b/node_modules/emailjs/node_modules/moment/lang/ru.js new file mode 100644 index 0000000..5c9617a --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/lang/ru.js @@ -0,0 +1,133 @@ +// moment.js language configuration +// language : russian (ru) +// author : Viktorminator : https://github.com/Viktorminator +(function () { + + var pluralRules = [ + function (n) { return ((n % 10 === 1) && (n % 100 !== 11)); }, + function (n) { return ((n % 10) >= 2 && (n % 10) <= 4 && ((n % 10) % 1) === 0) && ((n % 100) < 12 || (n % 100) > 14); }, + function (n) { return ((n % 10) === 0 || ((n % 10) >= 5 && (n % 10) <= 9 && ((n % 10) % 1) === 0) || ((n % 100) >= 11 && (n % 100) <= 14 && ((n % 100) % 1) === 0)); }, + function (n) { return true; } + ], + + plural = function (word, num) { + var forms = word.split('_'), + minCount = Math.min(pluralRules.length, forms.length), + i = -1; + + while (++i < minCount) { + if (pluralRules[i](num)) { + return forms[i]; + } + } + return forms[minCount - 1]; + }, + + relativeTimeWithPlural = function (number, withoutSuffix, key) { + var format = { + 'mm': 'минута_минуты_минут_минуты', + 'hh': 'час_часа_часов_часа', + 'dd': 'день_дня_дней_дня', + 'MM': 'месяц_месяца_месяцев_месяца', + 'yy': 'год_года_лет_года' + }; + if (key === 'm') { + return withoutSuffix ? 'минута' : 'минуту'; + } + else { + return number + ' ' + plural(format[key], +number); + } + }, + + monthsCaseReplace = function (m, format) { + var months = { + 'nominative': 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_'), + 'accusative': 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split('_') + }, + + nounCase = (/D[oD]? *MMMM?/).test(format) ? + 'accusative' : + 'nominative'; + + return months[nounCase][m.month()]; + }, + + weekdaysCaseReplace = function (m, format) { + var weekdays = { + 'nominative': 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split('_'), + 'accusative': 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split('_'), + }, + + nounCase = (/\[ ?[Вв] ?(?:прошлую|следующую)? ?\] ?dddd/).test(format) ? + 'accusative' : + 'nominative'; + + return weekdays[nounCase][m.day()]; + }, + + lang = { + months : monthsCaseReplace, + monthsShort : "янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"), + weekdays : weekdaysCaseReplace, + weekdaysShort : "вск_пнд_втр_срд_чтв_птн_сбт".split("_"), + weekdaysMin : "вс_пн_вт_ср_чт_пт_сб".split("_"), + longDateFormat : { + LT : "HH:mm", + L : "DD.MM.YYYY", + LL : "D MMMM YYYY г.", + LLL : "D MMMM YYYY г., LT", + LLLL : "dddd, D MMMM YYYY г., LT" + }, + calendar : { + sameDay: '[Сегодня в] LT', + nextDay: '[Завтра в] LT', + lastDay: '[Вчера в] LT', + nextWeek: function () { + return this.day() === 2 ? '[Во] dddd [в] LT' : '[В] dddd [в] LT'; + }, + lastWeek: function () { + switch (this.day()) { + case 0: + return '[В прошлое] dddd [в] LT'; + case 1: + case 2: + case 4: + return '[В прошлый] dddd [в] LT'; + case 3: + case 5: + case 6: + return '[В прошлую] dddd [в] LT'; + } + }, + sameElse: 'L' + }, + // It needs checking (adding) russian plurals and cases. + relativeTime : { + future : "через %s", + past : "%s назад", + s : "несколько секунд", + m : relativeTimeWithPlural, + mm : relativeTimeWithPlural, + h : "час", + hh : relativeTimeWithPlural, + d : "день", + dd : relativeTimeWithPlural, + M : "месяц", + MM : relativeTimeWithPlural, + y : "год", + yy : relativeTimeWithPlural + }, + ordinal : function (number) { + return '.'; + } + }; + + // Node + if (typeof module !== 'undefined' && module.exports) { + module.exports = lang; + } + // Browser + if (typeof window !== 'undefined' && this.moment && this.moment.lang) { + this.moment.lang('ru', lang); + } +}()); diff --git a/node_modules/emailjs/node_modules/moment/lang/sv.js b/node_modules/emailjs/node_modules/moment/lang/sv.js new file mode 100644 index 0000000..cb32ae8 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/lang/sv.js @@ -0,0 +1,58 @@ +// moment.js language configuration +// language : swedish (sv) +// author : Jens Alm : https://github.com/ulmus +(function () { + var lang = { + months : "januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"), + monthsShort : "jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"), + weekdays : "söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"), + weekdaysShort : "sön_mån_tis_ons_tor_fre_lör".split("_"), + weekdaysMin : "sö_må_ti_on_to_fr_lö".split("_"), + longDateFormat : { + LT : "HH:mm", + L : "YYYY-MM-DD", + LL : "D MMMM YYYY", + LLL : "D MMMM YYYY LT", + LLLL : "dddd D MMMM YYYY LT" + }, + calendar : { + sameDay: '[Idag klockan] LT', + nextDay: '[Imorgon klockan] LT', + lastDay: '[Igår klockan] LT', + nextWeek: 'dddd [klockan] LT', + lastWeek: '[Förra] dddd[en klockan] LT', + sameElse: 'L' + }, + relativeTime : { + future : "om %s", + past : "för %s sen", + s : "några sekunder", + m : "en minut", + mm : "%d minuter", + h : "en timme", + hh : "%d timmar", + d : "en dag", + dd : "%d dagar", + M : "en månad", + MM : "%d månader", + y : "ett år", + yy : "%d år" + }, + ordinal : function (number) { + var b = number % 10; + return (~~ (number % 100 / 10) === 1) ? 'e' : + (b === 1) ? 'a' : + (b === 2) ? 'a' : + (b === 3) ? 'e' : 'e'; + } + }; + + // Node + if (typeof module !== 'undefined' && module.exports) { + module.exports = lang; + } + // Browser + if (typeof window !== 'undefined' && this.moment && this.moment.lang) { + this.moment.lang('sv', lang); + } +}()); diff --git a/node_modules/emailjs/node_modules/moment/lang/tr.js b/node_modules/emailjs/node_modules/moment/lang/tr.js new file mode 100644 index 0000000..746899e --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/lang/tr.js @@ -0,0 +1,88 @@ +// moment.js language configuration +// language : turkish (tr) +// authors : Erhan Gundogan : https://github.com/erhangundogan, +// Burak Yiğit Kaya: https://github.com/BYK +(function () { + var suffixes = { + 1: "'inci", + 5: "'inci", + 8: "'inci", + 70: "'inci", + 80: "'inci", + + 2: "'nci", + 7: "'nci", + 20: "'nci", + 50: "'nci", + + 3: "'üncü", + 4: "'üncü", + 100: "'üncü", + + 6: "'ncı", + + 9: "'uncu", + 10: "'uncu", + 30: "'uncu", + + 60: "'ıncı", + 90: "'ıncı" + }; + var lang = { + months : "Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"), + monthsShort : "Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"), + weekdays : "Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"), + weekdaysShort : "Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"), + weekdaysMin : "Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"), + longDateFormat : { + LT : "HH:mm", + L : "DD.MM.YYYY", + LL : "D MMMM YYYY", + LLL : "D MMMM YYYY LT", + LLLL : "dddd, D MMMM YYYY LT" + }, + calendar : { + sameDay : '[bugün saat] LT', + nextDay : '[yarın saat] LT', + nextWeek : '[haftaya] dddd [saat] LT', + lastDay : '[dün] LT', + lastWeek : '[geçen hafta] dddd [saat] LT', + sameElse : 'L' + }, + relativeTime : { + future : "%s sonra", + past : "%s önce", + s : "birkaç saniye", + m : "bir dakika", + mm : "%d dakika", + h : "bir saat", + hh : "%d saat", + d : "bir gün", + dd : "%d gün", + M : "bir ay", + MM : "%d ay", + y : "bir yıl", + yy : "%d yıl" + }, + ordinal : function (number) { + if (number === 0) { // special case for zero + return "'ıncı"; + } + + var a = number % 10; + var b = number % 100 - a; + var c = number >= 100 ? 100 : null; + + return suffixes[a] || suffixes[b] || suffixes[c]; + } + }; + + // Node + if (typeof module !== 'undefined' && module.exports) { + module.exports = lang; + } + // Browser + if (typeof window !== 'undefined' && this.moment && this.moment.lang) { + this.moment.lang('tr', lang); + } +}()); diff --git a/node_modules/emailjs/node_modules/moment/lang/zh-cn.js b/node_modules/emailjs/node_modules/moment/lang/zh-cn.js new file mode 100644 index 0000000..0dd1ebb --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/lang/zh-cn.js @@ -0,0 +1,67 @@ +// moment.js language configuration +// language : chinese +// author : suupic : https://github.com/suupic +(function () { + var lang = { + months : "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"), + monthsShort : "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"), + weekdays : "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"), + weekdaysShort : "周日_周一_周二_周三_周四_周五_周六".split("_"), + weekdaysMin : "日_一_二_三_四_五_六".split("_"), + longDateFormat : { + LT : "Ah点mm", + L : "YYYY年MMMD日", + LL : "YYYY年MMMD日", + LLL : "YYYY年MMMD日LT", + LLLL : "YYYY年MMMD日ddddLT" + }, + meridiem : function (hour, minute, isLower) { + if (hour < 9) { + return "早上"; + } else if (hour < 11 && minute < 30) { + return "上午"; + } else if (hour < 13 && minute < 30) { + return "中午"; + } else if (hour < 18) { + return "下午"; + } else { + return "晚上"; + } + }, + calendar : { + sameDay : '[今天]LT', + nextDay : '[明天]LT', + nextWeek : '[下]ddddLT', + lastDay : '[昨天]LT', + lastWeek : '[上]ddddLT', + sameElse : 'L' + }, + relativeTime : { + future : "%s内", + past : "%s前", + s : "几秒", + m : "1分钟", + mm : "%d分钟", + h : "1小时", + hh : "%d小时", + d : "1天", + dd : "%d天", + M : "1个月", + MM : "%d个月", + y : "1年", + yy : "%d年" + }, + ordinal : function (number) { + return ''; + } + }; + + // Node + if (typeof module !== 'undefined' && module.exports) { + module.exports = lang; + } + // Browser + if (typeof window !== 'undefined' && this.moment && this.moment.lang) { + this.moment.lang('zh-cn', lang); + } +}()); diff --git a/node_modules/emailjs/node_modules/moment/lang/zh-tw.js b/node_modules/emailjs/node_modules/moment/lang/zh-tw.js new file mode 100644 index 0000000..0938718 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/lang/zh-tw.js @@ -0,0 +1,67 @@ +// moment.js language configuration +// language : traditional chinese (zh-tw) +// author : Ben : https://github.com/ben-lin +(function () { + var lang = { + months : "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"), + monthsShort : "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"), + weekdays : "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"), + weekdaysShort : "週日_週一_週二_週三_週四_週五_週六".split("_"), + weekdaysMin : "日_一_二_三_四_五_六".split("_"), + longDateFormat : { + LT : "Ah點mm", + L : "YYYY年MMMD日", + LL : "YYYY年MMMD日", + LLL : "YYYY年MMMD日LT", + LLLL : "YYYY年MMMD日ddddLT" + }, + meridiem : function (hour, minute, isLower) { + if (hour < 9) { + return "早上"; + } else if (hour < 11 && minute < 30) { + return "上午"; + } else if (hour < 13 && minute < 30) { + return "中午"; + } else if (hour < 18) { + return "下午"; + } else { + return "晚上"; + } + }, + calendar : { + sameDay : '[今天]LT', + nextDay : '[明天]LT', + nextWeek : '[下]ddddLT', + lastDay : '[昨天]LT', + lastWeek : '[上]ddddLT', + sameElse : 'L' + }, + relativeTime : { + future : "%s內", + past : "%s前", + s : "幾秒", + m : "一分鐘", + mm : "%d分鐘", + h : "一小時", + hh : "%d小時", + d : "一天", + dd : "%d天", + M : "一個月", + MM : "%d個月", + y : "一年", + yy : "%d年" + }, + ordinal : function (number) { + return ''; + } + }; + + // Node + if (typeof module !== 'undefined' && module.exports) { + module.exports = lang; + } + // Browser + if (typeof window !== 'undefined' && this.moment && this.moment.lang) { + this.moment.lang('zh-tw', lang); + } +}()); diff --git a/node_modules/emailjs/node_modules/moment/min/lang-all.min.js b/node_modules/emailjs/node_modules/moment/min/lang-all.min.js new file mode 100644 index 0000000..f870207 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/min/lang-all.min.js @@ -0,0 +1,5 @@ +// moment.js language configuration +// language : bulgarian (bg) +// author : Krasen Borisov : https://github.com/kraz +(function(){var a={months:"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),monthsShort:"янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),weekdays:"неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),weekdaysShort:"нед_пон_вто_сря_чет_пет_съб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"h:mm",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Днес в] LT",nextDay:"[Утре в] LT",nextWeek:"dddd [в] LT",lastDay:"[Вчера в] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[В изминалата] dddd [в] LT";case 1:case 2:case 4:case 5:return"[В изминалия] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"след %s",past:"преди %s",s:"няколко секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дни",M:"месец",MM:"%d месеца",y:"година",yy:"%d години"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("bg",a)})(),function(){var a={months:"Gener_Febrer_Març_Abril_Maig_Juny_Juliol_Agost_Setembre_Octubre_Novembre_Desembre".split("_"),monthsShort:"Gen._Febr._Mar._Abr._Mai._Jun._Jul._Ag._Set._Oct._Nov._Des.".split("_"),weekdays:"Diumenge_Dilluns_Dimarts_Dimecres_Dijous_Divendres_Dissabte".split("_"),weekdaysShort:"Dg._Dl._Dt._Dc._Dj._Dv._Ds.".split("_"),weekdaysMin:"Dg_Dl_Dt_Dc_Dj_Dv_Ds".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:function(){return"[avui a "+(this.hours()!==1?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(this.hours()!==1?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(this.hours()!==1?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(this.hours()!==1?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(this.hours()!==1?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"fa %s",s:"uns segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},ordinal:function(a){return"º"}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("ca",a)}(),function(){var a={months:"кăрлач_нарăс_пуш_ака_май_çĕртме_утă_çурла_авăн_юпа_чӳк_раштав".split("_"),monthsShort:"кăр_нар_пуш_ака_май_çĕр_утă_çур_ав_юпа_чӳк_раш".split("_"),weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кĕçнерникун_эрнекун_шăматкун".split("_"),weekdaysShort:"выр_тун_ытл_юн_кĕç_эрн_шăм".split("_"),weekdaysMin:"вр_тн_ыт_юн_кç_эр_шм".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"YYYY çулхи MMMM уйăхĕн D-мĕшĕ",LLL:"YYYY çулхи MMMM уйăхĕн D-мĕшĕ, LT",LLLL:"dddd, YYYY çулхи MMMM уйăхĕн D-мĕшĕ, LT"},calendar:{sameDay:"[Паян] LT [сехетре]",nextDay:"[Ыран] LT [сехетре]",lastDay:"[Ĕнер] LT [сехетре]",nextWeek:"[Çитес] dddd LT [сехетре]",lastWeek:"[Иртнĕ] dddd LT [сехетре]",sameElse:"L"},relativeTime:{future:"%sран",past:"%s каялла",s:"пĕр-ик çеккунт",m:"пĕр минут",mm:"%d минут",h:"пĕр сехет",hh:"%d сехет",d:"пĕр кун",dd:"%d кун",M:"пĕр уйăх",MM:"%d уйăх",y:"пĕр çул",yy:"%d çул"},ordinal:function(a){return"-мĕш"}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("cv",a)}(),function(){var a={months:"Januar_Februar_Marts_April_Maj_Juni_Juli_August_September_Oktober_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Maj_Jun_Jul_Aug_Sep_Okt_Nov_Dec".split("_"),weekdays:"Søndag_Mandag_Tirsdag_Onsdag_Torsdag_Fredag_Lørdag".split("_"),weekdaysShort:"Søn_Man_Tir_Ons_Tor_Fre_Lør".split("_"),weekdaysMin:"Sø_Ma_Ti_On_To_Fr_Lø".split("_"),longDateFormat:{LT:"h:mm A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd D. MMMM, YYYY h:mm A"},calendar:{sameDay:"[I dag kl.] LT",nextDay:"[I morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[I går kl.] LT",lastWeek:"[sidste] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",m:"minut",mm:"%d minutter",h:"time",hh:"%d timer",d:"dag",dd:"%d dage",M:"månede",MM:"%d måneder",y:"år",yy:"%d år"},ordinal:function(a){return"."}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("da",a)}(),function(){var a={months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),longDateFormat:{LT:"H:mm U\\hr",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[Heute um] LT",sameElse:"L",nextDay:"[Morgen um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gestern um] LT",lastWeek:"[letzten] dddd [um] LT"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",m:"einer Minute",mm:"%d Minuten",h:"einer Stunde",hh:"%d Stunden",d:"einem Tag",dd:"%d Tagen",M:"einem Monat",MM:"%d Monaten",y:"einem Jahr",yy:"%d Jahren"},ordinal:function(a){return"."}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("de",a)}(),function(){var a={months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",L:"YYYY-MM-DD",LL:"D MMMM, YYYY",LLL:"D MMMM, YYYY LT",LLLL:"dddd, D MMMM, YYYY LT"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"th":b===1?"st":b===2?"nd":b===3?"rd":"th"}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("en-gb",a)}(),function(){var a={months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"th":b===1?"st":b===2?"nd":b===3?"rd":"th"}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("en-gb",a)}(),function(){var a={months:"Enero_Febrero_Marzo_Abril_Mayo_Junio_Julio_Agosto_Septiembre_Octubre_Noviembre_Diciembre".split("_"),monthsShort:"Ene._Feb._Mar._Abr._May._Jun._Jul._Ago._Sep._Oct._Nov._Dic.".split("_"),weekdays:"Domingo_Lunes_Martes_Miércoles_Jueves_Viernes_Sábado".split("_"),weekdaysShort:"Dom._Lun._Mar._Mié._Jue._Vie._Sáb.".split("_"),weekdaysMin:"Do_Lu_Ma_Mi_Ju_Vi_Sá".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:function(){return"[hoy a la"+(this.hours()!==1?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(this.hours()!==1?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(this.hours()!==1?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(this.hours()!==1?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(this.hours()!==1?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:function(a){return"º"}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("es",a)}(),function(){var a={months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"YYYYko MMMMren D[a]",LLL:"YYYYko MMMMren D[a] LT",LLLL:"dddd, YYYYko MMMMren D[a] LT"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},ordinal:function(a){return"."}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("eu",a)}(),function(){function c(a,b,c,e){var f="";switch(c){case"s":return e?"muutaman sekunnin":"muutama sekunti";case"m":return e?"minuutin":"minuutti";case"mm":f=e?"minuutin":"minuuttia";break;case"h":return e?"tunnin":"tunti";case"hh":f=e?"tunnin":"tuntia";break;case"d":return e?"päivän":"päivä";case"dd":f=e?"päivän":"päivää";break;case"M":return e?"kuukauden":"kuukausi";case"MM":f=e?"kuukauden":"kuukautta";break;case"y":return e?"vuoden":"vuosi";case"yy":f=e?"vuoden":"vuotta"}return f=d(a,e)+" "+f,f}function d(c,d){return c<10?d?b[c]:a[c]:c}var a=["nolla","yksi","kaksi","kolme","neljä","viisi","kuusi","seitsemän","kahdeksan","yhdeksän"],b=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",a[7],a[8],a[9]],e={months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tam_hel_maa_huh_tou_kes_hei_elo_syy_lok_mar_jou".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",L:"DD.MM.YYYY",LL:"Do MMMMt\\a YYYY",LLL:"Do MMMMt\\a YYYY, klo LT",LLLL:"dddd, Do MMMMt\\a YYYY, klo LT"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:c,m:c,mm:c,h:c,hh:c,d:c,dd:c,M:c,MM:c,y:c,yy:c},ordinal:function(a){return"."}};typeof module!="undefined"&&module.exports&&(module.exports=e),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("fi",e)}(),function(){var a={months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Aujourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"une année",yy:"%d années"},ordinal:function(a){return a===1?"er":"ème"}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("fr",a)}(),function(){var a={months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Aujourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"une année",yy:"%d années"},ordinal:function(a){return a===1?"er":"ème"}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("fr",a)}(),function(){var a={months:"Xaneiro_Febreiro_Marzo_Abril_Maio_Xuño_Xullo_Agosto_Setembro_Octubro_Novembro_Decembro".split("_"),monthsShort:"Xan._Feb._Mar._Abr._Mai._Xuñ._Xul._Ago._Set._Out._Nov._Dec.".split("_"),weekdays:"Domingo_Luns_Martes_Mércores_Xoves_Venres_Sábado".split("_"),weekdaysShort:"Dom._Lun._Mar._Mér._Xov._Ven._Sáb.".split("_"),weekdaysMin:"Do_Lu_Ma_Mé_Xo_Ve_Sá".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:function(){return"[hoxe "+(this.hours()!==1?"ás":"a")+"] LT"},nextDay:function(){return"[mañá "+(this.hours()!==1?"ás":"a")+"] LT"},nextWeek:function(){return"dddd ["+(this.hours()!==1?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(this.hours()!==1?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(this.hours()!==1?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"fai %s",s:"uns segundo",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},ordinal:function(a){return"º"}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("gl",a)}(),function(){function a(a,b,c,d){var e=a;switch(c){case"s":return d||b?"néhány másodperc":"néhány másodperce";case"m":e="egy";case"mm":return e+(d||b?" perc":" perce");case"h":e="egy";case"hh":return e+(d||b?" óra":" órája");case"d":e="egy";case"dd":return e+(d||b?" nap":" napja");case"M":e="egy";case"MM":return e+(d||b?" hónap":" hónapja");case"y":e="egy";case"yy":return e+(d||b?" év":" éve");default:}return""}function b(a){var b="";switch(this.day()){case 0:b="vasárnap";break;case 1:b="hétfőn";break;case 2:b="kedden";break;case 3:b="szerdán";break;case 4:b="csütörtökön";break;case 5:b="pénteken";break;case 6:b="szombaton"}return(a?"":"múlt ")+"["+b+"] LT[-kor]"}var c={months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec".split("_"),weekdays:"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D., LT",LLLL:"YYYY. MMMM D., dddd LT"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return b.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return b.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s múlva",past:"%s",s:a,m:a,mm:a,h:a,hh:a,d:a,dd:a,M:a,MM:a,y:a,yy:a},ordinal:function(a){return"."}};typeof module!="undefined"&&module.exports&&(module.exports=c),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("hu",c)}(),function(){var a=function(a){return a%100==11?!0:a%10==1?!1:!0},b=function(b,c,d,e){var f=b+" ";switch(d){case"s":return c||e?"nokkrar sekúndur":"nokkrum sekúndum";case"m":return c?"mínúta":"mínútu";case"mm":return a(b)?f+(c||e?"mínútur":"mínútum"):c?f+"mínúta":f+"mínútu";case"hh":return a(b)?f+(c||e?"klukkustundir":"klukkustundum"):f+"klukkustund";case"d":return c?"dagur":e?"dag":"degi";case"dd":return a(b)?c?f+"dagar":f+(e?"daga":"dögum"):c?f+"dagur":f+(e?"dag":"degi");case"M":return c?"mánuður":e?"mánuð":"mánuði";case"MM":return a(b)?c?f+"mánuðir":f+(e?"mánuði":"mánuðum"):c?f+"mánuður":f+(e?"mánuð":"mánuði");case"y":return c||e?"ár":"ári";case"yy":return a(b)?f+(c||e?"ár":"árum"):f+(c||e?"ár":"ári")}},c={months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY kl. LT",LLLL:"dddd, D. MMMM YYYY kl. LT"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:b,m:b,mm:b,h:"klukkustund",hh:b,d:b,dd:b,M:b,MM:b,y:b,yy:b},ordinal:function(a){return"."}};typeof module!="undefined"&&module.exports&&(module.exports=c),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("is",c)}(),function(){var a={months:"Gennaio_Febbraio_Marzo_Aprile_Maggio_Giugno_Luglio_Agosto_Settebre_Ottobre_Novembre_Dicembre".split("_"),monthsShort:"Gen_Feb_Mar_Apr_Mag_Giu_Lug_Ago_Set_Ott_Nov_Dic".split("_"),weekdays:"Domenica_Lunedì_Martedì_Mercoledì_Giovedì_Venerdì_Sabato".split("_"),weekdaysShort:"Dom_Lun_Mar_Mer_Gio_Ven_Sab".split("_"),weekdaysMin:"D_L_Ma_Me_G_V_S".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:"[lo scorso] dddd [alle] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s fa",s:"secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(){return"º"}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("it",a)}(),function(){var a={months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"Ah時m分",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日LT",LLLL:"YYYY年M月D日LT dddd"},meridiem:function(a,b,c){return a<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:"[来週]dddd LT",lastDay:"[昨日] LT",lastWeek:"[前週]dddd LT",sameElse:"L"},relativeTime:{future:"%s後",past:"%s前",s:"数秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"},ordinal:function(a){return""}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("ja",a)}(),function(){var a={months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"Ah時m分",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日LT",LLLL:"YYYY年M月D日LT dddd"},meridiem:function(a,b,c){return a<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:"[来週]dddd LT",lastDay:"[昨日] LT",lastWeek:"[前週]dddd LT",sameElse:"L"},relativeTime:{future:"%s後",past:"%s前",s:"数秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"},ordinal:function(a){return""}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("jp",a)}(),function(){var a={months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h시 mm분",L:"YYYY.MM.DD",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 LT",LLLL:"YYYY년 MMMM D일 dddd LT"},meridiem:function(a,b,c){return a<12?"오전":"오후"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇초",ss:"%d초",m:"일분",mm:"%d분",h:"한시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한달",MM:"%d달",y:"일년",yy:"%d년"},ordinal:function(a){return"일"}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("ko",a)}(),function(){var a={months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h시 mm분",L:"YYYY.MM.DD",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 LT",LLLL:"YYYY년 MMMM D일 dddd LT"},meridiem:function(a,b,c){return a<12?"오전":"오후"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇초",ss:"%d초",m:"일분",mm:"%d분",h:"한시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한달",MM:"%d달",y:"일년",yy:"%d년"},ordinal:function(a){return"일"}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("kr",a)}(),function(){var a={months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[I dag klokken] LT",nextDay:"[I morgen klokken] LT",nextWeek:"dddd [klokken] LT",lastDay:"[I går klokken] LT",lastWeek:"[Forrige] dddd [klokken] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"for %s siden",s:"noen sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},ordinal:function(a){return"."}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("nb",a)}(),function(){var a="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),b="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),c={months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(c,d){return/-MMM-/.test(d)?b[c.month()]:a[c.month()]},weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"Zo_Ma_Di_Wo_Do_Vr_Za".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Vandaag om] LT",nextDay:"[Morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},ordinal:function(a){return a===1||a===8||a>=20?"ste":"de"}};typeof module!="undefined"&&module.exports&&(module.exports=c),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("nl",c)}(),function(){var a=function(a){return a%10<5&&a%10>1&&~~(a/10)!==1},b=function(b,c,d){var e=b+" ";switch(d){case"m":return c?"minuta":"minutę";case"mm":return e+(a(b)?"minuty":"minut");case"h":return c?"godzina":"godzinę";case"hh":return e+(a(b)?"godziny":"godzin");case"MM":return e+(a(b)?"miesiące":"miesięcy");case"yy":return e+(a(b)?"lata":"lat")}},c={months:"styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"nie_pon_wt_śr_czw_pt_sb".split("_"),weekdaysMin:"N_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:"[W] dddd [o] LT",lastDay:"[Wczoraj o] LT",lastWeek:"[W zeszły/łą] dddd [o] LT",sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",m:b,mm:b,h:b,hh:b,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:b,y:"rok",yy:b},ordinal:function(a){return"."}};typeof module!="undefined"&&module.exports&&(module.exports=c),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("pl",c)}(),function(){var a={months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Dom_2ª_3ª_4ª_5ª_6ª_Sáb".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D \\de MMMM \\de YYYY",LLL:"D \\de MMMM \\de YYYY LT",LLLL:"dddd, D \\de MMMM \\de YYYY LT"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return this.day()===0||this.day()===6?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"%s atrás",s:"segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},ordinal:function(a){return"º"}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("pt-br",a)}(),function(){var a={months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Dom_2ª_3ª_4ª_5ª_6ª_Sáb".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D \\de MMMM \\de YYYY",LLL:"D \\de MMMM \\de YYYY LT",LLLL:"dddd, D \\de MMMM \\de YYYY LT"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return this.day()===0||this.day()===6?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"%s atrás",s:"segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},ordinal:function(a){return"º"}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("pt",a)}(),function(){var a=[function(a){return a%10===1&&a%100!==11},function(a){return a%10>=2&&a%10<=4&&a%10%1===0&&(a%100<12||a%100>14)},function(a){return a%10===0||a%10>=5&&a%10<=9&&a%10%1===0||a%100>=11&&a%100<=14&&a%100%1===0},function(a){return!0}],b=function(b,c){var d=b.split("_"),e=Math.min(a.length,d.length),f=-1;while(++f=100?100:null;return a[c]||a[d]||a[e]}};typeof module!="undefined"&&module.exports&&(module.exports=b),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("tr",b)}(),function(){var a={months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"Ah点mm",L:"YYYY年MMMD日",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日LT",LLLL:"YYYY年MMMD日ddddLT"},meridiem:function(a,b,c){return a<9?"早上":a<11&&b<30?"上午":a<13&&b<30?"中午":a<18?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1分钟",mm:"%d分钟",h:"1小时",hh:"%d小时",d:"1天",dd:"%d天",M:"1个月",MM:"%d个月",y:"1年",yy:"%d年"},ordinal:function(a){return""}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("zh-cn",a)}(),function(){var a={months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"Ah點mm",L:"YYYY年MMMD日",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日LT",LLLL:"YYYY年MMMD日ddddLT"},meridiem:function(a,b,c){return a<9?"早上":a<11&&b<30?"上午":a<13&&b<30?"中午":a<18?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"一分鐘",mm:"%d分鐘",h:"一小時",hh:"%d小時",d:"一天",dd:"%d天",M:"一個月",MM:"%d個月",y:"一年",yy:"%d年"},ordinal:function(a){return""}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("zh-tw",a)}(); \ No newline at end of file diff --git a/node_modules/emailjs/node_modules/moment/min/lang/bg.js b/node_modules/emailjs/node_modules/moment/min/lang/bg.js new file mode 100644 index 0000000..94beac4 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/min/lang/bg.js @@ -0,0 +1,4 @@ +// moment.js language configuration +// language : bulgarian (bg) +// author : Krasen Borisov : https://github.com/kraz +(function(){var a={months:"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),monthsShort:"янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),weekdays:"неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),weekdaysShort:"нед_пон_вто_сря_чет_пет_съб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"h:mm",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Днес в] LT",nextDay:"[Утре в] LT",nextWeek:"dddd [в] LT",lastDay:"[Вчера в] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[В изминалата] dddd [в] LT";case 1:case 2:case 4:case 5:return"[В изминалия] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"след %s",past:"преди %s",s:"няколко секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дни",M:"месец",MM:"%d месеца",y:"година",yy:"%d години"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("bg",a)})(); \ No newline at end of file diff --git a/node_modules/emailjs/node_modules/moment/min/lang/ca.js b/node_modules/emailjs/node_modules/moment/min/lang/ca.js new file mode 100644 index 0000000..3c9b566 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/min/lang/ca.js @@ -0,0 +1,4 @@ +// moment.js language configuration +// language : catalan (ca) +// author : Juan G. Hurtado : https://github.com/juanghurtado +(function(){var a={months:"Gener_Febrer_Març_Abril_Maig_Juny_Juliol_Agost_Setembre_Octubre_Novembre_Desembre".split("_"),monthsShort:"Gen._Febr._Mar._Abr._Mai._Jun._Jul._Ag._Set._Oct._Nov._Des.".split("_"),weekdays:"Diumenge_Dilluns_Dimarts_Dimecres_Dijous_Divendres_Dissabte".split("_"),weekdaysShort:"Dg._Dl._Dt._Dc._Dj._Dv._Ds.".split("_"),weekdaysMin:"Dg_Dl_Dt_Dc_Dj_Dv_Ds".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:function(){return"[avui a "+(this.hours()!==1?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(this.hours()!==1?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(this.hours()!==1?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(this.hours()!==1?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(this.hours()!==1?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"fa %s",s:"uns segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},ordinal:function(a){return"º"}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("ca",a)})(); \ No newline at end of file diff --git a/node_modules/emailjs/node_modules/moment/min/lang/cv.js b/node_modules/emailjs/node_modules/moment/min/lang/cv.js new file mode 100644 index 0000000..92c1c88 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/min/lang/cv.js @@ -0,0 +1,4 @@ +// moment.js language configuration +// language : chuvash (cv) +// author : Anatoly Mironov : https://github.com/mirontoli +(function(){var a={months:"кăрлач_нарăс_пуш_ака_май_çĕртме_утă_çурла_авăн_юпа_чӳк_раштав".split("_"),monthsShort:"кăр_нар_пуш_ака_май_çĕр_утă_çур_ав_юпа_чӳк_раш".split("_"),weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кĕçнерникун_эрнекун_шăматкун".split("_"),weekdaysShort:"выр_тун_ытл_юн_кĕç_эрн_шăм".split("_"),weekdaysMin:"вр_тн_ыт_юн_кç_эр_шм".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"YYYY çулхи MMMM уйăхĕн D-мĕшĕ",LLL:"YYYY çулхи MMMM уйăхĕн D-мĕшĕ, LT",LLLL:"dddd, YYYY çулхи MMMM уйăхĕн D-мĕшĕ, LT"},calendar:{sameDay:"[Паян] LT [сехетре]",nextDay:"[Ыран] LT [сехетре]",lastDay:"[Ĕнер] LT [сехетре]",nextWeek:"[Çитес] dddd LT [сехетре]",lastWeek:"[Иртнĕ] dddd LT [сехетре]",sameElse:"L"},relativeTime:{future:"%sран",past:"%s каялла",s:"пĕр-ик çеккунт",m:"пĕр минут",mm:"%d минут",h:"пĕр сехет",hh:"%d сехет",d:"пĕр кун",dd:"%d кун",M:"пĕр уйăх",MM:"%d уйăх",y:"пĕр çул",yy:"%d çул"},ordinal:function(a){return"-мĕш"}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("cv",a)})(); \ No newline at end of file diff --git a/node_modules/emailjs/node_modules/moment/min/lang/da.js b/node_modules/emailjs/node_modules/moment/min/lang/da.js new file mode 100644 index 0000000..9a6391f --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/min/lang/da.js @@ -0,0 +1,4 @@ +// moment.js language configuration +// language : danish (da) +// author : Ulrik Nielsen : https://github.com/mrbase +(function(){var a={months:"Januar_Februar_Marts_April_Maj_Juni_Juli_August_September_Oktober_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Maj_Jun_Jul_Aug_Sep_Okt_Nov_Dec".split("_"),weekdays:"Søndag_Mandag_Tirsdag_Onsdag_Torsdag_Fredag_Lørdag".split("_"),weekdaysShort:"Søn_Man_Tir_Ons_Tor_Fre_Lør".split("_"),weekdaysMin:"Sø_Ma_Ti_On_To_Fr_Lø".split("_"),longDateFormat:{LT:"h:mm A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd D. MMMM, YYYY h:mm A"},calendar:{sameDay:"[I dag kl.] LT",nextDay:"[I morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[I går kl.] LT",lastWeek:"[sidste] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",m:"minut",mm:"%d minutter",h:"time",hh:"%d timer",d:"dag",dd:"%d dage",M:"månede",MM:"%d måneder",y:"år",yy:"%d år"},ordinal:function(a){return"."}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("da",a)})(); \ No newline at end of file diff --git a/node_modules/emailjs/node_modules/moment/min/lang/de.js b/node_modules/emailjs/node_modules/moment/min/lang/de.js new file mode 100644 index 0000000..524da56 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/min/lang/de.js @@ -0,0 +1,4 @@ +// moment.js language configuration +// language : german (de) +// author : lluchs : https://github.com/lluchs +(function(){var a={months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),longDateFormat:{LT:"H:mm U\\hr",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[Heute um] LT",sameElse:"L",nextDay:"[Morgen um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gestern um] LT",lastWeek:"[letzten] dddd [um] LT"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",m:"einer Minute",mm:"%d Minuten",h:"einer Stunde",hh:"%d Stunden",d:"einem Tag",dd:"%d Tagen",M:"einem Monat",MM:"%d Monaten",y:"einem Jahr",yy:"%d Jahren"},ordinal:function(a){return"."}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("de",a)})(); \ No newline at end of file diff --git a/node_modules/emailjs/node_modules/moment/min/lang/en-ca.js b/node_modules/emailjs/node_modules/moment/min/lang/en-ca.js new file mode 100644 index 0000000..3c7bce4 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/min/lang/en-ca.js @@ -0,0 +1,4 @@ +// moment.js language configuration +// language : canadian english (en-ca) +// author : Jonathan Abourbih : https://github.com/jonbca +(function(){var a={months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",L:"YYYY-MM-DD",LL:"D MMMM, YYYY",LLL:"D MMMM, YYYY LT",LLLL:"dddd, D MMMM, YYYY LT"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"th":b===1?"st":b===2?"nd":b===3?"rd":"th"}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("en-gb",a)})(); \ No newline at end of file diff --git a/node_modules/emailjs/node_modules/moment/min/lang/en-gb.js b/node_modules/emailjs/node_modules/moment/min/lang/en-gb.js new file mode 100644 index 0000000..f86fa43 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/min/lang/en-gb.js @@ -0,0 +1,4 @@ +// moment.js language configuration +// language : great britain english (en-gb) +// author : Chris Gedrim : https://github.com/chrisgedrim +(function(){var a={months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"th":b===1?"st":b===2?"nd":b===3?"rd":"th"}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("en-gb",a)})(); \ No newline at end of file diff --git a/node_modules/emailjs/node_modules/moment/min/lang/es.js b/node_modules/emailjs/node_modules/moment/min/lang/es.js new file mode 100644 index 0000000..53ac4d2 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/min/lang/es.js @@ -0,0 +1,4 @@ +// moment.js language configuration +// language : spanish (es) +// author : Julio Napurí : https://github.com/julionc +(function(){var a={months:"Enero_Febrero_Marzo_Abril_Mayo_Junio_Julio_Agosto_Septiembre_Octubre_Noviembre_Diciembre".split("_"),monthsShort:"Ene._Feb._Mar._Abr._May._Jun._Jul._Ago._Sep._Oct._Nov._Dic.".split("_"),weekdays:"Domingo_Lunes_Martes_Miércoles_Jueves_Viernes_Sábado".split("_"),weekdaysShort:"Dom._Lun._Mar._Mié._Jue._Vie._Sáb.".split("_"),weekdaysMin:"Do_Lu_Ma_Mi_Ju_Vi_Sá".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:function(){return"[hoy a la"+(this.hours()!==1?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(this.hours()!==1?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(this.hours()!==1?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(this.hours()!==1?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(this.hours()!==1?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:function(a){return"º"}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("es",a)})(); \ No newline at end of file diff --git a/node_modules/emailjs/node_modules/moment/min/lang/eu.js b/node_modules/emailjs/node_modules/moment/min/lang/eu.js new file mode 100644 index 0000000..453d512 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/min/lang/eu.js @@ -0,0 +1,4 @@ +// moment.js language configuration +// language : euskara (eu) +// author : Eneko Illarramendi : https://github.com/eillarra +(function(){var a={months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"YYYYko MMMMren D[a]",LLL:"YYYYko MMMMren D[a] LT",LLLL:"dddd, YYYYko MMMMren D[a] LT"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},ordinal:function(a){return"."}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("eu",a)})(); \ No newline at end of file diff --git a/node_modules/emailjs/node_modules/moment/min/lang/fi.js b/node_modules/emailjs/node_modules/moment/min/lang/fi.js new file mode 100644 index 0000000..97c1b22 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/min/lang/fi.js @@ -0,0 +1,4 @@ +// moment.js language configuration +// language : finnish (fi) +// author : Tarmo Aidantausta : https://github.com/bleadof +(function(){function c(a,b,c,e){var f="";switch(c){case"s":return e?"muutaman sekunnin":"muutama sekunti";case"m":return e?"minuutin":"minuutti";case"mm":f=e?"minuutin":"minuuttia";break;case"h":return e?"tunnin":"tunti";case"hh":f=e?"tunnin":"tuntia";break;case"d":return e?"päivän":"päivä";case"dd":f=e?"päivän":"päivää";break;case"M":return e?"kuukauden":"kuukausi";case"MM":f=e?"kuukauden":"kuukautta";break;case"y":return e?"vuoden":"vuosi";case"yy":f=e?"vuoden":"vuotta"}return f=d(a,e)+" "+f,f}function d(c,d){return c<10?d?b[c]:a[c]:c}var a=["nolla","yksi","kaksi","kolme","neljä","viisi","kuusi","seitsemän","kahdeksan","yhdeksän"],b=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",a[7],a[8],a[9]],e={months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tam_hel_maa_huh_tou_kes_hei_elo_syy_lok_mar_jou".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",L:"DD.MM.YYYY",LL:"Do MMMMt\\a YYYY",LLL:"Do MMMMt\\a YYYY, klo LT",LLLL:"dddd, Do MMMMt\\a YYYY, klo LT"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:c,m:c,mm:c,h:c,hh:c,d:c,dd:c,M:c,MM:c,y:c,yy:c},ordinal:function(a){return"."}};typeof module!="undefined"&&module.exports&&(module.exports=e),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("fi",e)})(); \ No newline at end of file diff --git a/node_modules/emailjs/node_modules/moment/min/lang/fr-ca.js b/node_modules/emailjs/node_modules/moment/min/lang/fr-ca.js new file mode 100644 index 0000000..7c19ae4 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/min/lang/fr-ca.js @@ -0,0 +1,4 @@ +// moment.js language configuration +// language : canadian french (fr-ca) +// author : Jonathan Abourbih : https://github.com/jonbca +(function(){var a={months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Aujourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"une année",yy:"%d années"},ordinal:function(a){return a===1?"er":"ème"}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("fr",a)})(); \ No newline at end of file diff --git a/node_modules/emailjs/node_modules/moment/min/lang/fr.js b/node_modules/emailjs/node_modules/moment/min/lang/fr.js new file mode 100644 index 0000000..53589d9 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/min/lang/fr.js @@ -0,0 +1,4 @@ +// moment.js language configuration +// language : french (fr) +// author : John Fischer : https://github.com/jfroffice +(function(){var a={months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Aujourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"une année",yy:"%d années"},ordinal:function(a){return a===1?"er":"ème"}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("fr",a)})(); \ No newline at end of file diff --git a/node_modules/emailjs/node_modules/moment/min/lang/gl.js b/node_modules/emailjs/node_modules/moment/min/lang/gl.js new file mode 100644 index 0000000..9e6d6fd --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/min/lang/gl.js @@ -0,0 +1,4 @@ +// moment.js language configuration +// language : galician (gl) +// author : Juan G. Hurtado : https://github.com/juanghurtado +(function(){var a={months:"Xaneiro_Febreiro_Marzo_Abril_Maio_Xuño_Xullo_Agosto_Setembro_Octubro_Novembro_Decembro".split("_"),monthsShort:"Xan._Feb._Mar._Abr._Mai._Xuñ._Xul._Ago._Set._Out._Nov._Dec.".split("_"),weekdays:"Domingo_Luns_Martes_Mércores_Xoves_Venres_Sábado".split("_"),weekdaysShort:"Dom._Lun._Mar._Mér._Xov._Ven._Sáb.".split("_"),weekdaysMin:"Do_Lu_Ma_Mé_Xo_Ve_Sá".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:function(){return"[hoxe "+(this.hours()!==1?"ás":"a")+"] LT"},nextDay:function(){return"[mañá "+(this.hours()!==1?"ás":"a")+"] LT"},nextWeek:function(){return"dddd ["+(this.hours()!==1?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(this.hours()!==1?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(this.hours()!==1?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"fai %s",s:"uns segundo",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},ordinal:function(a){return"º"}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("gl",a)})(); \ No newline at end of file diff --git a/node_modules/emailjs/node_modules/moment/min/lang/hu.js b/node_modules/emailjs/node_modules/moment/min/lang/hu.js new file mode 100644 index 0000000..1101c17 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/min/lang/hu.js @@ -0,0 +1,4 @@ +// moment.js language configuration +// language : hungarian (hu) +// author : Adam Brunner : https://github.com/adambrunner +(function(){function a(a,b,c,d){var e=a;switch(c){case"s":return d||b?"néhány másodperc":"néhány másodperce";case"m":e="egy";case"mm":return e+(d||b?" perc":" perce");case"h":e="egy";case"hh":return e+(d||b?" óra":" órája");case"d":e="egy";case"dd":return e+(d||b?" nap":" napja");case"M":e="egy";case"MM":return e+(d||b?" hónap":" hónapja");case"y":e="egy";case"yy":return e+(d||b?" év":" éve");default:}return""}function b(a){var b="";switch(this.day()){case 0:b="vasárnap";break;case 1:b="hétfőn";break;case 2:b="kedden";break;case 3:b="szerdán";break;case 4:b="csütörtökön";break;case 5:b="pénteken";break;case 6:b="szombaton"}return(a?"":"múlt ")+"["+b+"] LT[-kor]"}var c={months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec".split("_"),weekdays:"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D., LT",LLLL:"YYYY. MMMM D., dddd LT"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return b.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return b.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s múlva",past:"%s",s:a,m:a,mm:a,h:a,hh:a,d:a,dd:a,M:a,MM:a,y:a,yy:a},ordinal:function(a){return"."}};typeof module!="undefined"&&module.exports&&(module.exports=c),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("hu",c)})(); \ No newline at end of file diff --git a/node_modules/emailjs/node_modules/moment/min/lang/is.js b/node_modules/emailjs/node_modules/moment/min/lang/is.js new file mode 100644 index 0000000..9da0426 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/min/lang/is.js @@ -0,0 +1,4 @@ +// moment.js language configuration +// language : icelandic (is) +// author : Hinrik Örn Sigurðsson : https://github.com/hinrik +(function(){var a=function(a){return a%100==11?!0:a%10==1?!1:!0},b=function(b,c,d,e){var f=b+" ";switch(d){case"s":return c||e?"nokkrar sekúndur":"nokkrum sekúndum";case"m":return c?"mínúta":"mínútu";case"mm":return a(b)?f+(c||e?"mínútur":"mínútum"):c?f+"mínúta":f+"mínútu";case"hh":return a(b)?f+(c||e?"klukkustundir":"klukkustundum"):f+"klukkustund";case"d":return c?"dagur":e?"dag":"degi";case"dd":return a(b)?c?f+"dagar":f+(e?"daga":"dögum"):c?f+"dagur":f+(e?"dag":"degi");case"M":return c?"mánuður":e?"mánuð":"mánuði";case"MM":return a(b)?c?f+"mánuðir":f+(e?"mánuði":"mánuðum"):c?f+"mánuður":f+(e?"mánuð":"mánuði");case"y":return c||e?"ár":"ári";case"yy":return a(b)?f+(c||e?"ár":"árum"):f+(c||e?"ár":"ári")}},c={months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY kl. LT",LLLL:"dddd, D. MMMM YYYY kl. LT"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:b,m:b,mm:b,h:"klukkustund",hh:b,d:b,dd:b,M:b,MM:b,y:b,yy:b},ordinal:function(a){return"."}};typeof module!="undefined"&&module.exports&&(module.exports=c),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("is",c)})(); \ No newline at end of file diff --git a/node_modules/emailjs/node_modules/moment/min/lang/it.js b/node_modules/emailjs/node_modules/moment/min/lang/it.js new file mode 100644 index 0000000..3773f38 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/min/lang/it.js @@ -0,0 +1,4 @@ +// moment.js language configuration +// language : italian (it) +// author : Lorenzo : https://github.com/aliem +(function(){var a={months:"Gennaio_Febbraio_Marzo_Aprile_Maggio_Giugno_Luglio_Agosto_Settebre_Ottobre_Novembre_Dicembre".split("_"),monthsShort:"Gen_Feb_Mar_Apr_Mag_Giu_Lug_Ago_Set_Ott_Nov_Dic".split("_"),weekdays:"Domenica_Lunedì_Martedì_Mercoledì_Giovedì_Venerdì_Sabato".split("_"),weekdaysShort:"Dom_Lun_Mar_Mer_Gio_Ven_Sab".split("_"),weekdaysMin:"D_L_Ma_Me_G_V_S".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:"[lo scorso] dddd [alle] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s fa",s:"secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(){return"º"}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("it",a)})(); \ No newline at end of file diff --git a/node_modules/emailjs/node_modules/moment/min/lang/ja.js b/node_modules/emailjs/node_modules/moment/min/lang/ja.js new file mode 100644 index 0000000..c4f01ab --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/min/lang/ja.js @@ -0,0 +1,4 @@ +// moment.js language configuration +// language : japanese (ja) +// author : LI Long : https://github.com/baryon +(function(){var a={months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"Ah時m分",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日LT",LLLL:"YYYY年M月D日LT dddd"},meridiem:function(a,b,c){return a<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:"[来週]dddd LT",lastDay:"[昨日] LT",lastWeek:"[前週]dddd LT",sameElse:"L"},relativeTime:{future:"%s後",past:"%s前",s:"数秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"},ordinal:function(a){return""}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("ja",a)})(); \ No newline at end of file diff --git a/node_modules/emailjs/node_modules/moment/min/lang/jp.js b/node_modules/emailjs/node_modules/moment/min/lang/jp.js new file mode 100644 index 0000000..dbf237a --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/min/lang/jp.js @@ -0,0 +1,6 @@ +// moment.js language configuration +// language : japanese (jp) +// author : LI Long : https://github.com/baryon +// This language config was incorrectly named 'jp' instead of 'ja'. +// In version 2.0.0, this will be deprecated and you should use 'ja' instead. +(function(){var a={months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"Ah時m分",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日LT",LLLL:"YYYY年M月D日LT dddd"},meridiem:function(a,b,c){return a<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:"[来週]dddd LT",lastDay:"[昨日] LT",lastWeek:"[前週]dddd LT",sameElse:"L"},relativeTime:{future:"%s後",past:"%s前",s:"数秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"},ordinal:function(a){return""}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("jp",a)})(); \ No newline at end of file diff --git a/node_modules/emailjs/node_modules/moment/min/lang/ko.js b/node_modules/emailjs/node_modules/moment/min/lang/ko.js new file mode 100644 index 0000000..f54a5ae --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/min/lang/ko.js @@ -0,0 +1,4 @@ +// moment.js language configuration +// language : korean (ko) +// author : Kyungwook, Park : https://github.com/kyungw00k +(function(){var a={months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h시 mm분",L:"YYYY.MM.DD",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 LT",LLLL:"YYYY년 MMMM D일 dddd LT"},meridiem:function(a,b,c){return a<12?"오전":"오후"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇초",ss:"%d초",m:"일분",mm:"%d분",h:"한시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한달",MM:"%d달",y:"일년",yy:"%d년"},ordinal:function(a){return"일"}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("ko",a)})(); \ No newline at end of file diff --git a/node_modules/emailjs/node_modules/moment/min/lang/kr.js b/node_modules/emailjs/node_modules/moment/min/lang/kr.js new file mode 100644 index 0000000..d2ac35f --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/min/lang/kr.js @@ -0,0 +1,6 @@ +// moment.js language configuration +// language : korean (kr) +// author : Kyungwook, Park : https://github.com/kyungw00k +// This language config was incorrectly named 'kr' instead of 'ko'. +// In version 2.0.0, this will be deprecated and you should use 'ko' instead. +(function(){var a={months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h시 mm분",L:"YYYY.MM.DD",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 LT",LLLL:"YYYY년 MMMM D일 dddd LT"},meridiem:function(a,b,c){return a<12?"오전":"오후"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇초",ss:"%d초",m:"일분",mm:"%d분",h:"한시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한달",MM:"%d달",y:"일년",yy:"%d년"},ordinal:function(a){return"일"}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("kr",a)})(); \ No newline at end of file diff --git a/node_modules/emailjs/node_modules/moment/min/lang/nb.js b/node_modules/emailjs/node_modules/moment/min/lang/nb.js new file mode 100644 index 0000000..d476a33 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/min/lang/nb.js @@ -0,0 +1,4 @@ +// moment.js language configuration +// language : norwegian bokmål (nb) +// author : Espen Hovlandsdal : https://github.com/rexxars +(function(){var a={months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[I dag klokken] LT",nextDay:"[I morgen klokken] LT",nextWeek:"dddd [klokken] LT",lastDay:"[I går klokken] LT",lastWeek:"[Forrige] dddd [klokken] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"for %s siden",s:"noen sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},ordinal:function(a){return"."}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("nb",a)})(); \ No newline at end of file diff --git a/node_modules/emailjs/node_modules/moment/min/lang/nl.js b/node_modules/emailjs/node_modules/moment/min/lang/nl.js new file mode 100644 index 0000000..a9084b7 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/min/lang/nl.js @@ -0,0 +1,4 @@ +// moment.js language configuration +// language : dutch (nl) +// author : Joris Röling : https://github.com/jjupiter +(function(){var a="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),b="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),c={months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(c,d){return/-MMM-/.test(d)?b[c.month()]:a[c.month()]},weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"Zo_Ma_Di_Wo_Do_Vr_Za".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Vandaag om] LT",nextDay:"[Morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},ordinal:function(a){return a===1||a===8||a>=20?"ste":"de"}};typeof module!="undefined"&&module.exports&&(module.exports=c),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("nl",c)})(); \ No newline at end of file diff --git a/node_modules/emailjs/node_modules/moment/min/lang/pl.js b/node_modules/emailjs/node_modules/moment/min/lang/pl.js new file mode 100644 index 0000000..aeab208 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/min/lang/pl.js @@ -0,0 +1,4 @@ +// moment.js language configuration +// language : polish (pl) +// author : Rafal Hirsz : https://github.com/evoL +(function(){var a=function(a){return a%10<5&&a%10>1&&~~(a/10)!==1},b=function(b,c,d){var e=b+" ";switch(d){case"m":return c?"minuta":"minutę";case"mm":return e+(a(b)?"minuty":"minut");case"h":return c?"godzina":"godzinę";case"hh":return e+(a(b)?"godziny":"godzin");case"MM":return e+(a(b)?"miesiące":"miesięcy");case"yy":return e+(a(b)?"lata":"lat")}},c={months:"styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"nie_pon_wt_śr_czw_pt_sb".split("_"),weekdaysMin:"N_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:"[W] dddd [o] LT",lastDay:"[Wczoraj o] LT",lastWeek:"[W zeszły/łą] dddd [o] LT",sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",m:b,mm:b,h:b,hh:b,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:b,y:"rok",yy:b},ordinal:function(a){return"."}};typeof module!="undefined"&&module.exports&&(module.exports=c),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("pl",c)})(); \ No newline at end of file diff --git a/node_modules/emailjs/node_modules/moment/min/lang/pt-br.js b/node_modules/emailjs/node_modules/moment/min/lang/pt-br.js new file mode 100644 index 0000000..fcba685 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/min/lang/pt-br.js @@ -0,0 +1,4 @@ +// moment.js language configuration +// language : brazilian portuguese (pt-br) +// author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira +(function(){var a={months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Dom_2ª_3ª_4ª_5ª_6ª_Sáb".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D \\de MMMM \\de YYYY",LLL:"D \\de MMMM \\de YYYY LT",LLLL:"dddd, D \\de MMMM \\de YYYY LT"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return this.day()===0||this.day()===6?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"%s atrás",s:"segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},ordinal:function(a){return"º"}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("pt-br",a)})(); \ No newline at end of file diff --git a/node_modules/emailjs/node_modules/moment/min/lang/pt.js b/node_modules/emailjs/node_modules/moment/min/lang/pt.js new file mode 100644 index 0000000..7b9f4c9 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/min/lang/pt.js @@ -0,0 +1,4 @@ +// moment.js language configuration +// language : portuguese (pt) +// author : Jefferson : https://github.com/jalex79 +(function(){var a={months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Dom_2ª_3ª_4ª_5ª_6ª_Sáb".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D \\de MMMM \\de YYYY",LLL:"D \\de MMMM \\de YYYY LT",LLLL:"dddd, D \\de MMMM \\de YYYY LT"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return this.day()===0||this.day()===6?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"%s atrás",s:"segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},ordinal:function(a){return"º"}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("pt",a)})(); \ No newline at end of file diff --git a/node_modules/emailjs/node_modules/moment/min/lang/ru.js b/node_modules/emailjs/node_modules/moment/min/lang/ru.js new file mode 100644 index 0000000..66bf414 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/min/lang/ru.js @@ -0,0 +1,4 @@ +// moment.js language configuration +// language : russian (ru) +// author : Viktorminator : https://github.com/Viktorminator +(function(){var a=[function(a){return a%10===1&&a%100!==11},function(a){return a%10>=2&&a%10<=4&&a%10%1===0&&(a%100<12||a%100>14)},function(a){return a%10===0||a%10>=5&&a%10<=9&&a%10%1===0||a%100>=11&&a%100<=14&&a%100%1===0},function(a){return!0}],b=function(b,c){var d=b.split("_"),e=Math.min(a.length,d.length),f=-1;while(++f=100?100:null;return a[c]||a[d]||a[e]}};typeof module!="undefined"&&module.exports&&(module.exports=b),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("tr",b)})(); \ No newline at end of file diff --git a/node_modules/emailjs/node_modules/moment/min/lang/zh-cn.js b/node_modules/emailjs/node_modules/moment/min/lang/zh-cn.js new file mode 100644 index 0000000..9f435f6 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/min/lang/zh-cn.js @@ -0,0 +1,4 @@ +// moment.js language configuration +// language : chinese +// author : suupic : https://github.com/suupic +(function(){var a={months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"Ah点mm",L:"YYYY年MMMD日",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日LT",LLLL:"YYYY年MMMD日ddddLT"},meridiem:function(a,b,c){return a<9?"早上":a<11&&b<30?"上午":a<13&&b<30?"中午":a<18?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1分钟",mm:"%d分钟",h:"1小时",hh:"%d小时",d:"1天",dd:"%d天",M:"1个月",MM:"%d个月",y:"1年",yy:"%d年"},ordinal:function(a){return""}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("zh-cn",a)})(); \ No newline at end of file diff --git a/node_modules/emailjs/node_modules/moment/min/lang/zh-tw.js b/node_modules/emailjs/node_modules/moment/min/lang/zh-tw.js new file mode 100644 index 0000000..915bdba --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/min/lang/zh-tw.js @@ -0,0 +1,4 @@ +// moment.js language configuration +// language : traditional chinese (zh-tw) +// author : Ben : https://github.com/ben-lin +(function(){var a={months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"Ah點mm",L:"YYYY年MMMD日",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日LT",LLLL:"YYYY年MMMD日ddddLT"},meridiem:function(a,b,c){return a<9?"早上":a<11&&b<30?"上午":a<13&&b<30?"中午":a<18?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"一分鐘",mm:"%d分鐘",h:"一小時",hh:"%d小時",d:"一天",dd:"%d天",M:"一個月",MM:"%d個月",y:"一年",yy:"%d年"},ordinal:function(a){return""}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("zh-tw",a)})(); \ No newline at end of file diff --git a/node_modules/emailjs/node_modules/moment/min/moment.min.js b/node_modules/emailjs/node_modules/moment/min/moment.min.js new file mode 100644 index 0000000..4c35923 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/min/moment.min.js @@ -0,0 +1,6 @@ +// moment.js +// version : 1.7.0 +// author : Tim Wood +// license : MIT +// momentjs.com +(function(a,b){function G(a,b,c){this._d=a,this._isUTC=!!b,this._a=a._a||null,a._a=null,this._lang=c||!1}function H(a){var b=this._data={},c=a.years||a.y||0,d=a.months||a.M||0,e=a.weeks||a.w||0,f=a.days||a.d||0,g=a.hours||a.h||0,h=a.minutes||a.m||0,i=a.seconds||a.s||0,j=a.milliseconds||a.ms||0;this._milliseconds=j+i*1e3+h*6e4+g*36e5,this._days=f+e*7,this._months=d+c*12,b.milliseconds=j%1e3,i+=I(j/1e3),b.seconds=i%60,h+=I(i/60),b.minutes=h%60,g+=I(h/60),b.hours=g%24,f+=I(g/24),f+=e*7,b.days=f%30,d+=I(f/30),b.months=d%12,c+=I(d/12),b.years=c,this._lang=!1}function I(a){return a<0?Math.ceil(a):Math.floor(a)}function J(a,b){var c=a+"";while(c.length70?1900:2e3);break;case"YYYY":c[0]=~~Math.abs(b);break;case"a":case"A":d.isPm=(b+"").toLowerCase()==="pm";break;case"H":case"HH":case"h":case"hh":c[3]=~~b;break;case"m":case"mm":c[4]=~~b;break;case"s":case"ss":c[5]=~~b;break;case"S":case"SS":case"SSS":c[6]=~~(("0."+b)*1e3);break;case"Z":case"ZZ":d.isUTC=!0,e=(b+"").match(z),e&&e[1]&&(d.tzh=~~e[1]),e&&e[2]&&(d.tzm=~~e[2]),e&&e[0]==="+"&&(d.tzh=-d.tzh,d.tzm=-d.tzm)}}function X(a,b){var c=[0,0,1,0,0,0,0],d={tzh:0,tzm:0},e=b.match(l),f,g;for(f=0;f0,j[4]=c,$.apply({},j)}function ab(a,b){c.fn[a]=function(a){var c=this._isUTC?"UTC":"";return a!=null?(this._d["set"+c+b](a),this):this._d["get"+c+b]()}}function bb(a){c.duration.fn[a]=function(){return this._data[a]}}function cb(a,b){c.duration.fn["as"+a]=function(){return+this/b}}var c,d="1.7.0",e=Math.round,f,g={},h="en",i=typeof module!="undefined"&&module.exports,j="months|monthsShort|weekdays|weekdaysShort|weekdaysMin|longDateFormat|calendar|relativeTime|ordinal|meridiem".split("|"),k=/^\/?Date\((\-?\d+)/i,l=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|YYYY|YY|a|A|hh?|HH?|mm?|ss?|SS?S?|zz?|ZZ?)/g,m=/(LT|LL?L?L?)/g,n=/(^\[)|(\\)|\]$/g,o=/([0-9a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+)/gi,p=/\d\d?/,q=/\d{1,3}/,r=/\d{3}/,s=/\d{1,4}/,t=/[0-9a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+/i,u=/Z|[\+\-]\d\d:?\d\d/i,v=/T/i,w=/^\s*\d{4}-\d\d-\d\d(T(\d\d(:\d\d(:\d\d(\.\d\d?\d?)?)?)?)?([\+\-]\d\d:?\d\d)?)?/,x="YYYY-MM-DDTHH:mm:ssZ",y=[["HH:mm:ss.S",/T\d\d:\d\d:\d\d\.\d{1,3}/],["HH:mm:ss",/T\d\d:\d\d:\d\d/],["HH:mm",/T\d\d:\d\d/],["HH",/T\d\d/]],z=/([\+\-]|\d\d)/gi,A="Month|Date|Hours|Minutes|Seconds|Milliseconds".split("|"),B={Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6},C={},D={M:"(a=t.month()+1)",MMM:'v("monthsShort",t.month())',MMMM:'v("months",t.month())',D:"(a=t.date())",DDD:"(a=new Date(t.year(),t.month(),t.date()),b=new Date(t.year(),0,1),a=~~(((a-b)/864e5)+1.5))",d:"(a=t.day())",dd:'v("weekdaysMin",t.day())',ddd:'v("weekdaysShort",t.day())',dddd:'v("weekdays",t.day())',w:"(a=new Date(t.year(),t.month(),t.date()-t.day()+5),b=new Date(a.getFullYear(),0,4),a=~~((a-b)/864e5/7+1.5))",YY:"p(t.year()%100,2)",YYYY:"p(t.year(),4)",a:"m(t.hours(),t.minutes(),!0)",A:"m(t.hours(),t.minutes(),!1)",H:"t.hours()",h:"t.hours()%12||12",m:"t.minutes()",s:"t.seconds()",S:"~~(t.milliseconds()/100)",SS:"p(~~(t.milliseconds()/10),2)",SSS:"p(t.milliseconds(),3)",Z:'((a=-t.zone())<0?((a=-a),"-"):"+")+p(~~(a/60),2)+":"+p(~~a%60,2)',ZZ:'((a=-t.zone())<0?((a=-a),"-"):"+")+p(~~(10*a/6),4)'},E="DDD w M D d".split(" "),F="M D H h m s w".split(" ");while(E.length)f=E.pop(),D[f+"o"]=D[f]+"+o(a)";while(F.length)f=F.pop(),D[f+f]="p("+D[f]+",2)";D.DDDD="p("+D.DDD+",3)",c=function(d,e){if(d===null||d==="")return null;var f,g;return c.isMoment(d)?new G(new a(+d._d),d._isUTC,d._lang):(e?L(e)?f=Y(d,e):f=X(d,e):(g=k.exec(d),f=d===b?new a:g?new a(+g[1]):d instanceof a?d:L(d)?N(d):typeof d=="string"?Z(d):new a(d)),new G(f))},c.utc=function(a,b){return L(a)?new G(N(a,!0),!0):(typeof a=="string"&&!u.exec(a)&&(a+=" +0000",b&&(b+=" Z")),c(a,b).utc())},c.unix=function(a){return c(a*1e3)},c.duration=function(a,b){var d=c.isDuration(a),e=typeof a=="number",f=d?a._data:e?{}:a,g;return e&&(b?f[b]=a:f.milliseconds=a),g=new H(f),d&&(g._lang=a._lang),g},c.humanizeDuration=function(a,b,d){return c.duration(a,b===!0?null:b).humanize(b===!0?!0:d)},c.version=d,c.defaultFormat=x,c.lang=function(a,b){var d;if(!a)return h;(b||!g[a])&&O(a,b);if(g[a]){for(d=0;d11?c?"pm":"PM":c?"am":"AM"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"th":b===1?"st":b===2?"nd":b===3?"rd":"th"}}),c.fn=G.prototype={clone:function(){return c(this)},valueOf:function(){return+this._d},unix:function(){return Math.floor(+this._d/1e3)},toString:function(){return this._d.toString()},toDate:function(){return this._d},toArray:function(){var a=this;return[a.year(),a.month(),a.date(),a.hours(),a.minutes(),a.seconds(),a.milliseconds(),!!this._isUTC]},isValid:function(){return this._a?!M(this._a,(this._a[7]?c.utc(this):this).toArray()):!isNaN(this._d.getTime())},utc:function(){return this._isUTC=!0,this},local:function(){return this._isUTC=!1,this},format:function(a){return U(this,a?a:c.defaultFormat)},add:function(a,b){var d=b?c.duration(+b,a):c.duration(a);return K(this,d,1),this},subtract:function(a,b){var d=b?c.duration(+b,a):c.duration(a);return K(this,d,-1),this},diff:function(a,b,d){var f=this._isUTC?c(a).utc():c(a).local(),g=(this.zone()-f.zone())*6e4,h=this._d-f._d-g,i=this.year()-f.year(),j=this.month()-f.month(),k=this.date()-f.date(),l;return b==="months"?l=i*12+j+k/30:b==="years"?l=i+(j+k/30)/12:l=b==="seconds"?h/1e3:b==="minutes"?h/6e4:b==="hours"?h/36e5:b==="days"?h/864e5:b==="weeks"?h/6048e5:h,d?l:e(l)},from:function(a,b){return c.duration(this.diff(a)).lang(this._lang).humanize(!b)},fromNow:function(a){return this.from(c(),a)},calendar:function(){var a=this.diff(c().sod(),"days",!0),b=this.lang().calendar,d=b.sameElse,e=a<-6?d:a<-1?b.lastWeek:a<0?b.lastDay:a<1?b.sameDay:a<2?b.nextDay:a<7?b.nextWeek:d;return this.format(typeof e=="function"?e.apply(this):e)},isLeapYear:function(){var a=this.year();return a%4===0&&a%100!==0||a%400===0},isDST:function(){return this.zone() 70 ? 1900 : 2e3); + break; + case "YYYY": + c[0] = ~~Math.abs(b); + break; + case "a": + case "A": + d.isPm = (b + "").toLowerCase() === "pm"; + break; + case "H": + case "HH": + case "h": + case "hh": + c[3] = ~~b; + break; + case "m": + case "mm": + c[4] = ~~b; + break; + case "s": + case "ss": + c[5] = ~~b; + break; + case "S": + case "SS": + case "SSS": + c[6] = ~~(("0." + b) * 1e3); + break; + case "Z": + case "ZZ": + d.isUTC = !0, e = (b + "").match(z), e && e[1] && (d.tzh = ~~e[1]), e && e[2] && (d.tzm = ~~e[2]), e && e[0] === "+" && (d.tzh = -d.tzh, d.tzm = -d.tzm); + } + } + function X(a, b) { + var c = [ 0, 0, 1, 0, 0, 0, 0 ], d = { + tzh: 0, + tzm: 0 + }, e = b.match(l), f, g; + for (f = 0; f < e.length; f++) g = (V(e[f]).exec(a) || [])[0], a = a.replace(V(e[f]), ""), W(e[f], g, c, d); + return d.isPm && c[3] < 12 && (c[3] += 12), d.isPm === !1 && c[3] === 12 && (c[3] = 0), c[3] += d.tzh, c[4] += d.tzm, N(c, d.isUTC); + } + function Y(a, b) { + var c, d = a.match(o) || [], e, f = 99, g, h, i; + for (g = 0; g < b.length; g++) h = X(a, b[g]), e = U(new G(h), b[g]).match(o) || [], i = M(d, e), i < f && (f = i, c = h); + return c; + } + function Z(b) { + var c = "YYYY-MM-DDT", d; + if (w.exec(b)) { + for (d = 0; d < 4; d++) if (y[d][1].exec(b)) { + c += y[d][0]; + break; + } + return u.exec(b) ? X(b, c + " Z") : X(b, c); + } + return new a(b); + } + function $(a, b, c, d, e) { + var f = e.relativeTime[a]; + return typeof f == "function" ? f(b || 1, !!c, a, d) : f.replace(/%d/i, b || 1); + } + function _(a, b, c) { + var d = e(Math.abs(a) / 1e3), f = e(d / 60), g = e(f / 60), h = e(g / 24), i = e(h / 365), j = d < 45 && [ "s", d ] || f === 1 && [ "m" ] || f < 45 && [ "mm", f ] || g === 1 && [ "h" ] || g < 22 && [ "hh", g ] || h === 1 && [ "d" ] || h <= 25 && [ "dd", h ] || h <= 45 && [ "M" ] || h < 345 && [ "MM", e(h / 30) ] || i === 1 && [ "y" ] || [ "yy", i ]; + return j[2] = b, j[3] = a > 0, j[4] = c, $.apply({}, j); + } + function ab(a, b) { + c.fn[a] = function(a) { + var c = this._isUTC ? "UTC" : ""; + return a != null ? (this._d["set" + c + b](a), this) : this._d["get" + c + b](); + }; + } + function bb(a) { + c.duration.fn[a] = function() { + return this._data[a]; + }; + } + function cb(a, b) { + c.duration.fn["as" + a] = function() { + return +this / b; + }; + } + var c, d = "1.7.0", e = Math.round, f, g = {}, h = "en", i = typeof module != "undefined" && module.exports, j = "months|monthsShort|weekdays|weekdaysShort|weekdaysMin|longDateFormat|calendar|relativeTime|ordinal|meridiem".split("|"), k = /^\/?Date\((\-?\d+)/i, l = /(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|YYYY|YY|a|A|hh?|HH?|mm?|ss?|SS?S?|zz?|ZZ?)/g, m = /(LT|LL?L?L?)/g, n = /(^\[)|(\\)|\]$/g, o = /([0-9a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+)/gi, p = /\d\d?/, q = /\d{1,3}/, r = /\d{3}/, s = /\d{1,4}/, t = /[0-9a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+/i, u = /Z|[\+\-]\d\d:?\d\d/i, v = /T/i, w = /^\s*\d{4}-\d\d-\d\d(T(\d\d(:\d\d(:\d\d(\.\d\d?\d?)?)?)?)?([\+\-]\d\d:?\d\d)?)?/, x = "YYYY-MM-DDTHH:mm:ssZ", y = [ [ "HH:mm:ss.S", /T\d\d:\d\d:\d\d\.\d{1,3}/ ], [ "HH:mm:ss", /T\d\d:\d\d:\d\d/ ], [ "HH:mm", /T\d\d:\d\d/ ], [ "HH", /T\d\d/ ] ], z = /([\+\-]|\d\d)/gi, A = "Month|Date|Hours|Minutes|Seconds|Milliseconds".split("|"), B = { + Milliseconds: 1, + Seconds: 1e3, + Minutes: 6e4, + Hours: 36e5, + Days: 864e5, + Months: 2592e6, + Years: 31536e6 + }, C = {}, D = { + M: "(a=t.month()+1)", + MMM: 'v("monthsShort",t.month())', + MMMM: 'v("months",t.month())', + D: "(a=t.date())", + DDD: "(a=new Date(t.year(),t.month(),t.date()),b=new Date(t.year(),0,1),a=~~(((a-b)/864e5)+1.5))", + d: "(a=t.day())", + dd: 'v("weekdaysMin",t.day())', + ddd: 'v("weekdaysShort",t.day())', + dddd: 'v("weekdays",t.day())', + w: "(a=new Date(t.year(),t.month(),t.date()-t.day()+5),b=new Date(a.getFullYear(),0,4),a=~~((a-b)/864e5/7+1.5))", + YY: "p(t.year()%100,2)", + YYYY: "p(t.year(),4)", + a: "m(t.hours(),t.minutes(),!0)", + A: "m(t.hours(),t.minutes(),!1)", + H: "t.hours()", + h: "t.hours()%12||12", + m: "t.minutes()", + s: "t.seconds()", + S: "~~(t.milliseconds()/100)", + SS: "p(~~(t.milliseconds()/10),2)", + SSS: "p(t.milliseconds(),3)", + Z: '((a=-t.zone())<0?((a=-a),"-"):"+")+p(~~(a/60),2)+":"+p(~~a%60,2)', + ZZ: '((a=-t.zone())<0?((a=-a),"-"):"+")+p(~~(10*a/6),4)' + }, E = "DDD w M D d".split(" "), F = "M D H h m s w".split(" "); + while (E.length) f = E.pop(), D[f + "o"] = D[f] + "+o(a)"; + while (F.length) f = F.pop(), D[f + f] = "p(" + D[f] + ",2)"; + D.DDDD = "p(" + D.DDD + ",3)", c = function(d, e) { + if (d === null || d === "") return null; + var f, g; + return c.isMoment(d) ? new G(new a(+d._d), d._isUTC, d._lang) : (e ? L(e) ? f = Y(d, e) : f = X(d, e) : (g = k.exec(d), f = d === b ? new a : g ? new a(+g[1]) : d instanceof a ? d : L(d) ? N(d) : typeof d == "string" ? Z(d) : new a(d)), new G(f)); + }, c.utc = function(a, b) { + return L(a) ? new G(N(a, !0), !0) : (typeof a == "string" && !u.exec(a) && (a += " +0000", b && (b += " Z")), c(a, b).utc()); + }, c.unix = function(a) { + return c(a * 1e3); + }, c.duration = function(a, b) { + var d = c.isDuration(a), e = typeof a == "number", f = d ? a._data : e ? {} : a, g; + return e && (b ? f[b] = a : f.milliseconds = a), g = new H(f), d && (g._lang = a._lang), g; + }, c.humanizeDuration = function(a, b, d) { + return c.duration(a, b === !0 ? null : b).humanize(b === !0 ? !0 : d); + }, c.version = d, c.defaultFormat = x, c.lang = function(a, b) { + var d; + if (!a) return h; + (b || !g[a]) && O(a, b); + if (g[a]) { + for (d = 0; d < j.length; d++) c[j[d]] = g[a][j[d]]; + c.monthsParse = g[a].monthsParse, h = a; + } + }, c.langData = P, c.isMoment = function(a) { + return a instanceof G; + }, c.isDuration = function(a) { + return a instanceof H; + }, c.lang("en", { + months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), + monthsShort: "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"), + weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), + weekdaysShort: "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), + weekdaysMin: "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), + longDateFormat: { + LT: "h:mm A", + L: "MM/DD/YYYY", + LL: "MMMM D YYYY", + LLL: "MMMM D YYYY LT", + LLLL: "dddd, MMMM D YYYY LT" + }, + meridiem: function(a, b, c) { + return a > 11 ? c ? "pm" : "PM" : c ? "am" : "AM"; + }, + calendar: { + sameDay: "[Today at] LT", + nextDay: "[Tomorrow at] LT", + nextWeek: "dddd [at] LT", + lastDay: "[Yesterday at] LT", + lastWeek: "[last] dddd [at] LT", + sameElse: "L" + }, + relativeTime: { + future: "in %s", + past: "%s ago", + s: "a few seconds", + m: "a minute", + mm: "%d minutes", + h: "an hour", + hh: "%d hours", + d: "a day", + dd: "%d days", + M: "a month", + MM: "%d months", + y: "a year", + yy: "%d years" + }, + ordinal: function(a) { + var b = a % 10; + return ~~(a % 100 / 10) === 1 ? "th" : b === 1 ? "st" : b === 2 ? "nd" : b === 3 ? "rd" : "th"; + } + }), c.fn = G.prototype = { + clone: function() { + return c(this); + }, + valueOf: function() { + return +this._d; + }, + unix: function() { + return Math.floor(+this._d / 1e3); + }, + toString: function() { + return this._d.toString(); + }, + toDate: function() { + return this._d; + }, + toArray: function() { + var a = this; + return [ a.year(), a.month(), a.date(), a.hours(), a.minutes(), a.seconds(), a.milliseconds(), !!this._isUTC ]; + }, + isValid: function() { + return this._a ? !M(this._a, (this._a[7] ? c.utc(this) : this).toArray()) : !isNaN(this._d.getTime()); + }, + utc: function() { + return this._isUTC = !0, this; + }, + local: function() { + return this._isUTC = !1, this; + }, + format: function(a) { + return U(this, a ? a : c.defaultFormat); + }, + add: function(a, b) { + var d = b ? c.duration(+b, a) : c.duration(a); + return K(this, d, 1), this; + }, + subtract: function(a, b) { + var d = b ? c.duration(+b, a) : c.duration(a); + return K(this, d, -1), this; + }, + diff: function(a, b, d) { + var f = this._isUTC ? c(a).utc() : c(a).local(), g = (this.zone() - f.zone()) * 6e4, h = this._d - f._d - g, i = this.year() - f.year(), j = this.month() - f.month(), k = this.date() - f.date(), l; + return b === "months" ? l = i * 12 + j + k / 30 : b === "years" ? l = i + (j + k / 30) / 12 : l = b === "seconds" ? h / 1e3 : b === "minutes" ? h / 6e4 : b === "hours" ? h / 36e5 : b === "days" ? h / 864e5 : b === "weeks" ? h / 6048e5 : h, d ? l : e(l); + }, + from: function(a, b) { + return c.duration(this.diff(a)).lang(this._lang).humanize(!b); + }, + fromNow: function(a) { + return this.from(c(), a); + }, + calendar: function() { + var a = this.diff(c().sod(), "days", !0), b = this.lang().calendar, d = b.sameElse, e = a < -6 ? d : a < -1 ? b.lastWeek : a < 0 ? b.lastDay : a < 1 ? b.sameDay : a < 2 ? b.nextDay : a < 7 ? b.nextWeek : d; + return this.format(typeof e == "function" ? e.apply(this) : e); + }, + isLeapYear: function() { + var a = this.year(); + return a % 4 === 0 && a % 100 !== 0 || a % 400 === 0; + }, + isDST: function() { + return this.zone() < c([ this.year() ]).zone() || this.zone() < c([ this.year(), 5 ]).zone(); + }, + day: function(a) { + var b = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); + return a == null ? b : this.add({ + d: a - b + }); + }, + startOf: function(a) { + switch (a.replace(/s$/, "")) { + case "year": + this.month(0); + case "month": + this.date(1); + case "day": + this.hours(0); + case "hour": + this.minutes(0); + case "minute": + this.seconds(0); + case "second": + this.milliseconds(0); + } + return this; + }, + endOf: function(a) { + return this.startOf(a).add(a.replace(/s?$/, "s"), 1).subtract("ms", 1); + }, + sod: function() { + return this.clone().startOf("day"); + }, + eod: function() { + return this.clone().endOf("day"); + }, + zone: function() { + return this._isUTC ? 0 : this._d.getTimezoneOffset(); + }, + daysInMonth: function() { + return c.utc([ this.year(), this.month() + 1, 0 ]).date(); + }, + lang: function(a) { + return a === b ? P(this) : (this._lang = a, this); + } + }; + for (f = 0; f < A.length; f++) ab(A[f].toLowerCase(), A[f]); + ab("year", "FullYear"), c.duration.fn = H.prototype = { + weeks: function() { + return I(this.days() / 7); + }, + valueOf: function() { + return this._milliseconds + this._days * 864e5 + this._months * 2592e6; + }, + humanize: function(a) { + var b = +this, c = this.lang().relativeTime, d = _(b, !a, this.lang()); + return a && (d = (b <= 0 ? c.past : c.future).replace(/%s/i, d)), d; + }, + lang: c.fn.lang + }; + for (f in B) B.hasOwnProperty(f) && (cb(f, B[f]), bb(f.toLowerCase())); + cb("Weeks", 6048e5), i && (module.exports = c), typeof ender == "undefined" && (this.moment = c), typeof define == "function" && define.amd && define("moment", [], function() { + return c; + }); +}).call(this, Date); \ No newline at end of file diff --git a/node_modules/emailjs/node_modules/moment/moment.js b/node_modules/emailjs/node_modules/moment/moment.js new file mode 100644 index 0000000..95520c0 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/moment.js @@ -0,0 +1,1106 @@ +// moment.js +// version : 1.7.0 +// author : Tim Wood +// license : MIT +// momentjs.com + +(function (Date, undefined) { + + /************************************ + Constants + ************************************/ + + var moment, + VERSION = "1.7.0", + round = Math.round, i, + // internal storage for language config files + languages = {}, + currentLanguage = 'en', + + // check for nodeJS + hasModule = (typeof module !== 'undefined' && module.exports), + + // Parameters to check for on the lang config. This list of properties + // will be inherited from English if not provided in a language + // definition. monthsParse is also a lang config property, but it + // cannot be inherited and as such cannot be enumerated here. + langConfigProperties = 'months|monthsShort|weekdays|weekdaysShort|weekdaysMin|longDateFormat|calendar|relativeTime|ordinal|meridiem'.split('|'), + + // ASP.NET json date format regex + aspNetJsonRegex = /^\/?Date\((\-?\d+)/i, + + // format tokens + formattingTokens = /(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|YYYY|YY|a|A|hh?|HH?|mm?|ss?|SS?S?|zz?|ZZ?)/g, + localFormattingTokens = /(LT|LL?L?L?)/g, + formattingRemoveEscapes = /(^\[)|(\\)|\]$/g, + + // parsing tokens + parseMultipleFormatChunker = /([0-9a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+)/gi, + + // parsing token regexes + parseTokenOneOrTwoDigits = /\d\d?/, // 0 - 99 + parseTokenOneToThreeDigits = /\d{1,3}/, // 0 - 999 + parseTokenThreeDigits = /\d{3}/, // 000 - 999 + parseTokenFourDigits = /\d{1,4}/, // 0 - 9999 + parseTokenWord = /[0-9a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+/i, // any word characters or numbers + parseTokenTimezone = /Z|[\+\-]\d\d:?\d\d/i, // +00:00 -00:00 +0000 -0000 or Z + parseTokenT = /T/i, // T (ISO seperator) + + // preliminary iso regex + // 0000-00-00 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 + isoRegex = /^\s*\d{4}-\d\d-\d\d(T(\d\d(:\d\d(:\d\d(\.\d\d?\d?)?)?)?)?([\+\-]\d\d:?\d\d)?)?/, + isoFormat = 'YYYY-MM-DDTHH:mm:ssZ', + + // iso time formats and regexes + isoTimes = [ + ['HH:mm:ss.S', /T\d\d:\d\d:\d\d\.\d{1,3}/], + ['HH:mm:ss', /T\d\d:\d\d:\d\d/], + ['HH:mm', /T\d\d:\d\d/], + ['HH', /T\d\d/] + ], + + // timezone chunker "+10:00" > ["10", "00"] or "-1530" > ["-15", "30"] + parseTimezoneChunker = /([\+\-]|\d\d)/gi, + + // getter and setter names + proxyGettersAndSetters = 'Month|Date|Hours|Minutes|Seconds|Milliseconds'.split('|'), + unitMillisecondFactors = { + 'Milliseconds' : 1, + 'Seconds' : 1e3, + 'Minutes' : 6e4, + 'Hours' : 36e5, + 'Days' : 864e5, + 'Months' : 2592e6, + 'Years' : 31536e6 + }, + + // format function strings + formatFunctions = {}, + + /* + * moment.fn.format uses new Function() to create an inlined formatting function. + * Results are a 3x speed boost + * http://jsperf.com/momentjs-cached-format-functions + * + * These strings are appended into a function using replaceFormatTokens and makeFormatFunction + */ + formatFunctionStrings = { + // a = placeholder + // b = placeholder + // t = the current moment being formatted + // v = getValueAtKey function + // o = language.ordinal function + // p = leftZeroFill function + // m = language.meridiem value or function + M : '(a=t.month()+1)', + MMM : 'v("monthsShort",t.month())', + MMMM : 'v("months",t.month())', + D : '(a=t.date())', + DDD : '(a=new Date(t.year(),t.month(),t.date()),b=new Date(t.year(),0,1),a=~~(((a-b)/864e5)+1.5))', + d : '(a=t.day())', + dd : 'v("weekdaysMin",t.day())', + ddd : 'v("weekdaysShort",t.day())', + dddd : 'v("weekdays",t.day())', + w : '(a=new Date(t.year(),t.month(),t.date()-t.day()+5),b=new Date(a.getFullYear(),0,4),a=~~((a-b)/864e5/7+1.5))', + YY : 'p(t.year()%100,2)', + YYYY : 'p(t.year(),4)', + a : 'm(t.hours(),t.minutes(),!0)', + A : 'm(t.hours(),t.minutes(),!1)', + H : 't.hours()', + h : 't.hours()%12||12', + m : 't.minutes()', + s : 't.seconds()', + S : '~~(t.milliseconds()/100)', + SS : 'p(~~(t.milliseconds()/10),2)', + SSS : 'p(t.milliseconds(),3)', + Z : '((a=-t.zone())<0?((a=-a),"-"):"+")+p(~~(a/60),2)+":"+p(~~a%60,2)', + ZZ : '((a=-t.zone())<0?((a=-a),"-"):"+")+p(~~(10*a/6),4)' + }, + + ordinalizeTokens = 'DDD w M D d'.split(' '), + paddedTokens = 'M D H h m s w'.split(' '); + + while (ordinalizeTokens.length) { + i = ordinalizeTokens.pop(); + formatFunctionStrings[i + 'o'] = formatFunctionStrings[i] + '+o(a)'; + } + while (paddedTokens.length) { + i = paddedTokens.pop(); + formatFunctionStrings[i + i] = 'p(' + formatFunctionStrings[i] + ',2)'; + } + formatFunctionStrings.DDDD = 'p(' + formatFunctionStrings.DDD + ',3)'; + + + /************************************ + Constructors + ************************************/ + + + // Moment prototype object + function Moment(date, isUTC, lang) { + this._d = date; + this._isUTC = !!isUTC; + this._a = date._a || null; + date._a = null; + this._lang = lang || false; + } + + // Duration Constructor + function Duration(duration) { + var data = this._data = {}, + years = duration.years || duration.y || 0, + months = duration.months || duration.M || 0, + weeks = duration.weeks || duration.w || 0, + days = duration.days || duration.d || 0, + hours = duration.hours || duration.h || 0, + minutes = duration.minutes || duration.m || 0, + seconds = duration.seconds || duration.s || 0, + milliseconds = duration.milliseconds || duration.ms || 0; + + // representation for dateAddRemove + this._milliseconds = milliseconds + + seconds * 1e3 + // 1000 + minutes * 6e4 + // 1000 * 60 + hours * 36e5; // 1000 * 60 * 60 + // Because of dateAddRemove treats 24 hours as different from a + // day when working around DST, we need to store them separately + this._days = days + + weeks * 7; + // It is impossible translate months into days without knowing + // which months you are are talking about, so we have to store + // it separately. + this._months = months + + years * 12; + + // The following code bubbles up values, see the tests for + // examples of what that means. + data.milliseconds = milliseconds % 1000; + seconds += absRound(milliseconds / 1000); + + data.seconds = seconds % 60; + minutes += absRound(seconds / 60); + + data.minutes = minutes % 60; + hours += absRound(minutes / 60); + + data.hours = hours % 24; + days += absRound(hours / 24); + + days += weeks * 7; + data.days = days % 30; + + months += absRound(days / 30); + + data.months = months % 12; + years += absRound(months / 12); + + data.years = years; + + this._lang = false; + } + + + /************************************ + Helpers + ************************************/ + + + function absRound(number) { + if (number < 0) { + return Math.ceil(number); + } else { + return Math.floor(number); + } + } + + // left zero fill a number + // see http://jsperf.com/left-zero-filling for performance comparison + function leftZeroFill(number, targetLength) { + var output = number + ''; + while (output.length < targetLength) { + output = '0' + output; + } + return output; + } + + // helper function for _.addTime and _.subtractTime + function addOrSubtractDurationFromMoment(mom, duration, isAdding) { + var ms = duration._milliseconds, + d = duration._days, + M = duration._months, + currentDate; + + if (ms) { + mom._d.setTime(+mom + ms * isAdding); + } + if (d) { + mom.date(mom.date() + d * isAdding); + } + if (M) { + currentDate = mom.date(); + mom.date(1) + .month(mom.month() + M * isAdding) + .date(Math.min(currentDate, mom.daysInMonth())); + } + } + + // check if is an array + function isArray(input) { + return Object.prototype.toString.call(input) === '[object Array]'; + } + + // compare two arrays, return the number of differences + function compareArrays(array1, array2) { + var len = Math.min(array1.length, array2.length), + lengthDiff = Math.abs(array1.length - array2.length), + diffs = 0, + i; + for (i = 0; i < len; i++) { + if (~~array1[i] !== ~~array2[i]) { + diffs++; + } + } + return diffs + lengthDiff; + } + + // convert an array to a date. + // the array should mirror the parameters below + // note: all values past the year are optional and will default to the lowest possible value. + // [year, month, day , hour, minute, second, millisecond] + function dateFromArray(input, asUTC) { + var i, date; + for (i = 1; i < 7; i++) { + input[i] = (input[i] == null) ? (i === 2 ? 1 : 0) : input[i]; + } + // we store whether we used utc or not in the input array + input[7] = asUTC; + date = new Date(0); + if (asUTC) { + date.setUTCFullYear(input[0], input[1], input[2]); + date.setUTCHours(input[3], input[4], input[5], input[6]); + } else { + date.setFullYear(input[0], input[1], input[2]); + date.setHours(input[3], input[4], input[5], input[6]); + } + date._a = input; + return date; + } + + // Loads a language definition into the `languages` cache. The function + // takes a key and optionally values. If not in the browser and no values + // are provided, it will load the language file module. As a convenience, + // this function also returns the language values. + function loadLang(key, values) { + var i, m, + parse = []; + + if (!values && hasModule) { + values = require('./lang/' + key); + } + + for (i = 0; i < langConfigProperties.length; i++) { + // If a language definition does not provide a value, inherit + // from English + values[langConfigProperties[i]] = values[langConfigProperties[i]] || + languages.en[langConfigProperties[i]]; + } + + for (i = 0; i < 12; i++) { + m = moment([2000, i]); + parse[i] = new RegExp('^' + (values.months[i] || values.months(m, '')) + + '|^' + (values.monthsShort[i] || values.monthsShort(m, '')).replace('.', ''), 'i'); + } + values.monthsParse = values.monthsParse || parse; + + languages[key] = values; + + return values; + } + + // Determines which language definition to use and returns it. + // + // With no parameters, it will return the global language. If you + // pass in a language key, such as 'en', it will return the + // definition for 'en', so long as 'en' has already been loaded using + // moment.lang. If you pass in a moment or duration instance, it + // will decide the language based on that, or default to the global + // language. + function getLangDefinition(m) { + var langKey = (typeof m === 'string') && m || + m && m._lang || + null; + + return langKey ? (languages[langKey] || loadLang(langKey)) : moment; + } + + + /************************************ + Formatting + ************************************/ + + + // helper for building inline formatting functions + function replaceFormatTokens(token) { + return formatFunctionStrings[token] ? + ("'+(" + formatFunctionStrings[token] + ")+'") : + token.replace(formattingRemoveEscapes, "").replace(/\\?'/g, "\\'"); + } + + // helper for recursing long date formatting tokens + function replaceLongDateFormatTokens(input) { + return getLangDefinition().longDateFormat[input] || input; + } + + function makeFormatFunction(format) { + var output = "var a,b;return '" + + format.replace(formattingTokens, replaceFormatTokens) + "';", + Fn = Function; // get around jshint + // t = the current moment being formatted + // v = getValueAtKey function + // o = language.ordinal function + // p = leftZeroFill function + // m = language.meridiem value or function + return new Fn('t', 'v', 'o', 'p', 'm', output); + } + + function makeOrGetFormatFunction(format) { + if (!formatFunctions[format]) { + formatFunctions[format] = makeFormatFunction(format); + } + return formatFunctions[format]; + } + + // format date using native date object + function formatMoment(m, format) { + var lang = getLangDefinition(m); + + function getValueFromArray(key, index) { + return lang[key].call ? lang[key](m, format) : lang[key][index]; + } + + while (localFormattingTokens.test(format)) { + format = format.replace(localFormattingTokens, replaceLongDateFormatTokens); + } + + if (!formatFunctions[format]) { + formatFunctions[format] = makeFormatFunction(format); + } + + return formatFunctions[format](m, getValueFromArray, lang.ordinal, leftZeroFill, lang.meridiem); + } + + + /************************************ + Parsing + ************************************/ + + + // get the regex to find the next token + function getParseRegexForToken(token) { + switch (token) { + case 'DDDD': + return parseTokenThreeDigits; + case 'YYYY': + return parseTokenFourDigits; + case 'S': + case 'SS': + case 'SSS': + case 'DDD': + return parseTokenOneToThreeDigits; + case 'MMM': + case 'MMMM': + case 'dd': + case 'ddd': + case 'dddd': + case 'a': + case 'A': + return parseTokenWord; + case 'Z': + case 'ZZ': + return parseTokenTimezone; + case 'T': + return parseTokenT; + case 'MM': + case 'DD': + case 'YY': + case 'HH': + case 'hh': + case 'mm': + case 'ss': + case 'M': + case 'D': + case 'd': + case 'H': + case 'h': + case 'm': + case 's': + return parseTokenOneOrTwoDigits; + default : + return new RegExp(token.replace('\\', '')); + } + } + + // function to convert string input to date + function addTimeToArrayFromToken(token, input, datePartArray, config) { + var a; + //console.log('addTime', format, input); + switch (token) { + // MONTH + case 'M' : // fall through to MM + case 'MM' : + datePartArray[1] = (input == null) ? 0 : ~~input - 1; + break; + case 'MMM' : // fall through to MMMM + case 'MMMM' : + for (a = 0; a < 12; a++) { + if (getLangDefinition().monthsParse[a].test(input)) { + datePartArray[1] = a; + break; + } + } + break; + // DAY OF MONTH + case 'D' : // fall through to DDDD + case 'DD' : // fall through to DDDD + case 'DDD' : // fall through to DDDD + case 'DDDD' : + if (input != null) { + datePartArray[2] = ~~input; + } + break; + // YEAR + case 'YY' : + input = ~~input; + datePartArray[0] = input + (input > 70 ? 1900 : 2000); + break; + case 'YYYY' : + datePartArray[0] = ~~Math.abs(input); + break; + // AM / PM + case 'a' : // fall through to A + case 'A' : + config.isPm = ((input + '').toLowerCase() === 'pm'); + break; + // 24 HOUR + case 'H' : // fall through to hh + case 'HH' : // fall through to hh + case 'h' : // fall through to hh + case 'hh' : + datePartArray[3] = ~~input; + break; + // MINUTE + case 'm' : // fall through to mm + case 'mm' : + datePartArray[4] = ~~input; + break; + // SECOND + case 's' : // fall through to ss + case 'ss' : + datePartArray[5] = ~~input; + break; + // MILLISECOND + case 'S' : + case 'SS' : + case 'SSS' : + datePartArray[6] = ~~ (('0.' + input) * 1000); + break; + // TIMEZONE + case 'Z' : // fall through to ZZ + case 'ZZ' : + config.isUTC = true; + a = (input + '').match(parseTimezoneChunker); + if (a && a[1]) { + config.tzh = ~~a[1]; + } + if (a && a[2]) { + config.tzm = ~~a[2]; + } + // reverse offsets + if (a && a[0] === '+') { + config.tzh = -config.tzh; + config.tzm = -config.tzm; + } + break; + } + } + + // date from string and format string + function makeDateFromStringAndFormat(string, format) { + var datePartArray = [0, 0, 1, 0, 0, 0, 0], + config = { + tzh : 0, // timezone hour offset + tzm : 0 // timezone minute offset + }, + tokens = format.match(formattingTokens), + i, parsedInput; + + for (i = 0; i < tokens.length; i++) { + parsedInput = (getParseRegexForToken(tokens[i]).exec(string) || [])[0]; + string = string.replace(getParseRegexForToken(tokens[i]), ''); + addTimeToArrayFromToken(tokens[i], parsedInput, datePartArray, config); + } + // handle am pm + if (config.isPm && datePartArray[3] < 12) { + datePartArray[3] += 12; + } + // if is 12 am, change hours to 0 + if (config.isPm === false && datePartArray[3] === 12) { + datePartArray[3] = 0; + } + // handle timezone + datePartArray[3] += config.tzh; + datePartArray[4] += config.tzm; + // return + return dateFromArray(datePartArray, config.isUTC); + } + + // date from string and array of format strings + function makeDateFromStringAndArray(string, formats) { + var output, + inputParts = string.match(parseMultipleFormatChunker) || [], + formattedInputParts, + scoreToBeat = 99, + i, + currentDate, + currentScore; + for (i = 0; i < formats.length; i++) { + currentDate = makeDateFromStringAndFormat(string, formats[i]); + formattedInputParts = formatMoment(new Moment(currentDate), formats[i]).match(parseMultipleFormatChunker) || []; + currentScore = compareArrays(inputParts, formattedInputParts); + if (currentScore < scoreToBeat) { + scoreToBeat = currentScore; + output = currentDate; + } + } + return output; + } + + // date from iso format + function makeDateFromString(string) { + var format = 'YYYY-MM-DDT', + i; + if (isoRegex.exec(string)) { + for (i = 0; i < 4; i++) { + if (isoTimes[i][1].exec(string)) { + format += isoTimes[i][0]; + break; + } + } + return parseTokenTimezone.exec(string) ? + makeDateFromStringAndFormat(string, format + ' Z') : + makeDateFromStringAndFormat(string, format); + } + return new Date(string); + } + + + /************************************ + Relative Time + ************************************/ + + + // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize + function substituteTimeAgo(string, number, withoutSuffix, isFuture, lang) { + var rt = lang.relativeTime[string]; + return (typeof rt === 'function') ? + rt(number || 1, !!withoutSuffix, string, isFuture) : + rt.replace(/%d/i, number || 1); + } + + function relativeTime(milliseconds, withoutSuffix, lang) { + var seconds = round(Math.abs(milliseconds) / 1000), + minutes = round(seconds / 60), + hours = round(minutes / 60), + days = round(hours / 24), + years = round(days / 365), + args = seconds < 45 && ['s', seconds] || + minutes === 1 && ['m'] || + minutes < 45 && ['mm', minutes] || + hours === 1 && ['h'] || + hours < 22 && ['hh', hours] || + days === 1 && ['d'] || + days <= 25 && ['dd', days] || + days <= 45 && ['M'] || + days < 345 && ['MM', round(days / 30)] || + years === 1 && ['y'] || ['yy', years]; + args[2] = withoutSuffix; + args[3] = milliseconds > 0; + args[4] = lang; + return substituteTimeAgo.apply({}, args); + } + + + /************************************ + Top Level Functions + ************************************/ + + + moment = function (input, format) { + if (input === null || input === '') { + return null; + } + var date, + matched; + // parse Moment object + if (moment.isMoment(input)) { + return new Moment(new Date(+input._d), input._isUTC, input._lang); + // parse string and format + } else if (format) { + if (isArray(format)) { + date = makeDateFromStringAndArray(input, format); + } else { + date = makeDateFromStringAndFormat(input, format); + } + // evaluate it as a JSON-encoded date + } else { + matched = aspNetJsonRegex.exec(input); + date = input === undefined ? new Date() : + matched ? new Date(+matched[1]) : + input instanceof Date ? input : + isArray(input) ? dateFromArray(input) : + typeof input === 'string' ? makeDateFromString(input) : + new Date(input); + } + + return new Moment(date); + }; + + // creating with utc + moment.utc = function (input, format) { + if (isArray(input)) { + return new Moment(dateFromArray(input, true), true); + } + // if we don't have a timezone, we need to add one to trigger parsing into utc + if (typeof input === 'string' && !parseTokenTimezone.exec(input)) { + input += ' +0000'; + if (format) { + format += ' Z'; + } + } + return moment(input, format).utc(); + }; + + // creating with unix timestamp (in seconds) + moment.unix = function (input) { + return moment(input * 1000); + }; + + // duration + moment.duration = function (input, key) { + var isDuration = moment.isDuration(input), + isNumber = (typeof input === 'number'), + duration = (isDuration ? input._data : (isNumber ? {} : input)), + ret; + + if (isNumber) { + if (key) { + duration[key] = input; + } else { + duration.milliseconds = input; + } + } + + ret = new Duration(duration); + + if (isDuration) { + ret._lang = input._lang; + } + + return ret; + }; + + // humanizeDuration + // This method is deprecated in favor of the new Duration object. Please + // see the moment.duration method. + moment.humanizeDuration = function (num, type, withSuffix) { + return moment.duration(num, type === true ? null : type).humanize(type === true ? true : withSuffix); + }; + + // version number + moment.version = VERSION; + + // default format + moment.defaultFormat = isoFormat; + + // This function will load languages and then set the global language. If + // no arguments are passed in, it will simply return the current global + // language key. + moment.lang = function (key, values) { + var i; + + if (!key) { + return currentLanguage; + } + if (values || !languages[key]) { + loadLang(key, values); + } + if (languages[key]) { + // deprecated, to get the language definition variables, use the + // moment.fn.lang method or the getLangDefinition function. + for (i = 0; i < langConfigProperties.length; i++) { + moment[langConfigProperties[i]] = languages[key][langConfigProperties[i]]; + } + moment.monthsParse = languages[key].monthsParse; + currentLanguage = key; + } + }; + + // returns language data + moment.langData = getLangDefinition; + + // compare moment object + moment.isMoment = function (obj) { + return obj instanceof Moment; + }; + + // for typechecking Duration objects + moment.isDuration = function (obj) { + return obj instanceof Duration; + }; + + // Set default language, other languages will inherit from English. + moment.lang('en', { + months : "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), + monthsShort : "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"), + weekdays : "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), + weekdaysShort : "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), + weekdaysMin : "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), + longDateFormat : { + LT : "h:mm A", + L : "MM/DD/YYYY", + LL : "MMMM D YYYY", + LLL : "MMMM D YYYY LT", + LLLL : "dddd, MMMM D YYYY LT" + }, + meridiem : function (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'pm' : 'PM'; + } else { + return isLower ? 'am' : 'AM'; + } + }, + calendar : { + sameDay : '[Today at] LT', + nextDay : '[Tomorrow at] LT', + nextWeek : 'dddd [at] LT', + lastDay : '[Yesterday at] LT', + lastWeek : '[last] dddd [at] LT', + sameElse : 'L' + }, + relativeTime : { + future : "in %s", + past : "%s ago", + s : "a few seconds", + m : "a minute", + mm : "%d minutes", + h : "an hour", + hh : "%d hours", + d : "a day", + dd : "%d days", + M : "a month", + MM : "%d months", + y : "a year", + yy : "%d years" + }, + ordinal : function (number) { + var b = number % 10; + return (~~ (number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + } + }); + + + /************************************ + Moment Prototype + ************************************/ + + + moment.fn = Moment.prototype = { + + clone : function () { + return moment(this); + }, + + valueOf : function () { + return +this._d; + }, + + unix : function () { + return Math.floor(+this._d / 1000); + }, + + toString : function () { + return this._d.toString(); + }, + + toDate : function () { + return this._d; + }, + + toArray : function () { + var m = this; + return [ + m.year(), + m.month(), + m.date(), + m.hours(), + m.minutes(), + m.seconds(), + m.milliseconds(), + !!this._isUTC + ]; + }, + + isValid : function () { + if (this._a) { + return !compareArrays(this._a, (this._a[7] ? moment.utc(this) : this).toArray()); + } + return !isNaN(this._d.getTime()); + }, + + utc : function () { + this._isUTC = true; + return this; + }, + + local : function () { + this._isUTC = false; + return this; + }, + + format : function (inputString) { + return formatMoment(this, inputString ? inputString : moment.defaultFormat); + }, + + add : function (input, val) { + var dur = val ? moment.duration(+val, input) : moment.duration(input); + addOrSubtractDurationFromMoment(this, dur, 1); + return this; + }, + + subtract : function (input, val) { + var dur = val ? moment.duration(+val, input) : moment.duration(input); + addOrSubtractDurationFromMoment(this, dur, -1); + return this; + }, + + diff : function (input, val, asFloat) { + var inputMoment = this._isUTC ? moment(input).utc() : moment(input).local(), + zoneDiff = (this.zone() - inputMoment.zone()) * 6e4, + diff = this._d - inputMoment._d - zoneDiff, + year = this.year() - inputMoment.year(), + month = this.month() - inputMoment.month(), + date = this.date() - inputMoment.date(), + output; + if (val === 'months') { + output = year * 12 + month + date / 30; + } else if (val === 'years') { + output = year + (month + date / 30) / 12; + } else { + output = val === 'seconds' ? diff / 1e3 : // 1000 + val === 'minutes' ? diff / 6e4 : // 1000 * 60 + val === 'hours' ? diff / 36e5 : // 1000 * 60 * 60 + val === 'days' ? diff / 864e5 : // 1000 * 60 * 60 * 24 + val === 'weeks' ? diff / 6048e5 : // 1000 * 60 * 60 * 24 * 7 + diff; + } + return asFloat ? output : round(output); + }, + + from : function (time, withoutSuffix) { + return moment.duration(this.diff(time)).lang(this._lang).humanize(!withoutSuffix); + }, + + fromNow : function (withoutSuffix) { + return this.from(moment(), withoutSuffix); + }, + + calendar : function () { + var diff = this.diff(moment().sod(), 'days', true), + calendar = this.lang().calendar, + allElse = calendar.sameElse, + format = diff < -6 ? allElse : + diff < -1 ? calendar.lastWeek : + diff < 0 ? calendar.lastDay : + diff < 1 ? calendar.sameDay : + diff < 2 ? calendar.nextDay : + diff < 7 ? calendar.nextWeek : allElse; + return this.format(typeof format === 'function' ? format.apply(this) : format); + }, + + isLeapYear : function () { + var year = this.year(); + return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0; + }, + + isDST : function () { + return (this.zone() < moment([this.year()]).zone() || + this.zone() < moment([this.year(), 5]).zone()); + }, + + day : function (input) { + var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); + return input == null ? day : + this.add({ d : input - day }); + }, + + startOf: function (val) { + // the following switch intentionally omits break keywords + // to utilize falling through the cases. + switch (val.replace(/s$/, '')) { + case 'year': + this.month(0); + /* falls through */ + case 'month': + this.date(1); + /* falls through */ + case 'day': + this.hours(0); + /* falls through */ + case 'hour': + this.minutes(0); + /* falls through */ + case 'minute': + this.seconds(0); + /* falls through */ + case 'second': + this.milliseconds(0); + /* falls through */ + } + return this; + }, + + endOf: function (val) { + return this.startOf(val).add(val.replace(/s?$/, 's'), 1).subtract('ms', 1); + }, + + sod: function () { + return this.clone().startOf('day'); + }, + + eod: function () { + // end of day = start of day plus 1 day, minus 1 millisecond + return this.clone().endOf('day'); + }, + + zone : function () { + return this._isUTC ? 0 : this._d.getTimezoneOffset(); + }, + + daysInMonth : function () { + return moment.utc([this.year(), this.month() + 1, 0]).date(); + }, + + // If passed a language key, it will set the language for this + // instance. Otherwise, it will return the language configuration + // variables for this instance. + lang : function (lang) { + if (lang === undefined) { + return getLangDefinition(this); + } else { + this._lang = lang; + return this; + } + } + }; + + // helper for adding shortcuts + function makeGetterAndSetter(name, key) { + moment.fn[name] = function (input) { + var utc = this._isUTC ? 'UTC' : ''; + if (input != null) { + this._d['set' + utc + key](input); + return this; + } else { + return this._d['get' + utc + key](); + } + }; + } + + // loop through and add shortcuts (Month, Date, Hours, Minutes, Seconds, Milliseconds) + for (i = 0; i < proxyGettersAndSetters.length; i ++) { + makeGetterAndSetter(proxyGettersAndSetters[i].toLowerCase(), proxyGettersAndSetters[i]); + } + + // add shortcut for year (uses different syntax than the getter/setter 'year' == 'FullYear') + makeGetterAndSetter('year', 'FullYear'); + + + /************************************ + Duration Prototype + ************************************/ + + + moment.duration.fn = Duration.prototype = { + weeks : function () { + return absRound(this.days() / 7); + }, + + valueOf : function () { + return this._milliseconds + + this._days * 864e5 + + this._months * 2592e6; + }, + + humanize : function (withSuffix) { + var difference = +this, + rel = this.lang().relativeTime, + output = relativeTime(difference, !withSuffix, this.lang()); + + if (withSuffix) { + output = (difference <= 0 ? rel.past : rel.future).replace(/%s/i, output); + } + + return output; + }, + + lang : moment.fn.lang + }; + + function makeDurationGetter(name) { + moment.duration.fn[name] = function () { + return this._data[name]; + }; + } + + function makeDurationAsGetter(name, factor) { + moment.duration.fn['as' + name] = function () { + return +this / factor; + }; + } + + for (i in unitMillisecondFactors) { + if (unitMillisecondFactors.hasOwnProperty(i)) { + makeDurationAsGetter(i, unitMillisecondFactors[i]); + makeDurationGetter(i.toLowerCase()); + } + } + + makeDurationAsGetter('Weeks', 6048e5); + + + /************************************ + Exposing Moment + ************************************/ + + + // CommonJS module is defined + if (hasModule) { + module.exports = moment; + } + /*global ender:false */ + if (typeof ender === 'undefined') { + // here, `this` means `window` in the browser, or `global` on the server + // add `moment` as a global object via a string identifier, + // for Closure Compiler "advanced" mode + this['moment'] = moment; + } + /*global define:false */ + if (typeof define === "function" && define.amd) { + define("moment", [], function () { + return moment; + }); + } +}).call(this, Date); diff --git a/node_modules/emailjs/node_modules/moment/package.json b/node_modules/emailjs/node_modules/moment/package.json new file mode 100755 index 0000000..b7e8889 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/package.json @@ -0,0 +1,60 @@ +{ + "name": "moment", + "version": "1.7.0", + "description": "Parse, manipulate, and display dates.", + "homepage": "http://momentjs.com", + "author": { + "name": "Tim Wood", + "email": "washwithcare@gmail.com", + "url": "http://timwoodcreates.com/" + }, + "contributors": [ + { + "name": "Rocky Meza", + "url": "http://rockymeza.com" + } + ], + "keywords": [ + "moment", + "date", + "time", + "parse", + "format", + "validate", + "i18n", + "l10n", + "ender" + ], + "main": "./moment.js", + "engines": { + "node": "*" + }, + "repository": { + "type": "git", + "url": "https://github.com/timrwood/moment.git" + }, + "bugs": { + "url": "https://github.com/timrwood/moment/issues" + }, + "licenses": [ + { + "type": "MIT" + } + ], + "devDependencies": { + "jshint": "latest", + "uglify-js": "latest", + "nodeunit": "latest" + }, + "scripts": { + "test": "make test" + }, + "ender": "./ender.js", + "readme": "[Moment.js](http://momentjs.com)\n================================\n\nA lightweight javascript date library for parsing, validating, manipulating, and formatting dates.\n\n### [Check out the website](http://momentjs.com)\n\n### [Read the documentation](http://momentjs.com/docs/)\n\n### [Run the unit tests](http://momentjs.com/test/)\n\n\nUpgrading to 1.6.0\n==================\n\nThere are a few things being deprecated in the 1.6.0 release.\n\n1. The format tokens `z` and `zz` (timezone abbreviations like EST CST MST etc) will no longer be supported. Due to inconsistent browser support, we are unable to consistently produce this value. See [this issue](https://github.com/timrwood/moment/issues/162) for more background.\n\n2. The method `moment.fn.native` is deprecated in favor of `moment.fn.toDate`. There continue to be issues with Google Closure Compiler throwing errors when using `native`, even in valid instances.\n\n3. The way to customize am/pm strings is being changed. This would only affect you if you created a custom language file. For more information, see [this issue](https://github.com/timrwood/moment/pull/222).\n\n\nContributing\n============\n\nTo contribute, fork the library and install these npm packages.\n\n npm install jshint uglify-js nodeunit\n\nYou can add tests to the files in `/test/moment` or add a new test file if you are adding a new feature.\n\nTo run the tests, do `make test` to run all tests, `make test-moment` to test the core library, and `make test-lang` to test all the languages.\n\nTo check the filesize, you can use `make size`.\n\nTo minify all the files, use `make moment` to minify moment, `make langs` to minify all the lang files, or just `make` to minfy everything.\n\nIf your code passes the unit tests (including the ones you wrote), submit a pull request.\n\nSubmitting pull requests\n========================\n\nMoment.js now uses [git-flow](https://github.com/nvie/gitflow). If you're not familiar with git-flow, please read up on it, you'll be glad you did.\n\nWhen submitting new features, please create a new feature branch using `git flow feature start ` and submit the pull request to the `develop` branch.\n\nPull requests for enhancements for features should be submitted to the `develop` branch as well.\n\nWhen submitting a bugfix, please check if there is an existing bugfix branch. If the latest stable version is `1.5.0`, the bugfix branch would be `hotfix/1.5.1`. All pull requests for bug fixes should be on a `hotfix` branch, unless the bug fix depends on a new feature.\n\nThe `master` branch should always have the latest stable version. When bugfix or minor releases are needed, the develop/hotfix branch will be merged into master and released.\n\nChangelog\n=========\n\n\n### 1.7.0 [See discussion](https://github.com/timrwood/moment/issues/288)\n\nAdded `moment.fn.endOf()` and `moment.fn.startOf()`.\n\nAdded validation via `moment.fn.isValid()`.\n\nMade formatting method 3x faster. http://jsperf.com/momentjs-cached-format-functions\n\nAdd support for month/weekday callbacks in `moment.fn.format()`\n\nAdded instance specific languages.\n\nAdded two letter weekday abbreviations with the formatting token `dd`.\n\nVarious language updates.\n\nVarious bugfixes.\n\n### 1.6.0 [See discussion](https://github.com/timrwood/moment/pull/268)\n\nAdded Durations.\n\nRevamped parser to support parsing non-separated strings (YYYYMMDD vs YYYY-MM-DD).\n\nAdded support for millisecond parsing and formatting tokens (S SS SSS)\n\nAdded a getter for `moment.lang()`\n\nVarious bugfixes.\n\n### 1.5.0 [See milestone](https://github.com/timrwood/moment/issues?milestone=10&page=1&state=closed)\n\nAdded UTC mode.\n\nAdded automatic ISO8601 parsing.\n\nVarious bugfixes.\n\n### 1.4.0 [See milestone](https://github.com/timrwood/moment/issues?milestone=8&state=closed)\n\nAdded `moment.fn.toDate` as a replacement for `moment.fn.native`.\n\nAdded `moment.fn.sod` and `moment.fn.eod` to get the start and end of day.\n\nVarious bugfixes.\n\n### 1.3.0 [See milestone](https://github.com/timrwood/moment/issues?milestone=7&state=closed)\n\nAdded support for parsing month names in the current language.\n\nAdded escape blocks for parsing tokens.\n\nAdded `moment.fn.calendar` to format strings like 'Today 2:30 PM', 'Tomorrow 1:25 AM', and 'Last Sunday 4:30 AM'.\n\nAdded `moment.fn.day` as a setter.\n\nVarious bugfixes\n\n### 1.2.0 [See milestone](https://github.com/timrwood/moment/issues?milestone=4&state=closed)\n\nAdded timezones to parser and formatter.\n\nAdded `moment.fn.isDST`.\n\nAdded `moment.fn.zone` to get the timezone offset in minutes.\n\n### 1.1.2 [See milestone](https://github.com/timrwood/moment/issues?milestone=6&state=closed)\n\nVarious bugfixes\n\n### 1.1.1 [See milestone](https://github.com/timrwood/moment/issues?milestone=5&state=closed)\n\nAdded time specific diffs (months, days, hours, etc)\n\n### 1.1.0\n\nAdded `moment.fn.format` localized masks. 'L LL LLL LLLL' [issue 29](https://github.com/timrwood/moment/pull/29)\n\nFixed [issue 31](https://github.com/timrwood/moment/pull/31).\n\n### 1.0.1\n\nAdded `moment.version` to get the current version.\n\nRemoved `window !== undefined` when checking if module exists to support browserify. [issue 25](https://github.com/timrwood/moment/pull/25)\n\n### 1.0.0\n\nAdded convenience methods for getting and setting date parts.\n\nAdded better support for `moment.add()`.\n\nAdded better lang support in NodeJS.\n\nRenamed library from underscore.date to Moment.js\n\n### 0.6.1\n\nAdded Portuguese, Italian, and French language support\n\n### 0.6.0\n\nAdded _date.lang() support.\nAdded support for passing multiple formats to try to parse a date. _date(\"07-10-1986\", [\"MM-DD-YYYY\", \"YYYY-MM-DD\"]);\nMade parse from string and single format 25% faster.\n\n### 0.5.2 \n\nBuxfix for [issue 8](https://github.com/timrwood/underscore.date/pull/8) and [issue 9](https://github.com/timrwood/underscore.date/pull/9).\n\n### 0.5.1 \n\nBuxfix for [issue 5](https://github.com/timrwood/underscore.date/pull/5).\n\n### 0.5.0\n\nDropped the redundant `_date.date()` in favor of `_date()`.\nRemoved `_date.now()`, as it is a duplicate of `_date()` with no parameters.\nRemoved `_date.isLeapYear(yearNuumber)`. Use `_date([yearNumber]).isLeapYear()` instead.\nExposed customization options through the `_date.relativeTime`, `_date.weekdays`, `_date.weekdaysShort`, `_date.months`, `_date.monthsShort`, and `_date.ordinal` variables instead of the `_date.customize()` function.\n\n### 0.4.1 \n\nAdded date input formats for input strings.\n\n### 0.4.0 \n\nAdded underscore.date to npm. Removed dependancies on underscore.\n\n### 0.3.2\n\nAdded `'z'` and `'zz'` to `_.date().format()`. Cleaned up some redundant code to trim off some bytes.\n\n### 0.3.1\n\nCleaned up the namespace. Moved all date manipulation and display functions to the _.date() object. \n\n### 0.3.0\n\nSwitched to the Underscore methodology of not mucking with the native objects' prototypes.\nMade chaining possible.\n\n### 0.2.1\n\nChanged date names to be a more pseudo standardized 'dddd, MMMM Do YYYY, h:mm:ss a'.\nAdded `Date.prototype` functions `add`, `subtract`, `isdst`, and `isleapyear`.\n\n### 0.2.0\n\nChanged function names to be more concise.\nChanged date format from php date format to custom format.\n\n### 0.1.0\n\nInitial release\n\nLicense\n=======\n\nMoment.js is freely distributable under the terms of the MIT license.\n\nCopyright (c) 2011-2012 Tim Wood\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use,\ncopy, 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:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", + "readmeFilename": "readme.md", + "_id": "moment@1.7.0", + "dist": { + "shasum": "2604cafc734b10014914b16e7986d92e629ce9c8" + }, + "_from": "moment@= 1.7.0" +} diff --git a/node_modules/emailjs/node_modules/moment/readme.md b/node_modules/emailjs/node_modules/moment/readme.md new file mode 100755 index 0000000..a037921 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/readme.md @@ -0,0 +1,228 @@ +[Moment.js](http://momentjs.com) +================================ + +A lightweight javascript date library for parsing, validating, manipulating, and formatting dates. + +### [Check out the website](http://momentjs.com) + +### [Read the documentation](http://momentjs.com/docs/) + +### [Run the unit tests](http://momentjs.com/test/) + + +Upgrading to 1.6.0 +================== + +There are a few things being deprecated in the 1.6.0 release. + +1. The format tokens `z` and `zz` (timezone abbreviations like EST CST MST etc) will no longer be supported. Due to inconsistent browser support, we are unable to consistently produce this value. See [this issue](https://github.com/timrwood/moment/issues/162) for more background. + +2. The method `moment.fn.native` is deprecated in favor of `moment.fn.toDate`. There continue to be issues with Google Closure Compiler throwing errors when using `native`, even in valid instances. + +3. The way to customize am/pm strings is being changed. This would only affect you if you created a custom language file. For more information, see [this issue](https://github.com/timrwood/moment/pull/222). + + +Contributing +============ + +To contribute, fork the library and install these npm packages. + + npm install jshint uglify-js nodeunit + +You can add tests to the files in `/test/moment` or add a new test file if you are adding a new feature. + +To run the tests, do `make test` to run all tests, `make test-moment` to test the core library, and `make test-lang` to test all the languages. + +To check the filesize, you can use `make size`. + +To minify all the files, use `make moment` to minify moment, `make langs` to minify all the lang files, or just `make` to minfy everything. + +If your code passes the unit tests (including the ones you wrote), submit a pull request. + +Submitting pull requests +======================== + +Moment.js now uses [git-flow](https://github.com/nvie/gitflow). If you're not familiar with git-flow, please read up on it, you'll be glad you did. + +When submitting new features, please create a new feature branch using `git flow feature start ` and submit the pull request to the `develop` branch. + +Pull requests for enhancements for features should be submitted to the `develop` branch as well. + +When submitting a bugfix, please check if there is an existing bugfix branch. If the latest stable version is `1.5.0`, the bugfix branch would be `hotfix/1.5.1`. All pull requests for bug fixes should be on a `hotfix` branch, unless the bug fix depends on a new feature. + +The `master` branch should always have the latest stable version. When bugfix or minor releases are needed, the develop/hotfix branch will be merged into master and released. + +Changelog +========= + + +### 1.7.0 [See discussion](https://github.com/timrwood/moment/issues/288) + +Added `moment.fn.endOf()` and `moment.fn.startOf()`. + +Added validation via `moment.fn.isValid()`. + +Made formatting method 3x faster. http://jsperf.com/momentjs-cached-format-functions + +Add support for month/weekday callbacks in `moment.fn.format()` + +Added instance specific languages. + +Added two letter weekday abbreviations with the formatting token `dd`. + +Various language updates. + +Various bugfixes. + +### 1.6.0 [See discussion](https://github.com/timrwood/moment/pull/268) + +Added Durations. + +Revamped parser to support parsing non-separated strings (YYYYMMDD vs YYYY-MM-DD). + +Added support for millisecond parsing and formatting tokens (S SS SSS) + +Added a getter for `moment.lang()` + +Various bugfixes. + +### 1.5.0 [See milestone](https://github.com/timrwood/moment/issues?milestone=10&page=1&state=closed) + +Added UTC mode. + +Added automatic ISO8601 parsing. + +Various bugfixes. + +### 1.4.0 [See milestone](https://github.com/timrwood/moment/issues?milestone=8&state=closed) + +Added `moment.fn.toDate` as a replacement for `moment.fn.native`. + +Added `moment.fn.sod` and `moment.fn.eod` to get the start and end of day. + +Various bugfixes. + +### 1.3.0 [See milestone](https://github.com/timrwood/moment/issues?milestone=7&state=closed) + +Added support for parsing month names in the current language. + +Added escape blocks for parsing tokens. + +Added `moment.fn.calendar` to format strings like 'Today 2:30 PM', 'Tomorrow 1:25 AM', and 'Last Sunday 4:30 AM'. + +Added `moment.fn.day` as a setter. + +Various bugfixes + +### 1.2.0 [See milestone](https://github.com/timrwood/moment/issues?milestone=4&state=closed) + +Added timezones to parser and formatter. + +Added `moment.fn.isDST`. + +Added `moment.fn.zone` to get the timezone offset in minutes. + +### 1.1.2 [See milestone](https://github.com/timrwood/moment/issues?milestone=6&state=closed) + +Various bugfixes + +### 1.1.1 [See milestone](https://github.com/timrwood/moment/issues?milestone=5&state=closed) + +Added time specific diffs (months, days, hours, etc) + +### 1.1.0 + +Added `moment.fn.format` localized masks. 'L LL LLL LLLL' [issue 29](https://github.com/timrwood/moment/pull/29) + +Fixed [issue 31](https://github.com/timrwood/moment/pull/31). + +### 1.0.1 + +Added `moment.version` to get the current version. + +Removed `window !== undefined` when checking if module exists to support browserify. [issue 25](https://github.com/timrwood/moment/pull/25) + +### 1.0.0 + +Added convenience methods for getting and setting date parts. + +Added better support for `moment.add()`. + +Added better lang support in NodeJS. + +Renamed library from underscore.date to Moment.js + +### 0.6.1 + +Added Portuguese, Italian, and French language support + +### 0.6.0 + +Added _date.lang() support. +Added support for passing multiple formats to try to parse a date. _date("07-10-1986", ["MM-DD-YYYY", "YYYY-MM-DD"]); +Made parse from string and single format 25% faster. + +### 0.5.2 + +Buxfix for [issue 8](https://github.com/timrwood/underscore.date/pull/8) and [issue 9](https://github.com/timrwood/underscore.date/pull/9). + +### 0.5.1 + +Buxfix for [issue 5](https://github.com/timrwood/underscore.date/pull/5). + +### 0.5.0 + +Dropped the redundant `_date.date()` in favor of `_date()`. +Removed `_date.now()`, as it is a duplicate of `_date()` with no parameters. +Removed `_date.isLeapYear(yearNuumber)`. Use `_date([yearNumber]).isLeapYear()` instead. +Exposed customization options through the `_date.relativeTime`, `_date.weekdays`, `_date.weekdaysShort`, `_date.months`, `_date.monthsShort`, and `_date.ordinal` variables instead of the `_date.customize()` function. + +### 0.4.1 + +Added date input formats for input strings. + +### 0.4.0 + +Added underscore.date to npm. Removed dependancies on underscore. + +### 0.3.2 + +Added `'z'` and `'zz'` to `_.date().format()`. Cleaned up some redundant code to trim off some bytes. + +### 0.3.1 + +Cleaned up the namespace. Moved all date manipulation and display functions to the _.date() object. + +### 0.3.0 + +Switched to the Underscore methodology of not mucking with the native objects' prototypes. +Made chaining possible. + +### 0.2.1 + +Changed date names to be a more pseudo standardized 'dddd, MMMM Do YYYY, h:mm:ss a'. +Added `Date.prototype` functions `add`, `subtract`, `isdst`, and `isleapyear`. + +### 0.2.0 + +Changed function names to be more concise. +Changed date format from php date format to custom format. + +### 0.1.0 + +Initial release + +License +======= + +Moment.js is freely distributable under the terms of the MIT license. + +Copyright (c) 2011-2012 Tim Wood + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/emailjs/node_modules/moment/test/filesize-diff.js b/node_modules/emailjs/node_modules/moment/test/filesize-diff.js new file mode 100644 index 0000000..6c18e3e --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/filesize-diff.js @@ -0,0 +1,55 @@ +var https = require("https"), + zlib = require('zlib'), + path = require('path'), + fs = require('fs'); + + +var stable = '1.6.2'; + +function getVersion(path, cb) { + var data = '', + + req = https.request({ + host: 'raw.github.com', + port: 443, + path: '/timrwood/moment/' + path + }, function(res) { + res.setEncoding('utf8'); + res.on('data', function (chunk) { + data += chunk; + }); + res.on('end', function(e) { + zlib.gzip(data, function(error, result) { + cb(data.length, result.length); + }); + }); + }); + req.on('error', function(e) { + console.log('problem with request: ' + e.message); + }); + req.end(); +} + +function printDiffs(stableLen, stableGzip, currentLen, currentGzip) { + var diff = currentLen - stableLen, + gzipDiff = currentGzip - stableGzip; + + console.log("Filesize difference from current branch to " + stable); + console.log(stable + " " + stableLen + ' / ' + stableGzip); + console.log("curr " + currentLen + ' / ' + currentGzip); + console.log("diff " + (diff > 0 ? '+' : '') + diff); + console.log("gzip " + (gzipDiff > 0 ? '+' : '') + gzipDiff); +} + +(function(){ + fs.readFile(path.normalize(__dirname + '/../min/moment.min.js'), 'utf8', function(err, data){ + if (err) { + throw err; + } + zlib.gzip(data, function(error, result) { + getVersion(stable + '/min/moment.min.js', function (stableLength, stableGzipLength) { + printDiffs(stableLength, stableGzipLength, data.length, result.length); + }); + }); + }); +}()); \ No newline at end of file diff --git a/node_modules/emailjs/node_modules/moment/test/filesize-history.js b/node_modules/emailjs/node_modules/moment/test/filesize-history.js new file mode 100644 index 0000000..f78f1fb --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/filesize-history.js @@ -0,0 +1,108 @@ +var https = require("https"), + zlib = require('zlib'), + path = require('path'), + fs = require('fs'); + +var count = 0; +var resolved = 0; + +var outputs = []; + +function check() { + if (resolved === count) { + normalize(); + display(); + } +} + +function makeBar(length) { + var i = ''; + while (i.length < length) { + i += '='; + } + return i; +} + +function normalize() { + var i, + max = 0, + max2 = 0; + for (i = 0; i < count; i ++) { + max = Math.max(max, outputs[i].gzip); + max2 = Math.max(max2, outputs[i].original); + } + for (i = 0; i < count; i ++) { + outputs[i].bargraph = makeBar((outputs[i].gzip / max) * 80); + outputs[i].bargraph2 = makeBar((outputs[i].original / max2) * 80); + } +} + +function display() { + var i; + for (i = 0; i < count; i ++) { + console.log(outputs[i].version + ' ' + outputs[i].gzip + ' ' + outputs[i].original); + console.log('gzip ' + outputs[i].bargraph); + console.log('orig ' + outputs[i].bargraph2); + } +} + +function getSizeAtVersion(version, path) { + var data = ''; + var op = {}; + + var req = https.request({ + host: 'raw.github.com', + port: 443, + path: '/timrwood/moment/' + version + path + }, function(res) { + res.setEncoding('utf8'); + res.on('data', function (chunk) { + data += chunk; + }); + res.on('end', function(e) { + zlib.gzip(data, function(error, result) { + op.version = version; + op.gzip = result.length; + op.original = data.length; + resolved ++; + check(); + }); + }); + }); + + req.on('error', function(e) { + console.log('problem with request: ' + e.message); + }); + req.end(); + count++; + outputs.push(op); +} + +(function(){ + var old_versions = '1.0.1 1.1.0 1.1.1 1.1.2 1.2.0 1.3.0 1.4.0'.split(' '); + var new_versions = '1.5.0 1.5.1 1.6.0 1.6.1'.split(' '); + var i; + + for (i = 0; i < old_versions.length; i++) { + getSizeAtVersion(old_versions[i], '/moment.min.js'); + } + for (i = 0; i < new_versions.length; i++) { + getSizeAtVersion(new_versions[i], '/min/moment.min.js'); + } +}()); + +(function(){ + count ++; + var op = {}; + outputs.push(op); + fs.readFile(path.normalize(__dirname + '/../min/moment.min.js'), 'utf8', function(err, data){ + if (err) throw err; + zlib.gzip(data, function(error, result) { + op.version = '.next'; + op.gzip = result.length; + op.original = data.length; + resolved ++; + check(); + }); + }); +}()); \ No newline at end of file diff --git a/node_modules/emailjs/node_modules/moment/test/lang/bg.js b/node_modules/emailjs/node_modules/moment/test/lang/bg.js new file mode 100644 index 0000000..732d84f --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/lang/bg.js @@ -0,0 +1,265 @@ +var moment = require("../../moment"); + + + /************************************************** + Bulgarian + *************************************************/ + +exports["lang:bg"] = { + "parse" : function(test) { + test.expect(96); + moment.lang('bg'); + var tests = 'януари янр_февруари фев_март мар_април апр_май май_юни юни_юли юли_август авг_септември сеп_октомври окт_ноември ное_декември дек'.split("_"); + var i; + function equalTest(input, mmm, i) { + test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1)); + } + for (i = 0; i < 12; i++) { + tests[i] = tests[i].split(' '); + equalTest(tests[i][0], 'MMM', i); + equalTest(tests[i][1], 'MMM', i); + equalTest(tests[i][0], 'MMMM', i); + equalTest(tests[i][1], 'MMMM', i); + equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i); + } + test.done(); + }, + + "format" : function(test) { + test.expect(18); + moment.lang('bg'); + var a = [ + ['dddd, MMMM Do YYYY, h:mm:ss a', 'неделя, февруари 14. 2010, 3:25:50 pm'], + ['ddd, hA', 'нед, 3PM'], + ['M Mo MM MMMM MMM', '2 2. 02 февруари фев'], + ['YYYY YY', '2010 10'], + ['D Do DD', '14 14. 14'], + ['d do dddd ddd dd', '0 0. неделя нед нд'], + ['DDD DDDo DDDD', '45 45. 045'], + ['w wo ww', '8 8. 08'], + ['h hh', '3 03'], + ['H HH', '15 15'], + ['m mm', '25 25'], + ['s ss', '50 50'], + ['a A', 'pm PM'], + ['t\\he DDDo \\d\\ay of t\\he ye\\ar', 'the 45. day of the year'], + ['L', '14.02.2010'], + ['LL', '14 февруари 2010'], + ['LLL', '14 февруари 2010 3:25'], + ['LLLL', 'неделя, 14 февруари 2010 3:25'] + ], + b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)), + i; + for (i = 0; i < a.length; i++) { + test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]); + } + test.done(); + }, + + "format ordinal" : function(test) { + test.expect(31); + moment.lang('bg'); + test.equal(moment([2011, 0, 1]).format('DDDo'), '1.', '1.'); + test.equal(moment([2011, 0, 2]).format('DDDo'), '2.', '2.'); + test.equal(moment([2011, 0, 3]).format('DDDo'), '3.', '3.'); + test.equal(moment([2011, 0, 4]).format('DDDo'), '4.', '4.'); + test.equal(moment([2011, 0, 5]).format('DDDo'), '5.', '5.'); + test.equal(moment([2011, 0, 6]).format('DDDo'), '6.', '6.'); + test.equal(moment([2011, 0, 7]).format('DDDo'), '7.', '7.'); + test.equal(moment([2011, 0, 8]).format('DDDo'), '8.', '8.'); + test.equal(moment([2011, 0, 9]).format('DDDo'), '9.', '9.'); + test.equal(moment([2011, 0, 10]).format('DDDo'), '10.', '10.'); + + test.equal(moment([2011, 0, 11]).format('DDDo'), '11.', '11.'); + test.equal(moment([2011, 0, 12]).format('DDDo'), '12.', '12.'); + test.equal(moment([2011, 0, 13]).format('DDDo'), '13.', '13.'); + test.equal(moment([2011, 0, 14]).format('DDDo'), '14.', '14.'); + test.equal(moment([2011, 0, 15]).format('DDDo'), '15.', '15.'); + test.equal(moment([2011, 0, 16]).format('DDDo'), '16.', '16.'); + test.equal(moment([2011, 0, 17]).format('DDDo'), '17.', '17.'); + test.equal(moment([2011, 0, 18]).format('DDDo'), '18.', '18.'); + test.equal(moment([2011, 0, 19]).format('DDDo'), '19.', '19.'); + test.equal(moment([2011, 0, 20]).format('DDDo'), '20.', '20.'); + + test.equal(moment([2011, 0, 21]).format('DDDo'), '21.', '21.'); + test.equal(moment([2011, 0, 22]).format('DDDo'), '22.', '22.'); + test.equal(moment([2011, 0, 23]).format('DDDo'), '23.', '23.'); + test.equal(moment([2011, 0, 24]).format('DDDo'), '24.', '24.'); + test.equal(moment([2011, 0, 25]).format('DDDo'), '25.', '25.'); + test.equal(moment([2011, 0, 26]).format('DDDo'), '26.', '26.'); + test.equal(moment([2011, 0, 27]).format('DDDo'), '27.', '27.'); + test.equal(moment([2011, 0, 28]).format('DDDo'), '28.', '28.'); + test.equal(moment([2011, 0, 29]).format('DDDo'), '29.', '29.'); + test.equal(moment([2011, 0, 30]).format('DDDo'), '30.', '30.'); + + test.equal(moment([2011, 0, 31]).format('DDDo'), '31.', '31.'); + test.done(); + }, + + "format month" : function(test) { + test.expect(12); + moment.lang('bg'); + var expected = 'януари янр_февруари фев_март мар_април апр_май май_юни юни_юли юли_август авг_септември сеп_октомври окт_ноември ное_декември дек'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]); + } + test.done(); + }, + + "format week" : function(test) { + test.expect(7); + moment.lang('bg'); + var expected = 'неделя нед нд_понеделник пон пн_вторник вто вт_сряда сря ср_четвъртък чет чт_петък пет пт_събота съб сб'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]); + } + test.done(); + }, + + "from" : function(test) { + test.expect(30); + moment.lang('bg'); + var start = moment([2007, 1, 28]); + test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "няколко секунди", "44 seconds = a few seconds"); + test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "минута", "45 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "минута", "89 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 минути", "90 seconds = 2 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 минути", "44 minutes = 44 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "час", "45 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "час", "89 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 часа", "90 minutes = 2 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 часа", "5 hours = 5 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 часа", "21 hours = 21 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "ден", "22 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "ден", "35 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 дни", "36 hours = 2 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "ден", "1 day = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 дни", "5 days = 5 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 дни", "25 days = 25 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "месец", "26 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "месец", "30 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "месец", "45 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 месеца", "46 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 месеца", "75 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 месеца", "76 days = 3 months"); + test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "месец", "1 month = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 месеца", "5 months = 5 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 месеца", "344 days = 11 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "година", "345 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "година", "547 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 години", "548 days = 2 years"); + test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "година", "1 year = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 години", "5 years = 5 years"); + test.done(); + }, + + "suffix" : function(test) { + test.expect(2); + moment.lang('bg'); + test.equal(moment(30000).from(0), "след няколко секунди", "prefix"); + test.equal(moment(0).from(30000), "преди няколко секунди", "suffix"); + test.done(); + }, + + "now from now" : function(test) { + test.expect(1); + moment.lang('bg'); + test.equal(moment().fromNow(), "преди няколко секунди", "now from now should display as in the past"); + test.done(); + }, + + "fromNow" : function(test) { + test.expect(2); + moment.lang('bg'); + test.equal(moment().add({s:30}).fromNow(), "след няколко секунди", "in a few seconds"); + test.equal(moment().add({d:5}).fromNow(), "след 5 дни", "in 5 days"); + test.done(); + }, + + "calendar day" : function(test) { + test.expect(6); + moment.lang('bg'); + + var a = moment().hours(2).minutes(0).seconds(0); + + test.equal(moment(a).calendar(), "Днес в 2:00", "today at the same time"); + test.equal(moment(a).add({ m: 25 }).calendar(), "Днес в 2:25", "Now plus 25 min"); + test.equal(moment(a).add({ h: 1 }).calendar(), "Днес в 3:00", "Now plus 1 hour"); + test.equal(moment(a).add({ d: 1 }).calendar(), "Утре в 2:00", "tomorrow at the same time"); + test.equal(moment(a).subtract({ h: 1 }).calendar(), "Днес в 1:00", "Now minus 1 hour"); + test.equal(moment(a).subtract({ d: 1 }).calendar(), "Вчера в 2:00", "yesterday at the same time"); + test.done(); + }, + + "calendar next week" : function(test) { + test.expect(15); + moment.lang('bg'); + + var i; + var m; + + for (i = 2; i < 7; i++) { + m = moment().add({ d: i }); + test.equal(m.calendar(), m.format('dddd [в] LT'), "Today + " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('dddd [в] LT'), "Today + " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('dddd [в] LT'), "Today + " + i + " days end of day"); + } + test.done(); + }, + + "calendar last week" : function(test) { + test.expect(15); + moment.lang('bg'); + + var i; + var m; + + function makeFormat(d) { + switch (d.day()) { + case 0: + case 3: + case 6: + return '[В изминалата] dddd [в] LT'; + case 1: + case 2: + case 4: + case 5: + return '[В изминалия] dddd [в] LT'; + } + } + + for (i = 2; i < 7; i++) { + m = moment().subtract({ d: i }); + test.equal(m.calendar(), m.format(makeFormat(m)), "Today - " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format(makeFormat(m)), "Today - " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format(makeFormat(m)), "Today - " + i + " days end of day"); + } + test.done(); + }, + + "calendar all else" : function(test) { + test.expect(4); + moment.lang('bg'); + var weeksAgo = moment().subtract({ w: 1 }); + var weeksFromNow = moment().add({ w: 1 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week"); + + weeksAgo = moment().subtract({ w: 2 }); + weeksFromNow = moment().add({ w: 2 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks"); + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/lang/ca.js b/node_modules/emailjs/node_modules/moment/test/lang/ca.js new file mode 100644 index 0000000..ac7377d --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/lang/ca.js @@ -0,0 +1,221 @@ +var moment = require("../../moment"); + + + /************************************************** + Català + *************************************************/ + +exports["lang:ca"] = { + "parse" : function(test) { + test.expect(96); + moment.lang('ca'); + + var tests = "Gener Gen._Febrer Febr._Març Mar._Abril Abr._Maig Mai._Juny Jun._Juliol Jul._Agost Ag._Setembre Set._Octubre Oct._Novembre Nov._Desembre Des.".split("_"); + + var i; + function equalTest(input, mmm, i) { + test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1)); + } + for (i = 0; i < 12; i++) { + tests[i] = tests[i].split(' '); + equalTest(tests[i][0], 'MMM', i); + equalTest(tests[i][1], 'MMM', i); + equalTest(tests[i][0], 'MMMM', i); + equalTest(tests[i][1], 'MMMM', i); + equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i); + } + test.done(); + }, + + "format ordinal" : function(test) { + test.expect(31); + moment.lang('ca'); + test.equal(moment([2011, 0, 1]).format('DDDo'), '1º', '1º'); + test.equal(moment([2011, 0, 2]).format('DDDo'), '2º', '2º'); + test.equal(moment([2011, 0, 3]).format('DDDo'), '3º', '3º'); + test.equal(moment([2011, 0, 4]).format('DDDo'), '4º', '4º'); + test.equal(moment([2011, 0, 5]).format('DDDo'), '5º', '5º'); + test.equal(moment([2011, 0, 6]).format('DDDo'), '6º', '6º'); + test.equal(moment([2011, 0, 7]).format('DDDo'), '7º', '7º'); + test.equal(moment([2011, 0, 8]).format('DDDo'), '8º', '8º'); + test.equal(moment([2011, 0, 9]).format('DDDo'), '9º', '9º'); + test.equal(moment([2011, 0, 10]).format('DDDo'), '10º', '10º'); + + test.equal(moment([2011, 0, 11]).format('DDDo'), '11º', '11º'); + test.equal(moment([2011, 0, 12]).format('DDDo'), '12º', '12º'); + test.equal(moment([2011, 0, 13]).format('DDDo'), '13º', '13º'); + test.equal(moment([2011, 0, 14]).format('DDDo'), '14º', '14º'); + test.equal(moment([2011, 0, 15]).format('DDDo'), '15º', '15º'); + test.equal(moment([2011, 0, 16]).format('DDDo'), '16º', '16º'); + test.equal(moment([2011, 0, 17]).format('DDDo'), '17º', '17º'); + test.equal(moment([2011, 0, 18]).format('DDDo'), '18º', '18º'); + test.equal(moment([2011, 0, 19]).format('DDDo'), '19º', '19º'); + test.equal(moment([2011, 0, 20]).format('DDDo'), '20º', '20º'); + + test.equal(moment([2011, 0, 21]).format('DDDo'), '21º', '21º'); + test.equal(moment([2011, 0, 22]).format('DDDo'), '22º', '22º'); + test.equal(moment([2011, 0, 23]).format('DDDo'), '23º', '23º'); + test.equal(moment([2011, 0, 24]).format('DDDo'), '24º', '24º'); + test.equal(moment([2011, 0, 25]).format('DDDo'), '25º', '25º'); + test.equal(moment([2011, 0, 26]).format('DDDo'), '26º', '26º'); + test.equal(moment([2011, 0, 27]).format('DDDo'), '27º', '27º'); + test.equal(moment([2011, 0, 28]).format('DDDo'), '28º', '28º'); + test.equal(moment([2011, 0, 29]).format('DDDo'), '29º', '29º'); + test.equal(moment([2011, 0, 30]).format('DDDo'), '30º', '30º'); + + test.equal(moment([2011, 0, 31]).format('DDDo'), '31º', '31º'); + test.done(); + }, + + "format month" : function(test) { + test.expect(12); + moment.lang('ca'); + var expected = "Gener Gen._Febrer Febr._Març Mar._Abril Abr._Maig Mai._Juny Jun._Juliol Jul._Agost Ag._Setembre Set._Octubre Oct._Novembre Nov._Desembre Des.".split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]); + } + test.done(); + }, + + "format week" : function(test) { + test.expect(7); + moment.lang('ca'); + var expected = "Diumenge Dg. Dg_Dilluns Dl. Dl_Dimarts Dt. Dt_Dimecres Dc. Dc_Dijous Dj. Dj_Divendres Dv. Dv_Dissabte Ds. Ds".split("_"); + + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]); + } + test.done(); + }, + + "from" : function(test) { + test.expect(30); + moment.lang('ca'); + var start = moment([2007, 1, 28]); + test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "uns segons", "44 seconds = a few seconds"); + test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "un minut", "45 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "un minut", "89 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minuts", "90 seconds = 2 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minuts", "44 minutes = 44 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "una hora", "45 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "una hora", "89 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 hores", "90 minutes = 2 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 hores", "5 hours = 5 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 hores", "21 hours = 21 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "un dia", "22 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "un dia", "35 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 dies", "36 hours = 2 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "un dia", "1 day = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 dies", "5 days = 5 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 dies", "25 days = 25 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "un mes", "26 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "un mes", "30 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "un mes", "45 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 mesos", "46 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 mesos", "75 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 mesos", "76 days = 3 months"); + test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "un mes", "1 month = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 mesos", "5 months = 5 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 mesos", "344 days = 11 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "un any", "345 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "un any", "547 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 anys", "548 days = 2 years"); + test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "un any", "1 year = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 anys", "5 years = 5 years"); + test.done(); + }, + + "suffix" : function(test) { + test.expect(2); + moment.lang('ca'); + test.equal(moment(30000).from(0), "en uns segons", "prefix"); + test.equal(moment(0).from(30000), "fa uns segons", "suffix"); + test.done(); + }, + + "now from now" : function(test) { + test.expect(1); + moment.lang('ca'); + test.equal(moment().fromNow(), "fa uns segons", "now from now should display as in the past"); + test.done(); + }, + + "fromNow" : function(test) { + test.expect(2); + moment.lang('ca'); + test.equal(moment().add({s:30}).fromNow(), "en uns segons", "en uns segons"); + test.equal(moment().add({d:5}).fromNow(), "en 5 dies", "en 5 dies"); + test.done(); + }, + + "calendar day" : function(test) { + test.expect(7); + moment.lang('ca'); + + var a = moment().hours(2).minutes(0).seconds(0); + + test.equal(moment(a).calendar(), "avui a les 2:00", "today at the same time"); + test.equal(moment(a).add({ m: 25 }).calendar(), "avui a les 2:25", "Now plus 25 min"); + test.equal(moment(a).add({ h: 1 }).calendar(), "avui a les 3:00", "Now plus 1 hour"); + test.equal(moment(a).add({ d: 1 }).calendar(), "demà a les 2:00", "tomorrow at the same time"); + test.equal(moment(a).add({ d: 1, h : -1 }).calendar(), "demà a la 1:00", "tomorrow minus 1 hour"); + test.equal(moment(a).subtract({ h: 1 }).calendar(), "avui a la 1:00", "Now minus 1 hour"); + test.equal(moment(a).subtract({ d: 1 }).calendar(), "ahir a les 2:00", "yesterday at the same time"); + test.done(); + }, + + "calendar next week" : function(test) { + test.expect(15); + moment.lang('ca'); + + var i; + var m; + + for (i = 2; i < 7; i++) { + m = moment().add({ d: i }); + test.equal(m.calendar(), m.format('dddd [a ' + ((m.hours() !== 1) ? 'les' : 'la') + '] LT'), "Today + " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('dddd [a ' + ((m.hours() !== 1) ? 'les' : 'la') + '] LT'), "Today + " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('dddd [a ' + ((m.hours() !== 1) ? 'les' : 'la') + '] LT'), "Today + " + i + " days end of day"); + } + test.done(); + }, + + "calendar last week" : function(test) { + test.expect(15); + moment.lang('ca'); + + for (i = 2; i < 7; i++) { + m = moment().subtract({ d: i }); + test.equal(m.calendar(), m.format('[el] dddd [passat a ' + ((m.hours() !== 1) ? 'les' : 'la') + '] LT'), "Today - " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('[el] dddd [passat a ' + ((m.hours() !== 1) ? 'les' : 'la') + '] LT'), "Today - " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('[el] dddd [passat a ' + ((m.hours() !== 1) ? 'les' : 'la') + '] LT'), "Today - " + i + " days end of day"); + } + test.done(); + }, + + "calendar all else" : function(test) { + test.expect(4); + moment.lang('ca'); + var weeksAgo = moment().subtract({ w: 1 }); + var weeksFromNow = moment().add({ w: 1 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week"); + + weeksAgo = moment().subtract({ w: 2 }); + weeksFromNow = moment().add({ w: 2 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks"); + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/lang/cv.js b/node_modules/emailjs/node_modules/moment/test/lang/cv.js new file mode 100644 index 0000000..c42cdce --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/lang/cv.js @@ -0,0 +1,246 @@ +var moment = require("../../moment"); + + + /************************************************** + Chuvash + *************************************************/ + +exports["lang:cv"] = { + "parse" : function(test) { + test.expect(96); + moment.lang('cv'); + var tests = 'кăрлач кăр_нарăс нар_пуш пуш_ака ака_май май_çĕртме çĕр_утă утă_çурла çур_авăн ав_юпа юпа_чӳк чӳк_раштав раш'.split("_"); + var i; + function equalTest(input, mmm, i) { + test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1)); + } + for (i = 0; i < 12; i++) { + tests[i] = tests[i].split(' '); + equalTest(tests[i][0], 'MMM', i); + equalTest(tests[i][1], 'MMM', i); + equalTest(tests[i][0], 'MMMM', i); + equalTest(tests[i][1], 'MMMM', i); + equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i); + } + test.done(); + }, + + "format" : function(test) { + test.expect(18); + moment.lang('cv'); + var a = [ + ['dddd, MMMM Do YYYY, h:mm:ss a', 'вырсарникун, нарăс 14-мĕш 2010, 3:25:50 pm'], + ['ddd, hA', 'выр, 3PM'], + ['M Mo MM MMMM MMM', '2 2-мĕш 02 нарăс нар'], + ['YYYY YY', '2010 10'], + ['D Do DD', '14 14-мĕш 14'], + ['d do dddd ddd dd', '0 0-мĕш вырсарникун выр вр'], + ['DDD DDDo DDDD', '45 45-мĕш 045'], + ['w wo ww', '8 8-мĕш 08'], + ['h hh', '3 03'], + ['H HH', '15 15'], + ['m mm', '25 25'], + ['s ss', '50 50'], + ['a A', 'pm PM'], + ['Çулăн DDDo кунĕ', 'Çулăн 45-мĕш кунĕ'], + ['L', '14-02-2010'], + ['LL', '2010 çулхи нарăс уйăхĕн 14-мĕшĕ'], + ['LLL', '2010 çулхи нарăс уйăхĕн 14-мĕшĕ, 15:25'], + ['LLLL', 'вырсарникун, 2010 çулхи нарăс уйăхĕн 14-мĕшĕ, 15:25'] + ], + b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)), + i; + for (i = 0; i < a.length; i++) { + test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]); + } + test.done(); + }, + + "format ordinal" : function(test) { + test.expect(31); + moment.lang('cv'); + test.equal(moment([2011, 0, 1]).format('DDDo'), '1-мĕш', '1-мĕш'); + test.equal(moment([2011, 0, 2]).format('DDDo'), '2-мĕш', '2-мĕш'); + test.equal(moment([2011, 0, 3]).format('DDDo'), '3-мĕш', '3-мĕш'); + test.equal(moment([2011, 0, 4]).format('DDDo'), '4-мĕш', '4-мĕш'); + test.equal(moment([2011, 0, 5]).format('DDDo'), '5-мĕш', '5-мĕш'); + test.equal(moment([2011, 0, 6]).format('DDDo'), '6-мĕш', '6-мĕш'); + test.equal(moment([2011, 0, 7]).format('DDDo'), '7-мĕш', '7-мĕш'); + test.equal(moment([2011, 0, 8]).format('DDDo'), '8-мĕш', '8-мĕш'); + test.equal(moment([2011, 0, 9]).format('DDDo'), '9-мĕш', '9-мĕш'); + test.equal(moment([2011, 0, 10]).format('DDDo'), '10-мĕш', '10-мĕш'); + + test.equal(moment([2011, 0, 11]).format('DDDo'), '11-мĕш', '11-мĕш'); + test.equal(moment([2011, 0, 12]).format('DDDo'), '12-мĕш', '12-мĕш'); + test.equal(moment([2011, 0, 13]).format('DDDo'), '13-мĕш', '13-мĕш'); + test.equal(moment([2011, 0, 14]).format('DDDo'), '14-мĕш', '14-мĕш'); + test.equal(moment([2011, 0, 15]).format('DDDo'), '15-мĕш', '15-мĕш'); + test.equal(moment([2011, 0, 16]).format('DDDo'), '16-мĕш', '16-мĕш'); + test.equal(moment([2011, 0, 17]).format('DDDo'), '17-мĕш', '17-мĕш'); + test.equal(moment([2011, 0, 18]).format('DDDo'), '18-мĕш', '18-мĕш'); + test.equal(moment([2011, 0, 19]).format('DDDo'), '19-мĕш', '19-мĕш'); + test.equal(moment([2011, 0, 20]).format('DDDo'), '20-мĕш', '20-мĕш'); + + test.equal(moment([2011, 0, 21]).format('DDDo'), '21-мĕш', '21-мĕш'); + test.equal(moment([2011, 0, 22]).format('DDDo'), '22-мĕш', '22-мĕш'); + test.equal(moment([2011, 0, 23]).format('DDDo'), '23-мĕш', '23-мĕш'); + test.equal(moment([2011, 0, 24]).format('DDDo'), '24-мĕш', '24-мĕш'); + test.equal(moment([2011, 0, 25]).format('DDDo'), '25-мĕш', '25-мĕш'); + test.equal(moment([2011, 0, 26]).format('DDDo'), '26-мĕш', '26-мĕш'); + test.equal(moment([2011, 0, 27]).format('DDDo'), '27-мĕш', '27-мĕш'); + test.equal(moment([2011, 0, 28]).format('DDDo'), '28-мĕш', '28-мĕш'); + test.equal(moment([2011, 0, 29]).format('DDDo'), '29-мĕш', '29-мĕш'); + test.equal(moment([2011, 0, 30]).format('DDDo'), '30-мĕш', '30-мĕш'); + + test.equal(moment([2011, 0, 31]).format('DDDo'), '31-мĕш', '31-мĕш'); + test.done(); + }, + + "format month" : function(test) { + test.expect(12); + moment.lang('cv'); + var expected = 'кăрлач кăр_нарăс нар_пуш пуш_ака ака_май май_çĕртме çĕр_утă утă_çурла çур_авăн ав_юпа юпа_чӳк чӳк_раштав раш'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]); + } + test.done(); + }, + + "format week" : function(test) { + test.expect(7); + moment.lang('cv'); + var expected = 'вырсарникун выр вр_тунтикун тун тн_ытларикун ытл ыт_юнкун юн юн_кĕçнерникун кĕç кç_эрнекун эрн эр_шăматкун шăм шм'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]); + } + test.done(); + }, + + "from" : function(test) { + test.expect(30); + moment.lang('cv'); + var start = moment([2007, 1, 28]); + test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "пĕр-ик çеккунт", "44 sekunder = a few seconds"); + test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "пĕр минут", "45 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "пĕр минут", "89 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 минут", "90 seconds = 2 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 минут", "44 minutes = 44 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "пĕр сехет", "45 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "пĕр сехет", "89 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 сехет", "90 minutes = 2 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 сехет", "5 hours = 5 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 сехет", "21 hours = 21 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "пĕр кун", "22 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "пĕр кун", "35 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 кун", "36 hours = 2 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "пĕр кун", "1 day = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 кун", "5 days = 5 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 кун", "25 days = 25 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "пĕр уйăх", "26 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "пĕр уйăх", "30 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "пĕр уйăх", "45 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 уйăх", "46 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 уйăх", "75 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 уйăх", "76 days = 3 months"); + test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "пĕр уйăх", "1 month = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 уйăх", "5 months = 5 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 уйăх", "344 days = 11 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "пĕр çул", "345 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "пĕр çул", "547 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 çул", "548 days = 2 years"); + test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "пĕр çул", "1 year = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 çул", "5 years = 5 years"); + test.done(); + }, + + "suffix" : function(test) { + test.expect(2); + moment.lang('cv'); + test.equal(moment(30000).from(0), "пĕр-ик çеккунтран", "prefix"); + test.equal(moment(0).from(30000), "пĕр-ик çеккунт каялла", "suffix"); + test.done(); + }, + + "now from now" : function(test) { + test.expect(1); + moment.lang('cv'); + test.equal(moment().fromNow(), "пĕр-ик çеккунт каялла", "now from now should display as in the past"); + test.done(); + }, + + "fromNow" : function(test) { + test.expect(2); + moment.lang('cv'); + test.equal(moment().add({s:30}).fromNow(), "пĕр-ик çеккунтран", "in a few seconds"); + test.equal(moment().add({d:5}).fromNow(), "5 кунран", "in 5 days"); + test.done(); + }, + + "calendar day" : function(test) { + test.expect(6); + moment.lang('cv'); + var a = moment().hours(2).minutes(0).seconds(0); + test.equal(moment(a).calendar(), "Паян 02:00 сехетре", "today at the same time"); + test.equal(moment(a).add({ m: 25 }).calendar(), "Паян 02:25 сехетре", "Now plus 25 min"); + test.equal(moment(a).add({ h: 1 }).calendar(), "Паян 03:00 сехетре", "Now plus 1 hour"); + test.equal(moment(a).add({ d: 1 }).calendar(), "Ыран 02:00 сехетре", "tomorrow at the same time"); + test.equal(moment(a).subtract({ h: 1 }).calendar(), "Паян 01:00 сехетре", "Now minus 1 hour"); + test.equal(moment(a).subtract({ d: 1 }).calendar(), "Ĕнер 02:00 сехетре", "yesterday at the same time"); + test.done(); + }, + + "calendar next week" : function(test) { + test.expect(15); + moment.lang('cv'); + + var i; + var m; + + for (i = 2; i < 7; i++) { + m = moment().add({ d: i }); + test.equal(m.calendar(), m.format('[Çитес] dddd LT [сехетре]'), "Today + " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('[Çитес] dddd LT [сехетре]'), "Today + " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('[Çитес] dddd LT [сехетре]'), "Today + " + i + " days end of day"); + } + test.done(); + }, + + "calendar last week" : function(test) { + test.expect(15); + moment.lang('cv'); + + for (i = 2; i < 7; i++) { + m = moment().subtract({ d: i }); + test.equal(m.calendar(), m.format('[Иртнĕ] dddd LT [сехетре]'), "Today - " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('[Иртнĕ] dddd LT [сехетре]'), "Today - " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('[Иртнĕ] dddd LT [сехетре]'), "Today - " + i + " days end of day"); + } + test.done(); + }, + + "calendar all else" : function(test) { + test.expect(4); + moment.lang('cv'); + var weeksAgo = moment().subtract({ w: 1 }); + var weeksFromNow = moment().add({ w: 1 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week"); + + weeksAgo = moment().subtract({ w: 2 }); + weeksFromNow = moment().add({ w: 2 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks"); + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/lang/da.js b/node_modules/emailjs/node_modules/moment/test/lang/da.js new file mode 100644 index 0000000..2bcf26c --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/lang/da.js @@ -0,0 +1,183 @@ +var moment = require("../../moment"); + + + /************************************************** + Danish + *************************************************/ + +exports["lang:da"] = { + "parse" : function(test) { + test.expect(96); + moment.lang('da'); + var tests = 'Januar Jan_Februar Feb_Marts Mar_April Apr_Maj Maj_Juni Jun_Juli Jul_August Aug_September Sep_Oktober Okt_November Nov_December Dec'.split("_"); + var i; + function equalTest(input, mmm, i) { + test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1)); + } + for (i = 0; i < 12; i++) { + tests[i] = tests[i].split(' '); + equalTest(tests[i][0], 'MMM', i); + equalTest(tests[i][1], 'MMM', i); + equalTest(tests[i][0], 'MMMM', i); + equalTest(tests[i][1], 'MMMM', i); + equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i); + } + test.done(); + }, + + "format" : function(test) { + test.expect(18); + moment.lang('da'); + var a = [ + ['dddd \\den MMMM Do YYYY, h:mm:ss a', 'Søndag den Februar 14. 2010, 3:25:50 pm'], + ['ddd hA', 'Søn 3PM'], + ['M Mo MM MMMM MMM', '2 2. 02 Februar Feb'], + ['YYYY YY', '2010 10'], + ['D Do DD', '14 14. 14'], + ['d do dddd ddd dd', '0 0. Søndag Søn Sø'], + ['DDD DDDo DDDD', '45 45. 045'], + ['w wo ww', '8 8. 08'], + ['h hh', '3 03'], + ['H HH', '15 15'], + ['m mm', '25 25'], + ['s ss', '50 50'], + ['a A', 'pm PM'], + ['[den] DDDo \\d\\ag på året', 'den 45. dag på året'], + ['L', '14/02/2010'], + ['LL', '14 Februar 2010'], + ['LLL', '14 Februar 2010 3:25 PM'], + ['LLLL', 'Søndag 14. Februar, 2010 3:25 PM'] + ], + b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)), + i; + for (i = 0; i < a.length; i++) { + test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]); + } + test.done(); + }, + + "format ordinal" : function(test) { + test.expect(31); + moment.lang('da'); + test.equal(moment([2011, 0, 1]).format('DDDo'), '1.', '1.'); + test.equal(moment([2011, 0, 2]).format('DDDo'), '2.', '2.'); + test.equal(moment([2011, 0, 3]).format('DDDo'), '3.', '3.'); + test.equal(moment([2011, 0, 4]).format('DDDo'), '4.', '4.'); + test.equal(moment([2011, 0, 5]).format('DDDo'), '5.', '5.'); + test.equal(moment([2011, 0, 6]).format('DDDo'), '6.', '6.'); + test.equal(moment([2011, 0, 7]).format('DDDo'), '7.', '7.'); + test.equal(moment([2011, 0, 8]).format('DDDo'), '8.', '8.'); + test.equal(moment([2011, 0, 9]).format('DDDo'), '9.', '9.'); + test.equal(moment([2011, 0, 10]).format('DDDo'), '10.', '10.'); + + test.equal(moment([2011, 0, 11]).format('DDDo'), '11.', '11.'); + test.equal(moment([2011, 0, 12]).format('DDDo'), '12.', '12.'); + test.equal(moment([2011, 0, 13]).format('DDDo'), '13.', '13.'); + test.equal(moment([2011, 0, 14]).format('DDDo'), '14.', '14.'); + test.equal(moment([2011, 0, 15]).format('DDDo'), '15.', '15.'); + test.equal(moment([2011, 0, 16]).format('DDDo'), '16.', '16.'); + test.equal(moment([2011, 0, 17]).format('DDDo'), '17.', '17.'); + test.equal(moment([2011, 0, 18]).format('DDDo'), '18.', '18.'); + test.equal(moment([2011, 0, 19]).format('DDDo'), '19.', '19.'); + test.equal(moment([2011, 0, 20]).format('DDDo'), '20.', '20.'); + + test.equal(moment([2011, 0, 21]).format('DDDo'), '21.', '21.'); + test.equal(moment([2011, 0, 22]).format('DDDo'), '22.', '22.'); + test.equal(moment([2011, 0, 23]).format('DDDo'), '23.', '23.'); + test.equal(moment([2011, 0, 24]).format('DDDo'), '24.', '24.'); + test.equal(moment([2011, 0, 25]).format('DDDo'), '25.', '25.'); + test.equal(moment([2011, 0, 26]).format('DDDo'), '26.', '26.'); + test.equal(moment([2011, 0, 27]).format('DDDo'), '27.', '27.'); + test.equal(moment([2011, 0, 28]).format('DDDo'), '28.', '28.'); + test.equal(moment([2011, 0, 29]).format('DDDo'), '29.', '29.'); + test.equal(moment([2011, 0, 30]).format('DDDo'), '30.', '30.'); + + test.equal(moment([2011, 0, 31]).format('DDDo'), '31.', '31.'); + test.done(); + }, + + "format month" : function(test) { + test.expect(12); + moment.lang('da'); + var expected = 'Januar Jan_Februar Feb_Marts Mar_April Apr_Maj Maj_Juni Jun_Juli Jul_August Aug_September Sep_Oktober Okt_November Nov_December Dec'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]); + } + test.done(); + }, + + "format week" : function(test) { + test.expect(7); + moment.lang('da'); + var expected = 'Søndag Søn Sø_Mandag Man Ma_Tirsdag Tir Ti_Onsdag Ons On_Torsdag Tor To_Fredag Fre Fr_Lørdag Lør Lø'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]); + } + test.done(); + }, + + "from" : function(test) { + test.expect(30); + moment.lang('da'); + var start = moment([2007, 1, 28]); + test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "få sekunder", "44 seconds = a few seconds"); + test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "minut", "45 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "minut", "89 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minutter", "90 seconds = 2 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minutter", "44 minutes = 44 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "time", "45 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "time", "89 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 timer", "90 minutes = 2 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 timer", "5 hours = 5 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 timer", "21 hours = 21 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "dag", "22 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "dag", "35 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 dage", "36 hours = 2 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "dag", "1 day = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 dage", "5 days = 5 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 dage", "25 days = 25 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "månede", "26 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "månede", "30 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "månede", "45 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 måneder", "46 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 måneder", "75 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 måneder", "76 days = 3 months"); + test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "månede", "1 month = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 måneder", "5 months = 5 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 måneder", "344 days = 11 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "år", "345 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "år", "547 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 år", "548 days = 2 years"); + test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "år", "1 year = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 år", "5 years = 5 years"); + test.done(); + }, + + "suffix" : function(test) { + test.expect(2); + moment.lang('da'); + test.equal(moment(30000).from(0), "om få sekunder", "prefix"); + test.equal(moment(0).from(30000), "få sekunder siden", "suffix"); + test.done(); + }, + + "now from now" : function(test) { + test.expect(1); + moment.lang('da'); + test.equal(moment().fromNow(), "få sekunder siden", "now from now should display as in the past"); + test.done(); + }, + + "fromNow" : function(test) { + test.expect(2); + moment.lang('da'); + test.equal(moment().add({s:30}).fromNow(), "om få sekunder", "in a few seconds"); + test.equal(moment().add({d:5}).fromNow(), "om 5 dage", "in 5 days"); + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/lang/de.js b/node_modules/emailjs/node_modules/moment/test/lang/de.js new file mode 100644 index 0000000..59d5358 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/lang/de.js @@ -0,0 +1,241 @@ +var moment = require("../../moment"); + + + /************************************************** + German + *************************************************/ + +exports["lang:de"] = { + "parse" : function(test) { + test.expect(96); + moment.lang('de'); + var tests = 'Januar Jan._Februar Febr._März Mrz._April Apr._Mai Mai_Juni Jun._Juli Jul._August Aug._September Sept._Oktober Okt._November Nov._Dezember Dez.'.split("_"); + var i; + function equalTest(input, mmm, i) { + test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1)); + } + for (i = 0; i < 12; i++) { + tests[i] = tests[i].split(' '); + equalTest(tests[i][0], 'MMM', i); + equalTest(tests[i][1], 'MMM', i); + equalTest(tests[i][0], 'MMMM', i); + equalTest(tests[i][1], 'MMMM', i); + equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i); + } + test.done(); + }, + + "format" : function(test) { + test.expect(18); + moment.lang('de'); + var a = [ + ['dddd, Do MMMM YYYY, h:mm:ss a', 'Sonntag, 14. Februar 2010, 3:25:50 pm'], + ['ddd, hA', 'So., 3PM'], + ['M Mo MM MMMM MMM', '2 2. 02 Februar Febr.'], + ['YYYY YY', '2010 10'], + ['D Do DD', '14 14. 14'], + ['d do dddd ddd dd', '0 0. Sonntag So. So'], + ['DDD DDDo DDDD', '45 45. 045'], + ['w wo ww', '8 8. 08'], + ['h hh', '3 03'], + ['H HH', '15 15'], + ['m mm', '25 25'], + ['s ss', '50 50'], + ['a A', 'pm PM'], + ['t\\he DDDo \\d\\ay of t\\he ye\\ar', 'the 45. day of the year'], + ['L', '14.02.2010'], + ['LL', '14. Februar 2010'], + ['LLL', '14. Februar 2010 15:25 Uhr'], + ['LLLL', 'Sonntag, 14. Februar 2010 15:25 Uhr'] + ], + b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)), + i; + for (i = 0; i < a.length; i++) { + test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]); + } + test.done(); + }, + + "format ordinal" : function(test) { + test.expect(31); + moment.lang('de'); + test.equal(moment([2011, 0, 1]).format('DDDo'), '1.', '1.'); + test.equal(moment([2011, 0, 2]).format('DDDo'), '2.', '2.'); + test.equal(moment([2011, 0, 3]).format('DDDo'), '3.', '3.'); + test.equal(moment([2011, 0, 4]).format('DDDo'), '4.', '4.'); + test.equal(moment([2011, 0, 5]).format('DDDo'), '5.', '5.'); + test.equal(moment([2011, 0, 6]).format('DDDo'), '6.', '6.'); + test.equal(moment([2011, 0, 7]).format('DDDo'), '7.', '7.'); + test.equal(moment([2011, 0, 8]).format('DDDo'), '8.', '8.'); + test.equal(moment([2011, 0, 9]).format('DDDo'), '9.', '9.'); + test.equal(moment([2011, 0, 10]).format('DDDo'), '10.', '10.'); + + test.equal(moment([2011, 0, 11]).format('DDDo'), '11.', '11.'); + test.equal(moment([2011, 0, 12]).format('DDDo'), '12.', '12.'); + test.equal(moment([2011, 0, 13]).format('DDDo'), '13.', '13.'); + test.equal(moment([2011, 0, 14]).format('DDDo'), '14.', '14.'); + test.equal(moment([2011, 0, 15]).format('DDDo'), '15.', '15.'); + test.equal(moment([2011, 0, 16]).format('DDDo'), '16.', '16.'); + test.equal(moment([2011, 0, 17]).format('DDDo'), '17.', '17.'); + test.equal(moment([2011, 0, 18]).format('DDDo'), '18.', '18.'); + test.equal(moment([2011, 0, 19]).format('DDDo'), '19.', '19.'); + test.equal(moment([2011, 0, 20]).format('DDDo'), '20.', '20.'); + + test.equal(moment([2011, 0, 21]).format('DDDo'), '21.', '21.'); + test.equal(moment([2011, 0, 22]).format('DDDo'), '22.', '22.'); + test.equal(moment([2011, 0, 23]).format('DDDo'), '23.', '23.'); + test.equal(moment([2011, 0, 24]).format('DDDo'), '24.', '24.'); + test.equal(moment([2011, 0, 25]).format('DDDo'), '25.', '25.'); + test.equal(moment([2011, 0, 26]).format('DDDo'), '26.', '26.'); + test.equal(moment([2011, 0, 27]).format('DDDo'), '27.', '27.'); + test.equal(moment([2011, 0, 28]).format('DDDo'), '28.', '28.'); + test.equal(moment([2011, 0, 29]).format('DDDo'), '29.', '29.'); + test.equal(moment([2011, 0, 30]).format('DDDo'), '30.', '30.'); + + test.equal(moment([2011, 0, 31]).format('DDDo'), '31.', '31.'); + test.done(); + }, + + "format month" : function(test) { + test.expect(12); + moment.lang('de'); + var expected = 'Januar Jan._Februar Febr._März Mrz._April Apr._Mai Mai_Juni Jun._Juli Jul._August Aug._September Sept._Oktober Okt._November Nov._Dezember Dez.'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]); + } + test.done(); + }, + + "format week" : function(test) { + test.expect(7); + moment.lang('de'); + var expected = 'Sonntag So. So_Montag Mo. Mo_Dienstag Di. Di_Mittwoch Mi. Mi_Donnerstag Do. Do_Freitag Fr. Fr_Samstag Sa. Sa'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]); + } + test.done(); + }, + + "from" : function(test) { + test.expect(30); + moment.lang('de'); + var start = moment([2007, 1, 28]); + test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "ein paar Sekunden", "44 seconds = a few seconds"); + test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "einer Minute", "45 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "einer Minute", "89 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 Minuten", "90 seconds = 2 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 Minuten", "44 minutes = 44 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "einer Stunde", "45 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "einer Stunde", "89 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 Stunden", "90 minutes = 2 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 Stunden", "5 hours = 5 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 Stunden", "21 hours = 21 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "einem Tag", "22 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "einem Tag", "35 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 Tagen", "36 hours = 2 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "einem Tag", "1 day = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 Tagen", "5 days = 5 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 Tagen", "25 days = 25 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "einem Monat", "26 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "einem Monat", "30 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "einem Monat", "45 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 Monaten", "46 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 Monaten", "75 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 Monaten", "76 days = 3 months"); + test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "einem Monat", "1 month = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 Monaten", "5 months = 5 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 Monaten", "344 days = 11 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "einem Jahr", "345 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "einem Jahr", "547 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 Jahren", "548 days = 2 years"); + test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "einem Jahr", "1 year = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 Jahren", "5 years = 5 years"); + test.done(); + }, + + "suffix" : function(test) { + test.expect(2); + moment.lang('de'); + test.equal(moment(30000).from(0), "in ein paar Sekunden", "prefix"); + test.equal(moment(0).from(30000), "vor ein paar Sekunden", "suffix"); + test.done(); + }, + + "fromNow" : function(test) { + test.expect(2); + moment.lang('de'); + test.equal(moment().add({s:30}).fromNow(), "in ein paar Sekunden", "in a few seconds"); + test.equal(moment().add({d:5}).fromNow(), "in 5 Tagen", "in 5 days"); + test.done(); + }, + + "calendar day" : function(test) { + test.expect(6); + moment.lang('de'); + + var a = moment().hours(2).minutes(0).seconds(0); + + test.equal(moment(a).calendar(), "Heute um 2:00 Uhr", "today at the same time"); + test.equal(moment(a).add({ m: 25 }).calendar(), "Heute um 2:25 Uhr", "Now plus 25 min"); + test.equal(moment(a).add({ h: 1 }).calendar(), "Heute um 3:00 Uhr", "Now plus 1 hour"); + test.equal(moment(a).add({ d: 1 }).calendar(), "Morgen um 2:00 Uhr", "tomorrow at the same time"); + test.equal(moment(a).subtract({ h: 1 }).calendar(), "Heute um 1:00 Uhr", "Now minus 1 hour"); + test.equal(moment(a).subtract({ d: 1 }).calendar(), "Gestern um 2:00 Uhr", "yesterday at the same time"); + test.done(); + }, + + "calendar next week" : function(test) { + test.expect(15); + moment.lang('de'); + + var i; + var m; + + for (i = 2; i < 7; i++) { + m = moment().add({ d: i }); + test.equal(m.calendar(), m.format('dddd [um] LT'), "Today + " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('dddd [um] LT'), "Today + " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('dddd [um] LT'), "Today + " + i + " days end of day"); + } + test.done(); + }, + + "calendar last week" : function(test) { + test.expect(15); + moment.lang('de'); + + for (i = 2; i < 7; i++) { + m = moment().subtract({ d: i }); + test.equal(m.calendar(), m.format('[letzten] dddd [um] LT'), "Today + " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('[letzten] dddd [um] LT'), "Today + " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('[letzten] dddd [um] LT'), "Today + " + i + " days end of day"); + } + test.done(); + }, + + "calendar all else" : function(test) { + test.expect(4); + moment.lang('de'); + var weeksAgo = moment().subtract({ w: 1 }); + var weeksFromNow = moment().add({ w: 1 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week"); + + weeksAgo = moment().subtract({ w: 2 }); + weeksFromNow = moment().add({ w: 2 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks"); + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/lang/en-ca.js b/node_modules/emailjs/node_modules/moment/test/lang/en-ca.js new file mode 100644 index 0000000..d59de28 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/lang/en-ca.js @@ -0,0 +1,248 @@ +var moment = require("../../moment"); + + + /************************************************** + English + *************************************************/ + +exports["lang:en-ca"] = { + "parse" : function(test) { + test.expect(96); + moment.lang('en-ca'); + var tests = 'January Jan_February Feb_March Mar_April Apr_May May_June Jun_July Jul_August Aug_September Sep_October Oct_November Nov_December Dec'.split("_"); + var i; + function equalTest(input, mmm, i) { + test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1)); + } + for (i = 0; i < 12; i++) { + tests[i] = tests[i].split(' '); + equalTest(tests[i][0], 'MMM', i); + equalTest(tests[i][1], 'MMM', i); + equalTest(tests[i][0], 'MMMM', i); + equalTest(tests[i][1], 'MMMM', i); + equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i); + } + test.done(); + }, + + "format" : function(test) { + test.expect(18); + moment.lang('en-ca'); + var a = [ + ['dddd, MMMM Do YYYY, h:mm:ss a', 'Sunday, February 14th 2010, 3:25:50 pm'], + ['ddd, hA', 'Sun, 3PM'], + ['M Mo MM MMMM MMM', '2 2nd 02 February Feb'], + ['YYYY YY', '2010 10'], + ['D Do DD', '14 14th 14'], + ['d do dddd ddd dd', '0 0th Sunday Sun Su'], + ['DDD DDDo DDDD', '45 45th 045'], + ['w wo ww', '8 8th 08'], + ['h hh', '3 03'], + ['H HH', '15 15'], + ['m mm', '25 25'], + ['s ss', '50 50'], + ['a A', 'pm PM'], + ['t\\he DDDo \\d\\ay of t\\he ye\\ar', 'the 45th day of the year'], + ['L', '2010-02-14'], + ['LL', '14 February, 2010'], + ['LLL', '14 February, 2010 3:25 PM'], + ['LLLL', 'Sunday, 14 February, 2010 3:25 PM'] + ], + b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)), + i; + for (i = 0; i < a.length; i++) { + test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]); + } + test.done(); + }, + + "format ordinal" : function(test) { + test.expect(31); + moment.lang('en-gb'); + test.equal(moment([2011, 0, 1]).format('DDDo'), '1st', '1st'); + test.equal(moment([2011, 0, 2]).format('DDDo'), '2nd', '2nd'); + test.equal(moment([2011, 0, 3]).format('DDDo'), '3rd', '3rd'); + test.equal(moment([2011, 0, 4]).format('DDDo'), '4th', '4th'); + test.equal(moment([2011, 0, 5]).format('DDDo'), '5th', '5th'); + test.equal(moment([2011, 0, 6]).format('DDDo'), '6th', '6th'); + test.equal(moment([2011, 0, 7]).format('DDDo'), '7th', '7th'); + test.equal(moment([2011, 0, 8]).format('DDDo'), '8th', '8th'); + test.equal(moment([2011, 0, 9]).format('DDDo'), '9th', '9th'); + test.equal(moment([2011, 0, 10]).format('DDDo'), '10th', '10th'); + + test.equal(moment([2011, 0, 11]).format('DDDo'), '11th', '11th'); + test.equal(moment([2011, 0, 12]).format('DDDo'), '12th', '12th'); + test.equal(moment([2011, 0, 13]).format('DDDo'), '13th', '13th'); + test.equal(moment([2011, 0, 14]).format('DDDo'), '14th', '14th'); + test.equal(moment([2011, 0, 15]).format('DDDo'), '15th', '15th'); + test.equal(moment([2011, 0, 16]).format('DDDo'), '16th', '16th'); + test.equal(moment([2011, 0, 17]).format('DDDo'), '17th', '17th'); + test.equal(moment([2011, 0, 18]).format('DDDo'), '18th', '18th'); + test.equal(moment([2011, 0, 19]).format('DDDo'), '19th', '19th'); + test.equal(moment([2011, 0, 20]).format('DDDo'), '20th', '20th'); + + test.equal(moment([2011, 0, 21]).format('DDDo'), '21st', '21st'); + test.equal(moment([2011, 0, 22]).format('DDDo'), '22nd', '22nd'); + test.equal(moment([2011, 0, 23]).format('DDDo'), '23rd', '23rd'); + test.equal(moment([2011, 0, 24]).format('DDDo'), '24th', '24th'); + test.equal(moment([2011, 0, 25]).format('DDDo'), '25th', '25th'); + test.equal(moment([2011, 0, 26]).format('DDDo'), '26th', '26th'); + test.equal(moment([2011, 0, 27]).format('DDDo'), '27th', '27th'); + test.equal(moment([2011, 0, 28]).format('DDDo'), '28th', '28th'); + test.equal(moment([2011, 0, 29]).format('DDDo'), '29th', '29th'); + test.equal(moment([2011, 0, 30]).format('DDDo'), '30th', '30th'); + + test.equal(moment([2011, 0, 31]).format('DDDo'), '31st', '31st'); + test.done(); + }, + + "format month" : function(test) { + test.expect(12); + moment.lang('en-gb'); + var expected = 'January Jan_February Feb_March Mar_April Apr_May May_June Jun_July Jul_August Aug_September Sep_October Oct_November Nov_December Dec'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]); + } + test.done(); + }, + + "format week" : function(test) { + test.expect(7); + moment.lang('en-gb'); + var expected = 'Sunday Sun Su_Monday Mon Mo_Tuesday Tue Tu_Wednesday Wed We_Thursday Thu Th_Friday Fri Fr_Saturday Sat Sa'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]); + } + test.done(); + }, + + "from" : function(test) { + test.expect(30); + moment.lang('en-gb'); + var start = moment([2007, 1, 28]); + test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "a few seconds", "44 seconds = a few seconds"); + test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "a minute", "45 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "a minute", "89 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minutes", "90 seconds = 2 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minutes", "44 minutes = 44 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "an hour", "45 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "an hour", "89 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 hours", "90 minutes = 2 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 hours", "5 hours = 5 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 hours", "21 hours = 21 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "a day", "22 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "a day", "35 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 days", "36 hours = 2 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "a day", "1 day = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 days", "5 days = 5 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 days", "25 days = 25 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "a month", "26 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "a month", "30 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "a month", "45 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 months", "46 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 months", "75 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 months", "76 days = 3 months"); + test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "a month", "1 month = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 months", "5 months = 5 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 months", "344 days = 11 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "a year", "345 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "a year", "547 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 years", "548 days = 2 years"); + test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "a year", "1 year = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 years", "5 years = 5 years"); + test.done(); + }, + + "suffix" : function(test) { + test.expect(2); + moment.lang('en-gb'); + test.equal(moment(30000).from(0), "in a few seconds", "prefix"); + test.equal(moment(0).from(30000), "a few seconds ago", "suffix"); + test.done(); + }, + + "now from now" : function(test) { + test.expect(1); + moment.lang('en-gb'); + test.equal(moment().fromNow(), "a few seconds ago", "now from now should display as in the past"); + test.done(); + }, + + "fromNow" : function(test) { + test.expect(2); + moment.lang('en-gb'); + test.equal(moment().add({s:30}).fromNow(), "in a few seconds", "in a few seconds"); + test.equal(moment().add({d:5}).fromNow(), "in 5 days", "in 5 days"); + test.done(); + }, + + "calendar day" : function(test) { + test.expect(6); + moment.lang('en-gb'); + + var a = moment().hours(2).minutes(0).seconds(0); + + test.equal(moment(a).calendar(), "Today at 2:00 AM", "today at the same time"); + test.equal(moment(a).add({ m: 25 }).calendar(), "Today at 2:25 AM", "Now plus 25 min"); + test.equal(moment(a).add({ h: 1 }).calendar(), "Today at 3:00 AM", "Now plus 1 hour"); + test.equal(moment(a).add({ d: 1 }).calendar(), "Tomorrow at 2:00 AM", "tomorrow at the same time"); + test.equal(moment(a).subtract({ h: 1 }).calendar(), "Today at 1:00 AM", "Now minus 1 hour"); + test.equal(moment(a).subtract({ d: 1 }).calendar(), "Yesterday at 2:00 AM", "yesterday at the same time"); + test.done(); + }, + + "calendar next week" : function(test) { + test.expect(15); + moment.lang('en-gb'); + + var i; + var m; + + for (i = 2; i < 7; i++) { + m = moment().add({ d: i }); + test.equal(m.calendar(), m.format('dddd [at] LT'), "Today + " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('dddd [at] LT'), "Today + " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('dddd [at] LT'), "Today + " + i + " days end of day"); + } + test.done(); + }, + + "calendar last week" : function(test) { + test.expect(15); + moment.lang('en-gb'); + + for (i = 2; i < 7; i++) { + m = moment().subtract({ d: i }); + test.equal(m.calendar(), m.format('[last] dddd [at] LT'), "Today - " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('[last] dddd [at] LT'), "Today - " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('[last] dddd [at] LT'), "Today - " + i + " days end of day"); + } + test.done(); + }, + + "calendar all else" : function(test) { + test.expect(4); + moment.lang('en-gb'); + var weeksAgo = moment().subtract({ w: 1 }); + var weeksFromNow = moment().add({ w: 1 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week"); + + weeksAgo = moment().subtract({ w: 2 }); + weeksFromNow = moment().add({ w: 2 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks"); + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/lang/en-gb.js b/node_modules/emailjs/node_modules/moment/test/lang/en-gb.js new file mode 100644 index 0000000..6641b81 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/lang/en-gb.js @@ -0,0 +1,248 @@ +var moment = require("../../moment"); + + + /************************************************** + English + *************************************************/ + +exports["lang:en-gb"] = { + "parse" : function(test) { + test.expect(96); + moment.lang('en-gb'); + var tests = 'January Jan_February Feb_March Mar_April Apr_May May_June Jun_July Jul_August Aug_September Sep_October Oct_November Nov_December Dec'.split("_"); + var i; + function equalTest(input, mmm, i) { + test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1)); + } + for (i = 0; i < 12; i++) { + tests[i] = tests[i].split(' '); + equalTest(tests[i][0], 'MMM', i); + equalTest(tests[i][1], 'MMM', i); + equalTest(tests[i][0], 'MMMM', i); + equalTest(tests[i][1], 'MMMM', i); + equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i); + } + test.done(); + }, + + "format" : function(test) { + test.expect(18); + moment.lang('en-gb'); + var a = [ + ['dddd, MMMM Do YYYY, h:mm:ss a', 'Sunday, February 14th 2010, 3:25:50 pm'], + ['ddd, hA', 'Sun, 3PM'], + ['M Mo MM MMMM MMM', '2 2nd 02 February Feb'], + ['YYYY YY', '2010 10'], + ['D Do DD', '14 14th 14'], + ['d do dddd ddd dd', '0 0th Sunday Sun Su'], + ['DDD DDDo DDDD', '45 45th 045'], + ['w wo ww', '8 8th 08'], + ['h hh', '3 03'], + ['H HH', '15 15'], + ['m mm', '25 25'], + ['s ss', '50 50'], + ['a A', 'pm PM'], + ['t\\he DDDo \\d\\ay of t\\he ye\\ar', 'the 45th day of the year'], + ['L', '14/02/2010'], + ['LL', '14 February 2010'], + ['LLL', '14 February 2010 3:25 PM'], + ['LLLL', 'Sunday, 14 February 2010 3:25 PM'] + ], + b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)), + i; + for (i = 0; i < a.length; i++) { + test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]); + } + test.done(); + }, + + "format ordinal" : function(test) { + test.expect(31); + moment.lang('en-gb'); + test.equal(moment([2011, 0, 1]).format('DDDo'), '1st', '1st'); + test.equal(moment([2011, 0, 2]).format('DDDo'), '2nd', '2nd'); + test.equal(moment([2011, 0, 3]).format('DDDo'), '3rd', '3rd'); + test.equal(moment([2011, 0, 4]).format('DDDo'), '4th', '4th'); + test.equal(moment([2011, 0, 5]).format('DDDo'), '5th', '5th'); + test.equal(moment([2011, 0, 6]).format('DDDo'), '6th', '6th'); + test.equal(moment([2011, 0, 7]).format('DDDo'), '7th', '7th'); + test.equal(moment([2011, 0, 8]).format('DDDo'), '8th', '8th'); + test.equal(moment([2011, 0, 9]).format('DDDo'), '9th', '9th'); + test.equal(moment([2011, 0, 10]).format('DDDo'), '10th', '10th'); + + test.equal(moment([2011, 0, 11]).format('DDDo'), '11th', '11th'); + test.equal(moment([2011, 0, 12]).format('DDDo'), '12th', '12th'); + test.equal(moment([2011, 0, 13]).format('DDDo'), '13th', '13th'); + test.equal(moment([2011, 0, 14]).format('DDDo'), '14th', '14th'); + test.equal(moment([2011, 0, 15]).format('DDDo'), '15th', '15th'); + test.equal(moment([2011, 0, 16]).format('DDDo'), '16th', '16th'); + test.equal(moment([2011, 0, 17]).format('DDDo'), '17th', '17th'); + test.equal(moment([2011, 0, 18]).format('DDDo'), '18th', '18th'); + test.equal(moment([2011, 0, 19]).format('DDDo'), '19th', '19th'); + test.equal(moment([2011, 0, 20]).format('DDDo'), '20th', '20th'); + + test.equal(moment([2011, 0, 21]).format('DDDo'), '21st', '21st'); + test.equal(moment([2011, 0, 22]).format('DDDo'), '22nd', '22nd'); + test.equal(moment([2011, 0, 23]).format('DDDo'), '23rd', '23rd'); + test.equal(moment([2011, 0, 24]).format('DDDo'), '24th', '24th'); + test.equal(moment([2011, 0, 25]).format('DDDo'), '25th', '25th'); + test.equal(moment([2011, 0, 26]).format('DDDo'), '26th', '26th'); + test.equal(moment([2011, 0, 27]).format('DDDo'), '27th', '27th'); + test.equal(moment([2011, 0, 28]).format('DDDo'), '28th', '28th'); + test.equal(moment([2011, 0, 29]).format('DDDo'), '29th', '29th'); + test.equal(moment([2011, 0, 30]).format('DDDo'), '30th', '30th'); + + test.equal(moment([2011, 0, 31]).format('DDDo'), '31st', '31st'); + test.done(); + }, + + "format month" : function(test) { + test.expect(12); + moment.lang('en-gb'); + var expected = 'January Jan_February Feb_March Mar_April Apr_May May_June Jun_July Jul_August Aug_September Sep_October Oct_November Nov_December Dec'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]); + } + test.done(); + }, + + "format week" : function(test) { + test.expect(7); + moment.lang('en-gb'); + var expected = 'Sunday Sun Su_Monday Mon Mo_Tuesday Tue Tu_Wednesday Wed We_Thursday Thu Th_Friday Fri Fr_Saturday Sat Sa'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]); + } + test.done(); + }, + + "from" : function(test) { + test.expect(30); + moment.lang('en-gb'); + var start = moment([2007, 1, 28]); + test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "a few seconds", "44 seconds = a few seconds"); + test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "a minute", "45 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "a minute", "89 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minutes", "90 seconds = 2 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minutes", "44 minutes = 44 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "an hour", "45 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "an hour", "89 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 hours", "90 minutes = 2 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 hours", "5 hours = 5 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 hours", "21 hours = 21 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "a day", "22 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "a day", "35 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 days", "36 hours = 2 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "a day", "1 day = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 days", "5 days = 5 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 days", "25 days = 25 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "a month", "26 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "a month", "30 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "a month", "45 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 months", "46 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 months", "75 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 months", "76 days = 3 months"); + test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "a month", "1 month = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 months", "5 months = 5 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 months", "344 days = 11 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "a year", "345 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "a year", "547 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 years", "548 days = 2 years"); + test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "a year", "1 year = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 years", "5 years = 5 years"); + test.done(); + }, + + "suffix" : function(test) { + test.expect(2); + moment.lang('en-gb'); + test.equal(moment(30000).from(0), "in a few seconds", "prefix"); + test.equal(moment(0).from(30000), "a few seconds ago", "suffix"); + test.done(); + }, + + "now from now" : function(test) { + test.expect(1); + moment.lang('en-gb'); + test.equal(moment().fromNow(), "a few seconds ago", "now from now should display as in the past"); + test.done(); + }, + + "fromNow" : function(test) { + test.expect(2); + moment.lang('en-gb'); + test.equal(moment().add({s:30}).fromNow(), "in a few seconds", "in a few seconds"); + test.equal(moment().add({d:5}).fromNow(), "in 5 days", "in 5 days"); + test.done(); + }, + + "calendar day" : function(test) { + test.expect(6); + moment.lang('en-gb'); + + var a = moment().hours(2).minutes(0).seconds(0); + + test.equal(moment(a).calendar(), "Today at 2:00 AM", "today at the same time"); + test.equal(moment(a).add({ m: 25 }).calendar(), "Today at 2:25 AM", "Now plus 25 min"); + test.equal(moment(a).add({ h: 1 }).calendar(), "Today at 3:00 AM", "Now plus 1 hour"); + test.equal(moment(a).add({ d: 1 }).calendar(), "Tomorrow at 2:00 AM", "tomorrow at the same time"); + test.equal(moment(a).subtract({ h: 1 }).calendar(), "Today at 1:00 AM", "Now minus 1 hour"); + test.equal(moment(a).subtract({ d: 1 }).calendar(), "Yesterday at 2:00 AM", "yesterday at the same time"); + test.done(); + }, + + "calendar next week" : function(test) { + test.expect(15); + moment.lang('en-gb'); + + var i; + var m; + + for (i = 2; i < 7; i++) { + m = moment().add({ d: i }); + test.equal(m.calendar(), m.format('dddd [at] LT'), "Today + " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('dddd [at] LT'), "Today + " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('dddd [at] LT'), "Today + " + i + " days end of day"); + } + test.done(); + }, + + "calendar last week" : function(test) { + test.expect(15); + moment.lang('en-gb'); + + for (i = 2; i < 7; i++) { + m = moment().subtract({ d: i }); + test.equal(m.calendar(), m.format('[last] dddd [at] LT'), "Today - " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('[last] dddd [at] LT'), "Today - " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('[last] dddd [at] LT'), "Today - " + i + " days end of day"); + } + test.done(); + }, + + "calendar all else" : function(test) { + test.expect(4); + moment.lang('en-gb'); + var weeksAgo = moment().subtract({ w: 1 }); + var weeksFromNow = moment().add({ w: 1 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week"); + + weeksAgo = moment().subtract({ w: 2 }); + weeksFromNow = moment().add({ w: 2 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks"); + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/lang/en.js b/node_modules/emailjs/node_modules/moment/test/lang/en.js new file mode 100644 index 0000000..5f368b8 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/lang/en.js @@ -0,0 +1,248 @@ +var moment = require("../../moment"); + + + /************************************************** + English + *************************************************/ + +exports["lang:en"] = { + "parse" : function(test) { + test.expect(96); + moment.lang('en'); + var tests = 'January Jan_February Feb_March Mar_April Apr_May May_June Jun_July Jul_August Aug_September Sep_October Oct_November Nov_December Dec'.split("_"); + var i; + function equalTest(input, mmm, i) { + test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1)); + } + for (i = 0; i < 12; i++) { + tests[i] = tests[i].split(' '); + equalTest(tests[i][0], 'MMM', i); + equalTest(tests[i][1], 'MMM', i); + equalTest(tests[i][0], 'MMMM', i); + equalTest(tests[i][1], 'MMMM', i); + equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i); + } + test.done(); + }, + + "format" : function(test) { + test.expect(18); + moment.lang('en'); + var a = [ + ['dddd, MMMM Do YYYY, h:mm:ss a', 'Sunday, February 14th 2010, 3:25:50 pm'], + ['ddd, hA', 'Sun, 3PM'], + ['M Mo MM MMMM MMM', '2 2nd 02 February Feb'], + ['YYYY YY', '2010 10'], + ['D Do DD', '14 14th 14'], + ['d do dddd ddd dd', '0 0th Sunday Sun Su'], + ['DDD DDDo DDDD', '45 45th 045'], + ['w wo ww', '8 8th 08'], + ['h hh', '3 03'], + ['H HH', '15 15'], + ['m mm', '25 25'], + ['s ss', '50 50'], + ['a A', 'pm PM'], + ['t\\he DDDo \\d\\ay of t\\he ye\\ar', 'the 45th day of the year'], + ['L', '02/14/2010'], + ['LL', 'February 14 2010'], + ['LLL', 'February 14 2010 3:25 PM'], + ['LLLL', 'Sunday, February 14 2010 3:25 PM'] + ], + b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)), + i; + for (i = 0; i < a.length; i++) { + test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]); + } + test.done(); + }, + + "format ordinal" : function(test) { + test.expect(31); + moment.lang('en'); + test.equal(moment([2011, 0, 1]).format('DDDo'), '1st', '1st'); + test.equal(moment([2011, 0, 2]).format('DDDo'), '2nd', '2nd'); + test.equal(moment([2011, 0, 3]).format('DDDo'), '3rd', '3rd'); + test.equal(moment([2011, 0, 4]).format('DDDo'), '4th', '4th'); + test.equal(moment([2011, 0, 5]).format('DDDo'), '5th', '5th'); + test.equal(moment([2011, 0, 6]).format('DDDo'), '6th', '6th'); + test.equal(moment([2011, 0, 7]).format('DDDo'), '7th', '7th'); + test.equal(moment([2011, 0, 8]).format('DDDo'), '8th', '8th'); + test.equal(moment([2011, 0, 9]).format('DDDo'), '9th', '9th'); + test.equal(moment([2011, 0, 10]).format('DDDo'), '10th', '10th'); + + test.equal(moment([2011, 0, 11]).format('DDDo'), '11th', '11th'); + test.equal(moment([2011, 0, 12]).format('DDDo'), '12th', '12th'); + test.equal(moment([2011, 0, 13]).format('DDDo'), '13th', '13th'); + test.equal(moment([2011, 0, 14]).format('DDDo'), '14th', '14th'); + test.equal(moment([2011, 0, 15]).format('DDDo'), '15th', '15th'); + test.equal(moment([2011, 0, 16]).format('DDDo'), '16th', '16th'); + test.equal(moment([2011, 0, 17]).format('DDDo'), '17th', '17th'); + test.equal(moment([2011, 0, 18]).format('DDDo'), '18th', '18th'); + test.equal(moment([2011, 0, 19]).format('DDDo'), '19th', '19th'); + test.equal(moment([2011, 0, 20]).format('DDDo'), '20th', '20th'); + + test.equal(moment([2011, 0, 21]).format('DDDo'), '21st', '21st'); + test.equal(moment([2011, 0, 22]).format('DDDo'), '22nd', '22nd'); + test.equal(moment([2011, 0, 23]).format('DDDo'), '23rd', '23rd'); + test.equal(moment([2011, 0, 24]).format('DDDo'), '24th', '24th'); + test.equal(moment([2011, 0, 25]).format('DDDo'), '25th', '25th'); + test.equal(moment([2011, 0, 26]).format('DDDo'), '26th', '26th'); + test.equal(moment([2011, 0, 27]).format('DDDo'), '27th', '27th'); + test.equal(moment([2011, 0, 28]).format('DDDo'), '28th', '28th'); + test.equal(moment([2011, 0, 29]).format('DDDo'), '29th', '29th'); + test.equal(moment([2011, 0, 30]).format('DDDo'), '30th', '30th'); + + test.equal(moment([2011, 0, 31]).format('DDDo'), '31st', '31st'); + test.done(); + }, + + "format month" : function(test) { + test.expect(12); + moment.lang('en'); + var expected = 'January Jan_February Feb_March Mar_April Apr_May May_June Jun_July Jul_August Aug_September Sep_October Oct_November Nov_December Dec'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]); + } + test.done(); + }, + + "format week" : function(test) { + test.expect(7); + moment.lang('en'); + var expected = 'Sunday Sun Su_Monday Mon Mo_Tuesday Tue Tu_Wednesday Wed We_Thursday Thu Th_Friday Fri Fr_Saturday Sat Sa'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]); + } + test.done(); + }, + + "from" : function(test) { + test.expect(30); + moment.lang('en'); + var start = moment([2007, 1, 28]); + test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "a few seconds", "44 seconds = a few seconds"); + test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "a minute", "45 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "a minute", "89 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minutes", "90 seconds = 2 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minutes", "44 minutes = 44 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "an hour", "45 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "an hour", "89 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 hours", "90 minutes = 2 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 hours", "5 hours = 5 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 hours", "21 hours = 21 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "a day", "22 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "a day", "35 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 days", "36 hours = 2 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "a day", "1 day = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 days", "5 days = 5 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 days", "25 days = 25 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "a month", "26 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "a month", "30 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "a month", "45 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 months", "46 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 months", "75 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 months", "76 days = 3 months"); + test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "a month", "1 month = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 months", "5 months = 5 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 months", "344 days = 11 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "a year", "345 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "a year", "547 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 years", "548 days = 2 years"); + test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "a year", "1 year = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 years", "5 years = 5 years"); + test.done(); + }, + + "suffix" : function(test) { + test.expect(2); + moment.lang('en'); + test.equal(moment(30000).from(0), "in a few seconds", "prefix"); + test.equal(moment(0).from(30000), "a few seconds ago", "suffix"); + test.done(); + }, + + "now from now" : function(test) { + test.expect(1); + moment.lang('en'); + test.equal(moment().fromNow(), "a few seconds ago", "now from now should display as in the past"); + test.done(); + }, + + "fromNow" : function(test) { + test.expect(2); + moment.lang('en'); + test.equal(moment().add({s:30}).fromNow(), "in a few seconds", "in a few seconds"); + test.equal(moment().add({d:5}).fromNow(), "in 5 days", "in 5 days"); + test.done(); + }, + + "calendar day" : function(test) { + test.expect(6); + moment.lang('en'); + + var a = moment().hours(2).minutes(0).seconds(0); + + test.equal(moment(a).calendar(), "Today at 2:00 AM", "today at the same time"); + test.equal(moment(a).add({ m: 25 }).calendar(), "Today at 2:25 AM", "Now plus 25 min"); + test.equal(moment(a).add({ h: 1 }).calendar(), "Today at 3:00 AM", "Now plus 1 hour"); + test.equal(moment(a).add({ d: 1 }).calendar(), "Tomorrow at 2:00 AM", "tomorrow at the same time"); + test.equal(moment(a).subtract({ h: 1 }).calendar(), "Today at 1:00 AM", "Now minus 1 hour"); + test.equal(moment(a).subtract({ d: 1 }).calendar(), "Yesterday at 2:00 AM", "yesterday at the same time"); + test.done(); + }, + + "calendar next week" : function(test) { + test.expect(15); + moment.lang('en'); + + var i; + var m; + + for (i = 2; i < 7; i++) { + m = moment().add({ d: i }); + test.equal(m.calendar(), m.format('dddd [at] LT'), "Today + " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('dddd [at] LT'), "Today + " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('dddd [at] LT'), "Today + " + i + " days end of day"); + } + test.done(); + }, + + "calendar last week" : function(test) { + test.expect(15); + moment.lang('en'); + + for (i = 2; i < 7; i++) { + m = moment().subtract({ d: i }); + test.equal(m.calendar(), m.format('[last] dddd [at] LT'), "Today - " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('[last] dddd [at] LT'), "Today - " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('[last] dddd [at] LT'), "Today - " + i + " days end of day"); + } + test.done(); + }, + + "calendar all else" : function(test) { + test.expect(4); + moment.lang('en'); + var weeksAgo = moment().subtract({ w: 1 }); + var weeksFromNow = moment().add({ w: 1 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week"); + + weeksAgo = moment().subtract({ w: 2 }); + weeksFromNow = moment().add({ w: 2 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks"); + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/lang/es.js b/node_modules/emailjs/node_modules/moment/test/lang/es.js new file mode 100644 index 0000000..53095f5 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/lang/es.js @@ -0,0 +1,218 @@ +var moment = require("../../moment"); + + + /************************************************** + Spanish + *************************************************/ + +exports["lang:es"] = { + "parse" : function(test) { + test.expect(96); + moment.lang('es'); + var tests = 'Enero Ene._Febrero Feb._Marzo Mar._Abril Abr._Mayo May._Junio Jun._Julio Jul._Agosto Ago._Septiembre Sep._Octubre Oct._Noviembre Nov._Diciembre Dic.'.split("_"); + var i; + function equalTest(input, mmm, i) { + test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1)); + } + for (i = 0; i < 12; i++) { + tests[i] = tests[i].split(' '); + equalTest(tests[i][0], 'MMM', i); + equalTest(tests[i][1], 'MMM', i); + equalTest(tests[i][0], 'MMMM', i); + equalTest(tests[i][1], 'MMMM', i); + equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i); + } + test.done(); + }, + + "format ordinal" : function(test) { + test.expect(31); + moment.lang('es'); + test.equal(moment([2011, 0, 1]).format('DDDo'), '1º', '1º'); + test.equal(moment([2011, 0, 2]).format('DDDo'), '2º', '2º'); + test.equal(moment([2011, 0, 3]).format('DDDo'), '3º', '3º'); + test.equal(moment([2011, 0, 4]).format('DDDo'), '4º', '4º'); + test.equal(moment([2011, 0, 5]).format('DDDo'), '5º', '5º'); + test.equal(moment([2011, 0, 6]).format('DDDo'), '6º', '6º'); + test.equal(moment([2011, 0, 7]).format('DDDo'), '7º', '7º'); + test.equal(moment([2011, 0, 8]).format('DDDo'), '8º', '8º'); + test.equal(moment([2011, 0, 9]).format('DDDo'), '9º', '9º'); + test.equal(moment([2011, 0, 10]).format('DDDo'), '10º', '10º'); + + test.equal(moment([2011, 0, 11]).format('DDDo'), '11º', '11º'); + test.equal(moment([2011, 0, 12]).format('DDDo'), '12º', '12º'); + test.equal(moment([2011, 0, 13]).format('DDDo'), '13º', '13º'); + test.equal(moment([2011, 0, 14]).format('DDDo'), '14º', '14º'); + test.equal(moment([2011, 0, 15]).format('DDDo'), '15º', '15º'); + test.equal(moment([2011, 0, 16]).format('DDDo'), '16º', '16º'); + test.equal(moment([2011, 0, 17]).format('DDDo'), '17º', '17º'); + test.equal(moment([2011, 0, 18]).format('DDDo'), '18º', '18º'); + test.equal(moment([2011, 0, 19]).format('DDDo'), '19º', '19º'); + test.equal(moment([2011, 0, 20]).format('DDDo'), '20º', '20º'); + + test.equal(moment([2011, 0, 21]).format('DDDo'), '21º', '21º'); + test.equal(moment([2011, 0, 22]).format('DDDo'), '22º', '22º'); + test.equal(moment([2011, 0, 23]).format('DDDo'), '23º', '23º'); + test.equal(moment([2011, 0, 24]).format('DDDo'), '24º', '24º'); + test.equal(moment([2011, 0, 25]).format('DDDo'), '25º', '25º'); + test.equal(moment([2011, 0, 26]).format('DDDo'), '26º', '26º'); + test.equal(moment([2011, 0, 27]).format('DDDo'), '27º', '27º'); + test.equal(moment([2011, 0, 28]).format('DDDo'), '28º', '28º'); + test.equal(moment([2011, 0, 29]).format('DDDo'), '29º', '29º'); + test.equal(moment([2011, 0, 30]).format('DDDo'), '30º', '30º'); + + test.equal(moment([2011, 0, 31]).format('DDDo'), '31º', '31º'); + test.done(); + }, + + "format month" : function(test) { + test.expect(12); + moment.lang('es'); + var expected = 'Enero Ene._Febrero Feb._Marzo Mar._Abril Abr._Mayo May._Junio Jun._Julio Jul._Agosto Ago._Septiembre Sep._Octubre Oct._Noviembre Nov._Diciembre Dic.'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]); + } + test.done(); + }, + + "format week" : function(test) { + test.expect(7); + moment.lang('es'); + var expected = 'Domingo Dom. Do_Lunes Lun. Lu_Martes Mar. Ma_Miércoles Mié. Mi_Jueves Jue. Ju_Viernes Vie. Vi_Sábado Sáb. Sá'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]); + } + test.done(); + }, + + "from" : function(test) { + test.expect(30); + moment.lang('es'); + var start = moment([2007, 1, 28]); + test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "unos segundos", "44 seconds = a few seconds"); + test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "un minuto", "45 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "un minuto", "89 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minutos", "90 seconds = 2 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minutos", "44 minutes = 44 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "una hora", "45 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "una hora", "89 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 horas", "90 minutes = 2 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 horas", "5 hours = 5 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 horas", "21 hours = 21 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "un día", "22 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "un día", "35 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 días", "36 hours = 2 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "un día", "1 day = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 días", "5 days = 5 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 días", "25 days = 25 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "un mes", "26 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "un mes", "30 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "un mes", "45 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 meses", "46 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 meses", "75 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 meses", "76 days = 3 months"); + test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "un mes", "1 month = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 meses", "5 months = 5 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 meses", "344 days = 11 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "un año", "345 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "un año", "547 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 años", "548 days = 2 years"); + test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "un año", "1 year = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 años", "5 years = 5 years"); + test.done(); + }, + + "suffix" : function(test) { + test.expect(2); + moment.lang('es'); + test.equal(moment(30000).from(0), "en unos segundos", "prefix"); + test.equal(moment(0).from(30000), "hace unos segundos", "suffix"); + test.done(); + }, + + "now from now" : function(test) { + test.expect(1); + moment.lang('es'); + test.equal(moment().fromNow(), "hace unos segundos", "now from now should display as in the past"); + test.done(); + }, + + "fromNow" : function(test) { + test.expect(2); + moment.lang('es'); + test.equal(moment().add({s:30}).fromNow(), "en unos segundos", "en unos segundos"); + test.equal(moment().add({d:5}).fromNow(), "en 5 días", "en 5 días"); + test.done(); + }, + + "calendar day" : function(test) { + test.expect(7); + moment.lang('es'); + + var a = moment().hours(2).minutes(0).seconds(0); + + test.equal(moment(a).calendar(), "hoy a las 2:00", "today at the same time"); + test.equal(moment(a).add({ m: 25 }).calendar(), "hoy a las 2:25", "Now plus 25 min"); + test.equal(moment(a).add({ h: 1 }).calendar(), "hoy a las 3:00", "Now plus 1 hour"); + test.equal(moment(a).add({ d: 1 }).calendar(), "mañana a las 2:00", "tomorrow at the same time"); + test.equal(moment(a).add({ d: 1, h : -1 }).calendar(), "mañana a la 1:00", "tomorrow minus 1 hour"); + test.equal(moment(a).subtract({ h: 1 }).calendar(), "hoy a la 1:00", "Now minus 1 hour"); + test.equal(moment(a).subtract({ d: 1 }).calendar(), "ayer a las 2:00", "yesterday at the same time"); + test.done(); + }, + + "calendar next week" : function(test) { + test.expect(15); + moment.lang('es'); + + var i; + var m; + + for (i = 2; i < 7; i++) { + m = moment().add({ d: i }); + test.equal(m.calendar(), m.format('dddd [a la' + ((m.hours() !== 1) ? 's' : '') + '] LT'), "Today + " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('dddd [a la' + ((m.hours() !== 1) ? 's' : '') + '] LT'), "Today + " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('dddd [a la' + ((m.hours() !== 1) ? 's' : '') + '] LT'), "Today + " + i + " days end of day"); + } + test.done(); + }, + + "calendar last week" : function(test) { + test.expect(15); + moment.lang('es'); + + for (i = 2; i < 7; i++) { + m = moment().subtract({ d: i }); + test.equal(m.calendar(), m.format('[el] dddd [pasado a la' + ((m.hours() !== 1) ? 's' : '') + '] LT'), "Today - " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('[el] dddd [pasado a la' + ((m.hours() !== 1) ? 's' : '') + '] LT'), "Today - " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('[el] dddd [pasado a la' + ((m.hours() !== 1) ? 's' : '') + '] LT'), "Today - " + i + " days end of day"); + } + test.done(); + }, + + "calendar all else" : function(test) { + test.expect(4); + moment.lang('es'); + var weeksAgo = moment().subtract({ w: 1 }); + var weeksFromNow = moment().add({ w: 1 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week"); + + weeksAgo = moment().subtract({ w: 2 }); + weeksFromNow = moment().add({ w: 2 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks"); + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/lang/eu.js b/node_modules/emailjs/node_modules/moment/test/lang/eu.js new file mode 100644 index 0000000..b701e46 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/lang/eu.js @@ -0,0 +1,248 @@ +var moment = require("../../moment"); + + + /************************************************** + Euskara + *************************************************/ + +exports["lang:eu"] = { + "parse" : function(test) { + test.expect(96); + moment.lang('eu'); + var tests = 'urtarrila urt._otsaila ots._martxoa mar._apirila api._maiatza mai._ekaina eka._uztaila uzt._abuztua abu._iraila ira._urria urr._azaroa aza._abendua abe.'.split("_"); + var i; + function equalTest(input, mmm, i) { + test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1)); + } + for (i = 0; i < 12; i++) { + tests[i] = tests[i].split(' '); + equalTest(tests[i][0], 'MMM', i); + equalTest(tests[i][1], 'MMM', i); + equalTest(tests[i][0], 'MMMM', i); + equalTest(tests[i][1], 'MMMM', i); + equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i); + } + test.done(); + }, + + "format" : function(test) { + test.expect(18); + moment.lang('eu'); + var a = [ + ['dddd, MMMM Do YYYY, h:mm:ss a', 'igandea, otsaila 14. 2010, 3:25:50 pm'], + ['ddd, hA', 'ig., 3PM'], + ['M Mo MM MMMM MMM', '2 2. 02 otsaila ots.'], + ['YYYY YY', '2010 10'], + ['D Do DD', '14 14. 14'], + ['d do dddd ddd dd', '0 0. igandea ig. ig'], + ['DDD DDDo DDDD', '45 45. 045'], + ['w wo ww', '8 8. 08'], + ['h hh', '3 03'], + ['H HH', '15 15'], + ['m mm', '25 25'], + ['s ss', '50 50'], + ['a A', 'pm PM'], + ['t\\he DDDo \\d\\ay of t\\he ye\\ar', 'the 45. day of the year'], + ['L', '2010-02-14'], + ['LL', '2010ko otsailaren 14a'], + ['LLL', '2010ko otsailaren 14a 15:25'], + ['LLLL', 'igandea, 2010ko otsailaren 14a 15:25'] + ], + b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)), + i; + for (i = 0; i < a.length; i++) { + test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]); + } + test.done(); + }, + + "format ordinal" : function(test) { + test.expect(31); + moment.lang('eu'); + test.equal(moment([2011, 0, 1]).format('DDDo'), '1.', '1.'); + test.equal(moment([2011, 0, 2]).format('DDDo'), '2.', '2.'); + test.equal(moment([2011, 0, 3]).format('DDDo'), '3.', '3.'); + test.equal(moment([2011, 0, 4]).format('DDDo'), '4.', '4.'); + test.equal(moment([2011, 0, 5]).format('DDDo'), '5.', '5.'); + test.equal(moment([2011, 0, 6]).format('DDDo'), '6.', '6.'); + test.equal(moment([2011, 0, 7]).format('DDDo'), '7.', '7.'); + test.equal(moment([2011, 0, 8]).format('DDDo'), '8.', '8.'); + test.equal(moment([2011, 0, 9]).format('DDDo'), '9.', '9.'); + test.equal(moment([2011, 0, 10]).format('DDDo'), '10.', '10.'); + + test.equal(moment([2011, 0, 11]).format('DDDo'), '11.', '11.'); + test.equal(moment([2011, 0, 12]).format('DDDo'), '12.', '12.'); + test.equal(moment([2011, 0, 13]).format('DDDo'), '13.', '13.'); + test.equal(moment([2011, 0, 14]).format('DDDo'), '14.', '14.'); + test.equal(moment([2011, 0, 15]).format('DDDo'), '15.', '15.'); + test.equal(moment([2011, 0, 16]).format('DDDo'), '16.', '16.'); + test.equal(moment([2011, 0, 17]).format('DDDo'), '17.', '17.'); + test.equal(moment([2011, 0, 18]).format('DDDo'), '18.', '18.'); + test.equal(moment([2011, 0, 19]).format('DDDo'), '19.', '19.'); + test.equal(moment([2011, 0, 20]).format('DDDo'), '20.', '20.'); + + test.equal(moment([2011, 0, 21]).format('DDDo'), '21.', '21.'); + test.equal(moment([2011, 0, 22]).format('DDDo'), '22.', '22.'); + test.equal(moment([2011, 0, 23]).format('DDDo'), '23.', '23.'); + test.equal(moment([2011, 0, 24]).format('DDDo'), '24.', '24.'); + test.equal(moment([2011, 0, 25]).format('DDDo'), '25.', '25.'); + test.equal(moment([2011, 0, 26]).format('DDDo'), '26.', '26.'); + test.equal(moment([2011, 0, 27]).format('DDDo'), '27.', '27.'); + test.equal(moment([2011, 0, 28]).format('DDDo'), '28.', '28.'); + test.equal(moment([2011, 0, 29]).format('DDDo'), '29.', '29.'); + test.equal(moment([2011, 0, 30]).format('DDDo'), '30.', '30.'); + + test.equal(moment([2011, 0, 31]).format('DDDo'), '31.', '31.'); + test.done(); + }, + + "format month" : function(test) { + test.expect(12); + moment.lang('eu'); + var expected = 'urtarrila urt._otsaila ots._martxoa mar._apirila api._maiatza mai._ekaina eka._uztaila uzt._abuztua abu._iraila ira._urria urr._azaroa aza._abendua abe.'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]); + } + test.done(); + }, + + "format week" : function(test) { + test.expect(7); + moment.lang('eu'); + var expected = 'igandea ig. ig_astelehena al. al_asteartea ar. ar_asteazkena az. az_osteguna og. og_ostirala ol. ol_larunbata lr. lr'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]); + } + test.done(); + }, + + "from" : function(test) { + test.expect(30); + moment.lang('eu'); + var start = moment([2007, 1, 28]); + test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "segundo batzuk", "44 seconds = a few seconds"); + test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "minutu bat", "45 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "minutu bat", "89 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minutu", "90 seconds = 2 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minutu", "44 minutes = 44 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "ordu bat", "45 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "ordu bat", "89 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 ordu", "90 minutes = 2 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 ordu", "5 hours = 5 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 ordu", "21 hours = 21 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "egun bat", "22 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "egun bat", "35 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 egun", "36 hours = 2 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "egun bat", "1 day = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 egun", "5 days = 5 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 egun", "25 days = 25 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "hilabete bat", "26 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "hilabete bat", "30 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "hilabete bat", "45 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 hilabete", "46 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 hilabete", "75 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 hilabete", "76 days = 3 months"); + test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "hilabete bat", "1 month = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 hilabete", "5 months = 5 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 hilabete", "344 days = 11 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "urte bat", "345 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "urte bat", "547 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 urte", "548 days = 2 years"); + test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "urte bat", "1 year = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 urte", "5 years = 5 years"); + test.done(); + }, + + "suffix" : function(test) { + test.expect(2); + moment.lang('eu'); + test.equal(moment(30000).from(0), "segundo batzuk barru", "prefix"); + test.equal(moment(0).from(30000), "duela segundo batzuk", "suffix"); + test.done(); + }, + + "now from now" : function(test) { + test.expect(1); + moment.lang('eu'); + test.equal(moment().fromNow(), "duela segundo batzuk", "now from now should display as in the past"); + test.done(); + }, + + "fromNow" : function(test) { + test.expect(2); + moment.lang('eu'); + test.equal(moment().add({s:30}).fromNow(), "segundo batzuk barru", "in seconds"); + test.equal(moment().add({d:5}).fromNow(), "5 egun barru", "in 5 days"); + test.done(); + }, + + "calendar day" : function(test) { + test.expect(6); + moment.lang('eu'); + + var a = moment().hours(2).minutes(0).seconds(0); + + test.equal(moment(a).calendar(), "gaur 02:00etan", "today at the same time"); + test.equal(moment(a).add({ m: 25 }).calendar(), "gaur 02:25etan", "now plus 25 min"); + test.equal(moment(a).add({ h: 1 }).calendar(), "gaur 03:00etan", "now plus 1 hour"); + test.equal(moment(a).add({ d: 1 }).calendar(), "bihar 02:00etan", "tomorrow at the same time"); + test.equal(moment(a).subtract({ h: 1 }).calendar(), "gaur 01:00etan", "now minus 1 hour"); + test.equal(moment(a).subtract({ d: 1 }).calendar(), "atzo 02:00etan", "yesterday at the same time"); + test.done(); + }, + + "calendar next week" : function(test) { + test.expect(15); + moment.lang('eu'); + + var i; + var m; + + for (i = 2; i < 7; i++) { + m = moment().add({ d: i }); + test.equal(m.calendar(), m.format('dddd LT[etan]'), "Today + " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('dddd LT[etan]'), "Today + " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('dddd LT[etan]'), "Today + " + i + " days end of day"); + } + test.done(); + }, + + "calendar last week" : function(test) { + test.expect(15); + moment.lang('eu'); + + for (i = 2; i < 7; i++) { + m = moment().subtract({ d: i }); + test.equal(m.calendar(), m.format('[aurreko] dddd LT[etan]'), "Today - " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('[aurreko] dddd LT[etan]'), "Today - " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('[aurreko] dddd LT[etan]'), "Today - " + i + " days end of day"); + } + test.done(); + }, + + "calendar all else" : function(test) { + test.expect(4); + moment.lang('eu'); + var weeksAgo = moment().subtract({ w: 1 }); + var weeksFromNow = moment().add({ w: 1 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week"); + + weeksAgo = moment().subtract({ w: 2 }); + weeksFromNow = moment().add({ w: 2 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks"); + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/lang/fi.js b/node_modules/emailjs/node_modules/moment/test/lang/fi.js new file mode 100644 index 0000000..6c83ff4 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/lang/fi.js @@ -0,0 +1,248 @@ +var moment = require("../../moment"); + + + /************************************************** + Finnish + *************************************************/ + +exports["lang:fi"] = { + "parse" : function(test) { + test.expect(96); + moment.lang('fi'); + var tests = 'tammikuu tam_helmikuu hel_maaliskuu maa_huhtikuu huh_toukokuu tou_kesäkuu kes_heinäkuu hei_elokuu elo_syyskuu syys_lokakuu lok_marraskuu mar_joulukuu jou'.split("_"); + var i; + function equalTest(input, mmm, i) { + test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1)); + } + for (i = 0; i < 12; i++) { + tests[i] = tests[i].split(' '); + equalTest(tests[i][0], 'MMM', i); + equalTest(tests[i][1], 'MMM', i); + equalTest(tests[i][0], 'MMMM', i); + equalTest(tests[i][1], 'MMMM', i); + equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i); + } + test.done(); + }, + + "format" : function(test) { + test.expect(18); + moment.lang('fi'); + var a = [ + ['dddd, MMMM Do YYYY, h:mm:ss a', 'sunnuntai, helmikuu 14. 2010, 3:25:50 pm'], + ['ddd, hA', 'su, 3PM'], + ['M Mo MM MMMM MMM', '2 2. 02 helmikuu hel'], + ['YYYY YY', '2010 10'], + ['D Do DD', '14 14. 14'], + ['d do dddd ddd dd', '0 0. sunnuntai su su'], + ['DDD DDDo DDDD', '45 45. 045'], + ['w wo ww', '8 8. 08'], + ['h hh', '3 03'], + ['H HH', '15 15'], + ['m mm', '25 25'], + ['s ss', '50 50'], + ['a A', 'pm PM'], + ['vuo\\den DDDo päivä', 'vuoden 45. päivä'], + ['L', '14.02.2010'], + ['LL', '14. helmikuuta 2010'], + ['LLL', '14. helmikuuta 2010, klo 15.25'], + ['LLLL', 'sunnuntai, 14. helmikuuta 2010, klo 15.25'] + ], + b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)), + i; + for (i = 0; i < a.length; i++) { + test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]); + } + test.done(); + }, + + "format ordinal" : function(test) { + test.expect(31); + moment.lang('fi'); + test.equal(moment([2011, 0, 1]).format('DDDo'), '1.', '1st'); + test.equal(moment([2011, 0, 2]).format('DDDo'), '2.', '2nd'); + test.equal(moment([2011, 0, 3]).format('DDDo'), '3.', '3rd'); + test.equal(moment([2011, 0, 4]).format('DDDo'), '4.', '4th'); + test.equal(moment([2011, 0, 5]).format('DDDo'), '5.', '5th'); + test.equal(moment([2011, 0, 6]).format('DDDo'), '6.', '6th'); + test.equal(moment([2011, 0, 7]).format('DDDo'), '7.', '7th'); + test.equal(moment([2011, 0, 8]).format('DDDo'), '8.', '8th'); + test.equal(moment([2011, 0, 9]).format('DDDo'), '9.', '9th'); + test.equal(moment([2011, 0, 10]).format('DDDo'), '10.', '10th'); + + test.equal(moment([2011, 0, 11]).format('DDDo'), '11.', '11th'); + test.equal(moment([2011, 0, 12]).format('DDDo'), '12.', '12th'); + test.equal(moment([2011, 0, 13]).format('DDDo'), '13.', '13th'); + test.equal(moment([2011, 0, 14]).format('DDDo'), '14.', '14th'); + test.equal(moment([2011, 0, 15]).format('DDDo'), '15.', '15th'); + test.equal(moment([2011, 0, 16]).format('DDDo'), '16.', '16th'); + test.equal(moment([2011, 0, 17]).format('DDDo'), '17.', '17th'); + test.equal(moment([2011, 0, 18]).format('DDDo'), '18.', '18th'); + test.equal(moment([2011, 0, 19]).format('DDDo'), '19.', '19th'); + test.equal(moment([2011, 0, 20]).format('DDDo'), '20.', '20th'); + + test.equal(moment([2011, 0, 21]).format('DDDo'), '21.', '21st'); + test.equal(moment([2011, 0, 22]).format('DDDo'), '22.', '22nd'); + test.equal(moment([2011, 0, 23]).format('DDDo'), '23.', '23rd'); + test.equal(moment([2011, 0, 24]).format('DDDo'), '24.', '24th'); + test.equal(moment([2011, 0, 25]).format('DDDo'), '25.', '25th'); + test.equal(moment([2011, 0, 26]).format('DDDo'), '26.', '26th'); + test.equal(moment([2011, 0, 27]).format('DDDo'), '27.', '27th'); + test.equal(moment([2011, 0, 28]).format('DDDo'), '28.', '28th'); + test.equal(moment([2011, 0, 29]).format('DDDo'), '29.', '29th'); + test.equal(moment([2011, 0, 30]).format('DDDo'), '30.', '30th'); + + test.equal(moment([2011, 0, 31]).format('DDDo'), '31.', '31st'); + test.done(); + }, + + "format month" : function(test) { + test.expect(12); + moment.lang('fi'); + var expected = 'tammikuu tam_helmikuu hel_maaliskuu maa_huhtikuu huh_toukokuu tou_kesäkuu kes_heinäkuu hei_elokuu elo_syyskuu syy_lokakuu lok_marraskuu mar_joulukuu jou'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]); + } + test.done(); + }, + + "format week" : function(test) { + test.expect(7); + moment.lang('fi'); + var expected = 'sunnuntai su su_maanantai ma ma_tiistai ti ti_keskiviikko ke ke_torstai to to_perjantai pe pe_lauantai la la'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]); + } + test.done(); + }, + + "from" : function(test) { + test.expect(30); + moment.lang('fi'); + var start = moment([2007, 1, 28]); + test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "muutama sekunti", "44 seconds = few seconds"); + test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "minuutti", "45 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "minuutti", "89 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "kaksi minuuttia", "90 seconds = 2 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minuuttia", "44 minutes = 44 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "tunti", "45 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "tunti", "89 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "kaksi tuntia", "90 minutes = 2 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "viisi tuntia", "5 hours = 5 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 tuntia", "21 hours = 21 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "päivä", "22 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "päivä", "35 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "kaksi päivää", "36 hours = 2 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "päivä", "1 day = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "viisi päivää", "5 days = 5 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 päivää", "25 days = 25 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "kuukausi", "26 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "kuukausi", "30 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "kuukausi", "45 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "kaksi kuukautta", "46 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "kaksi kuukautta", "75 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "kolme kuukautta", "76 days = 3 months"); + test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "kuukausi", "1 month = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "viisi kuukautta", "5 months = 5 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 kuukautta", "344 days = 11 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "vuosi", "345 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "vuosi", "547 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "kaksi vuotta", "548 days = 2 years"); + test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "vuosi", "1 year = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "viisi vuotta", "5 years = 5 years"); + test.done(); + }, + + "suffix" : function(test) { + test.expect(2); + moment.lang('fi'); + test.equal(moment(30000).from(0), "muutaman sekunnin päästä", "prefix"); + test.equal(moment(0).from(30000), "muutama sekunti sitten", "suffix"); + test.done(); + }, + + "now from now" : function(test) { + test.expect(1); + moment.lang('fi'); + test.equal(moment().fromNow(), "muutama sekunti sitten", "now from now should display as in the past"); + test.done(); + }, + + "fromNow" : function(test) { + test.expect(2); + moment.lang('fi'); + test.equal(moment().add({s:30}).fromNow(), "muutaman sekunnin päästä", "in a few seconds"); + test.equal(moment().add({d:5}).fromNow(), "viiden päivän päästä", "in 5 days"); + test.done(); + }, + + "calendar day" : function(test) { + test.expect(6); + moment.lang('fi'); + + var a = moment().hours(2).minutes(0).seconds(0); + + test.equal(moment(a).calendar(), "tänään klo 02.00", "today at the same time"); + test.equal(moment(a).add({ m: 25 }).calendar(), "tänään klo 02.25", "Now plus 25 min"); + test.equal(moment(a).add({ h: 1 }).calendar(), "tänään klo 03.00", "Now plus 1 hour"); + test.equal(moment(a).add({ d: 1 }).calendar(), "huomenna klo 02.00", "tomorrow at the same time"); + test.equal(moment(a).subtract({ h: 1 }).calendar(), "tänään klo 01.00", "Now minus 1 hour"); + test.equal(moment(a).subtract({ d: 1 }).calendar(), "eilen klo 02.00", "yesterday at the same time"); + test.done(); + }, + + "calendar next week" : function(test) { + test.expect(15); + moment.lang('fi'); + + var i; + var m; + + for (i = 2; i < 7; i++) { + m = moment().add({ d: i }); + test.equal(m.calendar(), m.format('dddd [klo] LT'), "today + " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('dddd [klo] LT'), "today + " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('dddd [klo] LT'), "today + " + i + " days end of day"); + } + test.done(); + }, + + "calendar last week" : function(test) { + test.expect(15); + moment.lang('fi'); + + for (var i = 2; i < 7; i++) { + var m = moment().subtract({ d: i }); + test.equal(m.calendar(), m.format('[viime] dddd[na] [klo] LT'), "today - " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('[viime] dddd[na] [klo] LT'), "today - " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('[viime] dddd[na] [klo] LT'), "today - " + i + " days end of day"); + } + test.done(); + }, + + "calendar all else" : function(test) { + test.expect(4); + moment.lang('fi'); + var weeksAgo = moment().subtract({ w: 1 }); + var weeksFromNow = moment().add({ w: 1 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "yksi viikko sitten"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "yhden viikon päästä"); + + weeksAgo = moment().subtract({ w: 2 }); + weeksFromNow = moment().add({ w: 2 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "kaksi viikkoa sitten"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "kaden viikon päästä"); + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/lang/fr-ca.js b/node_modules/emailjs/node_modules/moment/test/lang/fr-ca.js new file mode 100644 index 0000000..83c165b --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/lang/fr-ca.js @@ -0,0 +1,241 @@ +var moment = require("../../moment"); + + + /************************************************** + French + *************************************************/ + +exports["lang:fr-ca"] = { + "parse" : function(test) { + test.expect(96); + moment.lang('fr-ca'); + var tests = 'janvier janv._février févr._mars mars_avril avr._mai mai_juin juin_juillet juil._août août_septembre sept._octobre oct._novembre nov._décembre déc.'.split("_"); + var i; + function equalTest(input, mmm, i) { + test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1)); + } + for (i = 0; i < 12; i++) { + tests[i] = tests[i].split(' '); + equalTest(tests[i][0], 'MMM', i); + equalTest(tests[i][1], 'MMM', i); + equalTest(tests[i][0], 'MMMM', i); + equalTest(tests[i][1], 'MMMM', i); + equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i); + } + test.done(); + }, + + "format" : function(test) { + test.expect(18); + moment.lang('fr-ca'); + var a = [ + ['dddd, MMMM Do YYYY, h:mm:ss a', 'dimanche, février 14ème 2010, 3:25:50 pm'], + ['ddd, hA', 'dim., 3PM'], + ['M Mo MM MMMM MMM', '2 2ème 02 février févr.'], + ['YYYY YY', '2010 10'], + ['D Do DD', '14 14ème 14'], + ['d do dddd ddd dd', '0 0ème dimanche dim. Di'], + ['DDD DDDo DDDD', '45 45ème 045'], + ['w wo ww', '8 8ème 08'], + ['h hh', '3 03'], + ['H HH', '15 15'], + ['m mm', '25 25'], + ['s ss', '50 50'], + ['a A', 'pm PM'], + ['t\\he DDDo \\d\\ay of t\\he ye\\ar', 'the 45ème day of the year'], + ['L', '2010-02-14'], + ['LL', '14 février 2010'], + ['LLL', '14 février 2010 15:25'], + ['LLLL', 'dimanche 14 février 2010 15:25'] + ], + b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)), + i; + for (i = 0; i < a.length; i++) { + test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]); + } + test.done(); + }, + + "format ordinal" : function(test) { + test.expect(31); + moment.lang('fr'); + test.equal(moment([2011, 0, 1]).format('DDDo'), '1er', '1er'); + test.equal(moment([2011, 0, 2]).format('DDDo'), '2ème', '2ème'); + test.equal(moment([2011, 0, 3]).format('DDDo'), '3ème', '3ème'); + test.equal(moment([2011, 0, 4]).format('DDDo'), '4ème', '4ème'); + test.equal(moment([2011, 0, 5]).format('DDDo'), '5ème', '5ème'); + test.equal(moment([2011, 0, 6]).format('DDDo'), '6ème', '6ème'); + test.equal(moment([2011, 0, 7]).format('DDDo'), '7ème', '7ème'); + test.equal(moment([2011, 0, 8]).format('DDDo'), '8ème', '8ème'); + test.equal(moment([2011, 0, 9]).format('DDDo'), '9ème', '9ème'); + test.equal(moment([2011, 0, 10]).format('DDDo'), '10ème', '10ème'); + + test.equal(moment([2011, 0, 11]).format('DDDo'), '11ème', '11ème'); + test.equal(moment([2011, 0, 12]).format('DDDo'), '12ème', '12ème'); + test.equal(moment([2011, 0, 13]).format('DDDo'), '13ème', '13ème'); + test.equal(moment([2011, 0, 14]).format('DDDo'), '14ème', '14ème'); + test.equal(moment([2011, 0, 15]).format('DDDo'), '15ème', '15ème'); + test.equal(moment([2011, 0, 16]).format('DDDo'), '16ème', '16ème'); + test.equal(moment([2011, 0, 17]).format('DDDo'), '17ème', '17ème'); + test.equal(moment([2011, 0, 18]).format('DDDo'), '18ème', '18ème'); + test.equal(moment([2011, 0, 19]).format('DDDo'), '19ème', '19ème'); + test.equal(moment([2011, 0, 20]).format('DDDo'), '20ème', '20ème'); + + test.equal(moment([2011, 0, 21]).format('DDDo'), '21ème', '21ème'); + test.equal(moment([2011, 0, 22]).format('DDDo'), '22ème', '22ème'); + test.equal(moment([2011, 0, 23]).format('DDDo'), '23ème', '23ème'); + test.equal(moment([2011, 0, 24]).format('DDDo'), '24ème', '24ème'); + test.equal(moment([2011, 0, 25]).format('DDDo'), '25ème', '25ème'); + test.equal(moment([2011, 0, 26]).format('DDDo'), '26ème', '26ème'); + test.equal(moment([2011, 0, 27]).format('DDDo'), '27ème', '27ème'); + test.equal(moment([2011, 0, 28]).format('DDDo'), '28ème', '28ème'); + test.equal(moment([2011, 0, 29]).format('DDDo'), '29ème', '29ème'); + test.equal(moment([2011, 0, 30]).format('DDDo'), '30ème', '30ème'); + + test.equal(moment([2011, 0, 31]).format('DDDo'), '31ème', '31ème'); + test.done(); + }, + + "format month" : function(test) { + test.expect(12); + moment.lang('fr'); + var expected = 'janvier janv._février févr._mars mars_avril avr._mai mai_juin juin_juillet juil._août août_septembre sept._octobre oct._novembre nov._décembre déc.'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]); + } + test.done(); + }, + + "format week" : function(test) { + test.expect(7); + moment.lang('fr'); + var expected = 'dimanche dim. Di_lundi lun. Lu_mardi mar. Ma_mercredi mer. Me_jeudi jeu. Je_vendredi ven. Ve_samedi sam. Sa'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]); + } + test.done(); + }, + + "from" : function(test) { + test.expect(30); + moment.lang('fr'); + var start = moment([2007, 1, 28]); + test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "quelques secondes", "44 seconds = a few seconds"); + test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "une minute", "45 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "une minute", "89 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minutes", "90 seconds = 2 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minutes", "44 minutes = 44 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "une heure", "45 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "une heure", "89 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 heures", "90 minutes = 2 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 heures", "5 hours = 5 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 heures", "21 hours = 21 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "un jour", "22 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "un jour", "35 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 jours", "36 hours = 2 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "un jour", "1 day = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 jours", "5 days = 5 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 jours", "25 days = 25 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "un mois", "26 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "un mois", "30 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "un mois", "45 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 mois", "46 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 mois", "75 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 mois", "76 days = 3 months"); + test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "un mois", "1 month = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 mois", "5 months = 5 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 mois", "344 days = 11 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "une année", "345 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "une année", "547 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 années", "548 days = 2 years"); + test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "une année", "1 year = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 années", "5 years = 5 years"); + test.done(); + }, + + "suffix" : function(test) { + test.expect(2); + moment.lang('fr'); + test.equal(moment(30000).from(0), "dans quelques secondes", "prefix"); + test.equal(moment(0).from(30000), "il y a quelques secondes", "suffix"); + test.done(); + }, + + "fromNow" : function(test) { + test.expect(2); + moment.lang('fr'); + test.equal(moment().add({s:30}).fromNow(), "dans quelques secondes", "in a few seconds"); + test.equal(moment().add({d:5}).fromNow(), "dans 5 jours", "in 5 days"); + test.done(); + }, + + "same day" : function(test) { + test.expect(6); + moment.lang('fr'); + + var a = moment().hours(2).minutes(0).seconds(0); + + test.equal(moment(a).calendar(), "Aujourd'hui à 02:00", "today at the same time"); + test.equal(moment(a).add({ m: 25 }).calendar(), "Aujourd'hui à 02:25", "Now plus 25 min"); + test.equal(moment(a).add({ h: 1 }).calendar(), "Aujourd'hui à 03:00", "Now plus 1 hour"); + test.equal(moment(a).add({ d: 1 }).calendar(), "Demain à 02:00", "tomorrow at the same time"); + test.equal(moment(a).subtract({ h: 1 }).calendar(), "Aujourd'hui à 01:00", "Now minus 1 hour"); + test.equal(moment(a).subtract({ d: 1 }).calendar(), "Hier à 02:00", "yesterday at the same time"); + test.done(); + }, + + "same next week" : function(test) { + test.expect(15); + moment.lang('fr'); + + var i; + var m; + + for (i = 2; i < 7; i++) { + m = moment().add({ d: i }); + test.equal(m.calendar(), m.format('dddd [à] LT'), "Today + " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('dddd [à] LT'), "Today + " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('dddd [à] LT'), "Today + " + i + " days end of day"); + } + test.done(); + }, + + "same last week" : function(test) { + test.expect(15); + moment.lang('fr'); + + for (i = 2; i < 7; i++) { + m = moment().subtract({ d: i }); + test.equal(m.calendar(), m.format('dddd [dernier à] LT'), "Today - " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('dddd [dernier à] LT'), "Today - " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('dddd [dernier à] LT'), "Today - " + i + " days end of day"); + } + test.done(); + }, + + "same all else" : function(test) { + test.expect(4); + moment.lang('fr'); + var weeksAgo = moment().subtract({ w: 1 }); + var weeksFromNow = moment().add({ w: 1 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week"); + + weeksAgo = moment().subtract({ w: 2 }); + weeksFromNow = moment().add({ w: 2 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks"); + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/lang/fr.js b/node_modules/emailjs/node_modules/moment/test/lang/fr.js new file mode 100644 index 0000000..170bdb7 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/lang/fr.js @@ -0,0 +1,241 @@ +var moment = require("../../moment"); + + + /************************************************** + French + *************************************************/ + +exports["lang:fr"] = { + "parse" : function(test) { + test.expect(96); + moment.lang('fr'); + var tests = 'janvier janv._février févr._mars mars_avril avr._mai mai_juin juin_juillet juil._août août_septembre sept._octobre oct._novembre nov._décembre déc.'.split("_"); + var i; + function equalTest(input, mmm, i) { + test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1)); + } + for (i = 0; i < 12; i++) { + tests[i] = tests[i].split(' '); + equalTest(tests[i][0], 'MMM', i); + equalTest(tests[i][1], 'MMM', i); + equalTest(tests[i][0], 'MMMM', i); + equalTest(tests[i][1], 'MMMM', i); + equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i); + } + test.done(); + }, + + "format" : function(test) { + test.expect(18); + moment.lang('fr'); + var a = [ + ['dddd, MMMM Do YYYY, h:mm:ss a', 'dimanche, février 14ème 2010, 3:25:50 pm'], + ['ddd, hA', 'dim., 3PM'], + ['M Mo MM MMMM MMM', '2 2ème 02 février févr.'], + ['YYYY YY', '2010 10'], + ['D Do DD', '14 14ème 14'], + ['d do dddd ddd dd', '0 0ème dimanche dim. Di'], + ['DDD DDDo DDDD', '45 45ème 045'], + ['w wo ww', '8 8ème 08'], + ['h hh', '3 03'], + ['H HH', '15 15'], + ['m mm', '25 25'], + ['s ss', '50 50'], + ['a A', 'pm PM'], + ['t\\he DDDo \\d\\ay of t\\he ye\\ar', 'the 45ème day of the year'], + ['L', '14/02/2010'], + ['LL', '14 février 2010'], + ['LLL', '14 février 2010 15:25'], + ['LLLL', 'dimanche 14 février 2010 15:25'] + ], + b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)), + i; + for (i = 0; i < a.length; i++) { + test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]); + } + test.done(); + }, + + "format ordinal" : function(test) { + test.expect(31); + moment.lang('fr'); + test.equal(moment([2011, 0, 1]).format('DDDo'), '1er', '1er'); + test.equal(moment([2011, 0, 2]).format('DDDo'), '2ème', '2ème'); + test.equal(moment([2011, 0, 3]).format('DDDo'), '3ème', '3ème'); + test.equal(moment([2011, 0, 4]).format('DDDo'), '4ème', '4ème'); + test.equal(moment([2011, 0, 5]).format('DDDo'), '5ème', '5ème'); + test.equal(moment([2011, 0, 6]).format('DDDo'), '6ème', '6ème'); + test.equal(moment([2011, 0, 7]).format('DDDo'), '7ème', '7ème'); + test.equal(moment([2011, 0, 8]).format('DDDo'), '8ème', '8ème'); + test.equal(moment([2011, 0, 9]).format('DDDo'), '9ème', '9ème'); + test.equal(moment([2011, 0, 10]).format('DDDo'), '10ème', '10ème'); + + test.equal(moment([2011, 0, 11]).format('DDDo'), '11ème', '11ème'); + test.equal(moment([2011, 0, 12]).format('DDDo'), '12ème', '12ème'); + test.equal(moment([2011, 0, 13]).format('DDDo'), '13ème', '13ème'); + test.equal(moment([2011, 0, 14]).format('DDDo'), '14ème', '14ème'); + test.equal(moment([2011, 0, 15]).format('DDDo'), '15ème', '15ème'); + test.equal(moment([2011, 0, 16]).format('DDDo'), '16ème', '16ème'); + test.equal(moment([2011, 0, 17]).format('DDDo'), '17ème', '17ème'); + test.equal(moment([2011, 0, 18]).format('DDDo'), '18ème', '18ème'); + test.equal(moment([2011, 0, 19]).format('DDDo'), '19ème', '19ème'); + test.equal(moment([2011, 0, 20]).format('DDDo'), '20ème', '20ème'); + + test.equal(moment([2011, 0, 21]).format('DDDo'), '21ème', '21ème'); + test.equal(moment([2011, 0, 22]).format('DDDo'), '22ème', '22ème'); + test.equal(moment([2011, 0, 23]).format('DDDo'), '23ème', '23ème'); + test.equal(moment([2011, 0, 24]).format('DDDo'), '24ème', '24ème'); + test.equal(moment([2011, 0, 25]).format('DDDo'), '25ème', '25ème'); + test.equal(moment([2011, 0, 26]).format('DDDo'), '26ème', '26ème'); + test.equal(moment([2011, 0, 27]).format('DDDo'), '27ème', '27ème'); + test.equal(moment([2011, 0, 28]).format('DDDo'), '28ème', '28ème'); + test.equal(moment([2011, 0, 29]).format('DDDo'), '29ème', '29ème'); + test.equal(moment([2011, 0, 30]).format('DDDo'), '30ème', '30ème'); + + test.equal(moment([2011, 0, 31]).format('DDDo'), '31ème', '31ème'); + test.done(); + }, + + "format month" : function(test) { + test.expect(12); + moment.lang('fr'); + var expected = 'janvier janv._février févr._mars mars_avril avr._mai mai_juin juin_juillet juil._août août_septembre sept._octobre oct._novembre nov._décembre déc.'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]); + } + test.done(); + }, + + "format week" : function(test) { + test.expect(7); + moment.lang('fr'); + var expected = 'dimanche dim. Di_lundi lun. Lu_mardi mar. Ma_mercredi mer. Me_jeudi jeu. Je_vendredi ven. Ve_samedi sam. Sa'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]); + } + test.done(); + }, + + "from" : function(test) { + test.expect(30); + moment.lang('fr'); + var start = moment([2007, 1, 28]); + test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "quelques secondes", "44 seconds = a few seconds"); + test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "une minute", "45 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "une minute", "89 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minutes", "90 seconds = 2 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minutes", "44 minutes = 44 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "une heure", "45 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "une heure", "89 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 heures", "90 minutes = 2 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 heures", "5 hours = 5 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 heures", "21 hours = 21 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "un jour", "22 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "un jour", "35 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 jours", "36 hours = 2 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "un jour", "1 day = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 jours", "5 days = 5 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 jours", "25 days = 25 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "un mois", "26 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "un mois", "30 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "un mois", "45 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 mois", "46 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 mois", "75 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 mois", "76 days = 3 months"); + test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "un mois", "1 month = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 mois", "5 months = 5 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 mois", "344 days = 11 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "une année", "345 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "une année", "547 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 années", "548 days = 2 years"); + test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "une année", "1 year = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 années", "5 years = 5 years"); + test.done(); + }, + + "suffix" : function(test) { + test.expect(2); + moment.lang('fr'); + test.equal(moment(30000).from(0), "dans quelques secondes", "prefix"); + test.equal(moment(0).from(30000), "il y a quelques secondes", "suffix"); + test.done(); + }, + + "fromNow" : function(test) { + test.expect(2); + moment.lang('fr'); + test.equal(moment().add({s:30}).fromNow(), "dans quelques secondes", "in a few seconds"); + test.equal(moment().add({d:5}).fromNow(), "dans 5 jours", "in 5 days"); + test.done(); + }, + + "same day" : function(test) { + test.expect(6); + moment.lang('fr'); + + var a = moment().hours(2).minutes(0).seconds(0); + + test.equal(moment(a).calendar(), "Aujourd'hui à 02:00", "today at the same time"); + test.equal(moment(a).add({ m: 25 }).calendar(), "Aujourd'hui à 02:25", "Now plus 25 min"); + test.equal(moment(a).add({ h: 1 }).calendar(), "Aujourd'hui à 03:00", "Now plus 1 hour"); + test.equal(moment(a).add({ d: 1 }).calendar(), "Demain à 02:00", "tomorrow at the same time"); + test.equal(moment(a).subtract({ h: 1 }).calendar(), "Aujourd'hui à 01:00", "Now minus 1 hour"); + test.equal(moment(a).subtract({ d: 1 }).calendar(), "Hier à 02:00", "yesterday at the same time"); + test.done(); + }, + + "same next week" : function(test) { + test.expect(15); + moment.lang('fr'); + + var i; + var m; + + for (i = 2; i < 7; i++) { + m = moment().add({ d: i }); + test.equal(m.calendar(), m.format('dddd [à] LT'), "Today + " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('dddd [à] LT'), "Today + " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('dddd [à] LT'), "Today + " + i + " days end of day"); + } + test.done(); + }, + + "same last week" : function(test) { + test.expect(15); + moment.lang('fr'); + + for (i = 2; i < 7; i++) { + m = moment().subtract({ d: i }); + test.equal(m.calendar(), m.format('dddd [dernier à] LT'), "Today - " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('dddd [dernier à] LT'), "Today - " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('dddd [dernier à] LT'), "Today - " + i + " days end of day"); + } + test.done(); + }, + + "same all else" : function(test) { + test.expect(4); + moment.lang('fr'); + var weeksAgo = moment().subtract({ w: 1 }); + var weeksFromNow = moment().add({ w: 1 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week"); + + weeksAgo = moment().subtract({ w: 2 }); + weeksFromNow = moment().add({ w: 2 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks"); + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/lang/gl.js b/node_modules/emailjs/node_modules/moment/test/lang/gl.js new file mode 100644 index 0000000..a4d34b4 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/lang/gl.js @@ -0,0 +1,232 @@ +var moment = require("../../moment"); + + + /************************************************** + Galego + *************************************************/ + +exports["lang:gl"] = { + "parse" : function(test) { + test.expect(96); + moment.lang('gl'); + var tests = "Xaneiro Xan._Febreiro Feb._Marzo Mar._Abril Abr._Maio Mai._Xuño Xuñ._Xullo Xul._Agosto Ago._Setembro Set._Octubro Out._Novembro Nov._Decembro Dec.".split("_"); + + var i; + function equalTest(input, mmm, i) { + test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1)); + } + for (i = 0; i < 12; i++) { + tests[i] = tests[i].split(' '); + equalTest(tests[i][0], 'MMM', i); + equalTest(tests[i][1], 'MMM', i); + equalTest(tests[i][0], 'MMMM', i); + equalTest(tests[i][1], 'MMMM', i); + equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i); + } + test.done(); + }, + + "format ordinal" : function(test) { + test.expect(31); + moment.lang('es'); + test.equal(moment([2011, 0, 1]).format('DDDo'), '1º', '1º'); + test.equal(moment([2011, 0, 2]).format('DDDo'), '2º', '2º'); + test.equal(moment([2011, 0, 3]).format('DDDo'), '3º', '3º'); + test.equal(moment([2011, 0, 4]).format('DDDo'), '4º', '4º'); + test.equal(moment([2011, 0, 5]).format('DDDo'), '5º', '5º'); + test.equal(moment([2011, 0, 6]).format('DDDo'), '6º', '6º'); + test.equal(moment([2011, 0, 7]).format('DDDo'), '7º', '7º'); + test.equal(moment([2011, 0, 8]).format('DDDo'), '8º', '8º'); + test.equal(moment([2011, 0, 9]).format('DDDo'), '9º', '9º'); + test.equal(moment([2011, 0, 10]).format('DDDo'), '10º', '10º'); + + test.equal(moment([2011, 0, 11]).format('DDDo'), '11º', '11º'); + test.equal(moment([2011, 0, 12]).format('DDDo'), '12º', '12º'); + test.equal(moment([2011, 0, 13]).format('DDDo'), '13º', '13º'); + test.equal(moment([2011, 0, 14]).format('DDDo'), '14º', '14º'); + test.equal(moment([2011, 0, 15]).format('DDDo'), '15º', '15º'); + test.equal(moment([2011, 0, 16]).format('DDDo'), '16º', '16º'); + test.equal(moment([2011, 0, 17]).format('DDDo'), '17º', '17º'); + test.equal(moment([2011, 0, 18]).format('DDDo'), '18º', '18º'); + test.equal(moment([2011, 0, 19]).format('DDDo'), '19º', '19º'); + test.equal(moment([2011, 0, 20]).format('DDDo'), '20º', '20º'); + + test.equal(moment([2011, 0, 21]).format('DDDo'), '21º', '21º'); + test.equal(moment([2011, 0, 22]).format('DDDo'), '22º', '22º'); + test.equal(moment([2011, 0, 23]).format('DDDo'), '23º', '23º'); + test.equal(moment([2011, 0, 24]).format('DDDo'), '24º', '24º'); + test.equal(moment([2011, 0, 25]).format('DDDo'), '25º', '25º'); + test.equal(moment([2011, 0, 26]).format('DDDo'), '26º', '26º'); + test.equal(moment([2011, 0, 27]).format('DDDo'), '27º', '27º'); + test.equal(moment([2011, 0, 28]).format('DDDo'), '28º', '28º'); + test.equal(moment([2011, 0, 29]).format('DDDo'), '29º', '29º'); + test.equal(moment([2011, 0, 30]).format('DDDo'), '30º', '30º'); + + test.equal(moment([2011, 0, 31]).format('DDDo'), '31º', '31º'); + test.done(); + }, + + "format month" : function(test) { + test.expect(12); + moment.lang('gl'); + var expected = "Xaneiro Xan._Febreiro Feb._Marzo Mar._Abril Abr._Maio Mai._Xuño Xuñ._Xullo Xul._Agosto Ago._Setembro Set._Octubro Out._Novembro Nov._Decembro Dec.".split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]); + } + test.done(); + }, + + "format week" : function(test) { + test.expect(7); + moment.lang('gl'); + var expected = "Domingo Dom. Do_Luns Lun. Lu_Martes Mar. Ma_Mércores Mér. Mé_Xoves Xov. Xo_Venres Ven. Ve_Sábado Sáb. Sá".split("_"); + + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]); + } + test.done(); + }, + + "from" : function(test) { + test.expect(30); + moment.lang('gl'); + var start = moment([2007, 1, 28]); + + test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "uns segundo", "44 seconds = a few seconds"); + test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "un minuto", "45 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "un minuto", "89 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minutos", "90 seconds = 2 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minutos", "44 minutes = 44 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "unha hora", "45 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "unha hora", "89 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 horas", "90 minutes = 2 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 horas", "5 hours = 5 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 horas", "21 hours = 21 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "un día", "22 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "un día", "35 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 días", "36 hours = 2 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "un día", "1 day = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 días", "5 days = 5 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 días", "25 days = 25 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "un mes", "26 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "un mes", "30 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "un mes", "45 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 meses", "46 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 meses", "75 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 meses", "76 days = 3 months"); + test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "un mes", "1 month = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 meses", "5 months = 5 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 meses", "344 days = 11 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "un ano", "345 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "un ano", "547 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 anos", "548 days = 2 years"); + test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "un ano", "1 year = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 anos", "5 years = 5 years"); + test.done(); + }, + + "suffix" : function(test) { + test.expect(2); + moment.lang('gl'); + test.equal(moment(30000).from(0), "en uns segundo", "prefix"); + test.equal(moment(0).from(30000), "fai uns segundo", "suffix"); + test.done(); + }, + + "now from now" : function(test) { + test.expect(1); + moment.lang('gl'); + test.equal(moment().fromNow(), "fai uns segundo", "now from now should display as in the past"); + test.done(); + }, + + "fromNow" : function(test) { + test.expect(2); + moment.lang('gl'); + test.equal(moment().add({s:30}).fromNow(), "en uns segundo", "en unos segundos"); + test.equal(moment().add({d:5}).fromNow(), "en 5 días", "en 5 días"); + test.done(); + }, + + "calendar day" : function(test) { + test.expect(7); + moment.lang('gl'); + + var a = moment().hours(2).minutes(0).seconds(0); + + test.equal(moment(a).calendar(), "hoxe ás 2:00", "today at the same time"); + test.equal(moment(a).add({ m: 25 }).calendar(), "hoxe ás 2:25", "Now plus 25 min"); + test.equal(moment(a).add({ h: 1 }).calendar(), "hoxe ás 3:00", "Now plus 1 hour"); + test.equal(moment(a).add({ d: 1 }).calendar(), "mañá ás 2:00", "tomorrow at the same time"); + test.equal(moment(a).add({ d: 1, h : -1 }).calendar(), "mañá a 1:00", "tomorrow minus 1 hour"); + test.equal(moment(a).subtract({ h: 1 }).calendar(), "hoxe a 1:00", "Now minus 1 hour"); + test.equal(moment(a).subtract({ d: 1 }).calendar(), "onte á 2:00", "yesterday at the same time"); + test.done(); + }, + + "calendar next week" : function(test) { + test.expect(15); + moment.lang('gl'); + + var i; + var m; + + for (i = 2; i < 7; i++) { + m = moment().add({ d: i }); + test.equal(m.calendar(), m.format('dddd [' + ((m.hours() !== 1) ? 'ás' : 'a') + '] LT'), "Today + " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('dddd [' + ((m.hours() !== 1) ? 'ás' : 'a') + '] LT'), "Today + " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('dddd [' + ((m.hours() !== 1) ? 'ás' : 'a') + '] LT'), "Today + " + i + " days end of day"); + } + test.done(); + }, + + "calendar last week" : function(test) { + test.expect(15); + moment.lang('gl'); + + for (i = 2; i < 7; i++) { + m = moment().subtract({ d: i }); + test.equal(m.calendar(), m.format('[o] dddd [pasado ' + ((m.hours() !== 1) ? 'ás' : 'a') + '] LT'), "Today - " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('[o] dddd [pasado ' + ((m.hours() !== 1) ? 'ás' : 'a') + '] LT'), "Today - " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('[o] dddd [pasado ' + ((m.hours() !== 1) ? 'ás' : 'a') + '] LT'), "Today - " + i + " days end of day"); + } + test.done(); + }, + + "calendar all else" : function(test) { + test.expect(4); + moment.lang('gl'); + var weeksAgo = moment().subtract({ w: 1 }); + var weeksFromNow = moment().add({ w: 1 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week"); + + weeksAgo = moment().subtract({ w: 2 }); + weeksFromNow = moment().add({ w: 2 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks"); + test.done(); + }, + + "regression tests" : function(test) { + test.expect(1); + moment.lang('gl'); + + var lastWeek = moment().subtract({ d: 4 }).hours(1); + test.equal(lastWeek.calendar(), lastWeek.format('[o] dddd [pasado a] LT'), "1 o'clock bug"); + + + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/lang/hu.js b/node_modules/emailjs/node_modules/moment/test/lang/hu.js new file mode 100644 index 0000000..a2ef512 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/lang/hu.js @@ -0,0 +1,250 @@ +var moment = require("../../moment"); + + /************************************************** + English + *************************************************/ + +exports["lang:hu"] = { + "parse" : function(test) { + test.expect(96); + moment.lang('hu'); + var tests = 'január jan_február feb_március márc_április ápr_május máj_június jún_július júl_augusztus aug_szeptember szept_október okt_november nov_december dec'.split("_"); + var i; + function equalTest(input, mmm, i) { + test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1)); + } + for (i = 0; i < 12; i++) { + tests[i] = tests[i].split(' '); + equalTest(tests[i][0], 'MMM', i); + equalTest(tests[i][1], 'MMM', i); + equalTest(tests[i][0], 'MMMM', i); + equalTest(tests[i][1], 'MMMM', i); + equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i); + } + test.done(); + }, + + "format" : function(test) { + test.expect(16); + moment.lang('hu'); + var a = [ + ['dddd, MMMM Do YYYY, HH:mm:ss', 'vasárnap, február 14. 2010, 15:25:50'], + ['ddd, HH', 'v, 15'], + ['M Mo MM MMMM MMM', '2 2. 02 február feb'], + ['YYYY YY', '2010 10'], + ['D Do DD', '14 14. 14'], + ['d do dddd ddd', '0 0. vasárnap v'], + ['DDD DDDo DDDD', '45 45. 045'], + ['w wo ww', '8 8. 08'], + ['H HH', '15 15'], + ['m mm', '25 25'], + ['s ss', '50 50'], + ['\\az év DDDo n\\apj\\a', 'az év 45. napja'], + ['L', '2010.02.14.'], + ['LL', '2010. február 14.'], + ['LLL', '2010. február 14., 15:25'], + ['LLLL', '2010. február 14., vasárnap 15:25'] + ], + b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)), + i; + for (i = 0; i < a.length; i++) { + test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]); + } + test.done(); + }, + + "format ordinal" : function(test) { + test.expect(31); + moment.lang('hu'); + test.equal(moment([2011, 0, 1]).format('DDDo'), '1.', '1.'); + test.equal(moment([2011, 0, 2]).format('DDDo'), '2.', '2.'); + test.equal(moment([2011, 0, 3]).format('DDDo'), '3.', '3.'); + test.equal(moment([2011, 0, 4]).format('DDDo'), '4.', '4.'); + test.equal(moment([2011, 0, 5]).format('DDDo'), '5.', '5.'); + test.equal(moment([2011, 0, 6]).format('DDDo'), '6.', '6.'); + test.equal(moment([2011, 0, 7]).format('DDDo'), '7.', '7.'); + test.equal(moment([2011, 0, 8]).format('DDDo'), '8.', '8.'); + test.equal(moment([2011, 0, 9]).format('DDDo'), '9.', '9.'); + test.equal(moment([2011, 0, 10]).format('DDDo'), '10.', '10.'); + + test.equal(moment([2011, 0, 11]).format('DDDo'), '11.', '11.'); + test.equal(moment([2011, 0, 12]).format('DDDo'), '12.', '12.'); + test.equal(moment([2011, 0, 13]).format('DDDo'), '13.', '13.'); + test.equal(moment([2011, 0, 14]).format('DDDo'), '14.', '14.'); + test.equal(moment([2011, 0, 15]).format('DDDo'), '15.', '15.'); + test.equal(moment([2011, 0, 16]).format('DDDo'), '16.', '16.'); + test.equal(moment([2011, 0, 17]).format('DDDo'), '17.', '17.'); + test.equal(moment([2011, 0, 18]).format('DDDo'), '18.', '18.'); + test.equal(moment([2011, 0, 19]).format('DDDo'), '19.', '19.'); + test.equal(moment([2011, 0, 20]).format('DDDo'), '20.', '20.'); + + test.equal(moment([2011, 0, 21]).format('DDDo'), '21.', '21.'); + test.equal(moment([2011, 0, 22]).format('DDDo'), '22.', '22.'); + test.equal(moment([2011, 0, 23]).format('DDDo'), '23.', '23.'); + test.equal(moment([2011, 0, 24]).format('DDDo'), '24.', '24.'); + test.equal(moment([2011, 0, 25]).format('DDDo'), '25.', '25.'); + test.equal(moment([2011, 0, 26]).format('DDDo'), '26.', '26.'); + test.equal(moment([2011, 0, 27]).format('DDDo'), '27.', '27.'); + test.equal(moment([2011, 0, 28]).format('DDDo'), '28.', '28.'); + test.equal(moment([2011, 0, 29]).format('DDDo'), '29.', '29.'); + test.equal(moment([2011, 0, 30]).format('DDDo'), '30.', '30.'); + + test.equal(moment([2011, 0, 31]).format('DDDo'), '31.', '31.'); + test.done(); + }, + + "format month" : function(test) { + test.expect(12); + moment.lang('hu'); + var expected = 'január jan_február feb_március márc_április ápr_május máj_június jún_július júl_augusztus aug_szeptember szept_október okt_november nov_december dec'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]); + } + test.done(); + }, + + "format week" : function(test) { + test.expect(7); + moment.lang('hu'); + var expected = 'vasárnap v_hétfő h_kedd k_szerda sze_csütörtök cs_péntek p_szombat szo'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, 0, 2 + i]).format('dddd ddd'), expected[i], expected[i]); + } + test.done(); + }, + + "from" : function(test) { + test.expect(30); + moment.lang('hu'); + var start = moment([2007, 1, 28]); + test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "néhány másodperc", "44 másodperc = néhány másodperc"); + test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "egy perc", "45 másodperc = egy perc"); + test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "egy perc", "89 másodperc = egy perc"); + test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 perc", "90 másodperc = 2 perc"); + test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 perc", "44 perc = 44 perc"); + test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "egy óra", "45 perc = egy óra"); + test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "egy óra", "89 perc = egy óra"); + test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 óra", "90 perc = 2 óra"); + test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 óra", "5 óra = 5 óra"); + test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 óra", "21 óra = 21 óra"); + test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "egy nap", "22 óra = egy nap"); + test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "egy nap", "35 óra = egy nap"); + test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 nap", "36 óra = 2 nap"); + test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "egy nap", "1 nap = egy nap"); + test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 nap", "5 nap = 5 nap"); + test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 nap", "25 nap = 25 nap"); + test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "egy hónap", "26 nap = egy hónap"); + test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "egy hónap", "30 nap = egy hónap"); + test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "egy hónap", "45 nap = egy hónap"); + test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 hónap", "46 nap = 2 hónap"); + test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 hónap", "75 nap = 2 hónap"); + test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 hónap", "76 nap = 3 hónap"); + test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "egy hónap", "1 hónap = egy hónap"); + test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 hónap", "5 hónap = 5 hónap"); + test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 hónap", "344 nap = 11 hónap"); + test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "egy év", "345 nap = egy év"); + test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "egy év", "547 nap = egy év"); + test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 év", "548 nap = 2 év"); + test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "egy év", "1 év = egy év"); + test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 év", "5 év = 5 év"); + test.done(); + }, + + "suffix" : function(test) { + test.expect(2); + moment.lang('hu'); + test.equal(moment(30000).from(0), "néhány másodperc múlva", "prefix"); + test.equal(moment(0).from(30000), "néhány másodperce", "suffix"); + test.done(); + }, + + "now from now" : function(test) { + test.expect(1); + moment.lang('hu'); + test.equal(moment().fromNow(), "néhány másodperce", "now from now should display as in the past"); + test.done(); + }, + + "fromNow" : function(test) { + test.expect(2); + moment.lang('hu'); + test.equal(moment().add({s:30}).fromNow(), "néhány másodperc múlva", "néhány másodperc múlva"); + test.equal(moment().add({d:5}).fromNow(), "5 nap múlva", "5 nap múlva"); + test.done(); + }, + + "calendar day" : function(test) { + test.expect(6); + moment.lang('hu'); + + var a = moment().hours(2).minutes(0).seconds(0); + + test.equal(moment(a).calendar(), "ma 2:00-kor", "today at the same time"); + test.equal(moment(a).add({ m: 25 }).calendar(), "ma 2:25-kor", "Now plus 25 min"); + test.equal(moment(a).add({ h: 1 }).calendar(), "ma 3:00-kor", "Now plus 1 hour"); + test.equal(moment(a).add({ d: 1 }).calendar(), "holnap 2:00-kor", "tomorrow at the same time"); + test.equal(moment(a).subtract({ h: 1 }).calendar(), "ma 1:00-kor", "Now minus 1 hour"); + test.equal(moment(a).subtract({ d: 1 }).calendar(), "tegnap 2:00-kor", "yesterday at the same time"); + test.done(); + }, + + "calendar next week" : function(test) { + test.expect(15); + moment.lang('hu'); + + var i; + var m; + var days = 'vasárnap_hétfőn_kedden_szerdán_csütörtökön_pénteken_szombaton'.split('_'); + + for (i = 2; i < 7; i++) { + m = moment().add({ d: i }); + test.equal(m.calendar(), m.format('['+days[m.day()]+'] LT[-kor]'), "today + " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('['+days[m.day()]+'] LT[-kor]'), "today + " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('['+days[m.day()]+'] LT[-kor]'), "today + " + i + " days end of day"); + } + + test.done(); + }, + + "calendar last week" : function(test) { + test.expect(15); + moment.lang('hu'); + + var days = 'vasárnap_hétfőn_kedden_szerdán_csütörtökön_pénteken_szombaton'.split('_'); + + for (var i = 2; i < 7; i++) { + var m = moment().subtract({ d: i }); + test.equal(m.calendar(), m.format('múlt ['+days[m.day()]+'] LT[-kor]'), "today - " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('múlt ['+days[m.day()]+'] LT[-kor]'), "today - " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('múlt ['+days[m.day()]+'] LT[-kor]'), "today - " + i + " days end of day"); + } + + test.done(); + }, + + "calendar all else" : function(test) { + test.expect(4); + moment.lang('hu'); + var weeksAgo = moment().subtract({ w: 1 }); + var weeksFromNow = moment().add({ w: 1 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "egy héte"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "egy hét múlva"); + + weeksAgo = moment().subtract({ w: 2 }); + weeksFromNow = moment().add({ w: 2 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 hete"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "2 hét múlva"); + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/lang/is.js b/node_modules/emailjs/node_modules/moment/test/lang/is.js new file mode 100644 index 0000000..a59ed44 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/lang/is.js @@ -0,0 +1,254 @@ +var moment = require("../../moment"); + + + /************************************************** + Icelandic + *************************************************/ + +exports["lang:is"] = { + "parse" : function(test) { + test.expect(96); + moment.lang('is'); + var tests = 'janúar jan_febrúar feb_mars mar_apríl apr_maí maí_júní jún_júlí júl_ágúst ágú_september sep_október okt_nóvember nóv_desember des'.split("_"); + var i; + function equalTest(input, mmm, i) { + test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1)); + } + for (i = 0; i < 12; i++) { + tests[i] = tests[i].split(' '); + equalTest(tests[i][0], 'MMM', i); + equalTest(tests[i][1], 'MMM', i); + equalTest(tests[i][0], 'MMMM', i); + equalTest(tests[i][1], 'MMMM', i); + equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i); + } + test.done(); + }, + + "format" : function(test) { + test.expect(18); + moment.lang('is'); + var a = [ + ['dddd, Do MMMM YYYY, h:mm:ss a', 'sunnudagur, 14. febrúar 2010, 3:25:50 pm'], + ['ddd, hA', 'sun, 3PM'], + ['M Mo MM MMMM MMM', '2 2. 02 febrúar feb'], + ['YYYY YY', '2010 10'], + ['D Do DD', '14 14. 14'], + ['d do dddd ddd dd', '0 0. sunnudagur sun Su'], + ['DDD DDDo DDDD', '45 45. 045'], + ['w wo ww', '8 8. 08'], + ['h hh', '3 03'], + ['H HH', '15 15'], + ['m mm', '25 25'], + ['s ss', '50 50'], + ['a A', 'pm PM'], + ['t\\he DDDo \\d\\ay of t\\he ye\\ar', 'the 45. day of the year'], + ['L', '14/02/2010'], + ['LL', '14. febrúar 2010'], + ['LLL', '14. febrúar 2010 kl. 15:25'], + ['LLLL', 'sunnudagur, 14. febrúar 2010 kl. 15:25'] + ], + b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)), + i; + for (i = 0; i < a.length; i++) { + test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]); + } + test.done(); + }, + + "format ordinal" : function(test) { + test.expect(31); + moment.lang('is'); + test.equal(moment([2011, 0, 1]).format('DDDo'), '1.', '1.'); + test.equal(moment([2011, 0, 2]).format('DDDo'), '2.', '2.'); + test.equal(moment([2011, 0, 3]).format('DDDo'), '3.', '3.'); + test.equal(moment([2011, 0, 4]).format('DDDo'), '4.', '4.'); + test.equal(moment([2011, 0, 5]).format('DDDo'), '5.', '5.'); + test.equal(moment([2011, 0, 6]).format('DDDo'), '6.', '6.'); + test.equal(moment([2011, 0, 7]).format('DDDo'), '7.', '7.'); + test.equal(moment([2011, 0, 8]).format('DDDo'), '8.', '8.'); + test.equal(moment([2011, 0, 9]).format('DDDo'), '9.', '9.'); + test.equal(moment([2011, 0, 10]).format('DDDo'), '10.', '10.'); + + test.equal(moment([2011, 0, 11]).format('DDDo'), '11.', '11.'); + test.equal(moment([2011, 0, 12]).format('DDDo'), '12.', '12.'); + test.equal(moment([2011, 0, 13]).format('DDDo'), '13.', '13.'); + test.equal(moment([2011, 0, 14]).format('DDDo'), '14.', '14.'); + test.equal(moment([2011, 0, 15]).format('DDDo'), '15.', '15.'); + test.equal(moment([2011, 0, 16]).format('DDDo'), '16.', '16.'); + test.equal(moment([2011, 0, 17]).format('DDDo'), '17.', '17.'); + test.equal(moment([2011, 0, 18]).format('DDDo'), '18.', '18.'); + test.equal(moment([2011, 0, 19]).format('DDDo'), '19.', '19.'); + test.equal(moment([2011, 0, 20]).format('DDDo'), '20.', '20.'); + + test.equal(moment([2011, 0, 21]).format('DDDo'), '21.', '21.'); + test.equal(moment([2011, 0, 22]).format('DDDo'), '22.', '22.'); + test.equal(moment([2011, 0, 23]).format('DDDo'), '23.', '23.'); + test.equal(moment([2011, 0, 24]).format('DDDo'), '24.', '24.'); + test.equal(moment([2011, 0, 25]).format('DDDo'), '25.', '25.'); + test.equal(moment([2011, 0, 26]).format('DDDo'), '26.', '26.'); + test.equal(moment([2011, 0, 27]).format('DDDo'), '27.', '27.'); + test.equal(moment([2011, 0, 28]).format('DDDo'), '28.', '28.'); + test.equal(moment([2011, 0, 29]).format('DDDo'), '29.', '29.'); + test.equal(moment([2011, 0, 30]).format('DDDo'), '30.', '30.'); + + test.equal(moment([2011, 0, 31]).format('DDDo'), '31.', '31.'); + test.done(); + }, + + "format month" : function(test) { + test.expect(12); + moment.lang('is'); + var expected = 'janúar jan_febrúar feb_mars mar_apríl apr_maí maí_júní jún_júlí júl_ágúst ágú_september sep_október okt_nóvember nóv_desember des'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]); + } + test.done(); + }, + + "format week" : function(test) { + test.expect(7); + moment.lang('is'); + var expected = 'sunnudagur sun Su_mánudagur mán Má_þriðjudagur þri Þr_miðvikudagur mið Mi_fimmtudagur fim Fi_föstudagur fös Fö_laugardagur lau La'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]); + } + test.done(); + }, + + "from" : function(test) { + test.expect(34); + moment.lang('is'); + var start = moment([2007, 1, 28]); + test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "nokkrar sekúndur", "44 seconds = a few seconds"); + test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "mínúta", "45 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "mínúta", "89 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 mínútur", "90 seconds = 2 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 mínútur", "44 minutes = 44 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:21}), true), "21 mínúta", "21 minutes = 21 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "klukkustund", "45 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "klukkustund", "89 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 klukkustundir", "90 minutes = 2 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 klukkustundir", "5 hours = 5 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 klukkustund", "21 hours = 21 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "dagur", "22 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "dagur", "35 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 dagar", "36 hours = 2 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "dagur", "1 day = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 dagar", "5 days = 5 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 dagar", "25 days = 25 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:11}), true), "11 dagar", "11 days = 11 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:21}), true), "21 dagur", "21 days = 21 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "mánuður", "26 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "mánuður", "30 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "mánuður", "45 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 mánuðir", "46 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 mánuðir", "75 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 mánuðir", "76 days = 3 months"); + test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "mánuður", "1 month = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 mánuðir", "5 months = 5 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 mánuðir", "344 days = 11 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "ár", "345 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "ár", "547 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 ár", "548 days = 2 years"); + test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "ár", "1 year = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 ár", "5 years = 5 years"); + test.equal(start.from(moment([2007, 1, 28]).add({y:21}), true), "21 ár", "21 years = 21 years"); + test.done(); + }, + + "suffix" : function(test) { + test.expect(3); + moment.lang('is'); + test.equal(moment(30000).from(0), "eftir nokkrar sekúndur", "prefix"); + test.equal(moment(0).from(30000), "fyrir nokkrum sekúndum síðan", "suffix"); + test.equal(moment().subtract({m:1}).fromNow(), "fyrir mínútu síðan", "a minute ago"); + test.done(); + }, + + "now from now" : function(test) { + test.expect(1); + moment.lang('is'); + test.equal(moment().fromNow(), "fyrir nokkrum sekúndum síðan", "now from now should display as in the past"); + test.done(); + }, + + "fromNow" : function(test) { + test.expect(3); + moment.lang('is'); + test.equal(moment().add({s:30}).fromNow(), "eftir nokkrar sekúndur", "in a few seconds"); + test.equal(moment().add({m:1}).fromNow(), "eftir mínútu", "in a minute"); + test.equal(moment().add({d:5}).fromNow(), "eftir 5 daga", "in 5 days"); + test.done(); + }, + + "calendar day" : function(test) { + test.expect(6); + moment.lang('is'); + + var a = moment().hours(2).minutes(0).seconds(0); + + test.equal(moment(a).calendar(), "í dag kl. 2:00", "today at the same time"); + test.equal(moment(a).add({ m: 25 }).calendar(), "í dag kl. 2:25", "Now plus 25 min"); + test.equal(moment(a).add({ h: 1 }).calendar(), "í dag kl. 3:00", "Now plus 1 hour"); + test.equal(moment(a).add({ d: 1 }).calendar(), "á morgun kl. 2:00", "tomorrow at the same time"); + test.equal(moment(a).subtract({ h: 1 }).calendar(), "í dag kl. 1:00", "Now minus 1 hour"); + test.equal(moment(a).subtract({ d: 1 }).calendar(), "í gær kl. 2:00", "yesterday at the same time"); + test.done(); + }, + + "calendar next week" : function(test) { + test.expect(15); + moment.lang('is'); + + var i; + var m; + + for (i = 2; i < 7; i++) { + m = moment().add({ d: i }); + test.equal(m.calendar(), m.format('dddd [kl.] LT'), "Today + " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('dddd [kl.] LT'), "Today + " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('dddd [kl.] LT'), "Today + " + i + " days end of day"); + } + test.done(); + }, + + "calendar last week" : function(test) { + test.expect(15); + moment.lang('is'); + + for (i = 2; i < 7; i++) { + m = moment().subtract({ d: i }); + test.equal(m.calendar(), m.format('[síðasta] dddd [kl.] LT'), "Today - " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('[síðasta] dddd [kl.] LT'), "Today - " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('[síðasta] dddd [kl.] LT'), "Today - " + i + " days end of day"); + } + test.done(); + }, + + "calendar all else" : function(test) { + test.expect(4); + moment.lang('is'); + var weeksAgo = moment().subtract({ w: 1 }); + var weeksFromNow = moment().add({ w: 1 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week"); + + weeksAgo = moment().subtract({ w: 2 }); + weeksFromNow = moment().add({ w: 2 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks"); + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/lang/it.js b/node_modules/emailjs/node_modules/moment/test/lang/it.js new file mode 100644 index 0000000..03695f1 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/lang/it.js @@ -0,0 +1,241 @@ +var moment = require("../../moment"); + + + /************************************************** + Italian + *************************************************/ + +exports["lang:it"] = { + "parse" : function(test) { + test.expect(96); + moment.lang('it'); + var tests = 'Gennaio Gen_Febbraio Feb_Marzo Mar_Aprile Apr_Maggio Mag_Giugno Giu_Luglio Lug_Agosto Ago_Settebre Set_Ottobre Ott_Novembre Nov_Dicembre Dic'.split("_"); + var i; + function equalTest(input, mmm, i) { + test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1)); + } + for (i = 0; i < 12; i++) { + tests[i] = tests[i].split(' '); + equalTest(tests[i][0], 'MMM', i); + equalTest(tests[i][1], 'MMM', i); + equalTest(tests[i][0], 'MMMM', i); + equalTest(tests[i][1], 'MMMM', i); + equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i); + } + test.done(); + }, + + "format" : function(test) { + test.expect(18); + moment.lang('it'); + var a = [ + ['dddd, MMMM Do YYYY, h:mm:ss a', 'Domenica, Febbraio 14º 2010, 3:25:50 pm'], + ['ddd, hA', 'Dom, 3PM'], + ['M Mo MM MMMM MMM', '2 2º 02 Febbraio Feb'], + ['YYYY YY', '2010 10'], + ['D Do DD', '14 14º 14'], + ['d do dddd ddd dd', '0 0º Domenica Dom D'], + ['DDD DDDo DDDD', '45 45º 045'], + ['w wo ww', '8 8º 08'], + ['h hh', '3 03'], + ['H HH', '15 15'], + ['m mm', '25 25'], + ['s ss', '50 50'], + ['a A', 'pm PM'], + ['t\\he DDDo \\d\\ay of t\\he ye\\ar', 'the 45º day of the year'], + ['L', '14/02/2010'], + ['LL', '14 Febbraio 2010'], + ['LLL', '14 Febbraio 2010 15:25'], + ['LLLL', 'Domenica, 14 Febbraio 2010 15:25'] + ], + b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)), + i; + for (i = 0; i < a.length; i++) { + test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]); + } + test.done(); + }, + + "format ordinal" : function(test) { + test.expect(31); + moment.lang('it'); + test.equal(moment([2011, 0, 1]).format('DDDo'), '1º', '1º'); + test.equal(moment([2011, 0, 2]).format('DDDo'), '2º', '2º'); + test.equal(moment([2011, 0, 3]).format('DDDo'), '3º', '3º'); + test.equal(moment([2011, 0, 4]).format('DDDo'), '4º', '4º'); + test.equal(moment([2011, 0, 5]).format('DDDo'), '5º', '5º'); + test.equal(moment([2011, 0, 6]).format('DDDo'), '6º', '6º'); + test.equal(moment([2011, 0, 7]).format('DDDo'), '7º', '7º'); + test.equal(moment([2011, 0, 8]).format('DDDo'), '8º', '8º'); + test.equal(moment([2011, 0, 9]).format('DDDo'), '9º', '9º'); + test.equal(moment([2011, 0, 10]).format('DDDo'), '10º', '10º'); + + test.equal(moment([2011, 0, 11]).format('DDDo'), '11º', '11º'); + test.equal(moment([2011, 0, 12]).format('DDDo'), '12º', '12º'); + test.equal(moment([2011, 0, 13]).format('DDDo'), '13º', '13º'); + test.equal(moment([2011, 0, 14]).format('DDDo'), '14º', '14º'); + test.equal(moment([2011, 0, 15]).format('DDDo'), '15º', '15º'); + test.equal(moment([2011, 0, 16]).format('DDDo'), '16º', '16º'); + test.equal(moment([2011, 0, 17]).format('DDDo'), '17º', '17º'); + test.equal(moment([2011, 0, 18]).format('DDDo'), '18º', '18º'); + test.equal(moment([2011, 0, 19]).format('DDDo'), '19º', '19º'); + test.equal(moment([2011, 0, 20]).format('DDDo'), '20º', '20º'); + + test.equal(moment([2011, 0, 21]).format('DDDo'), '21º', '21º'); + test.equal(moment([2011, 0, 22]).format('DDDo'), '22º', '22º'); + test.equal(moment([2011, 0, 23]).format('DDDo'), '23º', '23º'); + test.equal(moment([2011, 0, 24]).format('DDDo'), '24º', '24º'); + test.equal(moment([2011, 0, 25]).format('DDDo'), '25º', '25º'); + test.equal(moment([2011, 0, 26]).format('DDDo'), '26º', '26º'); + test.equal(moment([2011, 0, 27]).format('DDDo'), '27º', '27º'); + test.equal(moment([2011, 0, 28]).format('DDDo'), '28º', '28º'); + test.equal(moment([2011, 0, 29]).format('DDDo'), '29º', '29º'); + test.equal(moment([2011, 0, 30]).format('DDDo'), '30º', '30º'); + + test.equal(moment([2011, 0, 31]).format('DDDo'), '31º', '31º'); + test.done(); + }, + + "format month" : function(test) { + test.expect(12); + moment.lang('it'); + var expected = 'Gennaio Gen_Febbraio Feb_Marzo Mar_Aprile Apr_Maggio Mag_Giugno Giu_Luglio Lug_Agosto Ago_Settebre Set_Ottobre Ott_Novembre Nov_Dicembre Dic'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]); + } + test.done(); + }, + + "format week" : function(test) { + test.expect(7); + moment.lang('it'); + var expected = 'Domenica Dom D_Lunedì Lun L_Martedì Mar Ma_Mercoledì Mer Me_Giovedì Gio G_Venerdì Ven V_Sabato Sab S'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]); + } + test.done(); + }, + + "from" : function(test) { + test.expect(30); + moment.lang('it'); + var start = moment([2007, 1, 28]); + test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "secondi", "44 seconds = seconds"); + test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "un minuto", "45 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "un minuto", "89 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minuti", "90 seconds = 2 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minuti", "44 minutes = 44 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "un'ora", "45 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "un'ora", "89 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 ore", "90 minutes = 2 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 ore", "5 hours = 5 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 ore", "21 hours = 21 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "un giorno", "22 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "un giorno", "35 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 giorni", "36 hours = 2 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "un giorno", "1 day = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 giorni", "5 days = 5 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 giorni", "25 days = 25 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "un mese", "26 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "un mese", "30 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "un mese", "45 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 mesi", "46 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 mesi", "75 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 mesi", "76 days = 3 months"); + test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "un mese", "1 month = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 mesi", "5 months = 5 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 mesi", "344 days = 11 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "un anno", "345 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "un anno", "547 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 anni", "548 days = 2 years"); + test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "un anno", "1 year = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 anni", "5 years = 5 years"); + test.done(); + }, + + "suffix" : function(test) { + test.expect(2); + moment.lang('it'); + test.equal(moment(30000).from(0), "in secondi", "prefix"); + test.equal(moment(0).from(30000), "secondi fa", "suffix"); + test.done(); + }, + + "fromNow" : function(test) { + test.expect(2); + moment.lang('it'); + test.equal(moment().add({s:30}).fromNow(), "in secondi", "in seconds"); + test.equal(moment().add({d:5}).fromNow(), "in 5 giorni", "in 5 days"); + test.done(); + }, + + "calendar day" : function(test) { + test.expect(6); + moment.lang('it'); + + var a = moment().hours(2).minutes(0).seconds(0); + + test.equal(moment(a).calendar(), "Oggi alle 02:00", "today at the same time"); + test.equal(moment(a).add({ m: 25 }).calendar(), "Oggi alle 02:25", "Now plus 25 min"); + test.equal(moment(a).add({ h: 1 }).calendar(), "Oggi alle 03:00", "Now plus 1 hour"); + test.equal(moment(a).add({ d: 1 }).calendar(), "Domani alle 02:00", "tomorrow at the same time"); + test.equal(moment(a).subtract({ h: 1 }).calendar(), "Oggi alle 01:00", "Now minus 1 hour"); + test.equal(moment(a).subtract({ d: 1 }).calendar(), "Ieri alle 02:00", "yesterday at the same time"); + test.done(); + }, + + "calendar next week" : function(test) { + test.expect(15); + moment.lang('it'); + + var i; + var m; + + for (i = 2; i < 7; i++) { + m = moment().add({ d: i }); + test.equal(m.calendar(), m.format('dddd [alle] LT'), "Today + " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('dddd [alle] LT'), "Today + " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('dddd [alle] LT'), "Today + " + i + " days end of day"); + } + test.done(); + }, + + "calendar last week" : function(test) { + test.expect(15); + moment.lang('it'); + + for (i = 2; i < 7; i++) { + m = moment().subtract({ d: i }); + test.equal(m.calendar(), m.format('[lo scorso] dddd [alle] LT'), "Today - " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('[lo scorso] dddd [alle] LT'), "Today - " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('[lo scorso] dddd [alle] LT'), "Today - " + i + " days end of day"); + } + test.done(); + }, + + "calendar all else" : function(test) { + test.expect(4); + moment.lang('it'); + var weeksAgo = moment().subtract({ w: 1 }); + var weeksFromNow = moment().add({ w: 1 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week"); + + weeksAgo = moment().subtract({ w: 2 }); + weeksFromNow = moment().add({ w: 2 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks"); + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/lang/ja.js b/node_modules/emailjs/node_modules/moment/test/lang/ja.js new file mode 100644 index 0000000..0705ae7 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/lang/ja.js @@ -0,0 +1,208 @@ +var moment = require("../../moment"); + + + /************************************************** + Japanese + *************************************************/ + +exports["lang:jp"] = { + "parse" : function(test) { + test.expect(96); + moment.lang('ja'); + var tests = '1月 1月_2月 2月_3月 3月_4月 4月_5月 5月_6月 6月_7月 7月_8月 8月_9月 9月_10月 10月_11月 11月_12月 12月'.split("_"); + var i; + function equalTest(input, mmm, i) { + test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1)); + } + for (i = 0; i < 12; i++) { + tests[i] = tests[i].split(' '); + equalTest(tests[i][0], 'MMM', i); + equalTest(tests[i][1], 'MMM', i); + equalTest(tests[i][0], 'MMMM', i); + equalTest(tests[i][1], 'MMMM', i); + equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i); + } + test.done(); + }, + + "format" : function(test) { + test.expect(18); + moment.lang('ja'); + var a = [ + ['dddd, MMMM Do YYYY, a h:mm:ss', '日曜日, 2月 14 2010, 午後 3:25:50'], + ['ddd, Ah', '日, 午後3'], + ['M Mo MM MMMM MMM', '2 2 02 2月 2月'], + ['YYYY YY', '2010 10'], + ['D Do DD', '14 14 14'], + ['d do dddd ddd dd', '0 0 日曜日 日 日'], + ['DDD DDDo DDDD', '45 45 045'], + ['w wo ww', '8 8 08'], + ['h hh', '3 03'], + ['H HH', '15 15'], + ['m mm', '25 25'], + ['s ss', '50 50'], + ['a A', '午後 午後'], + ['t\\he DDDo \\d\\ay of t\\he ye\\ar', 'the 45 day of the year'], + ['L', '2010/02/14'], + ['LL', '2010年2月14日'], + ['LLL', '2010年2月14日午後3時25分'], + ['LLLL', '2010年2月14日午後3時25分 日曜日'] + ], + b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)), + i; + for (i = 0; i < a.length; i++) { + test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]); + } + test.done(); + }, + + "format month" : function(test) { + test.expect(12); + moment.lang('ja'); + var expected = '1月 1月_2月 2月_3月 3月_4月 4月_5月 5月_6月 6月_7月 7月_8月 8月_9月 9月_10月 10月_11月 11月_12月 12月'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]); + } + test.done(); + }, + + "format week" : function(test) { + test.expect(7); + moment.lang('ja'); + var expected = '日曜日 日 日_月曜日 月 月_火曜日 火 火_水曜日 水 水_木曜日 木 木_金曜日 金 金_土曜日 土 土'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]); + } + test.done(); + }, + + "from" : function(test) { + test.expect(30); + moment.lang('ja'); + var start = moment([2007, 1, 28]); + test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "数秒", "44 seconds = a few seconds"); + test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "1分", "45 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "1分", "89 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2分", "90 seconds = 2 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44分", "44 minutes = 44 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "1時間", "45 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "1時間", "89 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2時間", "90 minutes = 2 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5時間", "5 hours = 5 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21時間", "21 hours = 21 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "1日", "22 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "1日", "35 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2日", "36 hours = 2 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "1日", "1 day = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5日", "5 days = 5 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25日", "25 days = 25 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "1ヶ月", "26 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "1ヶ月", "30 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "1ヶ月", "45 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2ヶ月", "46 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2ヶ月", "75 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3ヶ月", "76 days = 3 months"); + test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "1ヶ月", "1 month = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5ヶ月", "5 months = 5 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11ヶ月", "344 days = 11 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "1年", "345 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "1年", "547 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2年", "548 days = 2 years"); + test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "1年", "1 year = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5年", "5 years = 5 years"); + test.done(); + }, + + "suffix" : function(test) { + test.expect(2); + moment.lang('ja'); + test.equal(moment(30000).from(0), "数秒後", "prefix"); + test.equal(moment(0).from(30000), "数秒前", "suffix"); + test.done(); + }, + + "now from now" : function(test) { + test.expect(1); + moment.lang('ja'); + test.equal(moment().fromNow(), "数秒前", "now from now should display as in the past"); + test.done(); + }, + + "fromNow" : function(test) { + test.expect(2); + moment.lang('ja'); + test.equal(moment().add({s:30}).fromNow(), "数秒後", "in a few seconds"); + test.equal(moment().add({d:5}).fromNow(), "5日後", "in 5 days"); + test.done(); + }, + + "calendar day" : function(test) { + test.expect(6); + moment.lang('ja'); + + var a = moment().hours(2).minutes(0).seconds(0); + + test.equal(moment(a).calendar(), "今日 午前2時0分", "today at the same time"); + test.equal(moment(a).add({ m: 25 }).calendar(), "今日 午前2時25分", "Now plus 25 min"); + test.equal(moment(a).add({ h: 1 }).calendar(), "今日 午前3時0分", "Now plus 1 hour"); + test.equal(moment(a).add({ d: 1 }).calendar(), "明日 午前2時0分", "tomorrow at the same time"); + test.equal(moment(a).subtract({ h: 1 }).calendar(), "今日 午前1時0分", "Now minus 1 hour"); + test.equal(moment(a).subtract({ d: 1 }).calendar(), "昨日 午前2時0分", "yesterday at the same time"); + test.done(); + }, + + "calendar next week" : function(test) { + test.expect(15); + moment.lang('ja'); + + var i; + var m; + + for (i = 2; i < 7; i++) { + m = moment().add({ d: i }); + test.equal(m.calendar(), m.format('[来週]dddd LT'), "Today + " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('[来週]dddd LT'), "Today + " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('[来週]dddd LT'), "Today + " + i + " days end of day"); + } + test.done(); + }, + + "calendar last week" : function(test) { + test.expect(15); + moment.lang('ja'); + + for (i = 2; i < 7; i++) { + m = moment().subtract({ d: i }); + test.equal(m.calendar(), m.format('[前週]dddd LT'), "Today - " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('[前週]dddd LT'), "Today - " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('[前週]dddd LT'), "Today - " + i + " days end of day"); + } + test.done(); + }, + + "calendar all else" : function(test) { + test.expect(4); + moment.lang('ja'); + var weeksAgo = moment().subtract({ w: 1 }); + var weeksFromNow = moment().add({ w: 1 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week"); + + weeksAgo = moment().subtract({ w: 2 }); + weeksFromNow = moment().add({ w: 2 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks"); + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/lang/jp.js b/node_modules/emailjs/node_modules/moment/test/lang/jp.js new file mode 100644 index 0000000..8b47f7a --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/lang/jp.js @@ -0,0 +1,208 @@ +var moment = require("../../moment"); + + + /************************************************** + Japanese + *************************************************/ + +exports["lang:jp"] = { + "parse" : function(test) { + test.expect(96); + moment.lang('jp'); + var tests = '1月 1月_2月 2月_3月 3月_4月 4月_5月 5月_6月 6月_7月 7月_8月 8月_9月 9月_10月 10月_11月 11月_12月 12月'.split("_"); + var i; + function equalTest(input, mmm, i) { + test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1)); + } + for (i = 0; i < 12; i++) { + tests[i] = tests[i].split(' '); + equalTest(tests[i][0], 'MMM', i); + equalTest(tests[i][1], 'MMM', i); + equalTest(tests[i][0], 'MMMM', i); + equalTest(tests[i][1], 'MMMM', i); + equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i); + } + test.done(); + }, + + "format" : function(test) { + test.expect(18); + moment.lang('jp'); + var a = [ + ['dddd, MMMM Do YYYY, a h:mm:ss', '日曜日, 2月 14 2010, 午後 3:25:50'], + ['ddd, Ah', '日, 午後3'], + ['M Mo MM MMMM MMM', '2 2 02 2月 2月'], + ['YYYY YY', '2010 10'], + ['D Do DD', '14 14 14'], + ['d do dddd ddd dd', '0 0 日曜日 日 日'], + ['DDD DDDo DDDD', '45 45 045'], + ['w wo ww', '8 8 08'], + ['h hh', '3 03'], + ['H HH', '15 15'], + ['m mm', '25 25'], + ['s ss', '50 50'], + ['a A', '午後 午後'], + ['t\\he DDDo \\d\\ay of t\\he ye\\ar', 'the 45 day of the year'], + ['L', '2010/02/14'], + ['LL', '2010年2月14日'], + ['LLL', '2010年2月14日午後3時25分'], + ['LLLL', '2010年2月14日午後3時25分 日曜日'] + ], + b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)), + i; + for (i = 0; i < a.length; i++) { + test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]); + } + test.done(); + }, + + "format month" : function(test) { + test.expect(12); + moment.lang('jp'); + var expected = '1月 1月_2月 2月_3月 3月_4月 4月_5月 5月_6月 6月_7月 7月_8月 8月_9月 9月_10月 10月_11月 11月_12月 12月'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]); + } + test.done(); + }, + + "format week" : function(test) { + test.expect(7); + moment.lang('jp'); + var expected = '日曜日 日 日_月曜日 月 月_火曜日 火 火_水曜日 水 水_木曜日 木 木_金曜日 金 金_土曜日 土 土'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]); + } + test.done(); + }, + + "from" : function(test) { + test.expect(30); + moment.lang('jp'); + var start = moment([2007, 1, 28]); + test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "数秒", "44 seconds = a few seconds"); + test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "1分", "45 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "1分", "89 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2分", "90 seconds = 2 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44分", "44 minutes = 44 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "1時間", "45 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "1時間", "89 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2時間", "90 minutes = 2 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5時間", "5 hours = 5 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21時間", "21 hours = 21 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "1日", "22 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "1日", "35 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2日", "36 hours = 2 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "1日", "1 day = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5日", "5 days = 5 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25日", "25 days = 25 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "1ヶ月", "26 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "1ヶ月", "30 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "1ヶ月", "45 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2ヶ月", "46 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2ヶ月", "75 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3ヶ月", "76 days = 3 months"); + test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "1ヶ月", "1 month = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5ヶ月", "5 months = 5 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11ヶ月", "344 days = 11 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "1年", "345 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "1年", "547 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2年", "548 days = 2 years"); + test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "1年", "1 year = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5年", "5 years = 5 years"); + test.done(); + }, + + "suffix" : function(test) { + test.expect(2); + moment.lang('jp'); + test.equal(moment(30000).from(0), "数秒後", "prefix"); + test.equal(moment(0).from(30000), "数秒前", "suffix"); + test.done(); + }, + + "now from now" : function(test) { + test.expect(1); + moment.lang('jp'); + test.equal(moment().fromNow(), "数秒前", "now from now should display as in the past"); + test.done(); + }, + + "fromNow" : function(test) { + test.expect(2); + moment.lang('jp'); + test.equal(moment().add({s:30}).fromNow(), "数秒後", "in a few seconds"); + test.equal(moment().add({d:5}).fromNow(), "5日後", "in 5 days"); + test.done(); + }, + + "calendar day" : function(test) { + test.expect(6); + moment.lang('jp'); + + var a = moment().hours(2).minutes(0).seconds(0); + + test.equal(moment(a).calendar(), "今日 午前2時0分", "today at the same time"); + test.equal(moment(a).add({ m: 25 }).calendar(), "今日 午前2時25分", "Now plus 25 min"); + test.equal(moment(a).add({ h: 1 }).calendar(), "今日 午前3時0分", "Now plus 1 hour"); + test.equal(moment(a).add({ d: 1 }).calendar(), "明日 午前2時0分", "tomorrow at the same time"); + test.equal(moment(a).subtract({ h: 1 }).calendar(), "今日 午前1時0分", "Now minus 1 hour"); + test.equal(moment(a).subtract({ d: 1 }).calendar(), "昨日 午前2時0分", "yesterday at the same time"); + test.done(); + }, + + "calendar next week" : function(test) { + test.expect(15); + moment.lang('jp'); + + var i; + var m; + + for (i = 2; i < 7; i++) { + m = moment().add({ d: i }); + test.equal(m.calendar(), m.format('[来週]dddd LT'), "Today + " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('[来週]dddd LT'), "Today + " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('[来週]dddd LT'), "Today + " + i + " days end of day"); + } + test.done(); + }, + + "calendar last week" : function(test) { + test.expect(15); + moment.lang('jp'); + + for (i = 2; i < 7; i++) { + m = moment().subtract({ d: i }); + test.equal(m.calendar(), m.format('[前週]dddd LT'), "Today - " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('[前週]dddd LT'), "Today - " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('[前週]dddd LT'), "Today - " + i + " days end of day"); + } + test.done(); + }, + + "calendar all else" : function(test) { + test.expect(4); + moment.lang('jp'); + var weeksAgo = moment().subtract({ w: 1 }); + var weeksFromNow = moment().add({ w: 1 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week"); + + weeksAgo = moment().subtract({ w: 2 }); + weeksFromNow = moment().add({ w: 2 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks"); + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/lang/ko.js b/node_modules/emailjs/node_modules/moment/test/lang/ko.js new file mode 100644 index 0000000..8e55ca4 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/lang/ko.js @@ -0,0 +1,247 @@ +var moment = require("../../moment"); + + + /************************************************** + Korean + *************************************************/ + +exports["lang:kr"] = { + "parse" : function(test) { + test.expect(96); + moment.lang('ko'); + var tests = '1월 1월_2월 2월_3월 3월_4월 4월_5월 5월_6월 6월_7월 7월_8월 8월_9월 9월_10월 10월_11월 11월_12월 12월'.split("_"); + var i; + function equalTest(input, mmm, i) { + test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1)); + } + for (i = 0; i < 12; i++) { + tests[i] = tests[i].split(' '); + equalTest(tests[i][0], 'MMM', i); + equalTest(tests[i][1], 'MMM', i); + equalTest(tests[i][0], 'MMMM', i); + equalTest(tests[i][1], 'MMMM', i); + equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i); + } + test.done(); + }, + "format" : function(test) { + test.expect(18); + moment.lang('ko'); + var a = [ + ['YYYY년 MMMM Do dddd a h:mm:ss', '2010년 2월 14일 일요일 오후 3:25:50'], + ['ddd A h', '일 오후 3'], + ['M Mo MM MMMM MMM', '2 2일 02 2월 2월'], + ['YYYY YY', '2010 10'], + ['D Do DD', '14 14일 14'], + ['d do dddd ddd dd', '0 0일 일요일 일 일'], + ['DDD DDDo DDDD', '45 45일 045'], + ['w wo ww', '8 8일 08'], + ['h hh', '3 03'], + ['H HH', '15 15'], + ['m mm', '25 25'], + ['s ss', '50 50'], + ['a A', '오후 오후'], + ['일년 중 DDDo째 되는 날', '일년 중 45일째 되는 날'], + ['L', '2010.02.14'], + ['LL', '2010년 2월 14일'], + ['LLL', '2010년 2월 14일 오후 3시 25분'], + ['LLLL', '2010년 2월 14일 일요일 오후 3시 25분'] + ], + b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)), + i; + for (i = 0; i < a.length; i++) { + test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]); + } + test.done(); + }, + + "format ordinal" : function(test) { + test.expect(31); + moment.lang('ko'); + test.equal(moment([2011, 0, 1]).format('DDDo'), '1일', '1일'); + test.equal(moment([2011, 0, 2]).format('DDDo'), '2일', '2일'); + test.equal(moment([2011, 0, 3]).format('DDDo'), '3일', '3일'); + test.equal(moment([2011, 0, 4]).format('DDDo'), '4일', '4일'); + test.equal(moment([2011, 0, 5]).format('DDDo'), '5일', '5일'); + test.equal(moment([2011, 0, 6]).format('DDDo'), '6일', '6일'); + test.equal(moment([2011, 0, 7]).format('DDDo'), '7일', '7일'); + test.equal(moment([2011, 0, 8]).format('DDDo'), '8일', '8일'); + test.equal(moment([2011, 0, 9]).format('DDDo'), '9일', '9일'); + test.equal(moment([2011, 0, 10]).format('DDDo'), '10일', '10일'); + + test.equal(moment([2011, 0, 11]).format('DDDo'), '11일', '11일'); + test.equal(moment([2011, 0, 12]).format('DDDo'), '12일', '12일'); + test.equal(moment([2011, 0, 13]).format('DDDo'), '13일', '13일'); + test.equal(moment([2011, 0, 14]).format('DDDo'), '14일', '14일'); + test.equal(moment([2011, 0, 15]).format('DDDo'), '15일', '15일'); + test.equal(moment([2011, 0, 16]).format('DDDo'), '16일', '16일'); + test.equal(moment([2011, 0, 17]).format('DDDo'), '17일', '17일'); + test.equal(moment([2011, 0, 18]).format('DDDo'), '18일', '18일'); + test.equal(moment([2011, 0, 19]).format('DDDo'), '19일', '19일'); + test.equal(moment([2011, 0, 20]).format('DDDo'), '20일', '20일'); + + test.equal(moment([2011, 0, 21]).format('DDDo'), '21일', '21일'); + test.equal(moment([2011, 0, 22]).format('DDDo'), '22일', '22일'); + test.equal(moment([2011, 0, 23]).format('DDDo'), '23일', '23일'); + test.equal(moment([2011, 0, 24]).format('DDDo'), '24일', '24일'); + test.equal(moment([2011, 0, 25]).format('DDDo'), '25일', '25일'); + test.equal(moment([2011, 0, 26]).format('DDDo'), '26일', '26일'); + test.equal(moment([2011, 0, 27]).format('DDDo'), '27일', '27일'); + test.equal(moment([2011, 0, 28]).format('DDDo'), '28일', '28일'); + test.equal(moment([2011, 0, 29]).format('DDDo'), '29일', '29일'); + test.equal(moment([2011, 0, 30]).format('DDDo'), '30일', '30일'); + + test.equal(moment([2011, 0, 31]).format('DDDo'), '31일', '31일'); + test.done(); + }, + + "format month" : function(test) { + test.expect(12); + moment.lang('ko'); + var expected = '1월 1월_2월 2월_3월 3월_4월 4월_5월 5월_6월 6월_7월 7월_8월 8월_9월 9월_10월 10월_11월 11월_12월 12월'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]); + } + test.done(); + }, + + "format week" : function(test) { + test.expect(7); + moment.lang('ko'); + var expected = '일요일 일 일_월요일 월 월_화요일 화 화_수요일 수 수_목요일 목 목_금요일 금 금_토요일 토 토'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]); + } + test.done(); + }, + + "from" : function(test) { + test.expect(30); + moment.lang('ko'); + var start = moment([2007, 1, 28]); + test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "몇초", "44초 = 몇초"); + test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "일분", "45초 = 일분"); + test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "일분", "89초 = 일분"); + test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2분", "90초 = 2분"); + test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44분", "44분 = 44분"); + test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "한시간", "45분 = 한시간"); + test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "한시간", "89분 = 한시간"); + test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2시간", "90분 = 2시간"); + test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5시간", "5시간 = 5시간"); + test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21시간", "21시간 = 21시간"); + test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "하루", "22시간 = 하루"); + test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "하루", "35시간 = 하루"); + test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2일", "36시간 = 2일"); + test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "하루", "하루 = 하루"); + test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5일", "5일 = 5일"); + test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25일", "25일 = 25일"); + test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "한달", "26일 = 한달"); + test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "한달", "30일 = 한달"); + test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "한달", "45일 = 한달"); + test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2달", "46일 = 2달"); + test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2달", "75일 = 2달"); + test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3달", "76일 = 3달"); + test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "한달", "1달 = 한달"); + test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5달", "5달 = 5달"); + test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11달", "344일 = 11달"); + test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "일년", "345일 = 일년"); + test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "일년", "547일 = 일년"); + test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2년", "548일 = 2년"); + test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "일년", "일년 = 일년"); + test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5년", "5년 = 5년"); + test.done(); + }, + + "suffix" : function(test) { + test.expect(2); + moment.lang('ko'); + test.equal(moment(30000).from(0), "몇초 후", "prefix"); + test.equal(moment(0).from(30000), "몇초 전", "suffix"); + test.done(); + }, + + "now from now" : function(test) { + test.expect(1); + moment.lang('ko'); + test.equal(moment().fromNow(), "몇초 전", "now from now should display as in the past"); + test.done(); + }, + + "fromNow" : function(test) { + test.expect(2); + moment.lang('ko'); + test.equal(moment().add({s:30}).fromNow(), "몇초 후", "in a few seconds"); + test.equal(moment().add({d:5}).fromNow(), "5일 후", "in 5 days"); + test.done(); + }, + + "calendar day" : function(test) { + test.expect(6); + moment.lang('ko'); + + var a = moment().hours(2).minutes(0).seconds(0); + + test.equal(moment(a).calendar(), "오늘 오전 2시 00분", "today at the same time"); + test.equal(moment(a).add({ m: 25 }).calendar(), "오늘 오전 2시 25분", "Now plus 25 min"); + test.equal(moment(a).add({ h: 1 }).calendar(), "오늘 오전 3시 00분", "Now plus 1 hour"); + test.equal(moment(a).add({ d: 1 }).calendar(), "내일 오전 2시 00분", "tomorrow at the same time"); + test.equal(moment(a).subtract({ h: 1 }).calendar(), "오늘 오전 1시 00분", "Now minus 1 hour"); + test.equal(moment(a).subtract({ d: 1 }).calendar(), "어제 오전 2시 00분", "yesterday at the same time"); + test.done(); + }, + + "calendar next week" : function(test) { + test.expect(15); + moment.lang('ko'); + + var i; + var m; + + for (i = 2; i < 7; i++) { + m = moment().add({ d: i }); + test.equal(m.calendar(), m.format('dddd LT'), "Today + " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('dddd LT'), "Today + " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('dddd LT'), "Today + " + i + " days end of day"); + } + test.done(); + }, + + "calendar last week" : function(test) { + test.expect(15); + moment.lang('ko'); + + for (i = 2; i < 7; i++) { + m = moment().subtract({ d: i }); + test.equal(m.calendar(), m.format('지난주 dddd LT'), "Today - " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('지난주 dddd LT'), "Today - " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('지난주 dddd LT'), "Today - " + i + " days end of day"); + } + test.done(); + }, + + "calendar all else" : function(test) { + test.expect(4); + moment.lang('ko'); + var weeksAgo = moment().subtract({ w: 1 }); + var weeksFromNow = moment().add({ w: 1 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week"); + + weeksAgo = moment().subtract({ w: 2 }); + weeksFromNow = moment().add({ w: 2 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks"); + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/lang/kr.js b/node_modules/emailjs/node_modules/moment/test/lang/kr.js new file mode 100644 index 0000000..67314eb --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/lang/kr.js @@ -0,0 +1,247 @@ +var moment = require("../../moment"); + + + /************************************************** + Korean + *************************************************/ + +exports["lang:kr"] = { + "parse" : function(test) { + test.expect(96); + moment.lang('kr'); + var tests = '1월 1월_2월 2월_3월 3월_4월 4월_5월 5월_6월 6월_7월 7월_8월 8월_9월 9월_10월 10월_11월 11월_12월 12월'.split("_"); + var i; + function equalTest(input, mmm, i) { + test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1)); + } + for (i = 0; i < 12; i++) { + tests[i] = tests[i].split(' '); + equalTest(tests[i][0], 'MMM', i); + equalTest(tests[i][1], 'MMM', i); + equalTest(tests[i][0], 'MMMM', i); + equalTest(tests[i][1], 'MMMM', i); + equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i); + } + test.done(); + }, + "format" : function(test) { + test.expect(18); + moment.lang('kr'); + var a = [ + ['YYYY년 MMMM Do dddd a h:mm:ss', '2010년 2월 14일 일요일 오후 3:25:50'], + ['ddd A h', '일 오후 3'], + ['M Mo MM MMMM MMM', '2 2일 02 2월 2월'], + ['YYYY YY', '2010 10'], + ['D Do DD', '14 14일 14'], + ['d do dddd ddd dd', '0 0일 일요일 일 일'], + ['DDD DDDo DDDD', '45 45일 045'], + ['w wo ww', '8 8일 08'], + ['h hh', '3 03'], + ['H HH', '15 15'], + ['m mm', '25 25'], + ['s ss', '50 50'], + ['a A', '오후 오후'], + ['일년 중 DDDo째 되는 날', '일년 중 45일째 되는 날'], + ['L', '2010.02.14'], + ['LL', '2010년 2월 14일'], + ['LLL', '2010년 2월 14일 오후 3시 25분'], + ['LLLL', '2010년 2월 14일 일요일 오후 3시 25분'] + ], + b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)), + i; + for (i = 0; i < a.length; i++) { + test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]); + } + test.done(); + }, + + "format ordinal" : function(test) { + test.expect(31); + moment.lang('kr'); + test.equal(moment([2011, 0, 1]).format('DDDo'), '1일', '1일'); + test.equal(moment([2011, 0, 2]).format('DDDo'), '2일', '2일'); + test.equal(moment([2011, 0, 3]).format('DDDo'), '3일', '3일'); + test.equal(moment([2011, 0, 4]).format('DDDo'), '4일', '4일'); + test.equal(moment([2011, 0, 5]).format('DDDo'), '5일', '5일'); + test.equal(moment([2011, 0, 6]).format('DDDo'), '6일', '6일'); + test.equal(moment([2011, 0, 7]).format('DDDo'), '7일', '7일'); + test.equal(moment([2011, 0, 8]).format('DDDo'), '8일', '8일'); + test.equal(moment([2011, 0, 9]).format('DDDo'), '9일', '9일'); + test.equal(moment([2011, 0, 10]).format('DDDo'), '10일', '10일'); + + test.equal(moment([2011, 0, 11]).format('DDDo'), '11일', '11일'); + test.equal(moment([2011, 0, 12]).format('DDDo'), '12일', '12일'); + test.equal(moment([2011, 0, 13]).format('DDDo'), '13일', '13일'); + test.equal(moment([2011, 0, 14]).format('DDDo'), '14일', '14일'); + test.equal(moment([2011, 0, 15]).format('DDDo'), '15일', '15일'); + test.equal(moment([2011, 0, 16]).format('DDDo'), '16일', '16일'); + test.equal(moment([2011, 0, 17]).format('DDDo'), '17일', '17일'); + test.equal(moment([2011, 0, 18]).format('DDDo'), '18일', '18일'); + test.equal(moment([2011, 0, 19]).format('DDDo'), '19일', '19일'); + test.equal(moment([2011, 0, 20]).format('DDDo'), '20일', '20일'); + + test.equal(moment([2011, 0, 21]).format('DDDo'), '21일', '21일'); + test.equal(moment([2011, 0, 22]).format('DDDo'), '22일', '22일'); + test.equal(moment([2011, 0, 23]).format('DDDo'), '23일', '23일'); + test.equal(moment([2011, 0, 24]).format('DDDo'), '24일', '24일'); + test.equal(moment([2011, 0, 25]).format('DDDo'), '25일', '25일'); + test.equal(moment([2011, 0, 26]).format('DDDo'), '26일', '26일'); + test.equal(moment([2011, 0, 27]).format('DDDo'), '27일', '27일'); + test.equal(moment([2011, 0, 28]).format('DDDo'), '28일', '28일'); + test.equal(moment([2011, 0, 29]).format('DDDo'), '29일', '29일'); + test.equal(moment([2011, 0, 30]).format('DDDo'), '30일', '30일'); + + test.equal(moment([2011, 0, 31]).format('DDDo'), '31일', '31일'); + test.done(); + }, + + "format month" : function(test) { + test.expect(12); + moment.lang('kr'); + var expected = '1월 1월_2월 2월_3월 3월_4월 4월_5월 5월_6월 6월_7월 7월_8월 8월_9월 9월_10월 10월_11월 11월_12월 12월'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]); + } + test.done(); + }, + + "format week" : function(test) { + test.expect(7); + moment.lang('kr'); + var expected = '일요일 일 일_월요일 월 월_화요일 화 화_수요일 수 수_목요일 목 목_금요일 금 금_토요일 토 토'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]); + } + test.done(); + }, + + "from" : function(test) { + test.expect(30); + moment.lang('kr'); + var start = moment([2007, 1, 28]); + test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "몇초", "44초 = 몇초"); + test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "일분", "45초 = 일분"); + test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "일분", "89초 = 일분"); + test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2분", "90초 = 2분"); + test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44분", "44분 = 44분"); + test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "한시간", "45분 = 한시간"); + test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "한시간", "89분 = 한시간"); + test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2시간", "90분 = 2시간"); + test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5시간", "5시간 = 5시간"); + test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21시간", "21시간 = 21시간"); + test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "하루", "22시간 = 하루"); + test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "하루", "35시간 = 하루"); + test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2일", "36시간 = 2일"); + test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "하루", "하루 = 하루"); + test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5일", "5일 = 5일"); + test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25일", "25일 = 25일"); + test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "한달", "26일 = 한달"); + test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "한달", "30일 = 한달"); + test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "한달", "45일 = 한달"); + test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2달", "46일 = 2달"); + test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2달", "75일 = 2달"); + test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3달", "76일 = 3달"); + test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "한달", "1달 = 한달"); + test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5달", "5달 = 5달"); + test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11달", "344일 = 11달"); + test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "일년", "345일 = 일년"); + test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "일년", "547일 = 일년"); + test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2년", "548일 = 2년"); + test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "일년", "일년 = 일년"); + test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5년", "5년 = 5년"); + test.done(); + }, + + "suffix" : function(test) { + test.expect(2); + moment.lang('kr'); + test.equal(moment(30000).from(0), "몇초 후", "prefix"); + test.equal(moment(0).from(30000), "몇초 전", "suffix"); + test.done(); + }, + + "now from now" : function(test) { + test.expect(1); + moment.lang('kr'); + test.equal(moment().fromNow(), "몇초 전", "now from now should display as in the past"); + test.done(); + }, + + "fromNow" : function(test) { + test.expect(2); + moment.lang('kr'); + test.equal(moment().add({s:30}).fromNow(), "몇초 후", "in a few seconds"); + test.equal(moment().add({d:5}).fromNow(), "5일 후", "in 5 days"); + test.done(); + }, + + "calendar day" : function(test) { + test.expect(6); + moment.lang('kr'); + + var a = moment().hours(2).minutes(0).seconds(0); + + test.equal(moment(a).calendar(), "오늘 오전 2시 00분", "today at the same time"); + test.equal(moment(a).add({ m: 25 }).calendar(), "오늘 오전 2시 25분", "Now plus 25 min"); + test.equal(moment(a).add({ h: 1 }).calendar(), "오늘 오전 3시 00분", "Now plus 1 hour"); + test.equal(moment(a).add({ d: 1 }).calendar(), "내일 오전 2시 00분", "tomorrow at the same time"); + test.equal(moment(a).subtract({ h: 1 }).calendar(), "오늘 오전 1시 00분", "Now minus 1 hour"); + test.equal(moment(a).subtract({ d: 1 }).calendar(), "어제 오전 2시 00분", "yesterday at the same time"); + test.done(); + }, + + "calendar next week" : function(test) { + test.expect(15); + moment.lang('kr'); + + var i; + var m; + + for (i = 2; i < 7; i++) { + m = moment().add({ d: i }); + test.equal(m.calendar(), m.format('dddd LT'), "Today + " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('dddd LT'), "Today + " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('dddd LT'), "Today + " + i + " days end of day"); + } + test.done(); + }, + + "calendar last week" : function(test) { + test.expect(15); + moment.lang('kr'); + + for (i = 2; i < 7; i++) { + m = moment().subtract({ d: i }); + test.equal(m.calendar(), m.format('지난주 dddd LT'), "Today - " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('지난주 dddd LT'), "Today - " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('지난주 dddd LT'), "Today - " + i + " days end of day"); + } + test.done(); + }, + + "calendar all else" : function(test) { + test.expect(4); + moment.lang('kr'); + var weeksAgo = moment().subtract({ w: 1 }); + var weeksFromNow = moment().add({ w: 1 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week"); + + weeksAgo = moment().subtract({ w: 2 }); + weeksFromNow = moment().add({ w: 2 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks"); + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/lang/nb.js b/node_modules/emailjs/node_modules/moment/test/lang/nb.js new file mode 100644 index 0000000..6d0ab02 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/lang/nb.js @@ -0,0 +1,248 @@ +var moment = require("../../moment"); + + + /************************************************** + Norwegian bokmål + *************************************************/ + +exports["lang:nb"] = { + "parse" : function(test) { + test.expect(96); + moment.lang('nb'); + var tests = 'januar jan_februar feb_mars mar_april apr_mai mai_juni jun_juli jul_august aug_september sep_oktober okt_november nov_desember des'.split("_"); + var i; + function equalTest(input, mmm, i) { + test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1)); + } + for (i = 0; i < 12; i++) { + tests[i] = tests[i].split(' '); + equalTest(tests[i][0], 'MMM', i); + equalTest(tests[i][1], 'MMM', i); + equalTest(tests[i][0], 'MMMM', i); + equalTest(tests[i][1], 'MMMM', i); + equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i); + } + test.done(); + }, + + "format" : function(test) { + test.expect(18); + moment.lang('nb'); + var a = [ + ['dddd, MMMM Do YYYY, h:mm:ss a', 'søndag, februar 14. 2010, 3:25:50 pm'], + ['ddd, hA', 'søn, 3PM'], + ['M Mo MM MMMM MMM', '2 2. 02 februar feb'], + ['YYYY YY', '2010 10'], + ['D Do DD', '14 14. 14'], + ['d do dddd ddd dd', '0 0. søndag søn sø'], + ['DDD DDDo DDDD', '45 45. 045'], + ['w wo ww', '8 8. 08'], + ['h hh', '3 03'], + ['H HH', '15 15'], + ['m mm', '25 25'], + ['s ss', '50 50'], + ['a A', 'pm PM'], + ['t\\he DDDo \\d\\ay of t\\he ye\\ar', 'the 45. day of the year'], + ['L', '2010-02-14'], + ['LL', '14 februar 2010'], + ['LLL', '14 februar 2010 15:25'], + ['LLLL', 'søndag 14 februar 2010 15:25'] + ], + b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)), + i; + for (i = 0; i < a.length; i++) { + test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]); + } + test.done(); + }, + + "format ordinal" : function(test) { + test.expect(31); + moment.lang('nb'); + test.equal(moment([2011, 0, 1]).format('DDDo'), '1.', '1.'); + test.equal(moment([2011, 0, 2]).format('DDDo'), '2.', '2.'); + test.equal(moment([2011, 0, 3]).format('DDDo'), '3.', '3.'); + test.equal(moment([2011, 0, 4]).format('DDDo'), '4.', '4.'); + test.equal(moment([2011, 0, 5]).format('DDDo'), '5.', '5.'); + test.equal(moment([2011, 0, 6]).format('DDDo'), '6.', '6.'); + test.equal(moment([2011, 0, 7]).format('DDDo'), '7.', '7.'); + test.equal(moment([2011, 0, 8]).format('DDDo'), '8.', '8.'); + test.equal(moment([2011, 0, 9]).format('DDDo'), '9.', '9.'); + test.equal(moment([2011, 0, 10]).format('DDDo'), '10.', '10.'); + + test.equal(moment([2011, 0, 11]).format('DDDo'), '11.', '11.'); + test.equal(moment([2011, 0, 12]).format('DDDo'), '12.', '12.'); + test.equal(moment([2011, 0, 13]).format('DDDo'), '13.', '13.'); + test.equal(moment([2011, 0, 14]).format('DDDo'), '14.', '14.'); + test.equal(moment([2011, 0, 15]).format('DDDo'), '15.', '15.'); + test.equal(moment([2011, 0, 16]).format('DDDo'), '16.', '16.'); + test.equal(moment([2011, 0, 17]).format('DDDo'), '17.', '17.'); + test.equal(moment([2011, 0, 18]).format('DDDo'), '18.', '18.'); + test.equal(moment([2011, 0, 19]).format('DDDo'), '19.', '19.'); + test.equal(moment([2011, 0, 20]).format('DDDo'), '20.', '20.'); + + test.equal(moment([2011, 0, 21]).format('DDDo'), '21.', '21.'); + test.equal(moment([2011, 0, 22]).format('DDDo'), '22.', '22.'); + test.equal(moment([2011, 0, 23]).format('DDDo'), '23.', '23.'); + test.equal(moment([2011, 0, 24]).format('DDDo'), '24.', '24.'); + test.equal(moment([2011, 0, 25]).format('DDDo'), '25.', '25.'); + test.equal(moment([2011, 0, 26]).format('DDDo'), '26.', '26.'); + test.equal(moment([2011, 0, 27]).format('DDDo'), '27.', '27.'); + test.equal(moment([2011, 0, 28]).format('DDDo'), '28.', '28.'); + test.equal(moment([2011, 0, 29]).format('DDDo'), '29.', '29.'); + test.equal(moment([2011, 0, 30]).format('DDDo'), '30.', '30.'); + + test.equal(moment([2011, 0, 31]).format('DDDo'), '31.', '31.'); + test.done(); + }, + + "format month" : function(test) { + test.expect(12); + moment.lang('nb'); + var expected = 'januar jan_februar feb_mars mar_april apr_mai mai_juni jun_juli jul_august aug_september sep_oktober okt_november nov_desember des'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]); + } + test.done(); + }, + + "format week" : function(test) { + test.expect(7); + moment.lang('nb'); + var expected = 'søndag søn sø_mandag man ma_tirsdag tir ti_onsdag ons on_torsdag tor to_fredag fre fr_lørdag lør lø'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]); + } + test.done(); + }, + + "from" : function(test) { + test.expect(30); + moment.lang('nb'); + var start = moment([2007, 1, 28]); + test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "noen sekunder", "44 sekunder = a few seconds"); + test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "ett minutt", "45 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "ett minutt", "89 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minutter", "90 seconds = 2 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minutter", "44 minutes = 44 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "en time", "45 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "en time", "89 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 timer", "90 minutes = 2 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 timer", "5 hours = 5 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 timer", "21 hours = 21 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "en dag", "22 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "en dag", "35 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 dager", "36 hours = 2 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "en dag", "1 day = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 dager", "5 days = 5 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 dager", "25 days = 25 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "en måned", "26 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "en måned", "30 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "en måned", "45 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 måneder", "46 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 måneder", "75 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 måneder", "76 days = 3 months"); + test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "en måned", "1 month = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 måneder", "5 months = 5 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 måneder", "344 days = 11 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "ett år", "345 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "ett år", "547 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 år", "548 days = 2 years"); + test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "ett år", "1 year = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 år", "5 years = 5 years"); + test.done(); + }, + + "suffix" : function(test) { + test.expect(2); + moment.lang('nb'); + test.equal(moment(30000).from(0), "om noen sekunder", "prefix"); + test.equal(moment(0).from(30000), "for noen sekunder siden", "suffix"); + test.done(); + }, + + "now from now" : function(test) { + test.expect(1); + moment.lang('nb'); + test.equal(moment().fromNow(), "for noen sekunder siden", "now from now should display as in the past"); + test.done(); + }, + + "fromNow" : function(test) { + test.expect(2); + moment.lang('nb'); + test.equal(moment().add({s:30}).fromNow(), "om noen sekunder", "in a few seconds"); + test.equal(moment().add({d:5}).fromNow(), "om 5 dager", "in 5 days"); + test.done(); + }, + + "calendar day" : function(test) { + test.expect(6); + moment.lang('nb'); + + var a = moment().hours(2).minutes(0).seconds(0); + + test.equal(moment(a).calendar(), "I dag klokken 02:00", "today at the same time"); + test.equal(moment(a).add({ m: 25 }).calendar(), "I dag klokken 02:25", "Now plus 25 min"); + test.equal(moment(a).add({ h: 1 }).calendar(), "I dag klokken 03:00", "Now plus 1 hour"); + test.equal(moment(a).add({ d: 1 }).calendar(), "I morgen klokken 02:00", "tomorrow at the same time"); + test.equal(moment(a).subtract({ h: 1 }).calendar(), "I dag klokken 01:00", "Now minus 1 hour"); + test.equal(moment(a).subtract({ d: 1 }).calendar(), "I går klokken 02:00", "yesterday at the same time"); + test.done(); + }, + + "calendar next week" : function(test) { + test.expect(15); + moment.lang('nb'); + + var i; + var m; + + for (i = 2; i < 7; i++) { + m = moment().add({ d: i }); + test.equal(m.calendar(), m.format('dddd [klokken] LT'), "Today + " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('dddd [klokken] LT'), "Today + " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('dddd [klokken] LT'), "Today + " + i + " days end of day"); + } + test.done(); + }, + + "calendar last week" : function(test) { + test.expect(15); + moment.lang('nb'); + + for (i = 2; i < 7; i++) { + m = moment().subtract({ d: i }); + test.equal(m.calendar(), m.format('[Forrige] dddd [klokken] LT'), "Today - " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('[Forrige] dddd [klokken] LT'), "Today - " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('[Forrige] dddd [klokken] LT'), "Today - " + i + " days end of day"); + } + test.done(); + }, + + "calendar all else" : function(test) { + test.expect(4); + moment.lang('nb'); + var weeksAgo = moment().subtract({ w: 1 }); + var weeksFromNow = moment().add({ w: 1 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week"); + + weeksAgo = moment().subtract({ w: 2 }); + weeksFromNow = moment().add({ w: 2 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks"); + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/lang/nl.js b/node_modules/emailjs/node_modules/moment/test/lang/nl.js new file mode 100644 index 0000000..6d65255 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/lang/nl.js @@ -0,0 +1,258 @@ +var moment = require("../../moment"); + + + /************************************************** + Dutch + *************************************************/ + +exports["lang:nl"] = { + "parse" : function(test) { + test.expect(96); + moment.lang('nl'); + var tests = 'januari jan._februari feb._maart mrt._april apr._mei mei._juni jun._juli jul._augustus aug._september sep._oktober okt._november nov._december dec.'.split("_"); + var i; + function equalTest(input, mmm, i) { + test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1)); + } + for (i = 0; i < 12; i++) { + tests[i] = tests[i].split(' '); + equalTest(tests[i][0], 'MMM', i); + equalTest(tests[i][1], 'MMM', i); + equalTest(tests[i][0], 'MMMM', i); + equalTest(tests[i][1], 'MMMM', i); + equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i); + } + test.done(); + }, + + "format" : function(test) { + test.expect(18); + moment.lang('nl'); + var a = [ + ['dddd, MMMM Do YYYY, HH:mm:ss', 'zondag, februari 14de 2010, 15:25:50'], + ['ddd, HH', 'zo., 15'], + ['M Mo MM MMMM MMM', '2 2de 02 februari feb.'], + ['YYYY YY', '2010 10'], + ['D Do DD', '14 14de 14'], + ['d do dddd ddd dd', '0 0de zondag zo. Zo'], + ['DDD DDDo DDDD', '45 45ste 045'], + ['w wo ww', '8 8ste 08'], + ['h hh', '3 03'], + ['H HH', '15 15'], + ['m mm', '25 25'], + ['s ss', '50 50'], + ['a A', 'pm PM'], + ['t\\he DDDo \\d\\ay of t\\he ye\\ar', 'the 45ste day of the year'], + ['L', '14-02-2010'], + ['LL', '14 februari 2010'], + ['LLL', '14 februari 2010 15:25'], + ['LLLL', 'zondag 14 februari 2010 15:25'] + ], + b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)), + i; + for (i = 0; i < a.length; i++) { + test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]); + } + test.done(); + }, + + "format ordinal" : function(test) { + test.expect(31); + moment.lang('nl'); + test.equal(moment([2011, 0, 1]).format('DDDo'), '1ste', '1ste'); + test.equal(moment([2011, 0, 2]).format('DDDo'), '2de', '2de'); + test.equal(moment([2011, 0, 3]).format('DDDo'), '3de', '3de'); + test.equal(moment([2011, 0, 4]).format('DDDo'), '4de', '4de'); + test.equal(moment([2011, 0, 5]).format('DDDo'), '5de', '5de'); + test.equal(moment([2011, 0, 6]).format('DDDo'), '6de', '6de'); + test.equal(moment([2011, 0, 7]).format('DDDo'), '7de', '7de'); + test.equal(moment([2011, 0, 8]).format('DDDo'), '8ste', '8ste'); + test.equal(moment([2011, 0, 9]).format('DDDo'), '9de', '9de'); + test.equal(moment([2011, 0, 10]).format('DDDo'), '10de', '10de'); + + test.equal(moment([2011, 0, 11]).format('DDDo'), '11de', '11de'); + test.equal(moment([2011, 0, 12]).format('DDDo'), '12de', '12de'); + test.equal(moment([2011, 0, 13]).format('DDDo'), '13de', '13de'); + test.equal(moment([2011, 0, 14]).format('DDDo'), '14de', '14de'); + test.equal(moment([2011, 0, 15]).format('DDDo'), '15de', '15de'); + test.equal(moment([2011, 0, 16]).format('DDDo'), '16de', '16de'); + test.equal(moment([2011, 0, 17]).format('DDDo'), '17de', '17de'); + test.equal(moment([2011, 0, 18]).format('DDDo'), '18de', '18de'); + test.equal(moment([2011, 0, 19]).format('DDDo'), '19de', '19de'); + test.equal(moment([2011, 0, 20]).format('DDDo'), '20ste', '20ste'); + + test.equal(moment([2011, 0, 21]).format('DDDo'), '21ste', '21ste'); + test.equal(moment([2011, 0, 22]).format('DDDo'), '22ste', '22ste'); + test.equal(moment([2011, 0, 23]).format('DDDo'), '23ste', '23ste'); + test.equal(moment([2011, 0, 24]).format('DDDo'), '24ste', '24ste'); + test.equal(moment([2011, 0, 25]).format('DDDo'), '25ste', '25ste'); + test.equal(moment([2011, 0, 26]).format('DDDo'), '26ste', '26ste'); + test.equal(moment([2011, 0, 27]).format('DDDo'), '27ste', '27ste'); + test.equal(moment([2011, 0, 28]).format('DDDo'), '28ste', '28ste'); + test.equal(moment([2011, 0, 29]).format('DDDo'), '29ste', '29ste'); + test.equal(moment([2011, 0, 30]).format('DDDo'), '30ste', '30ste'); + + test.equal(moment([2011, 0, 31]).format('DDDo'), '31ste', '31ste'); + test.done(); + }, + + "format month" : function(test) { + test.expect(12); + moment.lang('nl'); + var expected = 'januari jan._februari feb._maart mrt._april apr._mei mei_juni jun._juli jul._augustus aug._september sep._oktober okt._november nov._december dec.'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]); + } + test.done(); + }, + + "format week" : function(test) { + test.expect(7); + moment.lang('nl'); + var expected = 'zondag zo. Zo_maandag ma. Ma_dinsdag di. Di_woensdag wo. Wo_donderdag do. Do_vrijdag vr. Vr_zaterdag za. Za'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]); + } + test.done(); + }, + + "from" : function(test) { + test.expect(30); + moment.lang('nl'); + var start = moment([2007, 1, 28]); + test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "een paar seconden", "44 seconds = a few seconds"); + test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "één minuut", "45 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "één minuut", "89 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minuten", "90 seconds = 2 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minuten", "44 minutes = 44 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "één uur", "45 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "één uur", "89 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 uur", "90 minutes = 2 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 uur", "5 hours = 5 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 uur", "21 hours = 21 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "één dag", "22 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "één dag", "35 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 dagen", "36 hours = 2 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "één dag", "1 day = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 dagen", "5 days = 5 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 dagen", "25 days = 25 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "één maand", "26 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "één maand", "30 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "één maand", "45 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 maanden", "46 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 maanden", "75 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 maanden", "76 days = 3 months"); + test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "één maand", "1 month = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 maanden", "5 months = 5 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 maanden", "344 days = 11 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "één jaar", "345 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "één jaar", "547 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 jaar", "548 days = 2 years"); + test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "één jaar", "1 year = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 jaar", "5 years = 5 years"); + test.done(); + }, + + "suffix" : function(test) { + test.expect(2); + moment.lang('nl'); + test.equal(moment(30000).from(0), "over een paar seconden", "prefix"); + test.equal(moment(0).from(30000), "een paar seconden geleden", "suffix"); + test.done(); + }, + + "now from now" : function(test) { + test.expect(1); + moment.lang('nl'); + test.equal(moment().fromNow(), "een paar seconden geleden", "now from now should display as in the past"); + test.done(); + }, + + "fromNow" : function(test) { + test.expect(2); + moment.lang('nl'); + test.equal(moment().add({s:30}).fromNow(), "over een paar seconden", "in a few seconds"); + test.equal(moment().add({d:5}).fromNow(), "over 5 dagen", "in 5 days"); + test.done(); + }, + + "calendar day" : function(test) { + test.expect(6); + moment.lang('nl'); + + var a = moment().hours(2).minutes(0).seconds(0); + + test.equal(moment(a).calendar(), "Vandaag om 02:00", "today at the same time"); + test.equal(moment(a).add({ m: 25 }).calendar(), "Vandaag om 02:25", "Now plus 25 min"); + test.equal(moment(a).add({ h: 1 }).calendar(), "Vandaag om 03:00", "Now plus 1 hour"); + test.equal(moment(a).add({ d: 1 }).calendar(), "Morgen om 02:00", "tomorrow at the same time"); + test.equal(moment(a).subtract({ h: 1 }).calendar(), "Vandaag om 01:00", "Now minus 1 hour"); + test.equal(moment(a).subtract({ d: 1 }).calendar(), "Gisteren om 02:00", "yesterday at the same time"); + test.done(); + }, + + "calendar next week" : function(test) { + test.expect(15); + moment.lang('nl'); + + var i; + var m; + + for (i = 2; i < 7; i++) { + m = moment().add({ d: i }); + test.equal(m.calendar(), m.format('dddd [om] LT'), "Today + " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('dddd [om] LT'), "Today + " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('dddd [om] LT'), "Today + " + i + " days end of day"); + } + test.done(); + }, + + "calendar last week" : function(test) { + test.expect(15); + moment.lang('nl'); + + for (i = 2; i < 7; i++) { + m = moment().subtract({ d: i }); + test.equal(m.calendar(), m.format('[afgelopen] dddd [om] LT'), "Today - " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('[afgelopen] dddd [om] LT'), "Today - " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('[afgelopen] dddd [om] LT'), "Today - " + i + " days end of day"); + } + test.done(); + }, + + "calendar all else" : function(test) { + test.expect(4); + moment.lang('nl'); + var weeksAgo = moment().subtract({ w: 1 }); + var weeksFromNow = moment().add({ w: 1 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week"); + + weeksAgo = moment().subtract({ w: 2 }); + weeksFromNow = moment().add({ w: 2 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks"); + test.done(); + }, + + "month abbreviation" : function(test) { + test.expect(2); + moment.lang('nl'); + + test.equal(moment([2012, 5, 23]).format('D-MMM-YYYY'), '23-jun-2012', 'format month abbreviation surrounded by dashes should not include a dot'); + test.equal(moment([2012, 5, 23]).format('D MMM YYYY'), '23 jun. 2012', 'format month abbreviation not surrounded by dashes should include a dot'); + + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/lang/pl.js b/node_modules/emailjs/node_modules/moment/test/lang/pl.js new file mode 100644 index 0000000..9e315f5 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/lang/pl.js @@ -0,0 +1,249 @@ +var moment = require("../../moment"); + + + /************************************************** + Polish + *************************************************/ + +exports["lang:pl"] = { + "parse" : function(test) { + test.expect(96); + moment.lang('pl'); + var tests = 'styczeń sty_luty lut_marzec mar_kwiecień kwi_maj maj_czerwiec cze_lipiec lip_sierpień sie_wrzesień wrz_październik paź_listopad lis_grudzień gru'.split("_"); + var i; + function equalTest(input, mmm, i) { + test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1)); + } + for (i = 0; i < 12; i++) { + tests[i] = tests[i].split(' '); + equalTest(tests[i][0], 'MMM', i); + equalTest(tests[i][1], 'MMM', i); + equalTest(tests[i][0], 'MMMM', i); + equalTest(tests[i][1], 'MMMM', i); + equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i); + } + test.done(); + }, + + "format" : function(test) { + test.expect(18); + moment.lang('pl'); + var a = [ + ['dddd, MMMM Do YYYY, h:mm:ss a', 'niedziela, luty 14. 2010, 3:25:50 pm'], + ['ddd, hA', 'nie, 3PM'], + ['M Mo MM MMMM MMM', '2 2. 02 luty lut'], + ['YYYY YY', '2010 10'], + ['D Do DD', '14 14. 14'], + ['d do dddd ddd dd', '0 0. niedziela nie N'], + ['DDD DDDo DDDD', '45 45. 045'], + ['w wo ww', '8 8. 08'], + ['h hh', '3 03'], + ['H HH', '15 15'], + ['m mm', '25 25'], + ['s ss', '50 50'], + ['a A', 'pm PM'], + ['t\\he DDDo \\d\\ay of t\\he ye\\ar', 'the 45. day of the year'], + ['L', '14-02-2010'], + ['LL', '14 luty 2010'], + ['LLL', '14 luty 2010 15:25'], + ['LLLL', 'niedziela, 14 luty 2010 15:25'] + ], + b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)), + i; + for (i = 0; i < a.length; i++) { + test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]); + } + test.done(); + }, + + "format ordinal" : function(test) { + test.expect(31); + moment.lang('pl'); + test.equal(moment([2011, 0, 1]).format('DDDo'), '1.', '1.'); + test.equal(moment([2011, 0, 2]).format('DDDo'), '2.', '2.'); + test.equal(moment([2011, 0, 3]).format('DDDo'), '3.', '3.'); + test.equal(moment([2011, 0, 4]).format('DDDo'), '4.', '4.'); + test.equal(moment([2011, 0, 5]).format('DDDo'), '5.', '5.'); + test.equal(moment([2011, 0, 6]).format('DDDo'), '6.', '6.'); + test.equal(moment([2011, 0, 7]).format('DDDo'), '7.', '7.'); + test.equal(moment([2011, 0, 8]).format('DDDo'), '8.', '8.'); + test.equal(moment([2011, 0, 9]).format('DDDo'), '9.', '9.'); + test.equal(moment([2011, 0, 10]).format('DDDo'), '10.', '10.'); + + test.equal(moment([2011, 0, 11]).format('DDDo'), '11.', '11.'); + test.equal(moment([2011, 0, 12]).format('DDDo'), '12.', '12.'); + test.equal(moment([2011, 0, 13]).format('DDDo'), '13.', '13.'); + test.equal(moment([2011, 0, 14]).format('DDDo'), '14.', '14.'); + test.equal(moment([2011, 0, 15]).format('DDDo'), '15.', '15.'); + test.equal(moment([2011, 0, 16]).format('DDDo'), '16.', '16.'); + test.equal(moment([2011, 0, 17]).format('DDDo'), '17.', '17.'); + test.equal(moment([2011, 0, 18]).format('DDDo'), '18.', '18.'); + test.equal(moment([2011, 0, 19]).format('DDDo'), '19.', '19.'); + test.equal(moment([2011, 0, 20]).format('DDDo'), '20.', '20.'); + + test.equal(moment([2011, 0, 21]).format('DDDo'), '21.', '21.'); + test.equal(moment([2011, 0, 22]).format('DDDo'), '22.', '22.'); + test.equal(moment([2011, 0, 23]).format('DDDo'), '23.', '23.'); + test.equal(moment([2011, 0, 24]).format('DDDo'), '24.', '24.'); + test.equal(moment([2011, 0, 25]).format('DDDo'), '25.', '25.'); + test.equal(moment([2011, 0, 26]).format('DDDo'), '26.', '26.'); + test.equal(moment([2011, 0, 27]).format('DDDo'), '27.', '27.'); + test.equal(moment([2011, 0, 28]).format('DDDo'), '28.', '28.'); + test.equal(moment([2011, 0, 29]).format('DDDo'), '29.', '29.'); + test.equal(moment([2011, 0, 30]).format('DDDo'), '30.', '30.'); + + test.equal(moment([2011, 0, 31]).format('DDDo'), '31.', '31.'); + test.done(); + }, + + "format month" : function(test) { + test.expect(12); + moment.lang('pl'); + var expected = 'styczeń sty_luty lut_marzec mar_kwiecień kwi_maj maj_czerwiec cze_lipiec lip_sierpień sie_wrzesień wrz_październik paź_listopad lis_grudzień gru'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]); + } + test.done(); + }, + + "format week" : function(test) { + test.expect(7); + moment.lang('pl'); + var expected = 'niedziela nie N_poniedziałek pon Pn_wtorek wt Wt_środa śr Śr_czwartek czw Cz_piątek pt Pt_sobota sb So'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]); + } + test.done(); + }, + + "from" : function(test) { + test.expect(30); + moment.lang('pl'); + var start = moment([2007, 1, 28]); + test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "kilka sekund", "44 seconds = a few seconds"); + test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "minuta", "45 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "minuta", "89 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minuty", "90 seconds = 2 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minuty", "44 minutes = 44 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "godzina", "45 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "godzina", "89 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 godziny", "90 minutes = 2 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 godzin", "5 hours = 5 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 godzin", "21 hours = 21 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "1 dzień", "22 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "1 dzień", "35 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 dni", "36 hours = 2 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "1 dzień", "1 day = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 dni", "5 days = 5 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 dni", "25 days = 25 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "miesiąc", "26 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "miesiąc", "30 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "miesiąc", "45 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 miesiące", "46 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 miesiące", "75 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 miesiące", "76 days = 3 months"); + test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "miesiąc", "1 month = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 miesięcy", "5 months = 5 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 miesięcy", "344 days = 11 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "rok", "345 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "rok", "547 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 lata", "548 days = 2 years"); + test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "rok", "1 year = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 lat", "5 years = 5 years"); + test.done(); + }, + + "suffix" : function(test) { + test.expect(2); + moment.lang('pl'); + test.equal(moment(30000).from(0), "za kilka sekund", "prefix"); + test.equal(moment(0).from(30000), "kilka sekund temu", "suffix"); + test.done(); + }, + + "now from now" : function(test) { + test.expect(1); + moment.lang('pl'); + test.equal(moment().fromNow(), "kilka sekund temu", "now from now should display as in the past"); + test.done(); + }, + + "fromNow" : function(test) { + test.expect(3); + moment.lang('pl'); + test.equal(moment().add({s:30}).fromNow(), "za kilka sekund", "in a few seconds"); + test.equal(moment().add({h:1}).fromNow(), "za godzinę", "in an hour"); + test.equal(moment().add({d:5}).fromNow(), "za 5 dni", "in 5 days"); + test.done(); + }, + + "calendar day" : function(test) { + test.expect(6); + moment.lang('pl'); + + var a = moment().hours(2).minutes(0).seconds(0); + + test.equal(moment(a).calendar(), "Dziś o 02:00", "today at the same time"); + test.equal(moment(a).add({ m: 25 }).calendar(), "Dziś o 02:25", "Now plus 25 min"); + test.equal(moment(a).add({ h: 1 }).calendar(), "Dziś o 03:00", "Now plus 1 hour"); + test.equal(moment(a).add({ d: 1 }).calendar(), "Jutro o 02:00", "tomorrow at the same time"); + test.equal(moment(a).subtract({ h: 1 }).calendar(), "Dziś o 01:00", "Now minus 1 hour"); + test.equal(moment(a).subtract({ d: 1 }).calendar(), "Wczoraj o 02:00", "yesterday at the same time"); + test.done(); + }, + + "calendar next week" : function(test) { + test.expect(15); + moment.lang('pl'); + + var i; + var m; + + for (i = 2; i < 7; i++) { + m = moment().add({ d: i }); + test.equal(m.calendar(), m.format('[W] dddd [o] LT'), "Today + " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('[W] dddd [o] LT'), "Today + " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('[W] dddd [o] LT'), "Today + " + i + " days end of day"); + } + test.done(); + }, + + "calendar last week" : function(test) { + test.expect(15); + moment.lang('pl'); + + for (i = 2; i < 7; i++) { + m = moment().subtract({ d: i }); + test.equal(m.calendar(), m.format('[W zeszły/łą] dddd [o] LT'), "Today - " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('[W zeszły/łą] dddd [o] LT'), "Today - " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('[W zeszły/łą] dddd [o] LT'), "Today - " + i + " days end of day"); + } + test.done(); + }, + + "calendar all else" : function(test) { + test.expect(4); + moment.lang('pl'); + var weeksAgo = moment().subtract({ w: 1 }); + var weeksFromNow = moment().add({ w: 1 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week"); + + weeksAgo = moment().subtract({ w: 2 }); + weeksFromNow = moment().add({ w: 2 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks"); + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/lang/pt-br.js b/node_modules/emailjs/node_modules/moment/test/lang/pt-br.js new file mode 100644 index 0000000..9f6b935 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/lang/pt-br.js @@ -0,0 +1,241 @@ +var moment = require("../../moment"); + + + /************************************************** + Portuguese - Brazilian + *************************************************/ + +exports["lang:pt-br"] = { + "parse" : function(test) { + test.expect(96); + moment.lang('pt-br'); + var tests = 'Janeiro Jan_Fevereiro Fev_Março Mar_Abril Abr_Maio Mai_Junho Jun_Julho Jul_Agosto Ago_Setembro Set_Outubro Out_Novembro Nov_Dezembro Dez'.split("_"); + var i; + function equalTest(input, mmm, i) { + test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1)); + } + for (i = 0; i < 12; i++) { + tests[i] = tests[i].split(' '); + equalTest(tests[i][0], 'MMM', i); + equalTest(tests[i][1], 'MMM', i); + equalTest(tests[i][0], 'MMMM', i); + equalTest(tests[i][1], 'MMMM', i); + equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i); + } + test.done(); + }, + + "format" : function(test) { + test.expect(18); + moment.lang('pt-br'); + var a = [ + ['dddd, MMMM Do YYYY, h:mm:ss a', 'Domingo, Fevereiro 14º 2010, 3:25:50 pm'], + ['ddd, hA', 'Dom, 3PM'], + ['M Mo MM MMMM MMM', '2 2º 02 Fevereiro Fev'], + ['YYYY YY', '2010 10'], + ['D Do DD', '14 14º 14'], + ['d do dddd ddd', '0 0º Domingo Dom'], + ['DDD DDDo DDDD', '45 45º 045'], + ['w wo ww', '8 8º 08'], + ['h hh', '3 03'], + ['H HH', '15 15'], + ['m mm', '25 25'], + ['s ss', '50 50'], + ['a A', 'pm PM'], + ['t\\he DDDo \\d\\ay of t\\he ye\\ar', 'the 45º day of the year'], + ['L', '14/02/2010'], + ['LL', '14 de Fevereiro de 2010'], + ['LLL', '14 de Fevereiro de 2010 15:25'], + ['LLLL', 'Domingo, 14 de Fevereiro de 2010 15:25'] + ], + b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)), + i; + for (i = 0; i < a.length; i++) { + test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]); + } + test.done(); + }, + + "format ordinal" : function(test) { + test.expect(31); + moment.lang('pt-br'); + test.equal(moment([2011, 0, 1]).format('DDDo'), '1º', '1º'); + test.equal(moment([2011, 0, 2]).format('DDDo'), '2º', '2º'); + test.equal(moment([2011, 0, 3]).format('DDDo'), '3º', '3º'); + test.equal(moment([2011, 0, 4]).format('DDDo'), '4º', '4º'); + test.equal(moment([2011, 0, 5]).format('DDDo'), '5º', '5º'); + test.equal(moment([2011, 0, 6]).format('DDDo'), '6º', '6º'); + test.equal(moment([2011, 0, 7]).format('DDDo'), '7º', '7º'); + test.equal(moment([2011, 0, 8]).format('DDDo'), '8º', '8º'); + test.equal(moment([2011, 0, 9]).format('DDDo'), '9º', '9º'); + test.equal(moment([2011, 0, 10]).format('DDDo'), '10º', '10º'); + + test.equal(moment([2011, 0, 11]).format('DDDo'), '11º', '11º'); + test.equal(moment([2011, 0, 12]).format('DDDo'), '12º', '12º'); + test.equal(moment([2011, 0, 13]).format('DDDo'), '13º', '13º'); + test.equal(moment([2011, 0, 14]).format('DDDo'), '14º', '14º'); + test.equal(moment([2011, 0, 15]).format('DDDo'), '15º', '15º'); + test.equal(moment([2011, 0, 16]).format('DDDo'), '16º', '16º'); + test.equal(moment([2011, 0, 17]).format('DDDo'), '17º', '17º'); + test.equal(moment([2011, 0, 18]).format('DDDo'), '18º', '18º'); + test.equal(moment([2011, 0, 19]).format('DDDo'), '19º', '19º'); + test.equal(moment([2011, 0, 20]).format('DDDo'), '20º', '20º'); + + test.equal(moment([2011, 0, 21]).format('DDDo'), '21º', '21º'); + test.equal(moment([2011, 0, 22]).format('DDDo'), '22º', '22º'); + test.equal(moment([2011, 0, 23]).format('DDDo'), '23º', '23º'); + test.equal(moment([2011, 0, 24]).format('DDDo'), '24º', '24º'); + test.equal(moment([2011, 0, 25]).format('DDDo'), '25º', '25º'); + test.equal(moment([2011, 0, 26]).format('DDDo'), '26º', '26º'); + test.equal(moment([2011, 0, 27]).format('DDDo'), '27º', '27º'); + test.equal(moment([2011, 0, 28]).format('DDDo'), '28º', '28º'); + test.equal(moment([2011, 0, 29]).format('DDDo'), '29º', '29º'); + test.equal(moment([2011, 0, 30]).format('DDDo'), '30º', '30º'); + + test.equal(moment([2011, 0, 31]).format('DDDo'), '31º', '31º'); + test.done(); + }, + + "format month" : function(test) { + test.expect(12); + moment.lang('pt-br'); + var expected = 'Janeiro Jan_Fevereiro Fev_Março Mar_Abril Abr_Maio Mai_Junho Jun_Julho Jul_Agosto Ago_Setembro Set_Outubro Out_Novembro Nov_Dezembro Dez'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]); + } + test.done(); + }, + + "format week" : function(test) { + test.expect(7); + moment.lang('pt-br'); + var expected = 'Domingo Dom_Segunda-feira Seg_Terça-feira Ter_Quarta-feira Qua_Quinta-feira Qui_Sexta-feira Sex_Sábado Sáb'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, 0, 2 + i]).format('dddd ddd'), expected[i], expected[i]); + } + test.done(); + }, + + "from" : function(test) { + test.expect(30); + moment.lang('pt-br'); + var start = moment([2007, 1, 28]); + test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "segundos", "44 seconds = seconds"); + test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "um minuto", "45 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "um minuto", "89 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minutos", "90 seconds = 2 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minutos", "44 minutes = 44 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "uma hora", "45 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "uma hora", "89 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 horas", "90 minutes = 2 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 horas", "5 hours = 5 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 horas", "21 hours = 21 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "um dia", "22 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "um dia", "35 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 dias", "36 hours = 2 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "um dia", "1 day = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 dias", "5 days = 5 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 dias", "25 days = 25 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "um mês", "26 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "um mês", "30 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "um mês", "45 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 meses", "46 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 meses", "75 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 meses", "76 days = 3 months"); + test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "um mês", "1 month = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 meses", "5 months = 5 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 meses", "344 days = 11 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "um ano", "345 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "um ano", "547 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 anos", "548 days = 2 years"); + test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "um ano", "1 year = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 anos", "5 years = 5 years"); + test.done(); + }, + + "suffix" : function(test) { + test.expect(2); + moment.lang('pt-br'); + test.equal(moment(30000).from(0), "em segundos", "prefix"); + test.equal(moment(0).from(30000), "segundos atrás", "suffix"); + test.done(); + }, + + "fromNow" : function(test) { + test.expect(2); + moment.lang('pt-br'); + test.equal(moment().add({s:30}).fromNow(), "em segundos", "in seconds"); + test.equal(moment().add({d:5}).fromNow(), "em 5 dias", "in 5 days"); + test.done(); + }, + + "calendar day" : function(test) { + test.expect(6); + moment.lang('pt-br'); + + var a = moment().hours(2).minutes(0).seconds(0); + + test.equal(moment(a).calendar(), "Hoje às 02:00", "today at the same time"); + test.equal(moment(a).add({ m: 25 }).calendar(), "Hoje às 02:25", "Now plus 25 min"); + test.equal(moment(a).add({ h: 1 }).calendar(), "Hoje às 03:00", "Now plus 1 hour"); + test.equal(moment(a).add({ d: 1 }).calendar(), "Amanhã às 02:00", "tomorrow at the same time"); + test.equal(moment(a).subtract({ h: 1 }).calendar(), "Hoje às 01:00", "Now minus 1 hour"); + test.equal(moment(a).subtract({ d: 1 }).calendar(), "Ontem às 02:00", "yesterday at the same time"); + test.done(); + }, + + "calendar next week" : function(test) { + test.expect(15); + moment.lang('pt-br'); + + var i; + var m; + + for (i = 2; i < 7; i++) { + m = moment().add({ d: i }); + test.equal(m.calendar(), m.format('dddd [às] LT'), "Today + " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('dddd [às] LT'), "Today + " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('dddd [às] LT'), "Today + " + i + " days end of day"); + } + test.done(); + }, + + "calendar last week" : function(test) { + test.expect(15); + moment.lang('pt-br'); + + for (i = 2; i < 7; i++) { + m = moment().subtract({ d: i }); + test.equal(m.calendar(), m.format((m.day() === 0 || m.day() === 6) ? '[Último] dddd [às] LT' : '[Última] dddd [às] LT'), "Today - " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format((m.day() === 0 || m.day() === 6) ? '[Último] dddd [às] LT' : '[Última] dddd [às] LT'), "Today - " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format((m.day() === 0 || m.day() === 6) ? '[Último] dddd [às] LT' : '[Última] dddd [às] LT'), "Today - " + i + " days end of day"); + } + test.done(); + }, + + "calendar all else" : function(test) { + test.expect(4); + moment.lang('pt-br'); + var weeksAgo = moment().subtract({ w: 1 }); + var weeksFromNow = moment().add({ w: 1 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week"); + + weeksAgo = moment().subtract({ w: 2 }); + weeksFromNow = moment().add({ w: 2 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks"); + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/lang/pt.js b/node_modules/emailjs/node_modules/moment/test/lang/pt.js new file mode 100644 index 0000000..27731d8 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/lang/pt.js @@ -0,0 +1,241 @@ +var moment = require("../../moment"); + + + /************************************************** + Portuguese + *************************************************/ + +exports["lang:pt"] = { + "parse" : function(test) { + test.expect(96); + moment.lang('pt'); + var tests = 'Janeiro Jan_Fevereiro Fev_Março Mar_Abril Abr_Maio Mai_Junho Jun_Julho Jul_Agosto Ago_Setembro Set_Outubro Out_Novembro Nov_Dezembro Dez'.split("_"); + var i; + function equalTest(input, mmm, i) { + test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1)); + } + for (i = 0; i < 12; i++) { + tests[i] = tests[i].split(' '); + equalTest(tests[i][0], 'MMM', i); + equalTest(tests[i][1], 'MMM', i); + equalTest(tests[i][0], 'MMMM', i); + equalTest(tests[i][1], 'MMMM', i); + equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i); + } + test.done(); + }, + + "format" : function(test) { + test.expect(18); + moment.lang('pt'); + var a = [ + ['dddd, MMMM Do YYYY, h:mm:ss a', 'Domingo, Fevereiro 14º 2010, 3:25:50 pm'], + ['ddd, hA', 'Dom, 3PM'], + ['M Mo MM MMMM MMM', '2 2º 02 Fevereiro Fev'], + ['YYYY YY', '2010 10'], + ['D Do DD', '14 14º 14'], + ['d do dddd ddd dd', '0 0º Domingo Dom Dom'], + ['DDD DDDo DDDD', '45 45º 045'], + ['w wo ww', '8 8º 08'], + ['h hh', '3 03'], + ['H HH', '15 15'], + ['m mm', '25 25'], + ['s ss', '50 50'], + ['a A', 'pm PM'], + ['t\\he DDDo \\d\\ay of t\\he ye\\ar', 'the 45º day of the year'], + ['L', '14/02/2010'], + ['LL', '14 de Fevereiro de 2010'], + ['LLL', '14 de Fevereiro de 2010 15:25'], + ['LLLL', 'Domingo, 14 de Fevereiro de 2010 15:25'] + ], + b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)), + i; + for (i = 0; i < a.length; i++) { + test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]); + } + test.done(); + }, + + "format ordinal" : function(test) { + test.expect(31); + moment.lang('pt'); + test.equal(moment([2011, 0, 1]).format('DDDo'), '1º', '1º'); + test.equal(moment([2011, 0, 2]).format('DDDo'), '2º', '2º'); + test.equal(moment([2011, 0, 3]).format('DDDo'), '3º', '3º'); + test.equal(moment([2011, 0, 4]).format('DDDo'), '4º', '4º'); + test.equal(moment([2011, 0, 5]).format('DDDo'), '5º', '5º'); + test.equal(moment([2011, 0, 6]).format('DDDo'), '6º', '6º'); + test.equal(moment([2011, 0, 7]).format('DDDo'), '7º', '7º'); + test.equal(moment([2011, 0, 8]).format('DDDo'), '8º', '8º'); + test.equal(moment([2011, 0, 9]).format('DDDo'), '9º', '9º'); + test.equal(moment([2011, 0, 10]).format('DDDo'), '10º', '10º'); + + test.equal(moment([2011, 0, 11]).format('DDDo'), '11º', '11º'); + test.equal(moment([2011, 0, 12]).format('DDDo'), '12º', '12º'); + test.equal(moment([2011, 0, 13]).format('DDDo'), '13º', '13º'); + test.equal(moment([2011, 0, 14]).format('DDDo'), '14º', '14º'); + test.equal(moment([2011, 0, 15]).format('DDDo'), '15º', '15º'); + test.equal(moment([2011, 0, 16]).format('DDDo'), '16º', '16º'); + test.equal(moment([2011, 0, 17]).format('DDDo'), '17º', '17º'); + test.equal(moment([2011, 0, 18]).format('DDDo'), '18º', '18º'); + test.equal(moment([2011, 0, 19]).format('DDDo'), '19º', '19º'); + test.equal(moment([2011, 0, 20]).format('DDDo'), '20º', '20º'); + + test.equal(moment([2011, 0, 21]).format('DDDo'), '21º', '21º'); + test.equal(moment([2011, 0, 22]).format('DDDo'), '22º', '22º'); + test.equal(moment([2011, 0, 23]).format('DDDo'), '23º', '23º'); + test.equal(moment([2011, 0, 24]).format('DDDo'), '24º', '24º'); + test.equal(moment([2011, 0, 25]).format('DDDo'), '25º', '25º'); + test.equal(moment([2011, 0, 26]).format('DDDo'), '26º', '26º'); + test.equal(moment([2011, 0, 27]).format('DDDo'), '27º', '27º'); + test.equal(moment([2011, 0, 28]).format('DDDo'), '28º', '28º'); + test.equal(moment([2011, 0, 29]).format('DDDo'), '29º', '29º'); + test.equal(moment([2011, 0, 30]).format('DDDo'), '30º', '30º'); + + test.equal(moment([2011, 0, 31]).format('DDDo'), '31º', '31º'); + test.done(); + }, + + "format month" : function(test) { + test.expect(12); + moment.lang('pt'); + var expected = 'Janeiro Jan_Fevereiro Fev_Março Mar_Abril Abr_Maio Mai_Junho Jun_Julho Jul_Agosto Ago_Setembro Set_Outubro Out_Novembro Nov_Dezembro Dez'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]); + } + test.done(); + }, + + "format week" : function(test) { + test.expect(7); + moment.lang('pt'); + var expected = 'Domingo Dom Dom_Segunda-feira Seg 2ª_Terça-feira Ter 3ª_Quarta-feira Qua 4ª_Quinta-feira Qui 5ª_Sexta-feira Sex 6ª_Sábado Sáb Sáb'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]); + } + test.done(); + }, + + "from" : function(test) { + test.expect(30); + moment.lang('pt'); + var start = moment([2007, 1, 28]); + test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "segundos", "44 seconds = seconds"); + test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "um minuto", "45 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "um minuto", "89 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minutos", "90 seconds = 2 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minutos", "44 minutes = 44 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "uma hora", "45 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "uma hora", "89 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 horas", "90 minutes = 2 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 horas", "5 hours = 5 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 horas", "21 hours = 21 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "um dia", "22 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "um dia", "35 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 dias", "36 hours = 2 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "um dia", "1 day = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 dias", "5 days = 5 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 dias", "25 days = 25 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "um mês", "26 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "um mês", "30 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "um mês", "45 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 meses", "46 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 meses", "75 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 meses", "76 days = 3 months"); + test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "um mês", "1 month = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 meses", "5 months = 5 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 meses", "344 days = 11 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "um ano", "345 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "um ano", "547 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 anos", "548 days = 2 years"); + test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "um ano", "1 year = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 anos", "5 years = 5 years"); + test.done(); + }, + + "suffix" : function(test) { + test.expect(2); + moment.lang('pt'); + test.equal(moment(30000).from(0), "em segundos", "prefix"); + test.equal(moment(0).from(30000), "segundos atrás", "suffix"); + test.done(); + }, + + "fromNow" : function(test) { + test.expect(2); + moment.lang('pt'); + test.equal(moment().add({s:30}).fromNow(), "em segundos", "in seconds"); + test.equal(moment().add({d:5}).fromNow(), "em 5 dias", "in 5 days"); + test.done(); + }, + + "calendar day" : function(test) { + test.expect(6); + moment.lang('pt'); + + var a = moment().hours(2).minutes(0).seconds(0); + + test.equal(moment(a).calendar(), "Hoje às 02:00", "today at the same time"); + test.equal(moment(a).add({ m: 25 }).calendar(), "Hoje às 02:25", "Now plus 25 min"); + test.equal(moment(a).add({ h: 1 }).calendar(), "Hoje às 03:00", "Now plus 1 hour"); + test.equal(moment(a).add({ d: 1 }).calendar(), "Amanhã às 02:00", "tomorrow at the same time"); + test.equal(moment(a).subtract({ h: 1 }).calendar(), "Hoje às 01:00", "Now minus 1 hour"); + test.equal(moment(a).subtract({ d: 1 }).calendar(), "Ontem às 02:00", "yesterday at the same time"); + test.done(); + }, + + "calendar next week" : function(test) { + test.expect(15); + moment.lang('pt'); + + var i; + var m; + + for (i = 2; i < 7; i++) { + m = moment().add({ d: i }); + test.equal(m.calendar(), m.format('dddd [às] LT'), "Today + " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('dddd [às] LT'), "Today + " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('dddd [às] LT'), "Today + " + i + " days end of day"); + } + test.done(); + }, + + "calendar last week" : function(test) { + test.expect(15); + moment.lang('pt'); + + for (i = 2; i < 7; i++) { + m = moment().subtract({ d: i }); + test.equal(m.calendar(), m.format((m.day() === 0 || m.day() === 6) ? '[Último] dddd [às] LT' : '[Última] dddd [às] LT'), "Today - " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format((m.day() === 0 || m.day() === 6) ? '[Último] dddd [às] LT' : '[Última] dddd [às] LT'), "Today - " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format((m.day() === 0 || m.day() === 6) ? '[Último] dddd [às] LT' : '[Última] dddd [às] LT'), "Today - " + i + " days end of day"); + } + test.done(); + }, + + "calendar all else" : function(test) { + test.expect(4); + moment.lang('pt'); + var weeksAgo = moment().subtract({ w: 1 }); + var weeksFromNow = moment().add({ w: 1 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week"); + + weeksAgo = moment().subtract({ w: 2 }); + weeksFromNow = moment().add({ w: 2 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks"); + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/lang/ru.js b/node_modules/emailjs/node_modules/moment/test/lang/ru.js new file mode 100644 index 0000000..05af6a0 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/lang/ru.js @@ -0,0 +1,280 @@ +var moment = require("../../moment"); + + + /************************************************** + Russian + *************************************************/ + +exports["lang:ru"] = { + "parse" : function(test) { + test.expect(96); + moment.lang('ru'); + var tests = 'январь янв_февраль фев_март мар_апрель апр_май май_июнь июн_июль июл_август авг_сентябрь сен_октябрь окт_ноябрь ноя_декабрь дек'.split("_"); + var i; + function equalTest(input, mmm, i) { + test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1)); + } + for (i = 0; i < 12; i++) { + tests[i] = tests[i].split(' '); + equalTest(tests[i][0], 'MMM', i); + equalTest(tests[i][1], 'MMM', i); + equalTest(tests[i][0], 'MMMM', i); + equalTest(tests[i][1], 'MMMM', i); + equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i); + } + test.done(); + }, + + "format" : function(test) { + test.expect(18); + moment.lang('ru'); + var a = [ + ['dddd, MMMM Do YYYY, h:mm:ss a', 'воскресенье, февраль 14. 2010, 3:25:50 pm'], + ['ddd, hA', 'вск, 3PM'], + ['M Mo MM MMMM MMM', '2 2. 02 февраль фев'], + ['YYYY YY', '2010 10'], + ['D Do DD', '14 14. 14'], + ['d do dddd ddd dd', '0 0. воскресенье вск вс'], + ['DDD DDDo DDDD', '45 45. 045'], + ['w wo ww', '8 8. 08'], + ['h hh', '3 03'], + ['H HH', '15 15'], + ['m mm', '25 25'], + ['s ss', '50 50'], + ['a A', 'pm PM'], + ['t\\he DDDo \\d\\ay of t\\he ye\\ar', 'the 45. day of the year'], + ['L', '14.02.2010'], + ['LL', '14 февраля 2010 г.'], + ['LLL', '14 февраля 2010 г., 15:25'], + ['LLLL', 'воскресенье, 14 февраля 2010 г., 15:25'] + ], + b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)), + i; + for (i = 0; i < a.length; i++) { + test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]); + } + test.done(); + }, + + "format ordinal" : function(test) { + test.expect(31); + moment.lang('ru'); + test.equal(moment([2011, 0, 1]).format('DDDo'), '1.', '1.'); + test.equal(moment([2011, 0, 2]).format('DDDo'), '2.', '2.'); + test.equal(moment([2011, 0, 3]).format('DDDo'), '3.', '3.'); + test.equal(moment([2011, 0, 4]).format('DDDo'), '4.', '4.'); + test.equal(moment([2011, 0, 5]).format('DDDo'), '5.', '5.'); + test.equal(moment([2011, 0, 6]).format('DDDo'), '6.', '6.'); + test.equal(moment([2011, 0, 7]).format('DDDo'), '7.', '7.'); + test.equal(moment([2011, 0, 8]).format('DDDo'), '8.', '8.'); + test.equal(moment([2011, 0, 9]).format('DDDo'), '9.', '9.'); + test.equal(moment([2011, 0, 10]).format('DDDo'), '10.', '10.'); + + test.equal(moment([2011, 0, 11]).format('DDDo'), '11.', '11.'); + test.equal(moment([2011, 0, 12]).format('DDDo'), '12.', '12.'); + test.equal(moment([2011, 0, 13]).format('DDDo'), '13.', '13.'); + test.equal(moment([2011, 0, 14]).format('DDDo'), '14.', '14.'); + test.equal(moment([2011, 0, 15]).format('DDDo'), '15.', '15.'); + test.equal(moment([2011, 0, 16]).format('DDDo'), '16.', '16.'); + test.equal(moment([2011, 0, 17]).format('DDDo'), '17.', '17.'); + test.equal(moment([2011, 0, 18]).format('DDDo'), '18.', '18.'); + test.equal(moment([2011, 0, 19]).format('DDDo'), '19.', '19.'); + test.equal(moment([2011, 0, 20]).format('DDDo'), '20.', '20.'); + + test.equal(moment([2011, 0, 21]).format('DDDo'), '21.', '21.'); + test.equal(moment([2011, 0, 22]).format('DDDo'), '22.', '22.'); + test.equal(moment([2011, 0, 23]).format('DDDo'), '23.', '23.'); + test.equal(moment([2011, 0, 24]).format('DDDo'), '24.', '24.'); + test.equal(moment([2011, 0, 25]).format('DDDo'), '25.', '25.'); + test.equal(moment([2011, 0, 26]).format('DDDo'), '26.', '26.'); + test.equal(moment([2011, 0, 27]).format('DDDo'), '27.', '27.'); + test.equal(moment([2011, 0, 28]).format('DDDo'), '28.', '28.'); + test.equal(moment([2011, 0, 29]).format('DDDo'), '29.', '29.'); + test.equal(moment([2011, 0, 30]).format('DDDo'), '30.', '30.'); + + test.equal(moment([2011, 0, 31]).format('DDDo'), '31.', '31.'); + test.done(); + }, + + "format month" : function(test) { + test.expect(12); + moment.lang('ru'); + var expected = 'январь янв_февраль фев_март мар_апрель апр_май май_июнь июн_июль июл_август авг_сентябрь сен_октябрь окт_ноябрь ноя_декабрь дек'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]); + } + test.done(); + }, + + "format month case" : function(test) { + test.expect(24); + moment.lang('ru'); + var months = { + 'nominative': 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_'), + 'accusative': 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split('_') + }; + var i; + for (i = 0; i < 12; i++) { + test.equal(moment([2011, i, 1]).format('D MMMM'), '1 ' + months.accusative[i], '1 ' + months.accusative[i]); + test.equal(moment([2011, i, 1]).format('MMMM'), months.nominative[i], '1 ' + months.nominative[i]); + } + test.done(); + }, + + "format week" : function(test) { + test.expect(7); + moment.lang('ru'); + var expected = 'воскресенье вск вс_понедельник пнд пн_вторник втр вт_среда срд ср_четверг чтв чт_пятница птн пт_суббота сбт сб'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]); + } + test.done(); + }, + + "from" : function(test) { + test.expect(32); + moment.lang('ru'); + var start = moment([2007, 1, 28]); + test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "несколько секунд", "44 seconds = seconds"); + test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "минута", "45 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "минута", "89 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 минуты", "90 seconds = 2 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 минуты", "44 minutes = 44 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "час", "45 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "час", "89 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 часа", "90 minutes = 2 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 часов", "5 hours = 5 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 час", "21 hours = 21 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "день", "22 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "день", "35 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 дня", "36 hours = 2 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "день", "1 day = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 дней", "5 days = 5 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:11}), true), "11 дней", "11 days = 11 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:21}), true), "21 день", "21 days = 21 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 дней", "25 days = 25 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "месяц", "26 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "месяц", "30 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "месяц", "45 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 месяца", "46 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 месяца", "75 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 месяца", "76 days = 3 months"); + test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "месяц", "1 month = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 месяцев", "5 months = 5 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 месяцев", "344 days = 11 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "год", "345 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "год", "547 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 года", "548 days = 2 years"); + test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "год", "1 year = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 лет", "5 years = 5 years"); + test.done(); + }, + + "suffix" : function(test) { + test.expect(2); + moment.lang('ru'); + test.equal(moment(30000).from(0), "через несколько секунд", "prefix"); + test.equal(moment(0).from(30000), "несколько секунд назад", "suffix"); + test.done(); + }, + + "fromNow" : function(test) { + test.expect(2); + moment.lang('ru'); + test.equal(moment().add({s:30}).fromNow(), "через несколько секунд", "in seconds"); + test.equal(moment().add({d:5}).fromNow(), "через 5 дней", "in 5 days"); + test.done(); + }, + + "calendar day" : function(test) { + test.expect(6); + moment.lang('ru'); + + var a = moment().hours(2).minutes(0).seconds(0); + + test.equal(moment(a).calendar(), "Сегодня в 02:00", "today at the same time"); + test.equal(moment(a).add({ m: 25 }).calendar(), "Сегодня в 02:25", "Now plus 25 min"); + test.equal(moment(a).add({ h: 1 }).calendar(), "Сегодня в 03:00", "Now plus 1 hour"); + test.equal(moment(a).add({ d: 1 }).calendar(), "Завтра в 02:00", "tomorrow at the same time"); + test.equal(moment(a).subtract({ h: 1 }).calendar(), "Сегодня в 01:00", "Now minus 1 hour"); + test.equal(moment(a).subtract({ d: 1 }).calendar(), "Вчера в 02:00", "yesterday at the same time"); + test.done(); + }, + + "calendar next week" : function(test) { + test.expect(15); + moment.lang('ru'); + + var i; + var m; + + function makeFormat(d) { + return d.day() === 2 ? '[Во] dddd [в] LT' : '[В] dddd [в] LT'; + } + + for (i = 2; i < 7; i++) { + m = moment().add({ d: i }); + test.equal(m.calendar(), m.format(makeFormat(m)), "Today + " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format(makeFormat(m)), "Today + " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format(makeFormat(m)), "Today + " + i + " days end of day"); + } + test.done(); + }, + + "calendar last week" : function(test) { + test.expect(15); + moment.lang('ru'); + + var i; + var m; + + function makeFormat(d) { + switch (d.day()) { + case 0: + return '[В прошлое] dddd [в] LT'; + case 1: + case 2: + case 4: + return '[В прошлый] dddd [в] LT'; + case 3: + case 5: + case 6: + return '[В прошлую] dddd [в] LT'; + } + } + + for (i = 2; i < 7; i++) { + m = moment().subtract({ d: i }); + test.equal(m.calendar(), m.format(makeFormat(m)), "Today - " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format(makeFormat(m)), "Today - " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format(makeFormat(m)), "Today - " + i + " days end of day"); + } + test.done(); + }, + + "calendar all else" : function(test) { + test.expect(4); + moment.lang('ru'); + var weeksAgo = moment().subtract({ w: 1 }); + var weeksFromNow = moment().add({ w: 1 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week"); + + weeksAgo = moment().subtract({ w: 2 }); + weeksFromNow = moment().add({ w: 2 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks"); + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/lang/sv.js b/node_modules/emailjs/node_modules/moment/test/lang/sv.js new file mode 100644 index 0000000..43c7f60 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/lang/sv.js @@ -0,0 +1,248 @@ +var moment = require("../../moment"); + + + /************************************************** + English + *************************************************/ + +exports["lang:sv"] = { + "parse" : function(test) { + test.expect(96); + moment.lang('sv'); + var tests = 'januari jan_februari feb_mars mar_april apr_maj maj_juni jun_juli jul_augusti aug_september sep_oktober okt_november nov_december dec'.split("_"); + var i; + function equalTest(input, mmm, i) { + test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1)); + } + for (i = 0; i < 12; i++) { + tests[i] = tests[i].split(' '); + equalTest(tests[i][0], 'MMM', i); + equalTest(tests[i][1], 'MMM', i); + equalTest(tests[i][0], 'MMMM', i); + equalTest(tests[i][1], 'MMMM', i); + equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i); + } + test.done(); + }, + + "format" : function(test) { + test.expect(18); + moment.lang('sv'); + var a = [ + ['dddd, MMMM Do YYYY, h:mm:ss a', 'söndag, februari 14e 2010, 3:25:50 pm'], + ['ddd, hA', 'sön, 3PM'], + ['M Mo MM MMMM MMM', '2 2a 02 februari feb'], + ['YYYY YY', '2010 10'], + ['D Do DD', '14 14e 14'], + ['d do dddd ddd dd', '0 0e söndag sön sö'], + ['DDD DDDo DDDD', '45 45e 045'], + ['w wo ww', '8 8e 08'], + ['h hh', '3 03'], + ['H HH', '15 15'], + ['m mm', '25 25'], + ['s ss', '50 50'], + ['a A', 'pm PM'], + ['t\\he DDDo \\d\\ay of t\\he ye\\ar', 'the 45e day of the year'], + ['L', '2010-02-14'], + ['LL', '14 februari 2010'], + ['LLL', '14 februari 2010 15:25'], + ['LLLL', 'söndag 14 februari 2010 15:25'] + ], + b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)), + i; + for (i = 0; i < a.length; i++) { + test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]); + } + test.done(); + }, + + "format ordinal" : function(test) { + test.expect(31); + moment.lang('sv'); + test.equal(moment([2011, 0, 1]).format('DDDo'), '1a', '1a'); + test.equal(moment([2011, 0, 2]).format('DDDo'), '2a', '2a'); + test.equal(moment([2011, 0, 3]).format('DDDo'), '3e', '3e'); + test.equal(moment([2011, 0, 4]).format('DDDo'), '4e', '4e'); + test.equal(moment([2011, 0, 5]).format('DDDo'), '5e', '5e'); + test.equal(moment([2011, 0, 6]).format('DDDo'), '6e', '6e'); + test.equal(moment([2011, 0, 7]).format('DDDo'), '7e', '7e'); + test.equal(moment([2011, 0, 8]).format('DDDo'), '8e', '8e'); + test.equal(moment([2011, 0, 9]).format('DDDo'), '9e', '9e'); + test.equal(moment([2011, 0, 10]).format('DDDo'), '10e', '10e'); + + test.equal(moment([2011, 0, 11]).format('DDDo'), '11e', '11e'); + test.equal(moment([2011, 0, 12]).format('DDDo'), '12e', '12e'); + test.equal(moment([2011, 0, 13]).format('DDDo'), '13e', '13e'); + test.equal(moment([2011, 0, 14]).format('DDDo'), '14e', '14e'); + test.equal(moment([2011, 0, 15]).format('DDDo'), '15e', '15e'); + test.equal(moment([2011, 0, 16]).format('DDDo'), '16e', '16e'); + test.equal(moment([2011, 0, 17]).format('DDDo'), '17e', '17e'); + test.equal(moment([2011, 0, 18]).format('DDDo'), '18e', '18e'); + test.equal(moment([2011, 0, 19]).format('DDDo'), '19e', '19e'); + test.equal(moment([2011, 0, 20]).format('DDDo'), '20e', '20e'); + + test.equal(moment([2011, 0, 21]).format('DDDo'), '21a', '21a'); + test.equal(moment([2011, 0, 22]).format('DDDo'), '22a', '22a'); + test.equal(moment([2011, 0, 23]).format('DDDo'), '23e', '23e'); + test.equal(moment([2011, 0, 24]).format('DDDo'), '24e', '24e'); + test.equal(moment([2011, 0, 25]).format('DDDo'), '25e', '25e'); + test.equal(moment([2011, 0, 26]).format('DDDo'), '26e', '26e'); + test.equal(moment([2011, 0, 27]).format('DDDo'), '27e', '27e'); + test.equal(moment([2011, 0, 28]).format('DDDo'), '28e', '28e'); + test.equal(moment([2011, 0, 29]).format('DDDo'), '29e', '29e'); + test.equal(moment([2011, 0, 30]).format('DDDo'), '30e', '30e'); + + test.equal(moment([2011, 0, 31]).format('DDDo'), '31a', '31a'); + test.done(); + }, + + "format month" : function(test) { + test.expect(12); + moment.lang('sv'); + var expected = 'januari jan_februari feb_mars mar_april apr_maj maj_juni jun_juli jul_augusti aug_september sep_oktober okt_november nov_december dec'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]); + } + test.done(); + }, + + "format week" : function(test) { + test.expect(7); + moment.lang('sv'); + var expected = 'söndag sön sö_måndag mån må_tisdag tis ti_onsdag ons on_torsdag tor to_fredag fre fr_lördag lör lö'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]); + } + test.done(); + }, + + "from" : function(test) { + test.expect(30); + moment.lang('sv'); + var start = moment([2007, 1, 28]); + test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "några sekunder", "44 sekunder = a few seconds"); + test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "en minut", "45 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "en minut", "89 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minuter", "90 seconds = 2 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minuter", "44 minutes = 44 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "en timme", "45 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "en timme", "89 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 timmar", "90 minutes = 2 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 timmar", "5 hours = 5 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 timmar", "21 hours = 21 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "en dag", "22 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "en dag", "35 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 dagar", "36 hours = 2 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "en dag", "1 day = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 dagar", "5 days = 5 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 dagar", "25 days = 25 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "en månad", "26 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "en månad", "30 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "en månad", "45 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 månader", "46 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 månader", "75 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 månader", "76 days = 3 months"); + test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "en månad", "1 month = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 månader", "5 months = 5 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 månader", "344 days = 11 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "ett år", "345 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "ett år", "547 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 år", "548 days = 2 years"); + test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "ett år", "1 year = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 år", "5 years = 5 years"); + test.done(); + }, + + "suffix" : function(test) { + test.expect(2); + moment.lang('sv'); + test.equal(moment(30000).from(0), "om några sekunder", "prefix"); + test.equal(moment(0).from(30000), "för några sekunder sen", "suffix"); + test.done(); + }, + + "now from now" : function(test) { + test.expect(1); + moment.lang('sv'); + test.equal(moment().fromNow(), "för några sekunder sen", "now from now should display as in the past"); + test.done(); + }, + + "fromNow" : function(test) { + test.expect(2); + moment.lang('sv'); + test.equal(moment().add({s:30}).fromNow(), "om några sekunder", "in a few seconds"); + test.equal(moment().add({d:5}).fromNow(), "om 5 dagar", "in 5 days"); + test.done(); + }, + + "calendar day" : function(test) { + test.expect(6); + moment.lang('sv'); + + var a = moment().hours(2).minutes(0).seconds(0); + + test.equal(moment(a).calendar(), "Idag klockan 02:00", "today at the same time"); + test.equal(moment(a).add({ m: 25 }).calendar(), "Idag klockan 02:25", "Now plus 25 min"); + test.equal(moment(a).add({ h: 1 }).calendar(), "Idag klockan 03:00", "Now plus 1 hour"); + test.equal(moment(a).add({ d: 1 }).calendar(), "Imorgon klockan 02:00", "tomorrow at the same time"); + test.equal(moment(a).subtract({ h: 1 }).calendar(), "Idag klockan 01:00", "Now minus 1 hour"); + test.equal(moment(a).subtract({ d: 1 }).calendar(), "Igår klockan 02:00", "yesterday at the same time"); + test.done(); + }, + + "calendar next week" : function(test) { + test.expect(15); + moment.lang('sv'); + + var i; + var m; + + for (i = 2; i < 7; i++) { + m = moment().add({ d: i }); + test.equal(m.calendar(), m.format('dddd [klockan] LT'), "Today + " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('dddd [klockan] LT'), "Today + " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('dddd [klockan] LT'), "Today + " + i + " days end of day"); + } + test.done(); + }, + + "calendar last week" : function(test) { + test.expect(15); + moment.lang('sv'); + + for (i = 2; i < 7; i++) { + m = moment().subtract({ d: i }); + test.equal(m.calendar(), m.format('[Förra] dddd[en klockan] LT'), "Today - " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('[Förra] dddd[en klockan] LT'), "Today - " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('[Förra] dddd[en klockan] LT'), "Today - " + i + " days end of day"); + } + test.done(); + }, + + "calendar all else" : function(test) { + test.expect(4); + moment.lang('sv'); + var weeksAgo = moment().subtract({ w: 1 }); + var weeksFromNow = moment().add({ w: 1 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week"); + + weeksAgo = moment().subtract({ w: 2 }); + weeksFromNow = moment().add({ w: 2 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks"); + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/lang/tr.js b/node_modules/emailjs/node_modules/moment/test/lang/tr.js new file mode 100644 index 0000000..2fce8a3 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/lang/tr.js @@ -0,0 +1,259 @@ +var moment = require("../../moment"); + + + /************************************************** + Turkish + *************************************************/ + +exports["lang:tr"] = { + "parse" : function(test) { + test.expect(96); + moment.lang('tr'); + var tests = 'Ocak Oca_Şubat Şub_Mart Mar_Nisan Nis_Mayıs May_Haziran Haz_Temmuz Tem_Ağustos Ağu_Eylül Eyl_Ekim Eki_Kasım Kas_Aralık Ara'.split("_"); + var i; + function equalTest(input, mmm, i) { + test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1)); + } + for (i = 0; i < 12; i++) { + tests[i] = tests[i].split(' '); + equalTest(tests[i][0], 'MMM', i); + equalTest(tests[i][1], 'MMM', i); + equalTest(tests[i][0], 'MMMM', i); + equalTest(tests[i][1], 'MMMM', i); + equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i); + } + test.done(); + }, + + "format" : function(test) { + moment.lang('tr'); + var a = [ + ['dddd, MMMM Do YYYY, h:mm:ss a', 'Pazar, Şubat 14\'üncü 2010, 3:25:50 pm'], + ['ddd, hA', 'Paz, 3PM'], + ['M Mo MM MMMM MMM', '2 2\'nci 02 Şubat Şub'], + ['YYYY YY', '2010 10'], + ['D Do DD', '14 14\'üncü 14'], + ['d do dddd ddd dd', '0 0\'ıncı Pazar Paz Pz'], + ['DDD DDDo DDDD', '45 45\'inci 045'], + ['w wo ww', '8 8\'inci 08'], + ['h hh', '3 03'], + ['H HH', '15 15'], + ['m mm', '25 25'], + ['s ss', '50 50'], + ['a A', 'pm PM'], + ['yılın DDDo günü', 'yılın 45\'inci günü'], + ['L', '14.02.2010'], + ['LL', '14 Şubat 2010'], + ['LLL', '14 Şubat 2010 15:25'], + ['LLLL', 'Pazar, 14 Şubat 2010 15:25'] + ], + DDDo = [ + [359, '360\'ıncı'], + [199, '200\'üncü'], + [149, '150\'nci'] + ], + dt = moment(new Date(2010, 1, 14, 15, 25, 50, 125)), + DDDoDt, + i; + test.expect(a.length + DDDo.length); + + for (i = 0; i < a.length; i++) { + test.equal(dt.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]); + } + for (i = 0; i < DDDo.length; i++) { + DDDoDt = moment([2010]); + test.equal(DDDoDt.add('days', DDDo[i][0]).format('DDDo'), DDDo[i][1], DDDo[i][0] + ' ---> ' + DDDo[i][1]); + } + test.done(); + }, + + "format ordinal" : function(test) { + test.expect(31); + moment.lang('tr'); + test.equal(moment([2011, 0, 1]).format('DDDo'), '1\'inci', '1st'); + test.equal(moment([2011, 0, 2]).format('DDDo'), '2\'nci', '2nd'); + test.equal(moment([2011, 0, 3]).format('DDDo'), '3\'üncü', '3rd'); + test.equal(moment([2011, 0, 4]).format('DDDo'), '4\'üncü', '4th'); + test.equal(moment([2011, 0, 5]).format('DDDo'), '5\'inci', '5th'); + test.equal(moment([2011, 0, 6]).format('DDDo'), '6\'ncı', '6th'); + test.equal(moment([2011, 0, 7]).format('DDDo'), '7\'nci', '7th'); + test.equal(moment([2011, 0, 8]).format('DDDo'), '8\'inci', '8th'); + test.equal(moment([2011, 0, 9]).format('DDDo'), '9\'uncu', '9th'); + test.equal(moment([2011, 0, 10]).format('DDDo'), '10\'uncu', '10th'); + + test.equal(moment([2011, 0, 11]).format('DDDo'), '11\'inci', '11th'); + test.equal(moment([2011, 0, 12]).format('DDDo'), '12\'nci', '12th'); + test.equal(moment([2011, 0, 13]).format('DDDo'), '13\'üncü', '13th'); + test.equal(moment([2011, 0, 14]).format('DDDo'), '14\'üncü', '14th'); + test.equal(moment([2011, 0, 15]).format('DDDo'), '15\'inci', '15th'); + test.equal(moment([2011, 0, 16]).format('DDDo'), '16\'ncı', '16th'); + test.equal(moment([2011, 0, 17]).format('DDDo'), '17\'nci', '17th'); + test.equal(moment([2011, 0, 18]).format('DDDo'), '18\'inci', '18th'); + test.equal(moment([2011, 0, 19]).format('DDDo'), '19\'uncu', '19th'); + test.equal(moment([2011, 0, 20]).format('DDDo'), '20\'nci', '20th'); + + test.equal(moment([2011, 0, 21]).format('DDDo'), '21\'inci', '21th'); + test.equal(moment([2011, 0, 22]).format('DDDo'), '22\'nci', '22th'); + test.equal(moment([2011, 0, 23]).format('DDDo'), '23\'üncü', '23th'); + test.equal(moment([2011, 0, 24]).format('DDDo'), '24\'üncü', '24th'); + test.equal(moment([2011, 0, 25]).format('DDDo'), '25\'inci', '25th'); + test.equal(moment([2011, 0, 26]).format('DDDo'), '26\'ncı', '26th'); + test.equal(moment([2011, 0, 27]).format('DDDo'), '27\'nci', '27th'); + test.equal(moment([2011, 0, 28]).format('DDDo'), '28\'inci', '28th'); + test.equal(moment([2011, 0, 29]).format('DDDo'), '29\'uncu', '29th'); + test.equal(moment([2011, 0, 30]).format('DDDo'), '30\'uncu', '30th'); + + test.equal(moment([2011, 0, 31]).format('DDDo'), '31\'inci', '31st'); + test.done(); + }, + + "format month" : function(test) { + test.expect(12); + moment.lang('tr'); + var expected = 'Ocak Oca_Şubat Şub_Mart Mar_Nisan Nis_Mayıs May_Haziran Haz_Temmuz Tem_Ağustos Ağu_Eylül Eyl_Ekim Eki_Kasım Kas_Aralık Ara'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]); + } + test.done(); + }, + + "format week" : function(test) { + test.expect(7); + moment.lang('tr'); + var expected = 'Pazar Paz Pz_Pazartesi Pts Pt_Salı Sal Sa_Çarşamba Çar Ça_Perşembe Per Pe_Cuma Cum Cu_Cumartesi Cts Ct'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]); + } + test.done(); + }, + + "from" : function(test) { + test.expect(30); + moment.lang('tr'); + var start = moment([2007, 1, 28]); + test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "birkaç saniye", "44 seconds = a few seconds"); + test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "bir dakika", "45 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "bir dakika", "89 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 dakika", "90 seconds = 2 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 dakika", "44 minutes = 44 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "bir saat", "45 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "bir saat", "89 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 saat", "90 minutes = 2 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 saat", "5 hours = 5 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 saat", "21 hours = 21 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "bir gün", "22 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "bir gün", "35 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 gün", "36 hours = 2 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "bir gün", "1 day = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 gün", "5 days = 5 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 gün", "25 days = 25 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "bir ay", "26 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "bir ay", "30 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "bir ay", "45 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 ay", "46 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 ay", "75 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 ay", "76 days = 3 months"); + test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "bir ay", "1 month = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 ay", "5 months = 5 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 ay", "344 days = 11 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "bir yıl", "345 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "bir yıl", "547 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 yıl", "548 days = 2 years"); + test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "bir yıl", "1 year = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 yıl", "5 years = 5 years"); + test.done(); + }, + + "suffix" : function(test) { + test.expect(2); + moment.lang('tr'); + test.equal(moment(30000).from(0), "birkaç saniye sonra", "prefix"); + test.equal(moment(0).from(30000), "birkaç saniye önce", "suffix"); + test.done(); + }, + + "now from now" : function(test) { + test.expect(1); + moment.lang('tr'); + test.equal(moment().fromNow(), "birkaç saniye önce", "now from now should display as in the past"); + test.done(); + }, + + "fromNow" : function(test) { + test.expect(2); + moment.lang('tr'); + test.equal(moment().add({s:30}).fromNow(), "birkaç saniye sonra", "in a few seconds"); + test.equal(moment().add({d:5}).fromNow(), "5 gün sonra", "in 5 days"); + test.done(); + }, + + "calendar day" : function(test) { + test.expect(6); + moment.lang('tr'); + + var a = moment().hours(2).minutes(0).seconds(0); + + test.equal(moment(a).calendar(), "bugün saat 02:00", "today at the same time"); + test.equal(moment(a).add({ m: 25 }).calendar(), "bugün saat 02:25", "Now plus 25 min"); + test.equal(moment(a).add({ h: 1 }).calendar(), "bugün saat 03:00", "Now plus 1 hour"); + test.equal(moment(a).add({ d: 1 }).calendar(), "yarın saat 02:00", "tomorrow at the same time"); + test.equal(moment(a).subtract({ h: 1 }).calendar(), "bugün saat 01:00", "Now minus 1 hour"); + test.equal(moment(a).subtract({ d: 1 }).calendar(), "dün 02:00", "yesterday at the same time"); + test.done(); + }, + + "calendar next week" : function(test) { + test.expect(15); + moment.lang('tr'); + + var i; + var m; + + for (i = 2; i < 7; i++) { + m = moment().add({ d: i }); + test.equal(m.calendar(), m.format('[haftaya] dddd [saat] LT'), "Today + " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('[haftaya] dddd [saat] LT'), "Today + " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('[haftaya] dddd [saat] LT'), "Today + " + i + " days end of day"); + } + test.done(); + }, + + "calendar last week" : function(test) { + test.expect(15); + moment.lang('tr'); + + for (i = 2; i < 7; i++) { + m = moment().subtract({ d: i }); + test.equal(m.calendar(), m.format('[geçen hafta] dddd [saat] LT'), "Today - " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('[geçen hafta] dddd [saat] LT'), "Today - " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('[geçen hafta] dddd [saat] LT'), "Today - " + i + " days end of day"); + } + test.done(); + }, + + "calendar all else" : function(test) { + test.expect(4); + moment.lang('tr'); + var weeksAgo = moment().subtract({ w: 1 }); + var weeksFromNow = moment().add({ w: 1 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week"); + + weeksAgo = moment().subtract({ w: 2 }); + weeksFromNow = moment().add({ w: 2 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks"); + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/lang/zh-cn.js b/node_modules/emailjs/node_modules/moment/test/lang/zh-cn.js new file mode 100644 index 0000000..7bcfef5 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/lang/zh-cn.js @@ -0,0 +1,227 @@ +var moment = require("../../moment"); + + + /************************************************** + Simplified Chinese + *************************************************/ + +exports["lang:zh-cn"] = { + "parse" : function(test) { + test.expect(96); + moment.lang('zh-cn'); + var tests = '一月 1月_二月 2月_三月 3月_四月 4月_五月 5月_六月 6月_七月 7月_八月 8月_九月 9月_十月 10月_十一月 11月_十二月 12月'.split("_"); + var i; + function equalTest(input, mmm, i) { + test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1)); + } + for (i = 0; i < 12; i++) { + tests[i] = tests[i].split(' '); + equalTest(tests[i][0], 'MMM', i); + equalTest(tests[i][1], 'MMM', i); + equalTest(tests[i][0], 'MMMM', i); + equalTest(tests[i][1], 'MMMM', i); + equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i); + } + test.done(); + }, + + "format" : function(test) { + test.expect(18); + moment.lang('zh-cn'); + var a = [ + ['dddd, MMMM Do YYYY, a h:mm:ss', '星期日, 二月 14 2010, 下午 3:25:50'], + ['ddd, Ah', '周日, 下午3'], + ['M Mo MM MMMM MMM', '2 2 02 二月 2月'], + ['YYYY YY', '2010 10'], + ['D Do DD', '14 14 14'], + ['d do dddd ddd dd', '0 0 星期日 周日 日'], + ['DDD DDDo DDDD', '45 45 045'], + ['w wo ww', '8 8 08'], + ['h hh', '3 03'], + ['H HH', '15 15'], + ['m mm', '25 25'], + ['s ss', '50 50'], + ['a A', '下午 下午'], + ['t\\he DDDo \\d\\ay of t\\he ye\\ar', 'the 45 day of the year'], + ['L', '2010年2月14日'], + ['LL', '2010年2月14日'], + ['LLL', '2010年2月14日下午3点25'], + ['LLLL', '2010年2月14日星期日下午3点25'] + ], + b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)), + i; + for (i = 0; i < a.length; i++) { + test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]); + } + test.done(); + }, + + "format month" : function(test) { + test.expect(12); + moment.lang('zh-cn'); + var expected = '一月 1月_二月 2月_三月 3月_四月 4月_五月 5月_六月 6月_七月 7月_八月 8月_九月 9月_十月 10月_十一月 11月_十二月 12月'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]); + } + test.done(); + }, + + "format week" : function(test) { + test.expect(7); + moment.lang('zh-cn'); + var expected = '星期日 周日 日_星期一 周一 一_星期二 周二 二_星期三 周三 三_星期四 周四 四_星期五 周五 五_星期六 周六 六'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]); + } + test.done(); + }, + + "from" : function(test) { + test.expect(30); + moment.lang('zh-cn'); + var start = moment([2007, 1, 28]); + test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "几秒", "44 seconds = a few seconds"); + test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "1分钟", "45 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "1分钟", "89 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2分钟", "90 seconds = 2 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44分钟", "44 minutes = 44 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "1小时", "45 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "1小时", "89 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2小时", "90 minutes = 2 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5小时", "5 hours = 5 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21小时", "21 hours = 21 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "1天", "22 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "1天", "35 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2天", "36 hours = 2 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "1天", "1 day = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5天", "5 days = 5 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25天", "25 days = 25 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "1个月", "26 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "1个月", "30 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "1个月", "45 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2个月", "46 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2个月", "75 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3个月", "76 days = 3 months"); + test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "1个月", "1 month = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5个月", "5 months = 5 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11个月", "344 days = 11 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "1年", "345 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "1年", "547 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2年", "548 days = 2 years"); + test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "1年", "1 year = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5年", "5 years = 5 years"); + test.done(); + }, + + "suffix" : function(test) { + test.expect(2); + moment.lang('zh-cn'); + test.equal(moment(30000).from(0), "几秒内", "prefix"); + test.equal(moment(0).from(30000), "几秒前", "suffix"); + test.done(); + }, + + "now from now" : function(test) { + test.expect(1); + moment.lang('zh-cn'); + test.equal(moment().fromNow(), "几秒前", "now from now should display as in the past"); + test.done(); + }, + + "fromNow" : function(test) { + test.expect(2); + moment.lang('zh-cn'); + test.equal(moment().add({s:30}).fromNow(), "几秒内", "in a few seconds"); + test.equal(moment().add({d:5}).fromNow(), "5天内", "in 5 days"); + test.done(); + }, + + "calendar day" : function(test) { + test.expect(6); + moment.lang('zh-cn'); + + var a = moment().hours(2).minutes(0).seconds(0); + + test.equal(moment(a).calendar(), "今天早上2点00", "today at the same time"); + test.equal(moment(a).add({ m: 25 }).calendar(), "今天早上2点25", "Now plus 25 min"); + test.equal(moment(a).add({ h: 1 }).calendar(), "今天早上3点00", "Now plus 1 hour"); + test.equal(moment(a).add({ d: 1 }).calendar(), "明天早上2点00", "tomorrow at the same time"); + test.equal(moment(a).subtract({ h: 1 }).calendar(), "今天早上1点00", "Now minus 1 hour"); + test.equal(moment(a).subtract({ d: 1 }).calendar(), "昨天早上2点00", "yesterday at the same time"); + test.done(); + }, + + "calendar next week" : function(test) { + test.expect(15); + moment.lang('zh-cn'); + + var i; + var m; + + for (i = 2; i < 7; i++) { + m = moment().add({ d: i }); + test.equal(m.calendar(), m.format('[下]ddddLT'), "Today + " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('[下]ddddLT'), "Today + " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('[下]ddddLT'), "Today + " + i + " days end of day"); + } + test.done(); + }, + + "calendar last week" : function(test) { + test.expect(15); + moment.lang('zh-cn'); + + for (i = 2; i < 7; i++) { + m = moment().subtract({ d: i }); + test.equal(m.calendar(), m.format('[上]ddddLT'), "Today - " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('[上]ddddLT'), "Today - " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('[上]ddddLT'), "Today - " + i + " days end of day"); + } + test.done(); + }, + + "calendar all else" : function(test) { + test.expect(4); + moment.lang('zh-cn'); + var weeksAgo = moment().subtract({ w: 1 }); + var weeksFromNow = moment().add({ w: 1 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week"); + + weeksAgo = moment().subtract({ w: 2 }); + weeksFromNow = moment().add({ w: 2 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks"); + test.done(); + }, + + "meridiem" : function(test) { + test.expect(10); + moment.lang('zh-cn'); + + test.equal(moment([2011, 2, 23, 0, 0]).format('a'), "早上", "morning"); + test.equal(moment([2011, 2, 23, 9, 0]).format('a'), "上午", "before noon"); + test.equal(moment([2011, 2, 23, 12, 0]).format('a'), "中午", "noon"); + test.equal(moment([2011, 2, 23, 13, 0]).format('a'), "下午", "after noon"); + test.equal(moment([2011, 2, 23, 18, 0]).format('a'), "晚上", "night"); + + test.equal(moment([2011, 2, 23, 0, 0]).format('A'), "早上", "morning"); + test.equal(moment([2011, 2, 23, 9, 0]).format('A'), "上午", "before noon"); + test.equal(moment([2011, 2, 23, 12, 0]).format('A'), "中午", "noon"); + test.equal(moment([2011, 2, 23, 13, 0]).format('A'), "下午", "afternoon"); + test.equal(moment([2011, 2, 23, 18, 0]).format('A'), "晚上", "night"); + + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/lang/zh-tw.js b/node_modules/emailjs/node_modules/moment/test/lang/zh-tw.js new file mode 100644 index 0000000..bba8cc4 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/lang/zh-tw.js @@ -0,0 +1,227 @@ +var moment = require("../../moment"); + + + /************************************************** + Traditional Chinese + *************************************************/ + +exports["lang:zh-tw"] = { + "parse" : function(test) { + test.expect(96); + moment.lang('zh-tw'); + var tests = '一月 1月_二月 2月_三月 3月_四月 4月_五月 5月_六月 6月_七月 7月_八月 8月_九月 9月_十月 10月_十一月 11月_十二月 12月'.split("_"); + var i; + function equalTest(input, mmm, i) { + test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1)); + } + for (i = 0; i < 12; i++) { + tests[i] = tests[i].split(' '); + equalTest(tests[i][0], 'MMM', i); + equalTest(tests[i][1], 'MMM', i); + equalTest(tests[i][0], 'MMMM', i); + equalTest(tests[i][1], 'MMMM', i); + equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i); + equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i); + equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i); + } + test.done(); + }, + + "format" : function(test) { + test.expect(18); + moment.lang('zh-tw'); + var a = [ + ['dddd, MMMM Do YYYY, a h:mm:ss', '星期日, 二月 14 2010, 下午 3:25:50'], + ['ddd, Ah', '週日, 下午3'], + ['M Mo MM MMMM MMM', '2 2 02 二月 2月'], + ['YYYY YY', '2010 10'], + ['D Do DD', '14 14 14'], + ['d do dddd ddd dd', '0 0 星期日 週日 日'], + ['DDD DDDo DDDD', '45 45 045'], + ['w wo ww', '8 8 08'], + ['h hh', '3 03'], + ['H HH', '15 15'], + ['m mm', '25 25'], + ['s ss', '50 50'], + ['a A', '下午 下午'], + ['t\\he DDDo \\d\\ay of t\\he ye\\ar', 'the 45 day of the year'], + ['L', '2010年2月14日'], + ['LL', '2010年2月14日'], + ['LLL', '2010年2月14日下午3點25'], + ['LLLL', '2010年2月14日星期日下午3點25'] + ], + b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)), + i; + for (i = 0; i < a.length; i++) { + test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]); + } + test.done(); + }, + + "format month" : function(test) { + test.expect(12); + moment.lang('zh-tw'); + var expected = '一月 1月_二月 2月_三月 3月_四月 4月_五月 5月_六月 6月_七月 7月_八月 8月_九月 9月_十月 10月_十一月 11月_十二月 12月'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]); + } + test.done(); + }, + + "format week" : function(test) { + test.expect(7); + moment.lang('zh-tw'); + var expected = '星期日 週日 日_星期一 週一 一_星期二 週二 二_星期三 週三 三_星期四 週四 四_星期五 週五 五_星期六 週六 六'.split("_"); + var i; + for (i = 0; i < expected.length; i++) { + test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]); + } + test.done(); + }, + + "from" : function(test) { + test.expect(30); + moment.lang('zh-tw'); + var start = moment([2007, 1, 28]); + test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "幾秒", "44 seconds = a few seconds"); + test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "一分鐘", "45 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "一分鐘", "89 seconds = a minute"); + test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2分鐘", "90 seconds = 2 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44分鐘", "44 minutes = 44 minutes"); + test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "一小時", "45 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "一小時", "89 minutes = an hour"); + test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2小時", "90 minutes = 2 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5小時", "5 hours = 5 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21小時", "21 hours = 21 hours"); + test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "一天", "22 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "一天", "35 hours = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2天", "36 hours = 2 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "一天", "1 day = a day"); + test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5天", "5 days = 5 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25天", "25 days = 25 days"); + test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "一個月", "26 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "一個月", "30 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "一個月", "45 days = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2個月", "46 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2個月", "75 days = 2 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3個月", "76 days = 3 months"); + test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "一個月", "1 month = a month"); + test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5個月", "5 months = 5 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11個月", "344 days = 11 months"); + test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "一年", "345 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "一年", "547 days = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2年", "548 days = 2 years"); + test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "一年", "1 year = a year"); + test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5年", "5 years = 5 years"); + test.done(); + }, + + "suffix" : function(test) { + test.expect(2); + moment.lang('zh-tw'); + test.equal(moment(30000).from(0), "幾秒內", "prefix"); + test.equal(moment(0).from(30000), "幾秒前", "suffix"); + test.done(); + }, + + "now from now" : function(test) { + test.expect(1); + moment.lang('zh-tw'); + test.equal(moment().fromNow(), "幾秒前", "now from now should display as in the past"); + test.done(); + }, + + "fromNow" : function(test) { + test.expect(2); + moment.lang('zh-tw'); + test.equal(moment().add({s:30}).fromNow(), "幾秒內", "in a few seconds"); + test.equal(moment().add({d:5}).fromNow(), "5天內", "in 5 days"); + test.done(); + }, + + "calendar day" : function(test) { + test.expect(6); + moment.lang('zh-tw'); + + var a = moment().hours(2).minutes(0).seconds(0); + + test.equal(moment(a).calendar(), "今天早上2點00", "today at the same time"); + test.equal(moment(a).add({ m: 25 }).calendar(), "今天早上2點25", "Now plus 25 min"); + test.equal(moment(a).add({ h: 1 }).calendar(), "今天早上3點00", "Now plus 1 hour"); + test.equal(moment(a).add({ d: 1 }).calendar(), "明天早上2點00", "tomorrow at the same time"); + test.equal(moment(a).subtract({ h: 1 }).calendar(), "今天早上1點00", "Now minus 1 hour"); + test.equal(moment(a).subtract({ d: 1 }).calendar(), "昨天早上2點00", "yesterday at the same time"); + test.done(); + }, + + "calendar next week" : function(test) { + test.expect(15); + moment.lang('zh-tw'); + + var i; + var m; + + for (i = 2; i < 7; i++) { + m = moment().add({ d: i }); + test.equal(m.calendar(), m.format('[下]ddddLT'), "Today + " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('[下]ddddLT'), "Today + " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('[下]ddddLT'), "Today + " + i + " days end of day"); + } + test.done(); + }, + + "calendar last week" : function(test) { + test.expect(15); + moment.lang('zh-tw'); + + for (i = 2; i < 7; i++) { + m = moment().subtract({ d: i }); + test.equal(m.calendar(), m.format('[上]ddddLT'), "Today - " + i + " days current time"); + m.hours(0).minutes(0).seconds(0).milliseconds(0); + test.equal(m.calendar(), m.format('[上]ddddLT'), "Today - " + i + " days beginning of day"); + m.hours(23).minutes(59).seconds(59).milliseconds(999); + test.equal(m.calendar(), m.format('[上]ddddLT'), "Today - " + i + " days end of day"); + } + test.done(); + }, + + "calendar all else" : function(test) { + test.expect(4); + moment.lang('zh-tw'); + var weeksAgo = moment().subtract({ w: 1 }); + var weeksFromNow = moment().add({ w: 1 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week"); + + weeksAgo = moment().subtract({ w: 2 }); + weeksFromNow = moment().add({ w: 2 }); + + test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago"); + test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks"); + test.done(); + }, + + "meridiem" : function(test) { + test.expect(10); + moment.lang('zh-cn'); + + test.equal(moment([2011, 2, 23, 0, 0]).format('a'), "早上", "morning"); + test.equal(moment([2011, 2, 23, 9, 0]).format('a'), "上午", "before noon"); + test.equal(moment([2011, 2, 23, 12, 0]).format('a'), "中午", "noon"); + test.equal(moment([2011, 2, 23, 13, 0]).format('a'), "下午", "after noon"); + test.equal(moment([2011, 2, 23, 18, 0]).format('a'), "晚上", "night"); + + test.equal(moment([2011, 2, 23, 0, 0]).format('A'), "早上", "morning"); + test.equal(moment([2011, 2, 23, 9, 0]).format('A'), "上午", "before noon"); + test.equal(moment([2011, 2, 23, 12, 0]).format('A'), "中午", "noon"); + test.equal(moment([2011, 2, 23, 13, 0]).format('A'), "下午", "afternoon"); + test.equal(moment([2011, 2, 23, 18, 0]).format('A'), "晚上", "night"); + + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/moment/add_subtract.js b/node_modules/emailjs/node_modules/moment/test/moment/add_subtract.js new file mode 100644 index 0000000..1241bef --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/moment/add_subtract.js @@ -0,0 +1,128 @@ +var moment = require("../../moment"); + +exports.add_subtract = { + "add and subtract short" : function(test) { + test.expect(12); + + var a = moment(); + a.year(2011); + a.month(9); + a.date(12); + a.hours(6); + a.minutes(7); + a.seconds(8); + a.milliseconds(500); + + test.equal(a.add({ms:50}).milliseconds(), 550, 'Add milliseconds'); + test.equal(a.add({s:1}).seconds(), 9, 'Add seconds'); + test.equal(a.add({m:1}).minutes(), 8, 'Add minutes'); + test.equal(a.add({h:1}).hours(), 7, 'Add hours'); + test.equal(a.add({d:1}).date(), 13, 'Add date'); + test.equal(a.add({w:1}).date(), 20, 'Add week'); + test.equal(a.add({M:1}).month(), 10, 'Add month'); + test.equal(a.add({y:1}).year(), 2012, 'Add year'); + + var b = moment([2010, 0, 31]).add({M:1}); + var c = moment([2010, 1, 28]).subtract({M:1}); + + test.equal(b.month(), 1, 'add month, jan 31st to feb 28th'); + test.equal(b.date(), 28, 'add month, jan 31st to feb 28th'); + test.equal(c.month(), 0, 'subtract month, feb 28th to jan 28th'); + test.equal(c.date(), 28, 'subtract month, feb 28th to jan 28th'); + test.done(); + }, + + "add and subtract long" : function(test) { + test.expect(8); + + var a = moment(); + a.year(2011); + a.month(9); + a.date(12); + a.hours(6); + a.minutes(7); + a.seconds(8); + a.milliseconds(500); + + test.equal(a.add({milliseconds:50}).milliseconds(), 550, 'Add milliseconds'); + test.equal(a.add({seconds:1}).seconds(), 9, 'Add seconds'); + test.equal(a.add({minutes:1}).minutes(), 8, 'Add minutes'); + test.equal(a.add({hours:1}).hours(), 7, 'Add hours'); + test.equal(a.add({days:1}).date(), 13, 'Add date'); + test.equal(a.add({weeks:1}).date(), 20, 'Add week'); + test.equal(a.add({months:1}).month(), 10, 'Add month'); + test.equal(a.add({years:1}).year(), 2012, 'Add year'); + test.done(); + }, + + "add and subtract string long" : function(test) { + test.expect(9); + + var a = moment(); + a.year(2011); + a.month(9); + a.date(12); + a.hours(6); + a.minutes(7); + a.seconds(8); + a.milliseconds(500); + + var b = a.clone(); + + test.equal(a.add('milliseconds', 50).milliseconds(), 550, 'Add milliseconds'); + test.equal(a.add('seconds', 1).seconds(), 9, 'Add seconds'); + test.equal(a.add('minutes', 1).minutes(), 8, 'Add minutes'); + test.equal(a.add('hours', 1).hours(), 7, 'Add hours'); + test.equal(a.add('days', 1).date(), 13, 'Add date'); + test.equal(a.add('weeks', 1).date(), 20, 'Add week'); + test.equal(a.add('months', 1).month(), 10, 'Add month'); + test.equal(a.add('years', 1).year(), 2012, 'Add year'); + test.equal(b.add('days', '01').date(), 13, 'Add date'); + test.done(); + }, + + "add and subtract string short" : function(test) { + test.expect(8); + + var a = moment(); + a.year(2011); + a.month(9); + a.date(12); + a.hours(6); + a.minutes(7); + a.seconds(8); + a.milliseconds(500); + + test.equal(a.add('ms', 50).milliseconds(), 550, 'Add milliseconds'); + test.equal(a.add('s', 1).seconds(), 9, 'Add seconds'); + test.equal(a.add('m', 1).minutes(), 8, 'Add minutes'); + test.equal(a.add('h', 1).hours(), 7, 'Add hours'); + test.equal(a.add('d', 1).date(), 13, 'Add date'); + test.equal(a.add('w', 1).date(), 20, 'Add week'); + test.equal(a.add('M', 1).month(), 10, 'Add month'); + test.equal(a.add('y', 1).year(), 2012, 'Add year'); + test.done(); + }, + + "add across DST" : function(test) { + test.expect(3); + + var a = moment(new Date(2011, 2, 12, 5, 0, 0)); + var b = moment(new Date(2011, 2, 12, 5, 0, 0)); + var c = moment(new Date(2011, 2, 12, 5, 0, 0)); + var d = moment(new Date(2011, 2, 12, 5, 0, 0)); + a.add('days', 1); + b.add('hours', 24); + c.add('months', 1); + test.equal(a.hours(), 5, 'adding days over DST difference should result in the same hour'); + if (b.isDST() && !d.isDST()) { + test.equal(b.hours(), 6, 'adding hours over DST difference should result in a different hour'); + } else if (!b.isDST() && d.isDST()) { + test.equal(b.hours(), 4, 'adding hours over DST difference should result in a different hour'); + } else { + test.equal(b.hours(), 5, 'adding hours over DST difference should result in a same hour if the timezone does not have daylight savings time'); + } + test.equal(c.hours(), 5, 'adding months over DST difference should result in the same hour'); + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/moment/create.js b/node_modules/emailjs/node_modules/moment/test/moment/create.js new file mode 100644 index 0000000..480386d --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/moment/create.js @@ -0,0 +1,319 @@ +var moment = require("../../moment"); + +exports.create = { + "array" : function(test) { + test.expect(8); + test.ok(moment([2010]).toDate() instanceof Date, "[2010]"); + test.ok(moment([2010, 1]).toDate() instanceof Date, "[2010, 1]"); + test.ok(moment([2010, 1, 12]).toDate() instanceof Date, "[2010, 1, 12]"); + test.ok(moment([2010, 1, 12, 1]).toDate() instanceof Date, "[2010, 1, 12, 1]"); + test.ok(moment([2010, 1, 12, 1, 1]).toDate() instanceof Date, "[2010, 1, 12, 1, 1]"); + test.ok(moment([2010, 1, 12, 1, 1, 1]).toDate() instanceof Date, "[2010, 1, 12, 1, 1, 1]"); + test.ok(moment([2010, 1, 12, 1, 1, 1, 1]).toDate() instanceof Date, "[2010, 1, 12, 1, 1, 1, 1]"); + test.equal(+moment(new Date(2010, 1, 14, 15, 25, 50, 125)), +moment([2010, 1, 14, 15, 25, 50, 125]), "constructing with array === constructing with new Date()"); + test.done(); + }, + + "number" : function(test) { + test.expect(3); + test.ok(moment(1000).toDate() instanceof Date, "1000"); + test.ok((moment(1000).valueOf() === 1000), "testing valueOf"); + test.ok((moment.utc(1000).valueOf() === 1000), "testing valueOf"); + test.done(); + }, + + "unix" : function(test) { + test.expect(8); + test.equal(moment.unix(1).valueOf(), 1000, "1 unix timestamp == 1000 Date.valueOf"); + test.equal(moment(1000).unix(), 1, "1000 Date.valueOf == 1 unix timestamp"); + test.equal(moment.unix(1000).valueOf(), 1000000, "1000 unix timestamp == 1000000 Date.valueOf"); + test.equal(moment(1500).unix(), 1, "1500 Date.valueOf == 1 unix timestamp"); + test.equal(moment(1900).unix(), 1, "1900 Date.valueOf == 1 unix timestamp"); + test.equal(moment(2100).unix(), 2, "2100 Date.valueOf == 2 unix timestamp"); + test.equal(moment(1333129333524).unix(), 1333129333, "1333129333524 Date.valueOf == 1333129333 unix timestamp"); + test.equal(moment(1333129333524000).unix(), 1333129333524, "1333129333524000 Date.valueOf == 1333129333524 unix timestamp"); + test.done(); + }, + + "date" : function(test) { + test.expect(1); + test.ok(moment(new Date()).toDate() instanceof Date, "new Date()"); + test.done(); + }, + + "moment" : function(test) { + test.expect(2); + test.ok(moment(moment()).toDate() instanceof Date, "moment(moment())"); + test.ok(moment(moment(moment())).toDate() instanceof Date, "moment(moment(moment()))"); + test.done(); + }, + + "undefined" : function(test) { + test.expect(1); + test.ok(moment().toDate() instanceof Date, "undefined"); + test.done(); + }, + + "string without format" : function(test) { + test.expect(2); + test.ok(moment("Aug 9, 1995").toDate() instanceof Date, "Aug 9, 1995"); + test.ok(moment("Mon, 25 Dec 1995 13:30:00 GMT").toDate() instanceof Date, "Mon, 25 Dec 1995 13:30:00 GMT"); + test.done(); + }, + + "string from Date.toString" : function(test) { + test.expect(1); + var str = (new Date()).toString(); + test.equal(moment(str).toString(), str, "Parsing a string from Date.prototype.toString should match moment.fn.toString"); + test.done(); + }, + + "string without format - json" : function(test) { + test.expect(5); + test.equal(moment("Date(1325132654000)").valueOf(), 1325132654000, "Date(1325132654000)"); + test.equal(moment("Date(-1325132654000)").valueOf(), -1325132654000, "Date(-1325132654000)"); + test.equal(moment("/Date(1325132654000)/").valueOf(), 1325132654000, "/Date(1325132654000)/"); + test.equal(moment("/Date(1325132654000+0700)/").valueOf(), 1325132654000, "/Date(1325132654000+0700)/"); + test.equal(moment("/Date(1325132654000-0700)/").valueOf(), 1325132654000, "/Date(1325132654000-0700)/"); + test.done(); + }, + + "string with format dropped am/pm bug" : function(test) { + moment.lang('en'); + test.expect(3); + + test.equal(moment('05/1/2012', 'MM/DD/YYYY h:m:s a').format('MM/DD/YYYY'), '05/01/2012', 'should not break if am/pm is left off from the parsing tokens'); + test.equal(moment('05/1/2012 12:25:00 am', 'MM/DD/YYYY h:m:s a').format('MM/DD/YYYY'), '05/01/2012', 'should not break if am/pm is left off from the parsing tokens'); + test.equal(moment('05/1/2012 12:25:00 pm', 'MM/DD/YYYY h:m:s a').format('MM/DD/YYYY'), '05/01/2012', 'should not break if am/pm is left off from the parsing tokens'); + + test.done(); + }, + + "empty string with formats" : function(test) { + test.expect(3); + + test.equal(moment(' ', 'MM').format('YYYY-MM-DD HH:mm:ss'), '0000-01-01 00:00:00', 'should not break if input is an empty string'); + test.equal(moment(' ', 'DD').format('YYYY-MM-DD HH:mm:ss'), '0000-01-01 00:00:00', 'should not break if input is an empty string'); + test.equal(moment(' ', ['MM', "DD"]).format('YYYY-MM-DD HH:mm:ss'), '0000-01-01 00:00:00', 'should not break if input is an empty string'); + + test.done(); + }, + + "string with format" : function(test) { + moment.lang('en'); + var a = [ + ['MM-DD-YYYY', '12-02-1999'], + ['DD-MM-YYYY', '12-02-1999'], + ['DD/MM/YYYY', '12/02/1999'], + ['DD_MM_YYYY', '12_02_1999'], + ['DD:MM:YYYY', '12:02:1999'], + ['D-M-YY', '2-2-99'], + ['YY', '99'], + ['DDD-YYYY', '300-1999'], + ['DD-MM-YYYY h:m:s', '12-02-1999 2:45:10'], + ['DD-MM-YYYY h:m:s a', '12-02-1999 2:45:10 am'], + ['DD-MM-YYYY h:m:s a', '12-02-1999 2:45:10 pm'], + ['h:mm a', '12:00 pm'], + ['h:mm a', '12:30 pm'], + ['h:mm a', '12:00 am'], + ['h:mm a', '12:30 am'], + ['HH:mm', '12:00'], + ['YYYY-MM-DDTHH:mm:ss', '2011-11-11T11:11:11'], + ['MM-DD-YYYY \\M', '12-02-1999 M'], + ['ddd MMM DD HH:mm:ss YYYY', 'Tue Apr 07 22:52:51 2009'], + ['HH:mm:ss', '12:00:00'], + ['HH:mm:ss', '12:30:00'], + ['HH:mm:ss', '00:00:00'], + ['HH:mm:ss S', '00:30:00 1'], + ['HH:mm:ss SS', '00:30:00 12'], + ['HH:mm:ss SSS', '00:30:00 123'], + ['HH:mm:ss S', '00:30:00 7'], + ['HH:mm:ss SS', '00:30:00 78'], + ['HH:mm:ss SSS', '00:30:00 789'] + ], + i; + + test.expect(a.length); + for (i = 0; i < a.length; i++) { + test.equal(moment(a[i][1], a[i][0]).format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]); + } + test.done(); + }, + + "string with format no separators" : function(test) { + moment.lang('en'); + var a = [ + ['MMDDYYYY', '12021999'], + ['DDMMYYYY', '12021999'], + ['YYYYMMDD', '19991202'] + ],i; + + test.expect(a.length); + + for (i = 0; i < a.length; i++) { + test.equal(moment(a[i][1], a[i][0]).format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]); + } + + test.done(); + }, + + "string with format (timezone)" : function(test) { + test.expect(8); + test.equal(moment('5 -0700', 'H ZZ').toDate().getUTCHours(), 12, 'parse hours "5 -0700" ---> "H ZZ"'); + test.equal(moment('5 -07:00', 'H Z').toDate().getUTCHours(), 12, 'parse hours "5 -07:00" ---> "H Z"'); + test.equal(moment('5 -0730', 'H ZZ').toDate().getUTCMinutes(), 30, 'parse hours "5 -0730" ---> "H ZZ"'); + test.equal(moment('5 -07:30', 'H Z').toDate().getUTCMinutes(), 30, 'parse hours "5 -07:30" ---> "H Z"'); + test.equal(moment('5 +0100', 'H ZZ').toDate().getUTCHours(), 4, 'parse hours "5 +0100" ---> "H ZZ"'); + test.equal(moment('5 +01:00', 'H Z').toDate().getUTCHours(), 4, 'parse hours "5 +01:00" ---> "H Z"'); + test.equal(moment('5 +0130', 'H ZZ').toDate().getUTCMinutes(), 30, 'parse hours "5 +0130" ---> "H ZZ"'); + test.equal(moment('5 +01:30', 'H Z').toDate().getUTCMinutes(), 30, 'parse hours "5 +01:30" ---> "H Z"'); + test.done(); + }, + + "string with format (timezone offset)" : function(test) { + test.expect(4); + var a = new Date(Date.UTC(2011, 0, 1, 1)); + var b = moment('2011 1 1 0 -01:00', 'YYYY MM DD HH Z'); + test.equal(a.getHours(), b.hours(), 'date created with utc == parsed string with timezone offset'); + test.equal(+a, +b, 'date created with utc == parsed string with timezone offset'); + var c = moment('2011 2 1 10 -05:00', 'YYYY MM DD HH Z'); + var d = moment('2011 2 1 8 -07:00', 'YYYY MM DD HH Z'); + test.equal(c.hours(), d.hours(), '10 am central time == 8 am pacific time'); + var e = moment.utc('Fri, 20 Jul 2012 17:15:00', 'ddd, DD MMM YYYY HH:mm:ss'); + var f = moment.utc('Fri, 20 Jul 2012 10:15:00 -0700', 'ddd, DD MMM YYYY HH:mm:ss ZZ'); + test.equal(e.hours(), f.hours(), 'parse timezone offset in utc'); + test.done(); + }, + + "string with array of formats" : function(test) { + test.expect(3); + test.equal(moment('13-02-1999', ['MM-DD-YYYY', 'DD-MM-YYYY']).format('MM DD YYYY'), '02 13 1999', 'switching month and day'); + test.equal(moment('02-13-1999', ['MM/DD/YYYY', 'YYYY-MM-DD', 'MM-DD-YYYY']).format('MM DD YYYY'), '02 13 1999', 'year last'); + test.equal(moment('1999-02-13', ['MM/DD/YYYY', 'YYYY-MM-DD', 'MM-DD-YYYY']).format('MM DD YYYY'), '02 13 1999', 'year first'); + test.done(); + }, + + "string with format - years" : function(test) { + test.expect(2); + test.equal(moment('71', 'YY').format('YYYY'), '1971', '71 > 1971'); + test.equal(moment('69', 'YY').format('YYYY'), '2069', '69 > 2069'); + test.done(); + }, + + "implicit cloning" : function(test) { + test.expect(2); + var momentA = moment([2011, 10, 10]); + var momentB = moment(momentA); + momentA.month(5); + test.equal(momentB.month(), 10, "Calling moment() on a moment will create a clone"); + test.equal(momentA.month(), 5, "Calling moment() on a moment will create a clone"); + test.done(); + }, + + "explicit cloning" : function(test) { + test.expect(2); + var momentA = moment([2011, 10, 10]); + var momentB = momentA.clone(); + momentA.month(5); + test.equal(momentB.month(), 10, "Calling moment() on a moment will create a clone"); + test.equal(momentA.month(), 5, "Calling moment() on a moment will create a clone"); + test.done(); + }, + + "cloning carrying over utc mode" : function(test) { + test.expect(8); + + test.equal(moment().local().clone()._isUTC, false, "An explicit cloned local moment should have _isUTC == false"); + test.equal(moment().utc().clone()._isUTC, true, "An cloned utc moment should have _isUTC == true"); + test.equal(moment().clone()._isUTC, false, "An explicit cloned local moment should have _isUTC == false"); + test.equal(moment.utc().clone()._isUTC, true, "An explicit cloned utc moment should have _isUTC == true"); + test.equal(moment(moment().local())._isUTC, false, "An implicit cloned local moment should have _isUTC == false"); + test.equal(moment(moment().utc())._isUTC, true, "An implicit cloned utc moment should have _isUTC == true"); + test.equal(moment(moment())._isUTC, false, "An implicit cloned local moment should have _isUTC == false"); + test.equal(moment(moment.utc())._isUTC, true, "An implicit cloned utc moment should have _isUTC == true"); + + test.done(); + }, + + "parsing iso" : function(test) { + var offset = moment([2011, 9, 08]).zone(); + var pad = function(input) { + if (input < 10) { + return '0' + input; + } + return '' + input; + } + var hourOffset = (offset > 0) ? Math.floor(offset / 60) : Math.ceil(offset / 60); + var minOffset = offset - (hourOffset * 60); + var tz = (offset > 0) ? '-' + pad(hourOffset) + ':' + pad(minOffset) : '+' + pad(-hourOffset) + ':' + pad(-minOffset); + var tz2 = tz.replace(':', ''); + var formats = [ + ['2011-10-08', '2011-10-08T00:00:00.000' + tz], + ['2011-10-08T18', '2011-10-08T18:00:00.000' + tz], + ['2011-10-08T18:04', '2011-10-08T18:04:00.000' + tz], + ['2011-10-08T18:04:20', '2011-10-08T18:04:20.000' + tz], + ['2011-10-08T18:04' + tz, '2011-10-08T18:04:00.000' + tz], + ['2011-10-08T18:04:20' + tz, '2011-10-08T18:04:20.000' + tz], + ['2011-10-08T18:04' + tz2, '2011-10-08T18:04:00.000' + tz], + ['2011-10-08T18:04:20' + tz2, '2011-10-08T18:04:20.000' + tz], + ['2011-10-08T18:04:20.1' + tz2, '2011-10-08T18:04:20.100' + tz], + ['2011-10-08T18:04:20.11' + tz2, '2011-10-08T18:04:20.110' + tz], + ['2011-10-08T18:04:20.111' + tz2, '2011-10-08T18:04:20.111' + tz] + ]; + test.expect(formats.length); + for (var i = 0; i < formats.length; i++) { + test.equal(formats[i][1], moment(formats[i][0]).format('YYYY-MM-DDTHH:mm:ss.SSSZ'), "moment should be able to parse ISO " + formats[i][0]); + } + test.done(); + }, + + "parsing iso Z timezone" : function(test) { + var i, + formats = [ + ['2011-10-08T18:04Z', '2011-10-08T18:04:00.000+00:00'], + ['2011-10-08T18:04:20Z', '2011-10-08T18:04:20.000+00:00'], + ['2011-10-08T18:04:20.111Z', '2011-10-08T18:04:20.111+00:00'] + ]; + test.expect(formats.length); + for (i = 0; i < formats.length; i++) { + test.equal(moment.utc(formats[i][0]).format('YYYY-MM-DDTHH:mm:ss.SSSZ'), formats[i][1], "moment should be able to parse ISO " + formats[i][0]); + } + test.done(); + }, + + "parsing iso Z timezone into local" : function(test) { + test.expect(1); + + var m = moment('2011-10-08T18:04:20.111Z'); + + test.equal(m.utc().format('YYYY-MM-DDTHH:mm:ss.SSS'), '2011-10-08T18:04:20.111', "moment should be able to parse ISO 2011-10-08T18:04:20.111Z"); + + test.done(); + }, + + "null" : function(test) { + test.expect(3); + test.equal(moment(''), null, "Calling moment('')"); + test.equal(moment(null), null, "Calling moment(null)"); + test.equal(moment('', 'YYYY-MM-DD'), null, "Calling moment('', 'YYYY-MM-DD')"); + test.done(); + }, + + "first century" : function(test) { + test.expect(6); + test.equal(moment([0, 0, 1]).format("YYYY-MM-DD"), "0000-01-01", "Year AD 0"); + test.equal(moment([99, 0, 1]).format("YYYY-MM-DD"), "0099-01-01", "Year AD 99"); + test.equal(moment([999, 0, 1]).format("YYYY-MM-DD"), "0999-01-01", "Year AD 999"); + test.equal(moment('0 1 1', 'YYYY MM DD').format("YYYY-MM-DD"), "0000-01-01", "Year AD 0"); + test.equal(moment('99 1 1', 'YYYY MM DD').format("YYYY-MM-DD"), "0099-01-01", "Year AD 99"); + test.equal(moment('999 1 1', 'YYYY MM DD').format("YYYY-MM-DD"), "0999-01-01", "Year AD 999"); + test.done(); + }, + + "six digit years" : function(test) { + test.expect(2); + test.equal(moment([-270000, 0, 1]).format("YYYY-MM-DD"), "-270000-01-01", "format BC 270,000"); + test.equal(moment([ 270000, 0, 1]).format("YYYY-MM-DD"), "270000-01-01", "format AD 270,000"); + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/moment/days_in_month.js b/node_modules/emailjs/node_modules/moment/test/moment/days_in_month.js new file mode 100644 index 0000000..ffa2546 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/moment/days_in_month.js @@ -0,0 +1,28 @@ +var moment = require("../../moment"); + +exports.days_in_month = { + "days in month" : function(test) { + test.expect(24); + var months = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; + for (var i = 0; i < 12; i++) { + test.equal(moment([2012, i]).daysInMonth(), + months[i], + moment([2012, i]).format('L') + " should have " + months[i] + " days. (beginning of month " + i + ')') + } + for (var i = 0; i < 12; i++) { + test.equal(moment([2012, i, months[i]]).daysInMonth(), + months[i], + moment([2012, i, months[i]]).format('L') + " should have " + months[i] + " days. (end of month " + i + ')') + } + test.done(); + }, + + "days in month leap years" : function(test) { + test.expect(4); + test.equal(moment([2010, 1]).daysInMonth(), 28, "Feb 2010 should have 28 days"); + test.equal(moment([2100, 1]).daysInMonth(), 28, "Feb 2100 should have 28 days"); + test.equal(moment([2008, 1]).daysInMonth(), 29, "Feb 2008 should have 29 days"); + test.equal(moment([2000, 1]).daysInMonth(), 29, "Feb 2000 should have 29 days"); + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/moment/diff.js b/node_modules/emailjs/node_modules/moment/test/moment/diff.js new file mode 100644 index 0000000..849c166 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/moment/diff.js @@ -0,0 +1,94 @@ +var moment = require("../../moment"); + +exports.diff = { + "diff" : function(test) { + test.expect(5); + + test.equal(moment(1000).diff(0), 1000, "1 second - 0 = 1000"); + test.equal(moment(1000).diff(500), 500, "1 second - 0.5 seconds = 500"); + test.equal(moment(0).diff(1000), -1000, "0 - 1 second = -1000"); + test.equal(moment(new Date(1000)).diff(1000), 0, "1 second - 1 second = 0"); + var oneHourDate = new Date(), + nowDate = new Date(); + oneHourDate.setHours(oneHourDate.getHours() + 1); + test.equal(moment(oneHourDate).diff(nowDate), 60 * 60 * 1000, "1 hour from now = 360000"); + test.done(); + }, + + "diff key after" : function(test) { + test.expect(9); + + test.equal(moment([2010]).diff([2011], 'years'), -1, "year diff"); + test.equal(moment([2010]).diff([2011, 6], 'years', true), -1.5, "year diff, float"); + test.equal(moment([2010]).diff([2010, 2], 'months'), -2, "month diff"); + test.equal(moment([2010]).diff([2010, 0, 7], 'weeks'), -1, "week diff"); + test.equal(moment([2010]).diff([2010, 0, 21], 'weeks'), -3, "week diff"); + test.equal(moment([2010]).diff([2010, 0, 4], 'days'), -3, "day diff"); + test.equal(moment([2010]).diff([2010, 0, 1, 4], 'hours'), -4, "hour diff"); + test.equal(moment([2010]).diff([2010, 0, 1, 0, 5], 'minutes'), -5, "minute diff"); + test.equal(moment([2010]).diff([2010, 0, 1, 0, 0, 6], 'seconds'), -6, "second diff"); + test.done(); + }, + + "diff key before" : function(test) { + test.expect(9); + + test.equal(moment([2011]).diff([2010], 'years'), 1, "year diff"); + test.equal(moment([2011, 6]).diff([2010], 'years', true), 1.5, "year diff, float"); + test.equal(moment([2010, 2]).diff([2010], 'months'), 2, "month diff"); + test.equal(moment([2010, 0, 4]).diff([2010], 'days'), 3, "day diff"); + test.equal(moment([2010, 0, 7]).diff([2010], 'weeks'), 1, "week diff"); + test.equal(moment([2010, 0, 21]).diff([2010], 'weeks'), 3, "week diff"); + test.equal(moment([2010, 0, 1, 4]).diff([2010], 'hours'), 4, "hour diff"); + test.equal(moment([2010, 0, 1, 0, 5]).diff([2010], 'minutes'), 5, "minute diff"); + test.equal(moment([2010, 0, 1, 0, 0, 6]).diff([2010], 'seconds'), 6, "second diff"); + test.done(); + }, + + "diff month" : function(test) { + test.expect(1); + + test.equal(moment([2011, 0, 31]).diff([2011, 2, 1], 'months'), -1, "month diff"); + test.done(); + }, + + "diff across DST" : function(test) { + test.expect(2); + + test.equal(moment([2012, 2, 24]).diff([2012, 2, 10], 'weeks', true), 2, "diff weeks across DST"); + test.equal(moment([2012, 2, 24]).diff([2012, 2, 10], 'days', true), 14, "diff weeks across DST"); + test.done(); + }, + + "diff overflow" : function(test) { + test.expect(4); + + test.equal(moment([2011]).diff([2010], 'months'), 12, "month diff"); + test.equal(moment([2010, 0, 2]).diff([2010], 'hours'), 24, "hour diff"); + test.equal(moment([2010, 0, 1, 2]).diff([2010], 'minutes'), 120, "minute diff"); + test.equal(moment([2010, 0, 1, 0, 4]).diff([2010], 'seconds'), 240, "second diff"); + test.done(); + }, + + "diff between utc and local" : function(test) { + test.expect(7); + + test.equal(moment([2011]).utc().diff([2010], 'years'), 1, "year diff"); + test.equal(moment([2010, 2]).utc().diff([2010], 'months'), 2, "month diff"); + test.equal(moment([2010, 0, 4]).utc().diff([2010], 'days'), 3, "day diff"); + test.equal(moment([2010, 0, 21]).utc().diff([2010], 'weeks'), 3, "week diff"); + test.equal(moment([2010, 0, 1, 4]).utc().diff([2010], 'hours'), 4, "hour diff"); + test.equal(moment([2010, 0, 1, 0, 5]).utc().diff([2010], 'minutes'), 5, "minute diff"); + test.equal(moment([2010, 0, 1, 0, 0, 6]).utc().diff([2010], 'seconds'), 6, "second diff"); + + test.done(); + }, + + "year diffs include dates" : function(test) { + test.expect(1); + + test.ok(moment([2012, 1, 19]).diff(moment([2002, 1, 20]), 'years', true) < 10, "year diff should include date of month"); + + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/moment/duration.js b/node_modules/emailjs/node_modules/moment/test/moment/duration.js new file mode 100644 index 0000000..37ac454 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/moment/duration.js @@ -0,0 +1,212 @@ +var moment = require("../../moment"); + +exports.duration = { + "object instantiation" : function(test) { + var d = moment.duration({ + years: 2, + months: 3, + weeks: 2, + days: 1, + hours: 8, + minutes: 9, + seconds: 20, + milliseconds: 12 + }); + + test.expect(8); + test.equal(d.years(), 2, "years"); + test.equal(d.months(), 3, "months"); + test.equal(d.weeks(), 2, "weeks"); + test.equal(d.days(), 15, "days"); // two weeks + 1 day + test.equal(d.hours(), 8, "hours"); + test.equal(d.minutes(), 9, "minutes"); + test.equal(d.seconds(), 20, "seconds"); + test.equal(d.milliseconds(), 12, "milliseconds"); + test.done(); + }, + + "milliseconds instantiation" : function(test) { + test.expect(1); + test.equal(moment.duration(72).milliseconds(), 72, "milliseconds"); + test.done(); + }, + + "instantiation by type" : function(test) { + test.expect(16); + test.equal(moment.duration(1, "years").years(), 1, "years"); + test.equal(moment.duration(1, "y").years(), 1, "y"); + test.equal(moment.duration(2, "months").months(), 2, "months"); + test.equal(moment.duration(2, "M").months(), 2, "M"); + test.equal(moment.duration(3, "weeks").weeks(), 3, "weeks"); + test.equal(moment.duration(3, "w").weeks(), 3, "weeks"); + test.equal(moment.duration(4, "days").days(), 4, "days"); + test.equal(moment.duration(4, "d").days(), 4, "d"); + test.equal(moment.duration(5, "hours").hours(), 5, "hours"); + test.equal(moment.duration(5, "h").hours(), 5, "h"); + test.equal(moment.duration(6, "minutes").minutes(), 6, "minutes"); + test.equal(moment.duration(6, "m").minutes(), 6, "m"); + test.equal(moment.duration(7, "seconds").seconds(), 7, "seconds"); + test.equal(moment.duration(7, "s").seconds(), 7, "s"); + test.equal(moment.duration(8, "milliseconds").milliseconds(), 8, "milliseconds"); + test.equal(moment.duration(8, "ms").milliseconds(), 8, "ms"); + test.done(); + }, + + "shortcuts" : function(test) { + test.expect(8); + test.equal(moment.duration({y: 1}).years(), 1, "years = y"); + test.equal(moment.duration({M: 2}).months(), 2, "months = M"); + test.equal(moment.duration({w: 3}).weeks(), 3, "weeks = w"); + test.equal(moment.duration({d: 4}).days(), 4, "days = d"); + test.equal(moment.duration({h: 5}).hours(), 5, "hours = h"); + test.equal(moment.duration({m: 6}).minutes(), 6, "minutes = m"); + test.equal(moment.duration({s: 7}).seconds(), 7, "seconds = s"); + test.equal(moment.duration({ms: 8}).milliseconds(), 8, "milliseconds = ms"); + test.done(); + }, + + "instantiation from another duration" : function(test) { + var simple = moment.duration(1234), + complicated = moment.duration({ + years: 2, + months: 3, + weeks: 4, + days: 1, + hours: 8, + minutes: 9, + seconds: 20, + milliseconds: 12 + }); + + test.expect(2); + test.deepEqual(moment.duration(simple), simple, "simple clones are equal"); + test.deepEqual(moment.duration(complicated), complicated, "complicated clones are equal"); + test.done(); + }, + + "humanize" : function(test) { + test.expect(32); + moment.lang('en'); + test.equal(moment.duration({seconds: 44}).humanize(), "a few seconds", "44 seconds = a few seconds"); + test.equal(moment.duration({seconds: 45}).humanize(), "a minute", "45 seconds = a minute"); + test.equal(moment.duration({seconds: 89}).humanize(), "a minute", "89 seconds = a minute"); + test.equal(moment.duration({seconds: 90}).humanize(), "2 minutes", "90 seconds = 2 minutes"); + test.equal(moment.duration({minutes: 44}).humanize(), "44 minutes", "44 minutes = 44 minutes"); + test.equal(moment.duration({minutes: 45}).humanize(), "an hour", "45 minutes = an hour"); + test.equal(moment.duration({minutes: 89}).humanize(), "an hour", "89 minutes = an hour"); + test.equal(moment.duration({minutes: 90}).humanize(), "2 hours", "90 minutes = 2 hours"); + test.equal(moment.duration({hours: 5}).humanize(), "5 hours", "5 hours = 5 hours"); + test.equal(moment.duration({hours: 21}).humanize(), "21 hours", "21 hours = 21 hours"); + test.equal(moment.duration({hours: 22}).humanize(), "a day", "22 hours = a day"); + test.equal(moment.duration({hours: 35}).humanize(), "a day", "35 hours = a day"); + test.equal(moment.duration({hours: 36}).humanize(), "2 days", "36 hours = 2 days"); + test.equal(moment.duration({days: 1}).humanize(), "a day", "1 day = a day"); + test.equal(moment.duration({days: 5}).humanize(), "5 days", "5 days = 5 days"); + test.equal(moment.duration({weeks: 1}).humanize(), "7 days", "1 week = 7 days"); + test.equal(moment.duration({days: 25}).humanize(), "25 days", "25 days = 25 days"); + test.equal(moment.duration({days: 26}).humanize(), "a month", "26 days = a month"); + test.equal(moment.duration({days: 30}).humanize(), "a month", "30 days = a month"); + test.equal(moment.duration({days: 45}).humanize(), "a month", "45 days = a month"); + test.equal(moment.duration({days: 46}).humanize(), "2 months", "46 days = 2 months"); + test.equal(moment.duration({days: 74}).humanize(), "2 months", "75 days = 2 months"); + test.equal(moment.duration({days: 76}).humanize(), "3 months", "76 days = 3 months"); + test.equal(moment.duration({months: 1}).humanize(), "a month", "1 month = a month"); + test.equal(moment.duration({months: 5}).humanize(), "5 months", "5 months = 5 months"); + test.equal(moment.duration({days: 344}).humanize(), "11 months", "344 days = 11 months"); + test.equal(moment.duration({days: 345}).humanize(), "a year", "345 days = a year"); + test.equal(moment.duration({days: 547}).humanize(), "a year", "547 days = a year"); + test.equal(moment.duration({days: 548}).humanize(), "2 years", "548 days = 2 years"); + test.equal(moment.duration({years: 1}).humanize(), "a year", "1 year = a year"); + test.equal(moment.duration({years: 5}).humanize(), "5 years", "5 years = 5 years"); + test.equal(moment.duration(7200000).humanize(), "2 hours", "7200000 = 2 minutes"); + test.done(); + }, + + "humanize duration with suffix" : function(test) { + test.expect(2); + moment.lang('en'); + test.equal(moment.duration({seconds: 44}).humanize(true), "in a few seconds", "44 seconds = a few seconds"); + test.equal(moment.duration({seconds: -44}).humanize(true), "a few seconds ago", "44 seconds = a few seconds"); + test.done(); + }, + + "bubble value up" : function(test) { + test.expect(5); + test.equal(moment.duration({milliseconds: 61001}).milliseconds(), 1, "61001 milliseconds has 1 millisecond left over"); + test.equal(moment.duration({milliseconds: 61001}).seconds(), 1, "61001 milliseconds has 1 second left over"); + test.equal(moment.duration({milliseconds: 61001}).minutes(), 1, "61001 milliseconds has 1 minute left over"); + + test.equal(moment.duration({minutes: 350}).minutes(), 50, "350 minutes has 50 minutes left over"); + test.equal(moment.duration({minutes: 350}).hours(), 5, "350 minutes has 5 hours left over"); + test.done(); + }, + + "clipping" : function(test) { + test.expect(18); + test.equal(moment.duration({months: 11}).months(), 11, "11 months is 11 months"); + test.equal(moment.duration({months: 11}).years(), 0, "11 months makes no year"); + test.equal(moment.duration({months: 12}).months(), 0, "12 months is 0 months left over"); + test.equal(moment.duration({months: 12}).years(), 1, "12 months makes 1 year"); + test.equal(moment.duration({months: 13}).months(), 1, "13 months is 1 month left over"); + test.equal(moment.duration({months: 13}).years(), 1, "13 months makes 1 year"); + + test.equal(moment.duration({days: 29}).days(), 29, "29 days is 29 days"); + test.equal(moment.duration({days: 29}).months(), 0, "29 days makes no month"); + test.equal(moment.duration({days: 30}).days(), 0, "30 days is 0 days left over"); + test.equal(moment.duration({days: 30}).months(), 1, "30 days is a month"); + test.equal(moment.duration({days: 31}).days(), 1, "31 days is 1 day left over"); + test.equal(moment.duration({days: 31}).months(), 1, "31 days is a month"); + + test.equal(moment.duration({hours: 23}).hours(), 23, "23 hours is 23 hours"); + test.equal(moment.duration({hours: 23}).days(), 0, "23 hours makes no day"); + test.equal(moment.duration({hours: 24}).hours(), 0, "24 hours is 0 hours left over"); + test.equal(moment.duration({hours: 24}).days(), 1, "24 hours makes 1 day"); + test.equal(moment.duration({hours: 25}).hours(), 1, "25 hours is 1 hour left over"); + test.equal(moment.duration({hours: 25}).days(), 1, "25 hours makes 1 day"); + test.done(); + }, + + "effective equivalency" : function(test) { + test.expect(7); + test.deepEqual(moment.duration({seconds: 1})._data, moment.duration({milliseconds: 1000})._data, "1 second is the same as 1000 milliseconds"); + test.deepEqual(moment.duration({seconds: 60})._data, moment.duration({minutes: 1})._data, "1 minute is the same as 60 seconds"); + test.deepEqual(moment.duration({minutes: 60})._data, moment.duration({hours: 1})._data, "1 hour is the same as 60 minutes"); + test.deepEqual(moment.duration({hours: 24})._data, moment.duration({days: 1})._data, "1 day is the same as 24 hours"); + test.deepEqual(moment.duration({days: 7})._data, moment.duration({weeks: 1})._data, "1 week is the same as 7 days"); + test.deepEqual(moment.duration({days: 30})._data, moment.duration({months: 1})._data, "1 month is the same as 30 days"); + test.deepEqual(moment.duration({months: 12})._data, moment.duration({years: 1})._data, "1 years is the same as 12 months"); + test.done(); + }, + + "asGetters" : function(test) { + var d = moment.duration({ + years: 2, + months: 3, + weeks: 2, + days: 1, + hours: 8, + minutes: 9, + seconds: 20, + milliseconds: 12 + }); + + test.expect(8); + test.equal(Math.round(d.asYears() * 100) / 100, 2.26, "years"); + test.equal(Math.round(d.asMonths() * 100) / 100, 27.51, "months"); + test.equal(Math.round(d.asWeeks() * 100) / 100, 117.91, "weeks"); + test.equal(Math.round(d.asDays() * 100) / 100, 825.34, "days"); + test.equal(Math.round(d.asHours() * 100) / 100, 19808.16, "hours"); + test.equal(Math.round(d.asMinutes() * 100) / 100, 1188489.33, "minutes"); + test.equal(Math.round(d.asSeconds() * 100) / 100, 71309360.01, "seconds"); + test.equal(d.asMilliseconds(), 71309360012, "milliseconds"); + test.done(); + }, + + "isDuration" : function(test) { + test.expect(3); + test.ok(moment.isDuration(moment.duration(12345678)), "correctly says true"); + test.ok(!moment.isDuration(moment()), "moment object is not a duration"); + test.ok(!moment.isDuration({milliseconds: 1}), "plain object is not a duration"); + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/moment/format.js b/node_modules/emailjs/node_modules/moment/test/moment/format.js new file mode 100644 index 0000000..3f38173 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/moment/format.js @@ -0,0 +1,111 @@ +var moment = require("../../moment"); + +exports.format = { + "format YY" : function(test) { + test.expect(1); + + var b = moment(new Date(2009, 1, 14, 15, 25, 50, 125)); + test.equal(b.format('YY'), '09', 'YY ---> 09'); + test.done(); + }, + + "format escape brackets" : function(test) { + test.expect(5); + + var b = moment(new Date(2009, 1, 14, 15, 25, 50, 125)); + test.equal(b.format('[day]'), 'day', 'Single bracket'); + test.equal(b.format('[day] YY [YY]'), 'day 09 YY', 'Double bracket'); + test.equal(b.format('[YY'), '[09', 'Un-ended bracket'); + test.equal(b.format('[[YY]]'), '[YY]', 'Double nested brackets'); + test.equal(b.format('[[]'), '[', 'Escape open bracket'); + test.done(); + }, + + "format milliseconds" : function(test) { + test.expect(6); + var b = moment(new Date(2009, 1, 14, 15, 25, 50, 123)); + test.equal(b.format('S'), '1', 'Deciseconds'); + test.equal(b.format('SS'), '12', 'Centiseconds'); + test.equal(b.format('SSS'), '123', 'Milliseconds'); + b.milliseconds(789); + test.equal(b.format('S'), '7', 'Deciseconds'); + test.equal(b.format('SS'), '78', 'Centiseconds'); + test.equal(b.format('SSS'), '789', 'Milliseconds'); + test.done(); + }, + + "format timezone" : function(test) { + test.expect(2); + + var b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)); + var explanation = 'moment().format("z") = ' + b.format('z') + ' It should be something like "PST"' + if (moment().zone() === -60) { + explanation += "For UTC+1 this is a known issue, see https://github.com/timrwood/moment/issues/162"; + } + test.ok(b.format('Z').match(/^[\+\-]\d\d:\d\d$/), b.format('Z') + ' should be something like "+07:30"'); + test.ok(b.format('ZZ').match(/^[\+\-]\d{4}$/), b.format('ZZ') + ' should be something like "+0700"'); + test.done(); + }, + + "format multiple with zone" : function(test) { + test.expect(1); + + var b = moment('2012-10-08 -1200', ['YYYY ZZ', 'YYYY-MM-DD ZZ']); + test.equals(b.format('YYYY-MM'), '2012-10', 'Parsing multiple formats should not crash with different sized formats'); + test.done(); + }, + + "isDST" : function(test) { + test.expect(2); + + var janOffset = new Date(2011, 0, 1).getTimezoneOffset(), + julOffset = new Date(2011, 6, 1).getTimezoneOffset(), + janIsDst = janOffset < julOffset, + julIsDst = julOffset < janOffset, + jan1 = moment([2011]), + jul1 = moment([2011, 6]); + + if (janIsDst && julIsDst) { + test.ok(0, 'January and July cannot both be in DST'); + test.ok(0, 'January and July cannot both be in DST'); + } else if (janIsDst) { + test.ok(jan1.isDST(), 'January 1 is DST'); + test.ok(!jul1.isDST(), 'July 1 is not DST'); + } else if (julIsDst) { + test.ok(!jan1.isDST(), 'January 1 is not DST'); + test.ok(jul1.isDST(), 'July 1 is DST'); + } else { + test.ok(!jan1.isDST(), 'January 1 is not DST'); + test.ok(!jul1.isDST(), 'July 1 is not DST'); + } + test.done(); + }, + + "zone" : function(test) { + test.expect(3); + + if (moment().zone() > 0) { + test.ok(moment().format('ZZ').indexOf('-') > -1, 'When the zone() offset is greater than 0, the ISO offset should be less than zero'); + } + if (moment().zone() < 0) { + test.ok(moment().format('ZZ').indexOf('+') > -1, 'When the zone() offset is less than 0, the ISO offset should be greater than zero'); + } + if (moment().zone() == 0) { + test.ok(moment().format('ZZ').indexOf('+') > -1, 'When the zone() offset is equal to 0, the ISO offset should be positive zero'); + } + if (moment().zone() === 0) { + test.equal(moment().zone(), 0, 'moment.fn.zone should be a multiple of 15 (was ' + moment().zone() + ')'); + } else { + test.equal(moment().zone() % 15, 0, 'moment.fn.zone should be a multiple of 15 (was ' + moment().zone() + ')'); + } + test.equal(moment().zone(), new Date().getTimezoneOffset(), 'zone should equal getTimezoneOffset'); + test.done(); + }, + + "default format" : function(test) { + test.expect(1); + var isoRegex = /\d{4}.\d\d.\d\dT\d\d.\d\d.\d\d[\+\-]\d\d:\d\d/; + test.ok(isoRegex.exec(moment().format()), "default format (" + moment().format() + ") should match ISO"); + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/moment/getters_setters.js b/node_modules/emailjs/node_modules/moment/test/moment/getters_setters.js new file mode 100644 index 0000000..dc3d77b --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/moment/getters_setters.js @@ -0,0 +1,103 @@ +var moment = require("../../moment"); + +exports.getters_setters = { + "getters" : function(test) { + test.expect(8); + + var a = moment([2011, 9, 12, 6, 7, 8, 9]); + test.equal(a.year(), 2011, 'year'); + test.equal(a.month(), 9, 'month'); + test.equal(a.date(), 12, 'date'); + test.equal(a.day(), 3, 'day'); + test.equal(a.hours(), 6, 'hour'); + test.equal(a.minutes(), 7, 'minute'); + test.equal(a.seconds(), 8, 'second'); + test.equal(a.milliseconds(), 9, 'milliseconds'); + test.done(); + }, + + "setters" : function(test) { + test.expect(8); + + var a = moment(); + a.year(2011); + a.month(9); + a.date(12); + a.hours(6); + a.minutes(7); + a.seconds(8); + a.milliseconds(9); + test.equal(a.year(), 2011, 'year'); + test.equal(a.month(), 9, 'month'); + test.equal(a.date(), 12, 'date'); + test.equal(a.day(), 3, 'day'); + test.equal(a.hours(), 6, 'hour'); + test.equal(a.minutes(), 7, 'minute'); + test.equal(a.seconds(), 8, 'second'); + test.equal(a.milliseconds(), 9, 'milliseconds'); + test.done(); + }, + + "setters - falsey values" : function(test) { + test.expect(1); + + var a = moment(); + // ensure minutes wasn't coincidentally 0 already + a.minutes(1); + a.minutes(0); + test.equal(a.minutes(), 0, 'falsey value'); + test.done(); + }, + + "chaining setters" : function(test) { + test.expect(7); + + var a = moment(); + a.year(2011) + .month(9) + .date(12) + .hours(6) + .minutes(7) + .seconds(8); + test.equal(a.year(), 2011, 'year'); + test.equal(a.month(), 9, 'month'); + test.equal(a.date(), 12, 'date'); + test.equal(a.day(), 3, 'day'); + test.equal(a.hours(), 6, 'hour'); + test.equal(a.minutes(), 7, 'minute'); + test.equal(a.seconds(), 8, 'second'); + test.done(); + }, + + "day setter" : function(test) { + test.expect(18); + + var a = moment([2011, 0, 15]); + test.equal(moment(a).day(0).date(), 9, 'set from saturday to sunday'); + test.equal(moment(a).day(6).date(), 15, 'set from saturday to saturday'); + test.equal(moment(a).day(3).date(), 12, 'set from saturday to wednesday'); + + a = moment([2011, 0, 9]); + test.equal(moment(a).day(0).date(), 9, 'set from sunday to sunday'); + test.equal(moment(a).day(6).date(), 15, 'set from sunday to saturday'); + test.equal(moment(a).day(3).date(), 12, 'set from sunday to wednesday'); + + a = moment([2011, 0, 12]); + test.equal(moment(a).day(0).date(), 9, 'set from wednesday to sunday'); + test.equal(moment(a).day(6).date(), 15, 'set from wednesday to saturday'); + test.equal(moment(a).day(3).date(), 12, 'set from wednesday to wednesday'); + + test.equal(moment(a).day(-7).date(), 2, 'set from wednesday to last sunday'); + test.equal(moment(a).day(-1).date(), 8, 'set from wednesday to last saturday'); + test.equal(moment(a).day(-4).date(), 5, 'set from wednesday to last wednesday'); + + test.equal(moment(a).day(7).date(), 16, 'set from wednesday to next sunday'); + test.equal(moment(a).day(13).date(), 22, 'set from wednesday to next saturday'); + test.equal(moment(a).day(10).date(), 19, 'set from wednesday to next wednesday'); + + test.equal(moment(a).day(14).date(), 23, 'set from wednesday to second next sunday'); + test.equal(moment(a).day(20).date(), 29, 'set from wednesday to second next saturday'); + test.equal(moment(a).day(17).date(), 26, 'set from wednesday to second next wednesday'); + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/moment/humanize_duration.js b/node_modules/emailjs/node_modules/moment/test/moment/humanize_duration.js new file mode 100644 index 0000000..b539851 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/moment/humanize_duration.js @@ -0,0 +1,52 @@ +var moment = require("../../moment"); + +exports.humanize_duration = { + "humanize duration" : function(test) { + test.expect(32); + moment.lang('en'); + // this syntax is deprecated. + // see moment.duration instead. + test.equal(moment.humanizeDuration(44, "seconds"), "a few seconds", "44 seconds = a few seconds"); + test.equal(moment.humanizeDuration(45, "seconds"), "a minute", "45 seconds = a minute"); + test.equal(moment.humanizeDuration(89, "seconds"), "a minute", "89 seconds = a minute"); + test.equal(moment.humanizeDuration(90, "seconds"), "2 minutes", "90 seconds = 2 minutes"); + test.equal(moment.humanizeDuration(44, "minutes"), "44 minutes", "44 minutes = 44 minutes"); + test.equal(moment.humanizeDuration(45, "minutes"), "an hour", "45 minutes = an hour"); + test.equal(moment.humanizeDuration(89, "minutes"), "an hour", "89 minutes = an hour"); + test.equal(moment.humanizeDuration(90, "minutes"), "2 hours", "90 minutes = 2 hours"); + test.equal(moment.humanizeDuration(5, "hours"), "5 hours", "5 hours = 5 hours"); + test.equal(moment.humanizeDuration(21, "hours"), "21 hours", "21 hours = 21 hours"); + test.equal(moment.humanizeDuration(22, "hours"), "a day", "22 hours = a day"); + test.equal(moment.humanizeDuration(35, "hours"), "a day", "35 hours = a day"); + test.equal(moment.humanizeDuration(36, "hours"), "2 days", "36 hours = 2 days"); + test.equal(moment.humanizeDuration(1, "days"), "a day", "1 day = a day"); + test.equal(moment.humanizeDuration(5, "days"), "5 days", "5 days = 5 days"); + test.equal(moment.humanizeDuration(1, "weeks"), "7 days", "1 week = 7 days"); + test.equal(moment.humanizeDuration(25, "days"), "25 days", "25 days = 25 days"); + test.equal(moment.humanizeDuration(26, "days"), "a month", "26 days = a month"); + test.equal(moment.humanizeDuration(30, "days"), "a month", "30 days = a month"); + test.equal(moment.humanizeDuration(45, "days"), "a month", "45 days = a month"); + test.equal(moment.humanizeDuration(46, "days"), "2 months", "46 days = 2 months"); + test.equal(moment.humanizeDuration(74, "days"), "2 months", "75 days = 2 months"); + test.equal(moment.humanizeDuration(76, "days"), "3 months", "76 days = 3 months"); + test.equal(moment.humanizeDuration(1, "months"), "a month", "1 month = a month"); + test.equal(moment.humanizeDuration(5, "months"), "5 months", "5 months = 5 months"); + test.equal(moment.humanizeDuration(344, "days"), "11 months", "344 days = 11 months"); + test.equal(moment.humanizeDuration(345, "days"), "a year", "345 days = a year"); + test.equal(moment.humanizeDuration(547, "days"), "a year", "547 days = a year"); + test.equal(moment.humanizeDuration(548, "days"), "2 years", "548 days = 2 years"); + test.equal(moment.humanizeDuration(1, "years"), "a year", "1 year = a year"); + test.equal(moment.humanizeDuration(5, "years"), "5 years", "5 years = 5 years"); + test.equal(moment.humanizeDuration(7200000), "2 hours", "7200000 = 2 minutes"); + test.done(); + }, + + "humanize duration with suffix" : function(test) { + test.expect(3); + moment.lang('en'); + test.equal(moment.humanizeDuration(44, "seconds", true), "in a few seconds", "44 seconds = a few seconds"); + test.equal(moment.humanizeDuration(-44, "seconds", true), "a few seconds ago", "44 seconds = a few seconds"); + test.equal(moment.humanizeDuration(44000, true), "in a few seconds", "44000 milliseconds = a few seconds"); + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/moment/is_moment.js b/node_modules/emailjs/node_modules/moment/test/moment/is_moment.js new file mode 100644 index 0000000..9b085cc --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/moment/is_moment.js @@ -0,0 +1,27 @@ +var moment = require('../../moment'); + +exports.is_moment = { + "is moment object": function(test) { + test.expect(11); + + var MyObj = function() {}; + MyObj.prototype.toDate = function() { + return new Date(); + } + + test.ok(moment.isMoment(moment()), 'simple moment object'); + test.ok(moment.isMoment(moment('invalid date')), 'invalid moment object'); + + test.ok(!moment.isMoment(new MyObj()), 'myObj is not moment object'); + test.ok(!moment.isMoment(moment), 'moment function is not moment object'); + test.ok(!moment.isMoment(new Date()), 'date object is not moment object'); + test.ok(!moment.isMoment(Object), 'Object is not moment object'); + test.ok(!moment.isMoment('foo'), 'string is not moment object'); + test.ok(!moment.isMoment(1), 'number is not moment object'); + test.ok(!moment.isMoment(NaN), 'NaN is not moment object'); + test.ok(!moment.isMoment(null), 'null is not moment object'); + test.ok(!moment.isMoment(undefined), 'undefined is not moment object'); + + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/moment/is_valid.js b/node_modules/emailjs/node_modules/moment/test/moment/is_valid.js new file mode 100644 index 0000000..2934128 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/moment/is_valid.js @@ -0,0 +1,118 @@ +var moment = require("../../moment"); + +exports.is_valid = { + "array bad month" : function (test) { + test.expect(2); + + test.equal(moment([2010, -1]).isValid(), false, 'month -1'); + test.equal(moment([2100, 12]).isValid(), false, 'month 12'); + + test.done(); + }, + + "array good month" : function (test) { + test.expect(24); + + for (var i = 0; i < 12; i++) { + test.equal(moment([2010, i]).isValid(), true, 'month ' + i); + test.equal(moment.utc([2010, i]).isValid(), true, 'month ' + i); + } + + test.done(); + }, + + "array bad date" : function (test) { + test.expect(4); + + test.equal(moment([2010, 0, 0]).isValid(), false, 'date 0'); + test.equal(moment([2100, 0, 32]).isValid(), false, 'date 32'); + + test.equal(moment.utc([2010, 0, 0]).isValid(), false, 'utc date 0'); + test.equal(moment.utc([2100, 0, 32]).isValid(), false, 'utc date 32'); + + test.done(); + }, + + "array bad date leap year" : function (test) { + test.expect(8); + + test.equal(moment([2010, 1, 29]).isValid(), false, '2010 feb 29'); + test.equal(moment([2100, 1, 29]).isValid(), false, '2100 feb 29'); + test.equal(moment([2008, 1, 30]).isValid(), false, '2008 feb 30'); + test.equal(moment([2000, 1, 30]).isValid(), false, '2000 feb 30'); + + test.equal(moment.utc([2010, 1, 29]).isValid(), false, 'utc 2010 feb 29'); + test.equal(moment.utc([2100, 1, 29]).isValid(), false, 'utc 2100 feb 29'); + test.equal(moment.utc([2008, 1, 30]).isValid(), false, 'utc 2008 feb 30'); + test.equal(moment.utc([2000, 1, 30]).isValid(), false, 'utc 2000 feb 30'); + + test.done(); + }, + + "string nonsensical" : function (test) { + test.expect(1); + + test.equal(moment('fail').isValid(), false, 'string "fail"'); + test.done(); + }, + + "invalid string iso 8601" : function (test) { + + var tests = [ + '2010-00-00', + '2010-01-00', + '2010-01-40', + '2010-01-01T24', + '2010-01-01T23:60', + '2010-01-01T23:59:60' + ]; + + test.expect(tests.length * 2); + + for (var i = 0; i < tests.length; i++) { + test.equal(moment(tests[i]).isValid(), false, tests[i] + ' should be invalid'); + test.equal(moment.utc(tests[i]).isValid(), false, tests[i] + ' should be invalid'); + } + test.done(); + }, + + "invalid string iso 8601 + timezone" : function (test) { + + var tests = [ + '2010-00-00+00:00', + '2010-01-00+00:00', + '2010-01-40+00:00', + '2010-01-40T24+00:00', + '2010-01-40T23:60+00:00', + '2010-01-40T23:59:60+00:00', + '2010-01-40T23:59:59.9999+00:00' + ]; + + test.expect(tests.length * 2); + + for (var i = 0; i < tests.length; i++) { + test.equal(moment(tests[i]).isValid(), false, tests[i] + ' should be invalid'); + test.equal(moment.utc(tests[i]).isValid(), false, tests[i] + ' should be invalid'); + } + test.done(); + }, + + "valid string iso 8601 + timezone" : function (test) { + var tests = [ + '2010-01-01', + '2010-01-30', + '2010-01-30T23+00:00', + '2010-01-30T23:59+00:00', + '2010-01-30T23:59:59+00:00', + '2010-01-30T23:59:59.999+00:00' + ]; + + test.expect(tests.length * 2); + + for (var i = 0; i < tests.length; i++) { + test.equal(moment(tests[i]).isValid(), true, tests[i] + ' should be valid'); + test.equal(moment.utc(tests[i]).isValid(), true, tests[i] + ' should be valid'); + } + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/moment/lang.js b/node_modules/emailjs/node_modules/moment/test/moment/lang.js new file mode 100644 index 0000000..b4823f1 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/moment/lang.js @@ -0,0 +1,197 @@ +var moment = require("../../moment"); + +exports.lang = { + "library getter" : function(test) { + test.expect(4); + + moment.lang('en'); + test.equal(moment.lang(), 'en', 'Lang should return en by default'); + + moment.lang('fr'); + test.equal(moment.lang(), 'fr', 'Lang should return the changed language'); + + moment.lang('en-gb'); + test.equal(moment.lang(), 'en-gb', 'Lang should return the changed language'); + + moment.lang('en'); + test.equal(moment.lang(), 'en', 'Lang should reset'); + + test.done(); + }, + + "library ensure inheritance" : function(test) { + test.expect(2); + + moment.lang('made-up', { + // I put them out of order + months : "February_March_April_May_June_July_August_September_October_November_December_January".split("_") + // the rest of the properties should be inherited. + }); + + test.equal(moment([2012, 5, 6]).format('MMMM'), 'July', 'Override some of the configs'); + test.equal(moment([2012, 5, 6]).format('MMM'), 'Jun', 'But not all of them'); + + test.done(); + }, + + "library langData" : function(test) { + test.expect(3); + moment.lang('en'); + + test.equal(moment.langData().months[0], 'January', 'no arguments returns global'); + test.equal(moment.langData('zh-cn').months[0], '一月', 'a string returns the language based on key'); + test.equal(moment.langData(moment().lang('es')).months[0], 'Enero', "if you pass in a moment it uses the moment's language"); + + test.done(); + }, + + "instance lang method" : function(test) { + test.expect(3); + moment.lang('en'); + + test.equal(moment([2012, 5, 6]).format('MMMM'), 'June', 'Normally default to global'); + test.equal(moment([2012, 5, 6]).lang('es').format('MMMM'), 'Junio', 'Use the instance specific language'); + test.equal(moment([2012, 5, 6]).format('MMMM'), 'June', 'Using an instance specific language does not affect other moments'); + + test.done(); + }, + + "instance lang persists with manipulation" : function(test) { + test.expect(3); + moment.lang('en'); + + test.equal(moment([2012, 5, 6]).lang('es').add({days: 1}).format('MMMM'), 'Junio', 'With addition'); + test.equal(moment([2012, 5, 6]).lang('es').day(0).format('MMMM'), 'Junio', 'With day getter'); + test.equal(moment([2012, 5, 6]).lang('es').eod().format('MMMM'), 'Junio', 'With eod'); + + test.done(); + }, + + "instance lang persists with cloning" : function(test) { + test.expect(2); + moment.lang('en'); + + var a = moment([2012, 5, 6]).lang('es'), + b = a.clone(), + c = moment(a); + + test.equal(b.format('MMMM'), 'Junio', 'using moment.fn.clone()'); + test.equal(b.format('MMMM'), 'Junio', 'using moment()'); + + test.done(); + }, + + "duration lang method" : function(test) { + test.expect(3); + moment.lang('en'); + + test.equal(moment.duration({seconds: 44}).humanize(), 'a few seconds', 'Normally default to global'); + test.equal(moment.duration({seconds: 44}).lang('es').humanize(), 'unos segundos', 'Use the instance specific language'); + test.equal(moment.duration({seconds: 44}).humanize(), 'a few seconds', 'Using an instance specific language does not affect other durations'); + + test.done(); + }, + + "duration lang persists with cloning" : function(test) { + test.expect(1); + moment.lang('en'); + + var a = moment.duration({seconds: 44}).lang('es'), + b = moment.duration(a); + + test.equal(b.humanize(), 'unos segundos', 'using moment.duration()'); + test.done(); + }, + + "instance lang used with from" : function(test) { + test.expect(2); + moment.lang('en'); + + var a = moment([2012, 5, 6]).lang('es'), + b = moment([2012, 5, 7]); + + test.equal(a.from(b), 'hace un día', 'preserve language of first moment'); + test.equal(b.from(a), 'in a day', 'do not preserve language of second moment'); + + test.done(); + }, + + "month name callback function" : function(test) { + test.expect(3); + + function fakeReplace(m, format) { + if (/test/.test(format)) { + return "test"; + } + if (m.date() === 1) { + return "date"; + } + return 'default'; + } + + moment.lang('made-up', { + months : fakeReplace, + monthsShort : fakeReplace, + weekdays : fakeReplace, + weekdaysShort : fakeReplace, + weekdaysMin : fakeReplace + }); + + test.equal(moment().format('[test] dd ddd dddd MMM MMMM'), 'test test test test test test', 'format month name function should be able to access the format string'); + test.equal(moment([2011, 0, 1]).format('dd ddd dddd MMM MMMM'), 'date date date date date', 'format month name function should be able to access the moment object'); + test.equal(moment([2011, 0, 2]).format('dd ddd dddd MMM MMMM'), 'default default default default default', 'format month name function should be able to access the moment object'); + + test.done(); + }, + + // the following tests should be removed after the 2.0.0 release as they will be deprecated + "lang accessors on the global object should exist < 2.0.0" : function(test) { + moment.lang('en'); + + var a = 'months|monthsShort|monthsParse|weekdays|weekdaysShort|weekdaysMin|longDateFormat|calendar|relativeTime|ordinal|meridiem'.split('|'); + var i; + + test.expect(a.length); + + for (i = 0; i < a.length; i++) { + test.ok(moment[a[i]], "moment." + a[i] + " should exist"); + } + + test.done(); + }, + + // the following tests should be removed after the 2.0.0 release as they will be deprecated + "lang accessors on the global object should change < 2.0.0" : function(test) { + moment.lang('en'); + + var a = 'months|monthsShort|weekdays|weekdaysShort|weekdaysMin|longDateFormat|calendar|relativeTime|ordinal'.split('|'); + var i; + var en = {}; + + test.expect(a.length); + + for (i = 0; i < a.length; i++) { + en[a[i]] = moment[a[i]]; + } + + moment.lang('fr'); + + for (i = 0; i < a.length; i++) { + test.notDeepEqual(en[a[i]], moment[a[i]], "the " + a[i] + " lang data should change on the global object"); + } + + test.done(); + }, + + "manip lang accessors on the global object < 2.0.0" : function(test) { + test.expect(1); + moment.lang('en'); + + moment.months = ["test"]; + test.equal(moment([2011, 0]).format('MMMM'), "test", "Should be able to manipulate the objects on the global object"); + + moment.lang('en'); + + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/moment/leapyear.js b/node_modules/emailjs/node_modules/moment/test/moment/leapyear.js new file mode 100644 index 0000000..7a3dd26 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/moment/leapyear.js @@ -0,0 +1,13 @@ +var moment = require("../../moment"); + +exports.leapyear = { + "leap year" : function(test) { + test.expect(4); + + test.equal(moment([2010, 0, 1]).isLeapYear(), false, '2010'); + test.equal(moment([2100, 0, 1]).isLeapYear(), false, '2100'); + test.equal(moment([2008, 0, 1]).isLeapYear(), true, '2008'); + test.equal(moment([2000, 0, 1]).isLeapYear(), true, '2000'); + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/moment/mutable.js b/node_modules/emailjs/node_modules/moment/test/moment/mutable.js new file mode 100644 index 0000000..4d45c94 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/moment/mutable.js @@ -0,0 +1,56 @@ +var moment = require("../../moment"); + +exports.mutable = { + "manipulation methods" : function (test) { + + var mutableMethods = { + 'year': function (m){ return m.year(2011); }, + 'month': function (m){ return m.month(1); }, + 'date': function (m){ return m.date(9); }, + 'hours': function (m){ return m.hours(7); }, + 'minutes': function (m){ return m.minutes(33); }, + 'seconds': function (m){ return m.seconds(44); }, + 'milliseconds': function (m){ return m.milliseconds(55); }, + 'day': function (m){ return m.day(2); }, + 'startOf': function (m){ return m.startOf('week') }, + 'endOf': function (m){ return m.endOf('week') }, + 'add': function (m){ return m.add('days', 1) }, + 'subtract': function (m){ return m.subtract('years', 2) }, + 'local': function (m){ return m.local() }, + 'utc': function (m){ return m.utc() } + }; + + test.expect(14); + + for (method in mutableMethods) { + if (mutableMethods.hasOwnProperty(method)) { + var d = new Date(); + var d2 = mutableMethods[method](moment(d)).toDate(); + test.equal(d, d2, method + "() should be mutable"); + } + } + + test.done(); + }, + + "non mutable methods" : function (test) { + + var nonMutableMethods = { + 'sod': function (m){ return m.sod() }, + 'eod': function (m){ return m.eod() } + }; + + test.expect(2); + + for (method in nonMutableMethods){ + if (nonMutableMethods.hasOwnProperty(method)) { + var d = new Date(); + var d2 = nonMutableMethods[method](moment(d)).toDate(); + test.notEqual(d, d2, method + "() should not be mutable"); + } + } + + test.done(); + } + +}; diff --git a/node_modules/emailjs/node_modules/moment/test/moment/sod_eod.js b/node_modules/emailjs/node_modules/moment/test/moment/sod_eod.js new file mode 100644 index 0000000..fd3a856 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/moment/sod_eod.js @@ -0,0 +1,232 @@ +var moment = require("../../moment"); + +exports.eod_sod = { + "sod" : function(test) { + test.expect(7); + + var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).sod(); + test.equal(m.year(), 2011, "keep the year"); + test.equal(m.month(), 1, "keep the month"); + test.equal(m.date(), 2, "keep the day"); + test.equal(m.hours(), 0, "strip out the hours"); + test.equal(m.minutes(), 0, "strip out the minutes"); + test.equal(m.seconds(), 0, "strip out the seconds"); + test.equal(m.milliseconds(), 0, "strip out the milliseconds"); + test.done(); + }, + + "eod" : function(test) { + test.expect(7); + + var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).eod(); + test.equal(m.year(), 2011, "keep the year"); + test.equal(m.month(), 1, "keep the month"); + test.equal(m.date(), 2, "keep the day"); + test.equal(m.hours(), 23, "set the hours"); + test.equal(m.minutes(), 59, "set the minutes"); + test.equal(m.seconds(), 59, "set the seconds"); + test.equal(m.milliseconds(), 999, "set the seconds"); + test.done(); + }, + + "eod utc" : function(test) { + test.expect(1); + + var m2 = moment.utc(new Date(2011, 1, 2, 3, 4, 5, 6)); + test.equal(m2.eod().valueOf(), m2.hours(23).minutes(59).seconds(59).milliseconds(999).valueOf(), "Eod should equal manual hours/mins/seconds"); + + test.done(); + }, + + "start of year" : function(test) { + test.expect(8); + + var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('year'); + var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('years'); + test.equal(+m, +ms, "Plural or singular should work"); + test.equal(m.year(), 2011, "keep the year"); + test.equal(m.month(), 0, "strip out the month"); + test.equal(m.date(), 1, "strip out the day"); + test.equal(m.hours(), 0, "strip out the hours"); + test.equal(m.minutes(), 0, "strip out the minutes"); + test.equal(m.seconds(), 0, "strip out the seconds"); + test.equal(m.milliseconds(), 0, "strip out the milliseconds"); + test.done(); + }, + + "end of year" : function(test) { + test.expect(8); + + var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('year'); + var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('years'); + test.equal(+m, +ms, "Plural or singular should work"); + test.equal(m.year(), 2011, "keep the year"); + test.equal(m.month(), 11, "set the month"); + test.equal(m.date(), 31, "set the day"); + test.equal(m.hours(), 23, "set the hours"); + test.equal(m.minutes(), 59, "set the minutes"); + test.equal(m.seconds(), 59, "set the seconds"); + test.equal(m.milliseconds(), 999, "set the seconds"); + test.done(); + }, + + "start of month" : function(test) { + test.expect(8); + + var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('month'); + var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('months'); + test.equal(+m, +ms, "Plural or singular should work"); + test.equal(m.year(), 2011, "keep the year"); + test.equal(m.month(), 1, "keep the month"); + test.equal(m.date(), 1, "strip out the day"); + test.equal(m.hours(), 0, "strip out the hours"); + test.equal(m.minutes(), 0, "strip out the minutes"); + test.equal(m.seconds(), 0, "strip out the seconds"); + test.equal(m.milliseconds(), 0, "strip out the milliseconds"); + test.done(); + }, + + "end of month" : function(test) { + test.expect(8); + + var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('month'); + var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('months'); + test.equal(+m, +ms, "Plural or singular should work"); + test.equal(m.year(), 2011, "keep the year"); + test.equal(m.month(), 1, "keep the month"); + test.equal(m.date(), 28, "set the day"); + test.equal(m.hours(), 23, "set the hours"); + test.equal(m.minutes(), 59, "set the minutes"); + test.equal(m.seconds(), 59, "set the seconds"); + test.equal(m.milliseconds(), 999, "set the seconds"); + test.done(); + }, + + "start of day" : function(test) { + test.expect(8); + + var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('day'); + var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('days'); + test.equal(+m, +ms, "Plural or singular should work"); + test.equal(m.year(), 2011, "keep the year"); + test.equal(m.month(), 1, "keep the month"); + test.equal(m.date(), 2, "keep the day"); + test.equal(m.hours(), 0, "strip out the hours"); + test.equal(m.minutes(), 0, "strip out the minutes"); + test.equal(m.seconds(), 0, "strip out the seconds"); + test.equal(m.milliseconds(), 0, "strip out the milliseconds"); + test.done(); + }, + + "end of day" : function(test) { + test.expect(8); + + var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('day'); + var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('days'); + test.equal(+m, +ms, "Plural or singular should work"); + test.equal(m.year(), 2011, "keep the year"); + test.equal(m.month(), 1, "keep the month"); + test.equal(m.date(), 2, "keep the day"); + test.equal(m.hours(), 23, "set the hours"); + test.equal(m.minutes(), 59, "set the minutes"); + test.equal(m.seconds(), 59, "set the seconds"); + test.equal(m.milliseconds(), 999, "set the seconds"); + test.done(); + }, + + "start of hour" : function(test) { + test.expect(8); + + var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('hour'); + var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('hours'); + test.equal(+m, +ms, "Plural or singular should work"); + test.equal(m.year(), 2011, "keep the year"); + test.equal(m.month(), 1, "keep the month"); + test.equal(m.date(), 2, "keep the day"); + test.equal(m.hours(), 3, "keep the hours"); + test.equal(m.minutes(), 0, "strip out the minutes"); + test.equal(m.seconds(), 0, "strip out the seconds"); + test.equal(m.milliseconds(), 0, "strip out the milliseconds"); + test.done(); + }, + + "end of hour" : function(test) { + test.expect(8); + + var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('hour'); + var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('hours'); + test.equal(+m, +ms, "Plural or singular should work"); + test.equal(m.year(), 2011, "keep the year"); + test.equal(m.month(), 1, "keep the month"); + test.equal(m.date(), 2, "keep the day"); + test.equal(m.hours(), 3, "keep the hours"); + test.equal(m.minutes(), 59, "set the minutes"); + test.equal(m.seconds(), 59, "set the seconds"); + test.equal(m.milliseconds(), 999, "set the seconds"); + test.done(); + }, + + "start of minute" : function(test) { + test.expect(8); + + var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('minute'); + var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('minutes'); + test.equal(+m, +ms, "Plural or singular should work"); + test.equal(m.year(), 2011, "keep the year"); + test.equal(m.month(), 1, "keep the month"); + test.equal(m.date(), 2, "keep the day"); + test.equal(m.hours(), 3, "keep the hours"); + test.equal(m.minutes(), 4, "keep the minutes"); + test.equal(m.seconds(), 0, "strip out the seconds"); + test.equal(m.milliseconds(), 0, "strip out the milliseconds"); + test.done(); + }, + + "end of minute" : function(test) { + test.expect(8); + + var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('minute'); + var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('minutes'); + test.equal(+m, +ms, "Plural or singular should work"); + test.equal(m.year(), 2011, "keep the year"); + test.equal(m.month(), 1, "keep the month"); + test.equal(m.date(), 2, "keep the day"); + test.equal(m.hours(), 3, "keep the hours"); + test.equal(m.minutes(), 4, "keep the minutes"); + test.equal(m.seconds(), 59, "set the seconds"); + test.equal(m.milliseconds(), 999, "set the seconds"); + test.done(); + }, + + "start of second" : function(test) { + test.expect(8); + + var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('second'); + var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('seconds'); + test.equal(+m, +ms, "Plural or singular should work"); + test.equal(m.year(), 2011, "keep the year"); + test.equal(m.month(), 1, "keep the month"); + test.equal(m.date(), 2, "keep the day"); + test.equal(m.hours(), 3, "keep the hours"); + test.equal(m.minutes(), 4, "keep the minutes"); + test.equal(m.seconds(), 5, "keep the the seconds"); + test.equal(m.milliseconds(), 0, "strip out the milliseconds"); + test.done(); + }, + + "end of second" : function(test) { + test.expect(8); + + var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('second'); + var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('seconds'); + test.equal(+m, +ms, "Plural or singular should work"); + test.equal(m.year(), 2011, "keep the year"); + test.equal(m.month(), 1, "keep the month"); + test.equal(m.date(), 2, "keep the day"); + test.equal(m.hours(), 3, "keep the hours"); + test.equal(m.minutes(), 4, "keep the minutes"); + test.equal(m.seconds(), 5, "keep the seconds"); + test.equal(m.milliseconds(), 999, "set the seconds"); + test.done(); + }, +}; diff --git a/node_modules/emailjs/node_modules/moment/test/moment/utc.js b/node_modules/emailjs/node_modules/moment/test/moment/utc.js new file mode 100644 index 0000000..26a66a2 --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/moment/utc.js @@ -0,0 +1,63 @@ +var moment = require("../../moment"); + +exports.utc = { + "utc and local" : function(test) { + test.expect(7); + + var m = moment(Date.UTC(2011, 1, 2, 3, 4, 5, 6)); + m.utc(); + // utc + test.equal(m.date(), 2, "the day should be correct for utc"); + test.equal(m.day(), 3, "the date should be correct for utc"); + test.equal(m.hours(), 3, "the hours should be correct for utc"); + + // local + m.local(); + if (m.zone() > 180) { + test.equal(m.date(), 1, "the date should be correct for local"); + test.equal(m.day(), 2, "the day should be correct for local"); + } else { + test.equal(m.date(), 2, "the date should be correct for local"); + test.equal(m.day(), 3, "the day should be correct for local"); + } + var zone = Math.ceil(m.zone() / 60); + var expected = (24 + 3 - zone) % 24; + test.equal(m.hours(), expected, "the hours (" + m.hours() + ") should be correct for local"); + test.equal(moment().utc().zone(), 0, "timezone in utc should always be zero"); + test.done(); + }, + + "creating with utc" : function(test) { + test.expect(7); + + test.equal(moment.utc().valueOf(), moment().valueOf(), "Calling moment.utc() should default to the current time"); + + var m = moment.utc([2011, 1, 2, 3, 4, 5, 6]); + test.equal(m.date(), 2, "the day should be correct for utc array"); + test.equal(m.hours(), 3, "the hours should be correct for utc array"); + + m = moment.utc("2011-02-02 3:04:05", "YYYY-MM-DD HH:mm:ss"); + test.equal(m.date(), 2, "the day should be correct for utc parsing format"); + test.equal(m.hours(), 3, "the hours should be correct for utc parsing format"); + + m = moment.utc("2011-02-02T03:04:05+00:00"); + test.equal(m.date(), 2, "the day should be correct for utc parsing iso"); + test.equal(m.hours(), 3, "the hours should be correct for utc parsing iso"); + + test.done(); + }, + + "creating with utc without timezone" : function(test) { + test.expect(4); + + var m = moment.utc("2012-01-02T08:20:00"); + test.equal(m.date(), 2, "the day should be correct for utc parse without timezone"); + test.equal(m.hours(), 8, "the hours should be correct for utc parse without timezone"); + + m = moment.utc("2012-01-02T08:20:00+09:00"); + test.equal(m.date(), 1, "the day should be correct for utc parse with timezone"); + test.equal(m.hours(), 23, "the hours should be correct for utc parse with timezone"); + + test.done(); + } +}; diff --git a/node_modules/emailjs/node_modules/moment/test/zone.js b/node_modules/emailjs/node_modules/moment/test/zone.js new file mode 100644 index 0000000..5813fbc --- /dev/null +++ b/node_modules/emailjs/node_modules/moment/test/zone.js @@ -0,0 +1,181 @@ +var terminal = require('child_process').spawn('bash'), + path = require('path'), + util = require('util'), + nodeunit = require('nodeunit'); + +var ZONES; + + +/****************************** + Get Timezone +******************************/ + +var currentTimezone = ''; + +function getTimezone() { + var term = require('child_process').spawn('bash'); + + term.stdout.on('data', function (data) { + currentTimezone = data.toString().replace('Time Zone: ', ''); + getTimezoneList(); + }); + + term.stdin.write('systemsetup gettimezone'); + term.stdin.end(); +} + +function getTimezoneList() { + var term = require('child_process').spawn('bash'), + data = ''; + + term.stdout.on('data', function (d) { + data += d; + }); + + term.stdout.on('end', function () { + data = data.replace('Time Zones:', ''); + ZONES = data.match(/\S+/g); + // console.log(ZONES); + startTests(); + }); + + term.stdin.write('systemsetup listtimezones'); + term.stdin.end(); + +} + + + +/****************************** + Set Timezone +******************************/ + +var currentTimezone = ''; + +function setTimezone() { + terminal.stdin.write('systemsetup settimezone ' + currentTimezone); + terminal.stdin.end(); +} + + +/****************************** + Tests +******************************/ + + +var files = ['test/moment'], + paths = files.map(function (p) { + return path.join(process.cwd(), p); + }); + +var globalfailures = ''; + +var f = 0; +var p = 0; + +function errorLog(assertion) { + if (!assertion.error) { + return assertion; + } + + var e = assertion.error; + if (e.actual && e.expected) { + var actual = util.inspect(e.actual, false, 10).replace(/\n$/, ''), + expected = util.inspect(e.expected, false, 10).replace(/\n$/, ''), + multiline = (actual.indexOf('\n') !== -1 || expected.indexOf('\n') !== -1), + spacing = (multiline ? '\n' : ' '); + e._message = e.message; + e.stack = ( + e.name + ':' + spacing + + actual + spacing + e.operator + spacing + + expected + '\n' + + e.stack.split('\n').slice(1).join('\n') + ); + } + return assertion; +} + +var zone = '', + nextZone = ''; + +function runTestIfNeeded() { + if (zone === nextZone) { + return; + } + nextZone = zone; + + console.log("-----------------------"); + console.log(zone + " testing started..."); + nodeunit.runFiles(paths, { + testDone: function (name, assertions) { + if (assertions.failures()) { + console.log('\nFAILURE: ' + name); + assertions.forEach(function (a) { + if (a.failed()) { + a = errorLog(a); + if (a.error && a.message) { + console.log('Assertion Message: ' + a.message); + } + console.log(a.error.stack); + } + }); + } + }, + done: function (assertions) { + if (assertions.failures()) { + console.log('\n' + zone + ' had ' + assertions.failures() + ' failures'); + globalfailures += zone + ' had ' + assertions.failures() + ' failures\n'; + f++; + } else { + console.log(zone + ' passed all tests!'); + p++; + } + console.log("-----------------------"); + nextTest(); + } + }); +} + +function runTest(zoned) { + zone = zoned; + terminal.stdin.write('systemsetup settimezone ' + zone + '\n'); +} + +terminal.stdout.on('data', function(d) { + setTimeout(runTestIfNeeded, 100); +}); + + +var i = 0; + +function startTests() { + nextTest(); + //setTimezone(); +} + +function nextTest() { + if (i < ZONES.length) { + runTest(ZONES[i]); + } else { + console.log("----------------------"); + console.log("----------------------"); + console.log(globalfailures); + console.log("----------------------"); + console.log("----------------------"); + console.log("--- Total Failing " + f); + console.log("----------------------"); + console.log("--- Total Passing " + p); + console.log("----------------------"); + console.log("----------------------"); + setTimezone(); + } + i++; +} + + +/****************************** + Start it off +******************************/ + + +getTimezone(); \ No newline at end of file diff --git a/node_modules/emailjs/package.json b/node_modules/emailjs/package.json new file mode 100644 index 0000000..e31ff59 --- /dev/null +++ b/node_modules/emailjs/package.json @@ -0,0 +1,54 @@ +{ + "name": "emailjs", + "description": "send text/html emails and attachments (files, streams and strings) from node.js to any smtp server", + "version": "0.3.4", + "author": { + "name": "eleith" + }, + "contributors": [ + { + "name": "izuzak" + }, + { + "name": "Hiverness" + }, + { + "name": "mscdex" + }, + { + "name": "jimmybergman" + } + ], + "repository": { + "type": "git", + "url": "http://github.com/eleith/emailjs.git" + }, + "dependencies": { + "moment": "= 1.7.0", + "bufferjs": "=1.1.0" + }, + "optionalDependencies": { + "bufferjs": "=1.1.0" + }, + "devDependencies": { + "mocha": "= 1.7.4", + "chai": "= 1.1.0", + "simplesmtp": "= 0.1.18", + "mailparser": "0.2.27", + "iconv": "1.1.3" + }, + "engine": [ + "node >= 0.6" + ], + "main": "email", + "scripts": { + "test": "mocha -R spec -t 5000" + }, + "readme": "# emailjs (v0.3.3) [![Build Status](https://secure.travis-ci.org/eleith/emailjs.png)](http://travis-ci.org/eleith/emailjs)\n\nsend emails, html and attachments (files, streams and strings) from node.js to any smtp server\n\n## INSTALLING\n\n\tnpm install emailjs\n\n## FEATURES\n - works with SSL and TLS smtp servers (ex: gmail)\n - supports smtp authentication (PLAIN, LOGIN, CRAMMD5)\n - emails are queued and the queue is sent asynchronously\n - supports sending html emails and emails with multiple attachments (MIME)\n - attachments can be added as strings, streams or file paths\n - works with nodejs 3.8 and above\n\n## REQUIRES\n - access to an SMTP Server (ex: gmail)\n\n## EXAMPLE USAGE - text only emails\n\n```javascript\nvar email \t= require(\"./path/to/emailjs/email\");\nvar server \t= email.server.connect({\n user: \"username\", \n password:\"password\", \n host: \"smtp.gmail.com\", \n ssl: true\n \n});\n\n// send the message and get a callback with an error or details of the message that was sent\nserver.send({\n text: \"i hope this works\", \n from: \"you \", \n to: \"someone , another \",\n cc: \"else \",\n subject: \"testing emailjs\"\n}, function(err, message) { console.log(err || message); });\n```\n\n## EXAMPLE USAGE - html emails and attachments\n\n```javascript\nvar email \t= require(\"./path/to/emailjs/email\");\nvar server \t= email.server.connect({\n user:\t\"username\", \n password:\"password\", \n host:\t\"smtp.gmail.com\", \n ssl:\t\ttrue\n});\n\nvar message\t= {\n text:\t\"i hope this works\", \n from:\t\"you \", \n to:\t\t\"someone , another \",\n cc:\t\t\"else \",\n subject:\t\"testing emailjs\",\n attachment: \n [\n {data:\"i hope this works!\", alternative:true},\n {path:\"path/to/file.zip\", type:\"application/zip\", name:\"renamed.zip\"}\n ]\n};\n\n// send the message and get a callback with an error or details of the message that was sent\nserver.send(message, function(err, message) { console.log(err || message); });\n\n// you can continue to send more messages with successive calls to 'server.send', \n// they will be queued on the same smtp connection\n\n// or you can create a new server connection with 'email.server.connect' \n// to asynchronously send individual emails instead of a queue\n```\n# API \n\n## email.server.connect(options)\n\n\t// options is an object with the following keys\n\toptions =\n\t{\n\t\tuser \t\t// username for logging into smtp \n\t\tpassword // password for logging into smtp\n\t\thost\t\t// smtp host\n\t\tport\t\t// smtp port (if null a standard port number will be used)\n\t\tssl\t\t// boolean or object {key, ca, cert} (if exists, ssl connection will be made)\n\t\ttls\t\t// boolean (if true, starttls will be initiated)\n\t\ttimeout\t// max number of milliseconds to wait for smtp responses (defaults to 5000)\n\t\tdomain\t// domain to greet smtp with (defaults to os.hostname)\n\t}\n\t\n## email.server.send(message, callback)\n\t\n\t// message can be a smtp.Message (as returned by email.message.create)\n\t// or an object identical to the first argument accepted by email.message.create\n\n\t// callback will be executed with (err, message)\n\t// either when message is sent or an error has occurred\n\n## message\n\n\t// headers is an object ('from' and 'to' are required)\n\t// returns a Message object\n\n\t// you can actually pass more message headers than listed, the below are just the\n\t// most common ones you would want to use\n\n\theaders =\n\t{\n\t\ttext\t\t// text of the email \n\t\tfrom\t\t// sender of the format (address or name
or \"name\"
)\n\t\tto\t\t\t// recipients (same format as above), multiple recipients are separated by a comma\n\t\tcc\t\t\t// carbon copied recipients (same format as above)\n\t\tbcc\t\t// blind carbon copied recipients (same format as above)\n\t\tsubject\t// string subject of the email\n attachment // one attachment or array of attachments\n\t}\n\n## attachment\n\n\t// can be called multiple times, each adding a new attachment\n\t// options is an object with the following possible keys:\n \n options =\n {\n // one of these fields is required\n path // string to where the file is located\n data // string of the data you want to attach\n stream // binary stream that will provide attachment data (make sure it is in the paused state)\n // better performance for binary streams is achieved if buffer.length % (76*6) == 0\n // current max size of buffer must be no larger than Message.BUFFERSIZE\n \n // optionally these fields are also accepted\n type\t // string of the file mime type\n name // name to give the file as perceived by the recipient\n alternative // if true, will be attached inline as an alternative (also defaults type='text/html')\n inline // if true, will be attached inline\n encoded // set this to true if the data is already base64 encoded, (avoid this if possible)\n headers // object containing header=>value pairs for inclusion in this attachment's header\n related // an array of attachments that you want to be related to the parent attachment\n }\n\t\n## Authors\n\neleith\n\n## Testing\n\n\tnpm install -d\n\tnpm test\n\n## Contributions\n\nissues and pull requests are welcome\n", + "readmeFilename": "Readme.md", + "_id": "emailjs@0.3.4", + "dist": { + "shasum": "a4d7fef2903043c982d281b6272672b0c45b68f5" + }, + "_from": "emailjs@>= 0.2.7" +} diff --git a/node_modules/emailjs/smtp/address.js b/node_modules/emailjs/smtp/address.js new file mode 100644 index 0000000..cf161f8 --- /dev/null +++ b/node_modules/emailjs/smtp/address.js @@ -0,0 +1,416 @@ +/* + * Email address parsing code. + * rewritten with python's (2.7) email/_parseaddr.py as the starting point +*/ + +var SPACE = ' '; +var EMPTYSTRING = ''; +var COMMASPACE = ', '; + +var quote = function(str) +{ + // Add quotes around a string. + return str.replace(/\\\\/g, '\\\\').replace(/"/g, '\\"'); +}; + +/* + * To understand what this class does, it helps to have a copy of RFC 2822 in + * front of you. + */ + +var Address = function(field) +{ + /* + * Initialize a new instance. + * `field' is an unparsed address header field, containing + * one or more addresses. + */ + + this.specials = '()<>@,:;.\"[]'; + this.pos = 0; + this.LWS = ' \t'; + this.CR = '\r\n'; + this.FWS = this.LWS + this.CR; + this.atomends = this.specials + this.LWS + this.CR; + + // Note that RFC 2822 now specifies `.' as obs-phrase, meaning that it + // is obsolete syntax. RFC 2822 requires that we recognize obsolete + // syntax, so allow dots in phrases. + + this.phraseends = this.atomends.replace(/\./g, ''); + this.field = field || ""; + this.commentlist = []; +}; + +Address.prototype = +{ + gotonext: function() + { + //Parse up to the start of the next address. + while(this.pos < this.field.length) + { + if((this.LWS + '\n\r').indexOf(this.field[this.pos]) != -1) + this.pos++; + + else if(this.field[this.pos] == '(') + this.commentlist.push(this.getcomment()); + + else + break; + } + }, + + getlist: function() + { + // Parse all addresses. Returns a list containing all of the addresses + var result = [], ad; + + while(this.pos < this.field.length) + { + ad = this.get(); + + if(ad) + result.push(ad); + + else + result.push({label:'', address:''}); + } + + return result; + }, + + get: function() + { + // Parse the next address + this.commentlist = []; + this.gotonext(); + + var oldpos = this.pos, oldcl = this.commentlist, plist = this.getphraselist(), returnlist = [], + addrspec, fieldlen, routeaddr; + + this.gotonext(); + + if(this.pos >= this.field.length) + { + // Bad email address, no domain + if(plist.length) + returnlist = [{label:this.commentlist.join(SPACE), address:plist[0]}]; + } + + else if('.@'.indexOf(this.field[this.pos]) != -1) + { + // email address is just an addrspec + // this isn't very efficient since we start over + this.pos = oldpos; + this.commentlist = oldcl; + addrspec = this.getspec(); + returnlist = {label:this.commentlist.join(SPACE), address:addrspec}; + } + + else if(this.field[this.pos] == ':') + { + // address is a group + returnlist = []; + fieldlen = this.field.length; + this.pos++; + + while(this.pos < this.field.length) + { + this.gotonext(); + + if(this.pos < fieldlen && this.field[this.pos] == ';') + { + this.pos += 1; + break; + } + + returnlist = returnlist.push(this.get()); + } + } + + else if(this.field[this.pos] == '<') + { + // Address is a prhase then a route addr + routeaddr = this.getroute(); + + if(this.commentlist.length) + returnlist = {label:plist.join(SPACE) + ' (' + this.commentlist.join(SPACE) + ')', address:routeaddr}; + + else + returnlist = {label:plist.join(SPACE), address:routeaddr}; + } + + else + { + if(plist.length) + returnlist = {label:this.commentlist.join(SPACE), address:plist[0]}; + + else if(this.specials.indexOf(this.field[this.pos]) != -1) + this.pos++; + } + + this.gotonext(); + + if(this.pos < this.field.length && this.field[this.pos] == ',') + this.pos++; + + return returnlist; + }, + + getroute: function() + { + // Parse a route address. this method skips all route stuff and returns addrspec + if(this.field[this.pos] != '<') + return ''; + + var expectroute = false, adlist = ''; + + this.pos++; + this.gotonext(); + + while(this.pos < this.field.length) + { + if(expectroute) + { + this.getdomain(); + expectroute = false; + } + else if(this.field[this.pos] == '>') + { + this.pos += 1; + break; + } + else if(this.field[this.pos] == '@') + { + this.pos += 1; + expectroute = true; + } + else if(this.field[this.pos] == ':') + { + this.pos++; + } + else + { + adlist = this.getspec(); + this.pos++; + break; + } + + this.gotonext(); + } + + return adlist; + }, + + getspec: function() + { + //parse an RFC 2822 addr-spec + var aslist = []; + + this.gotonext(); + + while(this.pos < this.field.length) + { + if(this.field[this.pos] == '.') + { + aslist.push('.'); + this.pos++; + } + + else if(this.field[this.pos] == '"') + aslist.push('"' + this.getquote() + '"'); + + else if(this.atomends.indexOf(this.field[this.pos]) != -1) + break; + + else + aslist.push(this.getatom()); + + this.gotonext(); + } + + if(this.pos >= this.field.length || this.field[this.pos] != '@') + return aslist.join(EMPTYSTRING); + + aslist.push('@'); + this.pos++; + this.gotonext(); + + return aslist.join(EMPTYSTRING) + this.getdomain(); + }, + + getdomain: function() + { + // get the complete domain name from an address + var sdlist = []; + + while(this.pos < this.field.length) + { + if(this.LWS.indexOf(this.field[this.pos]) != -1) + this.pos++; + + else if(this.field[this.pos] == '(') + this.commentlist.push(this.getcomment()); + + else if(this.field[this.pos] == '[') + sdlist.push(this.getdomainliteral()); + + else if(this.field[this.pos] == '.') + { + this.pos++; + sdlist.push('.'); + } + + else if(this.atomends.indexOf(this.field[this.pos]) != -1) + break; + + else + sdlist.push(this.getatom()); + } + + return sdlist.join(EMPTYSTRING); + }, + + getdelimited: function(beginchar, endchars, allowcomments) + { + /* + * Parse a header fragment delimited by special characters. + * + * `beginchar' is the start character for the fragment. + * If self is not looking at an instance of `beginchar' then + * getdelimited returns the empty string. + * + * `endchars' is a sequence of allowable end-delimiting characters. + * Parsing stops when one of these is encountered. + * + * If `allowcomments' is non-zero, embedded RFC 2822 comments are allowed + * within the parsed fragment. + */ + + if(this.field[this.pos] != beginchar) + return ''; + + allowcomments = (allowcomments === false) ? false : true; + var slist = [''], quote = false; + this.pos++; + + while(this.pos < this.field.length) + { + if(quote) + { + slist.push(this.field[this.pos]); + quote = false; + } + else if(endchars.indexOf(this.field[this.pos]) != -1) + { + this.pos++; + break; + } + else if(allowcomments && this.field[this.pos] == '(') + { + slist.push(this.getcomment()); + continue; + } + + else if(this.field[this.pos] == '\\') + quote = true; + + else + slist.push(this.field[this.pos]); + + this.pos++; + + } + + return slist.join(EMPTYSTRING); + }, + + getquote: function() + { + // get a quote-delimited fragment from self's field + return this.getdelimited('"', '"\r', false); + }, + + getcomment: function() + { + // Get a parenthesis-delimited fragment from self's field. + return this.getdelimited('(', ')\r', true); + }, + + getdomainliteral: function() + { + // parse an rfc 2822 domain literal + return '[' + this.getdelimited('[', ']\r', false) + ']'; + }, + + getatom: function(atomends) + { + /* + * Parse an RFC 2822 atom. + * + * Optional atomends specifies a different set of end token delimiters + * (the default is to use this.atomends). This is used e.g. in + * getphraselist() since phrase endings must not include the `.' (which + * is legal in phrases). + */ + + var atomlist = ['']; + + if(atomends === undefined) + atomends = this.atomends; + + while(this.pos < this.field.length) + { + if(atomends.indexOf(this.field[this.pos]) != -1) + break; + + else + atomlist.push(this.field[this.pos]); + + this.pos++; + } + + return atomlist.join(EMPTYSTRING); + }, + + getphraselist: function() + { + /* + * Parse a sequence of RFC 2822 phrases. + * + * A phrase is a sequence of words, which are in turn either RFC 2822 + * atoms or quoted-strings. Phrases are canonicalized by squeezing all + * runs of continuous whitespace into one space. + */ + + var plist = []; + + while(this.pos < this.field.length) + { + if(this.FWS.indexOf(this.field[this.pos]) != -1) + this.pos++; + + else if(this.field[this.pos] == '"') + plist.push(this.getquote()); + + else if(this.field[this.pos] == '(') + this.commentlist.push(this.getcomment()); + + else if(this.phraseends.indexOf(this.field[this.pos]) != -1) + break; + + else + plist.push(this.getatom(this.phraseends)); + } + + return plist; + } +}; + +exports.Address = Address; +exports.parse = function(field) +{ + var addresses = (new Address(field)).getlist(); + + return addresses.length ? addresses : []; +}; diff --git a/node_modules/emailjs/smtp/client.js b/node_modules/emailjs/smtp/client.js new file mode 100644 index 0000000..a26760c --- /dev/null +++ b/node_modules/emailjs/smtp/client.js @@ -0,0 +1,177 @@ +var smtp = require('./smtp'); +var smtpError = require('./error'); +var message = require('./message'); +var address = require('./address'); + +var Client = function(server) +{ + this.smtp = new smtp.SMTP(server); + //this.smtp.debug(1); + + this.queue = []; + this.timer = null; + this.sending = false; + this.ready = false; +}; + +Client.prototype = +{ + _poll: function() + { + var self = this; + + clearTimeout(self.timer); + + if(self.queue.length) + { + if(self.smtp.state() == smtp.state.NOTCONNECTED) + self._connect(self.queue[0]); + + else if(self.smtp.state() == smtp.state.CONNECTED && !self.sending && self.ready) + self._sendmail(self.queue.shift()); + } + // wait around 1 seconds in case something does come in, otherwise close out SMTP connection if still open + else if(self.smtp.state() == smtp.state.CONNECTED) + self.timer = setTimeout(function() { self.smtp.quit(); }, 1000); + }, + + _connect: function(stack) + { + var self = this, + + connect = function(err) + { + if(!err) + { + var begin = function(err) + { + if(!err) + { + self.ready = true; + self._poll(); + } + else + stack.callback(err, stack.message); + }; + + if(!self.smtp.authorized()) + self.smtp.login(begin); + + else + self.smtp.ehlo_or_helo_if_needed(begin); + } + else + stack.callback(err, stack.message); + }; + + self.ready = false; + self.smtp.connect(connect); + }, + + send: function(msg, callback) + { + var self = this; + + if(!(msg instanceof message.Message) + && msg.from + && (msg.to || msg.cc || msg.bcc) + && msg.text) + msg = message.create(msg); + + if(msg instanceof message.Message) + { + msg.valid(function(valid, why) + { + if(valid) + { + var stack = + { + message: msg, + to: address.parse(msg.header.to), + from: address.parse(msg.header.from)[0].address, + callback: callback || function() {} + }; + + if(msg.header.cc) + stack.to = stack.to.concat(address.parse(msg.header.cc)); + + if(msg.header.bcc) + stack.to = stack.to.concat(address.parse(msg.header.bcc)); + + self.queue.push(stack); + self._poll(); + } + else + callback(new Error(why), msg); + }); + } + else + callback(new Error("message is not a valid Message instance"), msg); + }, + + _sendsmtp: function(stack, next) + { + var self = this; + var check= function(err) + { + if(!err && next) + { + next.apply(self, [stack]); + } + else + { + // if we snag on SMTP commands, call done, passing the error + // but first reset SMTP state so queue can continue polling + self.smtp.rset(function() { self._senddone(err, stack); }); + } + }; + + return check; + }, + + _sendmail: function(stack) + { + var self = this; + self.sending = true; + self.smtp.mail(self._sendsmtp(stack, self._sendrcpt), '<' + stack.from + '>'); + }, + + _sendrcpt: function(stack) + { + var self = this, to = stack.to.shift().address; + self.smtp.rcpt(self._sendsmtp(stack, stack.to.length ? self._sendrcpt : self._senddata), '<'+ to +'>'); + }, + + _senddata: function(stack) + { + var self = this; + self.smtp.data(self._sendsmtp(stack, self._sendmessage)); + }, + + _sendmessage: function(stack) + { + var self = this, stream = stack.message.stream(); + + stream.on('data', function(data) { self.smtp.message(data); }); + stream.on('end', function() { self.smtp.data_end(self._sendsmtp(stack, function() { self._senddone(null, stack) })); }); + + // there is no way to cancel a message while in the DATA portion, so we have to close the socket to prevent + // a bad email from going out + stream.on('error', function(err) { self.smtp.close(); self._senddone(err, stack); }); + }, + + _senddone: function(err, stack) + { + var self = this; + self.sending = false; + stack.callback(err, stack.message); + self._poll(); + } +}; + +exports.Client = Client; + +exports.connect = function(server) +{ + return new Client(server); +}; diff --git a/node_modules/emailjs/smtp/error.js b/node_modules/emailjs/smtp/error.js new file mode 100644 index 0000000..0bb8f7d --- /dev/null +++ b/node_modules/emailjs/smtp/error.js @@ -0,0 +1,21 @@ +module.exports = function(message, code, error, smtp) +{ + var err = new Error(message); + err.code = code; + if(error) + err.previous = error; + err.smtp = smtp; + + return err; +}; + +module.exports.COULDNOTCONNECT = 1; +module.exports.BADRESPONSE = 2; +module.exports.AUTHFAILED = 3; +module.exports.TIMEDOUT = 4; +module.exports.ERROR = 5; +module.exports.NOCONNECTION = 6; +module.exports.AUTHNOTSUPPORTED = 7; +module.exports.CONNECTIONCLOSED = 8; +module.exports.CONNECTIONENDED = 9; +module.exports.CONNECTIONAUTH = 10; diff --git a/node_modules/emailjs/smtp/message.js b/node_modules/emailjs/smtp/message.js new file mode 100644 index 0000000..c88d852 --- /dev/null +++ b/node_modules/emailjs/smtp/message.js @@ -0,0 +1,596 @@ +var stream = require('stream'); +var util = require('util'); +var fs = require('fs'); +var os = require('os'); +var path = require('path'); +var moment = require('moment'); +var CRLF = "\r\n"; +var MIMECHUNK = 76; // MIME standard wants 76 char chunks when sending out. +var BASE64CHUNK= 24; // BASE64 bits needed before padding is used +var MIME64CHUNK= MIMECHUNK * 6; // meets both base64 and mime divisibility +var BUFFERSIZE = MIMECHUNK*24*7; // size of the message stream buffer +var counter = 0; + +// support for nodejs without Buffer.concat native function +if(!Buffer.concat) +{ + require("bufferjs/concat"); +} + +var generate_boundary = function() +{ + var text = ""; + var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'()+_,-./:=?"; + + for(var i=0; i < 69; i++) + text += possible.charAt(Math.floor(Math.random() * possible.length)); + + return text; +}; + +var Message = function(headers) +{ + this.attachments = []; + this.alternative = null; + var now = new Date(); + this.header = { + "message-id":"<" + now.getTime() + "." + (counter++) + "." + process.pid + "@" + os.hostname() +">", + "date":moment().format("ddd, DD MMM YYYY HH:mm:ss ZZ") + }; + this.content = "text/plain; charset=utf-8"; + + for(var header in headers) + { + // allow user to override default content-type to override charset or send a single non-text message + if(/^content-type$/i.test(header)) + { + this.content = headers[header]; + } + else if(header == 'text') + { + this.text = headers[header]; + } + else if(header == "attachment" && typeof (headers[header]) == "object") + { + if((headers[header]).constructor == Array) + { + var that = this; + + headers[header].forEach(function(attachment) + { + that.attach(attachment); + }); + } + else + { + this.attach(headers[header]); + } + } + else + { + // allow any headers the user wants to set?? + // if(/cc|bcc|to|from|reply-to|sender|subject|date|message-id/i.test(header)) + this.header[header.toLowerCase()] = headers[header]; + } + } +}; + +Message.prototype = +{ + attach: function(options) + { + /* + legacy support, will remove eventually... + arguments -> (path, type, name, headers) + */ + if (arguments.length > 1) + options = {path:options, type:arguments[1], name:arguments[2]}; + + // sender can specify an attachment as an alternative + if(options.alternative) + { + this.alternative = options; + this.alternative.charset = options.charset || "utf-8"; + this.alternative.type = options.type || "text/html"; + this.alternative.inline = true; + } + else + this.attachments.push(options); + + return this; + }, + + /* + legacy support, will remove eventually... + should use Message.attach() instead + */ + attach_alternative: function(html, charset) + { + this.alternative = + { + data: html, + charset: charset || "utf-8", + type: "text/html", + inline: true + }; + + return this; + }, + + valid: function(callback) + { + var self = this; + + if(!self.header.from) + { + callback(false, "message does not have a valid sender"); + } + if(!(self.header.to || self.header.cc || self.header.bcc)) + { + callback(false, "message does not have a valid recipient"); + } + else if(self.attachments.length === 0) + { + callback(true); + } + else + { + var check = []; + var failed = []; + + self.attachments.forEach(function(attachment, index) + { + if(attachment.path) + { + // migrating path->fs for existsSync) + if(!(fs.existsSync || path.existsSync)(attachment.path)) + failed.push(attachment.path + " does not exist"); + } + else if(attachment.stream) + { + if(!attachment.stream.readable) + failed.push("attachment stream is not readable"); + } + else if(!attachment.data) + { + failed.push("attachment has no data associated with it"); + } + }); + + callback(failed.length === 0, failed.join(", ")); + } + }, + + stream: function() + { + return new MessageStream(this); + }, + + read: function(callback) + { + var buffer = ""; + + var capture = function(data) + { + buffer += data; + }; + + var output = function(err) + { + callback(err, buffer); + }; + + var str = this.stream(); + + str.on('data', capture); + str.on('end', output); + str.on('error', output); + } +}; + +var MessageStream = function(message) +{ + var self = this; + + stream.Stream.call(self); + + self.message = message; + self.readable = true; + self.paused = false; + self.buffer = new Buffer(MIMECHUNK*24*7); + self.bufferIndex = 0; + + var output_process = function(next, args) + { + if(self.paused) + { + self.resumed = function() { next.apply(null, args); }; + } + else + { + next.apply(null, args); + } + + next.apply(null, args); + }; + + var output_mixed = function() + { + var boundary = generate_boundary(); + var data = ["Content-Type: multipart/mixed; boundary=\"", boundary, "\"", CRLF, CRLF, "--", boundary, CRLF]; + + output(data.join('')); + + if(!self.message.alternative) + { + output_text(self.message); + output_message(boundary, self.message.attachments, 0, close); + } + else + { + output_alternative(self.message, function() { output_message(boundary, self.message.attachments, 0, close); }); + } + }; + + var output_message = function(boundary, list, index, callback) + { + if(index < list.length) + { + output(["--", boundary, CRLF].join('')); + + if(list[index].related) + { + output_related(list[index], function() { output_message(boundary, list, index + 1, callback); }); + } + else + { + output_attachment(list[index], function() { output_message(boundary, list, index + 1, callback); }); + } + } + else + { + output([CRLF, "--", boundary, "--", CRLF, CRLF].join('')); + callback(); + } + }; + + var output_attachment_headers = function(attachment) + { + var data = [], + header, + headers = + { + 'content-type': attachment.type + (attachment.charset ? "; charset=" + attachment.charset : ""), + 'content-transfer-encoding': 'base64', + 'content-disposition': attachment.inline ? 'inline' : 'attachment; filename="' + attachment.name + '"' + }; + + for(header in (attachment.headers || {})) + { + // allow sender to override default headers + headers[header.toLowerCase()] = attachment.headers[header]; + } + + for(header in headers) + { + data = data.concat([header, ': ', headers[header], CRLF]); + } + + output(data.concat([CRLF]).join('')); + }; + + var output_attachment = function(attachment, callback) + { + var build = attachment.path ? output_file : attachment.stream ? output_stream : output_data; + output_attachment_headers(attachment); + build(attachment, callback); + }; + + var output_data = function(attachment, callback) + { + output_base64(attachment.encoded ? attachment.data : new Buffer(attachment.data).toString("base64"), callback); + }; + + var output_file = function(attachment, next) + { + var chunk = MIME64CHUNK*16; + var buffer = new Buffer(chunk); + var closed = function(fd) { fs.close(fd); }; + var opened = function(err, fd) + { + if(!err) + { + var read = function(err, bytes) + { + if(!err && self.readable) + { + // guaranteed to be encoded without padding unless it is our last read + output_base64(buffer.toString("base64", 0, bytes), function() + { + if(bytes == chunk) // we read a full chunk, there might be more + { + fs.read(fd, buffer, 0, chunk, null, read); + } + else // that was the last chunk, we are done reading the file + { + self.removeListener("error", closed); + fs.close(fd, next); + } + }); + } + else + { + self.emit('error', err || {message:"message stream was interrupted somehow!"}); + } + }; + + fs.read(fd, buffer, 0, chunk, null, read); + self.once("error", closed); + } + else + self.emit('error', err); + }; + + fs.open(attachment.path, 'r+', opened); + }; + + var output_stream = function(attachment, callback) + { + if(attachment.stream.readable) + { + var previous = null; + + attachment.stream.resume(); + attachment.stream.on('end', function() + { + output_base64((previous || new Buffer(0)).toString("base64"), callback); + self.removeListener('pause', attachment.stream.pause); + self.removeListener('resume', attachment.stream.resume); + self.removeListener('error', attachment.stream.resume); + }); + + attachment.stream.on('data', function(buffer) + { + // do we have bytes from a previous stream data event? + if(previous) + { + var buffer2 = Buffer.concat([previous, buffer]); + previous = null; // free up the buffer + buffer = null; // free up the buffer + buffer = buffer2; + } + + var padded = buffer.length % (MIME64CHUNK); + + // encode as much of the buffer to base64 without empty bytes + if(padded) + { + previous = new Buffer(padded); + // copy dangling bytes into previous buffer + buffer.copy(previous, 0, buffer.length - padded); + } + + output_base64(buffer.toString("base64", 0, buffer.length - padded)); + }); + + self.on('pause', attachment.stream.pause); + self.on('resume', attachment.stream.resume); + self.on('error', attachment.stream.resume); + } + else + self.emit('error', {message:"stream not readable"}); + }; + + var output_base64 = function(data, callback) + { + var loops = Math.ceil(data.length / MIMECHUNK); + var loop = 0; + + while(loop < loops) + { + output(data.substring(MIMECHUNK * loop, MIMECHUNK * (loop + 1)) + CRLF); + loop++; + } + + if(callback) + callback(); + }; + + var output_text = function(message) + { + var data = []; + + data = data.concat(["Content-Type:", message.content, CRLF, "Content-Transfer-Encoding: 7bit", CRLF]); + data = data.concat(["Content-Disposition: inline", CRLF, CRLF]); + data = data.concat([message.text || "", CRLF, CRLF]); + + output(data.join('')); + }; + + var output_alternative = function(message, callback) + { + var data = [], boundary = generate_boundary(); + + data = data.concat(["Content-Type: multipart/alternative; boundary=\"", boundary, "\"", CRLF, CRLF]); + data = data.concat(["--", boundary, CRLF]); + + output(data.join('')); + output_text(message); + output(["--", boundary, CRLF].join('')); + + var finish = function() + { + output([CRLF, "--", boundary, "--", CRLF, CRLF].join('')); + callback(); + }; + + if(message.alternative.related) + { + output_related(message.alternative, finish); + } + else + { + output_attachment(message.alternative, finish); + } + }; + + var output_related = function(message, callback) + { + var data = [], boundary = generate_boundary(); + + data = data.concat(["Content-Type: multipart/related; boundary=\"", boundary, "\"", CRLF, CRLF]); + data = data.concat(["--", boundary, CRLF]); + + output(data.join('')); + + output_attachment(message, function() + { + output_message(boundary, message.related, 0, function() + { + output([CRLF, "--", boundary, "--", CRLF, CRLF].join('')); + callback(); + }); + }); + }; + + var output_header_data = function() + { + if(self.message.attachments.length || self.message.alternative) + { + output("MIME-Version: 1.0" + CRLF); + output_mixed(); + } + else // you only have a text message! + { + output_text(self.message); + close(); + } + }; + + var output_header = function() + { + var data = []; + + for(var header in self.message.header) + { + // do not output BCC in the headers... + if(!(/bcc/i.test(header))) + data = data.concat([header, ": ", self.message.header[header], CRLF]); + } + + output(data.join('')); + output_header_data(); + }; + + var output = function(data, callback, args) + { + var bytes = Buffer.byteLength(data); + + // can we buffer the data? + if(bytes + self.bufferIndex < self.buffer.length) + { + self.buffer.write(data, self.bufferIndex); + self.bufferIndex += bytes; + + if(callback) + callback.apply(null, args); + } + // we can't buffer the data, so ship it out! + else if(bytes > self.buffer.length) + { + if(self.bufferIndex) + { + self.emit('data', self.buffer.toString("utf-8", 0, self.bufferIndex)); + self.bufferIndex = 0; + } + + var loops = Math.ceil(data.length / self.buffer.length); + var loop = 0; + + while(loop < loops) + { + self.emit('data', data.substring(self.buffer.length*loop, self.buffer.length*(loop + 1))); + loop++; + } + } + else // we need to clean out the buffer, it is getting full + { + if(!self.paused) + { + self.emit('data', self.buffer.toString("utf-8", 0, self.bufferIndex)); + self.buffer.write(data, 0); + self.bufferIndex = bytes; + + // we could get paused after emitting data... + if(self.paused) + { + self.once("resume", function() { callback.apply(null, args); }); + } + else if(callback) + { + callback.apply(null, args); + } + } + else // we can't empty out the buffer, so let's wait till we resume before adding to it + { + self.once("resume", function() { output(data, callback, args); }); + } + } + }; + + var close = function(err) + { + if(err) + { + self.emit("error", err); + } + else + { + self.emit('data', self.buffer.toString("utf-8", 0, self.bufferIndex)); + self.emit('end'); + } + + self.buffer = null; + self.bufferIndex = 0; + self.readable = false; + self.removeAllListeners("resume"); + self.removeAllListeners("pause"); + self.removeAllListeners("error"); + self.removeAllListeners("data"); + self.removeAllListeners("end"); + }; + + self.once("destroy", close); + process.nextTick(output_header); +}; + +util.inherits(MessageStream, stream.Stream); + +MessageStream.prototype.pause = function() +{ + this.paused = true; + this.emit('pause'); +}; + +MessageStream.prototype.resume = function() +{ + this.paused = false; + this.emit('resume'); +}; + +MessageStream.prototype.destroy = function() +{ + this.emit("destroy", self.bufferIndex > 0 ? {message:"message stream destroyed"} : null); +}; + +MessageStream.prototype.destroySoon = function() +{ + this.emit("destroy"); +}; + +exports.Message = Message; +exports.BUFFERSIZE = BUFFERSIZE; +exports.create = function(headers) +{ + return new Message(headers); +}; diff --git a/node_modules/emailjs/smtp/response.js b/node_modules/emailjs/smtp/response.js new file mode 100644 index 0000000..701810f --- /dev/null +++ b/node_modules/emailjs/smtp/response.js @@ -0,0 +1,72 @@ +var SMTPError = require('./error'); + +var SMTPResponse = function(stream, timeout, onerror) +{ + var buffer = '', + + notify = function() + { + if(buffer.length) + { + // parse buffer for response codes + var line = buffer.replace("\r", ''); + var match = line ? line.match(/(\d+)\s?(.*)/) : null; + + stream.emit('response', null, match ? {code:match[1], message:match[2], data:line} : {code:-1, data:line}); + buffer = ''; + } + }, + + error = function(err) + { + stream.emit('response', SMTPError('connection encountered an error', SMTPError.ERROR, err)); + }, + + timedout = function(err) + { + stream.emit('response', SMTPError('timedout while connecting to smtp server', SMTPError.TIMEDOUT, err)); + }, + + watch = function(data) + { + var decoded = data.toString(); + var emit = false; + var code = 0; + + buffer += decoded; + notify(); + }, + + close = function(err) + { + stream.emit('response', SMTPError('connection has closed', SMTPError.CONNECTIONCLOSED, err)); + }, + + end = function(err) + { + stream.emit('response', SMTPError('connection has ended', SMTPError.CONNECTIONENDED, err)); + }; + + this.stop = function(err) + { + stream.removeAllListeners('response'); + stream.removeListener('data', watch); + stream.removeListener('end', end); + stream.removeListener('close', close); + stream.removeListener('error', error); + + if(err && typeof(onerror) == "function") + onerror(err); + }; + + stream.on('data', watch); + stream.on('end', end); + stream.on('close', close); + stream.on('error', error); + stream.setTimeout(timeout, timedout); +}; + +exports.monitor = function(stream) +{ + return new SMTPResponse(stream); +}; diff --git a/node_modules/emailjs/smtp/smtp.js b/node_modules/emailjs/smtp/smtp.js new file mode 100644 index 0000000..4c0c2bd --- /dev/null +++ b/node_modules/emailjs/smtp/smtp.js @@ -0,0 +1,592 @@ +/* + * SMTP class written using python's (2.7) smtplib.py as a base + */ +var net = require('net'); +var crypto = require('crypto'); +var os = require('os'); +var tls = require('tls'); +var util = require('util'); +var events = require('events'); +var starttls = require('./tls'); + +var SMTPResponse = require('./response'); +var SMTPError = require('./error'); + +var SMTP_PORT = 25; +var SMTP_SSL_PORT = 465; +var SMTP_TLS_PORT = 587; +var CRLF = "\r\n"; +var AUTH_METHODS = {PLAIN:'PLAIN', CRAM_MD5:'CRAM-MD5', LOGIN:'LOGIN'}; +var TIMEOUT = 5000; +var DEBUG = 0; + +var log = function() +{ + if(DEBUG) + { + Array.prototype.slice.call(arguments).forEach(function(d) { console.log(d); }); + } +}; + +var quotedata = function(data) +{ + // Quote data for email. + // Double leading '.', and change Unix newline '\\n', or Mac '\\r' into + // Internet CRLF end-of-line. + + return data.replace(/(?:\r\n|\n|\r(?!\n))/g, CRLF).replace(/^\./gm, '..'); +}; + +var caller = function(callback) +{ + if(typeof(callback) == 'function') + { + var args = Array.prototype.slice.call(arguments); + args.shift(); + + callback.apply(null, args); + } +}; + +var SMTPState = +{ + NOTCONNECTED: 0, + CONNECTING: 1, + CONNECTED: 2 +}; + +var SMTP = function(options) +{ + events.EventEmitter.call(this); + + options = options || {}; + + this.sock = null; + this.timeout = options.timeout || TIMEOUT; + this.features = null; + this._state = SMTPState.NOTCONNECTED; + this._secure = false; + this.loggedin = (options.user && options.password) ? false : true; + this.domain = options.domain || os.hostname(); + this.host = options.host || 'localhost'; + this.port = options.port || (options.ssl ? SMTP_SSL_PORT : options.tls ? SMTP_TLS_PORT : SMTP_PORT); + this.ssl = options.ssl || false; + this.tls = options.tls || false; + this.monitor = null; + + // keep these strings hidden when quicky debugging/logging + this.user = function() { return options.user; }; + this.password = function() { return options.password; }; +}; + +SMTP.prototype = +{ + debug: function(level) + { + DEBUG = level; + }, + + state: function() + { + return this._state; + }, + + authorized: function() + { + return this.loggedin; + }, + + connect: function(callback, port, host, options) + { + options = options || {}; + + var self = this; + + self.host = host || self.host; + self.port = port || self.port; + self.ssl = options.ssl || self.ssl; + + if(self._state != SMTPState.NOTCONNECTED) + self.quit(); + + var connected = function(err) + { + if(!err) + { + log("connected: " + self.host + ":" + self.port); + + if(self.ssl && !self.tls) + { + // if key/ca/cert was passed in, check if connection is authorized + if(typeof(self.ssl) != 'boolean' && !self.sock.authorized) + { + self.close(true); + caller(callback, SMTPError('could not establish an ssl connection', SMTPError.CONNECTIONAUTH, err)); + } + else + self._secure = true; + } + } + else + { + self.close(true); + caller(callback, SMTPError("could not connect", SMTPError.COULDNOTCONNECT, err)); + } + }; + + var response = function(err, msg) + { + if(err) + { + caller(callback, err); + } + else if(msg.code == '220') + { + log(msg.data); + + // might happen first, so no need to wait on connected() + self._state = SMTPState.CONNECTED; + caller(callback, null, msg.data); + } + else + { + log("response (data): " + msg.data); + self.quit(); + caller(callback, SMTPError("bad response on connection", SMTPError.BADRESPONSE, err, msg.data)); + } + }; + + self._state = SMTPState.CONNECTING; + log("connecting: " + self.host + ":" + self.port); + + if(self.ssl) + { + self.sock = tls.connect(self.port, self.host, self.ssl, connected); + } + else + { + self.sock = new net.Socket(); + self.sock.connect(self.port, self.host, connected); + } + + self.monitor = SMTPResponse.monitor(self.sock, self.timeout, function() { self.close(true); }); + self.sock.once('response', response); + }, + + send: function(str, callback) + { + var self = this; + + if(self.sock && self._state == SMTPState.CONNECTED) + { + log(str); + + var response = function(err, msg) + { + if(err) + { + caller(callback, err); + } + else + { + log(msg.data); + caller(callback, null, msg); + } + }; + + self.sock.once('response', response); + self.sock.write(str); + } + else + { + self.close(true); + caller(callback, SMTPError('no connection has been established', SMTPError.NOCONNECTION)); + } + }, + + command: function(cmd, callback, codes, failed) + { + codes = Array.isArray(codes) ? codes : typeof(codes) == 'number' ? [codes] : [250]; + + var response = function(err, msg) + { + if(err) + { + caller(callback, err); + } + else + { + if(codes.indexOf(Number(msg.code)) != -1) + caller(callback, err, msg.data, msg.message); + + else + caller(callback, SMTPError("bad response on command '" + cmd.split(' ')[0] + "'", SMTPError.BADRESPONSE, null, msg.data)); + } + }; + + this.send(cmd + CRLF, response); + }, + + helo: function(callback, domain) + { + /* + * SMTP 'helo' command. + * Hostname to send for self command defaults to the FQDN of the local + * host. + */ + + this.command("helo " + (domain || this.domain), callback); + }, + + starttls: function(callback) + { + var self = this, + + response = function(err, msg) + { + if(err) + { + err.message += " while establishing a starttls session"; + caller(callback, err); + } + else + { + var secured_socket = null; + var secured = function() + { + self._secure = true; + self.sock = secured_socket; + + var error = function(err) + { + self.close(true); + caller(callback, err); + }; + + SMTPResponse.monitor(self.sock, self.timeout, function() { self.close(true); }); + caller(callback, msg.data); + }; + + secured_socket = starttls.secure(self.sock, self.ssl, secured); + } + }; + + this.command("starttls", response, [220]); + }, + + ehlo: function(callback, domain) + { + var self = this, + + response = function(err, data) + { + if(err) + { + caller(callback, err); + } + else + { + // According to RFC1869 some (badly written) + // MTA's will disconnect on an ehlo. Toss an exception if + // that happens -ddm + + data.split("\n").forEach(function(ext) + { + var parse = ext.match(/^(?:\d+[\-=]?)\s*?([^\s]+)(?:\s+(.*)\s*?)?$/); + + // To be able to communicate with as many SMTP servers as possible, + // we have to take the old-style auth advertisement into account, + // because: + // 1) Else our SMTP feature parser gets confused. + // 2) There are some servers that only advertise the auth methods we + // support using the old style. + + if(parse) + { + // RFC 1869 requires a space between ehlo keyword and parameters. + // It's actually stricter, in that only spaces are allowed between + // parameters, but were not going to check for that here. Note + // that the space isn't present if there are no parameters. + self.features[parse[1].toLowerCase()] = parse[2] || true; + } + }); + + if(self.tls && !self._secure) + self.starttls(function() { self.ehlo(callback, domain); }); + + else + caller(callback, err, data); + } + }; + + this.features = {}; + this.command("ehlo " + (domain || this.domain), response); + }, + + has_extn: function(opt) + { + return this.features[opt.toLowerCase()] === undefined; + }, + + help: function(callback, args) + { + // SMTP 'help' command, returns text from the server + this.command(args ? "help " + args : "help", callback, [211, 214]); + }, + + rset: function(callback) + { + this.command("rset", callback); + }, + + noop: function(callback) + { + this.send("noop", callback); + }, + + mail: function(callback, from) + { + this.command("mail FROM:" + from, callback); + }, + + rcpt: function(callback, to) + { + this.command("RCPT TO:" + to, callback, [250, 251]); + }, + + data: function(callback) + { + this.command("data", callback, [354]); + }, + + data_end: function(callback) + { + this.command(CRLF + ".", callback); + }, + + message: function(data) + { + log(data); + this.sock.write(data); + }, + + verify: function(address, callback) + { + // SMTP 'verify' command -- checks for address validity.""" + this.command("vrfy " + address, callback, [250, 251, 252]); + }, + + expn: function(address, callback) + { + // SMTP 'expn' command -- expands a mailing list. + this.command("expn " + address, callback); + }, + + ehlo_or_helo_if_needed: function(callback, domain) + { + // Call self.ehlo() and/or self.helo() if needed. + // If there has been no previous EHLO or HELO command self session, self + // method tries ESMTP EHLO first. + var self = this; + + if(!this.features) + { + var response = function(err, data) + { + caller(callback, err, data); + }; + + var attempt = function(err) + { + if(err) + self.helo(response, domain); + + else + caller(callback, err); + }; + + self.ehlo(attempt, domain); + } + }, + + login: function(callback, user, password, options) + { + var self = this, + + login = + { + user: user ? function() { return user; } : self.user, + password: password ? function() { return password; } : self.password, + method: options && options.method ? options.method.toUpperCase() : '' + }, + + domain = options && options.domain ? options.domain : this.domain, + + initiate = function(err, data) + { + if(err) + { + caller(callback, err); + return; + } + + /* + * Log in on an SMTP server that requires authentication. + * + * The arguments are: + * - user: The user name to authenticate with. + * - password: The password for the authentication. + * + * If there has been no previous EHLO or HELO command self session, self + * method tries ESMTP EHLO first. + * + * This method will return normally if the authentication was successful. + */ + + var method = null, + + encode_cram_md5 = function(challenge) + { + challenge = (new Buffer(challenge, "base64")).toString("ascii"); + + var hmac = crypto.createHmac('md5', login.password()); + hmac.update(challenge); + + return (new Buffer(login.user() + " " + hmac.digest('hex')).toString("base64")); + }, + + encode_plain = function() + { + return (new Buffer("\\0" + login.user() + "\\0" + login.password())).toString("base64"); + }; + + // List of authentication methods we support: from preferred to + // less preferred methods. + if(!method) + { + var preferred = [AUTH_METHODS.CRAM_MD5, AUTH_METHODS.LOGIN, AUTH_METHODS.PLAIN]; + + for(var i = 0; i < preferred.length; i++) + { + if((self.features.auth || "").indexOf(preferred[i]) != -1) + { + method = preferred[i]; + break; + } + } + } + + // handle bad responses from command differently + var failed = function(err, data) + { + self.loggedin = false; + caller(callback, SMTPError('authorization.failed', SMTPError.AUTHFAILED, err, data)); + }; + + var response = function(err, data) + { + if(err) + { + failed(err, data); + } + else + { + self.loggedin = true; + caller(callback, err, data); + } + }; + + var attempt = function(err, data, msg) + { + if(err) + { + failed(err, data); + } + else + { + if(method == AUTH_METHODS.CRAM_MD5) + self.command(encode_cram_md5(msg), response, [235, 503]); + + else if(method == AUTH_METHODS.LOGIN) + self.command((new Buffer(login.password())).toString("base64"), response, [235, 503]); + } + }; + + var attempt_user = function(err, data, msg) + { + if(err) + { + failed(err, data); + } + else + { + if(method == AUTH_METHODS.LOGIN) + self.command((new Buffer(login.user())).toString("base64"), attempt, [334]); + } + }; + + if(method == AUTH_METHODS.CRAM_MD5) + self.command("AUTH " + AUTH_METHODS.CRAM_MD5, attempt, [334]); + + else if(method == AUTH_METHODS.LOGIN) + self.command("AUTH " + AUTH_METHODS.LOGIN, attempt_user, [334]); + + else if(method == AUTH_METHODS.PLAIN) + self.command("AUTH " + AUTH_METHODS.PLAIN + " " + encode_plain(login.user(), login.password()), response, [235, 503]); + + else if(!method) + caller(callback, SMTPError('no form of authorization supported', SMTPError.AUTHNOTSUPPORTED, null, data)); + }; + + self.ehlo_or_helo_if_needed(initiate, domain); + }, + + close: function(force) + { + if(this.sock) + { + if(force) + { + log("smtp connection destroyed!"); + this.sock.destroy(); + } + else + { + log("smtp connection closed."); + this.sock.end(); + } + } + + if(this.monitor) + { + this.monitor.stop(); + this.monitor = null; + } + + this._state = SMTPState.NOTCONNECTED; + this._secure = false; + this.sock = null; + this.features = null; + this.loggedin = !(this.user() && this.password()); + }, + + quit: function(callback) + { + var self = this, + response = function(err, data) + { + caller(callback, err, data); + self.close(); + }; + + this.command("quit", response, [221, 250]); + } +}; + +for(var each in events.EventEmitter.prototype) +{ + SMTP.prototype[each] = events.EventEmitter.prototype[each]; +} + +exports.SMTP = SMTP; +exports.state = SMTPState; diff --git a/node_modules/emailjs/smtp/tls.js b/node_modules/emailjs/smtp/tls.js new file mode 100644 index 0000000..ee1ffd7 --- /dev/null +++ b/node_modules/emailjs/smtp/tls.js @@ -0,0 +1,64 @@ +var crypto = require('crypto'); +var tls = require('tls'); + +var secure = function(socket, options, cb) +{ + var sslcontext = crypto.createCredentials(options); + //sslcontext.context.setCiphers('RC4-SHA:AES128-SHA:AES256-SHA'); + + var pair = tls.createSecurePair(sslcontext, false); + + var cleartext = pipe(pair, socket); + + pair.on('secure', function() + { + var verifyError = (pair.ssl || pair._ssl).verifyError(); + + if(verifyError) + { + cleartext.authorized = false; + cleartext.authorizationError = verifyError; + } + else + { + cleartext.authorized = true; + } + + if (cb) cb(); + }); + + cleartext._controlReleased = true; + return cleartext; +}; + +var pipe = function(pair, socket) +{ + pair.encrypted.pipe(socket); + socket.pipe(pair.encrypted); + + var cleartext = pair.cleartext; + cleartext.socket = socket; + cleartext.encrypted = pair.encrypted; + cleartext.authorized = false; + + function onerror(e) + { + if (cleartext._controlReleased) + { + cleartext.emit('error', e); + } + } + + function onclose() + { + socket.removeListener('error', onerror); + socket.removeListener('close', onclose); + } + + socket.on('error', onerror); + socket.on('close', onclose); + + return cleartext; +}; + +exports.secure = secure; diff --git a/package.json b/package.json new file mode 100644 index 0000000..5ff53dc --- /dev/null +++ b/package.json @@ -0,0 +1,18 @@ +{ + "name": "ep_email_notifications", + "description": "Subscribe to a pad and recieve an email when someone edits your pad", + "version": "0.0.1", + "author": { + "name": "johnyma22", + "email": "john@mclear.co.uk", + "url": "John McLear" + }, + "contributors": [], + "dependencies": { + "emailjs": ">= 0.2.7", + "buffertools": ">= 1.0.8" + }, + "engines": { + "node": ">= 0.4.1" + } +} diff --git a/server_invite_via_email.js b/server_invite_via_email.js new file mode 100644 index 0000000..aa4c031 --- /dev/null +++ b/server_invite_via_email.js @@ -0,0 +1,31 @@ +exports.expressServer = function (hook_name, args, cb) { + args.app.get('/server_invite_via_email', function(req, res) { + console.log(req); + // Get the parameters from the POST request + var name = req.param('name', null); // the name of the recipient + var emailAddy = req.param('email', null); // the email address of the recipient + var padurl = req.param('padurl', null); // the url of the pad the recipient is being invited to + + // Get email and buffer tools dependencies + var email = require("emailjs/email"); + var buffertools = require("buffertools"); + + // Define the server connection + var server = email.server.connect({ + host: "localhost", + port: "25", + ssl: false + }); + + // Send the message and get a callback with an error or details of the message that was sent + server.send({ + text: "You have been invited to collaboratively edit the pad at: " +padurl, + from: "Etherpad ", + to: "<"+emailAddy+">", + subject: "You have been invited to a pad" + }, function(err, message){ + // console.log(err || message); + res.send(err || message); // Send the response back to the client + }); + }); +} diff --git a/static/js/invite_via_email.js b/static/js/invite_via_email.js new file mode 100644 index 0000000..3030341 --- /dev/null +++ b/static/js/invite_via_email.js @@ -0,0 +1,34 @@ +var $ = require('ep_etherpad-lite/static/js/rjquery').$; // use jQuery + +exports.postAceInit = function (hook_name, args, cb){ + // add email invite to then embed div + $("#embedcode").append( + ''+ + '

'+ + 'Invite someone to this pad:'+ + '

'+ + '
'+ + ' Your name:

'+ + ' The email address of the person you want to invite:


'+ + ' '+ + '
' + ); + + $('.sendEmailButton').click(function(){ + var padurl = $("#linkinput").val(); + var name = $('#youremailnameinput').val(); + var email = $('#emailrcptinput').val(); + var data = "name="+name+"&email="+email+"&padurl="+padurl; + url = "/server_invite_via_email"; + $.ajax({ + type: "GET", + url: url, + data: data, + }).done( + function(msg){ + } + ); + alert("Invitation sent..."); + $('#embed').fadeOut(); + }); +} diff --git a/update.js b/update.js new file mode 100644 index 0000000..8a39215 --- /dev/null +++ b/update.js @@ -0,0 +1,59 @@ +var API = require('../../src/node/db/API.js'), + async = require('../../src/node_modules/async'); + +exports.padUpdate = function (hook_name, _pad) { + + // The status of the users relationship with the pad -- IE if it's subscribed to this pad / if it's already on the pad + var userStatus = {}; + + // Temporary user object + var user = { + name: "John McLear", + email: "john@mclear.co.uk", + id: "a.n4gEeMLsv1GivNeh" + } + + var pad = _pad.pad; + var padId = pad.id; + + console.debug("ep_email_noficiations: padID of pad being edited:"+padId); + + async.series([ + function(callback){ + userStatus.userIsEditing = exports.isUserEditingPad(padId, user); + callback(); + }, + function(callback){ + console.warn("FOO"); + console.warn(userStatus); + callback(); + } + ]); + +}; + + + +exports.isUserEditingPad = function(padId, user){ + var foo = API.padUsers(padId, function(callback, padUsers){ // get the current users editing the pad + + var userIsEditing = false; + padUsers = padUsers.padUsers; + + async.forEach(padUsers, + function(userOnPad, callback){ + if(userOnPad.id == user.id){ + userIsEditing = true; // If the user is editing the pad then return true + callback(); + } + }, + function(err){ + console.warn(userIsEditing); // logs true. + return userIsEditing; // function should return true but returns undefined + } + ); + }); + console.warn("FOO", foo); + return foo; +}; +